/* ==========================================================================
   Dakota Bacchus — dakotabacchus.com
   Shared stylesheet. Hand-edited, no build step.

   Two themes, one toggle: default (white sheet) and [data-theme="blueprint"]
   (Klein-blue drafting sheet). Everything themeable is a custom property, so
   adding a page means writing markup, not re-deriving colours.
   ========================================================================== */

/* --- Tokens -------------------------------------------------------------- */

/* Neutrals carry a slight warm bias so they agree with --faint, which was
   always a warm grey. Cold type against warm hairlines was the mismatch. */
:root {
  --bg:          #FDFCFA;
  --surface:     #F4F2ED;
  --ink:         #1A1714;
  --dim:         #6E665D;
  --faint:       #D8D4CB;

  --accent:      #002FA7;   /* International Klein Blue — the only accent */
  --accent-bg:   #002FA7;
  --accent-fg:   #FFFFFF;

  --ink-bg:      #1A1714;
  --ink-fg:      #FDFCFA;

  --rule:        #1A1714;
  --dot-empty:   #FDFCFA;

  --grid:        none;

  --pad:         40px;
  --measure:     1280px;
  --ease:        cubic-bezier(.2, .7, .2, 1);
}

[data-theme="blueprint"] {
  --bg:          #002FA7;
  --surface:     rgba(255, 255, 255, .08);
  --ink:         #FFFFFF;
  --dim:         rgba(255, 255, 255, .75);
  --faint:       rgba(255, 255, 255, .45);

  --accent:      #FFFFFF;   /* in blueprint, everything accent-coloured is white */
  --accent-bg:   #FFFFFF;
  --accent-fg:   #002FA7;

  --ink-bg:      #FFFFFF;
  --ink-fg:      #002FA7;

  --rule:        rgba(255, 255, 255, .85);
  --dot-empty:   #002FA7;

  --grid: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
          linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
}

/* --- Base ---------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image: var(--grid);
  background-size: 28px 28px;
  color: var(--ink);
  font-family: Archivo, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  transition: background-color .25s, color .25s;
}

::selection { background: var(--accent-bg); color: var(--accent-fg); }

a { color: inherit; }

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  background: var(--ink-bg);
  color: var(--ink-fg);
  padding: 15px 20px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font: 600 12px/1 'IBM Plex Mono', monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
}
.skip:focus { left: 0; }

.shell {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --- Masthead ------------------------------------------------------------ */

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 18px 0;
  border-bottom: 1.5px solid var(--rule);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font: 600 13px/1 'IBM Plex Mono', monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 15px 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;          /* touch target, not decoration */
  font: 500 12px/1 'IBM Plex Mono', monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 16px 0;
  transition: color .2s;
}
.nav a:hover { color: var(--accent); }

/* Blueprint toggle */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 0 0 2px;
  border: 0;
  background: none;
  color: inherit;
  font: 500 12px/1 'IBM Plex Mono', monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .2s;
}
.toggle:hover { color: var(--accent); }

.toggle__box {
  width: 26px;
  height: 13px;
  border: 1.5px solid currentColor;
  position: relative;
}
.toggle__box::after {
  content: "";
  position: absolute;
  top: 1.5px; left: 1.5px;
  width: 8px; height: 8px;
  background: currentColor;
  transition: transform .25s var(--ease);
}
.toggle[aria-pressed="true"] .toggle__box::after { transform: translateX(11px); }

/* --- Hero ---------------------------------------------------------------- */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 44px;
  padding: 56px 0;
  min-height: min(76vh, 720px);
}

.hero__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: end;
}

.hero__intro {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
/* One line of orientation. Without it a first-time visitor gets a name and a
   readout that only makes sense once you have already scrubbed the route. */
.hero__standfirst {
  margin: 0;
  font: 400 16.5px/1.55 Archivo, sans-serif;
  color: var(--dim);
  max-width: 52ch;
  text-wrap: pretty;
}

.hero__name {
  margin: 0;
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(46px, 6.2vw, 84px);
  line-height: .9;
  letter-spacing: -.04em;
  text-transform: uppercase;
}
.hero__name .dot { color: var(--accent); }

.rise { display: block; overflow: hidden; }
.rise > span {
  display: inline-block;
  animation: rise .7s var(--ease) both;
}
.rise:nth-of-type(1) > span { animation-delay: .05s; }
.rise:nth-of-type(2) > span { animation-delay: .18s; }

@keyframes rise { from { transform: translateY(110%); } to { transform: translateY(0); } }

.readout {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.readout__year {
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(64px, 8vw, 110px);
  line-height: .85;
  letter-spacing: -.04em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.readout__text {
  font: 400 15px/1.5 Archivo, sans-serif;
  color: var(--dim);
  max-width: 300px;
  text-align: right;
  min-height: 3em;         /* reserve space so the row never jumps mid-scrub */
}

/* --- Route --------------------------------------------------------------- */

.route {
  position: relative;
  cursor: ew-resize;
  touch-action: pan-y;     /* vertical scroll still belongs to the page */
}
.route__scrub { display: block; }
.route__scrub:focus-visible { outline-offset: 6px; }

.route__svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.line-base { stroke: var(--faint); stroke-width: 1.5; fill: none; }
.line-prog { stroke: var(--accent); stroke-width: 2.5; fill: none; }

.fork {
  stroke: var(--ink);
  stroke-width: 1.5;
  fill: none;
  cursor: pointer;
  transition: stroke .25s, stroke-width .25s;
}
.fork.is-hot { stroke: var(--accent); stroke-width: 3; }

.dot-node {
  fill: var(--dot-empty);
  stroke: var(--ink);
  stroke-width: 1.5;
  transition: fill .15s, stroke .15s;
}
.dot-node.is-passed { fill: var(--accent); stroke: var(--accent); }

.dot-now {
  fill: var(--accent);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .15; } }

.route__labels text,
.route__now {
  font: 600 10px 'IBM Plex Mono', monospace;
  letter-spacing: .12em;
}
.route__labels text { fill: var(--dim); }
.route__now { fill: var(--accent); }

/* Door labels — absolutely placed at the ends of the fork paths */
.door {
  position: absolute;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  text-align: right;
  text-decoration: none;
  color: var(--ink);
  padding: 10px 0;
  background: var(--bg);   /* keeps the label legible where it meets the curve */
  transition: color .25s;
}
[data-theme="blueprint"] .door { background: transparent; }

.door--a { top: 2%; }
.door--b { bottom: 6%; }
.door.is-hot { color: var(--accent); }

.door__kicker {
  font: 600 10px 'IBM Plex Mono', monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.door__title {
  font: 800 17px Archivo, sans-serif;
  font-stretch: 125%;
  letter-spacing: -.01em;
  text-transform: uppercase;
}

.hint {
  margin: 0;
  font: 600 10px 'IBM Plex Mono', monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
}

/* --- Flagship ------------------------------------------------------------ */
/* One project, shown. Replaced the two portal cards, which restated the fork
   doors sitting 200px above them. */

.flagship {
  border-top: 1.5px solid var(--rule);
  padding: 48px 0 56px;
}

.flagship__link {
  display: flex;
  flex-direction: column;
  gap: 22px;
  text-decoration: none;
  color: var(--ink);
}
.flagship__link:focus-visible { outline-offset: 6px; }


.flagship__meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 40px;
  align-items: end;
}

.flagship__text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.flagship__kicker {
  font: 600 10.5px 'IBM Plex Mono', monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}
.flagship__title { margin: 0; }
.flagship__title {
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: .95;
  letter-spacing: -.02em;
  text-transform: uppercase;
  transition: color .25s;
}
.flagship__desc {
  font: 400 16px/1.6 Archivo, sans-serif;
  color: var(--dim);
  max-width: 56ch;
  text-wrap: pretty;
}

.flagship__cta {
  font: 600 11.5px 'IBM Plex Mono', monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color .25s;
}

.flagship__link:hover .flagship__title,
.flagship__link:hover .flagship__cta,
.flagship__link:focus-visible .flagship__title,
.flagship__link:focus-visible .flagship__cta { color: var(--accent); }

/* --- Images ------------------------------------------------------------- */

.flagship__img,
.project__img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--faint);
  background: var(--surface);
}

.flagship__img { aspect-ratio: 2400 / 1100; object-fit: cover; }

/* The .slot placeholder rules were removed once the real renders landed. */

/* --- Plates: the drawings under each project ---------------------------- */
/* The lead render sells the project; these are the drawings that prove it.
   Uniform tiles because the sources are wildly different shapes — a 4.6:1
   section next to a square model photo — and a ragged grid would read as an
   accident rather than a set. The full proportions come back in the lightbox. */

.plates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 18px 14px;
  margin-top: 14px;
}

.plate { margin: 0; }

/* A long section IS long — let the shape of the drawing claim the space it
   needs instead of being cropped to fit a uniform tile. */
.plate--wide { grid-column: span 2; }

.plate__btn {
  display: block;
  width: 100%;
  padding: 8px;
  border: 1px solid var(--faint);
  /* Drawings live on paper. The mat stays paper-white in blueprint mode too,
     so a white sheet doesn't glare against the Klein-blue ground and a
     near-black fragment section doesn't float on nothing. */
  background: #FBFAF7;
  cursor: zoom-in;
  transition: border-color .18s var(--ease);
}
.plate__btn:hover { border-color: var(--accent); }
.plate__btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.plate__btn img {
  display: block;
  width: 100%;
  height: 116px;
  /* contain, never cover: the edges of a drawing carry information. */
  object-fit: contain;
  object-position: center;
}
.plate--tall .plate__btn img { height: 190px; }
.plate--wide .plate__btn img { height: 116px; }

.plate__cap {
  margin: 7px 1px 0;
  font: 400 12px/1.4 'IBM Plex Mono', monospace;
  letter-spacing: .01em;
  color: var(--dim);
  text-wrap: pretty;
}

/* --- Lightbox ----------------------------------------------------------- */

.lb {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  /* Nothing here is typeable, so no caret should ever show. With caret
     browsing switched on (F7) the browser parks a blinking one wherever
     focus lands — over the drawing, at the close button. Scoped to the
     viewer so caret browsing still works everywhere else. */
  caret-color: transparent;
}
.lb[hidden] { display: none; }

/* The stage is a viewport; the image is positioned and transformed inside it,
   so zooming and panning are one transform rather than layout work. */
.lb__stage {
  flex: 1;
  position: relative;
  min-height: 0;
  overflow: hidden;
  margin: 56px 16px 8px;
  touch-action: none;   /* we handle drag ourselves once zoomed */
}
.lb__img {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  background: #FBFAF7;
  border: 1px solid var(--faint);
  will-change: transform;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}
.lb__stage[data-zoomable="yes"] .lb__img { cursor: zoom-in; }
.lb__stage[data-zoomed="yes"] .lb__img { cursor: grab; }
.lb__stage[data-panning="yes"] .lb__img { cursor: grabbing; }

/* Only animate the snap back to fit — panning must track the pointer exactly. */
.lb__img.is-eased { transition: transform .22s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .lb__img.is-eased { transition: none; }
}

.lb__hint {
  position: absolute;
  left: 0;
  bottom: 8px;
  width: 100%;
  text-align: center;
  pointer-events: none;
  font: 500 11px/1 'IBM Plex Mono', monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
  opacity: .9;
}
.lb__hint[hidden] { display: none; }

.lb__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px var(--pad) 18px;
  border-top: 1.5px solid var(--rule);
  flex-wrap: wrap;
}
.lb__caption {
  flex: 1 1 260px;
  min-width: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--dim);
}
.lb__count {
  font: 500 12px/1 'IBM Plex Mono', monospace;
  letter-spacing: .1em;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.lb__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--rule);
  background: var(--bg);
  color: var(--ink);
  font: 600 13px/1 Archivo, sans-serif;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.lb__btn:hover { background: var(--ink-bg); color: var(--ink-fg); border-color: var(--ink-bg); }
.lb__btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.lb__btn[disabled] { opacity: .35; cursor: default; }
.lb__btn[disabled]:hover { background: var(--bg); color: var(--ink); border-color: var(--rule); }

.lb__close {
  position: absolute;
  top: 10px;
  right: var(--pad);
}

@media (max-width: 700px) {
  .plates { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px 10px; }
  .plate__btn img { height: 94px; }
  .plate--tall .plate__btn img { height: 150px; }
  .plate__cap { font-size: 11px; }
  .lb__stage { padding: 52px 10px 6px; }
  .lb__caption { flex-basis: 100%; order: 3; }
}
/* Two narrow columns can't hold a double-width plate. */
@media (max-width: 420px) {
  .plate--wide { grid-column: span 1; }
}

/* --- Closing / contact --------------------------------------------------- */
/* The last thing on the page, so it reads as a statement rather than another
   labelled band. Left-aligned stack, email as the display element. */

.closing {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  border-top: 1.5px solid var(--rule);
  padding: 56px 0 72px;
}

.closing__label {
  margin: 0;
  font: 600 11.5px/1 'IBM Plex Mono', monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Sized by fitText() in site.js so the address always fills exactly one line,
   whatever address is in the markup. The clamp below is the no-JS fallback and
   the value JS starts from — it is overwritten on load and on resize. */
.closing__email {
  display: block;
  white-space: nowrap;
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(22px, 5vw, 68px);
  line-height: 1.05;
  letter-spacing: -.03em;
  text-decoration: none;
  transition: color .2s;
  max-width: 100%;
}
.closing__email:hover { color: var(--accent); }

.closing__meta {
  margin: 0;
  font: 500 11.5px/1.5 'IBM Plex Mono', monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
}

.closing__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 11px 20px;
  border: 1.5px solid var(--rule);
  background: none;
  color: var(--ink);
  font: 500 12px/1 'IBM Plex Mono', monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.btn:hover { background: var(--ink-bg); color: var(--ink-fg); }
.btn[data-copied] { background: var(--accent-bg); color: var(--accent-fg); border-color: var(--accent-bg); }

/* --- Colophon ------------------------------------------------------------ */

.colophon {
  margin-top: auto;
  border-top: 1.5px solid var(--rule);
  padding: 28px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font: 500 11.5px/1 'IBM Plex Mono', monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
}
.colophon__status { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.pip {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 1060px) {
  .hero__top { grid-template-columns: 1fr; gap: 24px; }
  .readout { align-items: flex-start; }
  .readout__text { text-align: left; }
}

/* The masthead wraps, but .nav did not — so on a phone the three links plus
   the toggle stayed one ~450px row inside a ~330px page and pushed the whole
   document sideways. Let the row wrap and tighten the gap instead of hiding
   anything behind a hamburger: four items do not need a menu. */
@media (max-width: 560px) {
  .masthead { gap: 4px; padding: 14px 0; }
  .nav {
    flex-wrap: wrap;
    gap: 6px 18px;
    width: 100%;
  }
  .nav a, .toggle { font-size: 11px; letter-spacing: .08em; }
  .wordmark { min-height: 0; padding: 8px 0; }
}

/* Nothing should ever push the page sideways. If something new does, this
   contains the damage instead of shipping a horizontal scrollbar. */
html, body { overflow-x: clip; }

@media (max-width: 900px) {
  :root { --pad: 24px; }

  /* Doors leave the fork and become stacked cards; the scrub stays. */
  .doors {
    display: grid;
    gap: 0;
    margin-top: 28px;
    border-top: 1.5px solid var(--rule);
  }
  .door {
    position: static;
    align-items: flex-start;
    text-align: left;
    gap: 6px;
    padding: 22px 0;
    border-bottom: 1.5px solid var(--rule);
    background: transparent;
  }
  .door__title { font-size: 20px; }

  .flagship__meta { grid-template-columns: 1fr; align-items: start; }
  .flagship { padding: 36px 0 44px; }

  .closing { padding: 44px 0 56px; }
}

/* The SVG scales with its viewBox, so a fixed 10px label shrinks with the
   page and goes illegible around 1060px. Rather than hide the labels — which
   cost the hero half its content on any laptop at partial width — grow them
   in user units as the page narrows, so their rendered size holds steady.
   Below 620px four labels can no longer sit side by side, so there they go. */
@media (max-width: 1060px) { .route__labels text { font-size: 13px; } }
@media (max-width: 860px)  { .route__labels text { font-size: 16px; } }
@media (max-width: 720px)  { .route__labels text { font-size: 19px; letter-spacing: .06em; } }
@media (max-width: 620px)  { .route__labels { display: none; } }

@media (max-width: 700px) {
  .hero { min-height: 0; padding: 40px 0; gap: 32px; }
}

/* --- Motion preferences -------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* --- Print --------------------------------------------------------------- */

@media print {
  .toggle, .route, .hint, .skip { display: none; }
  body { background: #fff; color: #000; }
}

/* ==========================================================================
   Sub-pages — portfolio.html, achievements.html
   Shares the tokens above. The label/body band is the repeating unit.
   ========================================================================== */

.nav a[aria-current="page"] { color: var(--accent); }

/* --- Page head ----------------------------------------------------------- */

.page-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 64px 0 48px;
}
.page-head__kicker {
  font: 600 10.5px 'IBM Plex Mono', monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}
.page-head__title {
  margin: 0;
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(40px, 6vw, 78px);
  line-height: .9;
  letter-spacing: -.04em;
  text-transform: uppercase;
}
.page-head__intro {
  margin: 0;
  font: 400 18px/1.6 Archivo, sans-serif;
  color: var(--dim);
  max-width: 58ch;
  text-wrap: pretty;
}

/* --- Band: mono label column + body -------------------------------------- */

.band {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  padding: 48px 0;
  border-top: 1.5px solid var(--rule);
}
.band__label {
  margin: 0;
  font: 600 11.5px/1.6 'IBM Plex Mono', monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
  align-self: start;
}
.band__body { min-width: 0; }

/* --- Projects ------------------------------------------------------------ */

.project {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 40px 0;
  border-top: 1px solid var(--faint);
}
.project:first-child { border-top: 0; padding-top: 0; }

.project__head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.project__num {
  font: 600 11px 'IBM Plex Mono', monospace;
  letter-spacing: .16em;
  color: var(--accent);
}
.project__title {
  margin: 0;
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(26px, 3vw, 38px);
  line-height: .95;
  letter-spacing: -.02em;
  text-transform: uppercase;
}
.project__meta {
  font: 500 11px 'IBM Plex Mono', monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
}
.project__desc {
  margin: 0;
  font: 400 16px/1.65 Archivo, sans-serif;
  max-width: 64ch;
  text-wrap: pretty;
}

/* --- Résumé -------------------------------------------------------------- */

.cv { display: flex; flex-direction: column; gap: 36px; }

.job { display: flex; flex-direction: column; gap: 10px; }
.job__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--faint);
  padding-bottom: 8px;
}
.job__role {
  margin: 0;
  font: 800 19px Archivo, sans-serif;
  font-stretch: 110%;
  letter-spacing: -.01em;
}
.job__meta {
  font: 500 11px 'IBM Plex Mono', monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}
.job__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.job__list li {
  position: relative;
  padding-left: 18px;
  font: 400 15px/1.6 Archivo, sans-serif;
  max-width: 68ch;
}
.job__list li::before {
  content: "";
  position: absolute;
  left: 0; top: .62em;
  width: 7px; height: 1.5px;
  background: var(--accent);
}

.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 28px;
}
.skills h3 {
  margin: 0 0 10px;
  font: 600 10.5px 'IBM Plex Mono', monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.skills ul {
  margin: 0; padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font: 400 15px/1.5 Archivo, sans-serif;
}

/* --- Achievements -------------------------------------------------------- */

.entries { display: flex; flex-direction: column; }

.entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 24px;
  align-items: baseline;
  padding: 18px 0;
  border-top: 1px solid var(--faint);
}
.entry:first-child { border-top: 0; padding-top: 0; }

.entry__name {
  margin: 0;
  font: 700 17px/1.35 Archivo, sans-serif;
  font-stretch: 110%;
  letter-spacing: -.01em;
}
.entry__date {
  font: 500 11px 'IBM Plex Mono', monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}
.entry__note {
  grid-column: 1 / -1;
  margin: 0;
  font: 400 15px/1.6 Archivo, sans-serif;
  color: var(--dim);
  max-width: 68ch;
  text-wrap: pretty;
}
.entry__note a { color: var(--accent); }

.tag {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 8px;
  border: 1.5px solid var(--accent);
  font: 600 9.5px 'IBM Plex Mono', monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  vertical-align: 2px;
}

/* --- Tail ---------------------------------------------------------------- */

.tail {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  padding: 44px 0 64px;
  border-top: 1.5px solid var(--rule);
}
.tail a {
  font: 600 12px 'IBM Plex Mono', monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .2s;
}
.tail a:hover { color: var(--accent); }

@media (max-width: 900px) {
  .band { grid-template-columns: 1fr; gap: 20px; padding: 36px 0; }
  .page-head { padding: 44px 0 32px; }
  .entry { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Notes — notes.html (index) and notes/*.html (posts)
   ========================================================================== */

/* --- Index --------------------------------------------------------------- */

.notes { display: flex; flex-direction: column; }

.note-item {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 6px 32px;
  align-items: baseline;
  padding: 28px 0;
  border-top: 1px solid var(--faint);
  text-decoration: none;
  color: var(--ink);
  transition: color .2s;
}
.note-item:first-child { border-top: 0; padding-top: 0; }
.note-item:hover { color: var(--accent); }

.note-item__date {
  font: 500 11px 'IBM Plex Mono', monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
  transition: color .2s;
}
.note-item:hover .note-item__date { color: var(--accent); }

.note-item__title {
  margin: 0;
  font-weight: 900;
  font-stretch: 115%;
  font-size: clamp(21px, 2.4vw, 29px);
  line-height: 1.05;
  letter-spacing: -.02em;
  text-transform: uppercase;
}
.note-item__excerpt {
  grid-column: 2;
  margin: 0;
  font: 400 15.5px/1.6 Archivo, sans-serif;
  color: var(--dim);
  max-width: 62ch;
  text-wrap: pretty;
}

.tag--kind {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 8px;
  border: 1.5px solid var(--faint);
  font: 600 9.5px 'IBM Plex Mono', monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
  vertical-align: 3px;
}

/* --- Post ---------------------------------------------------------------- */

.note { padding: 56px 0 24px; max-width: 68ch; }

.note__meta {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  font: 500 11px 'IBM Plex Mono', monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 18px;
}

.note__title {
  margin: 0 0 22px;
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(32px, 4.6vw, 58px);
  line-height: .96;
  letter-spacing: -.035em;
  text-transform: uppercase;
  text-wrap: balance;
}

.prose { font-size: 17px; line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; max-width: 66ch; text-wrap: pretty; }
.prose h2 {
  margin: 1.9em 0 0;
  font-weight: 900;
  font-stretch: 115%;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -.02em;
  text-transform: uppercase;
}
.prose ul, .prose ol { margin: 0; padding-left: 20px; max-width: 66ch; }
.prose li + li { margin-top: 6px; }
.prose a { color: var(--accent); }
.prose img { width: 100%; height: auto; border: 1px solid var(--faint); }
.prose blockquote {
  margin: 0;
  padding-left: 20px;
  border-left: 2.5px solid var(--accent);
  font-size: 18px;
  color: var(--dim);
}
.prose code {
  font: 500 14px 'IBM Plex Mono', monospace;
  background: var(--surface);
  padding: 2px 5px;
}
.prose hr { border: 0; border-top: 1px solid var(--faint); margin: 2em 0; }

@media (max-width: 700px) {
  .note-item { grid-template-columns: 1fr; gap: 6px; }
  .note-item__excerpt { grid-column: 1; }
}

/* --- Reference letters --------------------------------------------------- */

.letters { display: flex; flex-direction: column; }

.letter {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 28px;
  align-items: start;
  padding: 34px 0;
  border-top: 1px solid var(--faint);
  margin: 0;
}
.letter:first-child { border-top: 0; padding-top: 0; }

.letter__thumb {
  display: block;
  border: 1px solid var(--faint);
  transition: border-color .2s;
}
.letter__thumb img { display: block; width: 100%; height: auto; }
.letter__thumb:hover { border-color: var(--accent); }

/* Stand-in for the letter with no scan — same footprint, so the row aligns */
.letter__file {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  aspect-ratio: 800 / 1035;
  border: 1px solid var(--faint);
  padding: 12px;
  font: 600 10px 'IBM Plex Mono', monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
  transition: border-color .2s, color .2s;
}
.letter__file:hover { border-color: var(--accent); color: var(--accent); }

.letter__body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.letter__quote {
  margin: 0;
  font: 400 clamp(17px, 1.9vw, 21px)/1.5 Archivo, sans-serif;
  letter-spacing: -.01em;
  max-width: 56ch;
  text-wrap: pretty;
}
.letter__quote::before { content: "\201C"; }
.letter__quote::after  { content: "\201D"; }

.letter__by {
  font: 500 11px 'IBM Plex Mono', monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
}
.letter__link {
  font: 600 11px 'IBM Plex Mono', monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}
.letter__link:hover { text-decoration: underline; }

@media (max-width: 700px) {
  .letter { grid-template-columns: 96px 1fr; gap: 18px; }
}
.letter__note {
  margin: 0;
  font: 400 16px/1.6 Archivo, sans-serif;
  color: var(--dim);
  max-width: 56ch;
}

/* --- About --------------------------------------------------------------- */

.about {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 36px;
  align-items: start;
}
.about__portrait {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--faint);
}
.about__text { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.about__text p {
  margin: 0;
  font: 400 16.5px/1.65 Archivo, sans-serif;
  max-width: 62ch;
  text-wrap: pretty;
}
.about__lead {
  font-weight: 500 !important;
  font-size: 18.5px !important;
}

@media (max-width: 700px) {
  .about { grid-template-columns: 1fr; gap: 22px; }
  .about__portrait { max-width: 220px; }
}
