/* ===================================================================
   PORTFOLIO WEBSITE - MODERN HIGH-PERFORMANCE STYLESHEET
   Aesthetic: Dark Modern Glassmorphism, Neon Accents, Ultra-Clean
   =================================================================== */

:root {
  --bg-main: #07090e;
  --bg-card: rgba(15, 23, 42, 0.65);
  --bg-card-hover: rgba(30, 41, 59, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(99, 102, 241, 0.35);

  --accent-primary: #6366f1; /* Indigo */
  --accent-primary-hover: #4f46e5;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-glow: 0 0 35px -5px rgba(99, 102, 241, 0.25);
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body {
  background: radial-gradient(circle at 50% 0%, #171c33 0%, #07090e 65%);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* Background Ambient Orbs */
.ambient-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1200px;
  height: 600px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.glow-orb-1 {
  position: absolute;
  top: -150px;
  left: 10%;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0) 70%);
  filter: blur(80px);
}
.glow-orb-2 {
  position: absolute;
  top: -100px;
  right: 15%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.16) 0%, rgba(6, 182, 212, 0) 70%);
  filter: blur(90px);
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Typography Helpers */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  letter-spacing: -0.025em;
  color: #ffffff;
  line-height: 1.25;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-accent {
  background: linear-gradient(135deg, #818cf8 0%, #38bdf8 50%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===================================================================
   HEADER & NAVBAR
   =================================================================== */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition-fast);
}

.site-header.scrolled {
  padding: 10px 0;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
}

.brand-badge-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.brand-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition-fast);
  position: relative;
  padding: 6px 0;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan));
  border-radius: 2px;
  transition: var(--transition-fast);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
  color: #fff;
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #7174ff, #5b53f3);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.82rem;
}

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* ===================================================================
   HERO SECTION
   =================================================================== */
.hero-section {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px;
  border-radius: 9999px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  max-width: 900px;
  margin: 0 auto 20px;
  line-height: 1.15;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 36px;
  font-weight: 400;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 50px;
}

/* Hero Metrics Bento */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto;
}

.metric-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  transition: var(--transition-fast);
}

.metric-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-3px);
  background: var(--bg-card-hover);
}

.metric-num {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: #fff;
  line-height: 1;
  margin-bottom: 6px;
}

.metric-num.emerald { color: var(--accent-emerald); }
.metric-num.cyan { color: var(--accent-cyan); }
.metric-num.indigo { color: #818cf8; }
.metric-num.amber { color: var(--accent-amber); }

.metric-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ===================================================================
   SECTION HEADER
   =================================================================== */
.section-wrapper {
  padding: 90px 0;
  position: relative;
}

.section-head {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 48px;
}

.section-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 14px;
}

.section-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ===================================================================
   PROJECTS FILTER & SHOWCASE
   =================================================================== */
.filter-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.project-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: var(--transition-smooth);
}

.project-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

.project-card.reversed {
  grid-template-columns: 1fr 1.15fr;
}
.project-card.reversed .project-visual {
  order: 2;
}
.project-card.reversed .project-content {
  order: 1;
}

/* Project Visual Area */
.project-visual {
  position: relative;
  overflow: hidden;
  min-height: 380px;
  background: #0d121f;
}

.project-img-main {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-img-main {
  transform: scale(1.05);
}

.project-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 9, 14, 0.1) 0%, rgba(7, 9, 14, 0.75) 100%);
  display: flex;
  align-items: flex-end;
  padding: 24px;
}

.visual-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.78rem;
  color: #fff;
  font-weight: 600;
}

/* Quick preview badge in corner */
.preview-overlay-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.preview-overlay-btn:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

/* Project Content Area */
.project-content {
  padding: 36px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-meta-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tag-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tag-badge.amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tag-badge.rose {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.tag-badge.emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.project-rating {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.project-heading {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: #fff;
}

.project-subheading {
  font-size: 0.9rem;
  color: var(--accent-cyan);
  font-weight: 600;
  margin-bottom: 16px;
}

.project-description {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Key Features List */
.project-features {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #cbd5e1;
}

.feature-icon {
  color: var(--accent-emerald);
  flex-shrink: 0;
}

/* Tech Badges */
.tech-stack-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--border-glass);
}

.tech-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
}

/* Card Action Buttons */
.project-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===================================================================
   SKILLS & BENTO GRID SECTION
   =================================================================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.bento-item {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: var(--transition-smooth);
}

.bento-item:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-3px);
  background: var(--bg-card-hover);
}

.bento-item.span-2 {
  grid-column: span 2;
}

.bento-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #818cf8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.bento-icon.cyan {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.3);
  color: var(--accent-cyan);
}

.bento-icon.emerald {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
}

.bento-icon.amber {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--accent-amber);
}

.bento-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.bento-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.skill-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.skill-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.78rem;
  color: #cbd5e1;
}

/* ===================================================================
   WORKFLOW / PROCESS SECTION
   =================================================================== */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
}

.process-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  position: relative;
  transition: var(--transition-fast);
}

.process-card:hover {
  border-color: rgba(6, 182, 212, 0.35);
  transform: translateY(-4px);
}

.process-step-num {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.1);
  line-height: 1;
  margin-bottom: 14px;
}

.process-card:hover .process-step-num {
  color: var(--accent-cyan);
}

.process-step-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.process-step-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ===================================================================
   CLOUDFLARE PAGES SPOTLIGHT BANNER
   =================================================================== */
.cf-banner {
  background: linear-gradient(135deg, rgba(243, 128, 32, 0.12), rgba(250, 165, 61, 0.05));
  border: 1px solid rgba(243, 128, 32, 0.25);
  border-radius: var(--radius-xl);
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 30px;
  margin: 40px 0;
}

.cf-logo-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fb923c;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.cf-banner-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.cf-banner-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 650px;
}

.cf-features-row {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.cf-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #fed7aa;
  background: rgba(243, 128, 32, 0.1);
  padding: 4px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(243, 128, 32, 0.2);
}

/* ===================================================================
   CONTACT & CTA SECTION
   =================================================================== */
.cta-box {
  background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.18) 0%, rgba(15, 23, 42, 0.8) 75%);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-xl);
  padding: 60px 40px;
  text-align: center;
  box-shadow: 0 0 50px -10px rgba(99, 102, 241, 0.2);
}

.cta-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 36px;
}

.cta-buttons-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.email-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 10px 22px;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}
.email-copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

/* ===================================================================
   FOOTER
   =================================================================== */
.site-footer {
  padding: 50px 0 30px;
  border-top: 1px solid var(--border-glass);
  margin-top: 60px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-dim);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition-fast);
}
.footer-link:hover {
  color: #fff;
}

/* ===================================================================
   INTERACTIVE DEVICE FRAME MODAL (SIMULATOR)
   =================================================================== */
.preview-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.preview-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.preview-modal-container {
  width: 100%;
  max-width: 1300px;
  height: 94vh;
  background: #0b0f19;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.preview-modal-backdrop.active .preview-modal-container {
  transform: scale(1);
}

/* Modal Bar */
.modal-header-bar {
  background: #111827;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.modal-project-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-project-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.modal-device-controls {
  display: flex;
  align-items: center;
  background: #070a13;
  padding: 4px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.device-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.device-btn:hover {
  color: #fff;
}

.device-btn.active {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
}
.modal-icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Modal Body & Frame Stage */
.modal-stage {
  flex: 1;
  background: #060911;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 20px;
  position: relative;
}

.frame-wrapper {
  background: #1e293b;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transition: width 0.35s ease, height 0.35s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Device Frame Modes */
.frame-wrapper.mode-desktop {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.frame-wrapper.mode-tablet {
  width: 768px;
  height: 92%;
  border-radius: 24px;
  border: 10px solid #1f2937;
}

.frame-wrapper.mode-mobile {
  width: 390px;
  height: 92%;
  border-radius: 36px;
  border: 12px solid #1f2937;
}

.frame-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
  display: block;
}

.frame-loader {
  position: absolute;
  inset: 0;
  background: #0b0f19;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
  z-index: 10;
  transition: opacity 0.3s ease;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(99, 102, 241, 0.2);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===================================================================
   RESPONSIVE QUERIES
   =================================================================== */
@media (max-width: 992px) {
  .project-card, .project-card.reversed {
    grid-template-columns: 1fr;
  }
  .project-card.reversed .project-visual {
    order: 1;
  }
  .project-card.reversed .project-content {
    order: 2;
  }
  .project-visual {
    min-height: 280px;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-item.span-2 {
    grid-column: span 1;
  }
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cf-banner {
    grid-template-columns: 1fr;
    text-align: left;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .project-content {
    padding: 24px;
  }
  .project-features {
    grid-template-columns: 1fr;
  }
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .process-grid {
    grid-template-columns: 1fr;
  }
  .modal-device-controls span {
    display: none;
  }
  .modal-stage {
    padding: 8px;
  }
  .frame-wrapper.mode-tablet, .frame-wrapper.mode-mobile {
    width: 100%;
    border-width: 4px;
    border-radius: 12px;
  }
}

