/* ────────────────────────────────────────────────────────────────────
   Vijay Velu — Identity × Infrastructure × Security
   Blueprint/schematic design system: dark charcoal or drafting-paper
   light (auto via prefers-color-scheme, no manual toggle), one
   desaturated steel-blue accent, hairline dividers, no glow/blur/glass.
   Diagrams carry the visual distinctiveness — the chrome stays flat.
   ──────────────────────────────────────────────────────────────────── */

:root {
  color-scheme: dark;
  --ground:      #14171B;
  --ground-2:    #191D22;
  --ink:         #E7E9EC;
  --ink-2:       #9BA3AD;
  /* 5.15:1 on --ground, 4.85:1 on --ground-2 panels — both clear WCAG AA for
     the small text this carries (eyebrows, dates, cert metadata, footer,
     diagram annotations). Values below 4.5:1 on the *panel* are the trap here:
     panels are lighter than the page ground, so the page-ground ratio alone
     is not sufficient to check. */
  --ink-3:       #828A95;

  --danger:      #D98A8A;

  --line:        rgba(231,233,236,.12);
  --line-strong: rgba(231,233,236,.22);
  --panel-fill:  rgba(231,233,236,.03);
  --panel-fill-hi: rgba(231,233,236,.06);

  --accent:      #7C93A8;
  --accent-dim:  rgba(124,147,168,.35);
  --accent-line: rgba(124,147,168,.55);
  --accent-fill: rgba(124,147,168,.08);

  --grid-line:   rgba(124,147,168,.07);

  --r-lg: 4px;
  --r-md: 3px;
  --r-sm: 2px;

  --display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --body:    'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:    'IBM Plex Mono', 'JetBrains Mono', ui-monospace, monospace;

  --ease: cubic-bezier(.16,.8,.24,1);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --ground:      #F3EFE6;
    --ground-2:    #EAE4D6;
    --ink:         #23211C;
    --ink-2:       #55524A;
    /* 5.53:1 on --ground, 5.00:1 on --ground-2 panels. */
    --ink-3:       #655F52;

    --danger:      #9E3B3B;

    --line:        rgba(35,33,28,.14);
    --line-strong: rgba(35,33,28,.26);
    --panel-fill:  rgba(35,33,28,.025);
    --panel-fill-hi: rgba(35,33,28,.05);

    --accent:      #3E5C73;
    --accent-dim:  rgba(62,92,115,.30);
    --accent-line: rgba(62,92,115,.65);
    --accent-fill: rgba(62,92,115,.07);

    --grid-line:   rgba(62,92,115,.09);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  scrollbar-gutter: stable;
}

body {
  background-color: var(--ground);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

::selection { background: var(--accent-dim); color: var(--ink); }

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}

.eyebrow::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--accent);
}

/* ── Panel primitive (was .glass) ─────────────────────────────────── */
.panel {
  background: var(--panel-fill);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  position: relative;
}

/* ── Nav ─────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2rem;
  /* Solid first: color-mix is the enhancement, and it is the only background
     declaration on a fixed bar. Where it is unsupported the whole declaration
     is dropped, leaving the nav transparent and page text scrolling under the
     links — so the fallback has to be a real paint, not nothing. */
  background: var(--ground);
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .18s ease, background .18s ease;
}

.nav.is-scrolled {
  border-bottom-color: var(--line);
  background: var(--ground);
  background: color-mix(in srgb, var(--ground) 96%, transparent);
}

.nav-mark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.nav-mark-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
}

.nav-links {
  display: flex;
  gap: 1.9rem;
}

.nav-links a {
  font-size: .86rem;
  color: var(--ink-2);
  transition: color .2s ease;
  position: relative;
}

.nav-links a:hover, .nav-links a:focus-visible { color: var(--ink); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .02em;
  font-weight: 500;
  padding: .55rem 1.1rem;
  border-radius: var(--r-sm);
  background: var(--panel-fill-hi);
  border: 1px solid var(--line-strong);
  transition: background .15s ease, border-color .15s ease;
}

.nav-cta:hover { border-color: var(--accent-line); background: var(--accent-fill); }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}

.nav-burger, .nav-burger::before, .nav-burger::after {
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  position: relative;
  transition: transform .18s ease, opacity .15s ease, background .15s ease;
}

.nav-burger::before, .nav-burger::after { content: ""; position: absolute; left: 0; top: 0; }
.nav-burger::before { transform: translateY(-5px); }
.nav-burger::after  { transform: translateY(5px); }

.nav-toggle[aria-expanded="true"] .nav-burger { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-burger::before { transform: translateY(0) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-burger::after  { transform: translateY(0) rotate(-45deg); }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .8rem 1.5rem;
  border-radius: var(--r-sm);
  font-size: .9rem;
  font-weight: 500;
  transition: transform .14s var(--ease), border-color .15s ease, background .15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  color: var(--ground);
  border: 1px solid var(--accent);
}

.btn-primary:hover { background: var(--ink); border-color: var(--ink); }

.btn-ghost {
  background: var(--panel-fill);
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover { background: var(--panel-fill-hi); border-color: var(--accent-line); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  overflow: hidden;
}

.hero-content { position: relative; z-index: 2; max-width: 920px; }

.hero .eyebrow { margin-bottom: 1.75rem; justify-content: center; }

.hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.3rem, 5.6vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.hero h1 .accent { color: var(--accent); }

.hero-sub {
  margin: 1.75rem auto 0;
  max-width: 52ch;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  color: var(--ink-2);
  line-height: 1.75;
  text-wrap: balance;
}

.hero-tech { justify-content: center; margin-top: 1.9rem; }

.hero .btn-row { justify-content: center; margin-top: 2.5rem; }

.hero-scroll {
  position: absolute;
  bottom: 2.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-3);
  z-index: 2;
}

.hero-scroll-line {
  width: 1px;
  height: 30px;
  background: linear-gradient(transparent, var(--accent-line));
  animation: scrolldrop 2s ease-in-out infinite;
}

/* A real control, not a decorative label: it is focusable, it says where
   it goes, and clicking it actually takes you there. */
.hero-scroll-arrow {
  width: 30px;
  height: 30px;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--ink-2);
  transition: color .18s ease, border-color .18s ease, transform .18s var(--ease);
  animation: scroll-nudge 2.4s ease-in-out infinite;
}

.hero-scroll:hover .hero-scroll-arrow,
.hero-scroll:focus-visible .hero-scroll-arrow {
  color: var(--ink);
  border-color: var(--accent-line);
  transform: translateY(2px);
}

@keyframes scroll-nudge {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(3px); }
}

@keyframes scrolldrop {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  60% { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ── Section scaffold ────────────────────────────────────────────── */
.section { padding: 7rem 0; position: relative; }
.section-tight { padding: 4rem 0; }

.section-head {
  max-width: 680px;
  margin-bottom: 3.5rem;
}

.section-head h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  letter-spacing: -.02em;
  line-height: 1.15;
  margin-top: 1rem;
}

.section-head p {
  margin-top: 1.1rem;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 56ch;
}

/* ── About ───────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-lede {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.2rem, 2.1vw, 1.5rem);
  line-height: 1.5;
  letter-spacing: -.01em;
  color: var(--ink);
}

.about-lede .accent { color: var(--accent); }

.about-body {
  margin-top: 1.5rem;
  color: var(--ink-2);
  font-size: .95rem;
  line-height: 1.85;
}

.about-body p + p { margin-top: 1rem; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 2.5rem;
}

.stat {
  background: var(--ground-2);
  padding: 1.6rem 1.4rem;
}

.stat-val {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 1.9rem;
  letter-spacing: -.01em;
  color: var(--accent);
}

.stat-label {
  margin-top: .4rem;
  font-size: .8rem;
  color: var(--ink-2);
}

.focus-card { padding: 2rem; }

.focus-card h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.focus-list { display: flex; flex-direction: column; gap: .9rem; }

.focus-item {
  display: flex;
  align-items: baseline;
  gap: .8rem;
  font-size: .9rem;
  color: var(--ink-2);
}

.focus-item strong {
  color: var(--ink);
  font-weight: 500;
  min-width: 9rem;
}

/* ── Open to opportunities (recruiter block) ────────────────────── */
.opps-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 2.5rem;
}

.opps-card { padding: 1.75rem; }

.avail {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-line);
  background: var(--accent-fill);
  border-radius: var(--r-sm);
  padding: .3rem .6rem;
  margin-bottom: 1.25rem;
}

.avail-dot { width: 6px; height: 6px; background: var(--accent); flex: none; }

.opps-sub {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1rem;
}

.opps-sub-standalone { margin-bottom: .9rem; }

.opps-roles { display: flex; flex-direction: column; gap: 1.1rem; }

.opps-roles li { font-size: .88rem; color: var(--ink-2); line-height: 1.65; }

.opps-roles strong {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: .25rem;
}

.opps-facts { display: flex; flex-direction: column; }

.opps-facts > div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  padding: .6rem 0;
  border-top: 1px solid var(--line);
}

.opps-facts > div:first-child { border-top: none; padding-top: 0; }

.opps-facts dt {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.opps-facts dd { font-size: .88rem; color: var(--ink-2); line-height: 1.5; }

/* ── Expertise (capability map) ─────────────────────────────────── */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.expertise-group {
  background: var(--ground-2);
  padding: 1.5rem 1.4rem;
}

.expertise-group-name {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.tag-list li {
  font-size: .78rem;
  color: var(--ink-2);
  border: 1px solid var(--line);
  padding: .25rem .55rem;
  border-radius: var(--r-sm);
  line-height: 1.4;
}

/* ── Architecture diagrams ──────────────────────────────────────── */
.diagram-block { margin-bottom: 4rem; }
.diagram-block:last-child { margin-bottom: 0; }

.diagram-caption {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--ink-3);
  margin-top: .9rem;
}

.diagram {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--ground-2);
  padding: 1.5rem;
  overflow-x: auto;
}

/* Diagrams hold a minimum width and let their wrapper scroll horizontally
   rather than scaling to fit. width:100% alone shrinks the whole drawing on a
   phone — a 960-unit viewBox rendered into a ~300px column is a 0.31 scale,
   which paints the 13px labels at ~4px and makes them unreadable. Each
   min-width below keeps labels at ~11px effective or better. */
.diagram-svg { width: 100%; height: auto; overflow: visible; min-width: 620px; }
.diagram-svg.is-wide { min-width: 820px; }
.metric-compare .diagram-svg { min-width: 580px; }
.diagram-svg text { font-family: var(--mono); fill: var(--ink-2); }
.diagram-svg .dg-label { font-size: 13px; fill: var(--ink); font-family: var(--display); font-weight: 500; }
.diagram-svg .dg-index { font-size: 10px; letter-spacing: .05em; fill: var(--accent); }
.diagram-svg .dg-note { font-size: 11px; fill: var(--ink-3); }
.diagram-svg rect.dg-box { fill: var(--panel-fill); stroke: var(--accent-line); stroke-width: 1; }
.diagram-svg rect.dg-band { fill: var(--panel-fill); }
.diagram-svg rect.dg-band-alt { fill: transparent; }
.diagram-svg rect.dg-boundary { fill: none; stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 4 3; }
.diagram-svg path.dg-line { stroke: var(--line-strong); stroke-width: 1; fill: none; }
.diagram-svg path.dg-arrow { fill: var(--line-strong); }
.diagram-svg path.dg-leader { stroke: var(--accent-line); stroke-width: 1; fill: none; stroke-dasharray: 2 2; }
.diagram-svg line.dg-div { stroke: var(--line); stroke-width: 1; }

.diagram-legend {
  margin-top: 1rem;
  font-size: .82rem;
  color: var(--ink-2);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.2rem;
}

.diagram-legend li::before { content: "· "; color: var(--ink-3); }

/* ── AI-assisted engineering ────────────────────────────────────── */
.ai-flow {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
  margin: 1.75rem 0;
  font-family: var(--mono);
  font-size: .8rem;
}

.ai-flow span {
  border: 1px solid var(--line);
  padding: .5rem .9rem;
  border-radius: var(--r-sm);
  color: var(--ink-2);
}

.ai-flow i {
  color: var(--ink-3);
  font-style: normal;
}

/* ── Engineering impact metrics ─────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 3rem;
}

.metric {
  background: var(--ground-2);
  padding: 1.6rem 1.4rem;
}

.metric-val {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 1.7rem;
  color: var(--accent);
  letter-spacing: -.01em;
}

.metric-label {
  margin-top: .4rem;
  font-size: .78rem;
  color: var(--ink-2);
  line-height: 1.4;
}

.metric-compare {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--ground-2);
  padding: 1.75rem;
  overflow-x: auto;
}

/* ── Career timeline (changelog style) ──────────────────────────── */
.timeline { display: flex; flex-direction: column; gap: 3rem; }

.tl-item {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.tl-item:first-child { padding-top: 0; border-top: none; }

.tl-when {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .03em;
  color: var(--ink-3);
  white-space: nowrap;
}

.tl-item.is-current .tl-when { color: var(--accent); }

.tl-idx {
  display: block;
  font-family: var(--mono);
  font-size: .95rem;
  color: var(--ink-3);
  margin-bottom: .3rem;
}

.tl-item h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -.01em;
}

.tl-org { color: var(--ink-2); font-size: .88rem; margin-top: .25rem; margin-bottom: 1rem; }

.tl-item ul { display: flex; flex-direction: column; gap: .55rem; max-width: 66ch; }

.tl-item li {
  color: var(--ink-2);
  font-size: .9rem;
  line-height: 1.75;
  padding-left: 1rem;
  position: relative;
}

.tl-item li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--ink-3);
}

.tl-achieve {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--line);
}

.tl-achieve-label {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .7rem;
  display: block;
}

.tl-tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.1rem; }

.tl-tags span {
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--ink-2);
  border: 1px solid var(--line);
  padding: .2rem .55rem;
  border-radius: var(--r-sm);
}

/* ── Certifications ──────────────────────────────────────────────── */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.cert-card {
  background: var(--ground-2);
  padding: 1.5rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.cert-badge {
  width: 22px;
  height: 22px;
  margin-bottom: .9rem;
  color: var(--accent);
}

.cert-badge svg { width: 100%; height: 100%; stroke: currentColor; }

.cert-name { font-weight: 500; font-size: .92rem; line-height: 1.4; }
.cert-by { font-family: var(--mono); font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin-top: .3rem; }

/* ── Education / Achievements ───────────────────────────────────── */
.list-block { display: flex; flex-direction: column; gap: 1.5rem; }

.list-entry { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.list-entry:first-child { border-top: none; padding-top: 0; }

.list-entry h3 { font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.list-entry p { color: var(--ink-2); font-size: .88rem; margin-top: .3rem; }

.list-entry .list-when {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--ink-3);
  display: block;
  margin-bottom: .3rem;
}

/* ── Contact ─────────────────────────────────────────────────────── */
.contact-card {
  padding: 4rem 3rem;
  text-align: center;
}

.contact-card h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.8vw, 2.8rem);
  letter-spacing: -.02em;
  line-height: 1.15;
  max-width: 20ch;
  margin: 0 auto 1.25rem;
  text-wrap: balance;
}

.contact-card p {
  color: var(--ink-2);
  max-width: 46ch;
  margin: 0 auto 2.25rem;
  font-size: 1rem;
  line-height: 1.75;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .7rem;
  margin-top: 2.5rem;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .65rem 1.3rem;
  border-radius: var(--r-sm);
  background: var(--panel-fill);
  border: 1px solid var(--line-strong);
  font-size: .86rem;
  transition: background .15s ease, border-color .15s ease;
}

.contact-links a:hover { background: var(--accent-fill); border-color: var(--accent-line); }

.contact-links .ico { width: 16px; height: 16px; flex: none; }

.ico-badge { transform: scale(.82); transform-origin: center; }

.built-with {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-top: 2.5rem !important;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .02em;
  color: var(--ink-3) !important;
  max-width: none !important;
}

.built-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
}

/* ── Footer ──────────────────────────────────────────────────────── */
.foot {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
}

.foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--ink-3);
}

.foot-links { display: flex; gap: 1.5rem; align-items: center; }

.foot-links a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  transition: color .2s ease;
}

.foot-links .ico { width: 14px; height: 14px; flex: none; }
.foot-links a:hover { color: var(--accent); }

/* ── Reveal ──────────────────────────────────────────────────────── */
.js .rv {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}

.js .rv.on { opacity: 1; transform: none; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }
  .certs-grid { grid-template-columns: repeat(2, 1fr); }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .tl-item { grid-template-columns: 1fr; gap: .5rem; }
  .opps-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .opps-facts > div { grid-template-columns: 1fr; gap: .2rem; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 1.25rem; }
  .nav { padding: .95rem 1.25rem; }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  .nav-links.is-open {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: .25rem 1.25rem 1rem;
    background: var(--ground);
    border-bottom: 1px solid var(--line);
  }

  .nav-links.is-open li { border-top: 1px solid var(--line); }
  .nav-links.is-open a { display: block; padding: .9rem 0; font-size: .95rem; }
  .section { padding: 4.5rem 0; }
  .hero { padding: 7rem 1.25rem 3rem; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .expertise-grid { grid-template-columns: 1fr; }
  .certs-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .contact-card { padding: 3rem 1.5rem; }
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .hero-scroll-line, .hero-scroll-arrow { animation: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--ground);
  padding: .6rem 1.1rem;
  font-family: var(--mono);
  font-size: .75rem;
  z-index: 200;
  border-radius: var(--r-sm);
}

.skip:focus { left: 1rem; top: 1rem; }

/* ── Back to top ─────────────────────────────────────────────────────
   The nav is fixed and carries every section link, so this is not the
   navigation — it is the one thing the nav does not give you cheaply on
   an 11-section page: a way back up. Plain anchor, so with JS off it is
   simply always visible and still works; JS only adds the fade-in. */
.to-top {
  position: fixed;
  right: 1.75rem;
  bottom: 1.75rem;
  z-index: 95;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  background: var(--ground-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  transition: opacity .25s ease, color .18s ease, border-color .18s ease, transform .18s var(--ease);
}

.to-top svg { width: 18px; height: 18px; }

.to-top:hover, .to-top:focus-visible {
  color: var(--ink);
  border-color: var(--accent-line);
  transform: translateY(-2px);
}

/* Only hidden-until-scrolled when JS is there to reveal it again. */
.js .to-top { opacity: 0; pointer-events: none; }
.js .to-top.on { opacity: 1; pointer-events: auto; }

@media (max-width: 560px) {
  .to-top { right: 1rem; bottom: 1rem; width: 36px; height: 36px; }
}

/* ── Terminal caret ──────────────────────────────────────────────────
   A blinking underscore, used only where the page is genuinely waiting
   on the reader: the hero headline, the contact heading, and the 404.
   Three placements, not a decoration sprinkled everywhere — a prompt
   that appears next to everything stops reading as a prompt. */
.caret {
  display: inline-block;
  width: .56em;
  height: .085em;
  min-height: 2px;
  margin-left: .12em;
  vertical-align: baseline;
  background: var(--accent);
  animation: caret-blink 1.15s steps(1, end) infinite;
}

@keyframes caret-blink {
  0%, 55%   { opacity: 1; }
  56%, 100% { opacity: 0; }
}

/* Still present, just not blinking — the prompt still reads as a prompt. */
@media (prefers-reduced-motion: reduce) {
  .caret { animation: none; opacity: .75; }
}

/* Ambient node activity on the lattice. Behind everything (negative
   z-index keeps it under in-flow content), never interactive. */
.grid-life {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) { .grid-life { display: none !important; } }

/* ── Grid Snake ──────────────────────────────────────────────────────
   Rides the page's own 48px lattice. On the 404 it is the point of the
   page; on the homepage it only exists once the easter egg is found. */
.snake-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: auto;
  touch-action: none;
}

/* The 404's content sits above the play surface but must not swallow
   the pointer, or the snake would stop dead over the headline. */
.snake-host main,
.snake-host .foot,
.snake-host .nav { position: relative; z-index: 1; pointer-events: none; }
.snake-host a,
.snake-host button { pointer-events: auto; }

.snake-hud {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--panel-fill);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: .5rem .9rem;
  pointer-events: none;
  transition: opacity .3s ease;
}

.snake-hud b { color: var(--accent); font-weight: 500; }

/* The one interactive thing in the HUD: an actual way out, so the
   playfield can never trap someone whose device has no Esc key. */
.snake-exit {
  pointer-events: auto;
  font-family: var(--mono);
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: .2rem .5rem;
  transition: color .15s ease, border-color .15s ease;
}

.snake-exit:hover { color: var(--ink); border-color: var(--accent-line); }

@media (max-width: 560px) {
  .snake-hud { font-size: .62rem; gap: .7rem; padding: .45rem .7rem; }
}

/* Homepage easter egg: the canvas overlays everything and the toast
   explains how to leave. Content keeps its own stacking above it. */
.snake-egg .snake-canvas { z-index: 90; background: transparent; }
.snake-egg .snake-hud { z-index: 91; pointer-events: none; }
/* The scroll cue and the HUD both live at the bottom centre — the game
   owns that spot while it is running. */
.snake-egg .hero-scroll { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .snake-canvas, .snake-hud { display: none !important; }
}
