/* site.css — portfolio-only layouts. Shared tokens and components live in brand.css. */

/* ---------- home hero ---------- */
.hero { display: grid; gap: 1.5rem; padding-block: clamp(4rem, 13vw, 9rem) clamp(3.5rem, 9vw, 6.5rem); }
.hero h1 {
  margin: 0;
  font-size: clamp(3.25rem, 11vw, 8.5rem);
  font-weight: 700;
  font-stretch: 108%;
  line-height: 0.92;
  letter-spacing: -0.035em;
}

/* ---------- home sections ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1.5rem; margin-bottom: 2rem; }
.section-head h2, .about h2 {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 700; font-stretch: 108%; line-height: 1.05; letter-spacing: -0.025em;
}
.section-head p { color: var(--muted); }

/* project: a route card */
.route {
  position: relative;
  display: grid; gap: 2rem;
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  box-shadow: inset 0 0 0 0 var(--accent);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.route:hover { border-color: var(--ink); box-shadow: inset 6px 0 0 0 var(--accent); }
@media (min-width: 820px) { .route { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: 3rem; } }
.route .body { display: grid; gap: 1rem; min-width: 0; }
.route-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem; }
.route h3 { margin: 0; font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 700; font-stretch: 108%; line-height: 1; letter-spacing: -0.03em; }
.route h3 a { text-decoration: none; }
.route h3 a::after { content: ""; position: absolute; inset: 0; }
.route .blurb { color: var(--muted); max-width: 46ch; }
.stack { margin: 0; padding-top: 1rem; border-top: 1px solid var(--rule); display: grid; gap: 0.25rem; }
.stack dd { margin: 0; font-size: 0.9375rem; }
.route .actions { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-weight: 600; }
.route .go { color: var(--link); }
.route .go span { display: inline-block; transition: transform 0.2s; }
.route:hover .go span { transform: translateX(4px); }
.route .ext { position: relative; z-index: 1; color: var(--muted); text-decoration: none; }
.route .ext:hover { color: var(--ink); text-decoration: underline; }

.upcoming { display: flex; gap: 1.25rem; align-items: baseline; margin-top: 1rem; padding: 1.25rem clamp(1.25rem, 3.5vw, 2.5rem); border: 1px solid var(--rule); border-radius: 3px; color: var(--muted); }
.upcoming .label { color: var(--muted); }

/* about */
.about { display: grid; gap: 1.25rem 3rem; }
@media (min-width: 820px) { .about { grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); } }
.about .prose p:first-child { font-size: 1.25rem; line-height: 1.5; }
.links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; padding: 0; margin: 0.5rem 0 0; list-style: none; font-weight: 600; }
.links a { text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--accent); }
.links a:hover { background: var(--accent); color: #0f1c17; text-decoration: none; }

.route .card { background: var(--snow); border-color: transparent; }

/* ---------- case study ---------- */
.cs-hero { display: grid; gap: 1.25rem; padding-block: clamp(3rem, 9vw, 6.5rem) clamp(3rem, 7vw, 5rem); }
.cs-hero .running { color: var(--on-band); }
.cs-hero .running::before { box-shadow: none; }
.cs-hero h1 { margin: 0; font-size: clamp(3.25rem, 11vw, 8rem); font-weight: 700; font-stretch: 108%; line-height: 0.92; letter-spacing: -0.035em; }
.cs-hero .lede { max-width: 40ch; }

.specbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.25rem 2rem; margin: 0; padding-block: 1.75rem; border-bottom: 1px solid var(--rule); }
.specbar div { display: grid; gap: 0.3rem; align-content: start; min-width: 0; }
.specbar dd { margin: 0; font-weight: 500; }
.specbar a { color: var(--link); font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--accent); }

.cs-section { display: grid; gap: 1.25rem 3rem; padding-block: clamp(3rem, 7vw, 5rem); border-top: 1px solid var(--rule); }
.specbar + .cs-section { border-top: 0; }
.cs-section > h2 { margin: 0; display: grid; gap: 0.4rem; font-size: clamp(1.6rem, 3vw, 2rem); font-weight: 700; font-stretch: 108%; line-height: 1.1; letter-spacing: -0.02em; }
.cs-section .content { display: grid; gap: 1.75rem; min-width: 0; }
@media (min-width: 900px) {
  .cs-section { grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr); }
  .cs-section > h2 { position: sticky; top: 1.5rem; align-self: start; }
  .cs-section.wide { grid-template-columns: minmax(0, 1fr); }
  .cs-section.wide > h2 { position: static; }
}

/* the rules, as a spec table */
.spec { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin: 0; border-top: 2px solid var(--ink); }
.spec div { display: grid; gap: 0.35rem; align-content: start; padding: 1.1rem 1.25rem 1.25rem 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.spec dd { margin: 0; display: grid; gap: 0.25rem; }
.spec .v { font-size: 1.875rem; font-weight: 700; font-stretch: 108%; line-height: 1.1; letter-spacing: -0.02em; }
.spec .n { color: var(--muted); font-size: 0.9375rem; }

/* the week, as a trail with waypoints */
.trail { list-style: none; margin: 0; padding: 0; display: grid; }
.trail li { position: relative; display: grid; gap: 0.5rem; align-content: start; padding: 0 0 2.25rem 2rem; margin-left: 0.5rem; border-left: 2px dashed var(--muted); min-width: 0; }
.trail li:last-child { border-left-color: transparent; padding-bottom: 0; }
.trail li::before { content: ""; position: absolute; left: -0.6rem; top: 0.1rem; width: 1rem; height: 1rem; border-radius: 50%; background: var(--accent); border: 2px solid var(--band); }
.trail .when { font-weight: 600; font-variant-numeric: tabular-nums; }
.trail h3 { margin: 0; font-size: 1.375rem; font-weight: 700; font-stretch: 108%; letter-spacing: -0.015em; line-height: 1.2; }
.trail p { color: var(--muted); font-size: 0.96875rem; }
.who-runs { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; padding-top: 0.25rem; }
@media (min-width: 1000px) {
  .trail { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
  .trail li { padding: 2rem 0 0; margin-left: 0; border-left: 0; border-top: 2px dashed var(--muted); }
  .trail li:last-child { border-top-color: var(--muted); }
  .trail li::before { left: 0; top: -0.6rem; }
}

/* validator output */
.terminal { margin: 0; padding: 0; list-style: none; background: var(--band-deep); color: var(--on-band); border-radius: 3px; overflow: hidden; }
.terminal li { display: grid; gap: 0.35rem; padding: 1rem 1.25rem; border-top: 1px solid rgba(241, 245, 238, 0.1); min-width: 0; }
.terminal li:first-child { border-top: 0; }
.terminal .rule { font-weight: 600; }
.terminal pre { margin: 0; overflow-x: auto; font: 400 0.8125rem/1.55 var(--mono); color: var(--on-band-muted); }
.terminal pre b { color: var(--bad); font-weight: 600; }

.card.lg li { padding-block: 0.75rem; }
.card.lg .pick { font-size: 1.125rem; }

.aside { display: grid; gap: 0.5rem; padding: 1.25rem 1.5rem; background: var(--accent-tint); border-left: 4px solid var(--accent); max-width: 62ch; }
.aside .label { color: var(--ink); }

blockquote { margin: 0; padding: 0.25rem 0 0.25rem 1.5rem; border-left: 3px solid var(--gpt); display: grid; gap: 0.75rem; max-width: 62ch; }
blockquote p { font-size: 1.0625rem; }
blockquote cite { font-style: normal; color: var(--muted); font-size: 0.9375rem; display: inline-flex; align-items: center; gap: 0.5rem; }

/* decisions */
.decisions { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 2rem 2.5rem; counter-reset: d; }
.decisions li { display: grid; gap: 0.4rem; align-content: start; padding-top: 1rem; border-top: 2px solid var(--ink); counter-increment: d; }
.decisions li::before { content: "0" counter(d); font-size: 0.75rem; font-weight: 700; font-stretch: 125%; letter-spacing: 0.06em; color: var(--muted); }
.decisions h3 { margin: 0; font-size: 1.1875rem; font-weight: 700; line-height: 1.25; }
.decisions p { color: var(--muted); font-size: 0.96875rem; }

/* closing band */
.outro { display: grid; gap: 1rem; padding-block: clamp(3.5rem, 9vw, 6.5rem); }
.outro p { color: var(--on-band-muted); }
.outro a.big { justify-self: start; font-size: clamp(2.25rem, 6.5vw, 4.5rem); font-weight: 700; font-stretch: 108%; line-height: 1; letter-spacing: -0.03em; color: var(--accent); text-decoration: none; }
.outro a.big:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }
.outro .final { max-width: 22ch; font-size: clamp(2rem, 5.5vw, 4rem); font-weight: 700; font-stretch: 108%; line-height: 1.05; letter-spacing: -0.03em; color: var(--on-band); text-wrap: balance; }
.outro .final span { color: var(--accent); }

/* ---------- plants story ---------- */
.group { display: grid; gap: 1rem; min-width: 0; }
.cs-hero h1.long { font-size: clamp(3rem, 9vw, 6.75rem); }
.hero-more { display: grid; gap: 0.9rem; max-width: 46ch; font-size: 1.0625rem; color: var(--on-band-muted); }
.hero-more strong { font-weight: 500; color: var(--on-band); }
.method span { color: var(--muted); }

/* early questions, read like a search history */
.history { list-style: none; margin: 0; padding: 0; max-width: 42rem; }
.history li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1rem; align-items: baseline; padding: 0.85rem 0; border-top: 1px solid var(--rule); }
.history li:last-child { border-bottom: 1px solid var(--rule); }
.history p { font-size: 1.125rem; }
.history .opinion p { font-weight: 600; }

.statement { margin: 0; padding-block: 0.25rem; font-size: clamp(2.25rem, 6vw, 4.25rem); font-weight: 700; font-stretch: 108%; line-height: 1; letter-spacing: -0.03em; text-wrap: balance; }
.statement.sm { display: grid; gap: 0.35rem; font-size: clamp(1.6rem, 3.6vw, 2.5rem); line-height: 1.1; letter-spacing: -0.02em; }
.statement.sm span:first-child { color: var(--muted); }

/* the routine, as variables */
.system { margin: 0; border-top: 2px solid var(--ink); }
.system div { display: grid; gap: 0.3rem 2rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.system dt { padding-top: 0.25rem; }
.system dd { margin: 0; }
@media (min-width: 640px) { .system div { grid-template-columns: 9rem minmax(0, 1fr); } }

.reply { display: grid; gap: 0.4rem; padding-left: 1.25rem; border-left: 3px solid var(--accent); font-size: 1.375rem; font-weight: 600; }

.compare { display: grid; gap: 1.5rem 2.5rem; }
.compare > div { display: grid; gap: 0.5rem; align-content: start; padding-top: 1rem; border-top: 2px solid var(--rule); }
.compare .q { font-size: 1.25rem; line-height: 1.4; color: var(--muted); }
.compare .later { border-top-color: var(--ink); }
.compare .later .q { color: var(--ink); font-weight: 600; }
@media (min-width: 640px) { .compare { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); } }

/* the rabbit hole: each step a little deeper */
.descent { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.2rem; }
.descent li { margin-left: calc(var(--i) * clamp(0.85rem, 3.2vw, 2.25rem)); font-size: clamp(1.2rem, 2.6vw, 1.75rem); font-weight: 700; font-stretch: 108%; line-height: 1.3; letter-spacing: -0.015em; }
.descent li + li::before { content: "↳ "; font-weight: 400; color: var(--muted); }
.descent + .caption { margin-left: calc(8 * clamp(0.85rem, 3.2vw, 2.25rem)); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.5rem 2.5rem; }
.stats > div { display: grid; gap: 0.4rem; align-content: start; padding-top: 1rem; border-top: 2px solid var(--ink); }
.stats .big { font-size: clamp(4rem, 11vw, 7rem); font-weight: 700; font-stretch: 108%; line-height: 0.9; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.stats .n { color: var(--muted); }
/* dashed = not built yet */
.stats.plan > div { border-top: 2px dashed var(--muted); }
.stats.plan .big { font-size: clamp(3rem, 8vw, 5rem); }

.from-to { display: grid; gap: 0.6rem; max-width: 46rem; }
.from-to p { display: grid; gap: 0.3rem; }
.from-to .q { font-size: clamp(1.5rem, 3.5vw, 2.25rem); font-weight: 700; font-stretch: 108%; line-height: 1.15; letter-spacing: -0.02em; }
.from-to p:first-child .q { font-weight: 500; color: var(--muted); }
.from-to .arrow { font-size: 1.5rem; line-height: 1; color: var(--muted); }

.observations { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.25rem; counter-reset: o; }
.observations li { display: grid; gap: 0.6rem; padding-top: 1rem; border-top: 2px solid var(--ink); counter-increment: o; }
.observations li::before { content: "0" counter(o); font-size: 0.75rem; font-weight: 700; font-stretch: 125%; letter-spacing: 0.06em; color: var(--muted); }
.observations h3 { margin: 0; font-size: 1.375rem; font-weight: 700; font-stretch: 108%; letter-spacing: -0.015em; line-height: 1.2; }
.observations .prose { gap: 0.75rem; }

/* home card: two quotes a year apart */
.route + .route { margin-top: 1rem; }
.card.qa li { grid-template-columns: 4.75rem minmax(0, 1fr); }
.card.qa .note { grid-column: 2; font-size: 0.875rem; }
.card.qa li:first-child .pick { font-weight: 500; color: var(--muted); }
