/* ═══════════════════════════════════════════════════
   SCAFFOLD OS — DESIGN SYSTEM
   Dark, premium, technical. No generic blues.
═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Core palette */
  --bg:       #060610;
  --bg2:      #0c0c1a;
  --bg3:      #111122;
  --bg4:      #161628;
  --bg5:      #1c1c34;

  /* Borders */
  --border:   #1a1a2e;
  --border2:  #252540;
  --border3:  #303055;

  /* Brand accents */
  --indigo:   #4f46e5;
  --indigo2:  #6366f1;
  --indigo3:  #818cf8;
  --violet:   #7c3aed;
  --violet2:  #8b5cf6;
  --violet3:  #a78bfa;
  --cyan:     #0891b2;
  --cyan2:    #06b6d4;
  --cyan3:    #67e8f9;
  --emerald:  #059669;
  --emerald2: #10b981;
  --emerald3: #34d399;
  --amber:    #d97706;
  --amber2:   #f59e0b;
  --amber3:   #fcd34d;
  --rose:     #e11d48;
  --rose2:    #f43f5e;
  --rose3:    #fb7185;

  /* Text */
  --text:     #f0f0ff;
  --text2:    #9090b8;
  --text3:    #4a4a6a;
  --text4:    #222240;

  /* Radii */
  --r:        12px;
  --r-sm:     8px;
  --r-xs:     5px;
  --r-lg:     18px;

  /* Glows */
  --glow-ind: 0 0 50px rgba(79,70,229,0.2);
  --glow-vio: 0 0 50px rgba(124,58,237,0.2);
  --glow-eme: 0 0 50px rgba(5,150,105,0.2);
  --glow-cya: 0 0 50px rgba(8,145,178,0.2);

  /* Transitions */
  --t: .2s ease;
  --t-slow: .4s ease;
}

:root[data-theme="light"] {
  --bg:       #f8fafc;
  --bg2:      #ffffff;
  --bg3:      #f1f5f9;
  --bg4:      #e2e8f0;
  --bg5:      #cbd5e1;

  --border:   #e2e8f0;
  --border2:  #cbd5e1;
  --border3:  #94a3b8;

  --text:     #0f172a;
  --text2:    #475569;
  --text3:    #64748b;
  --text4:    #94a3b8;

  /* Accent overrides for better contrast on light backgrounds */
  --indigo3:  #4338ca;
  --violet3:  #6d28d9;
  --emerald3: #047857;
  --cyan3:    #0e7490;
  --amber3:   #b45309;
  --rose3:    #be123c;

  --nav-bg:   rgba(248, 250, 252, 0.88);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --mobile-nav-bg: rgba(248, 250, 252, 0.98);
}

/* ── RESET ── */
*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ── GLOBAL NOISE + GRID TEXTURE ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(79,70,229,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,70,229,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

section, nav, footer, main { position: relative; z-index: 1; }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, h5 {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
h1 { font-size: clamp(2.6rem, 5.5vw, 4.8rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.6rem); font-weight: 700; }
h4 { font-size: 1.1rem; font-weight: 600; }
h5 { font-size: 0.9rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

p { color: var(--text2); font-size: 1rem; line-height: 1.75; margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
strong { color: var(--text); font-weight: 600; }
a { color: var(--indigo3); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--violet3); }
ul { list-style: none; }
code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8em;
  background: var(--bg3);
  border: 1px solid var(--border2);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--cyan3);
}

/* ── LAYOUT ── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}

.section {
  padding: 96px 0;
}

.section + .section { border-top: 1px solid var(--border); }

/* ── GRADIENT MESHES ── */
.mesh-hero {
  background:
    radial-gradient(ellipse 90% 60% at 50% -15%, rgba(79,70,229,0.18), transparent),
    radial-gradient(ellipse 60% 50% at 5% 60%, rgba(124,58,237,0.1), transparent),
    radial-gradient(ellipse 50% 40% at 95% 60%, rgba(5,150,105,0.08), transparent);
}

.mesh-indigo {
  background: radial-gradient(ellipse 70% 50% at 50% -5%, rgba(79,70,229,0.1), transparent);
}

.mesh-violet {
  background: radial-gradient(ellipse 70% 60% at 20% 50%, rgba(124,58,237,0.08), transparent);
}

.mesh-emerald {
  background: radial-gradient(ellipse 70% 60% at 80% 50%, rgba(5,150,105,0.08), transparent);
}

.mesh-amber {
  background: radial-gradient(ellipse 60% 50% at 50% 100%, rgba(217,119,6,0.07), transparent);
}

/* ── NAV ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: var(--nav-bg, rgba(6,6,16,0.88));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: 62px;
  display: flex;
  align-items: center;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
  width: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: -0.025em;
  text-decoration: none;
}

.nav-logo-mark {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.nav-version {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(99,102,241,0.12);
  color: var(--indigo3);
  border: 1px solid rgba(99,102,241,0.22);
  letter-spacing: 0.04em;
  margin-left: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  color: var(--text2);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--r-xs);
  transition: color var(--t), background var(--t);
  text-decoration: none;
}

.nav-links a:hover { color: var(--text); background: var(--bg3); }
.nav-links a.active { color: var(--indigo3); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* hamburger removed — mobile uses scroll nav instead */

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all var(--t);
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  color: #fff;
  box-shadow: 0 4px 20px rgba(79,70,229,0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(79,70,229,0.5);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border2);
}

.btn-outline:hover {
  border-color: var(--border3);
  color: var(--text);
  background: var(--bg3);
}

.btn-ghost {
  background: transparent;
  color: var(--text2);
  padding: 8px 14px;
}

.btn-ghost:hover { color: var(--text); }

.btn-lg {
  padding: 14px 30px;
  font-size: 0.95rem;
  border-radius: var(--r);
}

.btn-xl {
  padding: 16px 36px;
  font-size: 1rem;
  border-radius: var(--r);
}

/* ── EYEBROW ── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--indigo3);
  margin-bottom: 16px;
}

.eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--indigo3);
  box-shadow: 0 0 10px var(--indigo3);
}

.eyebrow-line {
  width: 24px; height: 1px;
  background: linear-gradient(90deg, var(--indigo), transparent);
}

/* ── GRADIENT TEXT ── */
.grad-ind {
  background: linear-gradient(135deg, #818cf8, #6366f1);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.grad-vio {
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.grad-main {
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.grad-eme {
  background: linear-gradient(135deg, #34d399, #06b6d4);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.grad-amber {
  background: linear-gradient(135deg, #fcd34d, #f59e0b);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ── CARDS ── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}

.card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
  box-shadow: var(--glow-ind);
}

.card-ind { border-color: rgba(79,70,229,0.18); }
.card-ind:hover { border-color: rgba(99,102,241,0.4); box-shadow: var(--glow-ind); }

.card-vio { border-color: rgba(124,58,237,0.18); }
.card-vio:hover { border-color: rgba(139,92,246,0.4); box-shadow: var(--glow-vio); }

.card-eme { border-color: rgba(5,150,105,0.18); }
.card-eme:hover { border-color: rgba(16,185,129,0.4); box-shadow: var(--glow-eme); }

.card-cya { border-color: rgba(8,145,178,0.18); }
.card-cya:hover { border-color: rgba(6,182,212,0.4); box-shadow: var(--glow-cya); }

.card-amber { border-color: rgba(217,119,6,0.18); }
.card-amber:hover { border-color: rgba(245,158,11,0.4); }

.glass {
  background: var(--glass-bg, rgba(11,11,26,0.7));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--r);
}

/* ── BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 11px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.badge-ind { background: rgba(79,70,229,0.12); color: var(--indigo3); border: 1px solid rgba(79,70,229,0.25); }
.badge-vio { background: rgba(124,58,237,0.12); color: var(--violet3); border: 1px solid rgba(124,58,237,0.25); }
.badge-eme { background: rgba(5,150,105,0.12); color: var(--emerald3); border: 1px solid rgba(5,150,105,0.25); }
.badge-cya { background: rgba(8,145,178,0.12); color: var(--cyan3); border: 1px solid rgba(8,145,178,0.25); }
.badge-amber { background: rgba(217,119,6,0.12); color: var(--amber3); border: 1px solid rgba(217,119,6,0.25); }
.badge-rose { background: rgba(225,29,72,0.12); color: var(--rose3); border: 1px solid rgba(225,29,72,0.25); }
.badge-dim { background: rgba(60,60,80,0.2); color: var(--text3); border: 1px solid var(--border); }

/* ── DIVIDERS ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 52px 0 36px;
  background: var(--bg);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand p {
  font-size: 0.88rem;
  margin-top: 12px;
  max-width: 240px;
}

.footer-col h5 {
  color: var(--text3);
  margin-bottom: 14px;
  font-size: 0.72rem;
}

.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col ul a {
  color: var(--text2);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color var(--t);
}
.footer-col ul a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text3);
}

/* ── STATUS PILL ── */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.status-pill.live {
  background: rgba(5,150,105,0.1);
  border: 1px solid rgba(5,150,105,0.25);
  color: var(--emerald3);
}

.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--emerald2);
  box-shadow: 0 0 8px var(--emerald2);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

/* ── TERMINAL BLOCK ── */
.terminal {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
}

.terminal-bar {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border2);
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg4);
}

.t-dot { width: 10px; height: 10px; border-radius: 50%; }
.t-red   { background: #ef4444; }
.t-amber { background: #f59e0b; }
.t-green { background: #10b981; }

.terminal-title {
  color: var(--text3);
  font-size: 0.75rem;
  margin-left: 6px;
}

.terminal-body {
  padding: 20px 24px;
  line-height: 2.1;
  font-size: 0.82rem;
}

.t-dim     { color: var(--text3); }
.t-comment { color: #3a3a5c; }
.t-green   { color: var(--emerald3); }
.t-blue    { color: var(--indigo3); }
.t-violet  { color: var(--violet3); }
.t-cyan    { color: var(--cyan3); }
.t-amber   { color: var(--amber3); }
.t-white   { color: var(--text); }
.t-rose    { color: var(--rose3); }

/* ── MISC HELPERS ── */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.mt-4  { margin-top:  4px; }
.mt-8  { margin-top:  8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-28 { margin-top: 28px; }
.mt-36 { margin-top: 36px; }
.mt-48 { margin-top: 48px; }
.mb-8  { margin-bottom:  8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.flex-center { display:flex; align-items:center; gap:10px; }
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.grid-3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:20px; }
.grid-4 { display:grid; grid-template-columns:1fr 1fr 1fr 1fr; gap:16px; }

/* ── NUMBER ACCENT ── */
.num-bg {
  position: absolute;
  top: 16px; right: 20px;
  font-size: 5rem;
  font-weight: 900;
  line-height: 1;
  color: rgba(255,255,255,0.025);
  pointer-events: none;
  user-select: none;
}

/* ── SCROLL FADE IN ── */
[data-fade] {
  opacity: 1;
  transform: none;
  transition: none;
}

[data-fade].visible {
  opacity: 1;
  transform: none;
}

/* ── MOBILE ── */
@media (max-width: 900px) {
  .nav-cta .btn { display: none; } /* hide desktop CTA button on mobile */
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }

  /* ── GLOBAL OVERFLOW CONTAIN on mobile ── */
  /* Prevents any section, container, or wide child from blowing out the viewport */
  section, .container {
    overflow-x: hidden;
    max-width: 100vw;
  }
  img, video, iframe, pre, code, table {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .container { padding: 0 18px; }
  .section { padding: 64px 0; }
  h1 { font-size: 2.3rem; }
  h2 { font-size: 1.9rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
/* ── UNIVERSAL HAMBURGER + FULLSCREEN NAV ── */
.nav-links { display: none !important; } /* Hide desktop links globally */

.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 9999;
  padding: 0;
  margin-left: 10px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 3px 0;
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1), opacity 0.3s;
  border-radius: 2px;
}
.nav-hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-nav {
  display: flex !important;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--mobile-nav-bg, rgba(6,6,16,0.98));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 9998;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.mobile-nav.active {
  opacity: 1;
  pointer-events: auto;
}
.mobile-nav-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.mobile-nav a {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text2);
  text-decoration: none;
  transition: color var(--t);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.1, 0.9, 0.2, 1);
}
.mobile-nav.active a {
  transform: translateY(0);
  opacity: 1;
}
.mobile-nav a:hover, .mobile-nav a.active { color: var(--indigo3); }

/* Staggered entrance for links */
.mobile-nav.active a:nth-child(1) { transition-delay: 0.10s; }
.mobile-nav.active a:nth-child(2) { transition-delay: 0.15s; }
.mobile-nav.active a:nth-child(3) { transition-delay: 0.20s; }
.mobile-nav.active a:nth-child(4) { transition-delay: 0.25s; }
.mobile-nav.active a:nth-child(5) { transition-delay: 0.30s; }
.mobile-nav.active a:nth-child(6) { transition-delay: 0.35s; }
.mobile-nav.active a:nth-child(7) { transition-delay: 0.40s; }

/* Prevent horizontal scroll issues globally */
@media (max-width: 900px) {
  .container { max-width: 100%; }
}

/* ── TIER BADGES (Skills Pages) ── */
.tier-badge-curated {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: rgba(79,70,229,0.12);
  color: var(--indigo3);
  border: 1px solid rgba(79,70,229,0.28);
  white-space: nowrap;
  flex-shrink: 0;
}

.tier-badge-extended {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: rgba(60,60,90,0.2);
  color: var(--text3);
  border: 1px solid var(--border2);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── SIDEBAR NAV (skills-catalog.html) ── */
.sidebar-nav {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding: 0 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

.sidebar-nav-section { margin-bottom: 24px; }

.sidebar-nav-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
  padding: 0 10px;
  margin-bottom: 6px;
}

.sidebar-nav-link {
  display: block;
  padding: 6px 10px;
  font-size: 0.82rem;
  color: var(--text2);
  border-radius: var(--r-xs);
  text-decoration: none;
  transition: color var(--t), background var(--t);
  line-height: 1.3;
}

.sidebar-nav-link:hover { color: var(--text); background: var(--bg3); }
.sidebar-nav-link.active { color: var(--indigo3); background: rgba(79,70,229,0.08); }

.sidebar-nav-sub-link {
  display: block;
  padding: 5px 10px 5px 20px;
  font-size: 0.78rem;
  color: var(--text3);
  border-radius: var(--r-xs);
  text-decoration: none;
  transition: color var(--t), background var(--t);
}

.sidebar-nav-sub-link:hover { color: var(--text2); background: var(--bg3); }

/* ── SKILL ROW (skills-catalog.html) ── */
.skill-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  transition: background var(--t), border-color var(--t);
}

.skill-row:hover {
  background: var(--bg3);
  border-color: var(--border);
}

.skill-row-meta {
  flex: 1;
  min-width: 0;
}

.skill-row-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  line-height: 1.4;
}

.skill-row-desc {
  font-size: 0.82rem;
  color: var(--text2);
  line-height: 1.5;
  margin: 0;
}

.skill-row-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--bg4);
  color: var(--text3);
  border: 1px solid var(--border);
}

/* Skills catalog layout */
.catalog-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 900px) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }
  .sidebar-nav {
    position: static;
    max-height: none;
  }
}

/* Skills page tab system */
.skill-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.skill-tab {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--text2);
  transition: all var(--t);
  font-family: inherit;
}

.skill-tab:hover { border-color: var(--indigo); color: var(--indigo3); background: rgba(79,70,229,0.07); }
.skill-tab.active { background: rgba(79,70,229,0.12); border-color: rgba(79,70,229,0.4); color: var(--indigo3); }

.skill-panel { display: none; }
.skill-panel.active { display: block; }

/* Skill card (skills.html) */
.skill-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 16px;
  transition: border-color var(--t), box-shadow var(--t);
}

.skill-card:hover {
  border-color: var(--border2);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.skill-card-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.skill-card-desc {
  font-size: 0.8rem;
  color: var(--text2);
  line-height: 1.5;
  margin: 0 0 8px;
}

.skill-card-meta {
  font-size: 0.72rem;
  color: var(--text3);
  font-style: italic;
}

/* Profile grid (skills.html) */
.profile-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  cursor: pointer;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
  position: relative;
}

.profile-card:hover {
  border-color: var(--indigo);
  box-shadow: var(--glow-ind);
  background: var(--bg3);
}

.profile-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.profile-card-desc {
  font-size: 0.8rem;
  color: var(--text2);
  line-height: 1.5;
  margin: 0 0 12px;
}

.profile-card-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--indigo3);
  background: rgba(79,70,229,0.1);
  border: 1px solid rgba(79,70,229,0.2);
  padding: 2px 9px;
  border-radius: 20px;
}

.profile-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.profile-card.expanded .profile-card-tags { max-height: 200px; }
.profile-card.expanded { border-color: rgba(99,102,241,0.5); }

.profile-tag {
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg4);
  color: var(--text3);
  border: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
}

/* Flow steps (skills.html) */
.flow-steps {
  display: flex;
  gap: 0;
  align-items: stretch;
  overflow-x: auto;
  padding-bottom: 8px;
}

.flow-step {
  flex: 1;
  min-width: 160px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-right: none;
  padding: 20px 18px;
  position: relative;
}

.flow-step:first-child { border-radius: var(--r) 0 0 var(--r); }
.flow-step:last-child  { border-right: 1px solid var(--border); border-radius: 0 var(--r) var(--r) 0; }

.flow-step-num {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--indigo3);
  margin-bottom: 8px;
}

.flow-step-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.flow-step-sub {
  font-size: 0.75rem;
  color: var(--text3);
  margin: 0;
}

/* Mobile nav staggered for extra links */
.mobile-nav.active a:nth-child(8)  { transition-delay: 0.45s; }
.mobile-nav.active a:nth-child(9)  { transition-delay: 0.50s; }
.mobile-nav.active a:nth-child(10) { transition-delay: 0.55s; }
