/* =========================================================
   ashutosh-vijay.dev — Portfolio Design System v2
   Single source of truth. No duplication.
   ========================================================= */

/* ── Variables ─────────────────────────────────────────── */
:root {
  --bg:          #0a0a0a;
  --bg-card:     #111111;
  --border:      #1e2433;
  --border-dim:  #131820;
  --accent:      #3b82f6;
  --accent-dim:  rgba(59, 130, 246, 0.12);
  --text:        #e2e8f0;
  --text-muted:  #64748b;
  --text-dim:    #6b7280;
  --font-sans:   'Inter', system-ui, sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', monospace;
  --max-w:       1120px;
  --r:           6px;
  --nav-h:       52px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
html::-webkit-scrollbar { width: 5px; }
html::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ═══ CRT OVERLAYS ═══════════════════════════════
   Horizontal scan lines, rolling band, vignette, noise.
   All tinted with v1's blue accent (not cyan/hacker-green).
   pointer-events: none on all so they never block interaction. */

/* 1) Horizontal scan lines — ultra subtle blue tint */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 997;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(59, 130, 246, 0.03) 2px,
    rgba(59, 130, 246, 0.03) 3px
  );
}

/* 2) Rolling bright band — slow sweep top → bottom */
body::after {
  content: '';
  position: fixed;
  left: 0; right: 0;
  height: 180px;
  top: -180px;
  pointer-events: none;
  z-index: 998;
  background: linear-gradient(
    to bottom,
    transparent 0,
    rgba(59, 130, 246, 0.02) 40%,
    rgba(59, 130, 246, 0.055) 50%,
    rgba(59, 130, 246, 0.02) 60%,
    transparent 100%
  );
  animation: crt-roll 9s linear infinite;
}
@keyframes crt-roll { 0% { top: -200px; } 100% { top: 110vh; } }

/* 3) Corner vignette — darkens edges slightly, adds depth */
html::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 996;
  background: radial-gradient(ellipse at center, transparent 58%, rgba(0, 0, 0, 0.4) 100%);
}

/* 4) Fine grain noise — blended so it never muddies text */
html::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.025;
  mix-blend-mode: overlay;
}

a { color: inherit; text-decoration: none; }
img { height: auto; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; }
code { font-family: var(--font-mono); }

/* ── Accessibility ─────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  border-radius: var(--r);
  z-index: 9999;
}
.skip-link:focus { top: 8px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── Spotlight ─────────────────────────────────────────── */
#spotlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(
    700px circle at var(--mx, 50%) var(--my, 50%),
    rgba(59, 130, 246, 0.045),
    transparent 60%
  );
}

/* ── Keyframes ─────────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes gradient-border {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}
@keyframes blink-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}
@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
@keyframes scan {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(110%); }
}

/* ── Scroll Reveal ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }

/* ── Layout ────────────────────────────────────────────── */
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.two-col > * { min-width: 0; }

/* ── Separator ─────────────────────────────────────────── */
.sep {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 25%, var(--border) 75%, transparent);
}

/* ── Section Label ─────────────────────────────────────── */
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.scan-track {
  display: inline-block;
  width: 80px;
  height: 1px;
  background: var(--border-dim);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.scan-track::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  animation: scan 2.2s linear infinite;
}

/* ── Top Nav ───────────────────────────────────────────── */
#top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-dim);
  height: var(--nav-h);
  display: flex;
  align-items: center;
}
#top-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav-brand {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-brand-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink-dot 3s ease infinite;
}
.nav-brand b { color: #fff; font-weight: 500; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-section-link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  padding: 5px 11px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  transition: color 0.2s, background 0.2s;
}
.nav-section-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-section-link.active { color: var(--accent); }

.nav-divider {
  width: 1px;
  height: 16px;
  background: var(--border);
  margin: 0 8px;
  flex-shrink: 0;
}
.nav-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 5px;
  color: var(--text-dim);
  transition: color 0.2s, background 0.2s;
}
.nav-icon-link svg { width: 15px; height: 15px; }
.nav-icon-link:hover { color: var(--text); background: rgba(255,255,255,0.06); }

/* ── Buttons ───────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border: 1px solid var(--accent);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-dim);
  transition: background 0.2s;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary:hover { background: rgba(59, 130, 246, 0.22); }
.btn-primary svg { width: 14px; height: 14px; flex-shrink: 0; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.02);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  cursor: pointer;
  white-space: nowrap;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.btn-ghost svg { width: 14px; height: 14px; flex-shrink: 0; }

.btn-sm { padding: 6px 13px; font-size: 11px; }

/* ── Badges ────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}
.badge-live {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: #22c55e;
}
.badge-archived {
  background: rgba(100, 116, 139, 0.1);
  border: 1px solid rgba(100, 116, 139, 0.2);
  color: var(--text-muted);
}
.badge-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.badge-live .badge-dot { animation: blink-dot 2s ease infinite; }

/* ── Tech Tags ─────────────────────────────────────────── */
.tech-row { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  flex-shrink: 0;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.015);
  letter-spacing: 0.02em;
}

/* ── Cards ─────────────────────────────────────────────── */
.bc {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 7px;
  padding: 20px;
  transition: border-color 0.2s;
  position: relative;
  min-width: 0;
}
.bc::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,0.35), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}
.bc:hover { border-color: var(--border); }
.bc:hover::before { opacity: 1; }

.bc-glass {
  background: rgba(59, 130, 246, 0.035);
  border-color: rgba(59, 130, 246, 0.14);
}
.bc-glass:hover { border-color: rgba(59, 130, 246, 0.28); }
.bc-glass::before {
  background: linear-gradient(90deg, transparent, rgba(59,130,246,0.55), transparent);
  opacity: 0.6;
}

.bc-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.bc-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}
.bc-body {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.65;
}
.bc-body code {
  font-size: 11.5px;
  color: var(--accent);
  background: rgba(59,130,246,0.08);
  padding: 1px 4px;
  border-radius: 3px;
}

.bc-stat { text-align: center; padding: 18px; }
.bc-stat .n {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
}
.bc-stat .l { font-size: 11px; color: var(--text-muted); }

/* ── Bento ─────────────────────────────────────────────── */
.bento   { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bento-2 { grid-template-columns: repeat(2, 1fr); }
.bento-4 { grid-template-columns: repeat(4, 1fr); }
.bc-span2 { grid-column: span 2; }

/* ── Screenshot Frames ─────────────────────────────────── */
.frame {
  position: relative;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0c0e12;
}
.frame::before {
  content: '';
  display: block;
  height: 30px;
  background: #101318;
  border-bottom: 1px solid var(--border-dim);
}
.frame::after {
  content: '';
  position: absolute;
  top: 9px; left: 12px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #2d3748;
  box-shadow: 14px 0 0 #2d3748, 28px 0 0 #2d3748;
}
.frame img { width: 100%; display: block; }

.frame-hero {
  position: relative;
  border-radius: 11px;
  padding: 1.5px;
  background: linear-gradient(135deg,
    rgba(59,130,246,0.7) 0%,
    rgba(59,130,246,0.05) 40%,
    rgba(59,130,246,0.7) 100%
  );
  background-size: 300% 300%;
  animation: gradient-border 5s ease infinite;
}
.frame-hero-inner {
  border-radius: 10px;
  overflow: hidden;
  background: #0c0e12;
  position: relative;
}
.frame-hero-inner::before {
  content: '';
  display: block;
  height: 30px;
  background: #101318;
  border-bottom: 1px solid var(--border-dim);
}
.frame-hero-inner::after {
  content: '';
  position: absolute;
  top: 10px; left: 12px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #2d3748;
  box-shadow: 14px 0 0 #2d3748, 28px 0 0 #2d3748;
}
.frame-hero-inner img { width: 100%; display: block; }

.ss-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ss-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

/* ── Architecture Diagram ──────────────────────────────── */
.arch-wrap {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #060a0f;
  padding: 6px;
  margin-bottom: 60px;
}
.arch-wrap img { width: 100%; display: block; border-radius: 4px; }

/* ── Sheen (glass wipe across screenshots) ──────────────
   Injected by script.js as <span class="sheen"> into every
   .frame, .frame-hero-inner, and .arch-wrap. Diagonal band
   sweeps across on a long loop — subtle, not disco. */
.sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
  z-index: 3;
  mix-blend-mode: screen;
}
.sheen::before {
  content: '';
  position: absolute;
  inset: 0;
  /* Wide diagonal shimmer band. Slides via background-position —
     same pattern as Tailwind's shimmer util. */
  background-image: linear-gradient(
    110deg,
    transparent 35%,
    rgba(147, 197, 253, 0.06) 47%,
    rgba(191, 219, 254, 0.13) 50%,
    rgba(147, 197, 253, 0.06) 53%,
    transparent 65%
  );
  background-size: 220% 100%;
  background-repeat: no-repeat;
  /* Duration + delay are overridden per-element in script.js so frames
     drift out of sync with each other. */
  animation: shimmer 6s ease-in-out infinite;
}
@keyframes shimmer {
  0%   { background-position: 220% 0; }
  100% { background-position: -120% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sheen::before { animation: none; opacity: 0; }
}

/* ── Prose ─────────────────────────────────────────────── */
.prose p {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}
.prose p:last-child { margin-bottom: 0; }
.prose code { font-size: 13px; color: var(--accent); }
.prose strong { color: var(--text); font-weight: 500; }

/* ── Flow Steps ────────────────────────────────────────── */
.flow { display: flex; flex-direction: column; }
.flow-step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-dim);
}
.flow-step:last-child { border-bottom: none; }
.flow-num {
  width: 26px; height: 26px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}
.flow-title { font-size: 13.5px; font-weight: 500; color: var(--text); margin-bottom: 3px; }
.flow-desc  { font-size: 12.5px; color: var(--text-muted); line-height: 1.65; }
.flow-desc code { font-size: 11.5px; color: var(--accent); }

/* ── Code Blocks ───────────────────────────────────────── */
.code-wrap { margin-bottom: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.code-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: #0f1117;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 7px 14px;
}
.code-wrap pre[class*="language-"] {
  margin: 0 !important;
  border-radius: 0 0 6px 6px !important;
  border: 1px solid var(--border) !important;
  background: #0a0d12 !important;
  font-size: 12.5px !important;
  font-family: var(--font-mono) !important;
  tab-size: 2;
}
.token.comment    { color: #374151 !important; }
.token.string     { color: #86efac !important; }
.token.number     { color: #fbbf24 !important; }
.token.keyword    { color: #93c5fd !important; }
.token.function   { color: #e2e8f0 !important; }
.token.class-name { color: #67e8f9 !important; }
.token.decorator  { color: #a78bfa !important; }

/* ── Pipeline ──────────────────────────────────────────── */
.pipeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-dim);
  border: 1px solid var(--border-dim);
  border-radius: 7px;
  overflow: hidden;
  margin-bottom: 52px;
}
.pipeline-step { background: var(--bg-card); padding: 20px; }
.pipeline-step-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  margin-bottom: 8px;
}
.pipeline-step-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 7px; }
.pipeline-step-desc  { font-size: 12px; color: var(--text-muted); line-height: 1.65; }
.pipeline-step-desc code { font-size: 11px; color: var(--accent); }

/* ── Encryption Diagram ────────────────────────────────── */
.enc-diagram {
  background: #0a0d12;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 2.1;
  color: var(--text-muted);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.enc-diagram > div { white-space: nowrap; }
.enc-diagram .clr-key    { color: #22c55e; }
.enc-diagram .clr-server { color: #f87171; }
.enc-diagram .clr-client { color: var(--accent); }
.enc-diagram .clr-dim    { color: var(--text-dim); }
.enc-diagram .enc-head {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 6px;
}

/* ── Tier Table ────────────────────────────────────────── */
.tier-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 14px; }
.tier-table th {
  text-align: left;
  padding: 7px 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.tier-table td {
  padding: 10px 14px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-dim);
  vertical-align: top;
}
.tier-table tr:last-child td { border-bottom: none; }
.tier-table td:first-child { font-family: var(--font-mono); font-size: 11.5px; }
.tier-table .y { color: var(--accent); }

/* ── Landing ───────────────────────────────────────────── */
#landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-h);
}
#landing::after {
  content: '';
  position: absolute;
  top: 30%; left: -10%;
  width: 70%; height: 60%;
  background: radial-gradient(ellipse, rgba(59,130,246,0.07) 0%, transparent 65%);
  pointer-events: none;
}
.landing-inner {
  position: relative;
  z-index: 3;
  padding: 0 32px;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}
.landing-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 28px;
  opacity: 0;
  animation: fade-up 0.55s ease 0.15s forwards;
}
.landing-name {
  font-size: clamp(52px, 8.5vw, 104px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: #fff;
  margin-bottom: 20px;
  opacity: 0;
  animation: fade-up 0.55s ease 0.35s forwards;
}
.landing-name .dim { color: #475569; }
.landing-role {
  font-size: clamp(16px, 2.2vw, 22px);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 20px;
  opacity: 0;
  animation: fade-up 0.55s ease 0.55s forwards;
}
.landing-line {
  font-size: clamp(14px, 1.6vw, 16px);
  color: #475569;
  max-width: 540px;
  line-height: 1.75;
  margin-bottom: 44px;
  opacity: 0;
  animation: fade-up 0.55s ease 0.72s forwards;
}
.landing-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fade-up 0.55s ease 0.88s forwards;
}
.project-count-row {
  position: absolute;
  bottom: 44px; right: 32px;
  display: flex;
  gap: 28px;
  z-index: 3;
  opacity: 0;
  animation: fade-up 0.55s ease 1.1s forwards;
}
.pcount-item {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color 0.2s;
}
.pcount-item:hover { color: var(--accent); }
.pcount-item span {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #1e2a3a;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
  transition: color 0.2s;
}
.pcount-item:hover span { color: var(--accent); }

.scroll-hint {
  position: absolute;
  bottom: 44px; left: 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  z-index: 3;
  opacity: 0;
  animation: fade-up 0.55s ease 1.1s forwards;
}
.scroll-hint-line {
  width: 36px; height: 1px;
  background: var(--text-dim);
  position: relative;
  overflow: hidden;
}
.scroll-hint-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  animation: shimmer 2.2s ease infinite;
}

/* ── About ─────────────────────────────────────────────── */
#about { padding: 100px 0 80px; }

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 48px;
}

/* ── Project Sections ──────────────────────────────────── */
.proj { position: relative; padding: 0 0 120px; }

.proj-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-dim);
  padding: 11px 0;
  margin-bottom: 80px;
}
.proj-sticky-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.proj-sticky-name {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.proj-sticky-name b { color: #fff; font-weight: 500; margin-left: 2px; }
.proj-sticky-num { color: var(--accent); margin-right: 8px; }
.proj-sticky-right { display: flex; align-items: center; gap: 12px; }

.proj-header { margin-bottom: 52px; }
.proj-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.proj-name {
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 18px;
  line-height: 1.05;
}
.proj-tagline {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 620px;
  line-height: 1.75;
  margin-bottom: 32px;
}
.proj-links { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Footer ────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border-dim);
  padding: 44px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-domain {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}
.footer-links { display: flex; gap: 20px; }
.footer-link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.footer-link:hover { color: var(--accent); }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 900px) {
  .project-count-row { display: none; }
  .two-col { grid-template-columns: 1fr; gap: 36px; }
  .bento   { grid-template-columns: 1fr 1fr; }
  .bc-span2 { grid-column: span 2; }
  .pipeline { grid-template-columns: 1fr; }
  .ss-grid-3 { grid-template-columns: 1fr 1fr; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .nav-section-link { display: none; }
  .nav-divider:first-of-type { display: none; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 20px; }
  .bento   { grid-template-columns: 1fr; }
  .bc-span2 { grid-column: span 1; }
  .bento-2 { grid-template-columns: 1fr; }
  .ss-grid-2 { grid-template-columns: 1fr; }
  .ss-grid-3 { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 16px; align-items: flex-start; }
  .scroll-hint { display: none; }
  .landing-inner { padding: 0 20px; }
  .proj-name { font-size: clamp(32px, 10vw, 48px); }
  .proj-sticky-right { gap: 6px; }
  .proj-sticky-right .btn-ghost.btn-sm,
  .proj-sticky-right .btn-primary.btn-sm { padding: 4px 9px; font-size: 10px; }
  /* ── Mobile: compact thumbnail strips for screenshots ──
     Each screenshot becomes a ~100px-tall thumbnail. Tap → lightbox.
     Replaces the "wall of giant screenshots" problem. */
  .frame, .frame-hero-inner {
    overflow: hidden;
    height: 100px;
  }
  .frame img,
  .frame-hero-inner img {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    object-fit: cover;
    object-position: top left;
  }
  /* Drop the macOS chrome bar to reclaim vertical space */
  .frame::before, .frame::after,
  .frame-hero-inner::before, .frame-hero-inner::after {
    display: none;
  }
  /* Sheen is a desktop-only flourish — off on tiny thumbnails */
  .sheen { display: none; }
  .frame-hero { padding: 1px; }

  /* Grids become horizontal snap-scroll strips */
  .ss-grid-2, .ss-grid-3 {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }
  .ss-grid-2 > .frame, .ss-grid-3 > .frame {
    flex: 0 0 160px;
    scroll-snap-align: start;
  }

  /* Tap affordance — subtle hint every screenshot is tappable */
  .frame, .frame-hero-inner { position: relative; }
  .frame::before, .frame-hero-inner::before {
    content: '⤢' !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 6px; right: 6px;
    width: 22px; height: 22px;
    border-radius: 4px;
    background: rgba(10, 14, 20, 0.75);
    color: var(--accent);
    font-size: 11px;
    font-family: var(--font-mono);
    pointer-events: none;
    z-index: 2;
    border: 1px solid rgba(59, 130, 246, 0.3);
  }

  /* Architecture diagram — proportional scaling is fine (it's nearly square) */
  .arch-wrap { overflow: hidden; }
  /* Right-fade on code blocks to signal horizontal scroll */
  .code-wrap { position: relative; }
  .code-wrap::after {
    content: '';
    position: absolute;
    top: 32px; right: 0; bottom: 0;
    width: 36px;
    background: linear-gradient(to right, transparent, var(--bg-card));
    pointer-events: none;
    border-radius: 0 0 6px 0;
  }
}

/* ── Image Lightbox ────────────────────────────────────── */
/* Tap-to-expand pattern. Click any screenshot → opens fullscreen overlay.
   Native browser pinch-zoom works inside. Click/ESC to close. */
.frame img, .frame-hero-inner img, .arch-wrap img {
  cursor: zoom-in;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(6, 8, 12, 0.94);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
  animation: lightbox-in 0.22s ease-out;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  background: rgba(20, 24, 32, 0.85);
  color: var(--text);
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}
.lightbox-close:hover { border-color: var(--accent); background: rgba(59, 130, 246, 0.12); }
.lightbox-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  pointer-events: none;
}
@keyframes lightbox-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
body.lightbox-open { overflow: hidden; }

/* ── Reduced Motion ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .landing-eyebrow, .landing-name, .landing-role,
  .landing-line, .landing-ctas,
  .project-count-row, .scroll-hint { opacity: 1; }
  /* Hide the rolling band entirely rather than freeze it at top */
  body::after { display: none; }
}
