/* ============================================================
   Geek Source Codes — Homepage redesign
   Design tokens + component styles (handoff-ready)
   ------------------------------------------------------------
   Type:   Space Grotesk (display) · Plus Jakarta Sans (body) · JetBrains Mono (code/labels)
   Color:  cool paper + near-black ink · electric indigo primary · terminal-green "free" signal
   ============================================================ */

:root {
  /* --- Brand / accent (overridable by Tweaks) --- */
  --primary: #e0563f;          /* coral (selected) */
  --primary-600: color-mix(in srgb, var(--primary) 84%, #000);
  --primary-700: color-mix(in srgb, var(--primary) 64%, #1a1a2e);
  --primary-soft: color-mix(in srgb, var(--primary) 11%, #fff);
  --signal: #15a34a;           /* "free" / success green */
  --signal-soft: #dcfce7;
  --signal-ink: #0d7a37;

  /* --- Neutrals --- */
  --paper: #f3f4f7;            /* page background */
  --surface: #ffffff;          /* cards */
  --surface-2: #fafbfc;
  --ink: #0f1115;              /* primary text */
  --ink-2: #41464f;            /* secondary text */
  --ink-3: #6c727d;            /* muted text */
  --line: #e5e7ec;             /* hairline borders */
  --line-2: #eef0f3;

  /* --- Dark hero --- */
  --night: #0c0e13;
  --night-2: #14171f;
  --night-line: #242a36;
  --night-ink: #e9ebf0;
  --night-ink-2: #a6adbb;

  /* --- Type --- */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* --- Radius / shadow --- */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --shadow-sm: 0 1px 2px rgba(16, 18, 25, .05), 0 1px 3px rgba(16, 18, 25, .04);
  --shadow-md: 0 4px 14px rgba(16, 18, 25, .07), 0 2px 4px rgba(16, 18, 25, .04);
  --shadow-lg: 0 18px 48px rgba(16, 18, 25, .12), 0 6px 16px rgba(16, 18, 25, .06);

  /* --- Layout --- */
  --maxw: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
}

/* ============================================================ Base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; margin: 0; line-height: 1.08; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.mono { font-family: var(--font-mono); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: currentColor; opacity: .55; }

/* ============================================================ Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 12px 20px; border-radius: 999px;
  transition: transform .14s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px -6px var(--primary); }
.btn-primary:hover { background: var(--primary-600); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink-3); background: var(--surface); }
.btn-dark { background: #fff; color: var(--night); }
.btn-dark:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -10px rgba(255,255,255,.4); }
.btn-sm { padding: 9px 15px; font-size: 14px; }

/* ============================================================ Top bar / nav */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 22px; height: 68px; }

/* Wordmark logo */
.logo { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--night); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 17px;
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.logo-mark span { position: relative; z-index: 1; letter-spacing: -.04em; }
.logo-mark::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 75%, transparent), transparent 60%);
}
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text b { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -.02em; }
.logo-text small { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; color: var(--ink-3); text-transform: uppercase; margin-top: 3px; }

.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-links a {
  position: relative; padding: 8px 13px; border-radius: 8px;
  font-size: 14.5px; font-weight: 500; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px;
  transition: color .15s ease, background .15s ease;
}
.nav-links a:hover { color: var(--ink); background: var(--surface); }
.nav-links a .chev { width: 13px; height: 13px; opacity: .5; }
.nav-spacer { flex: 1; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; color: var(--ink-2);
  border: 1px solid var(--line); background: var(--surface);
  transition: color .15s, border-color .15s, transform .15s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.icon-btn svg { width: 18px; height: 18px; }
.burger { display: none; }

/* ============================================================ Hero (dark) */
.hero {
  background: var(--night);
  color: var(--night-ink);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--night-line);
}
.hero::before { /* dotted grid texture */
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(120% 90% at 70% 0%, #000 30%, transparent 78%);
}
.hero::after { /* primary glow */
  content: ""; position: absolute; top: -30%; right: -10%;
  width: 720px; height: 720px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--primary) 55%, transparent), transparent 62%);
  filter: blur(20px); opacity: .55; pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; padding: clamp(56px, 8vw, 96px) 0 clamp(40px, 5vw, 64px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 72px); align-items: center; }

.hero h1 {
  font-size: clamp(38px, 5.4vw, 66px);
  color: #fff; letter-spacing: -.03em;
  text-wrap: balance;
}
.hero h1 .hl { color: transparent; background: linear-gradient(100deg, #fff 30%, color-mix(in srgb, var(--primary) 40%, #fff)); -webkit-background-clip: text; background-clip: text; }
.hero .lede { margin-top: 22px; font-size: clamp(16px, 1.6vw, 19px); color: var(--night-ink-2); max-width: 36ch; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .02em;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--night-line); color: var(--night-ink-2);
  background: rgba(255,255,255,.02);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 25%, transparent); }

/* Search */
.search {
  margin-top: 30px; max-width: 560px;
  background: #fff; border-radius: 14px; padding: 7px 7px 7px 16px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.06);
}
.search svg { width: 20px; height: 20px; color: var(--ink-3); flex-shrink: 0; }
.search input {
  flex: 1; border: none; outline: none; font-family: var(--font-body);
  font-size: 16px; color: var(--ink); background: transparent; min-width: 0;
}
.search input::placeholder { color: var(--ink-3); }
.search .kbd {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; margin-right: 4px;
}
.search-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; align-items: center; }
.search-tags .lbl { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--night-ink-2); margin-right: 2px; }
.search-tags a {
  font-size: 13px; color: var(--night-ink-2); padding: 5px 11px;
  border: 1px solid var(--night-line); border-radius: 999px; transition: .15s;
}
.search-tags a:hover { color: #fff; border-color: var(--night-ink-2); }

/* Hero code card */
.code-card {
  background: var(--night-2); border: 1px solid var(--night-line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.code-top { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--night-line); }
.code-top .dots { display: flex; gap: 6px; }
.code-top .dots i { width: 11px; height: 11px; border-radius: 50%; background: #353b48; }
.code-top .fname { font-family: var(--font-mono); font-size: 12px; color: var(--night-ink-2); margin-left: 6px; }
.code-top .tag { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--signal); background: color-mix(in srgb, var(--signal) 14%, transparent); padding: 3px 9px; border-radius: 6px; }
.code-body { padding: 16px 18px; font-family: var(--font-mono); font-size: 13px; line-height: 1.9; color: var(--night-ink-2); }
.code-body .ln { display: block; white-space: nowrap; }
.code-body .c-key { color: #c792ea; }
.code-body .c-fn { color: #82aaff; }
.code-body .c-str { color: #c3e88d; }
.code-body .c-com { color: #5b6577; }
.code-body .c-num { color: #f78c6c; }
.code-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--night-line); }
.code-stats div { padding: 14px 16px; border-right: 1px solid var(--night-line); }
.code-stats div:last-child { border-right: none; }
.code-stats b { display: block; font-family: var(--font-display); font-size: 22px; color: #fff; }
.code-stats span { font-family: var(--font-mono); font-size: 11px; color: var(--night-ink-2); letter-spacing: .03em; }

/* ============================================================ Section heading */
.section { padding: clamp(56px, 7vw, 90px) 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 38px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); }
.section-head p { color: var(--ink-3); margin-top: 12px; max-width: 46ch; font-size: 15.5px; }
.section-head .link {
  font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  border-bottom: 1px solid var(--line); padding-bottom: 4px; transition: .15s;
}
.section-head .link:hover { color: var(--primary); border-color: var(--primary); gap: 10px; }

/* ============================================================ Category grid */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px; display: flex; flex-direction: column; gap: 14px; min-height: 132px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  position: relative; overflow: hidden;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.cat-ico {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-700);
  transition: background .16s, color .16s;
}
.cat-card:hover .cat-ico { background: var(--primary); color: #fff; }
.cat-ico svg { width: 21px; height: 21px; }
.cat-card h3 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.cat-card .count { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3); margin-top: auto; display: flex; align-items: center; gap: 6px; }
.cat-card .count b { color: var(--ink); font-weight: 700; }
.cat-card .arrow { position: absolute; top: 18px; right: 18px; color: var(--ink-3); opacity: 0; transform: translateX(-4px); transition: .16s; }
.cat-card:hover .arrow { opacity: 1; transform: translateX(0); color: var(--primary); }
.cat-card.more { background: var(--night); color: #fff; border-color: var(--night); justify-content: center; align-items: flex-start; }
.cat-card.more h3 { color: #fff; }
.cat-card.more .count { color: var(--night-ink-2); }
.cat-card.more .cat-ico { background: rgba(255,255,255,.1); color: #fff; }

/* ============================================================ Featured projects */
.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.proj-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .16s ease, box-shadow .16s ease;
}
.proj-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
/* Screenshot placeholder = stylized app window */
.proj-shot { position: relative; aspect-ratio: 16/10; background: var(--surface-2); border-bottom: 1px solid var(--line); overflow: hidden; }
.win {
  position: absolute; inset: 16px 16px -1px 16px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px 10px 0 0; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; overflow: hidden;
}
.win-bar { height: 24px; display: flex; align-items: center; gap: 5px; padding: 0 10px; border-bottom: 1px solid var(--line-2); background: var(--surface-2); }
.win-bar i { width: 7px; height: 7px; border-radius: 50%; background: #d6dae1; }
.win-bar .u { margin-left: 8px; height: 9px; flex: 1; max-width: 130px; border-radius: 4px; background: #eceef2; }
.win-body { flex: 1; display: flex; min-height: 0; }
.win-side { width: 38px; border-right: 1px solid var(--line-2); padding: 10px 8px; display: flex; flex-direction: column; gap: 9px; background: var(--surface-2); }
.win-side i { height: 7px; border-radius: 3px; background: #e1e5ea; }
.win-side i.on { background: var(--primary); }
.win-main { flex: 1; padding: 11px 12px; display: flex; flex-direction: column; gap: 9px; min-width: 0; }

/* dashboard header */
.win-head { display: flex; align-items: center; gap: 8px; }
.win-head .ht { height: 9px; width: 44%; border-radius: 4px; background: #d9dde3; }
.win-head .hp { margin-left: auto; height: 16px; width: 34px; border-radius: 5px; background: var(--primary); opacity: .9; }
.win-head .ha { height: 16px; width: 16px; border-radius: 50%; background: #e1e5ea; }

/* stat tiles with mock numbers */
.win-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.win-stat { border: 1px solid var(--line-2); border-radius: 7px; padding: 8px 8px 9px; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.win-stat .num { font-family: var(--font-mono); font-weight: 700; font-size: 13px; line-height: 1; color: var(--ink); }
.win-stat .cap { height: 5px; width: 78%; border-radius: 3px; background: #e7eaef; }
.win-stat.acc { background: color-mix(in srgb, var(--primary) 9%, #fff); border-color: color-mix(in srgb, var(--primary) 22%, var(--line-2)); }
.win-stat.acc .num { color: var(--primary); }
.win-stat.grn { background: var(--signal-soft); border-color: color-mix(in srgb, var(--signal) 22%, var(--line-2)); }
.win-stat.grn .num { color: var(--signal-ink); }

/* bar chart */
.win-chart { flex: 1; display: flex; align-items: flex-end; gap: 6px; padding-top: 4px; min-height: 46px; }
.win-chart span { flex: 1; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--primary) 22%, #eef0f3); }
.win-chart span.tall { background: var(--primary); }

/* POS / product grid */
.win-pos { flex: 1; display: grid; grid-template-columns: 1fr 1fr 1fr; grid-auto-rows: 1fr; gap: 6px; }
.win-pos b { border-radius: 6px; background: #eef0f3; border: 1px solid var(--line-2); }
.win-pos b.p { background: color-mix(in srgb, var(--primary) 13%, #fff); border-color: color-mix(in srgb, var(--primary) 20%, var(--line-2)); }
.win-pos b.g { background: var(--signal-soft); border-color: color-mix(in srgb, var(--signal) 20%, var(--line-2)); }
.win-total { display: flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 7px; background: var(--ink); flex-shrink: 0; overflow: hidden; }
.win-total .tl { height: 6px; width: 18px; border-radius: 3px; background: rgba(255,255,255,.35); flex-shrink: 0; }
.win-total .tv { margin-left: auto; font-family: var(--font-mono); font-weight: 700; font-size: 10.5px; color: #fff; white-space: nowrap; letter-spacing: -.02em; }

/* list rows w/ progress (e-learning) */
.win-list { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.win-li { display: flex; align-items: center; gap: 8px; }
.win-li .av { width: 18px; height: 18px; border-radius: 5px; background: var(--primary-soft); flex-shrink: 0; }
.win-li .av.b { background: var(--signal-soft); }
.win-li .col { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.win-li .col i { height: 5px; border-radius: 3px; background: #e7eaef; }
.win-li .col i:first-child { width: 64%; background: #d9dde3; }
.win-li .pg { height: 5px; border-radius: 3px; background: #eef0f3; overflow: hidden; }
.win-li .pg::after { content: ""; display: block; height: 100%; width: var(--p, 60%); background: var(--primary); border-radius: 3px; }
.win-li .pg.g::after { background: var(--signal); }
.proj-shot .free-badge {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .04em;
  color: #fff; background: var(--signal); padding: 5px 10px; border-radius: 7px;
  box-shadow: 0 4px 12px -4px var(--signal);
}
.proj-shot .cat-tag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .03em;
  color: var(--ink-2); background: rgba(255,255,255,.92); padding: 5px 10px; border-radius: 7px;
  border: 1px solid var(--line); backdrop-filter: blur(4px);
}
.proj-info { padding: 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.proj-info h3 { font-size: 18px; font-weight: 600; line-height: 1.25; }
.proj-card:hover .proj-info h3 { color: var(--primary); }
.proj-info p { font-size: 14px; color: var(--ink-3); line-height: 1.55; }
.stack { display: flex; flex-wrap: wrap; gap: 6px; }
.stack span { font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); padding: 3px 8px; border-radius: 6px; }
.proj-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; }
.proj-meta { display: flex; gap: 14px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.proj-meta span { display: inline-flex; align-items: center; gap: 5px; }
.proj-meta svg { width: 14px; height: 14px; }
.dl-link { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; color: var(--primary); display: inline-flex; align-items: center; gap: 6px; }
.dl-link svg { width: 14px; height: 14px; }

/* ============================================================ Capstone band */
.capstone { background: var(--night); color: var(--night-ink); position: relative; overflow: hidden; }
.capstone::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.045) 1px, transparent 1px); background-size: 24px 24px; mask-image: radial-gradient(110% 100% at 0% 0%, #000 35%, transparent 80%); }
.capstone-grid { position: relative; z-index: 1; display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(36px, 5vw, 72px); align-items: center; }
.capstone h2 { color: #fff; font-size: clamp(28px, 3.4vw, 42px); }
.capstone .lede { color: var(--night-ink-2); margin-top: 18px; font-size: 16.5px; max-width: 42ch; }
.capstone .eyebrow { color: color-mix(in srgb, var(--primary) 55%, #fff); }
.capstone .btn-row { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.cap-list { display: grid; gap: 12px; }
.cap-item {
  display: flex; align-items: center; gap: 16px;
  background: var(--night-2); border: 1px solid var(--night-line); border-radius: var(--r-md);
  padding: 16px 18px; transition: border-color .15s, transform .15s;
}
.cap-item:hover { border-color: color-mix(in srgb, var(--primary) 50%, var(--night-line)); transform: translateX(3px); }
.cap-num { font-family: var(--font-mono); font-size: 13px; color: var(--primary); font-weight: 700; width: 30px; flex-shrink: 0; }
.cap-item .t b { display: block; color: #fff; font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.cap-item .t span { font-size: 13px; color: var(--night-ink-2); }
.cap-item .go { margin-left: auto; color: var(--night-ink-2); }

/* ============================================================ Tutorials list */
.tut-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; }
.tut-feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  display: flex; flex-direction: column; transition: box-shadow .16s, transform .16s;
}
.tut-feature:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.tut-feature .banner { aspect-ratio: 16/7; background: linear-gradient(120deg, var(--night), var(--primary-700)); position: relative; overflow: hidden; }
.tut-feature .banner::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px); background-size: 20px 20px; }
.tut-feature .banner .glyph { position: absolute; right: 24px; bottom: -10px; font-family: var(--font-mono); font-size: 120px; color: rgba(255,255,255,.1); font-weight: 700; }
.tut-feature .body { padding: 24px; }
.tut-feature h3 { font-size: 24px; margin: 12px 0; line-height: 1.2; }
.tut-feature p { color: var(--ink-3); font-size: 15px; }
.tut-list { display: flex; flex-direction: column; }
.tut-row { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); transition: .15s; align-items: flex-start; }
.tut-row:first-child { padding-top: 0; }
.tut-row:last-child { border-bottom: none; }
.tut-row .idx { font-family: var(--font-mono); font-size: 13px; color: var(--ink-3); width: 26px; flex-shrink: 0; padding-top: 2px; }
.tut-row h4 { font-size: 16px; font-weight: 600; line-height: 1.3; transition: color .15s; }
.tut-row:hover h4 { color: var(--primary); }
.tut-row .meta { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.chip { font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--primary-700); background: var(--primary-soft); padding: 4px 9px; border-radius: 6px; font-weight: 600; white-space: nowrap; }
.free-tag { white-space: nowrap; }

/* ============================================================ CTA / newsletter */
.cta { padding-bottom: clamp(56px, 7vw, 90px); }
.cta-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: clamp(36px, 5vw, 60px); text-align: center; box-shadow: var(--shadow-md);
  position: relative; overflow: hidden;
}
.cta-box::before { content: ""; position: absolute; top: -50%; left: 50%; transform: translateX(-50%); width: 600px; height: 400px; background: radial-gradient(circle, var(--primary-soft), transparent 65%); opacity: .8; }
.cta-box > * { position: relative; z-index: 1; }
.cta-box h2 { font-size: clamp(28px, 3.6vw, 44px); }
.cta-box p { color: var(--ink-3); margin: 16px auto 28px; max-width: 44ch; font-size: 16px; }
.cta-form { display: flex; gap: 10px; max-width: 460px; margin: 0 auto; }
.cta-form input { flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: 13px 20px; font: inherit; font-size: 15px; outline: none; transition: border-color .15s; }
.cta-form input:focus { border-color: var(--primary); }
.cta-note { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); margin-top: 14px; }

/* ============================================================ Footer */
.footer { background: var(--night); color: var(--night-ink-2); padding: clamp(48px, 6vw, 72px) 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer .logo-text b { color: #fff; }
.footer .blurb { margin: 18px 0; font-size: 14px; max-width: 30ch; line-height: 1.6; }
.footer-col h5 { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--night-ink); margin-bottom: 16px; font-weight: 600; }
.footer-col a { display: block; font-size: 14px; color: var(--night-ink-2); padding: 6px 0; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--night-line); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-bottom .mono { font-size: 12.5px; }
.socials { display: flex; gap: 8px; }
.socials a { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--night-line); display: grid; place-items: center; color: var(--night-ink-2); transition: .15s; }
.socials a:hover { color: #fff; border-color: var(--night-ink-2); }
.socials svg { width: 16px; height: 16px; }

/* ============================================================ Responsive */
@media (max-width: 1040px) {
  .nav-links { display: none; }
  .burger { display: grid; }
  .hero-grid { grid-template-columns: 1fr; }
  .code-card { display: none; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .proj-grid { grid-template-columns: repeat(2, 1fr); }
  .capstone-grid { grid-template-columns: 1fr; }
  .tut-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 720px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .proj-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .cta-form { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .nav { gap: 12px; }
  .nav-actions .btn-primary { display: none; }
  .nav-actions { gap: 8px; }
  .logo-text small { display: none; }
  .logo-text b { font-size: 15px; }
  .logo-mark { width: 32px; height: 32px; font-size: 15px; }
  .icon-btn { width: 38px; height: 38px; }
}
@media (max-width: 460px) {
  .cat-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .search-tags .lbl { width: 100%; }
  .nav-actions #themeBtn { display: none; }
  .hero h1 { font-size: clamp(28px, 8.5vw, 38px); }
  .hero .search .kbd { display: none; }
  .hero .search { padding: 6px 6px 6px 14px; }
  .hero-badges .pill { font-size: 11px; }
}

/* ============================================================ Tweaks-driven dark mode for whole page (optional toggle) */
body.theme-dark {
  --paper: #0c0e13;
  --surface: #14171f;
  --surface-2: #11141b;
  --ink: #eef0f4;
  --ink-2: #b7bdc9;
  --ink-3: #828a98;
  --line: #232936;
  --line-2: #1d222d;
  --primary-soft: color-mix(in srgb, var(--primary) 22%, #14171f);
}
body.theme-dark .topbar { background: color-mix(in srgb, #0c0e13 80%, transparent); }
body.theme-dark .win { background: #1b1f29; }
body.theme-dark .win-bar { background: #161a22; }
body.theme-dark .stack span,
body.theme-dark .search input { color: var(--ink); }

/* ============================================================ INNER PAGES ============================================================ */

/* active nav */
.nav-links a.active { color: var(--primary); }

/* ---- Nav dropdown mega-menus ---- */
.nav-links .nav-item { position: relative; display: inline-flex; align-items: center; }
.nav-links a .chev { transition: transform .16s ease; }
.nav-item:hover > a .chev { transform: rotate(180deg); }
.nav-item:hover > a { color: var(--ink); background: var(--surface); }
.nav-menu { position: absolute; top: 100%; left: 0; padding-top: 10px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .16s ease, transform .16s ease, visibility .16s; z-index: 60; }
.nav-item:hover .nav-menu, .nav-item:focus-within .nav-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-menu-inner { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; width: 460px; }
.nav-menu-inner.narrow { grid-template-columns: 1fr; width: 230px; }
.nav-links .nav-menu a.mi { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.nav-links .nav-menu a.mi:hover { background: var(--primary-soft); color: var(--primary-700); }
.nav-menu a.mi .mi-ico { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-3); flex-shrink: 0; transition: .14s; }
.nav-menu a.mi:hover .mi-ico { background: var(--primary); border-color: var(--primary); color: #fff; }
.nav-menu a.mi .mi-ico svg { width: 15px; height: 15px; }
.nav-menu a.mi .cnt { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.nav-menu .mfoot { grid-column: 1 / -1; border-top: 1px solid var(--line-2); margin-top: 4px; padding-top: 4px; }
.nav-links .nav-menu .mfoot a { display: flex; align-items: center; justify-content: space-between; padding: 9px 11px; border-radius: 9px; font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; color: var(--primary); }
.nav-links .nav-menu .mfoot a:hover { background: var(--primary-soft); }

/* ---- Breadcrumb + page header (light band) ---- */
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.page-head .wrap { padding-top: 30px; padding-bottom: 34px; }
.crumbs { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3); margin-bottom: 20px; flex-wrap: wrap; }
.crumbs a { color: var(--ink-3); transition: color .15s; }
.crumbs a:hover { color: var(--primary); }
.crumbs .sep { opacity: .5; }
.crumbs b { color: var(--ink-2); font-weight: 600; }
.page-head .ph-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.page-head .ph-ico { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-700); margin-bottom: 16px; }
.page-head .ph-ico svg { width: 28px; height: 28px; }
.page-head h1 { font-size: clamp(30px, 4vw, 44px); }
.page-head .ph-desc { color: var(--ink-3); margin-top: 12px; max-width: 56ch; font-size: 16px; }
.page-head .ph-count { font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); margin-top: 14px; }
.page-head .ph-count b { color: var(--primary); }

/* ---- Toolbar (search + sort) ---- */
.toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.toolbar-search { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 16px; transition: border-color .15s; }
.toolbar-search:focus-within { border-color: var(--primary); }
.toolbar-search svg { width: 18px; height: 18px; color: var(--ink-3); flex-shrink: 0; }
.toolbar-search input { flex: 1; border: none; outline: none; background: transparent; font: inherit; font-size: 15px; color: var(--ink); min-width: 0; }
.toolbar .count-note { font-family: var(--font-mono); font-size: 13px; color: var(--ink-3); }
.sort { display: flex; align-items: center; gap: 8px; }
.sort label { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.sort select { font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 34px 9px 14px; cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236c727d' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }

/* ---- Layout with sidebar ---- */
.with-side { display: grid; grid-template-columns: 248px 1fr; gap: 36px; align-items: start; }
.side { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 26px; }
.side-group h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.side-cats { display: flex; flex-direction: column; gap: 2px; }
.side-cats a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 9px; font-size: 14px; color: var(--ink-2); transition: .14s; }
.side-cats a:hover { background: var(--surface); color: var(--ink); }
.side-cats a.on { background: var(--primary-soft); color: var(--primary-700); font-weight: 600; }
.side-cats a span { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.side-cats a.on span { color: var(--primary-700); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); padding: 7px 12px; border-radius: 999px; cursor: pointer; transition: .14s; }
.fchip:hover { border-color: var(--ink-3); }
.fchip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.side-cta { background: var(--night); color: var(--night-ink); border-radius: var(--r-md); padding: 20px; }
.side-cta h5 { color: #fff; font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.side-cta p { color: var(--night-ink-2); font-size: 13.5px; margin: 8px 0 14px; line-height: 1.5; }

/* result grid (2-up inside content col) */
.results-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

/* ---- Pagination ---- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 44px; }
.pagination a, .pagination span { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-family: var(--font-mono); font-size: 14px; color: var(--ink-2); transition: .14s; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .cur { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .gap { border: none; background: none; }
.pagination .nxt { gap: 6px; font-family: var(--font-body); font-weight: 600; }
.pagination .nxt svg { width: 15px; height: 15px; }

/* ============================================================ Single project page */
.proj-layout { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; padding-top: clamp(36px,5vw,56px); padding-bottom: clamp(48px,6vw,80px); }
.proj-main { min-width: 0; }

/* gallery */
.gallery { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.gallery .stage { aspect-ratio: 16/9; position: relative; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.gallery .stage .win { inset: 22px 22px -1px 22px; }
.gallery .thumbs { display: flex; gap: 10px; padding: 12px; overflow-x: auto; }
.gallery .thumb { flex: 0 0 88px; height: 58px; border-radius: 8px; border: 2px solid var(--line); background: var(--surface-2); position: relative; overflow: hidden; cursor: pointer; transition: border-color .15s; }
.gallery .thumb.on { border-color: var(--primary); }
.gallery .thumb .mini { position: absolute; inset: 6px; border-radius: 4px; background: var(--primary-soft); }
.gallery .thumb .mini.b { background: var(--signal-soft); }
.gallery .thumb .mini.c { background: #eef0f3; }

/* content blocks */
.proj-block { margin-top: 40px; }
.proj-block > h2 { font-size: 24px; margin-bottom: 16px; }
.proj-block p { color: var(--ink-2); font-size: 16px; line-height: 1.7; }
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; margin-top: 6px; }
.feature-list li { display: flex; align-items: flex-start; gap: 11px; font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.feature-list .tick { flex-shrink: 0; width: 22px; height: 22px; border-radius: 7px; background: var(--signal-soft); color: var(--signal-ink); display: grid; place-items: center; margin-top: 1px; }
.feature-list .tick svg { width: 13px; height: 13px; }
.tech-row { display: flex; flex-wrap: wrap; gap: 10px; }
.tech-pill { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); padding: 9px 14px; border-radius: 10px; }
.tech-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }

/* install steps + code block */
.steps { display: flex; flex-direction: column; gap: 18px; counter-reset: step; }
.step { display: flex; gap: 16px; }
.step .n { flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px; background: var(--primary); color: #fff; font-family: var(--font-mono); font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.step .sc { flex: 1; min-width: 0; }
.step .sc b { display: block; font-family: var(--font-display); font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.codeblock { background: var(--night); border: 1px solid var(--night-line); border-radius: var(--r-md); padding: 14px 16px; font-family: var(--font-mono); font-size: 13px; line-height: 1.8; color: var(--night-ink-2); overflow-x: auto; }
.codeblock .c-com { color: #5b6577; }
.codeblock .c-str { color: #c3e88d; }
.codeblock .c-key { color: #c792ea; }

/* sticky download sidebar */
.dl-side { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 16px; }
.dl-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-md); }
.dl-card .price { display: flex; align-items: baseline; gap: 10px; }
.dl-card .price b { font-family: var(--font-display); font-size: 30px; color: var(--signal-ink); }
.dl-card .price s { font-family: var(--font-mono); font-size: 15px; color: var(--ink-3); }
.dl-card .free-tag { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: #fff; background: var(--signal); padding: 4px 9px; border-radius: 6px; }
.dl-card .btn { width: 100%; justify-content: center; margin-top: 18px; }
.dl-card .btn svg { width: 18px; height: 18px; }
.dl-card .ghost-line { display: flex; gap: 10px; margin-top: 10px; }
.dl-card .ghost-line .btn { margin-top: 0; }
.spec-list { margin-top: 20px; border-top: 1px solid var(--line-2); }
.spec-list .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.spec-list .row .k { color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.spec-list .row .k svg { width: 15px; height: 15px; }
.spec-list .row .v { font-family: var(--font-mono); font-size: 13px; color: var(--ink); font-weight: 600; }
.dl-meta { display: flex; gap: 16px; margin-top: 16px; font-family: var(--font-mono); font-size: 13px; color: var(--ink-3); }
.dl-meta span { display: inline-flex; align-items: center; gap: 6px; }
.dl-meta svg { width: 15px; height: 15px; }
.author-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; display: flex; align-items: center; gap: 14px; }
.author-card .av { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-700)); display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 18px; flex-shrink: 0; }
.author-card .ai b { display: block; font-family: var(--font-display); font-size: 15px; font-weight: 600; }
.author-card .ai span { font-size: 13px; color: var(--ink-3); }

/* ============================================================ Article page */
.article-wrap { padding-top: clamp(36px,5vw,56px); padding-bottom: clamp(48px,6vw,80px); }
.article-grid { display: grid; grid-template-columns: 1fr 240px; gap: 48px; align-items: start; }
.article-head { max-width: 760px; margin-bottom: 30px; }
.article-head .chip { margin-bottom: 18px; }
.article-head h1 { font-size: clamp(30px, 4.2vw, 50px); line-height: 1.1; }
.article-head .byline { display: flex; align-items: center; gap: 14px; margin-top: 22px; font-size: 14px; color: var(--ink-3); }
.article-head .byline .av { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-700)); display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.article-head .byline b { color: var(--ink); font-weight: 600; }
.article-head .byline .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3); }
.article-cover { aspect-ratio: 16/6; border-radius: var(--r-lg); background: linear-gradient(120deg, var(--night), var(--primary-700)); position: relative; overflow: hidden; margin-bottom: 36px; }
.article-cover::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px); background-size: 22px 22px; }
.article-cover .glyph { position: absolute; right: 30px; bottom: -14px; font-family: var(--font-mono); font-size: 150px; color: rgba(255,255,255,.1); font-weight: 700; }

/* prose */
.prose { max-width: 760px; }
.prose > * + * { margin-top: 22px; }
.prose p { font-size: 17px; line-height: 1.75; color: var(--ink-2); }
.prose h2 { font-size: 28px; margin-top: 44px; }
.prose h3 { font-size: 21px; margin-top: 34px; }
.prose ul, .prose ol { padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.prose li { font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.prose li::marker { color: var(--primary); }
.prose a { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose code { font-family: var(--font-mono); font-size: .86em; background: var(--primary-soft); color: var(--primary-700); padding: 2px 7px; border-radius: 6px; }
.prose blockquote { border-left: 3px solid var(--primary); padding: 4px 0 4px 22px; margin-left: 0; font-family: var(--font-display); font-size: 21px; color: var(--ink); line-height: 1.4; }
.prose .codeblock { font-size: 13.5px; }
.prose .codeblock code { background: none; color: inherit; padding: 0; }
.prose img, .prose .fig { display: block; border-radius: var(--r-md); border: 1px solid var(--line); }
.prose .fig { aspect-ratio: 16/8; background: var(--surface-2); display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }

/* TOC */
.toc { position: sticky; top: 92px; }
.toc h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.toc a { display: block; font-size: 14px; color: var(--ink-3); padding: 7px 0 7px 14px; border-left: 2px solid var(--line); transition: .14s; line-height: 1.4; }
.toc a:hover, .toc a.on { color: var(--primary); border-color: var(--primary); }

/* ============================================================ About page */
.about-hero { background: var(--night); color: var(--night-ink); position: relative; overflow: hidden; }
.about-hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px); background-size: 26px 26px; mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 78%); }
.about-hero .wrap { position: relative; z-index: 1; padding: clamp(60px,8vw,110px) var(--gutter); text-align: center; }
.about-hero h1 { color: #fff; font-size: clamp(34px,5vw,60px); max-width: 18ch; margin: 18px auto 0; text-wrap: balance; }
.about-hero p { color: var(--night-ink-2); font-size: clamp(16px,1.6vw,19px); max-width: 56ch; margin: 22px auto 0; }
.about-hero .eyebrow { justify-content: center; color: color-mix(in srgb, var(--primary) 55%, #fff); }
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.stats-band .stat { background: var(--surface); padding: 30px 24px; text-align: center; }
.stats-band .stat b { display: block; font-family: var(--font-display); font-size: clamp(32px,4vw,46px); color: var(--primary); letter-spacing: -.03em; }
.stats-band .stat span { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3); letter-spacing: .04em; margin-top: 6px; display: block; }
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.value-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; }
.value-card .vi { width: 46px; height: 46px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-700); display: grid; place-items: center; margin-bottom: 18px; }
.value-card .vi svg { width: 23px; height: 23px; }
.value-card h3 { font-size: 19px; margin-bottom: 10px; }
.value-card p { color: var(--ink-3); font-size: 14.5px; line-height: 1.6; }

/* ---- Inner-page responsive ---- */
@media (max-width: 1040px) {
  .with-side { grid-template-columns: 1fr; }
  .side { position: static; flex-direction: row; flex-wrap: wrap; gap: 18px; }
  .side-group { flex: 1; min-width: 200px; }
  .side-cta { display: none; }
  .proj-layout { grid-template-columns: 1fr; }
  .dl-side { position: static; }
  .article-grid { grid-template-columns: 1fr; }
  .toc { display: none; }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .value-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .results-grid { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: 1fr; }
  .stats-band { grid-template-columns: 1fr 1fr; }
}

/* dark-mode inner tweaks */
body.theme-dark .page-head, body.theme-dark .gallery, body.theme-dark .dl-card,
body.theme-dark .toolbar-search, body.theme-dark .sort select, body.theme-dark .fchip,
body.theme-dark .tech-pill, body.theme-dark .author-card, body.theme-dark .value-card,
body.theme-dark .pagination a, body.theme-dark .pagination span { background: var(--surface); }
body.theme-dark .stats-band .stat { background: var(--surface); }

/* ============================================================ Contact form + cards */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 3vw, 34px); box-shadow: var(--shadow-sm); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.field input, .field textarea, .field select {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; outline: none;
  transition: border-color .15s, background .15s; width: 100%;
}
.field textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); background: var(--surface); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.form-card .btn { margin-top: 4px; }
.form-note { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); margin-top: 14px; }

.contact-aside { display: flex; flex-direction: column; gap: 14px; }
.contact-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; }
.contact-item .ci { width: 42px; height: 42px; border-radius: 11px; background: var(--primary-soft); color: var(--primary-700); display: grid; place-items: center; flex-shrink: 0; }
.contact-item .ci svg { width: 20px; height: 20px; }
.contact-item b { display: block; font-family: var(--font-display); font-size: 15px; font-weight: 600; }
.contact-item p { color: var(--ink-3); font-size: 13.5px; margin-top: 4px; line-height: 1.5; }
.contact-item a { color: var(--primary); font-weight: 600; }

/* FAQ (reused on contact + capstone) */
.faq { display: grid; gap: 12px; max-width: 800px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 4px 20px; transition: border-color .15s; }
.faq details[open] { border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.faq summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; font-family: var(--font-display); font-size: 16.5px; font-weight: 600; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm { width: 24px; height: 24px; flex-shrink: 0; border-radius: 7px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-3); transition: .2s; }
.faq details[open] summary .pm { transform: rotate(45deg); background: var(--primary); border-color: var(--primary); color: #fff; }
.faq details > p { color: var(--ink-2); font-size: 15px; line-height: 1.65; padding: 0 0 18px; max-width: 64ch; }

body.theme-dark .form-card, body.theme-dark .field input, body.theme-dark .field textarea,
body.theme-dark .field select, body.theme-dark .contact-item, body.theme-dark .faq details { background: var(--surface); }

@media (max-width: 860px) {
  .form-grid { grid-template-columns: 1fr; }
}
