/* ─────────────────────────────────────────────────────────
   Resume — Milo-inspired
   Palette: warm off-white, charcoal, single amber accent
   Type: Inter (sans) + Instrument Serif (display)
   ───────────────────────────────────────────────────────── */

:root {
  --bg:        #f6f4ef;
  --bg-elev:   #fbf9f4;
  --ink:       #161513;
  --ink-soft:  #5b5854;
  --rule:      #e3dfd5;
  --accent:    #c2532a;   /* warm terracotta */
  --accent-2:  #1f3d2f;   /* deep forest, used sparingly */
  --max:       1120px;
  --gutter:    clamp(20px, 4vw, 48px);
  --serif:     "Space Grotesk", "Inter", system-ui, sans-serif;
  --sans:      "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
em, .italic { font-style: italic; }
.serif { font-family: var(--serif); font-weight: 400; }
.nowrap { white-space: nowrap; }
.muted { color: var(--ink-soft); }
.muted a { color: inherit; border-bottom: 1px solid var(--rule); transition: border-color .2s ease, color .2s ease; }
.muted a:hover { color: var(--ink); border-color: var(--ink); }

/* ─── Navigation ─── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--gutter);
  background: color-mix(in srgb, var(--bg) 50%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background-color 0.55s ease, color 0.55s ease;
}

.nav__brand {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nav__links {
  display: flex;
  gap: 28px;
  font-size: 11px;
  color: var(--ink-soft);
}
.nav__links a {
  position: relative;
  padding: 4px 0;
  transition: color .15s ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav__links a:hover::after { transform: scaleX(1); }

.nav__cta {
  font-size: 11px;
  padding: 8px 14px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background .2s ease, color .2s ease;
}
.nav__cta:hover { background: var(--ink); color: var(--bg); }

@media (max-width: 760px) {
  .nav__links { display: none; }
}

/* ─── Layout helpers ─── */
main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.section {
  padding: clamp(64px, 9vw, 120px) 0;
  border-top: 1px solid var(--rule);
}

.section__head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 48px;
}
.section__num {
  font-family: var(--sans);
  color: #a8a8a8;
  font-size: 18px;
}
.section__title {
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 400;
  letter-spacing: -0.025em;
  margin: 0;
}

/* ─── Hero ─── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: clamp(120px, 16vh, 200px) 0 clamp(148px, calc(6vh + 100px), 180px);
  /* No overflow/clipping here so the bg wordmark can bleed below into the
     next section as the user scrolls. */
  transition: color 0.55s ease;
}
/* Full-width background extension (replaces the prior box-shadow + clip-path
   approach so the hero itself doesn't clip its children). */
.hero::before {
  content: "";
  position: absolute;
  top: -2px; bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  background: transparent;
  z-index: -1;
  transition: background-color 0.55s ease;
}

/* Giant decorative surname — sized to the content column, anchored at the
   hero's bottom edge, bleeds below so it reveals on scroll. */
.hero__bgname {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
  overflow: visible;
  z-index: 0;
  /* Lift the wordmark up so its top edge slips behind the meta block,
     while the lower portion still bleeds past the hero on scroll. */
  transform: translateY(-5%);
  /* Fade the wordmark from full opacity at the top to transparent at the
     bottom edge. */
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 100%);
}
.hero__bgname text {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px; /* user units — viewBox-relative, not px */
  letter-spacing: -0.02em;
  fill: currentColor;
  stroke: none;
  paint-order: fill;
  opacity: 0.05;
}
.hero > *:not(.hero__bgname) { position: relative; z-index: 1; }
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 32px;
  font-size: 11px;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink-soft);
}
.dot {
  position: relative;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.dot::before,
.dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.dot::after { animation-delay: 0.6s; }
@keyframes ping {
  0%   { transform: scale(1);   opacity: 0.65; }
  80%, 100% { transform: scale(3); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .dot::before, .dot::after { animation: none; }
}

.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 7.2vw, 90px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin: 0 0 56px;
  max-width: 15ch;
}

/* Slow color cycle on the name — palette trimmed to colors that read on cream */
@keyframes name-cycle {
  0%    { color: #b8dfee; } /* Sky */
  12.5% { color: #3340e0; } /* Capri */
  25%   { color: #e8a8e6; } /* Pink */
  37.5% { color: #e04acf; } /* Rose */
  50%   { color: #54d869; } /* Calypso */
  62.5% { color: #e25a26; } /* Sangria */
  75%   { color: #c33a48; } /* Claret */
  87.5% { color: #9c4ba3; } /* Orchid */
  100%  { color: #b8dfee; } /* loop back to Sky */
}
.name {
  animation: name-cycle 32s linear infinite;
  will-change: color;
}
.name--offset {
  animation-delay: -16s;
}
@media (prefers-reduced-motion: reduce) {
  .name { animation: none; }
}

/* Animated noun cycle */
.hero__cycle {
  display: inline-block;
  position: relative;
  vertical-align: baseline;
}
.hero__cycle__word {
  display: inline-block;
  white-space: nowrap;
  filter: blur(0);
  opacity: 1;
  transition:
    filter 0.8s cubic-bezier(0.86, 0, 0.07, 1),
    opacity 0.8s cubic-bezier(0.86, 0, 0.07, 1);
}
.hero__cycle__word.is-entering {
  filter: blur(22px);
  opacity: 0;
}
.hero__cycle__word.is-leaving {
  position: absolute;
  top: 0;
  left: 0;
  filter: blur(22px);
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .hero__cycle__word { transition: none; }
}

/* ─── Dark hero state (top of page) ─── */
.is-hero-dark .hero {
  color: #ffffff;
}
.is-hero-dark .hero::before { background: #0a0a0a; }
.is-hero-dark .hero__eyebrow { color: rgba(255, 255, 255, 0.55); }
.is-hero-dark .hero__meta {
  border-top-color: rgba(255, 255, 255, 0.12);
}
.is-hero-dark .hero__meta .label { color: rgba(255, 255, 255, 0.45); }
.is-hero-dark .hero__meta a {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.25);
}

.is-hero-dark .nav {
  background: #0a0a0a;
  color: rgba(255, 255, 255, 0.95);
}
.is-hero-dark .nav__brand { color: #ffffff; }
.is-hero-dark .nav__links a { color: rgba(255, 255, 255, 0.42); }
.is-hero-dark .nav__links a:hover { color: rgba(255, 255, 255, 0.95); }
.is-hero-dark .nav__links a::after { background: #ffffff; }
.is-hero-dark .nav__cta {
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.4);
}
.is-hero-dark .nav__cta:hover {
  background: #ffffff;
  color: #0a0a0a;
  border-color: #ffffff;
}

.hero__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px 40px;
  list-style: none;
  padding: 10px 0 0;
  margin: auto 0 0;
  border-top: 1px solid var(--rule);
  font-size: 11px;
  transition: border-color 0.55s ease;
}
.hero__meta .label {
  display: block;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

/* ─── About / prose ─── */
.prose {
  max-width: 62ch;
  font-size: 19px;
  line-height: 1.65;
}
.prose p + p { margin-top: 1.2em; }
.prose em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1em;
}
.prose strong { font-weight: 500; }
.prose a {
  border-bottom: 1px solid var(--rule);
  transition: border-color .2s ease;
}
.prose a:hover { border-color: var(--ink); }

/* ─── Material skills (inside Skills & Tools) ─── */
.material {
  margin-top: 48px;
}
.material__heading {
  margin: 0 0 20px;
  font-size: 13px;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  color: #a8a8a8;
  font-weight: 500;
}
.material__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 40px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}
.material__list li {
  position: relative;
  padding-left: 22px;
}
.material__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 10px;
  height: 1px;
  background: #a8a8a8;
}
@media (max-width: 720px) {
  .material__list { grid-template-columns: 1fr; }
}

/* ─── Timeline ─── */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
}
.timeline__item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 22px;
  padding: 32px 0;
  border-top: 1px solid var(--rule);
}
.timeline__item:last-child { border-bottom: 1px solid var(--rule); }

.timeline__when {
  font-family: var(--sans);
  color: #a8a8a8;
  font-size: 17px;
  padding-top: 4px;
}
.timeline__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.timeline__links .pill {
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-soft);
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.timeline__links .pill:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--bg-elev);
}

.timeline__body h3 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.timeline__body p {
  margin: 0 0 14px;
  color: var(--ink-soft);
  max-width: 60ch;
}

.tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tags li {
  font-size: 12px;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--bg-elev);
}

@media (max-width: 720px) {
  .timeline__item { grid-template-columns: 1fr; gap: 8px; }
}

/* ─── Skills ─── */
.skills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.skills__group h4 {
  margin: 0 0 16px;
  font-size: 13px;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  color: var(--ink-soft);
  font-weight: 500;
}
.skills__group ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  font-size: 17px;
}
.skills__group li {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 720px) {
  .skills { grid-template-columns: 1fr; gap: 32px; }
}

/* ─── Feedback / quotes ─── */
.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.quote {
  margin: 0;
  padding: 28px;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 14px;
}
.quote blockquote {
  margin: 0 0 18px;
  font-family: "Cormorant", "Times New Roman", serif;
  font-size: 33px;
  line-height: 1.15;
  font-style: normal;
  letter-spacing: -0.015em;
}
.quote figcaption {
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

/* ─── Case studies ─── */
.cases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.case {
  display: block;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 18px;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.case:hover {
  box-shadow: 0 18px 40px -22px rgba(22, 21, 19, 0.25);
}
.case__art {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: var(--rule);
}
.case__art__bg,
.case__art__blur {
  position: absolute;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.case__art__bg { background-image: var(--art-img); }
.case__art__blur { background-image: var(--art-blur-img, var(--art-img)); }
.case__art__bg {
  inset: 0;
  background-position: top center;
}
.case__art__blur {
  inset: -70%;
  filter:
    blur(43px)
    saturate(var(--blur-sat, 1))
    brightness(var(--blur-bright, 1))
    contrast(var(--blur-contrast, 1));
  transform: translate(var(--blur-x, 0), var(--blur-y, 50px));
  transition: opacity 0.5s ease;
  will-change: opacity;
}
.case__art__logo {
  position: absolute;
  left: 24px;
  bottom: 26px;
  max-height: 50px;
  width: auto;
  height: auto;
  z-index: 2;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
/* Hide logo when no src has been set yet */
.case__art__logo:not([src]):not(.case__art__logo--text),
.case__art__logo[src=""] {
  display: none;
}

/* Text-only logo variant for projects without a real logo */
.case__art__logo--text {
  font-family: "Space Grotesk", var(--sans);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.case:hover .case__art__blur,
.case:hover .case__art__logo {
  opacity: 0;
}

/* Gradient fallbacks for case studies without imagery */
.case__art--gradient {
  background-size: 200% 200%;
  background-position: 0% 50%;
  transition: background-position .8s ease, transform .6s ease;
}
.case:hover .case__art--gradient { background-position: 100% 50%; }

.case__art--gradient[data-art="a"] {
  background-image:
    radial-gradient(circle at 20% 30%, #f4c8a5 0%, transparent 55%),
    radial-gradient(circle at 80% 70%, #c2532a 0%, transparent 60%),
    linear-gradient(135deg, #efe6d6, #d9c9ab);
}
.case__art--gradient[data-art="b"] {
  background-image:
    radial-gradient(circle at 70% 20%, #cfe0d3 0%, transparent 55%),
    radial-gradient(circle at 20% 80%, #1f3d2f 0%, transparent 65%),
    linear-gradient(135deg, #e8efe5, #b8c9b8);
}
.case__art--gradient[data-art="c"] {
  background-image:
    radial-gradient(circle at 30% 70%, #f5d9b8 0%, transparent 55%),
    radial-gradient(circle at 80% 30%, #8a6a4b 0%, transparent 60%),
    linear-gradient(135deg, #f1e6d2, #c9b394);
}

/* Studio / Reductive intro block */
.studio {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 28px 32px;
  margin: 48px 0 0;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 18px;
}
.studio__logo {
  display: block;
  flex-shrink: 0;
}
.studio__logo img {
  display: block;
  height: 36px;
  width: auto;
}
.studio__lede {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 60ch;
}
.studio__lede strong {
  color: var(--ink);
  font-weight: 500;
}
.studio__cta {
  white-space: nowrap;
  font-size: 14px;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background .2s ease, color .2s ease;
}
.studio__cta:hover { background: var(--ink); color: var(--bg); }

@media (max-width: 820px) {
  .studio {
    grid-template-columns: 1fr;
    gap: 18px;
    text-align: left;
    padding: 24px;
  }
  .studio__cta { justify-self: start; }
}

.case__meta {
  padding: 22px 24px 26px;
}
.case__meta h3 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 105%;
}
.case__meta p {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.5;
}
.case__tag {
  font-size: 12px;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  color: var(--ink-soft);
}

@media (max-width: 900px) { .cases { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cases { grid-template-columns: 1fr; } }

/* ─── Contact ─── */
.section--contact { padding-bottom: clamp(80px, 10vw, 140px); }
.contact__lede {
  font-family: var(--serif);
  font-size: clamp(24px, 3.5vw, 36px);
  line-height: 1.3;
  max-width: 22ch;
  margin: 0 0 48px;
  color: var(--ink);
}
.contact__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.contact__card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 24px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--bg-elev);
  transition: border-color .2s ease, transform .2s ease;
}
.contact__card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}
.contact__card .label {
  font-size: 12px;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  color: var(--ink-soft);
}
.contact__card .value {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.005em;
}

/* ─── Footer ─── */
.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px var(--gutter) 48px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule);
}
@media (max-width: 520px) {
  .footer { flex-direction: column; }
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ─────────────────────────────────────────────────────────
   Selected Work — typographic list (replaces card grid)
   ───────────────────────────────────────────────────────── */

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

.worklist__item {
  border-bottom: 1px solid var(--rule);
  position: relative;
  z-index: 2;
}

.worklist__link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 22px;
  padding: 28px 0;
}

/* Disabled / coming-soon items — visible but not interactive */
.worklist__link--disabled {
  cursor: default;
  opacity: 0.55;
}
.worklist__soon {
  font-size: 12px;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  color: var(--ink-soft);
  margin-left: 4px;
}

.worklist__num {
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-top: 15px;
}

.worklist__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.worklist__title {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.worklist__discipline {
  font-size: 14px;
  color: var(--ink-soft);
}

.worklist__year {
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  white-space: nowrap;
  align-self: center;
}

/* Cursor-tracked preview shown while hovering a worklist item */
.worklist__preview {
  position: fixed;
  top: 0;
  left: 0;
  width: 360px;
  height: 240px;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-9999px, -9999px, 0) scale(0.96);
  transition: opacity .35s ease, transform .35s cubic-bezier(.2,.7,.2,1);
  z-index: 1;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.35), 0 10px 25px -10px rgba(0,0,0,.2);
  will-change: transform, opacity;
}
.worklist__preview.is-visible {
  opacity: 1;
}
.worklist__preview__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
@media (hover: none), (max-width: 720px) {
  .worklist__preview { display: none; }
}

.worklist__archive {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 40px 0 0;
  padding: 18px 24px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  font-size: 15px;
  color: var(--ink-soft);
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.worklist__archive:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.worklist__archive__logo {
  display: block;
  height: 24px;
  width: auto;
  flex-shrink: 0;
}
.worklist__archive__text { flex: 1; }
.worklist__archive__arrow {
  flex-shrink: 0;
  transition: transform .2s ease;
}
.worklist__archive:hover .worklist__archive__arrow { transform: translateX(3px); }

@media (max-width: 560px) {
  .worklist__link {
    grid-template-columns: 40px 1fr;
    gap: 16px;
    padding: 22px 0;
  }
  .worklist__year { grid-column: 2; align-self: start; margin-top: 4px; }
}

/* ─────────────────────────────────────────────────────────
   Project detail pages (/projects/*.html)
   Long-form essay layout — one hero, restrained reading column,
   prev/next pager.
   ───────────────────────────────────────────────────────── */

.project {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px var(--gutter) 96px;
}

.project__back {
  display: inline-block;
  margin-bottom: 64px;
  font-size: 14px;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.project__back:hover { color: var(--ink); border-color: var(--ink); }

.project__head {
  margin-bottom: 56px;
}

.project__kicker {
  font-size: 13px;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

.project__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(80px, 12vw, 128px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
}

.project__lede {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.35;
  color: var(--ink-soft);
  margin: 0;
}

.project__hero {
  margin: 0 0 56px;
  /* Pull hero slightly wider than the reading column for impact */
  margin-left: calc(50% - 50vw + var(--gutter));
  margin-right: calc(50% - 50vw + var(--gutter));
  max-width: 1120px;
  margin-inline: auto;
  width: min(100%, 1120px);
}
.project__hero img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.project__meta {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px 24px;
  padding: 28px 0;
  margin: 0 0 56px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
}
.project__meta dt {
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  padding-top: 3px;
}
.project__meta dd {
  margin: 0;
  color: var(--ink);
}
.project__meta dd a {
  border-bottom: 1px solid var(--rule);
  transition: border-color .2s ease;
}
.project__meta dd a:hover { border-color: var(--ink); }

.project__body h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.005em;
  margin: 56px 0 16px;
}
.project__body p {
  font-size: 17px;
  line-height: 1.65;
  margin: 0 0 1.2em;
}
.project__body p + p { margin-top: 0; }

.project__figure {
  margin: 40px 0;
}
.project__figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}
.project__figure figcaption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-soft);
  font-style: italic;
}

/* Wider figure that breaks out beyond the reading column */
.project__figure--wide {
  margin-left: calc(50% - 50vw + var(--gutter));
  margin-right: calc(50% - 50vw + var(--gutter));
  max-width: 1120px;
  margin-inline: auto;
  width: min(100%, 1120px);
}

.project__pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 96px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}
.project__pager a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 0;
  font-family: var(--serif);
  transition: color .2s ease;
}
.project__pager__next { text-align: right; align-items: flex-end; }
.project__pager__label {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  color: var(--ink-soft);
}
.project__pager__name {
  font-size: 20px;
  line-height: 1.2;
  color: var(--ink);
}
.project__pager a:hover .project__pager__name { color: var(--accent); }

@media (max-width: 560px) {
  .project { padding-top: 56px; }
  .project__meta { grid-template-columns: 1fr; gap: 4px 0; }
  .project__meta dt { margin-top: 12px; }
  .project__meta dt:first-of-type { margin-top: 0; }
  .project__pager { grid-template-columns: 1fr; }
  .project__pager__next { text-align: left; align-items: flex-start; }
}

/* ─────────────────────────────────────────────────────────
   Dark mode — applied via body.is-dark on project pages.
   One variable swap cascades through everything that uses
   --bg / --ink / --rule / --bg-elev.
   ───────────────────────────────────────────────────────── */

body.is-dark {
  --bg:        #0a0a0a;
  --bg-elev:   #141414;
  --ink:       #f2efe8;
  --ink-soft:  #8a8780;
  --rule:      rgba(255, 255, 255, 0.10);
  background: var(--bg);
  color: var(--ink);
}

body.is-dark .nav {
  background: color-mix(in srgb, #0a0a0a 65%, transparent);
}

body.is-dark .project__meta dd a,
body.is-dark .project__body a,
body.is-dark .project__back {
  border-bottom-color: rgba(255, 255, 255, 0.20);
}
body.is-dark .project__meta dd a:hover,
body.is-dark .project__body a:hover,
body.is-dark .project__back:hover {
  border-bottom-color: var(--ink);
}

/* ─────────────────────────────────────────────────────────
   Print / PDF — 2-page resume.
   Page 1: light hero. Page 2: About, Experience, Skills, Feedback.
   Hides Selected Work, Contact, footer, nav links/CTA.
   Live site is unaffected.
   ───────────────────────────────────────────────────────── */
@media print {
  @page { margin: 10mm 10mm; }

  html, body {
    background: #ffffff !important;
    color: var(--ink) !important;
    font-size: 11pt;
    line-height: 1.4;
  }

  body.is-hero-dark { background: #ffffff !important; color: var(--ink) !important; }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Hide entirely in print: nav (incl. top brand name), hero eyebrow,
     Selected Work, Contact, footer, tag chips. */
  .nav,
  .hero__eyebrow,
  #selected-work,
  #selected-work-old,
  #contact,
  .footer,
  .tags { display: none !important; }

  /* ─── Hero — light resume header.
     Two-up: name on the left, contact stack on the right. ─── */
  .is-hero-dark .hero,
  .hero {
    background: transparent !important;
    color: var(--ink) !important;
    box-shadow: none !important;
    clip-path: none !important;
    min-height: 0 !important;
    padding: 8px 0 28px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 24px !important;
  }
  /* Replace the cycling hero title with a plain resume header in print.
     Collapse the original H1 contents to zero size then inject new text
     via ::before. The screen layout is untouched. */
  .hero__title {
    font-size: 0 !important;
    line-height: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    flex: 0 0 auto !important;
  }
  .hero__title::before {
    content: "Jamie McNiel, designer";
    display: block;
    font-family: var(--serif);
    font-size: 18.5pt;
    line-height: 1.1;
    letter-spacing: -0.015em;
    color: var(--ink);
    font-weight: 500;
  }
  /* Meta stack — sits to the right of the name */
  .hero__meta,
  .is-hero-dark .hero__meta {
    display: block !important;
    border: none !important;
    padding: 2pt 0 0 !important;
    margin: 0 !important;
    text-align: right !important;
    font-size: 7.5pt !important;
    line-height: 1.5 !important;
    flex: 0 0 auto !important;
  }
  .hero__meta li { display: block !important; }
  /* Keep Email, Based, LinkedIn — drop only the Role line */
  .hero__meta li:nth-child(3) { display: none !important; }
  .hero__meta .label {
    display: inline !important;
    color: var(--ink-soft) !important;
    margin-right: 6px !important;
    font-size: 6pt !important;
    letter-spacing: -0.02em !important;
    text-transform: lowercase !important;
  }
  .is-hero-dark .hero__meta .label,
  .hero__meta .label { color: var(--ink-soft) !important; }
  .is-hero-dark .hero__meta a,
  .hero__meta a {
    color: var(--ink) !important;
    border-bottom-color: var(--rule) !important;
  }

  /* Freeze animations */
  .name { animation: none !important; color: var(--ink) !important; }
  .dot {
    animation: none !important;
    box-shadow: none !important;
    background: var(--accent) !important;
  }
  .hero__cycle__word {
    transition: none !important;
    filter: none !important;
    opacity: 1 !important;
    color: var(--ink) !important;
  }

  /* ─── Nav ─── */
  .nav {
    position: static !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 6px 0 !important;
    border-bottom: none !important;
  }
  .is-hero-dark .nav { background: transparent !important; color: var(--ink) !important; }
  .is-hero-dark .nav__brand { color: var(--ink) !important; }
  .nav__cta, .nav__links { display: none !important; }

  /* ─── Body sections — comfortable rhythm ─── */
  main { max-width: none !important; padding: 0 4mm !important; }
  .section {
    padding: 28px 0 !important;
    border-top: 1px solid var(--rule);
  }
  .section__head { margin-bottom: 16px !important; gap: 7px !important; }
  .section__num { font-size: 8.5pt !important; }
  .section__title {
    font-size: 15pt !important;
    letter-spacing: -0.015em !important;
    font-weight: 500 !important;
  }

  /* About — prose, single column with normal flow */
  .prose p {
    font-size: 7.5pt !important;
    line-height: 1.5 !important;
    margin: 0 0 8px !important;
    max-width: 78ch !important;
  }
  .prose p + p { margin-top: 0 !important; }

  /* Material skills — now lives inside Skills & Tools, below the 3 cols */
  .material {
    margin-top: 22px !important;
    padding-top: 18px !important;
    border-top: 1px solid var(--rule) !important;
  }
  .material__heading { margin-bottom: 10px !important; font-size: 7pt !important; }
  .material__list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px 32px !important;
    font-size: 8pt !important;
    line-height: 1.5 !important;
  }
  .material__list li { padding-left: 16px !important; }
  .material__list li::before { top: 0.7em !important; }

  /* Experience timeline — breathing room between roles */
  .timeline__item {
    grid-template-columns: 90px 1fr !important;
    gap: 20px !important;
    padding: 10px 0 15px !important;
    align-items: baseline !important;
  }
  /* Drop the closing rule on the last item so we don't double up
     with the next section's top border. */
  .timeline__item:last-child { border-bottom: none !important; }
  .timeline__when { font-size: 7.5pt !important; padding-top: 0 !important; }
  .timeline__body h3 { font-size: 9pt !important; margin: 0 0 3px !important; }
  .timeline__body p {
    font-size: 7.5pt !important;
    line-height: 1.45 !important;
    margin: 0 !important;
    max-width: none !important;
  }

  /* Skills */
  .skills { gap: 12px !important; }
  .skills__group h4 { margin-bottom: 10px !important; font-size: 7pt !important; }
  .skills__group ul { font-size: 7pt !important; line-height: 1.1 !important; padding: 0 !important; margin: 0 !important; }
  .skills__group li { padding: 0 !important; border-bottom: none !important; margin: 0 !important; }

  /* Feedback quotes — 3 columns to fit */
  .quotes {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
  }
  .quote { padding: 0 !important; margin: 0 !important; background: transparent !important; border: none !important; }
  .quote blockquote { font-size: 11.5pt !important; line-height: 1.35 !important; margin: 0 0 8px !important; padding: 0 !important; }
  /* Attribution matches the Skills & Tools entries (7pt, ink) */
  .quote figcaption {
    font-family: var(--sans) !important;
    font-size: 7pt !important;
    line-height: 1.45 !important;
    color: var(--ink) !important;
    letter-spacing: 0 !important;
  }

  /* Page breaks */
  .timeline__item,
  .skills__group,
  .quote {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  h2, h3 {
    break-after: avoid;
    page-break-after: avoid;
  }
  #about { page-break-before: avoid; }
}
