/* Anas Tanveer · portfolio
   Looks like an engineer's drawing: paper, ink, one signal colour, hairline rules. */

/* Fonts are stored in assets/fonts (Latin subsets), so nothing loads from a font service. */
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/barlow-condensed-700.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('../fonts/ibm-plex-sans-variable.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-mono-400.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-mono-500.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #f2efe8;
  --paper-2: #e9e5db;
  --card: #fbf9f4;
  --ink: #15171a;
  --ink-2: #44484e;
  --ink-3: #62666c;
  --rule: rgba(21, 23, 26, 0.16);
  --rule-2: rgba(21, 23, 26, 0.3);
  --accent: #e8490f;
  --accent-ink: #c03a08;
  --led: #1f9d55;
  --amber: #d98e04;

  --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Barlow Condensed', 'Arial Narrow', 'IBM Plex Sans', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  --container: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --edge: max(var(--gutter), calc((100vw - var(--container)) / 2));
  --nav-h: 64px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
* { margin: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }

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

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; font-weight: 600;
}
.skip-link:focus { top: 16px; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.ic { width: 18px; height: 18px; flex: none; }
.muted { color: var(--ink-3); }

.led {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--led); box-shadow: 0 0 0 3px rgba(31, 157, 85, 0.18);
  margin-right: 9px; vertical-align: 1px;
}
.led--amber { background: var(--amber); box-shadow: 0 0 0 3px rgba(217, 142, 4, 0.2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 20px; border: 1.5px solid var(--ink); border-radius: 3px;
  background: transparent; color: var(--ink);
  font-weight: 600; font-size: 15px; line-height: 1; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--accent); }
.btn:active { transform: none; box-shadow: none; }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--sm { padding: 10px 14px; font-size: 14px; }
.btn--light { border-color: var(--paper); color: var(--paper); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  border-bottom: 1.5px solid transparent;
  transition: background .25s ease, border-color .25s ease;
}
.nav.is-scrolled { background: var(--paper); border-color: var(--ink); }
.nav__inner { height: 100%; display: flex; align-items: center; gap: 28px; padding-inline: var(--edge); }

.brand {
  font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1;
  text-transform: uppercase; letter-spacing: 0.01em; white-space: nowrap;
}
.brand span {
  font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: 0.08em;
  color: var(--ink-2); margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--rule-2);
  vertical-align: 3px;
}

.nav__links { display: flex; gap: 26px; margin-left: auto; }
.nav__links a {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-2); padding: 6px 0; border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a.is-active { color: var(--ink); border-color: var(--accent); }

.nav__toggle { display: none; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav__toggle .ic { width: 26px; height: 26px; }
.nav__toggle .ic--close { display: none; }

/* ---------- stage: hero + what I do, with the rack pinned beside them ---------- */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  grid-template-areas: "hero visual" "steps visual";
}
@media (min-width: 1300px) {
  /* keep the text column a fixed width once the page is wider than the container */
  .stage { grid-template-columns: calc(var(--edge) + 564px) minmax(0, 1fr); }
}
.stage__hero {
  grid-area: hero; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--nav-h) + 20px) 24px 36px var(--edge);
}
.stage__visual {
  grid-area: visual; align-self: start;
  position: sticky; top: 0; height: 100vh; height: 100svh;
}
.stage__steps { grid-area: steps; padding: 0 24px 14vh var(--edge); }

.hero__top { display: flex; align-items: center; gap: 18px; }
.hero__photo {
  width: 76px; height: 76px; flex: none; object-fit: cover; object-position: 50% 18%;
  border: 1.5px solid var(--ink); border-radius: 6px; box-shadow: 4px 4px 0 rgba(21, 23, 26, 0.16);
  transform: rotate(-2.5deg);
}
.hero__kicker {
  display: flex; flex-direction: column; gap: 5px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-2);
}
.hero__kicker span:first-child { color: var(--ink); font-weight: 500; }

/* the hero text settles into place on load */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.stage__hero > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.stage__hero > :nth-child(2) { animation-delay: .06s; }
.stage__hero > :nth-child(3) { animation-delay: .14s; }
.stage__hero > :nth-child(4) { animation-delay: .22s; }
.stage__hero > :nth-child(5) { animation-delay: .3s; }
.stage__hero > :nth-child(6) { animation-delay: .38s; }
.hero__title {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(48px, min(6.4vw, 10.6vh), 96px); line-height: 0.9; letter-spacing: -0.005em;
  margin: 22px 0 22px;
}
.hero__title em { font-style: normal; position: relative; display: inline-block; }
.hero__title svg {
  position: absolute; left: -2%; bottom: -0.1em; width: 104%; height: 0.2em; overflow: visible;
}
.hero__title path {
  fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 320; stroke-dashoffset: 320; animation: draw .7s .9s ease-out forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero__lede { color: var(--ink-2); font-size: clamp(16px, 1.22vw, 18.5px); max-width: 56ch; }
.hero__lede strong { color: var(--ink); font-weight: 600; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero__tools { display: flex; align-items: center; gap: 16px; margin-top: 24px; }
.hero__tools p { font-family: var(--mono); font-size: 11.5px; line-height: 1.35; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); max-width: 13ch; }
.hero__tools img { height: 34px; width: auto; }

.specs {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(22px, 3.6vh, 40px); border-top: 1.5px solid var(--ink);
}
.specs li { padding: 14px 14px 0 0; }
.specs li + li { padding-left: 14px; border-left: 1px solid var(--rule); }
.specs strong { display: block; font-family: var(--display); font-weight: 700; font-size: clamp(32px, 3vw, 46px); line-height: 1; }
.specs span { display: block; margin-top: 6px; font-family: var(--mono); font-size: 11.5px; line-height: 1.45; color: var(--ink-2); }

/* the rack */
.rack { position: absolute; inset: 0; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.rack.is-dragging { cursor: grabbing; }
.rack.is-hover { cursor: pointer; }
.rack__still, .rack__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rack__still { display: none; object-fit: contain; }
.rack.is-static .rack__still, html:not(.js) .rack__still { display: block; }
.rack.is-static, html:not(.js) .rack { cursor: default; }
.rack.is-static .rack__note span, html:not(.js) .rack__note span { display: none; }
.rack__canvas { opacity: 0; transition: opacity .4s ease; }
.rack.is-live .rack__canvas { opacity: 1; }
.rack__loading {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
  transition: opacity .3s ease;
}
.rack__loading i { font-style: normal; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.rack.is-live .rack__loading, .rack.is-static .rack__loading, html:not(.js) .rack__loading { opacity: 0; }
.rack__leaders, .rack__labels { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.rack__leaders path { fill: none; stroke: var(--ink); stroke-width: 1; opacity: 0; transition: opacity .3s ease; }
.rack__leaders path.is-on { opacity: .5; }
.rack__leaders path.is-hot { opacity: 1; stroke: var(--accent); stroke-width: 1.5; }
.rack__label {
  position: absolute; left: 0; top: 0; white-space: nowrap; text-align: right;
  font-family: var(--mono); font-size: 11px; line-height: 1.35; color: var(--ink-2);
  opacity: 0; transition: opacity .3s ease; will-change: transform;
}
.rack__label b { display: block; font-weight: 500; font-size: 12px; letter-spacing: 0.05em; color: var(--ink); }
.rack__label.is-on { opacity: 1; }
.rack__label.is-hot b { color: var(--accent-ink); }
.rack__label.is-step { text-align: left; padding: 5px 10px 6px; background: var(--paper); border: 1px solid var(--ink); border-left: 3px solid var(--accent); }
.rack__dim {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--accent-ink);
  opacity: 0; transition: opacity .3s ease;
}
.rack__dim.is-on { opacity: 1; }
.rack__note {
  position: absolute; right: var(--gutter); bottom: 16px; max-width: 46ch; text-align: right;
  font-family: var(--mono); font-size: 11px; line-height: 1.5; color: var(--ink-3);
  transition: opacity .3s ease;
}
.rack[data-mode="step"] .rack__note { opacity: 0; }

/* steps */
.steps__head { padding: 8vh 0 4vh; }
.head__no { font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-ink); }
.steps__head h2, .head h2 {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(40px, 5vw, 74px); line-height: 0.95; margin-top: 14px; max-width: 21ch;
}
.step {
  min-height: 46vh; min-height: 46svh; max-width: 520px;
  display: flex; flex-direction: column; justify-content: center; gap: 12px;
  position: relative; padding: 5vh 0 5vh 22px; border-top: 1px solid var(--rule);
}
/* The active step is marked with a bar and full-strength ink. The others stay readable (AA contrast). */
.step::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 0; background: var(--accent);
  transition: top .35s ease, height .35s ease;
}
.js .step.is-active::before { top: 5vh; height: calc(100% - 10vh); }
.js .step h3, .js .step p, .js .step a { transition: color .35s ease; }
.js .step:not(.is-active) h3, .js .step:not(.is-active) p, .js .step:not(.is-active) .step__meta { color: var(--ink-3); }
.step__id { font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: 0.1em; color: var(--accent-ink); }
.step__id span { color: var(--ink-3); font-weight: 400; margin-right: 14px; padding-right: 14px; border-right: 1px solid var(--rule-2); }
.step h3 { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(36px, 3.7vw, 54px); line-height: 0.98; }
.step p { color: var(--ink-2); }
.step .step__meta { font-family: var(--mono); font-size: 12.5px; color: var(--ink); margin-top: 6px; }
.step__meta a { border-bottom: 1.5px solid var(--accent); }

/* ---------- sections ---------- */
.section { padding: clamp(84px, 13vh, 150px) 0; border-top: 1.5px solid var(--ink); }
.section--tint { background: var(--paper-2); }
.head { margin-bottom: clamp(36px, 6vh, 64px); }
.head--row { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; border-bottom: 1.5px solid var(--accent); padding-bottom: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span {
  font-family: var(--mono); font-size: 12px; line-height: 1.3; padding: 5px 9px;
  border: 1px solid var(--rule-2); border-radius: 3px; color: var(--ink);
}
.chips--lg span { font-size: 13px; padding: 7px 11px; background: var(--card); transition: border-color .15s, background .15s; }
.chips--lg span:hover { border-color: var(--ink); background: #fff; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.about .head h2 { max-width: 18ch; }
.prose p { color: var(--ink-2); max-width: 64ch; }
.prose p + p { margin-top: 18px; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; margin-top: 30px; max-width: 640px; }
.checks li { display: flex; align-items: center; gap: 10px; font-size: 15.5px; font-weight: 500; }
.checks .ic { color: var(--accent); }

.facts { display: grid; grid-template-columns: 1fr 1fr; margin-top: 44px; border-top: 1.5px solid var(--ink); }
.facts div { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--rule); }
.facts div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--rule); }
.facts dt { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.facts dd { font-weight: 600; margin-top: 2px; }
.facts small { display: block; font-weight: 400; font-size: 14px; color: var(--ink-2); }

/* the pass: a lanyard card that swings in and tilts under the pointer */
.about__id { position: sticky; top: calc(var(--nav-h) + 24px); perspective: 1100px; }
.pass { position: relative; width: min(100%, 320px); margin-inline: auto; padding-top: 84px; transform-origin: 50% 0; }
.js .reveal.is-visible .pass { animation: swing 2.4s cubic-bezier(.3, .7, .3, 1) both; }
@keyframes swing {
  0% { transform: rotate(11deg); } 22% { transform: rotate(-7deg); } 44% { transform: rotate(4.5deg); }
  64% { transform: rotate(-2.5deg); } 82% { transform: rotate(1deg); } 100% { transform: rotate(0); }
}
.pass__strap {
  position: absolute; left: 50%; top: -60px; width: 24px; height: 158px; margin-left: -12px;
  background: var(--accent);
  background-image: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0 2px, transparent 2px 9px);
}
.pass__strap::after {
  content: ""; position: absolute; left: 50%; bottom: -16px; width: 34px; height: 22px; margin-left: -17px;
  background: #c9c4b8; border: 1.5px solid var(--ink); border-radius: 4px;
}
.pass__card {
  position: relative; background: var(--card); border: 1.5px solid var(--ink); border-radius: 14px;
  padding: 14px 14px 16px; box-shadow: 9px 11px 0 rgba(21, 23, 26, 0.13);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .2s ease-out;
}
.pass__slot { display: block; width: 62px; height: 12px; margin: 0 auto 12px; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--paper-2); }
.pass__card img { width: 100%; aspect-ratio: 1 / 1.02; object-fit: cover; object-position: 50% 20%; border: 1.5px solid var(--ink); border-radius: 6px; }
.pass__name { font-family: var(--display); font-weight: 700; font-size: 36px; line-height: 1; text-transform: uppercase; margin-top: 14px; }
.pass__role { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); margin-top: 4px; }
.pass dl { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rule-2); font-family: var(--mono); font-size: 12px; line-height: 1.7; }
.pass dl div { display: flex; gap: 12px; }
.pass dt { width: 62px; flex: none; color: var(--ink-3); }
.pass__code {
  display: block; height: 26px; margin-top: 12px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 5px, var(--ink) 5px 6px, transparent 6px 10px, var(--ink) 10px 13px, transparent 13px 15px, var(--ink) 15px 16px, transparent 16px 21px);
}

/* ---------- process ---------- */
.process { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1.5px solid var(--ink); }
.process li { position: relative; padding: 22px 20px 6px; border-left: 1px solid var(--rule); }
.process li:first-child { padding-left: 0; border-left: 0; }
.process li::before {
  content: ""; position: absolute; left: -1px; top: -6px; width: 11px; height: 11px;
  background: var(--paper-2); border: 1.5px solid var(--ink); border-radius: 50%; transform: translateX(-50%);
}
.process li:first-child::before { left: 0; transform: none; background: var(--accent); }
.process__num { display: block; font-family: var(--display); font-weight: 700; font-size: 64px; line-height: 0.9; color: var(--ink); }
.process h3 { font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1; text-transform: uppercase; margin: 16px 0 8px; }
.process p { color: var(--ink-2); font-size: 15px; line-height: 1.55; }

/* ---------- experience ---------- */
.log { border-top: 1.5px solid var(--ink); }
.log__item { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; padding: 36px 0; border-bottom: 1px solid var(--rule); }
.log__when { font-family: var(--mono); font-size: 13.5px; font-weight: 500; padding-top: 6px; }
.log__when small { display: block; margin-top: 8px; font-weight: 400; font-size: 12px; color: var(--ink-2); }
.log__body h3 { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 3vw, 38px); line-height: 1; text-transform: uppercase; }
.log__org { font-weight: 600; margin: 8px 0 18px; }
.log__body > p:not(.log__org) { color: var(--ink-2); max-width: 70ch; }
.log__body ul { display: grid; gap: 7px; margin-bottom: 20px; max-width: 74ch; }
.log__body li { position: relative; padding-left: 22px; color: var(--ink-2); font-size: 16px; }
.log__body li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 10px; height: 2px; background: var(--accent); }

/* ---------- projects ---------- */
.projects { display: grid; gap: 0; border-top: 1.5px solid var(--ink); }
.project { position: relative; }
.project__no { font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1; color: var(--accent-ink); }
.project--wide {
  display: grid; grid-template-columns: 56px minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 44px);
  align-items: center; padding: 48px 0; border-bottom: 1px solid var(--rule);
}
.project--wide .project__no { align-self: start; }
.project--flip .shot { order: 3; }

.shot {
  display: block; aspect-ratio: 16 / 11.5; overflow: hidden; background: var(--ink);
  border: 1.5px solid var(--ink); box-shadow: 9px 9px 0 rgba(21, 23, 26, 0.14);
  transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .2s ease-out, box-shadow .2s ease-out;
}
.shot:hover { box-shadow: 13px 13px 0 var(--accent); }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

.project__body { display: flex; flex-direction: column; gap: 12px; }
.project__cat { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.project__body h3 { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 3.2vw, 44px); line-height: 0.98; text-transform: uppercase; }
.project__body > p:not(.project__cat) { color: var(--ink-2); font-size: 16px; }
.project__metrics { display: flex; flex-wrap: wrap; gap: 6px 30px; padding: 4px 0; }
.project__metrics li { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.project__metrics strong { display: block; font-family: var(--display); font-size: 32px; line-height: 1.05; color: var(--ink); }
.project__links { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 6px; }
.project__links a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; border-bottom: 1.5px solid var(--accent); padding-bottom: 2px; }
.project__links a:hover { color: var(--accent-ink); }

.projects__grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.project--code { display: flex; flex-direction: column; gap: 18px; padding: 40px 0; border-bottom: 1px solid var(--rule); }
.project--code:nth-child(odd) { padding-right: clamp(20px, 3vw, 44px); border-right: 1px solid var(--rule); }
.project--code:nth-child(even) { padding-left: clamp(20px, 3vw, 44px); }
.project--code .project__body { flex: 1; }
.project--code h3 { font-size: clamp(28px, 2.6vw, 36px); }

.term { background: var(--ink); color: #e9e5db; border-radius: 4px; overflow: hidden; }
.term figcaption {
  padding: 9px 14px; border-bottom: 1px solid rgba(242, 239, 232, 0.16);
  font-family: var(--mono); font-size: 12px; color: #a9adb3;
}
.term figcaption::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 10px; }
.term pre { padding: 14px 16px; min-height: 172px; overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 1.75; }
.k { color: #f0b455; } .s { color: #9fd8b4; } .c { color: #868b92; } .p { color: #ff7a45; }
.layers { display: grid; gap: 7px; padding: 14px 16px; min-height: 172px; align-content: center; }
.layers span {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 7px 11px; border: 1px solid rgba(242, 239, 232, 0.3); border-radius: 3px;
  font-family: var(--mono); font-size: 12.5px; color: #f2efe8;
}
.layers span:nth-child(2) { margin-inline: 10px; }
.layers span:nth-child(3) { margin-inline: 20px; }
.layers span:nth-child(4) { margin-inline: 30px; border-color: var(--accent); }
.layers small { color: #a9adb3; font-size: 11px; }

/* ---------- skills ---------- */
.skills { border-top: 1.5px solid var(--ink); }
.skills__row { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 32px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.skills__row h3 { font-family: var(--display); font-weight: 700; font-size: 27px; line-height: 1.05; text-transform: uppercase; }

/* ---------- contact ---------- */
.contact { background: var(--ink); color: var(--paper); padding: clamp(90px, 16vh, 170px) 0 clamp(60px, 10vh, 110px); }
.contact .head__no { color: #ff7a45; }
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: center; }

/* a patch lead that plugs in when the section scrolls into view */
.plug { width: 100%; height: auto; overflow: visible; }
.plug * { fill: none; stroke: #f2efe8; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.plug .plug__dark { fill: #f2efe8; stroke: none; opacity: .16; }
.plug .plug__cable { stroke: var(--accent); stroke-width: 9; }
.plug .plug__body { fill: var(--ink); }
.plug .plug__lead { transform: translateX(120px); transition: transform .9s cubic-bezier(.2, .8, .2, 1) .25s; }
.plug .plug__led { fill: #5d615b; stroke: none; transition: fill .2s ease 1.15s; }
.plug text { fill: #b9bcc0; stroke: none; font-family: var(--mono); font-size: 13px; letter-spacing: .12em; opacity: 0; transition: opacity .3s ease 1.25s; }
.js .reveal.is-visible .plug__lead, html:not(.js) .plug__lead { transform: none; }
.js .reveal.is-visible .plug__led, html:not(.js) .plug__led { fill: #22b35f; }
.js .reveal.is-visible text, html:not(.js) .plug text { opacity: 1; }
.contact__title {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(46px, 7.4vw, 124px); line-height: 0.9; max-width: 14ch; margin: 16px 0 28px;
}
.contact__lede { color: #b9bcc0; max-width: 58ch; font-size: 18px; }
.contact__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; margin-top: 40px; }
.contact__mail {
  font-family: var(--mono); font-weight: 500; font-size: clamp(18px, 2.9vw, 38px); line-height: 1.2;
  border-bottom: 3px solid var(--accent); padding-bottom: 4px; overflow-wrap: anywhere;
  transition: color .15s;
}
.contact__mail:hover { color: #ff7a45; }
.socials { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 56px; padding-top: 22px; border-top: 1px solid rgba(242, 239, 232, 0.22); }
.socials a, .socials span { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 13.5px; color: #d8d5cd; }
.socials a:hover { color: #fff; }
.socials .ic { color: #ff7a45; }

/* ---------- footer: a drawing's title block ---------- */
.footer { background: var(--ink); color: #b9bcc0; padding-bottom: 28px; }
.footer__inner { display: grid; grid-template-columns: 1fr 1.4fr 1.4fr; border: 1px solid rgba(242, 239, 232, 0.28); }
.footer p { padding: 12px 14px; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; }
.footer p + p { border-left: 1px solid rgba(242, 239, 232, 0.28); }
.footer span:first-child { display: block; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: #8b8f95; }
.footer a { color: #f2efe8; border-bottom: 1px solid var(--accent); }

/* ---------- reveal on scroll (only when JS runs) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .brand span { display: none; }
  .nav__links { gap: 18px; }
  .process { grid-template-columns: repeat(3, 1fr); row-gap: 34px; }
  .process li:nth-child(4) { padding-left: 0; border-left: 0; }
  .process li:nth-child(4)::before { left: 0; transform: none; }
  .skills__row { grid-template-columns: 240px minmax(0, 1fr); }
}

@media (max-width: 1000px) {
  .nav__toggle { display: block; }
  .nav__cta { display: none; }
  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto 0; margin: 0;
    flex-direction: column; gap: 0; padding: 6px var(--gutter) 18px;
    background: var(--paper); border-bottom: 1.5px solid var(--ink);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav__links a { padding: 15px 2px; font-size: 14px; border-bottom: 1px solid var(--rule); }
  .nav.is-open { background: var(--paper); border-color: var(--ink); }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; transform: none; }
  .nav.is-open .ic--open { display: none; }
  .nav.is-open .ic--close { display: block; }

  /* stage: text first, then the rack sticks under the nav while the steps scroll below it */
  .stage { display: block; }
  .stage__hero { min-height: 0; padding: calc(var(--nav-h) + 36px) var(--gutter) 40px; }
  .stage__visual {
    top: var(--nav-h); height: 46vh; height: 46svh; z-index: 2;
    background: var(--paper); border-block: 1.5px solid var(--ink);
  }
  .stage__steps { padding: 0 var(--gutter) 8vh; }
  .steps__head { padding: 7vh 0 4vh; }
  .step { min-height: 46vh; min-height: 46svh; max-width: none; padding: 4vh 0 4vh 18px; }
  .js .step.is-active::before { top: 4vh; height: calc(100% - 8vh); }
  .rack__leaders, .rack__labels { display: none; }
  .rack__note { display: none; }

  .about { grid-template-columns: 1fr; }
  .about__id { position: static; }
  .log__item { grid-template-columns: 1fr; gap: 14px; }
  .log__when { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; }
  .log__when small { margin-top: 0; }
  .project--wide { grid-template-columns: 1fr; gap: 20px; padding: 36px 0; }
  .project--flip .shot { order: 0; }
  .projects__grid { grid-template-columns: 1fr; }
  .project--code:nth-child(n) { padding: 34px 0; border-right: 0; }
  .skills__row { grid-template-columns: 1fr; gap: 12px; }
  .head--row { flex-direction: column; align-items: flex-start; }
  .contact__grid { grid-template-columns: 1fr; }
  .contact__art { display: none; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer p + p { border-left: 0; border-top: 1px solid rgba(242, 239, 232, 0.28); }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero__title { font-size: clamp(50px, 15.5vw, 84px); }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
  .hero__photo { width: 64px; height: 64px; }
  .hero__kicker { font-size: 11.5px; }
  .hero__tools { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hero__tools p { max-width: none; }
  .hero__tools img { height: 32px; max-width: 100%; }
  .specs { grid-template-columns: 1fr 1fr; }
  .specs li:nth-child(3) { padding-left: 0; border-left: 0; }
  .specs li:nth-child(n + 3) { margin-top: 14px; border-top: 1px solid var(--rule); }
  .checks, .facts { grid-template-columns: 1fr; }
  .facts div:nth-child(even) { padding-left: 0; border-left: 0; }
  .process { grid-template-columns: 1fr; row-gap: 0; }
  .process li { padding: 20px 0 20px 22px; border-left: 1px solid var(--rule-2); }
  .process li:nth-child(n) { padding-left: 22px; border-left: 1px solid var(--rule-2); }
  .process li:nth-child(n)::before { left: -1px; top: 26px; transform: translateX(-50%); }
  .process__num { font-size: 46px; }
  .layers span { flex-direction: column; align-items: flex-start; gap: 2px; }
  .contact__actions .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero__title path { stroke-dashoffset: 0; }
  .plug .plug__lead { transform: none; }
  .plug .plug__led { fill: #22b35f; }
  .plug text { opacity: 1; }
}
