/* ═══════════════════════════════════════════════════════════════
   Api.TM Portfolio — styles.css  v6.0.0
   Dark engineering aesthetic. JetBrains Mono + Inter.
   ═══════════════════════════════════════════════════════════════ */

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

:root {
  --bg:             #060607;
  --bg-1:           #0c0e10;
  --bg-2:           #111416;
  --bg-3:           #181b1e;
  --bg-4:           #1f2326;
  --border:         rgba(100,217,255,0.1);
  --border-mid:     rgba(100,217,255,0.25);
  --border-bright:  rgba(100,217,255,0.45);
  --accent:         #64d9ff;
  --accent-dim:     #4ab5d9;
  --accent-glow:    rgba(100,217,255,0.12);
  --green:          #72d18b;
  --amber:          #f0b429;
  --red:            #ff5f57;
  --yellow:         #febc2e;
  --purple:         #a78bfa;
  --text:           #e6e2dc;
  --text-dim:       #b0aba3;
  --text-muted:     #686460;
  --font-sans:  'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', 'Cascadia Code', ui-monospace, monospace;
  --section-py:  clamp(5rem, 10vw, 9rem);
  --inner-max:   1200px;
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:    cubic-bezier(0, 0, 0.2, 1);
  --t-fast:      0.15s;
  --t-base:      0.22s;
  --t-slow:      0.4s;
}

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Skip Link ─────────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -100%; left: 1rem;
  padding: 0.5rem 1rem; background: var(--accent); color: var(--bg);
  font-weight: 700; border-radius: 0 0 4px 4px; z-index: 9999; transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── Utilities ─────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.75rem;
}
.mono-tag {
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted);
  background: var(--bg-2); border: 1px solid var(--border);
  padding: 0.2rem 0.55rem; border-radius: var(--radius-sm);
}
.section-heading { max-width: 700px; margin-bottom: 3.5rem; }
.section-heading.centered { text-align: center; margin-left: auto; margin-right: auto; }
.section-heading h2 {
  font-size: clamp(1.65rem, 3.5vw, 2.4rem); font-weight: 700;
  line-height: 1.2; color: var(--text); letter-spacing: -0.02em;
}
.section-sub { margin-top: 0.75rem; color: var(--text-dim); font-size: 1.05rem; line-height: 1.7; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.7rem 1.4rem; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 600; letter-spacing: 0.02em;
  cursor: pointer; border: 1.5px solid transparent;
  transition: all var(--t-base) var(--ease); white-space: nowrap; line-height: 1;
}
.btn-primary { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.btn-primary:hover {
  background: #82e6ff; border-color: #82e6ff;
  transform: translateY(-1px); box-shadow: 0 8px 24px rgba(100,217,255,0.28);
}
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border-mid); }
.btn-secondary:hover {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-glow); transform: translateY(-1px);
}
.btn-ghost { background: transparent; color: var(--text-dim); border-color: var(--border); font-size: 0.8rem; }
.btn-ghost:hover { color: var(--accent); border-color: var(--border-mid); background: var(--bg-2); }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.78rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── Header ────────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(6,6,7,0.82);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  transition: border-color var(--t-base), background var(--t-base);
}
.site-header.scrolled { background: rgba(6,6,7,0.97); border-color: var(--border-mid); }
.header-inner {
  max-width: var(--inner-max); margin: 0 auto; padding: 0 1.5rem;
  height: 4.25rem; display: flex; align-items: center; gap: 1.5rem;
}
.brand-lockup { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.brand-mark-wrap { position: relative; width: 2rem; height: 2rem; }
.brand-mark { width: 2rem; height: 2rem; border-radius: var(--radius-sm); object-fit: contain; }
.brand-pulse {
  position: absolute; inset: -3px; border-radius: 8px;
  border: 1.5px solid var(--accent); opacity: 0;
  animation: pulse-ring 3s ease-in-out infinite;
}
@keyframes pulse-ring {
  0%, 100% { opacity: 0; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(1.12); }
}
.brand-name { font-weight: 800; font-size: 1.1rem; letter-spacing: -0.03em; }
.brand-dot { color: var(--accent); }
.nav-links { display: flex; gap: 0.15rem; margin-left: auto; }
.nav-link {
  padding: 0.38rem 0.65rem; font-size: 0.81rem; font-weight: 500;
  color: var(--text-dim); border-radius: 5px;
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-link:hover { color: var(--text); background: var(--bg-3); }
.nav-link.active { color: var(--accent) !important; background: rgba(100,217,255,0.08); }
.header-actions { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.nav-toggle {
  display: none; flex-direction: column; gap: 4px;
  background: none; border: none; cursor: pointer; padding: 6px; border-radius: var(--radius-sm);
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--text);
  border-radius: 2px; transition: all 0.25s var(--ease);
}

/* ── Mobile Nav ────────────────────────────────────────────── */
.mobile-nav {
  position: fixed; top: 4.25rem; left: 0; right: 0;
  background: var(--bg-1); border-bottom: 1px solid var(--border);
  z-index: 199; max-height: 0; overflow: hidden;
  transition: max-height 0.3s var(--ease);
}
.mobile-nav.open { max-height: 420px; }
.mobile-nav nav { display: flex; flex-direction: column; padding: 1rem 1.5rem 1.25rem; gap: 0; }
.mobile-nav nav a {
  padding: 0.7rem 0; color: var(--text-dim); font-size: 0.95rem; font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: color var(--t-fast), padding-left var(--t-fast);
}
.mobile-nav nav a:last-child { border-bottom: none; }
.mobile-nav nav a:hover { color: var(--accent); padding-left: 0.35rem; }

/* ── Sections ──────────────────────────────────────────────── */
.section { padding: var(--section-py) 0; border-top: 1px solid var(--border); }
.section-inner { max-width: var(--inner-max); margin: 0 auto; padding: 0 1.5rem; }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100vh; display: flex;
  align-items: center; overflow: hidden; padding-top: 4.25rem;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(100,217,255,0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100,217,255,0.032) 1px, transparent 1px);
  background-size: 64px 64px;
}
.hero-glow {
  position: absolute; top: -10%; right: -5%; width: 55vw; height: 80vh;
  background: radial-gradient(ellipse at center, rgba(100,217,255,0.055) 0%, transparent 65%);
  pointer-events: none;
}
.hero-glow-purple {
  position: absolute; bottom: 10%; left: -10%; width: 40vw; height: 50vh;
  background: radial-gradient(ellipse at center, rgba(167,139,250,0.04) 0%, transparent 70%);
  pointer-events: none;
}
.hero-particles {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; opacity: 0.28;
}
.hero-inner {
  position: relative; z-index: 1; max-width: var(--inner-max);
  margin: 0 auto; padding: 4rem 1.5rem;
  display: grid; grid-template-columns: 1fr 340px;
  gap: 4rem; align-items: start; width: 100%;
}
.terminal-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--bg-2); border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm); padding: 0.35rem 0.8rem;
  margin-bottom: 1.5rem; font-family: var(--font-mono);
  font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.04em;
}
.terminal-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.terminal-dot.red    { background: var(--red); }
.terminal-dot.yellow { background: var(--yellow); }
.terminal-dot.green  { background: var(--green); }
.hero-title {
  font-size: clamp(3.5rem, 9vw, 7rem); font-weight: 900;
  letter-spacing: -0.05em; line-height: 1; margin: 0.2rem 0 1.5rem;
}
.title-dot { color: var(--accent); }
.hero-copy {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem); color: var(--text-dim);
  max-width: 540px; line-height: 1.75; margin-bottom: 2rem;
}
.credential-strip { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2.25rem; }
.credential-strip span {
  display: flex; align-items: center; gap: 0.4rem;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 20px; padding: 0.28rem 0.72rem;
  font-size: 0.76rem; color: var(--text-dim); font-weight: 500;
  transition: border-color var(--t-base), color var(--t-base), background var(--t-base);
}
.credential-strip span:hover { border-color: var(--border-bright); color: var(--text); background: var(--bg-3); }
.chip-code { font-family: var(--font-mono); color: var(--accent); font-size: 0.8em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }

/* Availability badge */
.avail-badge {
  display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1.75rem;
  padding: 0.42rem 1rem; border-radius: 999px;
  background: rgba(114,209,139,0.08); border: 1px solid rgba(114,209,139,0.22);
  font-size: 0.79rem; font-family: var(--font-mono); color: var(--green); letter-spacing: 0.02em;
}
.avail-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  animation: pulse-avail 2s ease-in-out infinite; flex-shrink: 0;
}
@keyframes pulse-avail {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(114,209,139,0.5); }
  50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(114,209,139,0); }
}

/* Dossier Panel */
.dossier-panel {
  background: var(--bg-1); border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg); padding: 1.5rem;
  position: sticky; top: 5.5rem; box-shadow: 0 4px 28px rgba(0,0,0,0.35);
}
.dossier-top {
  display: flex; gap: 1rem; align-items: center;
  margin-bottom: 1.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border);
}
.dossier-avatar-wrap { width: 52px; height: 52px; flex-shrink: 0; position: relative; }
.dossier-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.dossier-avatar-fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: var(--bg-3); border-radius: 50%; border: 2px solid var(--accent);
  font-family: var(--font-mono); font-weight: 700; font-size: 0.85rem; color: var(--accent);
}
.dossier-id { display: flex; flex-direction: column; gap: 0.18rem; }
.dossier-id strong { font-size: 0.98rem; font-weight: 700; color: var(--text); }
.dossier-id span { font-size: 0.78rem; color: var(--text-muted); }
.dossier-status { display: flex; align-items: center; gap: 0.35rem; font-size: 0.72rem !important; color: var(--green) !important; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex-shrink: 0; animation: pulse-avail 2s ease-in-out infinite; }
.dossier-list { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 1.5rem; }
.dossier-list > div { display: grid; gap: 0.2rem; }
.dossier-list dt { font-size: 0.7rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); }
.dossier-list dd { font-size: 0.82rem; color: var(--text-dim); line-height: 1.55; }
.dossier-footer { display: flex; gap: 0.5rem; flex-wrap: wrap; padding-top: 1rem; border-top: 1px solid var(--border); }

/* ── Impact Metrics ─────────────────────────────────────────── */
.metric-rail { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.metric-card {
  background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 1.5rem 1.25rem; display: flex; flex-direction: column; gap: 0.4rem;
  transition: border-color var(--t-base), transform var(--t-base), box-shadow var(--t-base);
}
.metric-card:hover { border-color: var(--border-bright); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.metric-number { font-size: clamp(1.75rem, 3.5vw, 2.4rem); font-weight: 900; letter-spacing: -0.03em; color: var(--accent); line-height: 1; }
.metric-label { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }

/* ── Stack Section ──────────────────────────────────────────── */
.stack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; margin-bottom: 3rem; }
.stack-cat {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1.5rem;
  transition: border-color var(--t-base);
}
.stack-cat:hover { border-color: var(--border-mid); }
.stack-cat-title { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); margin-bottom: 1rem; }
.lang-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.lang-chip {
  font-family: var(--font-mono); font-size: 0.75rem; padding: 0.3rem 0.65rem;
  border-radius: 4px; border: 1px solid var(--border); background: var(--bg-2);
  color: var(--text-dim); cursor: default; position: relative;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.lang-chip:hover { border-color: var(--border-bright); color: var(--accent); background: var(--bg-3); }
.lang-chip.tier-1 { border-color: var(--border-mid); color: var(--accent); }
.lang-chip::after {
  content: attr(data-level) "%"; position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%) scale(0.88); background: var(--bg-4); color: var(--accent);
  font-family: var(--font-mono); font-size: 0.62rem; padding: 0.15rem 0.45rem;
  border-radius: 4px; border: 1px solid var(--border-mid); white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity var(--t-fast), transform var(--t-fast); z-index: 10;
}
.lang-chip:hover::after { opacity: 1; transform: translateX(-50%) scale(1); }
.stack-terminal { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.terminal-header { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1rem; background: var(--bg-2); border-bottom: 1px solid var(--border); }
.terminal-header-label { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-muted); margin-left: 0.5rem; }
.code-block { padding: 1.5rem; font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-dim); line-height: 1.7; overflow-x: auto; white-space: pre; min-height: 7rem; }

/* ── Architecture ───────────────────────────────────────────── */
.architecture-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.blueprint-panel {
  background: var(--bg-2); border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg); padding: 2rem; box-shadow: 0 2px 20px rgba(0,0,0,0.22);
}
.blueprint-header { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 1.75rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.card-kicker { font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); }
.blueprint-header strong { font-size: 1.1rem; font-weight: 700; color: var(--accent); letter-spacing: -0.01em; }
.system-map { display: flex; flex-direction: column; gap: 0.45rem; }
.system-node {
  display: grid; grid-template-columns: 4.5rem 1fr; column-gap: 0.75rem;
  align-items: center; padding: 0.7rem 0.9rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-1);
  transition: border-color var(--t-base), background var(--t-base);
}
.system-node:hover { border-color: var(--border-mid); background: var(--bg-3); }
.node-num { font-family: var(--font-mono); font-size: 0.62rem; color: var(--accent); grid-column: 1; grid-row: span 2; align-self: center; line-height: 1.4; white-space: pre-line; letter-spacing: 0.04em; }
.system-node strong { font-size: 0.86rem; font-weight: 600; grid-column: 2; grid-row: 1; display: block; color: var(--text); }
.system-node small { font-size: 0.72rem; color: var(--text-muted); grid-column: 2; grid-row: 2; display: block; line-height: 1.4; }
.system-arrow { text-align: center; color: var(--border-mid); font-size: 0.75rem; padding: 0.1rem; }
.principle-stack { display: flex; flex-direction: column; gap: 1rem; }
.principle-card {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1.35rem 1.5rem;
  transition: border-color var(--t-base), transform var(--t-base);
}
.principle-card:hover { border-color: var(--border-mid); transform: translateX(4px); }
.principle-icon { display: block; font-size: 1.15rem; margin-bottom: 0.55rem; }
.principle-card h3 { font-size: 0.92rem; font-weight: 700; margin-bottom: 0.35rem; color: var(--text); }
.principle-card p { font-size: 0.82rem; color: var(--text-dim); line-height: 1.6; }

/* ── Engineering Grid ──────────────────────────────────────── */
.engineering-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.eng-card {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1.75rem;
  transition: border-color var(--t-base), transform var(--t-base), box-shadow var(--t-base);
}
.eng-card:hover { border-color: var(--border-mid); transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.28); }
.eng-card-icon { font-size: 1.4rem; margin-bottom: 1rem; display: block; }
.eng-card h3 { font-size: 0.98rem; font-weight: 700; margin-bottom: 0.55rem; color: var(--text); }
.eng-card p { font-size: 0.84rem; color: var(--text-dim); line-height: 1.65; margin-bottom: 1rem; }
.eng-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.eng-tag { font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent); background: rgba(100,217,255,0.07); border: 1px solid var(--border); padding: 0.2rem 0.5rem; border-radius: 3px; }

/* ── Case Files ─────────────────────────────────────────────── */
.case-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.case-filter-btn {
  padding: 0.38rem 1rem; border-radius: 999px; border: 1.5px solid var(--border);
  background: transparent; color: var(--text-dim); font-size: 0.78rem; font-weight: 600;
  cursor: pointer; transition: all var(--t-fast) var(--ease); font-family: var(--font-sans);
}
.case-filter-btn:hover { border-color: var(--border-mid); color: var(--accent); background: var(--bg-2); }
.case-filter-btn.active { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.case-grid { display: grid; gap: 1.5rem; }
.case-featured { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.case-card {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1.75rem;
  transition: border-color var(--t-base), transform var(--t-base), box-shadow var(--t-base);
}
.case-card:hover { border-color: var(--border-mid); transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.28); }
.case-card.hidden { display: none; }
.case-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; margin-bottom: 1rem; }
.case-card-title { font-size: 0.98rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.case-badge { flex-shrink: 0; font-family: var(--font-mono); font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; padding: 0.2rem 0.55rem; border-radius: 3px; background: rgba(100,217,255,0.08); color: var(--accent); border: 1px solid var(--border); }
.case-badge.gov { background: rgba(240,180,41,0.1); color: var(--amber); border-color: rgba(240,180,41,0.2); }
.case-badge.ts  { background: rgba(167,139,250,0.1); color: var(--purple); border-color: rgba(167,139,250,0.2); }
.case-card p { font-size: 0.84rem; color: var(--text-dim); line-height: 1.65; margin-bottom: 1rem; }
.case-outcomes { display: flex; flex-direction: column; gap: 0.4rem; grid-column: 2; grid-row: 1 / span 2; }
.case-outcome { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.82rem; color: var(--text-dim); line-height: 1.5; }
.case-outcome::before { content: "→"; color: var(--accent); font-family: var(--font-mono); font-size: 0.75rem; flex-shrink: 0; margin-top: 0.1rem; }
.case-stack { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.case-tag { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-muted); background: var(--bg-2); border: 1px solid var(--border); padding: 0.15rem 0.45rem; border-radius: 3px; }

/* ── Proof / Testimonials ───────────────────────────────────── */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
.testimonial-card {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1.75rem;
  display: flex; flex-direction: column; gap: 1rem;
  transition: border-color var(--t-base), transform var(--t-base);
}
.testimonial-card:hover { border-color: var(--border-mid); transform: translateY(-2px); }
.testimonial-card blockquote { font-size: 0.9rem; color: var(--text-dim); line-height: 1.7; font-style: italic; flex: 1; }
.testimonial-card blockquote::before { content: '"'; font-size: 2rem; color: var(--accent); font-style: normal; line-height: 0; vertical-align: -0.55rem; margin-right: 0.15rem; opacity: 0.65; }
.testimonial-card footer { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 0.85rem; }

/* ── Contact ────────────────────────────────────────────────── */
.contact-layout { display: grid; grid-template-columns: 1fr 320px; gap: 3rem; align-items: start; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.field-group { display: flex; flex-direction: column; gap: 0.35rem; }
.field-group label { font-size: 0.76rem; font-weight: 600; color: var(--text-muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; }
.contact-form input,
.contact-form textarea {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.75rem 1rem;
  font-family: var(--font-sans); font-size: 0.9rem; color: var(--text); width: 100%;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  -webkit-user-select: text; user-select: text;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-muted); }
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(100,217,255,0.1); }
.contact-form textarea { resize: vertical; min-height: 130px; }
.form-status { font-size: 0.82rem; color: var(--green); min-height: 1.2em; }
.contact-sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-links h3 { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.75rem; }
.contact-link {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.72rem 0.9rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-1);
  margin-bottom: 0.5rem; font-size: 0.84rem; color: var(--text-dim);
  transition: border-color var(--t-base), color var(--t-base), background var(--t-base);
}
.contact-link:hover { border-color: var(--border-mid); color: var(--accent); background: rgba(100,217,255,0.04); }
.contact-link-icon { font-size: 1rem; flex-shrink: 0; }
.availability-card { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.25rem; }
.avail-indicator { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.65rem; }
.avail-indicator strong { font-size: 0.88rem; }
.availability-card p { font-size: 0.79rem; color: var(--text-dim); line-height: 1.6; }

/* ── Music Player ───────────────────────────────────────────── */
.spotify-card {
  margin-top: 1.5rem; padding: 1.1rem; background: var(--bg-1);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; box-sizing: border-box;
}
.spotify-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.72rem; font-family: var(--font-mono); color: var(--text-muted); margin-bottom: 0.85rem; letter-spacing: 0.04em; }
.spotify-icon { font-size: 0.95rem; }
.custom-player { overflow: hidden; }
.player-info { margin-bottom: 0.75rem; }
.player-title { font-size: 0.93rem; font-weight: 600; color: var(--text); }
.player-artist { font-size: 0.76rem; color: var(--text-muted); margin-top: 0.15rem; }
.player-controls { display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box; flex-wrap: nowrap; min-width: 0; }
.play-btn {
  background: var(--accent); border: none; border-radius: 50%;
  width: 34px; height: 34px; min-width: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #000; flex-shrink: 0;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.play-btn:hover { transform: scale(1.08); box-shadow: 0 4px 14px rgba(100,217,255,0.35); }
.player-timeline { display: flex; align-items: center; gap: 5px; flex: 1; min-width: 0; overflow: hidden; }
.time-current, .time-total { font-size: 0.66rem; color: var(--text-muted); white-space: nowrap; min-width: 26px; flex-shrink: 0; font-family: var(--font-mono); }
.progress-bar, .volume-bar { -webkit-appearance: none; appearance: none; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.12); outline: none; cursor: pointer; }
.progress-bar { flex: 1; min-width: 0; }
.progress-bar::-webkit-slider-thumb,
.volume-bar::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); cursor: pointer; transition: transform var(--t-fast); }
.progress-bar:hover::-webkit-slider-thumb,
.volume-bar:hover::-webkit-slider-thumb { transform: scale(1.3); }
.volume-wrap { display: flex; align-items: center; gap: 4px; flex-shrink: 0; color: var(--text-muted); }
.volume-bar { width: 48px; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-1); padding: 2.75rem 0; }
.footer-inner { max-width: var(--inner-max); margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; }
.footer-brand .brand-name { font-size: 0.95rem; }
.footer-brand p { font-size: 0.76rem; color: var(--text-muted); margin-top: 0.25rem; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { font-size: 0.8rem; color: var(--text-muted); transition: color var(--t-fast); }
.footer-links a:hover { color: var(--accent); }
.footer-copy { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── Timeline ───────────────────────────────────────────────── */
.timeline-section { border-top: 1px solid var(--border); }
.timeline { position: relative; padding-left: 2.5rem; }
.timeline::before { content: ""; position: absolute; left: 0.62rem; top: 0.3rem; bottom: 0.3rem; width: 2px; background: linear-gradient(to bottom, var(--border-mid), var(--border)); border-radius: 2px; }
.timeline-item { position: relative; padding-bottom: 2.75rem; display: flex; gap: 1.5rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker { position: absolute; left: -2rem; top: 0.35rem; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--border-mid); flex-shrink: 0; transition: border-color var(--t-base), background var(--t-base), box-shadow var(--t-base); }
.timeline-marker.active { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 14px rgba(100,217,255,0.45); }
.timeline-body { flex: 1; padding: 1.25rem 1.5rem; background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-md); transition: border-color var(--t-base); }
.timeline-body:hover { border-color: var(--border-mid); }
.timeline-meta { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.55rem; }
.timeline-date { font-family: var(--font-mono); font-size: 0.73rem; color: var(--text-muted); }
.timeline-tag { font-size: 0.67rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.15rem 0.5rem; border-radius: 3px; background: rgba(100,217,255,0.08); color: var(--accent); border: 1px solid var(--border); }
.timeline-tag.active { background: rgba(114,209,139,0.1); color: var(--green); border-color: rgba(114,209,139,0.25); }
.timeline-body h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.45rem; color: var(--text); }
.timeline-body p { color: var(--text-dim); font-size: 0.88rem; line-height: 1.65; margin-bottom: 0.65rem; }
.timeline-stack { font-family: var(--font-mono); font-size: 0.71rem; color: var(--text-muted); margin-top: 0.4rem; }

/* ── Theme Toggle ───────────────────────────────────────────── */
.theme-toggle { font-size: 0.88rem; padding: 0.38rem 0.52rem; line-height: 1; cursor: pointer; }
.theme-icon { pointer-events: none; }

/* ── Typing cursor ──────────────────────────────────────────── */
#hero-typed::after { content: "▋"; animation: blink-cursor 0.75s step-end infinite; color: var(--accent); margin-left: 1px; }
#hero-typed.typing-done::after { display: none; }
@keyframes blink-cursor { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── Focus Visible ──────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
:focus:not(:focus-visible) { outline: none; }

/* ── Print ──────────────────────────────────────────────────── */
@media print {
  .site-header, .mobile-nav, .nav-toggle, .hero-bg,
  .hero-actions, .header-actions, .site-footer { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .hero-title { font-size: 28pt; }
  a[href]::after { content: ' (' attr(href) ')'; font-size: 9pt; color: #555; }
  .section { padding: 1.5rem 0; }
  .metric-rail { grid-template-columns: repeat(3, 1fr); }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ── Scroll-reveal ──────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.hero .reveal { transition-delay: 0.1s; }
.metric-rail    .reveal:nth-child(1) { transition-delay: 0.05s; }
.metric-rail    .reveal:nth-child(2) { transition-delay: 0.10s; }
.metric-rail    .reveal:nth-child(3) { transition-delay: 0.15s; }
.metric-rail    .reveal:nth-child(4) { transition-delay: 0.20s; }
.metric-rail    .reveal:nth-child(5) { transition-delay: 0.25s; }
.metric-rail    .reveal:nth-child(6) { transition-delay: 0.30s; }
.stack-grid     .reveal:nth-child(1) { transition-delay: 0.05s; }
.stack-grid     .reveal:nth-child(2) { transition-delay: 0.10s; }
.stack-grid     .reveal:nth-child(3) { transition-delay: 0.15s; }
.stack-grid     .reveal:nth-child(4) { transition-delay: 0.20s; }
.stack-grid     .reveal:nth-child(5) { transition-delay: 0.25s; }
.stack-grid     .reveal:nth-child(6) { transition-delay: 0.30s; }
.testimonial-grid .reveal:nth-child(1) { transition-delay: 0.05s; }
.testimonial-grid .reveal:nth-child(2) { transition-delay: 0.12s; }
.testimonial-grid .reveal:nth-child(3) { transition-delay: 0.19s; }
.engineering-grid .reveal:nth-child(1) { transition-delay: 0.05s; }
.engineering-grid .reveal:nth-child(2) { transition-delay: 0.10s; }
.engineering-grid .reveal:nth-child(3) { transition-delay: 0.15s; }
.engineering-grid .reveal:nth-child(4) { transition-delay: 0.20s; }
.timeline .reveal:nth-child(1) { transition-delay: 0.05s; }
.timeline .reveal:nth-child(2) { transition-delay: 0.12s; }
.timeline .reveal:nth-child(3) { transition-delay: 0.19s; }
.timeline .reveal:nth-child(4) { transition-delay: 0.26s; }

/* ═══════════════════════════════════════════════════════════
   LIGHT THEME
   ═══════════════════════════════════════════════════════════ */
[data-theme="light"] {
  --bg:             #f5f3ef;
  --bg-1:           #edeae5;
  --bg-2:           #e5e2dc;
  --bg-3:           #dbd8d2;
  --bg-4:           #d2cfc8;
  --border:         rgba(0,0,0,0.09);
  --border-mid:     rgba(0,60,140,0.22);
  --border-bright:  rgba(0,60,140,0.45);
  --accent:         #0055cc;
  --accent-dim:     #003ea0;
  --accent-glow:    rgba(0,85,204,0.07);
  --text:           #111110;
  --text-dim:       #3c3a36;
  --text-muted:     #7a7570;
}
[data-theme="light"] body { background: var(--bg); color: var(--text); }
[data-theme="light"] .site-header { background: rgba(245,243,239,0.88); border-color: var(--border); }
[data-theme="light"] .hero-bg { display: none; }
[data-theme="light"] .hero { background: var(--bg-1); }
[data-theme="light"] .dossier-panel,
[data-theme="light"] .blueprint-panel,
[data-theme="light"] .principle-card,
[data-theme="light"] .eng-card,
[data-theme="light"] .case-card,
[data-theme="light"] .testimonial-card,
[data-theme="light"] .stack-terminal,
[data-theme="light"] .availability-card,
[data-theme="light"] .timeline-body,
[data-theme="light"] .spotify-card,
[data-theme="light"] .metric-card,
[data-theme="light"] .stack-cat,
[data-theme="light"] .contact-link,
[data-theme="light"] .system-node { background: #fff; border-color: rgba(0,0,0,0.09); color: var(--text); }
[data-theme="light"] .metric-number { color: var(--accent); }
[data-theme="light"] .lang-chip { background: #eef3ff; color: #003888; border-color: rgba(0,85,204,0.2); }
[data-theme="light"] .lang-chip.tier-1 { background: #dce8ff; border-color: rgba(0,85,204,0.4); }
[data-theme="light"] .terminal-header { background: #e2dfda; }
[data-theme="light"] .code-block { background: #f8f7f4; color: #222; }
[data-theme="light"] .mobile-nav { background: var(--bg-1); border-color: var(--border); }
[data-theme="light"] .btn-ghost { color: var(--text-dim); border-color: rgba(0,0,0,0.18); }
[data-theme="light"] .btn-ghost:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-glow); }
[data-theme="light"] .theme-icon::before { content: "\1F319"; }
[data-theme="light"] .theme-icon { font-style: normal; }
[data-theme="light"] .case-filter-btn { background: var(--bg-2); border-color: rgba(0,0,0,0.1); color: var(--text-dim); }
[data-theme="light"] .case-filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
[data-theme="light"] .timeline-marker { border-color: var(--accent); background: #fff; }
[data-theme="light"] .timeline-marker.active { background: var(--accent); }
[data-theme="light"] .avail-badge { background: rgba(0,85,204,0.07); border-color: rgba(0,85,204,0.18); }
[data-theme="light"] .site-footer { background: var(--bg-1); border-color: var(--border); }
[data-theme="light"] .progress-bar,
[data-theme="light"] .volume-bar { background: rgba(0,0,0,0.12); }
[data-theme="light"] .contact-form input,
[data-theme="light"] .contact-form textarea { background: #fff; border-color: rgba(0,0,0,0.15); color: var(--text); }
[data-theme="light"] .contact-form input:focus,
[data-theme="light"] .contact-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,85,204,0.1); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .hero-inner          { grid-template-columns: 1fr; gap: 2.5rem; }
  .dossier-panel       { position: static; }
  .architecture-layout { grid-template-columns: 1fr; }
  .contact-layout      { grid-template-columns: 1fr; }
  .case-featured       { grid-template-columns: 1fr; }
  .case-outcomes       { grid-column: 1; grid-row: auto; }
}
@media (max-width: 700px) {
  .nav-links           { display: none; }
  .nav-toggle          { display: flex; }
  .header-actions .btn-ghost { display: none; }
  .engineering-grid    { grid-template-columns: 1fr; }
  .footer-inner        { flex-direction: column; gap: 1.25rem; }
  .footer-links        { gap: 1rem; }
  .timeline            { padding-left: 1.75rem; }
  .timeline-marker     { left: -1.5rem; }
}
@media (max-width: 480px) {
  .case-filters        { gap: 0.35rem; }
  .case-filter-btn     { font-size: 0.73rem; padding: 0.32rem 0.7rem; }
  .timeline            { padding-left: 1.5rem; }
  .timeline-marker     { left: -1.25rem; width: 12px; height: 12px; }
  .avail-badge         { font-size: 0.72rem; }
  .spotify-card        { margin-top: 1rem; }
  .theme-toggle        { display: none; }
  .metric-rail         { grid-template-columns: repeat(2, 1fr); }
}

/* ── Class aliases (HTML uses form-group / contact-aside) ── */
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group label { font-size: 0.76rem; font-weight: 600; color: var(--text-muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; }
.contact-aside { display: flex; flex-direction: column; gap: 1.5rem; }
