/* Candidate A — Quiet stack. White, outline-only, system fonts. Base is 05 (restraint);
   the 09 sticky stack is used only for the six featured entries.
   Borrowed: 01 underline-draw links · 06 pill chips (outlined) · 07 swiss meta rows (+ numbered
   section rules) · 03 bento tiles · 10 magnetic header links. */
:root {
  --bg: #fff;
  --fg: #141413;
  --muted: #6b6b64;
  --line: #dddcd6;
  --accent: #b3341f;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, -apple-system, "Segoe UI", Inter, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --top: 4rem;   /* where stack panels stick */
  color-scheme: light;
}
.progress { position: fixed; inset: 0 0 auto; height: 1px; background: var(--fg); transform: scaleX(0); transform-origin: 0 50%; z-index: 10; }

* { box-sizing: border-box; }
html { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
main { max-width: 68rem; margin: 0 auto; padding: 1.5rem 1.5rem 5rem; overflow-x: clip; }
section { margin-top: 6rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0; padding-left: 1.2rem; }
li { margin-bottom: .6rem; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* --- small type --- */
.meta, .back, .links, h2, .num, .badge, .chip {
  font: 500 .72rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: .14em;
}
.meta { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; color: var(--muted); margin: 0; }
/* 07 swiss meta row: hairline on top, labels spread */
header .meta, .card .meta, .panel .meta { border-top: 1px solid var(--line); padding-top: .6rem; }
.num { color: var(--muted); font-family: var(--mono); }

/* 01 underline-draw links */
.links a, .back, .box a, footer a, .tile__link {
  padding-bottom: 2px;
  background:
    linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px,
    linear-gradient(var(--line), var(--line)) no-repeat 0 100% / 100% 1px;
  transition: background-size .35s var(--ease), color .2s;
}
.links a:hover, .back:hover, .box a:hover, footer a:hover, .tile__link:hover { background-size: 100% 1px, 100% 1px; color: var(--fg); }
.links { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; margin: 0; }
.links a { display: inline-block; transition: background-size .35s var(--ease), color .2s, translate .5s var(--ease); }
.back { display: inline-block; color: var(--muted); margin: .5rem 0 3rem; }

/* 06 pill chips, outlined */
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 0; }
.chip { display: inline-block; padding: .35em .8em; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); letter-spacing: .06em; text-transform: none; font-size: .78rem; }

/* --- hero --- */
.hero { min-height: 70vh; min-height: 70svh; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 3rem; }
h1 { font: 400 clamp(3rem, 11vw, 8rem)/1.02 var(--serif); letter-spacing: -.02em; margin: 0 0 1.25rem; overflow-wrap: anywhere; }
.tagline { color: var(--muted); font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.45; max-width: 36rem; margin: 0 0 2rem; }
body.project header { padding: 0 0 2rem; }
body.project h1 { font-size: clamp(2.4rem, 7vw, 5rem); }
body.project header .meta { margin-top: .5rem; }
body.project header .links { margin-top: 1.25rem; }

/* hero word reveal (05): only once JS has split the h1 */
h1.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
h1.split .wi { display: inline-block; transform: translateY(110%); animation: rise .7s var(--ease) forwards; animation-delay: calc(var(--i) * 60ms + 80ms); }
@keyframes rise { to { transform: none; } }
.js header .tagline, .js header .links, .js header .meta, .js header .chips, .js .back { opacity: 0; animation: fadeup .7s var(--ease) forwards; }
.js .back { animation-delay: .1s; }
.js header .tagline { animation-delay: .35s; }
.js header .meta { animation-delay: .45s; }
.js header .chips { animation-delay: .5s; }
.js header .links { animation-delay: .55s; }
@keyframes fadeup { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* --- section headings --- */
h2 { display: flex; align-items: center; gap: 1.25rem; color: var(--muted); margin: 0 0 2.25rem; }
h2::after { content: ""; flex: 1; height: 1px; background: var(--line); transform-origin: left; transition: transform .8s var(--ease) .1s; }
.io [data-reveal]:not(.in) h2::after { transform: scaleX(0); }
body:not(.project) main { counter-reset: sec; }
body:not(.project) h2 { counter-increment: sec; }
body:not(.project) h2::before { content: counter(sec, decimal-leading-zero); font-family: var(--mono); color: var(--accent); letter-spacing: .1em; }
h3 { font: 400 1.5rem/1.15 var(--serif); letter-spacing: -.01em; margin: 0 0 .5rem; }
h4 { font: 600 .72rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 1.25rem 0 .5rem; }

/* the one slide-in: hidden only while html.io */
[data-reveal] { transition: opacity .7s ease-out, transform .7s var(--ease); }
.io [data-reveal]:not(.in) { opacity: 0; transform: translateY(16px); }

/* --- about --- */
.prose { max-width: 40rem; }
.prose p:first-child { font: 400 clamp(1.4rem, 2.4vw, 1.9rem)/1.28 var(--serif); letter-spacing: -.01em; max-width: 46rem; }
.prose p { font-size: 1.05rem; }

/* --- image slot: real <img> or an outline placeholder showing its caption --- */
.fig { margin: 0; }
.shot { width: 100%; display: block; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); }
img.shot { object-fit: cover; aspect-ratio: 16 / 10; }
.shot--empty { aspect-ratio: 16 / 10; display: grid; place-items: center; position: relative; padding: 1.5rem; text-align: center;
               color: var(--muted); font: 400 .85rem/1.45 var(--sans); }
.shot--empty span { max-width: 26rem; }
.shot--empty::before, .shot--empty::after { content: ""; position: absolute; width: 12px; height: 12px; border: 0 solid var(--fg); }
.shot--empty::before { top: 8px; left: 8px; border-width: 1px 0 0 1px; }
.shot--empty::after { bottom: 8px; right: 8px; border-width: 0 1px 1px 0; }
figcaption { color: var(--muted); font-size: .85rem; line-height: 1.45; margin: .6rem 0 0; }

/* --- selected work: 09 sticky stack, outline panels --- */
.stack { list-style: none; padding: 0; margin: 0; }
.stack::after { content: ""; display: block; height: 20vh; }   /* room for the last panel to settle */
.panel {
  --depth: 0; --i: 0; --tail: 0;
  position: sticky; top: calc(var(--top) + var(--i) * .75rem);
  margin: 0 0 calc(1.25rem + var(--tail) * .75rem);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  transform: scale(calc(1 - .05 * var(--depth))); transform-origin: 50% 0;
  overflow: hidden;
  min-height: clamp(22rem, 64vh, 34rem);
  padding: 2rem 2.25rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  grid-template-rows: auto 1fr auto auto auto;
  grid-template-areas: "num shot" "title shot" "blurb shot" "meta shot" "chips shot";
  column-gap: 3rem; align-items: center;
}
.panel.tall { position: static; transform: none; }
.panel.tall::after { display: none; }
.panel::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: var(--bg); opacity: min(.6, calc(var(--depth) * .35)); }
.stack > :nth-child(1) { --i: 0; } .stack > :nth-child(2) { --i: 1; } .stack > :nth-child(3) { --i: 2; } .stack > :nth-child(n + 4) { --i: 3; }
.stack > :nth-last-child(2) { --tail: 1; } .stack > :nth-last-child(3) { --tail: 2; }
.panel .num { grid-area: num; align-self: start; }
.panel .fig { grid-area: shot; }
.panel h3 { grid-area: title; align-self: end; font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.05; margin: 1rem 0 .75rem; }
.panel .blurb { grid-area: blurb; color: var(--muted); font-size: 1.05rem; margin: 0 0 1.25rem; max-width: 34ch; }
.panel .meta { grid-area: meta; }
.panel .chips { grid-area: chips; margin-top: .9rem; }
.panel h3 a::before { content: ""; position: absolute; inset: 0; z-index: 1; }   /* whole panel is the link */
.panel:hover, .panel:focus-within { border-color: var(--fg); }
.panel:has(a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.panel h3 a:focus-visible { outline: none; }

/* title arrow, revealed on hover/focus of the whole panel or card */
.panel h3 a::after, .card h3 a::after { content: "\2192"; display: inline-block; margin-left: .3em;
  opacity: 0; transform: translateX(-.3em); transition: opacity .25s, transform .25s var(--ease); }
.panel:hover h3 a::after, .panel:focus-within h3 a::after,
.card:hover h3 a::after, .card:focus-within h3 a::after { opacity: 1; transform: none; }

/* --- more projects: quiet card grid --- */
.grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.card { position: relative; border: 1px solid var(--line); border-radius: 8px; padding: 1.1rem; display: flex; flex-direction: column; transition: border-color .2s; }
.card:hover, .card:focus-within { border-color: var(--fg); }
.card h3 { font-size: 1.3rem; margin: 1rem 0 .4rem; }
.card h3 a::before { content: ""; position: absolute; inset: 0; }
.card .blurb { color: var(--muted); font-size: .95rem; margin: 0 0 1rem; flex: 1; }
.card .meta { font-size: .66rem; }
.card:has(a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.card h3 a:focus-visible { outline: none; }

/* --- project page: heading box, text box, image box --- */
body.project section { margin-top: 1.5rem; }
.blocks { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 1rem; align-items: start; }
.box { padding: 1.5rem; border: 1px solid var(--line); border-radius: 8px; }
.box h2 { margin: 0; }
.box h2::after { display: none; }
.box--h p { color: var(--muted); font-size: .9rem; margin: 1rem 0 0; }
.box p { font-size: 1rem; max-width: 42rem; }
.box p:last-child { margin-bottom: 0; }
.box li { font-size: 1rem; max-width: 42rem; }
.box li:last-child { margin-bottom: 0; }
.shots { display: grid; gap: 1rem; }
.shots img.shot { aspect-ratio: auto; }
.blocks .bento, .blocks .shots, .blocks .timeline { grid-column: 2; }

/* --- 03 bento tiles: the nine-demo strip --- */
.bento { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; }
.tile { border: 1px solid var(--line); border-radius: 8px; padding: 1rem; display: flex; flex-direction: column; transition: border-color .2s; }
.tile:hover { border-color: var(--fg); }
.tile h3 { font-size: 1.2rem; margin: .9rem 0 .3rem; }
.tile .blurb { color: var(--muted); font-size: .92rem; margin: 0 0 .6rem; }
.tile .sig { font-size: .85rem; margin: 0 0 1rem; flex: 1; }
.tile__link { align-self: flex-start; font: 500 .72rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: .14em; }

/* --- clover journal: timeline --- */
.steps li { margin-bottom: .75rem; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.stage { border: 1px solid var(--line); border-radius: 8px; padding: 1.5rem; margin: 0; }
.stage .meta { margin-bottom: .75rem; align-items: center; }
.stage h3 { font-size: 1.5rem; }
.stage p, .stage li { font-size: 1rem; max-width: 42rem; }
.stage .shots { margin: 1rem 0 .5rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
.stage .shots .shot--empty { aspect-ratio: 16 / 10; }
.badge { display: inline-block; padding: .25em .7em; border: 1px solid var(--fg); border-radius: 999px; color: var(--fg); }
.stage--done .badge { background: var(--fg); color: var(--bg); }
.stage--now .badge { border-color: var(--accent); color: var(--accent); }
.stage--now { border-color: var(--accent); }
.stage--later .badge { border-color: var(--line); color: var(--muted); }
.stage--later { color: var(--muted); }

footer { margin-top: 6rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
footer p { margin: 0; }
body.project footer { margin-top: 3rem; }

@media (max-width: 720px) {
  main { padding: 1.25rem 1.25rem 4rem; }
  section { margin-top: 4rem; }
  .hero { min-height: 60vh; min-height: 60svh; }
  .panel { min-height: 0; padding: 1.25rem; grid-template-columns: minmax(0, 1fr); column-gap: 0;
           grid-template-rows: auto auto auto auto auto auto; grid-template-areas: "num" "shot" "title" "blurb" "meta" "chips"; }
  .panel .num { margin-bottom: .75rem; }
  .panel h3 { font-size: 1.7rem; }
  .panel .blurb { max-width: none; }
  .stack::after { height: 12vh; }
  .blocks { grid-template-columns: minmax(0, 1fr); }
  .blocks .bento, .blocks .shots, .blocks .timeline { grid-column: 1; }
  .box, .stage { padding: 1.1rem 1.15rem; }
  .bento { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  h1.split .wi { transform: none; }
  .js header .tagline, .js header .links, .js header .meta, .js header .chips, .js .back { opacity: 1; }
  .io [data-reveal]:not(.in) { opacity: 1; transform: none; }
  .panel { transform: none; }
  .panel::after { display: none; }
  h2::after { transform: none !important; }
  .progress { display: none; }
  .links a { translate: none !important; }
}
