/* ===================================================
   ADUNOLA BABADIYA — Product Designer Portfolio
   Clash Display + Bricolage Grotesque + DM Mono
   4-Theme System: dark | light | neon | glass
   =================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ===================== THEME TOKENS ===================== */

/* DARK (default) */
:root,
[data-theme="dark"] {
  --bg:           #070b12;
  --bg-2:         #0c1120;
  --bg-3:         #121828;
  --surface:      #161e2e;
  --surface-2:    #1c2540;
  --border:       rgba(255,255,255,0.07);
  --border-2:     rgba(255,255,255,0.13);
  --accent:       #3d8bff;
  --accent-2:     #6faaff;
  --accent-dim:   rgba(61,139,255,0.09);
  --gold:         #e8a84c;
  --green:        #3cba7e;
  --purple:       #c084fc;
  --text-primary: #eef2fa;
  --text-secondary:#8a96b0;
  --text-muted:   #46526a;
  --canvas-opacity: 0.3;
  --card-hover-shadow: 0 20px 56px rgba(0,0,0,.45);
  --nav-blur-bg:  rgba(7,11,18,0.94);
  --theme-icon: "☀️";

  /* Shared tokens used across case-study & world pages (theme-invariant) */
  --font-display: 'Clash Display', sans-serif;
  --font-mono:    'DM Mono', monospace;
  --r:    8px;
  --r-lg: 16px;
}

/* LIGHT */
[data-theme="light"] {
  --bg:           #f4f6fb;
  --bg-2:         #eaecf4;
  --bg-3:         #e0e3ef;
  --surface:      #ffffff;
  --surface-2:    #f0f2fa;
  --border:       rgba(0,0,0,0.08);
  --border-2:     rgba(0,0,0,0.14);
  --accent:       #1d6fe8;
  --accent-2:     #4a90f0;
  --accent-dim:   rgba(29,111,232,0.08);
  --gold:         #c07820;
  --green:        #1a9460;
  --purple:       #7c3aed;
  --text-primary: #0d1117;
  --text-secondary:#4a5568;
  --text-muted:   #9aa3b2;
  --canvas-opacity: 0.08;
  --card-hover-shadow: 0 20px 56px rgba(0,0,0,.12);
  --nav-blur-bg:  rgba(244,246,251,0.94);
  --theme-icon: "🌙";
}

/* NEON */
[data-theme="neon"] {
  --bg:           #020408;
  --bg-2:         #040912;
  --bg-3:         #060d18;
  --surface:      #080f1e;
  --surface-2:    #0a1426;
  --border:       rgba(0,255,180,0.12);
  --border-2:     rgba(0,255,180,0.22);
  --accent:       #00ffb4;
  --accent-2:     #40ffc8;
  --accent-dim:   rgba(0,255,180,0.08);
  --gold:         #ffee00;
  --green:        #00ff88;
  --purple:       #ff00ff;
  --text-primary: #e0fff8;
  --text-secondary:#5adfbe;
  --text-muted:   #2a6a58;
  --canvas-opacity: 0.5;
  --card-hover-shadow: 0 0 40px rgba(0,255,180,0.15), 0 20px 56px rgba(0,0,0,.6);
  --nav-blur-bg:  rgba(2,4,8,0.96);
  --theme-icon: "🔮";
}

/* GLASS */
[data-theme="glass"] {
  --bg:           #0a0e1a;
  --bg-2:         #0e1422;
  --bg-3:         #131a2a;
  --surface:      rgba(255,255,255,0.06);
  --surface-2:    rgba(255,255,255,0.10);
  --border:       rgba(255,255,255,0.10);
  --border-2:     rgba(255,255,255,0.18);
  --accent:       #a78bfa;
  --accent-2:     #c4b5fd;
  --accent-dim:   rgba(167,139,250,0.10);
  --gold:         #fbbf24;
  --green:        #34d399;
  --purple:       #e879f9;
  --text-primary: #f0f4ff;
  --text-secondary:#94a3b8;
  --text-muted:   #475569;
  --canvas-opacity: 0.2;
  --card-hover-shadow: 0 8px 32px rgba(167,139,250,0.15), 0 20px 56px rgba(0,0,0,.5);
  --nav-blur-bg:  rgba(10,14,26,0.5);
  --theme-icon: "🪟";
}

/* ===================== BASE ===================== */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
  transition: background 0.4s ease, color 0.4s ease;
}

[data-theme="light"] body,
body[data-theme="light"] { cursor: none; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: none; border: none; background: none; font-family: inherit; }

/* ===================== THEME SWITCHER ===================== */
.theme-switcher {
  position: fixed;
  right: 20px;
  bottom: 28px;
  z-index: 850;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.theme-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-2);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  font-size: 16px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  position: relative;
}
.theme-btn:hover {
  transform: scale(1.12);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-dim);
}
.theme-btn.active {
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-dim);
}
.theme-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border-2);
  padding: 4px 10px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.theme-btn:hover[data-tooltip]::after { opacity: 1; }

/* Neon theme special glow on surface elements */
[data-theme="neon"] .mindset-card,
[data-theme="neon"] .stack-col,
[data-theme="neon"] .work-card,
[data-theme="neon"] .process-step {
  box-shadow: 0 0 0 1px rgba(0,255,180,0.06), inset 0 0 20px rgba(0,255,180,0.02);
}
[data-theme="neon"] .work-card:hover {
  box-shadow: 0 0 30px rgba(0,255,180,0.12), var(--card-hover-shadow);
}
[data-theme="neon"] .accent-line { text-shadow: 0 0 30px var(--accent); }
[data-theme="neon"] .btn-primary { box-shadow: 0 0 20px rgba(0,255,180,0.3); }
[data-theme="neon"] .btn-primary:hover { box-shadow: 0 0 40px rgba(0,255,180,0.5); }
[data-theme="neon"] .si-fill { box-shadow: 0 0 8px var(--accent); }
[data-theme="neon"] .code-cursor-blink { box-shadow: 0 0 8px var(--accent); }

/* Glass theme — frosted surfaces */
[data-theme="glass"] .work-card,
[data-theme="glass"] .mindset-card,
[data-theme="glass"] .stack-col,
[data-theme="glass"] .process-step,
[data-theme="glass"] .uiux-card,
[data-theme="glass"] .hero-code-panel {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255,255,255,0.06);
}
[data-theme="glass"] .nav {
  background: rgba(255,255,255,0.04) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

/* Light theme overrides for canvas text visibility */
[data-theme="light"] .code-comment { color: #7a8aa0; }
[data-theme="light"] .code-keyword { color: #8b5cf6; }
[data-theme="light"] .code-var { color: #1d6fe8; }
[data-theme="light"] .code-key { color: #dc2626; }
[data-theme="light"] .code-str { color: #059669; }
[data-theme="light"] .code-bool { color: #d97706; }
[data-theme="light"] .hero-canvas { filter: invert(1) hue-rotate(180deg); opacity: 0.05; }

/* ===================== CURSOR ===================== */
.cursor {
  width: 28px; height: 28px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .2s, height .2s, opacity .3s, background .2s, border-color .3s;
  opacity: 0;
}
.cursor-dot {
  width: 4px; height: 4px;
  background: var(--accent); border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  opacity: 0; transition: opacity .3s, background .3s;
}
body:hover .cursor,
body:hover .cursor-dot { opacity: 1; }
.cursor.hovering {
  width: 46px; height: 46px;
  background: var(--accent-dim);
  border-color: var(--accent-2);
}

/* === OVERLAY === */
.page-overlay {
  position: fixed; inset: 0;
  background: var(--bg); z-index: 9000;
  pointer-events: none; opacity: 0;
  transition: opacity .4s ease;
}
.page-overlay.active { opacity: 1; pointer-events: all; }

/* === CANVAS === */
.hero-canvas {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
  opacity: var(--canvas-opacity);
  transition: opacity 0.4s;
}

/* ===================== REVEAL ===================== */
.reveal, .reveal-delay, .reveal-delay-2, .reveal-delay-3 {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal-delay { transition-delay: .12s; }
.reveal-delay-2 { transition-delay: .22s; }
.reveal-delay-3 { transition-delay: .34s; }
.reveal.visible, .reveal-delay.visible,
.reveal-delay-2.visible, .reveal-delay-3.visible {
  opacity: 1; transform: none;
}

/* ===================== NAV ===================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 56px;
  z-index: 800;
  transition: background .4s, border-color .4s, padding .3s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: var(--nav-blur-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom-color: var(--border);
  padding: 14px 56px;
}
.nav-logo {
  font-family: 'Clash Display', sans-serif;
  font-size: 20px; font-weight: 700;
  letter-spacing: -0.03em; color: var(--text-primary);
  z-index: 1; position: relative;
  transition: color 0.3s;
}
.logo-dot { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-link {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
  transition: color .2s; position: relative;
}
.nav-link::after {
  content: ''; position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.nav-link:hover, .active-link { color: var(--text-primary); }
.nav-link:hover::after, .active-link::after { transform: scaleX(1); }

.btn-nav-cta {
  font-family: 'Clash Display', sans-serif;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  padding: 9px 22px; border-radius: 8px;
  transition: background .2s, transform .2s, box-shadow .2s;
  cursor: none;
}
.btn-nav-cta:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px var(--accent-dim);
}

.nav-mobile-toggle {
  display: none; flex-direction: column; gap: 5px;
  padding: 8px; cursor: none; z-index: 1; position: relative;
}
.nav-mobile-toggle span {
  display: block; width: 22px; height: 1.5px;
  background: var(--text-secondary); transition: all .3s;
}

/* === MOBILE NAV === */
.mobile-nav {
  position: fixed; inset: 0;
  background: rgba(7,11,18,0.98);
  backdrop-filter: blur(20px);
  z-index: 700;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 32px;
  opacity: 0; pointer-events: none;
  transition: opacity .4s ease;
}
[data-theme="light"] .mobile-nav { background: rgba(244,246,251,0.98); }
[data-theme="neon"] .mobile-nav { background: rgba(2,4,8,0.98); }
.mobile-nav.open { opacity: 1; pointer-events: all; }
.mobile-close {
  position: absolute; top: 28px; right: 28px;
  font-size: 20px; color: var(--text-secondary);
  cursor: none; transition: color .2s; background: none; border: none;
}
.mobile-close:hover { color: var(--text-primary); }
.mobile-link {
  font-family: 'Clash Display', sans-serif;
  font-size: 30px; font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: -0.03em; transition: color .2s;
}
.mobile-link:hover, .mobile-cta { color: var(--accent); }

/* ===================== HERO ===================== */
.hero {
  position: relative; min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  column-gap: 56px;
  row-gap: 40px;
  padding: 120px 56px 80px;
  z-index: 1;
  max-width: 1300px;
  margin: 0 auto;
}

.hero-content { min-width: 0; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'DM Mono', monospace; font-size: 11px;
  color: var(--text-secondary);
  border: 1px solid var(--border-2);
  background: var(--surface);
  padding: 7px 16px; border-radius: 100px;
  letter-spacing: 0.04em;
  margin-bottom: 28px;
}
.badge-dot {
  width: 7px; height: 7px; flex-shrink: 0;
  background: var(--green); border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 8px var(--green); }
  50% { box-shadow: 0 0 16px var(--green), 0 0 28px rgba(60,186,126,.3); }
}

.hero-headline {
  font-family: 'Clash Display', sans-serif;
  font-size: clamp(46px, 6vw, 78px);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  display: flex; flex-direction: column; gap: 4px;
}
.headline-line { display: block; }
.accent-line { color: var(--accent); transition: color 0.4s; }
.sub-line {
  color: var(--text-secondary); font-style: italic;
  font-weight: 600; font-size: 0.82em;
}

.hero-sub {
  font-size: 15px; color: var(--text-secondary);
  line-height: 1.72; max-width: 460px;
  margin-bottom: 36px;
}

.hero-cta {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 48px; flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Clash Display', sans-serif;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: #fff; background: var(--accent);
  padding: 13px 28px; border-radius: 8px;
  transition: all .25s ease; cursor: none; border: none;
  white-space: nowrap;
}
.btn-primary:hover {
  background: var(--accent-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-dim);
}
.btn-primary.large { padding: 16px 36px; font-size: 14px; }
.btn-primary svg { flex-shrink: 0; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Clash Display', sans-serif;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  border: 1px solid var(--border-2);
  padding: 13px 24px; border-radius: 8px;
  transition: all .25s ease; cursor: none;
  white-space: nowrap;
}
.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.hero-meta {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.hero-stat { display: flex; flex-direction: column; gap: 3px; }
.stat-num {
  font-family: 'Clash Display', sans-serif;
  font-size: 24px; font-weight: 700;
  color: var(--text-primary); letter-spacing: -0.04em;
}
.stat-label {
  font-size: 11px; color: var(--text-muted);
  letter-spacing: 0.05em; text-transform: uppercase;
  font-family: 'DM Mono', monospace;
}
.hero-stat-div { width: 1px; height: 30px; background: var(--border-2); }

/* === CODE PANEL === */
.hero-code-panel {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.04);
  width: 100%; min-width: 0;
}
.code-panel-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  background: var(--bg-3); border-bottom: 1px solid var(--border);
}
.code-dots { display: flex; gap: 6px; flex-shrink: 0; }
.code-dots span { width: 11px; height: 11px; border-radius: 50%; }
.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #febc2e; }
.code-dots span:nth-child(3) { background: #28c840; }
.code-file {
  font-family: 'DM Mono', monospace; font-size: 11px;
  color: var(--text-muted);
}
.code-body {
  padding: 18px 22px;
  font-family: 'DM Mono', monospace; font-size: 12px; line-height: 2;
  overflow-x: auto;
}
.code-line { display: block; white-space: nowrap; }
.indent { padding-left: 18px; }
.code-comment { color: #3d5070; }
.code-keyword { color: #c792ea; }
.code-var { color: #82aaff; }
.code-key { color: #f07178; }
.code-str { color: #c3e88d; }
.code-bool { color: #f78c6c; }
.code-cursor-blink {
  display: inline-block; width: 8px; height: 14px;
  background: var(--accent); margin-left: 2px;
  animation: blink 1.2s step-end infinite;
  vertical-align: text-bottom;
  transition: background 0.4s;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ===================== MARQUEE ===================== */
.marquee-track {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0; background: var(--bg-2);
  position: relative; z-index: 1;
  transition: background 0.4s;
}
.marquee-inner {
  display: flex; gap: 24px; white-space: nowrap;
  animation: marquee 40s linear infinite;
  font-family: 'DM Mono', monospace; font-size: 11px;
  color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase;
}
.marquee-inner span.sep { color: var(--border-2); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-inner:hover { animation-play-state: paused; }

/* ===================== SECTION SHARED ===================== */
.section-tag {
  display: inline-block;
  font-family: 'DM Mono', monospace; font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  background: var(--accent-dim);
  padding: 5px 14px; border-radius: 100px;
  /* KEY FIX: use margin-bottom as spacing, not negative margin-top on siblings */
  margin-bottom: 16px;
  transition: color 0.3s, border-color 0.3s;
}

.section-title {
  font-family: 'Clash Display', sans-serif;
  font-size: clamp(26px, 4vw, 44px); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.1;
  color: var(--text-primary);
  /* KEY FIX: always give margin-bottom so subtitle doesn't collide */
  margin-bottom: 12px;
  transition: color 0.3s;
}
.section-title em { font-style: italic; color: var(--accent); }

/* KEY FIX: section-sub now has its own top margin, no negative values */
.section-sub {
  font-size: 15px; color: var(--text-secondary);
  max-width: 480px;
  margin-top: 8px;
  line-height: 1.65;
}

.section-header {
  text-align: center; max-width: 600px;
  margin: 0 auto;
  /* KEY FIX: padding-bottom instead of margin-bottom on container */
  padding-bottom: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* Remove the override that was killing title margin */
/* .section-header .section-title { margin-bottom: 0; } — REMOVED */

.work-view-all { text-align: center; margin-top: 48px; }

/* ===================== ABOUT ===================== */
.about { padding: 110px 56px; position: relative; z-index: 1; }
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 72px; align-items: start;
  max-width: 1200px; margin: 0 auto;
}
.about-grid > * { min-width: 0; }

.about-copy p {
  color: var(--text-secondary); line-height: 1.78;
  margin-bottom: 14px; font-size: 15px;
}
.about-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tag {
  font-family: 'DM Mono', monospace; font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-secondary); background: var(--surface);
  border: 1px solid var(--border-2); padding: 5px 13px; border-radius: 100px;
}
.about-more-link {
  display: inline-block; margin-top: 24px;
  font-family: 'Clash Display', sans-serif;
  font-size: 13px; font-weight: 600;
  color: var(--accent); letter-spacing: 0.02em;
  transition: letter-spacing .2s;
}
.about-more-link:hover { letter-spacing: 0.06em; }

/* Mindset cards */
.mindset-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mindset-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.mindset-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px var(--accent-dim);
}
.mc-icon {
  width: 36px; height: 36px;
  background: var(--accent-dim); border: 1px solid var(--accent-dim);
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; color: var(--accent); flex-shrink: 0;
}
.mc-content h4 {
  font-family: 'Clash Display', sans-serif;
  font-size: 13px; font-weight: 700;
  color: var(--text-primary); margin-bottom: 5px; letter-spacing: -0.01em;
}
.mc-content p { font-size: 12px; color: var(--text-muted); line-height: 1.6; }

/* ===================== PROCESS ===================== */
.process { padding: 100px 56px; background: var(--bg-2); position: relative; z-index: 1; }
.process-flow {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.process-step {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 28px 24px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px;
  transition: border-color .3s, transform .3s;
}
.process-step:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.ps-num {
  font-family: 'DM Mono', monospace; font-size: 11px; color: var(--accent);
  letter-spacing: 0.1em; padding-top: 2px; flex-shrink: 0;
  min-width: 28px;
}
.ps-body h3 {
  font-family: 'Clash Display', sans-serif;
  font-size: 15px; font-weight: 700;
  color: var(--text-primary); margin-bottom: 8px; letter-spacing: -0.02em;
}
.ps-body p { color: var(--text-secondary); font-size: 13px; line-height: 1.7; }

/* ===================== WORK / PROJECTS ===================== */
.work { padding: 110px 56px; position: relative; z-index: 1; }
.work-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.work-grid > * { min-width: 0; }

.work-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; overflow: hidden; cursor: none;
  transition: border-color .3s, transform .35s ease, box-shadow .35s;
  display: flex; flex-direction: column;
}
.work-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  box-shadow: var(--card-hover-shadow);
}

/* FEATURED card — full width, side by side layout */
.work-card.featured { grid-column: 1 / -1; }
.work-card.featured > .card-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

/* Non-featured: vertical stack */
.work-card:not(.featured) > .card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Card image — fixed heights to prevent collapse */
.card-image {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.work-card:not(.featured) .card-image { height: 210px; }
.work-card.featured .card-image { min-height: 280px; height: 100%; }

.card-preview {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  min-height: inherit;
}

.preview-chrome {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: rgba(0,0,0,.28);
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
  /* KEY FIX: min-height so it never collapses */
  min-height: 38px;
}
.chrome-dots { display: flex; gap: 5px; flex-shrink: 0; }
.chrome-dots span { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.chrome-dots span:nth-child(1) { background: rgba(255,95,87,.65); }
.chrome-dots span:nth-child(2) { background: rgba(254,188,46,.65); }
.chrome-dots span:nth-child(3) { background: rgba(40,200,64,.65); }
.chrome-url {
  flex: 1; font-family: 'DM Mono', monospace; font-size: 9.5px;
  color: rgba(255,255,255,.3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-width: 0;
}
.chrome-live {
  font-family: 'DM Mono', monospace; font-size: 10px; color: var(--accent);
  padding: 3px 9px; border: 1px solid var(--accent-dim);
  border-radius: 4px; transition: background .2s;
  cursor: pointer; flex-shrink: 0; white-space: nowrap;
}
.chrome-live:hover { background: var(--accent-dim); }

.preview-screen {
  flex: 1; padding: 18px 16px;
  display: flex; flex-direction: column;
  gap: 8px;
  /* KEY FIX: don't let content overflow / overlap */
  overflow: hidden;
}
.ps-headline {
  font-family: 'Clash Display', sans-serif;
  font-size: 18px; font-weight: 700;
  letter-spacing: -0.02em; color: var(--text-primary);
  /* Fixed: was clamp that could cause overflow */
  line-height: 1.2;
}
.ps-sub {
  font-size: 11px; color: rgba(255,255,255,.38);
  font-family: 'DM Mono', monospace;
  margin-top: 2px;
}
.ps-badge {
  display: inline-block; font-family: 'DM Mono', monospace; font-size: 9px;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 4px;
  border: 1px solid rgba(61,139,255,.28);
  background: rgba(61,139,255,.09); color: var(--accent);
  margin-top: 4px; width: fit-content;
  white-space: nowrap;
}
.ps-nodes {
  display: flex; align-items: center; gap: 5px;
  margin-top: 8px; flex-wrap: wrap;
}
.ps-node {
  font-family: 'DM Mono', monospace; font-size: 9px;
  padding: 3px 7px; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09); border-radius: 3px;
  color: rgba(255,255,255,.42); white-space: nowrap;
}
.ps-arrow { font-size: 10px; color: rgba(255,255,255,.2); }

/* KEY FIX: badges moved INSIDE chrome row to avoid overlap */
.card-badges {
  /* Now sits inside preview-chrome, NOT absolute */
  display: flex; gap: 5px; flex-wrap: nowrap;
  margin-left: auto;
  flex-shrink: 0;
}
.badge {
  font-family: 'DM Mono', monospace; font-size: 9px;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.11);
  color: rgba(255,255,255,.55); white-space: nowrap;
}
.badge.blue  { background: rgba(61,139,255,.12); border-color: rgba(61,139,255,.3);   color: var(--accent); }
.badge.gold  { background: rgba(232,168,76,.12);  border-color: rgba(232,168,76,.3);   color: var(--gold);   }
.badge.green { background: rgba(60,186,126,.12);  border-color: rgba(60,186,126,.3);   color: var(--green);  }
.badge.purple{ background: rgba(192,132,252,.12); border-color: rgba(192,132,252,.3);  color: var(--purple); }

/* Card body */
.card-body {
  padding: 22px; display: flex; flex-direction: column;
  gap: 10px; flex: 1;
}
.work-card.featured .card-body { padding: 32px; justify-content: center; }
.card-tag {
  font-family: 'DM Mono', monospace; font-size: 10px;
  color: var(--text-muted); letter-spacing: 0.06em;
  /* Prevent overflow */
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-title {
  font-family: 'Clash Display', sans-serif;
  font-size: 17px; font-weight: 700;
  color: var(--text-primary); letter-spacing: -0.02em; line-height: 1.2;
}
.work-card.featured .card-title { font-size: 22px; }
.card-desc {
  font-size: 13px; color: var(--text-secondary); line-height: 1.65;
}
.card-stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.card-stack span {
  font-family: 'DM Mono', monospace; font-size: 10px; color: var(--accent);
  background: var(--accent-dim); border: 1px solid var(--accent-dim);
  padding: 3px 8px; border-radius: 4px; letter-spacing: 0.04em;
}
.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--border);
  gap: 12px;
}
.card-link {
  font-family: 'DM Mono', monospace; font-size: 11px; color: var(--accent);
  letter-spacing: 0.04em; transition: letter-spacing .2s;
  white-space: nowrap;
}
.work-card:hover .card-link { letter-spacing: 0.08em; }
.card-live {
  font-family: 'DM Mono', monospace; font-size: 10px; color: var(--text-muted);
  border: 1px solid var(--border); padding: 4px 10px; border-radius: 4px;
  transition: all .2s; white-space: nowrap;
}
.card-live:hover { color: var(--text-primary); border-color: var(--border-2); }

/* ===================== STACK ===================== */
.stack-section { padding: 110px 56px; background: var(--bg-2); position: relative; z-index: 1; }
.stack-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.stack-grid > * { min-width: 0; }
.stack-col {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 26px;
  transition: border-color .3s, transform .3s;
}
.stack-col:hover { border-color: var(--accent); transform: translateY(-2px); }
.stack-col-title {
  font-family: 'Clash Display', sans-serif;
  font-size: 14px; font-weight: 700;
  color: var(--text-primary); margin-bottom: 22px;
  letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px;
}
.stack-icon { font-size: 15px; }
.stack-items { display: flex; flex-direction: column; gap: 13px; }
.stack-item { display: flex; flex-direction: column; gap: 5px; }
.si-name {
  font-family: 'DM Mono', monospace; font-size: 11px;
  color: var(--text-secondary); letter-spacing: 0.02em;
}
.si-bar {
  height: 3px; background: var(--border-2);
  border-radius: 2px; overflow: hidden;
}
.si-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px; transform-origin: left; transform: scaleX(0);
  transition: transform 1.1s ease;
}
.stack-col.visible .si-fill { transform: scaleX(1); }

/* ===================== EXPERIENCE ===================== */
.experience { padding: 110px 56px; position: relative; z-index: 1; }
.exp-list { max-width: 860px; margin: 0 auto; }
.exp-item {
  display: grid; grid-template-columns: 160px 1fr;
  gap: 36px; padding: 32px 0;
  border-bottom: 1px solid var(--border); align-items: start;
}
.exp-item:last-child { border-bottom: none; }
.exp-year {
  font-family: 'DM Mono', monospace; font-size: 11px;
  color: var(--text-muted); letter-spacing: 0.05em;
  padding-top: 3px; white-space: nowrap;
}
.exp-body h3 {
  font-family: 'Clash Display', sans-serif;
  font-size: 17px; font-weight: 700;
  color: var(--text-primary); letter-spacing: -0.02em; margin-bottom: 4px;
}
.exp-company {
  font-family: 'DM Mono', monospace; font-size: 11px; color: var(--accent);
  letter-spacing: 0.05em; display: block; margin-bottom: 10px;
}
.exp-body p { font-size: 14px; color: var(--text-secondary); line-height: 1.72; }
.exp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.exp-tags span {
  font-family: 'DM Mono', monospace; font-size: 10px; color: var(--text-muted);
  background: var(--bg-3); border: 1px solid var(--border);
  padding: 3px 8px; border-radius: 4px; letter-spacing: 0.04em;
}

/* ===================== UI/UX ===================== */
.uiux-section { padding: 110px 56px; background: var(--bg-2); position: relative; z-index: 1; }
.uiux-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.uiux-grid > * { min-width: 0; }
.uiux-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; cursor: none;
  transition: border-color .3s, transform .3s, opacity .3s;
  opacity: 0.78;
}
.uiux-card:hover { border-color: var(--accent); transform: translateY(-4px); opacity: 1; }
.uiux-preview {
  height: 155px; position: relative;
  display: flex; align-items: flex-end; padding: 14px;
}
.uiux-preview.vitsetech { background: linear-gradient(135deg,#1a1f2e,#0d1117); }
.uiux-preview.safari    { background: linear-gradient(135deg,#1a1a0a,#2a2800); }
.uiux-preview.hotview     { background: linear-gradient(135deg,#0c1b16,#0a2a1f); }
.uiux-preview.retro       { background: linear-gradient(135deg,#150c22,#1f0a2e); }
.uiux-preview.scrumconsult{ background: linear-gradient(135deg,#0a121f,#0d1c30); }
.uiux-card.featured-card { opacity: 1; border-color: var(--border-strong,var(--border)); }
.uiux-status { font-family: 'DM Mono', monospace; font-size: 8.5px; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 20px; border: 1px solid; display: inline-block; margin-left: 8px; vertical-align: middle; }
.uiux-status.status-live { color: #3ecf8e; border-color: rgba(62,207,142,0.35); background: rgba(62,207,142,0.08); }
.uiux-status.status-ongoing { color: #e8a94c; border-color: rgba(232,169,76,0.35); background: rgba(232,169,76,0.08); }
.uiux-status.status-concept { color: #7c8cff; border-color: rgba(124,140,255,0.35); background: rgba(124,140,255,0.08); }
.hero-flow { display: flex; align-items: center; gap: 8px; margin-top: 22px; font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.06em; color: var(--text-muted); flex-wrap: wrap; }
.hero-flow span.flow-step { color: var(--text-secondary); background: var(--surface); border: 1px solid var(--border); padding: 5px 11px; border-radius: 20px; }
.hero-flow span.flow-arrow { color: var(--accent); }
.uiux-preview::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 40%, rgba(61,139,255,.07) 0%, transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(168,126,240,.05) 0%, transparent 50%);
}
.uiux-preview-label {
  font-family: 'DM Mono', monospace; font-size: 9px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,.32); background: rgba(0,0,0,.3);
  padding: 4px 10px; border-radius: 3px;
  border: 1px solid rgba(255,255,255,.09); position: relative; z-index: 1;
}
.uiux-card-body { padding: 18px; }
.uiux-tag {
  font-family: 'DM Mono', monospace; font-size: 9.5px; color: var(--text-muted);
  letter-spacing: 0.06em; display: block; margin-bottom: 8px;
}
.uiux-card-body h4 {
  font-family: 'Clash Display', sans-serif;
  font-size: 14px; font-weight: 700;
  color: var(--text-primary); letter-spacing: -0.02em; margin-bottom: 7px;
}
.uiux-card-body p { font-size: 12px; color: var(--text-muted); line-height: 1.6; margin-bottom: 12px; }
.uiux-link {
  font-family: 'DM Mono', monospace; font-size: 10px; color: var(--accent);
  letter-spacing: 0.04em; opacity: 0.7; transition: opacity .2s;
}
.uiux-card:hover .uiux-link { opacity: 1; }
.uiux-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.uiux-live {
  font-family: 'DM Mono', monospace; font-size: 10px; color: var(--text-muted);
  border: 1px solid var(--border); padding: 4px 10px; border-radius: 4px;
  transition: all .2s; white-space: nowrap;
}
.uiux-live:hover { color: var(--text-primary); border-color: var(--border-2); }

/* ===================== CTA ===================== */
.cta-section { padding: 110px 56px; position: relative; z-index: 1; overflow: hidden; }
.cta-section::before {
  content: ''; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  pointer-events: none;
}
.cta-inner { max-width: 600px; margin: 0 auto; text-align: center; position: relative; }
.cta-badge {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'DM Mono', monospace; font-size: 11px; color: var(--green);
  border: 1px solid rgba(60,186,126,.22); background: rgba(60,186,126,.06);
  padding: 7px 16px; border-radius: 100px;
  letter-spacing: 0.04em; margin-bottom: 24px;
}
.badge-dot.pulse {
  animation: pulse-green 2s ease-in-out infinite;
  background: var(--green); box-shadow: 0 0 8px var(--green);
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
@keyframes pulse-green {
  0%,100% { box-shadow: 0 0 8px var(--green); }
  50% { box-shadow: 0 0 16px var(--green), 0 0 32px rgba(60,186,126,.3); }
}
.cta-inner h2 {
  font-family: 'Clash Display', sans-serif;
  font-size: clamp(32px, 5vw, 52px); font-weight: 700;
  letter-spacing: -0.04em; color: var(--text-primary); margin-bottom: 14px;
}
.cta-inner p {
  font-size: 16px; color: var(--text-secondary);
  line-height: 1.65; margin-bottom: 36px;
}
.cta-actions { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.cta-social { display: flex; gap: 28px; }
.social-link {
  font-family: 'DM Mono', monospace; font-size: 11px; color: var(--text-muted);
  letter-spacing: 0.06em; text-transform: uppercase; transition: color .2s;
}
.social-link:hover { color: var(--text-secondary); }

/* ===================== FOOTER ===================== */
.footer { border-top: 1px solid var(--border); padding: 56px; position: relative; z-index: 1; }
.footer-grid {
  display: grid; grid-template-columns: 1fr 160px 160px;
  gap: 56px; max-width: 1200px; margin: 0 auto 44px;
}
.footer-grid > * { min-width: 0; }
.footer-logo {
  font-family: 'Clash Display', sans-serif;
  font-size: 20px; font-weight: 700;
  letter-spacing: -0.03em; display: block; margin-bottom: 10px;
}
.footer-left p { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; line-height: 1.5; }
.footer-email {
  font-family: 'DM Mono', monospace; font-size: 12px; color: var(--accent); transition: color .2s;
}
.footer-email:hover { color: var(--accent-2); }
.footer-links h4 {
  font-family: 'DM Mono', monospace; font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 16px;
}
.footer-links a {
  display: block; font-size: 13px; color: var(--text-secondary);
  margin-bottom: 10px; transition: color .2s;
}
.footer-links a:hover { color: var(--text-primary); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 22px; border-top: 1px solid var(--border);
  max-width: 1200px; margin: 0 auto;
}
.footer-bottom span {
  font-family: 'DM Mono', monospace; font-size: 11px;
  color: var(--text-muted); letter-spacing: 0.03em;
}

/* ===================== PAGE INNER STYLES ===================== */
.active-link { color: var(--text-primary) !important; }
.active-link::after { transform: scaleX(1) !important; }
.page-section-h2 {
  font-family: 'Clash Display', sans-serif;
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.03em; color: var(--text-primary); margin-bottom: 20px;
}
.page-hero {
  padding: 120px 56px 56px; position: relative; z-index: 1;
  max-width: 900px; margin: 0 auto;
}
.page-hero-tag {
  font-family: 'DM Mono', monospace; font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent-dim);
  background: var(--accent-dim); padding: 5px 14px;
  border-radius: 100px; display: inline-block; margin-bottom: 18px;
}
.page-hero h1 {
  font-family: 'Clash Display', sans-serif;
  font-size: clamp(36px, 6vw, 60px); font-weight: 700;
  letter-spacing: -0.04em; line-height: 1.0;
  color: var(--text-primary); margin-bottom: 16px;
}
.page-hero p {
  font-size: 17px; color: var(--text-secondary);
  line-height: 1.65; max-width: 560px;
}
.page-body { padding: 0 56px 100px; max-width: 900px; margin: 0 auto; position: relative; z-index: 1; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1100px) {
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 140px 140px; gap: 32px; }
}

@media (max-width: 900px) {
  .nav { padding: 18px 24px; }
  .nav.scrolled { padding: 13px 24px; }
  .nav-links { display: none; }
  .nav-mobile-toggle { display: flex; }

  .hero {
    grid-template-columns: 1fr;
    padding: 90px 24px 60px; gap: 40px;
  }

  .about { padding: 80px 24px; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .mindset-cards { grid-template-columns: 1fr 1fr; }

  .process { padding: 80px 24px; }
  .process-flow { grid-template-columns: 1fr; }

  .work { padding: 80px 24px; }
  .work-grid { grid-template-columns: 1fr; }
  .work-card.featured { grid-column: auto; }
  .work-card.featured > .card-inner { grid-template-columns: 1fr; }
  .work-card.featured .card-image { height: 220px; }

  .stack-section { padding: 80px 24px; }
  .stack-grid { grid-template-columns: 1fr 1fr; }

  .experience { padding: 80px 24px; }
  .exp-item { grid-template-columns: 1fr; gap: 10px; }

  .uiux-section { padding: 80px 24px; }
  .uiux-grid { grid-template-columns: 1fr; }

  .cta-section { padding: 80px 24px; }

  .footer { padding: 48px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  .page-hero { padding: 90px 24px 40px; }
  .page-body { padding: 0 24px 80px; }

  .theme-switcher { right: 12px; bottom: 20px; }
}

@media (max-width: 560px) {
  .hero-headline { font-size: 38px; }
  .mindset-cards { grid-template-columns: 1fr; }
  .hero-meta { gap: 14px; }
  .hero-stat-div { display: none; }
  .stack-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: flex-start; }
  .card-badges { gap: 3px; }
  .badge { font-size: 8px; padding: 2px 6px; }
}

/* ===================== PERFORMANCE ===================== */
.work-card { will-change: transform; }

/* ===================== NEON THEME EXTRAS ===================== */
[data-theme="neon"] .section-tag {
  border-color: rgba(0,255,180,0.3);
  box-shadow: 0 0 12px rgba(0,255,180,0.1);
}
[data-theme="neon"] .hero-badge {
  border-color: rgba(0,255,180,0.2);
  box-shadow: 0 0 16px rgba(0,255,180,0.05);
}
[data-theme="neon"] .tag {
  border-color: rgba(0,255,180,0.15);
}
[data-theme="neon"] .nav-logo {
  text-shadow: 0 0 20px rgba(0,255,180,0.3);
}
[data-theme="neon"] .card-stack span {
  box-shadow: 0 0 6px rgba(0,255,180,0.15);
}

/* ===================== GLASS THEME EXTRAS ===================== */
[data-theme="glass"] .section-tag {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
[data-theme="glass"] .hero-badge {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
[data-theme="glass"] .about,
[data-theme="glass"] .work,
[data-theme="glass"] .experience,
[data-theme="glass"] .cta-section {
  background: transparent;
}
[data-theme="glass"] .process,
[data-theme="glass"] .stack-section,
[data-theme="glass"] .uiux-section {
  background: rgba(255,255,255,0.02);
}
[data-theme="glass"] .marquee-track {
  background: rgba(255,255,255,0.03);
}
[data-theme="glass"] .footer {
  background: rgba(255,255,255,0.02);
}

/* ===================== LIGHT THEME EXTRAS ===================== */
[data-theme="light"] .process,
[data-theme="light"] .stack-section,
[data-theme="light"] .uiux-section,
[data-theme="light"] .marquee-track {
  background: var(--bg-2);
}
[data-theme="light"] .hero-code-panel {
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
}
[data-theme="light"] .work-card,
[data-theme="light"] .mindset-card,
[data-theme="light"] .stack-col,
[data-theme="light"] .process-step {
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
[data-theme="light"] .chrome-url { color: rgba(0,0,0,0.4); }
[data-theme="light"] .ps-sub { color: rgba(0,0,0,0.45); }
[data-theme="light"] .ps-node { color: rgba(0,0,0,0.4); background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .uiux-preview-label { color: rgba(0,0,0,0.45); background: rgba(255,255,255,0.5); border-color: rgba(0,0,0,0.12); }
[data-theme="light"] .mobile-nav { background: rgba(244,246,251,0.98); }

/* Fix section-header subtitle spacing in all themes */
.section-header .section-sub {
  margin-top: 10px;
}

/* =====================================================================
   SHARED CASE-STUDY / WORLD PAGE SYSTEM
   Used by every file in /case-studies/ and /worlds/. These components
   had no CSS at all, which is why clicking into a project showed raw
   unstyled text. Built mobile-first: base rules target small screens,
   then desktop refinements are layered on with min-width queries.
   ===================================================================== */

/* ---------- SYSTEM MAP (fullscreen overlay) ---------- */
.system-map {
  position: fixed; inset: 0; z-index: 300;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(5,7,12,0.88);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 32px 20px;
  text-align: center;
}
.system-map.active { opacity: 1; visibility: visible; pointer-events: all; }
.map-close {
  position: absolute; top: 20px; right: 20px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-secondary); background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); border-radius: 100px;
  padding: 8px 16px; cursor: pointer; transition: color 0.2s, border-color 0.2s;
}
.map-close:hover { color: var(--text-primary); border-color: var(--border-2); }
.map-title {
  font-family: var(--font-display); font-size: clamp(22px, 5vw, 32px); font-weight: 600;
  color: var(--text-primary); margin-bottom: 6px;
}
.map-subtitle {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--text-muted); text-transform: uppercase; margin-bottom: 36px;
}
.map-nodes {
  position: relative;
  width: 100%; max-width: 800px; aspect-ratio: 4 / 3.2;
  display: flex; align-items: center; justify-content: center;
}
.map-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.map-line { stroke: rgba(61,139,255,0.18); stroke-width: 1.5; }
.map-center-node {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; z-index: 2;
}
.node-ring {
  width: 64px; height: 64px; border-radius: 50%;
  border: 1px solid var(--accent); position: relative;
}
.node-ring::before {
  content: ''; position: absolute; inset: 6px; border-radius: 50%;
  background: var(--accent); opacity: 0.15;
}
.node-label-main { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--text-primary); margin-top: 6px; }
.node-sub { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.06em; color: var(--text-muted); text-transform: uppercase; }
.map-node {
  position: absolute; display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; z-index: 2; transition: transform 0.2s;
}
.map-node:hover { transform: scale(1.08); }
.map-node span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.05em; color: var(--text-secondary); white-space: nowrap; }
.node-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--text-muted); box-shadow: 0 0 0 4px rgba(255,255,255,0.04); }
.map-node.node-uiux    { left: 25%;   top: 20%; }
.map-node.node-graphic { left: 77.5%; top: 25%; }
.map-node.node-nocode  { left: 18.75%;top: 71.5%; }
.map-node.node-vibe    { left: 81.25%;top: 71.5%; }

@media (max-width: 700px) {
  .map-nodes { max-width: 340px; aspect-ratio: auto; flex-direction: column; gap: 18px; padding: 8px 0; }
  .map-lines { display: none; }
  .map-center-node, .map-node { position: static; transform: none; }
  .map-node:hover { transform: none; }
  .node-ring { width: 52px; height: 52px; }
}

/* ---------- WORLD NAV (header for case-study & world pages) ---------- */
.world-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  background: var(--nav-blur-bg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.world-nav-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.world-back {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em;
  color: var(--text-secondary); white-space: nowrap; transition: color 0.2s;
}
.world-back:hover { color: var(--text-primary); }
.world-name {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
  padding-left: 14px; border-left: 1px solid var(--border);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-system-btn {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-primary); background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); border-radius: 100px;
  padding: 8px 14px; white-space: nowrap; cursor: pointer; transition: border-color 0.2s;
}
.nav-system-btn:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 480px) {
  .world-name { display: none; }
  .world-nav { padding: 14px 16px; }
}

/* ---------- CASE STUDY BASE TEMPLATE ---------- */
.case-study-hero {
  padding: 110px 20px 40px;
  max-width: 860px; margin: 0 auto;
}
.case-study-body {
  max-width: 860px; margin: 0 auto;
  padding: 0 20px 60px;
}
.cs-meta {
  display: flex; flex-wrap: wrap; gap: 20px 32px;
  padding: 22px 0; margin-top: 28px;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.cs-meta-item { display: flex; flex-direction: column; gap: 5px; }
.cs-meta-item label {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted);
}
.cs-meta-item span { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--text-primary); }
.cs-meta-item span a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-dim); }
.cs-meta-item span a:hover { border-color: var(--accent); }
.cs-live-links { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 0; }
.cs-live-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; background: var(--accent); color: var(--bg-1);
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  letter-spacing: 0.03em; text-transform: uppercase; border-radius: var(--r, 6px);
  text-decoration: none; transition: all 0.2s;
}
.cs-live-btn:hover { opacity: 0.9; transform: translateY(-2px); }
.cs-live-btn.secondary { background: transparent; color: var(--text-primary); border: 1px solid var(--border); }
.cs-live-btn.secondary:hover { border-color: var(--border-2); }
.cs-section { margin: 44px 0; }
.cs-section h2 {
  font-family: var(--font-display); font-size: clamp(20px, 3vw, 26px); font-weight: 700;
  letter-spacing: -0.02em; color: var(--text-primary); margin-bottom: 14px;
}
.cs-section h3 {
  font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 12px;
}
.cs-section p { font-size: 14px; color: var(--text-secondary); line-height: 1.75; margin-bottom: 12px; }
.cs-section ul { padding-left: 20px; margin: 12px 0; }
.cs-section li { font-size: 14px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 8px; }
.cs-highlight {
  font-family: var(--font-display); font-size: clamp(18px, 3vw, 24px); font-weight: 500; font-style: italic;
  line-height: 1.5; color: var(--text-primary);
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 22px; margin: 44px 0;
}
.cs-highlight em { color: var(--accent); font-style: italic; }
.cs-flow {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r);
  padding: 18px; margin-top: 14px; overflow-x: auto;
}
.cs-flow pre {
  font-family: var(--font-mono); font-size: 11px; line-height: 1.7; color: var(--text-secondary);
  white-space: pre;
}
.cs-outcome { margin: 44px 0; }
.cs-outcome h3 {
  font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 16px;
}
.cs-outcome-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.cs-outcome-item {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r);
  padding: 16px 18px;
}
.cs-outcome-item label {
  display: block; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 6px;
}
.cs-outcome-item span { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

.cs-next {
  max-width: 860px; margin: 40px auto 0; padding: 40px 20px 60px;
  border-top: 1px solid var(--border);
}
.cs-next h3 { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 18px; }
.cs-next-label {
  display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 18px;
}
.cs-next-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.cs-next-card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 22px; cursor: pointer; transition: border-color 0.2s, transform 0.2s;
}
.cs-next-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.cs-next-tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent);
}
.cs-next-card h4 { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--text-primary); margin: 8px 0 6px; }
.cs-next-card p { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }

@media (min-width: 640px) {
  .cs-outcome-grid { grid-template-columns: repeat(2, 1fr); }
  .cs-next-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 700px) {
  .case-study-hero { padding: 140px 40px 40px; }
  .case-study-body { padding: 0 40px 90px; }
  .cs-next { padding: 48px 40px 90px; }
}
@media (min-width: 900px) {
  .cs-outcome-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- WORLD LANDING PAGES ---------- */
.world-hero {
  padding: 120px 20px 60px; text-align: center; position: relative; overflow: hidden;
}
.world-hero h1 {
  font-family: var(--font-display); font-size: clamp(38px, 9vw, 76px); font-weight: 300;
  line-height: 1.02; letter-spacing: -0.02em; color: var(--text-primary);
}
.world-hero h1 em { font-style: italic; color: var(--world-accent, var(--accent)); }
.world-hero p {
  max-width: 480px; margin: 22px auto 0; font-size: 13px; color: var(--text-secondary); line-height: 1.8;
}
.world-tag {
  display: inline-block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--world-accent, var(--accent)); margin-bottom: 20px;
}
.world-section { padding: 60px 20px; border-bottom: 1px solid var(--border); }
.world-section-title {
  display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--world-accent, var(--accent)); margin-bottom: 24px;
}
.world-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 24px; }

.card-img-placeholder {
  position: relative; width: 100%; height: 100%; min-height: 180px;
  display: flex; align-items: flex-end; overflow: hidden;
  background: linear-gradient(135deg,#1a1f2e,#0d1117);
}
.card-img-placeholder.vitsetech { background: linear-gradient(135deg,#0d1829,#1a2f50); }
.card-img-placeholder.retro     { background: linear-gradient(135deg,#241a08,#1a1204); }
.placeholder-pattern {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 14px 14px;
  opacity: 0.5;
}
.project-type-badge {
  position: relative; z-index: 1; margin: 14px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-primary); background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 100px; padding: 5px 12px;
}

@media (min-width: 700px) {
  .world-hero { padding: 150px 60px 80px; }
  .world-section { padding: 80px 60px; }
}
@media (min-width: 800px) {
  .world-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Small global fixes reused sitewide ---------- */
.card-meta { margin-bottom: 10px; }
.uiux-card-inner { height: 100%; display: flex; flex-direction: column; }
