/* Shared styles for the Projects pages. Same palette and type as the home page:
   a burgundy band for each page's heading, ivory paper below, Times throughout. */
:root {
  --paper: #f8f4f1; --ink: #2a1418; --muted: #6f5a5e; --rule: #e3d8d6; --rule-strong: #a98f93;
  --accent: #6d1a2d; --flood: #6d1a2d; --on-flood: #fdf7f5; --on-flood-soft: #eed6d8;
  --blush: #f3cfca; --past-bg: #eee3e1;
  --font: "Times New Roman", Times, serif;
  --gutter-l: max(16px, 8vw, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, 8vw, env(safe-area-inset-right, 0px));
  --meta-col: clamp(13rem, 17vw, 17rem);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1a0d10; --ink: #f3e7e6; --muted: #c2a9ac; --rule: #3b2328; --rule-strong: #6b4a50;
    --accent: #e3a0ab; --flood: #5a1424; --past-bg: #2b171c; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1a0d10; --ink: #f3e7e6; --muted: #c2a9ac; --rule: #3b2328; --rule-strong: #6b4a50;
  --accent: #e3a0ab; --flood: #5a1424; --past-bg: #2b171c; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 1.0625rem; line-height: 1.5;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper);
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 700; text-wrap: balance; }
.wrap {
  box-sizing: content-box; max-width: 70rem; margin-inline: auto;
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
}
.label { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

/* Navigation */
.site-nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: var(--paper); border-bottom: 1px solid var(--rule);
}
.site-nav .wrap { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; padding-block: .7rem; }
.nav-name { font-weight: 700; font-size: 1.0625rem; text-decoration: none; white-space: nowrap; }
.nav-links { display: flex; gap: clamp(.75rem, 2.5vw, 2rem); font-size: .9375rem; }
.nav-links a { text-decoration: none; color: var(--muted); white-space: nowrap; padding-block: .15rem; border-bottom: 1px solid transparent; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* Page heading band */
.page-head { background: var(--flood); color: var(--on-flood); }
.page-head .wrap { display: grid; gap: 1rem; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.page-head .label, .back { color: var(--on-flood-soft); }
.back { font-size: .9375rem; text-decoration: none; justify-self: start; }
.back:hover { color: var(--on-flood); text-decoration: underline; }
.page-head h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); line-height: 1.05; letter-spacing: -.01em; }
.page-head .lead { font-size: clamp(1.0625rem, 1.4vw, 1.25rem); line-height: 1.45; max-width: 40rem; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chips li { font-size: .8125rem; font-weight: 700; padding: .12rem .65rem; border-radius: 999px; border: 1px solid currentColor; line-height: 1.5; }
.page-head .chips li { color: var(--on-flood-soft); }
.buttons { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .25rem; }
.button {
  display: inline-block; font-weight: 700; font-size: .9375rem; text-decoration: none;
  color: #6d1a2d; background: var(--blush); border-radius: 999px; padding: .5rem 1.1rem;
}
.button:hover { background: var(--on-flood); }
.button.ghost { background: none; color: var(--on-flood); box-shadow: inset 0 0 0 1.5px var(--on-flood-soft); }
.button.ghost:hover { background: var(--on-flood); color: #6d1a2d; }
.page-head :focus-visible { outline-color: var(--on-flood); }

/* Projects index */
.band { padding-block: clamp(2.5rem, 5vw, 4rem); }
.proj-list { display: grid; }
.proj {
  display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; align-items: center; gap: 1rem 2rem;
  padding-block: clamp(1.5rem, 3vw, 2.25rem); border-top: 1px solid var(--rule); text-decoration: none;
}
.proj:last-child { border-bottom: 1px solid var(--rule); }
.glyph { width: 4.5rem; height: 4.5rem; padding: .7rem; border-radius: 12px; background: var(--flood); color: var(--on-flood); }
.glyph * { fill: none; stroke: currentColor; stroke-width: 1.5; }
.glyph .solid { fill: currentColor; stroke: none; }
.proj-text { display: grid; gap: .4rem; min-width: 0; }
.proj-context { color: var(--muted); font-size: .9375rem; }
.proj h2 { font-size: clamp(1.375rem, 2.4vw, 1.875rem); line-height: 1.12; }
.proj-summary { max-width: 44rem; }
.proj .chips { margin-top: .3rem; color: var(--muted); }
.arrow { font-size: 1.5rem; color: var(--accent); transition: transform .2s; }
.proj:hover h2 { color: var(--accent); }
.proj:hover .arrow { transform: translateX(6px); }

/* Project detail */
.detail { display: grid; grid-template-columns: var(--meta-col) minmax(0, 46rem); justify-content: space-between; gap: 2rem 2.5rem; }
.facts { display: grid; gap: 1.1rem; align-content: start; }
.facts dt { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin-top: .2rem; }
.detail-body { display: grid; gap: 1.25rem; min-width: 0; }
.detail-body h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.1; }
.about { color: var(--muted); max-width: 44rem; }
.points { display: grid; gap: .75rem; }
.points li { padding-left: 1.125rem; position: relative; }
.points li::before { content: ""; position: absolute; left: 0; top: .72em; width: .55rem; height: 1px; background: var(--accent); }
.note { color: var(--muted); font-size: .9375rem; }

.next { border-top: 1px solid var(--rule-strong); }
.next .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; padding-block: 2rem; }
.next a { text-decoration: none; display: grid; gap: .2rem; }
.next a span { color: var(--muted); font-size: .875rem; }
.next a b { font-size: 1.25rem; }
.next a:hover b { color: var(--accent); }
.next a.right { text-align: right; justify-items: end; }

/* Footer */
.foot { background: var(--flood); color: var(--on-flood-soft); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding-block: 1.75rem; font-size: .9375rem; }
.foot a { color: var(--on-flood); }

@media (max-width: 820px) {
  .nav-name { display: none; }
  .site-nav .wrap { justify-content: flex-start; }
  .nav-links { font-size: .875rem; gap: .2rem .7rem; flex-wrap: wrap; }
}
@media (max-width: 900px) {
  .detail { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
}
@media (max-width: 600px) {
  :root { --gutter-l: max(16px, 4vw, env(safe-area-inset-left, 0px)); --gutter-r: max(16px, 4vw, env(safe-area-inset-right, 0px)); }
  .proj { grid-template-columns: 3.5rem minmax(0, 1fr); align-items: start; }
  .glyph { width: 3.5rem; height: 3.5rem; padding: .5rem; }
  .arrow { display: none; }

}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .arrow { transition: none; }
}

/* Design process: a numbered sequence, since the order is the point */
.process-title { margin-top: 1.5rem; }
.challenge { font-size: 1.125rem; line-height: 1.45; padding-left: 1rem; border-left: 2px solid var(--accent); max-width: 44rem; }
.process { list-style: none; padding: 0; margin: 0; display: grid; counter-reset: step; }
.process > li {
  counter-increment: step; position: relative; display: grid; gap: .3rem;
  padding: 0 0 1.5rem 3rem;
}
.process > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--flood); color: var(--on-flood); font-weight: 700; font-size: .9375rem;
}
.process > li:not(:last-child)::after {
  content: ""; position: absolute; left: .95rem; top: 2.2rem; bottom: .3rem; width: 1px; margin-left: -.5px; background: var(--rule-strong);
}
.process > li > b { font-size: 1.125rem; line-height: 1.9rem; }
.process > li > p { color: var(--ink); max-width: 44rem; }

/* Process extras: goal lists and sketch galleries */
.goals { display: grid; gap: .35rem; margin-top: .4rem; max-width: 44rem; }
.goals li { padding-left: 1.125rem; position: relative; }
.goals li::before { content: ""; position: absolute; left: .1rem; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1rem; margin-top: .75rem; }
.figs.one { grid-template-columns: minmax(0, 22rem); }
.figs figure { margin: 0; display: grid; gap: .4rem; align-content: start; }
.figs a { display: block; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--rule-strong); }
.figs img { display: block; width: 100%; height: auto; transition: transform .25s; }
.figs a:hover img { transform: scale(1.02); }
.figs figcaption { font-size: .875rem; line-height: 1.35; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .figs img { transition: none; } }

.more-link { justify-self: start; margin-top: .5rem; font-weight: 700; color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; }
.more-link:hover { border-bottom-width: 2px; }

/* Interview notes page */
.toc { position: sticky; top: 4.5rem; align-self: start; display: grid; gap: .6rem; }
.toc-title { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.toc a { text-decoration: none; display: grid; line-height: 1.25; }
.toc a span { font-size: .875rem; color: var(--muted); }
.toc a:hover { color: var(--accent); }
.interview { gap: 3rem; }
.block { display: grid; gap: 1.25rem; scroll-margin-top: 4.5rem; }
.block > .label { color: var(--muted); margin-bottom: -.9rem; }
.questions { margin: 0; padding-left: 1.5rem; display: grid; gap: .5rem; max-width: 44rem; }
.qa { display: grid; gap: .5rem; padding-top: 1.1rem; border-top: 1px solid var(--rule); }
.q { display: flex; gap: .75rem; font-weight: 700; max-width: 44rem; }
.q span {
  flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--flood); color: var(--on-flood); font-size: .8125rem; margin-top: .05rem;
}
.a { padding-left: 2.35rem; display: grid; gap: .6rem; max-width: 46.35rem; }
.notes { display: grid; gap: .35rem; }
.notes li { padding-left: 1.125rem; position: relative; }
.notes li::before { content: ""; position: absolute; left: 0; top: .72em; width: .55rem; height: 1px; background: var(--accent); }
.intro { color: var(--muted); max-width: 44rem; }
.goal-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.goal-list li { border-top: 2px solid var(--accent); padding-top: .75rem; display: grid; gap: .3rem; counter-increment: goal; }
.goal-list b::before { content: counter(goal) ". "; color: var(--accent); }
.goal-list { counter-reset: goal; }
@media (max-width: 900px) {
  .toc { position: static; }
  .toc ol { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
}
@media (max-width: 600px) { .a { padding-left: 0; } }

/* Process steps that open their own page */
.process > li.linked { padding-bottom: 1rem; }
.process > li.linked > a { display: flex; align-items: center; gap: .75rem; text-decoration: none; min-height: 1.9rem; }
.process > li.linked b { font-size: 1.1875rem; line-height: 1.3; }
.process > li.linked i { font-style: normal; color: var(--accent); transition: transform .2s; }
.process > li.linked > a:hover b { color: var(--accent); }
.process > li.linked > a:hover i { transform: translateX(5px); }

/* Step pages */
.ext { justify-self: start; font-weight: 700; color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; }
.kv { display: grid; gap: 1rem; margin: 0; max-width: 46rem; }
.kv dt { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.kv dd { margin: .2rem 0 0; }
.fig-large { margin: 0; display: grid; gap: .5rem; max-width: 46rem; }
.fig-large a { display: block; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--rule-strong); }
.fig-large img { display: block; width: 100%; height: auto; }
.fig-large figcaption { font-size: .875rem; color: var(--muted); }
.tree, .pages { margin: 0; display: grid; gap: .6rem; max-width: 46rem; }
.tree { list-style: none; padding: 0; }
.tree li { display: grid; gap: .1rem; padding: .7rem 0 .7rem 1rem; border-left: 3px solid #e8d48a; }
.tree li span { color: var(--muted); padding-left: .9rem; border-left: 3px solid #b9d3c8; }
.pages { padding-left: 1.4rem; }
.block > p { max-width: 46rem; }
@media (prefers-reduced-motion: reduce) { .process > li.linked i { transition: none; } }

/* Course milestones */
.process > li.stage { gap: .4rem; }
.stage-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .75rem; font-size: .9375rem; color: var(--muted); }
.pill-s { font-size: .75rem; font-weight: 700; padding: .05rem .6rem; border-radius: 999px; line-height: 1.6; }
.stage.done .pill-s { background: var(--past-bg); color: var(--muted); }
.stage.now .pill-s { background: var(--flood); color: var(--on-flood); }
.stage.next .pill-s { box-shadow: inset 0 0 0 1px var(--rule-strong); color: var(--muted); }
.stage.next::before { background: var(--paper) !important; color: var(--accent) !important; box-shadow: inset 0 0 0 1.5px var(--accent); }
.sublinks { list-style: none; padding: 0; margin: .35rem 0 0; display: grid; border-top: 1px solid var(--rule); max-width: 44rem; }
.sublinks a { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; font-weight: 700; }
.sublinks a i { font-style: normal; color: var(--accent); transition: transform .2s; }
.sublinks a:hover { color: var(--accent); }
.sublinks a:hover i { transform: translateX(5px); }
@media (prefers-reduced-motion: reduce) { .sublinks a i { transition: none; } }

.notice {
  justify-self: start; display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 700; color: var(--on-flood);
}
.notice::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--blush); flex: none; }

/* Project covers on the overview page */
.proj.has-cover { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr) auto; gap: 1rem 2.25rem; }
.cover {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 10px; box-shadow: 0 0 0 1px var(--rule); transition: transform .25s, box-shadow .25s;
}
.proj:hover .cover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--rule-strong), 0 10px 24px -14px rgba(42, 20, 24, .45); }
@media (max-width: 760px) {
  .proj.has-cover { grid-template-columns: minmax(0, 1fr); }
  .proj.has-cover .arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) { .cover { transition: none; } }

/* Cover image at the top of each project page */
.detail-cover { margin-bottom: clamp(2rem, 4vw, 3rem); }
.detail-cover a { display: block; max-width: 60rem; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--rule), 0 18px 40px -28px rgba(42, 20, 24, .55); }
.detail-cover img { display: block; width: 100%; height: auto; }

/* Year and status */
.status { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .02em; padding: .1rem .6rem; border-radius: 999px; line-height: 1.6; white-space: nowrap; vertical-align: middle; }
.proj-context .status { margin-left: .6rem; }
.status.done { background: var(--past-bg); color: var(--muted); }
.status.now { background: var(--flood); color: var(--on-flood); }
.page-head .status { justify-self: start; }
.page-head .status.done { background: none; color: var(--on-flood-soft); box-shadow: inset 0 0 0 1px var(--on-flood-soft); }
.page-head .status.now { background: var(--blush); color: #6d1a2d; }

.process-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1.5rem; margin-top: 1.5rem; max-width: 44rem; }
.process-head .process-title { margin-top: 0; }
.process-head .more-link { margin-top: 0; }
