/* ==========================================================================
   Solomon Chung — UX Design Portfolio
   Warm editorial system. Light-first, with a warm dark variant.
   ========================================================================== */

/* --------------------------------------------------------------- Tokens -- */
:root {
  color-scheme: light dark;

  /* Surfaces */
  --paper:        #FFFFFF;
  --paper-raised: #FFFFFF;
  --paper-sunken: #F7F7F7;

  /* Ink */
  --ink:          #111111;
  --ink-soft:     #3D3D3D;
  --ink-muted:    #6B6B6B;

  /* Line */
  --rule:         #E5E5E5;
  --rule-strong:  #C4C4C4;

  /* Accent — terracotta */
  --accent:       #111111;
  --accent-deep:  #000000;
  --accent-wash:  #F4F4F4;

  /* Support */
  --moss:         #111111;
  --focus:        #111111;

  /* Type */
  --display: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Space */
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --measure: 62ch;
  --shell: 1180px;

  /* Motion */
  --ease: cubic-bezier(.22,.61,.36,1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:        #0E0E0E;
    --paper-raised: #161616;
    --paper-sunken: #080808;
    --ink:          #F5F5F5;
    --ink-soft:     #D0D0D0;
    --ink-muted:    #9A9A9A;
    --rule:         #2A2A2A;
    --rule-strong:  #3E3E3E;
    --accent:       #F5F5F5;
    --accent-deep:  #FFFFFF;
    --accent-wash:  #1C1C1C;
    --moss:         #F5F5F5;
    --focus:        #F5F5F5;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.25em; }
li { margin-bottom: .4em; }
li::marker { color: var(--accent); }
a { color: inherit; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* Sticky header must never hide the focused element — WCAG 2.2 (2.4.11) */
:target, [id] { scroll-margin-top: 6.5rem; }

/* Focus — 3:1 minimum against both surfaces (WCAG 1.4.11) */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* -------------------------------------------------------------- Helpers -- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.shell--narrow { max-width: 820px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -140%);
  z-index: 999;
  background: var(--ink);
  color: var(--paper);
  padding: .85rem 1.5rem;
  border-radius: 0 0 6px 6px;
  font: 600 .875rem/1 var(--sans);
  letter-spacing: .02em;
  text-decoration: none;
  transition: transform .2s var(--ease);
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

.eyebrow {
  font: 500 .75rem/1.4 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 1.25rem;
}
.eyebrow--accent { color: var(--accent); }

.lede {
  font-size: clamp(1.125rem, 1.02rem + .5vw, 1.3125rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: var(--measure);
}

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

/* --------------------------------------------------------------- Header -- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.masthead[data-scrolled="true"] { border-bottom-color: var(--rule); }

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.5rem;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: .55rem;
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.375rem;
  letter-spacing: -.01em;
  padding: .35rem 0;
}
.wordmark__dot {
  width: .4rem; height: .4rem;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
  align-self: center;
}
.wordmark:hover .wordmark__mark { color: var(--accent); }
.wordmark__mark { transition: color .2s var(--ease); }

.nav { display: flex; align-items: center; gap: clamp(.25rem, 1.5vw, 1.25rem); }

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 .75rem;
  font-size: .9375rem;
  font-weight: 450;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: 4px;
  transition: color .2s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: .75rem; right: .75rem; bottom: 1.05rem;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

.nav__cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-left: .5rem;
  padding: 0 1.1rem;
  border: 1px solid var(--ink);
  border-radius: 100px;
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav__cta:hover { background: var(--ink); color: var(--paper); }

@media (max-width: 720px) {
  .nav { gap: 0; }
  .nav__link { padding: 0 .5rem; font-size: .875rem; }
  .nav__cta { display: none; }
}

/* --------------------------------------------------------------- Status -- */
.status {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .8rem .35rem .6rem;
  border: 1px solid var(--rule-strong);
  border-radius: 100px;
  background: var(--paper-raised);
  font: 500 .8125rem/1 var(--sans);
  color: var(--ink-soft);
}
.status__pip {
  width: .5rem; height: .5rem;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 14%, transparent);
}

/* ----------------------------------------------------------------- Hero -- */
.hero { padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2.5rem, 6vw, 4.5rem); }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: end;
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; align-items: start; }
}

.hero__name {
  font-family: var(--display);
  font-size: clamp(3.25rem, 1.4rem + 8.6vw, 8rem);
  line-height: .92;
  letter-spacing: -.025em;
  margin: 1.5rem 0 0;
}
.hero__name em {
  font-style: italic;
  color: var(--accent);
}

.hero__role {
  font-family: var(--display);
  font-size: clamp(1.375rem, 1.1rem + 1.2vw, 2rem);
  line-height: 1.25;
  color: var(--ink-soft);
  margin: 1.25rem 0 1.5rem;
  max-width: 22ch;
}

.hero__body { max-width: 46ch; color: var(--ink-soft); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2rem;
}

.hero__side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.75rem;
  padding-bottom: .5rem;
}

/* --------------------------------------------------------------- Button -- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-height: 48px;
  padding: 0 1.4rem;
  border: 1px solid var(--ink);
  border-radius: 100px;
  background: transparent;
  color: var(--ink);
  font: 500 .9375rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn__arrow { transition: transform .25s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--paper); border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--paper-sunken); border-color: var(--ink); color: var(--ink); }

/* ---------------------------------------------------------------- Facts -- */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--rule);
  border-block: 1px solid var(--rule);
}
.fact {
  background: var(--paper);
  padding: 1.5rem clamp(1rem, 3vw, 1.75rem);
}
.fact__value {
  font-family: var(--display);
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
  line-height: 1;
  letter-spacing: -.02em;
  display: block;
}
.fact__label {
  display: block;
  margin-top: .5rem;
  font-size: .8125rem;
  line-height: 1.4;
  color: var(--ink-muted);
}

/* -------------------------------------------------------------- Section -- */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section--sunken { background: var(--paper-sunken); }

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section__title {
  font-family: var(--display);
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -.02em;
}

.section__note {
  font-size: .9375rem;
  color: var(--ink-muted);
  max-width: 34ch;
}

/* ----------------------------------------------------------------- Work -- */
.work { border-top: 1px solid var(--rule); list-style: none; margin: 0; padding: 0; }

.work__item { border-bottom: 1px solid var(--rule); }

.work__link {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr) minmax(0, .85fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.75rem, 4vw, 2.75rem) 0;
  text-decoration: none;
  color: inherit;
  transition: background .3s var(--ease);
}
.work__link:hover { background: var(--accent-wash); }
.work__link:hover .work__title { color: var(--accent-deep); }
.work__link:hover .work__cover img,
.work__link:hover .work__cover svg { transform: scale(1.04); }
.work__link:hover .work__go { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.work__link:hover .work__go svg { transform: translateX(3px); }

.work__index {
  font-family: var(--mono);
  font-size: .8125rem;
  color: var(--ink-muted);
  padding-left: clamp(0rem, 1.5vw, 1rem);
  align-self: start;
  padding-top: .35rem;
}

.work__body { min-width: 0; }

.work__title {
  font-family: var(--display);
  font-size: clamp(1.75rem, 1.3rem + 1.9vw, 3rem);
  line-height: 1.05;
  letter-spacing: -.02em;
  transition: color .2s var(--ease);
}

.work__summary {
  margin: .85rem 0 0;
  color: var(--ink-soft);
  max-width: 48ch;
  font-size: 1rem;
}

.work__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .75rem;
  margin-top: 1.15rem;
  font-size: .8125rem;
  color: var(--ink-muted);
}
.work__meta span { display: inline-flex; align-items: center; }
.work__meta .sep { color: var(--rule-strong); }

.token {
  display: inline-flex;
  align-items: center;
  padding: .25rem .6rem;
  border: 1px solid var(--rule-strong);
  border-radius: 100px;
  font: 500 .75rem/1.3 var(--sans);
  letter-spacing: .01em;
  color: var(--ink-soft);
  background: var(--paper-raised);
}
.token--accent { color: var(--accent-deep); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-wash); }

.work__outcome {
  display: block;
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--rule);
  font-size: .9375rem;
  color: var(--ink-soft);
  max-width: 48ch;
}
.work__outcome b { color: var(--ink); font-weight: 600; }

.work__cover {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  aspect-ratio: 3 / 2;
}
.work__cover img, .work__cover svg {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}

.work__go {
  position: absolute;
  right: .75rem; bottom: .75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
  background: var(--paper-raised);
  color: var(--ink);
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.work__go svg { transition: transform .25s var(--ease); width: 1rem; height: 1rem; }

@media (max-width: 860px) {
  .work__link {
    grid-template-columns: 2.25rem minmax(0, 1fr);
    align-items: start;
  }
  .work__cover { grid-column: 1 / -1; }
  .work__index { padding-left: 0; }
}

/* ------------------------------------------------------------ Capability -- */
.caps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
}
.cap { background: var(--paper); padding: clamp(1.5rem, 3vw, 2rem); }
.cap__num {
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--accent);
  display: block;
  margin-bottom: 1rem;
}
.cap__title {
  font-family: var(--display);
  font-size: 1.375rem;
  line-height: 1.2;
  margin-bottom: .6rem;
}
.cap__body { font-size: .9375rem; color: var(--ink-muted); margin: 0; }

/* ---------------------------------------------------------------- Split -- */
.split {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------- Quotes -- */
.pullquote {
  font-family: var(--display);
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.25rem);
  line-height: 1.3;
  letter-spacing: -.015em;
  color: var(--ink);
  border-left: 2px solid var(--accent);
  padding-left: clamp(1.25rem, 3vw, 2rem);
  margin: 0;
  max-width: 34ch;
}

/* ------------------------------------------------------------- Timeline -- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline__item {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.5rem, 3vw, 2rem) 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}
.timeline__item:last-child { border-bottom: 1px solid var(--rule); }
.timeline__when {
  font: 500 .8125rem/1.5 var(--sans);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-top: .3rem;
}
.timeline__title { font-family: var(--display); font-size: 1.5rem; line-height: 1.2; }
.timeline__org { display: block; margin-top: .35rem; color: var(--accent-deep); font-size: .9375rem; font-weight: 500; }
.timeline__body { margin: .75rem 0 0; color: var(--ink-soft); font-size: .9375rem; max-width: 58ch; }
@media (max-width: 700px) { .timeline__item { grid-template-columns: 1fr; gap: .5rem; } }

/* --------------------------------------------------------------- Skills -- */
.skillset {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
}
.skillgroup__title {
  font: 600 .75rem/1.4 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1rem;
}
.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.chips li { margin: 0; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: .3rem .75rem;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  background: var(--paper-raised);
  font-size: .875rem;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------ Case study -- */
.case-hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem); }

.backlink {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color .2s var(--ease), gap .2s var(--ease);
}
.backlink:hover { color: var(--accent); gap: .75rem; }

.case-title {
  font-family: var(--display);
  font-size: clamp(2.5rem, 1.6rem + 4vw, 5rem);
  line-height: .98;
  letter-spacing: -.025em;
  margin: 1.25rem 0 1.25rem;
  max-width: 18ch;
}

.case-deck {
  font-size: clamp(1.0625rem, 1rem + .4vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 56ch;
}

.factbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--rule);
  border-block: 1px solid var(--rule);
  margin: clamp(2rem, 5vw, 3.5rem) 0 0;
}
.factbar__cell { background: var(--paper); padding: 1.25rem clamp(.9rem, 2vw, 1.5rem); }
.factbar__k {
  display: block;
  font: 600 .6875rem/1.4 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: .5rem;
}
.factbar__v { display: block; font-size: .9375rem; font-weight: 500; line-height: 1.45; }

.prose { max-width: 68ch; }
.prose h2 {
  font-family: var(--display);
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin: clamp(2.5rem, 6vw, 4rem) 0 1.25rem;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-family: var(--display);
  font-size: 1.375rem;
  line-height: 1.25;
  margin: 2.25rem 0 .75rem;
}
.prose h4 {
  font: 600 .75rem/1.4 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 2rem 0 .75rem;
}
.prose > p, .prose > ul, .prose > ol { color: var(--ink-soft); }

/* Wide blocks inside prose */
.bleed { max-width: 100%; }

.figure { margin: clamp(2rem, 5vw, 3rem) 0; }
.figure img, .figure svg {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper-raised);
}
.figure figcaption {
  margin-top: .85rem;
  font-size: .875rem;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 62ch;
}

.callout {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: var(--paper-raised);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  margin: clamp(1.75rem, 4vw, 2.5rem) 0;
}
.callout__k {
  font: 600 .6875rem/1.4 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  display: block;
  margin-bottom: .6rem;
}
.callout p:last-child { margin-bottom: 0; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.75rem 0;
}
.panel {
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper-raised);
  padding: clamp(1.25rem, 3vw, 1.6rem);
}
.panel__title { font-family: var(--display); font-size: 1.25rem; line-height: 1.25; margin-bottom: .6rem; }
.panel__body, .panel ul { font-size: .9375rem; color: var(--ink-soft); margin: 0; }
.panel ul { padding-left: 1.1em; margin-top: .5rem; }

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  margin: 1.75rem 0;
}
.metric { background: var(--paper-raised); padding: 1.25rem; text-align: left; }
.metric__v {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  line-height: 1;
  color: var(--accent-deep);
}
.metric__k { display: block; margin-top: .5rem; font-size: .8125rem; color: var(--ink-muted); line-height: 1.4; }

.reclist { list-style: none; margin: 1.75rem 0; padding: 0; }
.reclist li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  padding: 1.15rem 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}
.reclist li:last-child { border-bottom: 1px solid var(--rule); }
.reclist__n { font-family: var(--mono); font-size: .8125rem; color: var(--ink-muted); padding-top: .2rem; }
.reclist__t { font-weight: 600; display: block; margin-bottom: .3rem; }
.reclist__d { font-size: .9375rem; color: var(--ink-muted); margin: 0; }
.pri {
  font: 600 .6875rem/1 var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .35rem .6rem;
  border-radius: 4px;
  white-space: nowrap;
}
.pri--crit { background: var(--ink); color: var(--paper); }
.pri--high { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pri--med  { background: var(--paper-sunken); color: var(--ink-muted); box-shadow: inset 0 0 0 1px var(--rule); }
@media (max-width: 640px) {
  .reclist li { grid-template-columns: auto minmax(0, 1fr); }
  .pri { grid-column: 2; justify-self: start; }
}

.doclinks { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0; }
.doclink {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-height: 48px;
  padding: .6rem 1.1rem;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  background: var(--paper-raised);
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.doclink:hover { border-color: var(--accent); background: var(--accent-wash); transform: translateY(-2px); }
.doclink small { display: block; font-weight: 400; color: var(--ink-muted); font-size: .75rem; }

/* ------------------------------------------------------------ Pagination -- */
.casenav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--rule);
  border-block: 1px solid var(--rule);
}
.casenav__link {
  background: var(--paper);
  padding: clamp(1.5rem, 4vw, 2.25rem) clamp(1rem, 3vw, 2rem);
  text-decoration: none;
  transition: background .25s var(--ease);
}
.casenav__link:hover { background: var(--accent-wash); }
.casenav__k {
  font: 600 .6875rem/1.4 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.casenav__t {
  display: block;
  margin-top: .5rem;
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1.2;
}
.casenav__link--next { text-align: right; }

/* ---------------------------------------------------------------- Forms -- */
.form { display: grid; gap: 1.25rem; }
.field { display: grid; gap: .5rem; }
.field label {
  font: 600 .6875rem/1.4 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.field input, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: .8rem 1rem;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  background: var(--paper-raised);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { min-height: 9rem; resize: vertical; line-height: 1.6; }
.field input:hover, .field textarea:hover { border-color: var(--ink-muted); }
.field input:focus-visible, .field textarea:focus-visible {
  border-color: var(--accent);
  outline: 3px solid var(--accent);
  outline-offset: 1px;
}
.field__hint { font-size: .8125rem; color: var(--ink-muted); }

/* ------------------------------------------------------------------ CTA -- */
.cta { padding: clamp(4rem, 10vw, 8rem) 0; border-top: 1px solid var(--rule); }
.cta__title {
  font-family: var(--display);
  font-size: clamp(2.5rem, 1.5rem + 5vw, 6rem);
  line-height: .95;
  letter-spacing: -.03em;
  margin-bottom: 2rem;
  max-width: 14ch;
}
.cta__mail {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-family: var(--display);
  font-size: clamp(1.25rem, 1rem + 1.4vw, 2rem);
  color: var(--accent-deep);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  padding-bottom: .15rem;
  transition: border-color .2s var(--ease);
  overflow-wrap: anywhere;
}
.cta__mail:hover { border-bottom-color: var(--accent); }

/* --------------------------------------------------------------- Footer -- */
.colophon {
  background: var(--paper-sunken);
  border-top: 1px solid var(--rule);
  padding: clamp(3rem, 7vw, 4.5rem) 0 2rem;
}
.colophon__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
}
@media (max-width: 760px) { .colophon__grid { grid-template-columns: 1fr 1fr; } .colophon__brand { grid-column: 1 / -1; } }

.colophon__name { font-family: var(--display); font-size: 1.75rem; line-height: 1.1; margin-bottom: .75rem; }
.colophon__blurb { font-size: .9375rem; color: var(--ink-muted); max-width: 34ch; }

.colophon__k {
  font: 600 .6875rem/1.4 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 1rem;
}
.colophon ul { list-style: none; margin: 0; padding: 0; }
.colophon li { margin: 0; }
.colophon__link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: .9375rem;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color .2s var(--ease);
}
.colophon__link:hover { color: var(--accent); }

.colophon__base {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 2rem;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: .8125rem;
  color: var(--ink-muted);
}

/* ----------------------------------------------------------------- Print -- */
@media print {
  .masthead, .skip-link, .cta, .work__go, .casenav { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  a { text-decoration: underline; }
  .section, .hero { padding: 1rem 0; }
}

/* ------------------------------------------------- Inline-element fixes -- */
/* Spans used as blocks inside anchors (valid HTML, needs explicit display) */
.work__index, .work__body, .work__title, .work__summary, .work__cover,
.casenav__k, .reclist__n, .reclist__d { display: block; }
.work__cover { display: block; }
.work__summary { font-weight: 400; }

/* Case-study hero image: cinematic crop so it anchors without dominating */
.figure--hero img, .figure--hero svg {
  aspect-ratio: 24 / 9;
  object-fit: cover;
  object-position: center;
}
@media (max-width: 700px) {
  .figure--hero img, .figure--hero svg { aspect-ratio: 16 / 10; }
}

/* Prose links */
.prose a:not(.btn):not(.doclink) {
  color: var(--accent-deep);
  text-underline-offset: .18em;
  text-decoration-thickness: 1px;
  transition: color .2s var(--ease);
}
.prose a:not(.btn):not(.doclink):hover { color: var(--accent); }
.timeline__title a { color: inherit; text-decoration-color: var(--rule-strong); text-underline-offset: .2em; }
.timeline__title a:hover { color: var(--accent-deep); }

/* Copy-button feedback */
.btn[data-copied="true"] { background: var(--moss); border-color: var(--moss); color: #FFF; }

/* --------------------------------------------- Small-screen masthead ----- */
@media (max-width: 640px) {
  .masthead__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: 0;
  }
  .wordmark {
    justify-content: center;
    padding: .6rem 0 .3rem;
    font-size: 1.0625rem;
  }
  .nav { justify-content: space-between; gap: 0; padding-bottom: .2rem; }
  .nav__link {
    flex: 1 1 0;
    justify-content: center;
    min-height: 44px;
    padding: 0 .25rem;
    font-size: .8125rem;
  }
  .nav__link::after { left: .3rem; right: .3rem; bottom: .5rem; }
  :target, [id] { scroll-margin-top: 7rem; }
}

/* Standalone links inside panels get a 24px target (WCAG 2.2 — 2.5.8) */
.panel__body a {
  display: inline-block;
  padding-block: .2rem;
  color: var(--accent-deep);
  text-underline-offset: .18em;
}
.panel__body a:hover { color: var(--accent); }

/* -------------------------------------------------------------- Portrait -- */
.portrait {
  margin: 0;
  width: 100%;
  max-width: 330px;
  align-self: flex-start;
}
.portrait img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--rule);
  background: var(--paper-sunken);
}
@media (max-width: 900px) {
  .portrait { max-width: 240px; }
}

.portrait--about {
  float: right;
  max-width: 240px;
  margin: 0 0 1.5rem 2rem;
}
@media (max-width: 640px) {
  .portrait--about { float: none; margin: 0 0 1.75rem; max-width: 220px; }
}

/* Narrow portrait-orientation figures (phone screens) shouldn't stretch */
.figure--narrow img { max-width: 300px; margin-inline: auto; }
.btn[data-copied="failed"] { background: var(--paper-sunken); border-color: var(--ink); color: var(--ink); }
