/* ------------------------------------------------------------
   Nicholas Simmons | personal site
   Dark, one accent, telemetry-themed motion. Hand-written CSS.
   ------------------------------------------------------------ */

:root {
  --bg: #0a0e14;
  --bg-2: #0e131b;
  --surface: #121924;
  --surface-2: #182130;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #e8eef5;
  --muted: #98a6b7;
  --dim: #6b7a8c;
  --accent: #5eead4;
  --accent-2: #7dd3fc;
  --accent-ink: #062a26;
  --danger: #ff6b6b;
  --warn: #ff9f43;
  --ok: #4ade80;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Inter Tight", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --wrap: 1120px;
  --nav-h: 64px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}
p { margin: 0; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; }
kbd {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 1px 6px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
}

.wrap {
  width: min(var(--wrap), calc(100% - 48px));
  margin-inline: auto;
}
.accent { color: var(--accent); }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--accent); color: var(--accent-ink);
  padding: 8px 12px; border-radius: var(--radius-sm); z-index: 100;
}
.skip:focus { left: 8px; }

/* film grain */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 90;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(-1%, -1%); }
  100% { transform: translate(2%, 2%); }
}

/* ------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  font-weight: 600; font-size: 15px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  font-family: var(--font-body); white-space: nowrap;
  position: relative; overflow: hidden;
  transition: transform .2s var(--ease-out), background .15s ease, border-color .15s ease, color .15s ease;
  will-change: transform;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .6s ease;
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 16px; font-size: 14px; }

/* ------------------------------------------------------------ Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 14, 20, 0.72);
  border-bottom: 1px solid var(--line);
  transition: height .25s var(--ease-out);
}
.nav.scrolled { height: 54px; }
.progress {
  position: absolute; left: 0; top: 0; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: 0 50%;
  transform: scaleX(0);
}
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink); font-family: var(--font-head); font-weight: 800; font-size: 14px;
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a:not(.btn) {
  position: relative; text-decoration: none; color: var(--muted);
  font-size: 15px; font-weight: 500; transition: color .15s; padding: 4px 0;
}
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .25s var(--ease-out);
}
.nav-links a:not(.btn):hover, .nav-links a:not(.btn).active { color: var(--text); }
.nav-links a:not(.btn).active::after { transform: scaleX(1); }

.nav-toggle {
  display: none; background: none; border: 0; width: 40px; height: 40px; padding: 8px;
  cursor: pointer; flex-direction: column; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ------------------------------------------------------------ Hero: git history */
.hero { position: relative; padding: 96px 0 80px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(700px 420px at 12% 18%, rgba(94, 234, 212, 0.13), transparent 60%),
    radial-gradient(640px 460px at 88% 72%, rgba(125, 211, 252, 0.10), transparent 60%),
    radial-gradient(rgba(255, 255, 255, 0.10) 1px, transparent 1px);
  background-size: auto, auto, 26px 26px;
  mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1fr 1.08fr; gap: 56px; align-items: center; }
.hero-grid > * { min-width: 0; }
.case > * { min-width: 0; }

.rise { opacity: 0; transform: translateY(16px); animation: rise .8s var(--ease-out) forwards; animation-delay: var(--d, 0s); }
@keyframes rise { to { opacity: 1; transform: none; } }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 10px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: rgba(10, 14, 20, 0.6);
  font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); margin-bottom: 26px;
}
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); animation: pulse 2.2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

h1 { font-size: clamp(40px, 5.4vw, 66px); font-weight: 800; margin-bottom: 22px; }
.kinetic .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .08em; margin-bottom: -.08em; }
.kinetic .w > span { display: inline-block; transform: translateY(110%) rotate(3deg); animation: wordUp .9s var(--ease-out) forwards; animation-delay: calc(.12s + var(--i) * .06s); }
@keyframes wordUp { to { transform: none; } }
.accent-anim {
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent));
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: wordUp .9s var(--ease-out) forwards, shimmer 5s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.lede { font-size: 18px; color: var(--muted); max-width: 54ch; margin-bottom: 30px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { margin-top: 22px; font-family: var(--font-mono); font-size: 12.5px; color: var(--dim); }

/* git graph panel */
.gitlog {
  background: #0b1018; border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(94, 234, 212, 0.05);
  font-family: var(--font-mono); overflow: hidden;
}
.gitlog-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}
.gitlog-repo { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.gitlog-repo svg { color: var(--accent); }
.gitlog-repo .sep { color: var(--dim); }
.gitlog-branch { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 6px; border: 1px solid rgba(94, 234, 212, 0.35); color: var(--accent); font-size: 11.5px; }
.gitlog-branch i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.gitlog-body { position: relative; }
.gitlog-svg { position: absolute; left: 0; top: 0; width: 84px; height: 100%; pointer-events: none; overflow: visible; }
.gitlog-rows { list-style: none; margin: 0; padding: 6px 0; }
.gc {
  --rh: 42px;
  position: relative; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px;
  height: var(--rh); padding: 0 14px 0 84px; font-size: 12.5px; color: #cfd8e3;
  opacity: 0; transform: translateX(6px); transition: background .15s, opacity .5s var(--ease-out), transform .5s var(--ease-out);
  cursor: default;
}
.gc.in { opacity: 1; transform: none; }
.gc:hover, .gc.hot { background: rgba(94, 234, 212, 0.06); }
.gc-msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-msg b { font-weight: 500; color: var(--text); }
.gc-msg .scope { color: var(--accent-2); }
.gc-tags { display: inline-flex; gap: 5px; }
.gc-tags i {
  font-style: normal; font-size: 10px; padding: 2px 7px; border-radius: 4px; letter-spacing: .04em;
  border: 1px solid rgba(255, 255, 255, 0.16); color: var(--muted);
}
.gc-tags i.head { border-color: rgba(94, 234, 212, 0.6); color: var(--accent); background: rgba(94, 234, 212, 0.08); }
.gc-tags i.tag { border-color: rgba(245, 185, 66, 0.55); color: #f5b942; }
.gc-tags i.prod { border-color: rgba(74, 222, 128, 0.55); color: var(--ok); }
.gc-meta { display: inline-flex; gap: 10px; color: var(--dim); font-size: 11.5px; white-space: nowrap; }
.gc-meta .hash { color: var(--dim); }
.gitlog-svg .edge { fill: none; stroke-width: 2; stroke-linecap: round; opacity: .9; }
.gitlog-svg .edge.l0 { stroke: var(--accent); }
.gitlog-svg .edge.l1 { stroke: var(--accent-2); }
.gitlog-svg .edge { stroke-dasharray: 1; stroke-dashoffset: 1; }
.gitlog-svg .edge.in { animation: draw .5s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.gitlog-svg .node { transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform .35s var(--ease-out); }
.gitlog-svg .node.in { transform: scale(1); }
.gitlog-svg .node.hot { transform: scale(1.5); }
.gitlog-svg .node.l0 { fill: var(--accent); stroke: #0b1018; stroke-width: 2; }
.gitlog-svg .node.l1 { fill: var(--accent-2); stroke: #0b1018; stroke-width: 2; }
.gitlog-svg .node.merge { fill: #0b1018; stroke: var(--accent); stroke-width: 2; }
.gitlog-svg .halo { fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: 0; }
.gitlog-svg .halo.in { animation: halo 2s ease-out infinite; }
@keyframes halo { 0% { r: 6; opacity: .8; } 100% { r: 16; opacity: 0; } }
.gitlog-foot {
  display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px;
  border-top: 1px solid var(--line); font-size: 11px; color: var(--dim);
  background: rgba(255, 255, 255, 0.02);
}
.gitlog-foot #gitStatus { display: inline-flex; align-items: center; gap: 7px; }
.gitlog-foot #gitStatus.ok { color: var(--ok); }
.spin { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ Proof strip */
.proof { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); position: relative; }
.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 30px 24px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-num { font-family: var(--font-head); font-weight: 800; font-size: 46px; letter-spacing: -0.03em; line-height: 1; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: 14px; line-height: 1.4; }

/* ------------------------------------------------------------ Ticker */
.ticker {
  overflow: hidden; border-bottom: 1px solid var(--line);
  background: var(--bg);
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}
.ticker-track { display: flex; width: max-content; animation: ticker 40s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span {
  display: inline-flex; align-items: center; gap: 22px;
  padding: 14px 0 14px 22px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .04em; color: var(--dim);
  text-transform: uppercase; white-space: nowrap;
}
.ticker-track span::after { content: ""; width: 5px; height: 5px; background: var(--accent); transform: rotate(45deg); opacity: .6; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------ Sections */
.section { padding: 104px 0; position: relative; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 56px; position: relative; }
.section-head::before {
  content: attr(data-num);
  position: absolute; left: -.06em; top: -.55em;
  font-family: var(--font-head); font-weight: 900; font-size: 160px; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.07);
  pointer-events: none; user-select: none; z-index: 0;
}
.section-head > * { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent); }
h2 { font-size: clamp(30px, 3.8vw, 44px); font-weight: 700; margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 17px; }

/* spotlight cards */
.spot { position: relative; }
.spot::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(94, 234, 212, 0.12), transparent 45%);
  opacity: 0; transition: opacity .3s;
}
.spot:hover::before { opacity: 1; }
.spot > * { position: relative; }

/* ------------------------------------------------------------ Case studies */
.case {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center;
  padding: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 28px; transition: border-color .3s;
}
.case:hover { border-color: rgba(94, 234, 212, 0.35); }
.case-flip .case-body { order: 2; }
.case-flip .case-visual { order: 1; }
.case-tag { display: inline-block; font-family: var(--font-mono); font-size: 12px; color: var(--accent); margin-bottom: 12px; }
.case h3 { font-size: 26px; font-weight: 700; margin-bottom: 14px; }
.case p { color: var(--muted); margin-bottom: 18px; }
.case-points { list-style: none; display: grid; gap: 8px; margin-bottom: 20px; }
.case-points li { position: relative; padding-left: 22px; font-size: 15px; color: #cfd8e3; }
.case-points li::before { content: ""; position: absolute; left: 0; top: 10px; width: 10px; height: 2px; background: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span {
  font-family: var(--font-mono); font-size: 12px; padding: 5px 10px; border-radius: 6px;
  border: 1px solid var(--line-strong); color: var(--muted); background: rgba(255, 255, 255, 0.02);
  transition: border-color .2s, color .2s, transform .2s;
}
.chips span:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.chips-lg span { font-size: 13.5px; padding: 8px 14px; color: var(--text); }

/* live dashboard mock */
.dash {
  background: #0b1018; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: grid; gap: 12px; font-family: var(--font-mono);
}
.dash-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.dash-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ok); letter-spacing: .06em; text-transform: uppercase; }
.dash-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); animation: blink 1.4s steps(2) infinite; }
.dash-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: grid; gap: 2px; }
.kpi-label { font-size: 10.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.kpi-val { font-family: var(--font-head); font-weight: 700; font-size: 20px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; transition: color .2s; }
.kpi-val.tick { color: var(--accent); }
.dash-chart { position: relative; height: 84px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: rgba(255, 255, 255, 0.015); }
#sparkCanvas { width: 100%; height: 100%; display: block; }
.dash-chart-label { position: absolute; left: 10px; top: 8px; font-size: 10px; color: var(--dim); letter-spacing: .06em; text-transform: uppercase; }
.dash-log { list-style: none; display: grid; gap: 4px; font-size: 11.5px; color: var(--muted); min-height: 82px; }
.dash-log li { display: flex; gap: 10px; animation: logIn .4s var(--ease-out); }
.dash-log li time { color: var(--dim); flex: 0 0 auto; }
.dash-log li b { color: var(--accent); font-weight: 500; }
@keyframes logIn { from { opacity: 0; transform: translateY(-6px); } }

/* collar map mock */
.map {
  position: relative; height: 300px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: #0b1018;
}
#mapCanvas { width: 100%; height: 100%; display: block; }
.map-hud {
  position: absolute; left: 12px; top: 12px; right: 12px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 12px;
}
.map-dog { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; background: rgba(10, 14, 20, 0.8); border: 1px solid var(--line-strong); }
.map-dog i { width: 8px; height: 8px; border-radius: 50%; background: #f0b429; }
.map-state { padding: 6px 10px; border-radius: 999px; background: rgba(10, 14, 20, 0.8); border: 1px solid rgba(74, 222, 128, 0.4); color: var(--ok); transition: all .3s; }
.map-state.breach { color: var(--warn); border-color: rgba(255, 159, 67, 0.6); animation: blink 0.8s steps(2) infinite; }
.map-foot {
  position: absolute; left: 12px; bottom: 12px; display: flex; gap: 14px;
  font-family: var(--font-mono); font-size: 11px; color: var(--dim);
  padding: 6px 10px; border-radius: 8px; background: rgba(10, 14, 20, 0.8); border: 1px solid var(--line);
}
.map-foot b { color: var(--text); font-weight: 500; }

/* mini cards */
.more-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.mini {
  padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, transform .3s var(--ease-out);
}
.mini:hover { border-color: rgba(94, 234, 212, 0.4); transform: translateY(-3px); }
.mini-icon {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px;
  background: rgba(94, 234, 212, 0.1); color: var(--accent); margin-bottom: 16px;
  transition: transform .3s var(--ease-out), background .2s;
}
.mini:hover .mini-icon { transform: rotate(-8deg) scale(1.08); background: rgba(94, 234, 212, 0.18); }
.mini h4 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.mini p { color: var(--muted); font-size: 15px; }

/* ------------------------------------------------------------ Skills */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.skill-group { padding: 26px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.skill-group h4 { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); margin-bottom: 14px; font-weight: 500; }

/* ------------------------------------------------------------ Timeline */
.timeline { list-style: none; position: relative; }
.tl-item { display: grid; grid-template-columns: 170px 1fr; gap: 32px; padding: 0 0 44px; position: relative; }
.tl-item::before {
  content: ""; position: absolute; left: 170px; top: 12px; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, var(--accent), var(--line-strong)); transform: translateX(15px);
}
.tl-item:last-child::before { display: none; }
.tl-item::after {
  content: ""; position: absolute; left: 170px; top: 8px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent); transform: translateX(10px);
  box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.4); transition: box-shadow .3s;
}
.tl-item:hover::after { box-shadow: 0 0 0 6px rgba(94, 234, 212, 0.15); }
.tl-when { font-family: var(--font-mono); font-size: 13px; color: var(--dim); padding-top: 6px; }
.tl-body { padding-left: 40px; }
.tl-body h3 { font-size: 21px; font-weight: 700; margin-bottom: 12px; }
.tl-co { display: block; font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--muted); margin-top: 4px; letter-spacing: 0; }
.tl-body ul { list-style: none; display: grid; gap: 8px; }
.tl-body li { position: relative; padding-left: 20px; color: #cfd8e3; font-size: 15px; }
.tl-body li::before { content: ""; position: absolute; left: 0; top: 11px; width: 8px; height: 2px; background: var(--accent); }

/* ------------------------------------------------------------ Approach */
.approach-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.tenet { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .2s; }
.tenet:hover { border-color: rgba(94, 234, 212, 0.35); }
.tenet-num { font-family: var(--font-mono); font-size: 12.5px; color: var(--accent); display: block; margin-bottom: 12px; }
.tenet h4 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.tenet p { color: var(--muted); font-size: 15px; }

/* ------------------------------------------------------------ Contact */
.contact { padding-bottom: 120px; }
.contact-card {
  position: relative; overflow: hidden; padding: 56px; border-radius: 20px;
  border: 1px solid rgba(94, 234, 212, 0.35);
  background:
    radial-gradient(500px 300px at 10% 0%, rgba(94, 234, 212, 0.16), transparent 60%),
    radial-gradient(500px 300px at 100% 100%, rgba(125, 211, 252, 0.12), transparent 60%),
    var(--surface);
}
.contact-card > * { position: relative; z-index: 1; }
.contact-orbit {
  position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; z-index: 0;
  border-radius: 50%; border: 1px dashed rgba(94, 234, 212, 0.25);
  animation: spin 40s linear infinite;
}
.contact-orbit::before, .contact-orbit::after {
  content: ""; position: absolute; border-radius: 50%;
}
.contact-orbit::before { inset: 60px; border: 1px solid rgba(125, 211, 252, 0.18); }
.contact-orbit::after { width: 10px; height: 10px; background: var(--accent); top: 50%; left: -5px; box-shadow: 0 0 18px var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
.contact-card h2 { max-width: 18ch; }
.contact-card p { color: var(--muted); max-width: 60ch; margin-bottom: 28px; font-size: 17px; }

/* ------------------------------------------------------------ Footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 13.5px; color: var(--dim); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ------------------------------------------------------------ Terminal */
.term {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(5, 8, 12, 0.7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: start center; padding: 10vh 16px;
  animation: fadeIn .2s ease;
}
.term[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } }
.term-window {
  width: min(720px, 100%); background: #070a0f; border: 1px solid var(--line-strong);
  border-radius: 12px; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9), 0 0 60px -20px rgba(94, 234, 212, 0.3);
  overflow: hidden; animation: termIn .35s var(--ease-out);
}
@keyframes termIn { from { transform: translateY(-16px) scale(.98); opacity: 0; } }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.term-title { margin-left: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--dim); }
.term-close { margin-left: auto; background: none; border: 1px solid var(--line); color: var(--dim); font-family: var(--font-mono); font-size: 11px; padding: 2px 8px; border-radius: 4px; cursor: pointer; }
.term-close:hover { color: var(--text); border-color: var(--line-strong); }
.term-body { padding: 16px 18px 6px; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.6; color: #c9d4e0; max-height: 50vh; overflow-y: auto; white-space: pre-wrap; }
.term-body .in { color: var(--text); }
.term-body .in .prompt { color: var(--accent); }
.term-body .muted { color: var(--dim); }
.term-body .hi { color: var(--accent); }
.term-body .err { color: var(--danger); }
.term-body a { color: var(--accent-2); }
.term-form { display: flex; align-items: center; padding: 6px 18px 16px; font-family: var(--font-mono); font-size: 13.5px; }
.term-input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font: inherit; caret-color: var(--accent); }
.term-input::placeholder { color: var(--dim); }

/* ------------------------------------------------------------ Reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--accent); color: var(--accent-ink); font-weight: 600;
  padding: 10px 18px; border-radius: 999px; opacity: 0;
  transition: opacity .25s, transform .25s; z-index: 96; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------ Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .rise { opacity: 1; transform: none; animation: none; }
  .kinetic .w > span { transform: none; animation: none; }
  .accent-anim { animation: none; }
  .gc { opacity: 1; transform: none; transition: none; }
  .gitlog-svg .edge { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
  .gitlog-svg .node { transform: scale(1); transition: none; }
  .gitlog-svg .halo.in { animation: none; }
  .spin { animation: none; }
  .grain, .ticker-track, .contact-orbit, .pill-dot, .dash-live i, .map-state.breach { animation: none; }
  .btn { transition: none; }
}

/* ------------------------------------------------------------ Responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 24px 20px; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .case { grid-template-columns: 1fr; padding: 28px; }
  .case-flip .case-body { order: 1; }
  .case-flip .case-visual { order: 2; }
  .section-head::before { font-size: 120px; }
}

@media (max-width: 720px) {
  .wrap { width: calc(100% - 36px); }
  .hero { padding: 64px 0 56px; }
  .gc { padding-left: 64px; grid-template-columns: 1fr auto; font-size: 12px; }
  .gc-meta { display: none; }
  .gitlog-svg { width: 64px; }
  .gitlog-foot span:last-child { display: none; }
  .section { padding: 72px 0; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: 8px 18px 16px;
    transform: translateY(-8px); opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .2s, transform .2s, visibility 0s .2s;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition: opacity .2s, transform .2s, visibility 0s; }
  .nav-links a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-links a:not(.btn)::after { display: none; }
  .nav-links .btn { margin-top: 12px; justify-content: center; }
  .more-grid, .skills-grid, .approach-grid { grid-template-columns: 1fr; }
  .tl-item { grid-template-columns: 1fr; gap: 6px; padding-left: 26px; }
  .tl-item::before { left: 0; transform: none; top: 12px; }
  .tl-item::after { left: 0; transform: translateX(-5px); }
  .tl-body { padding-left: 0; }
  .contact-card { padding: 36px 26px; }
  .contact-orbit { right: -220px; top: -220px; }
  .cta-row .btn { flex: 1 1 auto; justify-content: center; }
  .section-head::before { font-size: 96px; top: -.4em; }
  .dash-kpis { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .kpi-val { font-size: 16px; }
  .map { height: 260px; }
  .grain { display: none; }
}
