/* =========================================================================
   Hesron Kija — portfolio
   Editorial dark: warm charcoal, bone, burnt sienna.
   Written by hand. No framework, no utility classes, no gradients.
   ========================================================================= */

/* ---- 1. Tokens ---------------------------------------------------------- */

:root {
  /* Warm charcoal, not blue-black. The warmth is the whole point: it reads as
     paper photographed in low light rather than as a dark-mode toggle. */
  --ink:        #12100e;
  --ink-raised: #1a1817;
  --ink-rule:   rgba(232, 227, 217, 0.14);
  --ink-rule-strong: rgba(232, 227, 217, 0.28);

  --bone:       #e8e3d9;
  --bone-dim:   #9a948a;
  --bone-faint: #6b665e;

  /* Burnt sienna. Used sparingly — rules, one word, the active state. */
  --accent:      #e07a50;  /* 6.4:1 on --ink; safe for small text */
  --accent-deep: #c2552f;  /* fills and rules only */

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans:  "Instrument Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --measure: 34rem;        /* readable line length */
  --gutter: clamp(1.25rem, 5vw, 5.5rem);
  --rule: 1px solid var(--ink-rule);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
  font-variant-numeric: lining-nums tabular-nums;
  -webkit-font-smoothing: antialiased;
  /* `clip`, not `hidden`: hidden would make <body> a scroll container and
     break the sticky masthead in some browsers. */
  overflow-x: clip;
}

/* A faint warm vignette. One texture, applied once — this is the only
   decorative layer on the page. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(120% 80% at 50% 0%, rgba(224, 122, 80, 0.05), transparent 60%);
}

img { max-width: 100%; display: block; }

a { color: inherit; }

::selection { background: var(--accent-deep); color: #fff; }

/* ---- 2. Typography ------------------------------------------------------ */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  font-optical-sizing: auto;
  /* Fraunces' 'wonk' and soft axes are what keep this from reading as a
     default serif. Turning them on is the typography decision. */
  font-variation-settings: "SOFT" 20, "WONK" 1;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

.display {
  font-size: clamp(2.75rem, 1.3rem + 6.4vw, 6.5rem);
}

.h-section {
  font-size: clamp(2rem, 1.2rem + 3.2vw, 3.75rem);
}

p { margin: 0 0 1.15em; max-width: var(--measure); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

em { font-style: italic; }

/* The small mono label is the connective tissue of the whole layout. */
.label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-faint);
  display: block;
}

.label--accent { color: var(--accent); }

.lede {
  font-size: clamp(1.1875rem, 1.05rem + 0.7vw, 1.5rem);
  line-height: 1.45;
  color: var(--bone);
  max-width: 30ch;
}

.muted { color: var(--bone-dim); }

/* ---- 3. Layout shell ---------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: 82rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 1;
}

section { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
section[id] { scroll-margin-top: 5rem; }

.rule { border: 0; border-top: var(--rule); margin: 0; }

/* Section heads share one shape: number, rule, title. */
.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ink-rule-strong);
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

@media (min-width: 60rem) {
  .sec-head {
    grid-template-columns: 14rem minmax(0, 1fr);
    align-items: start;
    gap: 3rem;
  }
}

/* Sub-heads inside a section (Experience, Toolkit): same shape, a step
   smaller, so they read as chapters of About rather than new sections. */
.sec-head--sub { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.sec-head--sub .h-section { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); }

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -150%);
  z-index: 100;
  background: var(--accent-deep);
  color: #fff;
  padding: 0.75rem 1.25rem;
  font: 500 0.875rem/1 var(--sans);
  text-decoration: none;
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

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

/* ---- 4. Masthead -------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.masthead.is-stuck {
  border-bottom-color: var(--ink-rule);
  background: color-mix(in srgb, var(--ink) 96%, transparent);
}

.masthead .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.125rem;
}

.masthead__name {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bone);
  white-space: nowrap;
}

.masthead__nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
}

.masthead__nav a {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bone-faint);
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.masthead__nav a:hover,
.masthead__nav a.is-active {
  color: var(--bone);
  border-bottom-color: var(--accent);
}
.masthead__nav .n { color: var(--accent); margin-right: 0.4em; }
/* Small phones: drop the section numbers so all three links fit. */
@media (max-width: 26rem) {
  .masthead__nav .n { display: none; }
}

/* ---- 5. Hero ------------------------------------------------------------ */

.hero { padding-top: clamp(3rem, 8vw, 6rem); padding-bottom: clamp(4rem, 9vw, 8rem); }

.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
}

@media (min-width: 62rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    align-items: end;
  }
}

.hero__kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

/* The headline is the hero. No illustration competes with it. */
.hero h1 .quiet { color: var(--bone-dim); display: block; }
.hero h1 .loud  { display: block; }
.hero h1 .loud em {
  font-style: italic;
  color: var(--accent);
  font-variation-settings: "SOFT" 60, "WONK" 1;
}

.hero__lede { margin-top: clamp(1.75rem, 3vw, 2.5rem); }

.hero__body {
  margin-top: 1.5rem;
  color: var(--bone-dim);
  max-width: 38rem;
}

/* Facts as a ruled ledger rather than three glowing stat cards. */
.facts {
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  border-top: var(--rule);
  display: grid;
  gap: 0;
}
.facts div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.7rem 0;
  border-bottom: var(--rule);
}
.facts dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-faint);
}
.facts dd { margin: 0; text-align: right; }
/* Phones: label above value, both left-aligned, so long values wrap
   cleanly instead of ragged against the right edge. */
@media (max-width: 36rem) {
  .facts div { display: grid; gap: 0.2rem; padding: 0.75rem 0; }
  .facts dd { text-align: left; }
}
.facts .figure {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-variation-settings: "SOFT" 20, "WONK" 1;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(2rem, 4vw, 2.75rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.3rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink-rule-strong);
  color: var(--bone);
  background: transparent;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn--solid {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #fff;
}
.btn--solid:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn .arr { font-family: var(--sans); transition: transform 0.25s var(--ease); }
.btn:hover .arr { transform: translateX(2px); }
.btn:active, .filter:active { transform: translateY(1px); }
.btn, .filter { transition-property: background, border-color, color, transform; }

/* Portrait: a real photographic element, square-cropped, no glow or frame. */
.portrait { position: relative; max-width: 27rem; width: 100%; margin-inline: auto; perspective: 900px; }
/* Stacked layout: a portrait, not a full-screen poster. */
@media (max-width: 61.99rem) {
  .portrait { max-width: min(19rem, 78%); margin-inline: 0; }
}
.portrait__frame {
  position: relative;
  overflow: hidden;
  background: var(--ink-raised);
  transform-style: preserve-3d;
  transition: transform 0.7s var(--ease);
}
.portrait:hover .portrait__frame { transform: rotateX(1.5deg) rotateY(-2deg) translateY(-4px); }
.portrait img {
  width: 100%;
  /* height:auto lets aspect-ratio win over the img's height attribute,
     which otherwise pins the photo at 896px tall on every screen. */
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  /* Anchor to the top: the bottom edge of the original has a stray highlight. */
  object-position: 50% 0%;
  filter: grayscale(100%) contrast(1.08) brightness(0.92);
  transition: filter 0.7s var(--ease);
}
.portrait:hover img { filter: grayscale(0%) contrast(1) brightness(1); }
.portrait__scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(224, 122, 80, 0.16) 50%, transparent 50.2%),
    linear-gradient(rgba(232, 227, 217, 0.035) 1px, transparent 1px);
  background-size: 100% 100%, 100% 32px;
  opacity: 0.38;
}
.portrait__location {
  position: absolute;
  font: 500 0.55rem/1 var(--mono);
  letter-spacing: 0.12em;
  color: var(--bone);
  background: rgba(18, 16, 14, 0.72);
  padding: 0.4rem 0.5rem;
  text-transform: uppercase;
}
.portrait__location--origin { left: 0.75rem; bottom: 0.75rem; }
.portrait__location--now { right: 0.75rem; top: 0.75rem; }
.portrait figcaption {
  margin-top: 0.75rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-faint);
  border-top: var(--rule);
  padding-top: 0.6rem;
}

.status { display: inline-flex; align-items: center; gap: 0.5rem; }
.status::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex: none;
}
/* A slow ring on the hero status dot only: it says "open" without blinking. */
.hero .status::before { animation: status-ring 2.8s ease-out infinite; }
@keyframes status-ring {
  0%   { box-shadow: 0 0 0 0 rgba(224, 122, 80, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(224, 122, 80, 0); }
  100% { box-shadow: 0 0 0 0 rgba(224, 122, 80, 0); }
}

/* ---- 6. About ----------------------------------------------------------- */

.about__cols { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }

@media (min-width: 60rem) {
  .about__cols { grid-template-columns: 14rem minmax(0, 1fr); gap: 3rem; }
}

/* A drop cap. Small, deliberate, and the kind of detail a generator
   never adds on its own. */
.dropcap::first-letter {
  font-family: var(--serif);
  font-size: 3.6em;
  line-height: 0.82;
  float: left;
  padding-right: 0.09em;
  padding-top: 0.04em;
  color: var(--accent);
  font-variation-settings: "SOFT" 40, "WONK" 1;
}

.spec { margin: 0; border-top: var(--rule); }
.spec > div { padding: 0.85rem 0; border-bottom: var(--rule); }
.spec dt {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-faint);
  margin-bottom: 0.3rem;
}
.spec dd { margin: 0; font-size: 0.9375rem; line-height: 1.45; }

/* A scroll-linked career path. The line advances with the reader; the copy
   remains useful without JavaScript. */
.journey {
  --journey-progress: 0;
  display: grid;
  gap: clamp(2.5rem, 6vw, 6rem);
  margin-top: clamp(4rem, 9vw, 8rem);
  padding-block: clamp(2rem, 5vw, 4rem);
  border-block: 1px solid var(--ink-rule-strong);
}
@media (min-width: 60rem) {
  .journey { grid-template-columns: minmax(14rem, 0.72fr) minmax(0, 1.28fr); }
  .journey__intro { position: sticky; top: 7rem; align-self: start; }
}
.journey__title { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem); margin: 0.9rem 0 1.25rem; }
.journey__intro p { color: var(--bone-dim); }
.journey__track { position: relative; }
.journey__line {
  position: absolute;
  top: 1.25rem;
  bottom: 1.25rem;
  left: 1.22rem;
  width: 1px;
  background: var(--ink-rule-strong);
  overflow: hidden;
}
.journey__line span {
  display: block;
  width: 100%;
  height: calc(var(--journey-progress) * 100%);
  background: var(--accent);
  transition: height 0.12s linear;
}
.journey__stop {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 1.25rem;
  position: relative;
  padding: 0 0 clamp(3.5rem, 8vw, 6rem);
  opacity: 0.42;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.journey__stop:last-child { padding-bottom: 0; }
.journey__stop.is-current { opacity: 1; transform: translateX(0.35rem); }
.journey__index {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--ink-rule-strong);
  border-radius: 50%;
  background: var(--ink);
  color: var(--bone-faint);
  font: 500 0.625rem/1 var(--mono);
  transition: border-color 0.4s var(--ease), color 0.4s var(--ease), background 0.4s var(--ease);
}
.journey__stop.is-current .journey__index { border-color: var(--accent); color: var(--ink); background: var(--accent); }
.journey__stop h4 { font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); margin: 0.5rem 0 0.75rem; }
.journey__stop p { color: var(--bone-dim); font-size: 0.9375rem; }

/* ---- 7. Experience ------------------------------------------------------ */

.roles { margin-top: clamp(3rem, 6vw, 4.5rem); }

.role {
  display: grid;
  gap: 0.75rem 3rem;
  padding: clamp(1.75rem, 3vw, 2.5rem) 0;
  border-top: var(--rule);
}
.role:last-child { border-bottom: var(--rule); }

@media (min-width: 60rem) {
  .role { grid-template-columns: 14rem minmax(0, 1fr); }
}

.role__when {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-faint);
  padding-top: 0.35rem;
}
.role__title { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); margin-bottom: 0.3rem; }
.role__org { font-size: 0.875rem; color: var(--accent); margin-bottom: 0.9rem; }
.role__body { color: var(--bone-dim); max-width: 44rem; }
.role--current .role__when::after {
  content: "Current";
  display: inline-block;
  margin-left: 0.6rem;
  color: var(--accent);
}

/* ---- 8. Skills ---------------------------------------------------------- */

.skills { display: grid; gap: 0; }

.skills > div {
  display: grid;
  gap: 0.5rem 3rem;
  padding: 1.1rem 0;
  border-top: var(--rule);
}
.skills > div:last-child { border-bottom: var(--rule); }

@media (min-width: 60rem) {
  .skills > div { grid-template-columns: 14rem minmax(0, 1fr); align-items: baseline; }
}

.skills dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-faint);
}
.skills dd { margin: 0; color: var(--bone); line-height: 1.7; }
/* Keep each tool name whole so a line never breaks inside "scikit-learn".
   Flex gives the line a place to wrap between names. */
.skills dd { display: flex; flex-wrap: wrap; }
.skills dd span { white-space: nowrap; }
.skills dd span:not(:last-child)::after {
  content: "·";
  color: var(--bone-faint);
  margin: 0 0.5em;
}

/* ---- 9. Work ------------------------------------------------------------ */

.data-lab {
  padding: 0;
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
  border: 1px solid var(--ink-rule-strong);
  background: var(--ink-raised);
}
.data-lab__head {
  display: grid;
  gap: 1.5rem 3rem;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  border-bottom: var(--rule);
}
@media (min-width: 60rem) {
  .data-lab__head { grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr); align-items: end; }
}
.data-lab__head h3 { font-size: clamp(1.8rem, 1.3rem + 2vw, 3.1rem); margin-top: 0.85rem; max-width: 18ch; }
.data-lab__head p { color: var(--bone-dim); font-size: 0.9375rem; }
.data-lab__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  padding: 1rem clamp(1.5rem, 4vw, 2.75rem);
  border-bottom: var(--rule);
}
.data-lab__controls > .label { margin-right: 0.5rem; }
.filter {
  appearance: none;
  border: 1px solid var(--ink-rule-strong);
  background: transparent;
  color: var(--bone-dim);
  padding: 0.55rem 0.8rem;
  font: 500 0.625rem/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.filter:hover { color: var(--bone); border-color: var(--accent); }
.filter.is-active { color: var(--ink); background: var(--accent); border-color: var(--accent); }
.data-lab__stage { position: relative; min-height: 22rem; padding: 2.5rem clamp(0.4rem, 2vw, 1.5rem) 1rem; }
.schema-label {
  position: absolute;
  top: 1rem;
  display: flex;
  gap: 0.7rem;
  font: 500 0.55rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bone-faint);
}
.schema-label span:last-child { color: var(--accent); }
.schema-label--source { left: clamp(1rem, 4vw, 3rem); }
.schema-label--target { right: clamp(1rem, 4vw, 3rem); }
.match-map { display: block; width: 100%; height: auto; overflow: visible; }
.match-link { fill: none; stroke: var(--bone-faint); stroke-width: 1; opacity: 0.28; transition: opacity 0.35s var(--ease), stroke 0.35s var(--ease); }
.match-link.is-highlighted { stroke: var(--accent); opacity: 0.9; }
.match-node rect { fill: var(--ink); stroke: var(--ink-rule-strong); transition: stroke 0.35s var(--ease), fill 0.35s var(--ease); }
.match-node text { fill: var(--bone-dim); font-family: var(--mono); font-size: 11px; pointer-events: none; }
.match-node .node-meta { fill: var(--bone-faint); font-size: 9px; letter-spacing: 0.08em; }
.match-node.is-target rect { fill: rgba(224, 122, 80, 0.05); }
.match-node.is-highlighted rect { stroke: var(--accent); fill: rgba(224, 122, 80, 0.1); }
.match-node[tabindex] { cursor: pointer; outline: none; }
.match-node, .match-link { transition: opacity 0.3s var(--ease); }
/* While one record is in focus, everything unrelated steps back. */
.match-map.is-focusing .match-link:not(.is-hot),
.match-map.is-focusing .match-node:not(.is-hot) { opacity: 0.22; }
.match-map.is-focusing .match-link.is-hot { stroke-width: 1.8; opacity: 1; }
.match-node.is-hot rect { fill: rgba(224, 122, 80, 0.18); }
.match-node.is-hot text { fill: var(--bone); }
.match-node:focus-visible rect { stroke-width: 2; }
.data-lab__empty { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); color: var(--bone-faint); font: 0.75rem var(--mono); }
.data-lab__footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: var(--rule);
}
.data-lab__footer > div { padding: 1.25rem clamp(1rem, 3vw, 2rem); border-right: var(--rule); }
.data-lab__footer > div:nth-child(3) { border-right: 0; }
.data-lab__footer .metric { display: block; font: 400 clamp(1.7rem, 1.2rem + 2vw, 2.6rem)/1 var(--serif); margin-bottom: 0.45rem; }
.data-lab__footer p { grid-column: 1 / -1; max-width: none; padding: 0.9rem clamp(1rem, 3vw, 2rem); margin: 0; border-top: var(--rule); color: var(--bone-dim); font-size: 0.8125rem; }
/* Phone version of the demo: a stacked list instead of the diagram. */
.match-list { display: none; list-style: none; margin: 0; padding: 0; }
.match-group { padding: 1.1rem 0; border-bottom: var(--rule); }
.match-group:last-child { border-bottom: 0; }
.match-group__target { display: grid; gap: 0.2rem; margin-bottom: 0.7rem; }
.match-group__title { font-family: var(--serif); font-size: 1.25rem; line-height: 1.2; color: var(--bone); }
.match-group__meta, .match-item__meta {
  font: 500 0.625rem/1.3 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone-faint);
}
.match-group__meta { color: var(--accent); }
.match-group ul { list-style: none; margin: 0; padding: 0 0 0 0.9rem; border-left: 1px solid var(--accent-deep); display: grid; gap: 0.7rem; }
.match-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.15rem 0.75rem; align-items: baseline; }
.match-item__title { color: var(--bone-dim); font-size: 0.9375rem; line-height: 1.35; }
.match-item__meta { grid-column: 1; }
.match-item__tag {
  grid-column: 2; grid-row: 1 / span 2; align-self: center;
  font: 500 0.5625rem/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(224, 122, 80, 0.45);
  padding: 0.35rem 0.45rem;
  white-space: nowrap;
}

@media (max-width: 40rem) {
  .schema-label, .match-map { display: none; }
  .match-list { display: block; }
  .data-lab__stage { min-height: 0; padding: 0.25rem clamp(1.5rem, 4vw, 2.75rem) 0.75rem; }
  .data-lab__footer > div { padding: 1rem 0.9rem; }
  .data-lab__footer .label { letter-spacing: 0.1em; font-size: 0.5625rem; }
}

.records { border-top: 1px solid var(--ink-rule-strong); }

.record {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: clamp(2rem, 4vw, 3rem) 0;
  border-bottom: var(--rule);
  position: relative;
  transition: color 0.3s var(--ease);
}

/* The hover wash bleeds past the container edges so it reads as a ruled
   ledger row being highlighted, not as a card lighting up. */
.record::before {
  content: "";
  position: absolute;
  inset: 0 calc(var(--gutter) * -0.4);
  background: var(--ink-raised);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  z-index: -1;
}
.record:hover::before { opacity: 1; }

.record__grid { display: grid; gap: 1.25rem 3rem; }

@media (min-width: 60rem) {
  .record__grid { grid-template-columns: 14rem minmax(0, 1fr) 3rem; align-items: start; }
}

.record__no {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  line-height: 0.9;
  color: var(--bone-faint);
  font-variation-settings: "SOFT" 20, "WONK" 1;
  transition: color 0.3s var(--ease);
}
.record:hover .record__no { color: var(--accent); }

.record__year {
  display: block;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  color: var(--bone-faint);
  margin-top: 0.75rem;
}

.record__title { font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.25rem); margin-bottom: 1.25rem; }

/* Problem / approach / outcome — the three things a hiring manager scores. */
.pao { margin: 0; display: grid; gap: 0.9rem; max-width: 46rem; }
.pao > div { display: grid; gap: 0.25rem; }
.pao dt {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.pao dd { margin: 0; color: var(--bone-dim); line-height: 1.55; }
.pao .outcome { color: var(--bone); }

.record__stack {
  margin-top: 1.4rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--bone-faint);
}
.record__stack span:not(:last-child)::after { content: " / "; }

.record__arrow {
  font-size: 1.25rem;
  color: var(--bone-faint);
  justify-self: end;
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}
.record:hover .record__arrow { transform: translate(3px, -3px); color: var(--accent); }
@media (max-width: 59.99rem) {
  .record__arrow { position: absolute; top: clamp(2rem, 4vw, 3rem); right: 0; }
}


/* ---- 10. Contact -------------------------------------------------------- */

.contact__grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }

@media (min-width: 60rem) {
  .contact__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.channels { margin-top: clamp(2rem, 4vw, 3rem); border-top: var(--rule); }
.channels a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 0;
  border-bottom: var(--rule);
  text-decoration: none;
  transition: color 0.25s var(--ease), padding-left 0.25s var(--ease);
}
.channels a:hover { color: var(--accent); padding-left: 0.5rem; }
.channels a:active { padding-left: 0.65rem; }
.channels a.is-copied .what { color: var(--accent); }
.channels .where {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-faint);
}
.channels .what { font-size: 1.0625rem; }

/* ---- 11. Colophon ------------------------------------------------------- */

.colophon {
  border-top: 1px solid var(--ink-rule-strong);
  padding-block: 2.5rem 3.5rem;
}
.colophon .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: baseline;
}
.colophon p {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bone-faint);
  margin: 0;
}

/* ---- 12. Motion --------------------------------------------------------- */

/* One reveal, used everywhere, short enough not to make anyone wait. */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .journey__stop { opacity: 1; transform: none; }
  .hero .status::before { animation: none; }
}

/* ---- 13. Print ---------------------------------------------------------- */

@media print {
  body { background: #fff; color: #000; }
  body::before, .masthead, .skip-link, .portrait, .record__arrow, .data-lab { display: none !important; }
  .reveal { opacity: 1; transform: none; }
  a { text-decoration: none; color: #000; }
  .channels a::after { content: " (" attr(href) ")"; font-size: 0.75em; }
}
