@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&family=Poppins:wght@400;500;600;700&display=swap");

:root {
  --black: #080807;
  --graphite: #171615;
  --paper: #ffffff;
  --paper-2: #f7f7f4;
  --ink: #151411;
  --muted: #68645d;
  --line: #dfddd7;
  --line-dark: rgba(255, 255, 255, 0.18);
  --gold: #b58a2b;
  --gold-2: #d2ad55;
  --max: 1320px;
  --sans: "Montserrat", "Poppins", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  text-rendering: optimizeLegibility;
}

img,
video {
  display: block;
  height: auto;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-color: rgba(185, 144, 61, 0.55);
  text-underline-offset: 0.18em;
}

a:hover {
  color: #8f681d;
}

button,
input {
  font: inherit;
}

.read-progress {
  background: var(--gold);
  height: 2px;
  left: 0;
  position: fixed;
  top: 0;
  transform-origin: left;
  transform: scaleX(0);
  width: 100%;
  z-index: 40;
}

.site-header {
  align-items: center;
  backdrop-filter: blur(18px);
  background: #232321;
  border-bottom: 1px solid rgba(210, 173, 85, 0.28);
  color: #fff;
  display: flex;
  gap: clamp(1rem, 3vw, 3rem);
  justify-content: space-between;
  min-height: 68px;
  padding: 0.8rem clamp(1rem, 4vw, 3rem);
  position: sticky;
  top: 0;
  z-index: 30;
  transition: background 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled,
.site-header:focus-within {
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 0.9rem;
  min-width: max-content;
  text-decoration: none;
  transition: transform 220ms ease;
}

.brand-mark {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--gold-2);
  display: inline-flex;
  font-size: 0.85rem;
  font-weight: 900;
  height: 40px;
  justify-content: center;
  letter-spacing: 0.02em;
  line-height: 1;
  position: relative;
  width: 40px;
}

.brand-mark img {
  height: 40px;
  object-fit: cover;
  width: 40px;
}

.brand-mark::before {
  display: none;
}

.brand > span:not(.brand-mark) {
  color: #fff;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-header nav {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(0.8rem, 2vw, 2.1rem);
  justify-content: flex-end;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  visibility: visible;
}

.nav-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid rgba(210, 173, 85, 0.35);
  color: #fff;
  cursor: pointer;
  display: none;
  font-size: 0.7rem;
  font-weight: 850;
  justify-content: center;
  letter-spacing: 0.16em;
  min-height: 2.4rem;
  padding: 0.55rem 0.75rem;
  text-transform: uppercase;
}

@media (min-width: 821px) {
  body.home .site-header:not(.is-scrolled):not(:focus-within) {
    justify-content: center;
  }

  body.home .site-header:not(.is-scrolled):not(:focus-within) .brand {
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
  }

  body.home .site-header:not(.is-scrolled):not(:focus-within) nav {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-0.35rem);
    visibility: hidden;
  }
}

.site-header nav a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
}

.site-header nav a.is-active,
.site-header nav a:hover {
  color: #fff;
}

.site-header nav a.is-active::after {
  background: var(--gold);
  content: "";
  display: block;
  height: 1px;
  margin-top: 0.45rem;
}

main {
  margin: 0 auto;
  max-width: var(--max);
  padding: clamp(1.1rem, 3vw, 2.4rem) clamp(1rem, 4vw, 3rem);
}

.small-label {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  margin: 0 0 1.2rem;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  letter-spacing: 0;
  line-height: 1.02;
  margin: 0;
}

h1 {
  font-size: 3.35rem;
  font-weight: 800;
  max-width: 17ch;
}

h2 {
  font-size: 2.1rem;
  font-weight: 800;
}

h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.lede {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 48rem;
}

.home-hero,
.project-hero {
  align-items: center;
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  min-height: 0;
  padding: clamp(1.2rem, 4vw, 3rem) 0 clamp(1.6rem, 3.5vw, 2.8rem);
}

.home-copy h1 {
  margin-bottom: 1.25rem;
}

.home-copy {
  max-width: 720px;
}

.home .home-hero {
  align-items: center;
  display: grid;
  gap: clamp(1.4rem, 3.5vw, 3.4rem);
  grid-template-columns: minmax(0, 0.86fr) minmax(390px, 0.92fr);
  max-width: none;
  padding-bottom: clamp(1.5rem, 4vw, 3rem);
  padding-top: 1rem;
}

.home .home-copy h1 {
  font-size: 3.35rem;
  max-width: 18ch;
}

.greeting-rotator {
  color: var(--ink);
  display: inline-block;
}

.greeting-rotator::after {
  animation: cursor-blink 900ms steps(2, start) infinite;
  color: var(--gold);
  content: "|";
  margin-left: 0.08em;
}

.hero-greeting-line,
.hero-name {
  display: block;
}

@keyframes cursor-blink {
  50% {
    opacity: 0;
  }
}

.home .split-section {
  align-items: start;
  margin-top: 0.35rem;
}

.home-portrait {
  justify-self: end;
  margin: 0;
  max-width: 620px;
  overflow: hidden;
  width: 100%;
}

.home-portrait img {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  min-height: clamp(340px, 36vw, 520px);
  object-fit: cover;
  object-position: center 34%;
  transform: scale(1.04);
  transform-origin: center 35%;
  width: 100%;
}

.institution-strip {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(0.55rem, 2vw, 1.15rem);
  margin: 1.05rem 0 1.25rem;
  max-width: 100%;
}

.institution-strip a {
  align-items: center;
  display: inline-flex;
  flex: 0 1 auto;
  min-height: 34px;
}

.institution-strip img {
  max-height: 34px;
  max-width: min(145px, 30vw);
  object-fit: contain;
  width: auto;
}

.inline-link {
  color: var(--ink);
  font-weight: 750;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.2em;
  white-space: nowrap;
}

.home-archive {
  margin-top: clamp(2.2rem, 5vw, 4.5rem);
}

.home-about {
  align-items: center;
  border-top: 1px solid var(--ink);
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  margin-top: clamp(2rem, 4vw, 3.4rem);
  padding-top: clamp(1.2rem, 3vw, 2rem);
}

.home-about figure,
.presentation-frame {
  margin: 0;
}

.home-about img {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  object-fit: cover;
  object-position: center 35%;
  width: 100%;
}

.home-about h2,
.home-project-overview h2 {
  margin-bottom: 0.8rem;
}

.home-about p,
.home-project-overview p {
  color: var(--muted);
  max-width: 52rem;
}

.home-about p {
  margin: 0 0 0.8rem;
}

.home-project-overview {
  margin-top: clamp(2.4rem, 5vw, 4.2rem);
}

.project-overview-copy {
  margin-top: clamp(1.3rem, 3vw, 2rem);
  max-width: 70rem;
}

.project-preview-grid {
  border-top: 1px solid var(--line);
  display: block;
  margin-top: clamp(1.2rem, 3vw, 2rem);
  padding-top: clamp(1rem, 2.6vw, 1.5rem);
}

.presentation-frame {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: none;
  width: 100%;
}

.presentation-tile {
  color: inherit;
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  text-decoration: none;
}

.presentation-tile img,
.presentation-tile video {
  aspect-ratio: 16 / 9;
  background: #f5f5f2;
  border: 0;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.presentation-media {
  aspect-ratio: 16 / 9;
  background: #f5f5f2;
  border: 1px solid var(--line);
  display: block;
  overflow: hidden;
  width: 100%;
}

.presentation-media img,
.presentation-media video {
  max-height: none;
}

.presentation-tile span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.project-presentation-frame {
  align-self: start;
  display: grid;
  gap: 0.75rem;
  margin: 0;
}

.project-presentation-frame img,
.project-presentation-frame video {
  aspect-ratio: 16 / 9;
  background: #f5f5f2;
  border: 0;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.project-presentation-frame video {
  max-height: none;
}

.visual-wall {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  min-width: 0;
}

.visual-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: inherit;
  display: grid;
  min-height: 118px;
  overflow: hidden;
  position: relative;
  text-decoration: none;
}

.visual-card:nth-child(1) {
  grid-column: span 4;
  grid-row: span 2;
  min-height: 310px;
}

.visual-card:nth-child(2),
.visual-card:nth-child(3) {
  grid-column: span 2;
  min-height: 150px;
}

.visual-card:nth-child(n + 4) {
  grid-column: span 2;
}

.visual-card img {
  align-self: center;
  height: 100%;
  justify-self: center;
  object-fit: contain;
  padding: 0.35rem;
  width: 100%;
}

.visual-card span {
  background: rgba(255, 255, 255, 0.94);
  border-top: 2px solid var(--gold);
  bottom: 0;
  color: var(--ink);
  display: -webkit-box;
  font-size: 0.68rem;
  font-weight: 800;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  left: 0;
  letter-spacing: 0.14em;
  line-height: 1.25;
  overflow: hidden;
  padding: 0.42rem 0.55rem;
  position: absolute;
  right: 0;
  text-transform: uppercase;
}

.artifact-frame {
  background: #fff;
  border: 1px solid var(--line);
  margin: 0;
  padding: clamp(0.55rem, 1.3vw, 1rem);
}

.artifact-frame img {
  aspect-ratio: 16 / 9;
  background: var(--paper-2);
  max-height: 330px;
  object-fit: contain;
  width: 100%;
}

.hero-object {
  align-self: center;
  margin: 0;
}

.hero-object img {
  background: transparent;
  max-height: 380px;
  object-fit: contain;
  object-position: center;
  width: 100%;
}

.hero-object figcaption {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  margin-top: 0.8rem;
  padding-top: 0.75rem;
}

.artifact-frame figcaption {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  margin-top: 0.8rem;
  padding-top: 0.75rem;
}

.hero-actions,
.doc-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.4rem;
  margin-top: 1.35rem;
}

.text-link {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-decoration: none;
  text-transform: uppercase;
}

.text-link.strong {
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.35rem;
}

.hero-socials {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.social-icon {
  align-items: center;
  border: 1px solid var(--line);
  color: var(--ink);
  display: inline-flex;
  height: 2.35rem;
  justify-content: center;
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
  width: 2.35rem;
}

.social-icon:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-1px);
}

.social-icon svg {
  display: block;
  height: 1.12rem;
  width: 1.12rem;
}

.quiet-link {
  color: var(--muted);
}

.split-section {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.82fr);
  margin-top: clamp(1.6rem, 3.5vw, 3rem);
}

.section-title {
  align-items: end;
  border-bottom: 1px solid var(--ink);
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.7rem;
}

.section-title span {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.38em;
  text-transform: uppercase;
}

.section-title a {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-decoration: none;
  text-transform: uppercase;
}

.home-week-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.home-week-actions button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  height: 2rem;
  justify-content: center;
  padding: 0;
  width: 2rem;
}

.home-week-actions button:first-child svg {
  transform: rotate(180deg);
}

.home-week-actions button:hover {
  border-color: var(--gold);
}

.home-week-actions button:disabled {
  cursor: default;
  opacity: 0.35;
}

.section-title small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.archive-table {
  border-top: 1px solid var(--line);
}

.archive-table.visual {
  border-top: 0;
  display: grid;
  gap: 0.95rem;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.weekly-archive-grid.archive-table.visual {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.weekly-archive-grid.archive-table.compact {
  display: block;
}

.archive-table.compact .week-thumb {
  display: none;
}

.archive-table.compact .week-row {
  grid-template-columns: 3.2rem minmax(10rem, 1.15fr) minmax(16rem, 2fr) 1.4rem;
}

.archive-table.compact .week-tags {
  display: none;
}

.week-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 1rem;
  grid-template-columns: 3.2rem minmax(11rem, 1.2fr) minmax(18rem, 2.2fr) 1.4rem;
  padding: 0.62rem 0;
}

.week-no {
  color: var(--gold);
  font-size: 1.18rem;
  font-weight: 800;
  text-decoration: none;
}

.week-title {
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.week-row p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
  margin: 0;
}

.week-tags {
  display: none;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag {
  border-bottom: 1px solid rgba(185, 144, 61, 0.45);
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.week-thumb {
  align-items: center;
  background: #f4f1e9;
  border: 1px solid var(--line);
  display: none;
  height: 58px;
  justify-content: center;
  overflow: hidden;
  position: relative;
  text-decoration: none;
}

.archive-table.visual .week-row {
  align-content: start;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  gap: 0.55rem;
  grid-template-areas:
    "thumb thumb"
    "no title"
    "summary summary";
  grid-template-columns: 2.45rem minmax(0, 1fr);
  min-height: 100%;
  padding: 0 0 0.7rem;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.archive-table.visual .week-row.no-thumb {
  grid-template-areas:
    "no title"
    "summary summary";
  padding-top: 0.95rem;
}

.archive-table.visual .week-row:hover {
  border-color: rgba(181, 138, 43, 0.55);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.archive-table.visual .week-thumb {
  aspect-ratio: 16 / 9;
  border: 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  grid-area: thumb;
  height: auto;
  min-height: 0;
  width: 100%;
}

.archive-table.visual .week-row.no-thumb .week-thumb {
  display: none;
}

.week-thumb img {
  height: 100%;
  object-fit: cover;
  padding: 0;
  width: 100%;
}

.week-thumb.is-generated-overview {
  background: #fff;
}

.week-thumb.is-generated-overview img {
  object-fit: cover;
  padding: 0;
}

.archive-table.visual .week-no {
  grid-area: no;
  font-size: 1rem;
  padding-left: 0.75rem;
}

.archive-table.visual .week-title {
  display: -webkit-box;
  font-size: 0.88rem;
  grid-area: title;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-height: 1.24;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: break-word;
  padding: 0 1rem 0 0.12rem;
}

.archive-table.visual .week-row p {
  display: -webkit-box;
  font-size: 0.78rem;
  grid-area: summary;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding: 0 0.75rem;
}

.archive-table.visual .week-tags {
  display: none;
  grid-area: tags;
  padding: 0 0.85rem 0.85rem;
}

.archive-table.visual .week-arrow {
  display: none;
}

.week-thumb.empty {
  background: #fafaf8;
}

.week-arrow {
  align-items: center;
  color: var(--gold);
  display: inline-flex;
  justify-content: end;
  text-decoration: none;
}

.week-arrow svg {
  height: 1rem;
  width: 1rem;
}

.archive-table.visual.home-week-grid {
  grid-auto-rows: 1fr;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.2rem;
}

.home-week-grid .week-row {
  min-height: 100%;
}

.home-week-grid .week-row p {
  -webkit-line-clamp: 5;
}

.home-week-grid .week-row.is-carousel-hidden {
  display: none;
}

.home-week-grid.is-carousel-moving .week-row:not(.is-carousel-hidden) {
  animation: week-carousel-next 260ms ease both;
}

.home-week-grid[data-carousel-direction="-1"].is-carousel-moving .week-row:not(.is-carousel-hidden) {
  animation-name: week-carousel-prev;
}

@keyframes week-carousel-next {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes week-carousel-prev {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.listing-page,
.project-page {
  max-width: var(--max);
}

.project-page {
  padding-top: 2rem;
}

.project-hero {
  padding-bottom: 1.2rem;
  padding-top: 1rem;
}

.project-hero .artifact-frame {
  padding: 0.65rem;
}

.project-hero .artifact-frame img {
  max-height: 260px;
}

.page-intro {
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.3rem;
  padding-bottom: 1.4rem;
}

.page-intro.compact-intro {
  margin-bottom: 1rem;
  padding-bottom: 1.05rem;
}

.page-intro h1,
.project-hero h1 {
  max-width: 14ch;
}

.listing-page .page-intro h1 {
  font-size: 3.9rem;
  max-width: 16ch;
}

.subtle-actions {
  margin-top: 1rem;
}

.archive-controls {
  margin-top: 2rem;
}

.archive-toolbar {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.search-box {
  color: var(--muted);
  flex: 1 1 420px;
  display: grid;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 0.45rem;
  letter-spacing: 0.16em;
  max-width: 520px;
  min-width: 280px;
  text-transform: uppercase;
}

.view-switch {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.view-switch button {
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  padding: 0.15rem 0 0.28rem;
  text-transform: inherit;
}

.view-switch button.is-active,
.view-switch button:hover {
  border-color: var(--gold);
  color: var(--ink);
}

.search-box input {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  min-height: 44px;
  padding: 0.6rem 0.8rem;
}

.article-wall {
  border-bottom: 1px solid var(--line);
  margin: -0.6rem 0 2rem;
  padding-bottom: 1rem;
}

.article-wall .visual-card:nth-child(1) {
  min-height: 240px;
}

.article-wall .visual-card span {
  display: none;
}

.week-map {
  margin: clamp(1.8rem, 4vw, 3rem) 0;
}

.week-map-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
}

.week-map-item {
  border: 1px solid var(--line);
  color: inherit;
  display: grid;
  gap: 0.45rem;
  min-height: 104px;
  padding: 0.75rem;
  position: relative;
  text-decoration: none;
}

.week-map-item::before {
  background: var(--gold);
  content: "";
  height: 2px;
  left: 0.75rem;
  position: absolute;
  right: 0.75rem;
  top: 0.7rem;
}

.week-map-item span {
  color: var(--gold);
  font-size: 1.55rem;
  font-weight: 850;
  line-height: 1;
  padding-top: 0.8rem;
}

.week-map-item strong {
  color: var(--muted);
  display: -webkit-box;
  font-size: 0.72rem;
  font-weight: 750;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.25;
  overflow: hidden;
}

.week-map-item:hover {
  border-color: var(--gold);
}

.ai-sidecar {
  bottom: 1rem;
  display: grid;
  justify-items: end;
  position: fixed;
  right: 1rem;
  z-index: 18;
}

.ai-panel {
  background: #fff;
  border: 1px solid var(--ink);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.18);
  display: none;
  gap: 0.75rem;
  max-height: min(520px, calc(100vh - 7rem));
  overflow: auto;
  padding: 0.95rem;
  width: min(380px, calc(100vw - 2rem));
}

.ai-sidecar.is-expanded .ai-panel {
  display: grid;
}

.ai-sidecar.is-ai-hidden .ai-panel {
  display: none;
}

.ai-toggle {
  align-items: center;
  background: #232321;
  border: 1px solid rgba(210, 173, 85, 0.7);
  border-radius: 999px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
  color: var(--gold-2);
  cursor: pointer;
  display: inline-flex;
  gap: 0.32rem;
  font-size: 0.68rem;
  font-weight: 850;
  height: 2.85rem;
  justify-content: center;
  letter-spacing: 0.08em;
  margin-top: 0.45rem;
  padding: 0 0.95rem;
  text-transform: uppercase;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  width: auto;
}

.ai-toggle:hover {
  border-color: var(--gold);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

.ai-sidecar.is-expanded .ai-toggle {
  order: 2;
}

.ai-sidecar.is-ai-hidden .ai-toggle {
  border-radius: 0.65rem;
  gap: 0;
  padding: 0;
  width: 2.85rem;
}

.ai-sidecar.is-ai-hidden .ai-toggle span {
  display: none;
}

.ai-toggle strong {
  color: #fff;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
}

.ai-panel-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.ai-panel strong {
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.ai-panel p,
.ai-panel small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
  margin: 0;
}

.ai-close {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  padding: 0.32rem 0.55rem;
  text-transform: uppercase;
}

.ai-topics,
.ai-services {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ai-topic,
.ai-copy {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  padding: 0.18rem 0;
  text-align: left;
  text-transform: uppercase;
}

.ai-selection {
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--ink);
  display: block;
  line-height: 1.35;
  padding: 0.55rem;
  width: 100%;
}

.ai-selection[hidden] {
  display: none;
}

.ai-topic.is-active,
.ai-topic:hover,
.ai-copy:hover,
.ai-close:hover {
  border-color: var(--gold);
  color: var(--ink);
}

.ai-choice {
  background: #232321;
  border: 1px solid #232321;
  color: #fff;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 850;
  justify-content: center;
  letter-spacing: 0.16em;
  min-height: 2.15rem;
  padding: 0.45rem 0.7rem;
  text-decoration: none;
  text-transform: uppercase;
}

.ai-choice:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

.reader-trail {
  align-items: center;
  display: flex;
  gap: 0.9rem;
  margin-bottom: 1.2rem;
}

.reader-trail a,
.reader-trail button {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  padding: 0.2rem 0;
  text-decoration: none;
  text-transform: uppercase;
}

.reader-trail a:hover,
.reader-trail button:hover {
  border-color: var(--gold);
  color: var(--ink);
}

.week-lens {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--ink);
  display: grid;
  gap: clamp(1rem, 3vw, 2rem);
  grid-template-columns: minmax(0, 0.9fr) minmax(230px, 0.7fr);
  margin: -0.4rem 0 2rem;
  padding: 1rem 0 1.15rem;
}

.shot-stage {
  background: transparent;
  border: 0;
  color: var(--ink);
  display: grid;
  gap: 0.65rem;
  overflow: hidden;
  padding: 0;
  position: relative;
  text-decoration: none;
}

.shot-stage::after {
  display: none;
}

.shot-main {
  aspect-ratio: 16 / 9;
  background: var(--paper-2);
  border: 1px solid var(--line);
  height: auto;
  object-fit: contain;
  padding: 0.35rem;
  position: relative;
  width: 100%;
}

.shot-stage strong,
.shot-stage p,
.shot-week {
  position: static;
}

.shot-week {
  color: var(--gold-2);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.shot-stage strong {
  display: block;
  font-size: 1.08rem;
  line-height: 1.18;
  max-width: 24ch;
}

.shot-stage p {
  display: -webkit-box;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  margin: 0;
  max-width: 34rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shot-controls {
  align-content: start;
  border-left: 1px solid var(--line);
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  padding-left: 1rem;
}

.shot-chip {
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  padding: 0.5rem 0;
  text-decoration: none;
}

.shot-chip.is-active,
.shot-chip:hover {
  border-color: var(--gold);
  color: var(--ink);
}

.filter-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 2rem;
}

.filter-line button {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  padding: 0.3rem 0;
  text-transform: uppercase;
}

.filter-line button.is-active,
.filter-line button:hover {
  border-color: var(--gold);
  color: var(--ink);
}

.resource-browser {
  margin-top: 1.4rem;
}

.site-index-grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.4rem);
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  margin-top: 1.6rem;
}

.site-index-grid > section {
  min-width: 0;
}

.file-table,
.note-table,
.index-table {
  border-top: 1px solid var(--line);
}

.file-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(9rem, 1.25fr) minmax(8rem, 1fr) minmax(7rem, 0.9fr) minmax(5rem, 0.55fr) 1.2rem;
  min-height: 64px;
  padding: 0.62rem 0;
}

.index-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(11rem, 1fr) minmax(15rem, 1.5fr) minmax(8rem, 0.72fr) 1.4rem;
  min-height: 64px;
  padding: 0.68rem 0;
}

.file-name,
.note-title,
.index-name {
  color: var(--ink);
  font-weight: 750;
  line-height: 1.24;
  min-width: 0;
  text-decoration: none;
}

.file-path,
.file-meta,
.file-origin,
.note-meta,
.index-meta {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.file-path,
.note-meta,
.index-meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

.file-meta,
.file-origin {
  min-width: 0;
  overflow-wrap: anywhere;
}

.file-meta .tag {
  margin-left: 0.45rem;
}

.file-origin {
  text-transform: capitalize;
}

.file-download {
  align-items: center;
  color: var(--gold);
  display: inline-flex;
  justify-content: flex-end;
  text-decoration: none;
}

.file-download svg {
  height: 1rem;
  width: 1rem;
}

.note-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(12rem, 1.1fr) minmax(16rem, 2fr) minmax(10rem, 0.8fr) 1.4rem;
  padding: 0.75rem 0;
}

.note-row p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.36;
  margin: 0;
}

.index-row p {
  color: var(--muted);
  display: -webkit-box;
  font-size: 0.82rem;
  line-height: 1.35;
  margin: 0;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty-state {
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  margin: 0;
  padding: 1rem 0;
}

.essay-block p {
  color: var(--muted);
}

.reader-shell {
  align-items: start;
  display: grid;
  gap: clamp(2rem, 4vw, 4rem);
  grid-template-columns: minmax(0, 840px) minmax(210px, 280px);
  max-width: 1260px;
}

.doc-article {
  min-width: 0;
}

.doc-header {
  margin-bottom: 2.4rem;
  padding-bottom: 0;
}

.doc-header h1 {
  max-width: 13ch;
}

.doc-header p:not(.small-label) {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 42rem;
}

.week-overview-hero {
  background: #fff;
  border: 1px solid var(--line);
  margin: 1.25rem 0 0;
}

.week-overview-hero img {
  aspect-ratio: 16 / 9;
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.doc-actions a {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--gold);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  padding: 0 0 0.25rem;
  text-decoration: none;
  text-transform: uppercase;
}

.doc-content {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.72;
}

.doc-content h1,
.doc-content h2,
.doc-content h3,
.doc-content h4 {
  font-family: var(--sans);
  line-height: 1.18;
  margin: 2.4rem 0 0.9rem;
}

.doc-content h1 {
  display: none;
}

.doc-content h2 {
  font-size: 2rem;
  padding-top: 0;
}

.doc-content h3 {
  font-size: 1.22rem;
}

.doc-content p,
.doc-content li {
  color: #2a2823;
}

.doc-content .task-list {
  display: grid;
  gap: 0.55rem;
  list-style: none;
  margin: 0 0 1.4rem;
  padding-left: 0;
}

.doc-content .task-list-item {
  align-items: start;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1.2rem minmax(0, 1fr);
  line-height: 1.45;
}

.doc-content .task-list-item::marker {
  content: "";
}

.task-list-control {
  display: inline-flex;
  height: 1.15rem;
  justify-content: center;
  margin-top: 0.15rem;
  width: 1.15rem;
}

.task-list-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.task-list-indicator {
  align-items: center;
  border: 1px solid var(--gold);
  display: inline-flex;
  height: 1rem;
  justify-content: center;
  width: 1rem;
}

.task-list-control input[type="checkbox"]:checked + .task-list-indicator::before {
  color: var(--gold);
  content: "✓";
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.doc-content p {
  margin: 0 0 1.1rem;
}

.doc-content img {
  background: #fff;
  border: 1px solid var(--line);
  margin: 1.4rem 0;
  max-height: 76vh;
  max-width: 100%;
  object-fit: contain;
  padding: 0.45rem;
  width: auto;
}

.doc-content figure img {
  margin: 0 0 0.45rem;
}

.about-portrait {
  margin: 0 0 1.6rem;
  max-width: 560px;
}

.about-portrait img {
  aspect-ratio: 4 / 3;
  display: block;
  height: auto;
  margin: 0;
  max-height: none;
  object-fit: cover;
  object-position: center top;
  padding: 0;
  width: 100%;
}

.doc-content figcaption {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.45;
  margin-top: 0.15rem;
}

.doc-content figure.doc-figure {
  display: inline-block;
  margin: 1.4rem 0;
  max-width: 100%;
  vertical-align: top;
}

.doc-content video {
  aspect-ratio: 16 / 9;
  background: #f5f5f2;
  border: 1px solid var(--line);
  display: block;
  height: auto;
  margin: 1.2rem 0;
  object-fit: cover;
  width: 100%;
}

.project-source > p:first-of-type img {
  aspect-ratio: 16 / 9;
  display: block;
  max-height: none;
  object-fit: cover;
  padding: 0;
  width: 100%;
}

.doc-content table {
  border-collapse: collapse;
  display: block;
  font-family: var(--sans);
  font-size: 0.9rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  width: 100%;
}

.doc-content th,
.doc-content td {
  border-bottom: 1px solid var(--line);
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.doc-content th {
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.table-cell-list {
  display: grid;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.table-cell-list li {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  line-height: 1.35;
}

.cell-list-marker {
  color: var(--gold);
  font-weight: 850;
}

.cell-list-moving .cell-list-marker {
  color: var(--muted);
}

.doc-content pre {
  background: #111;
  color: #f4ead5;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.55;
  overflow-x: auto;
  padding: 1rem;
}

.doc-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.doc-content blockquote {
  border-left: 2px solid var(--gold);
  color: var(--muted);
  margin: 1.5rem 0;
  padding-left: 1rem;
}

.doc-content .dev-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.25rem 0 1.4rem;
}

.doc-content .dev-evidence a {
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  padding: 0.38rem 0.55rem;
  text-decoration: none;
  text-transform: uppercase;
}

.doc-content .dev-evidence a:hover {
  border-color: var(--gold);
  color: var(--ink);
}

.page-toc {
  border-left: 1px solid var(--line);
  color: var(--muted);
  padding-left: 1rem;
}

.reader-side {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 96px;
}

.page-toc strong {
  color: var(--ink);
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
}

.page-toc a {
  color: var(--muted);
  display: block;
  line-height: 1.3;
  margin-bottom: 0.65rem;
  text-decoration: none;
}

.page-toc .toc-l2 {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 850;
}

.page-toc .toc-l3 {
  font-size: 0.74rem;
  margin-left: 0.85rem;
  opacity: 0.8;
}

.mobile-page-toc {
  display: none;
}

.project-schedule,
.project-stage,
.project-flow {
  margin: clamp(1.6rem, 4vw, 3rem) 0;
}

.schedule-summary {
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.6rem;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
}

.schedule-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.schedule-summary strong {
  color: var(--ink);
  font-size: 1rem;
}

.schedule-rail {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.project-schedule.is-gantt .schedule-rail {
  border: 1px solid var(--line);
  display: grid;
  gap: 0;
  grid-template-columns: 1fr;
  padding: 0.45rem;
}

.schedule-node {
  background: #fff;
  border: 1px solid var(--line);
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 0.35rem;
  min-height: 92px;
  padding: 0.7rem;
  text-align: left;
}

.project-schedule.is-gantt .schedule-node {
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  column-gap: 0.85rem;
  grid-template-columns: minmax(7.6rem, 0.32fr) minmax(0, 1fr) 5rem;
  min-height: 58px;
  overflow: hidden;
  padding: 0.52rem 0.65rem 0.92rem;
  position: relative;
}

.project-schedule.is-gantt .schedule-node:last-child {
  border-bottom: 0;
}

.project-schedule.is-gantt .schedule-node::before {
  background: rgba(21, 20, 17, 0.08);
  content: "";
  height: 4px;
  bottom: 0.46rem;
  left: 0.65rem;
  position: absolute;
  right: 0.8rem;
}

.project-schedule.is-gantt .schedule-node::after {
  background: var(--gold);
  bottom: 0.34rem;
  content: "";
  height: 8px;
  left: calc(0.65rem + var(--task-start));
  position: absolute;
  width: min(62%, var(--task-width));
}

.project-schedule.is-gantt .schedule-node > * {
  position: relative;
  z-index: 1;
}

.schedule-node span {
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.schedule-node strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.schedule-node em {
  color: var(--muted);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.schedule-node[data-schedule-state="planned"]::after {
  background: #b9b4aa;
}

.schedule-node[data-schedule-state="active"]::after {
  background: #222;
}

.schedule-node.is-active,
.schedule-node:hover {
  border-color: var(--gold);
}

.schedule-detail {
  background: #fff;
  border: 1px solid var(--ink);
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
  padding: 1rem;
}

.schedule-detail span {
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.schedule-detail h3 {
  font-size: 1.35rem;
}

.schedule-detail ul {
  color: var(--muted);
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding-left: 1.1rem;
}

.schedule-detail a {
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
}

.mini-week-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-top: 0.15rem;
}

.schedule-detail .mini-week-link {
  border: 1px solid var(--line);
  color: var(--muted);
  display: inline-flex;
  letter-spacing: 0.1em;
  padding: 0.32rem 0.45rem;
}

.schedule-detail .mini-week-link:hover {
  border-color: var(--gold);
  color: var(--ink);
}

.project-stage-grid {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--ink);
  display: grid;
  gap: clamp(1rem, 3vw, 2rem);
  grid-template-columns: minmax(210px, 0.55fr) minmax(0, 1.45fr);
  padding: 1rem 0;
}

.project-stage-rail {
  align-content: start;
  display: grid;
}

.project-stage-node {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 0.25rem;
  padding: 0.72rem 0;
  text-align: left;
}

.project-stage-node span,
.project-stage-preview span {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-stage-node strong {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.25;
}

.project-stage-node.is-active strong,
.project-stage-node:hover strong {
  color: var(--ink);
}

.project-stage-preview {
  color: inherit;
  display: grid;
  gap: 0.8rem;
  text-decoration: none;
}

.project-stage-preview img {
  aspect-ratio: 16 / 9;
  background: var(--paper-2);
  border: 1px solid var(--line);
  object-fit: contain;
  padding: 0.45rem;
  width: 100%;
}

.project-stage-preview h3 {
  font-size: clamp(1.5rem, 3vw, 2.45rem);
  max-width: 18ch;
}

.project-stage-preview p {
  color: var(--muted);
  margin: 0;
  max-width: 60rem;
}

.flow-strip {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.flow-card {
  border: 1px solid var(--line);
  color: inherit;
  display: grid;
  gap: 0.65rem;
  padding: 0.7rem;
  text-decoration: none;
}

.flow-card img {
  aspect-ratio: 4 / 3;
  background: var(--paper-2);
  object-fit: cover;
  width: 100%;
}

.flow-card span {
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.flow-card p {
  color: var(--muted);
  display: -webkit-box;
  font-size: 0.82rem;
  line-height: 1.35;
  margin: 0;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.flow-card:hover {
  border-color: var(--gold);
}

.project-source-layout {
  align-items: start;
  display: grid;
  gap: clamp(2rem, 4vw, 4rem);
  grid-template-columns: minmax(0, 880px) minmax(210px, 280px);
  margin-top: 2rem;
}

.project-source {
  min-width: 0;
}

.reader-nav {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 2rem;
}

.reader-nav a {
  border: 0;
  color: inherit;
  display: grid;
  gap: 0.2rem;
  min-height: 0;
  padding: 0.25rem 0;
  text-decoration: none;
}

.reader-nav a:last-child {
  text-align: right;
}

.reader-nav span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.reader-nav strong {
  font-size: 1rem;
}

.site-footer {
  align-items: center;
  background: var(--black);
  color: rgba(255, 255, 255, 0.65);
  display: flex;
  justify-content: center;
  padding: 1.2rem clamp(1rem, 4vw, 3rem);
  text-align: center;
}

.site-footer span:first-child {
  color: var(--gold-2);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1050px) {
  h1,
  .listing-page .page-intro h1 {
    font-size: 2.85rem;
  }

  .home .home-copy h1 {
    font-size: 2.85rem;
  }

  h2 {
    font-size: 1.95rem;
  }

  .project-hero,
  .project-source-layout,
  .split-section,
  .reader-shell {
    grid-template-columns: 1fr;
  }

  .home-about,
  .project-preview-grid,
  .project-stage-grid {
    grid-template-columns: 1fr;
  }

  .home-hero,
  .project-hero {
    min-height: auto;
  }

  .reader-side {
    position: static;
  }

  .reader-side .page-toc {
    display: none;
  }

  .mobile-page-toc {
    background: #fff;
    border: 1px solid var(--ink);
    bottom: 1rem;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
    display: block;
    left: 1rem;
    margin: 0;
    max-height: 52vh;
    max-width: min(320px, calc(100vw - 5.2rem));
    overflow: auto;
    padding: 0.75rem;
    position: fixed;
    white-space: normal;
    z-index: 17;
  }

  .mobile-page-toc summary {
    color: var(--ink);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }

  .mobile-page-toc a {
    display: block;
    font-size: 0.8rem;
    margin: 0 0 0.55rem;
    text-decoration: none;
    white-space: normal;
  }

  .mobile-page-toc div {
    display: grid;
    margin-top: 0.7rem;
  }

  .mobile-page-toc .toc-l2 {
    border-top: 1px solid var(--line);
    color: var(--ink);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    line-height: 1.35;
    margin: 0.2rem 0 0.35rem;
    padding-top: 0.6rem;
    text-transform: uppercase;
  }

  .mobile-page-toc .toc-l2:first-child {
    border-top: 0;
    padding-top: 0;
  }

  .mobile-page-toc .toc-l3 {
    border-left: 2px solid rgba(181, 138, 43, 0.45);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 650;
    line-height: 1.35;
    margin: 0 0 0.45rem 0.35rem;
    padding-left: 0.7rem;
  }

  .week-lens,
  .project-source-layout,
  .reader-shell {
    grid-template-columns: 1fr;
  }

  .week-row {
    grid-template-columns: 3rem minmax(0, 1fr) 1rem;
  }

  .archive-table.compact .week-row {
    grid-template-columns: 3rem minmax(0, 1fr) 1rem;
  }

  .week-row p,
  .week-tags {
    grid-column: 2 / -1;
  }

  .archive-table.visual .week-row p {
    grid-column: 1 / -1;
  }

  .file-row,
  .index-row,
  .note-row {
    grid-template-columns: minmax(0, 1fr) 1.4rem;
  }

  .file-path,
  .file-meta,
  .file-origin,
  .index-row p,
  .index-meta,
  .note-row p,
  .note-meta {
    grid-column: 1 / -1;
  }

  .file-download,
  .index-row .week-arrow,
  .note-row .week-arrow {
    grid-column: 2;
    grid-row: 1;
  }

  .visual-card:nth-child(1),
  .visual-card:nth-child(2),
  .visual-card:nth-child(3),
  .visual-card:nth-child(n + 4) {
    grid-column: span 3;
    min-height: 160px;
  }

  .visual-card:nth-child(1) {
    min-height: 250px;
  }

  .archive-table.visual {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .weekly-archive-grid.archive-table.visual {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .archive-table.visual.home-week-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 860px) and (max-width: 1050px) {
  .home-about {
    grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  }

  .week-lens {
    grid-template-columns: minmax(260px, 0.48fr) minmax(0, 0.52fr);
  }
}

@media (max-width: 820px) {
  .site-header {
    align-items: center;
    gap: 0.75rem;
    min-height: 62px;
    padding: 0.65rem 1rem;
  }

  .site-header nav {
    background: #232321;
    border-bottom: 1px solid rgba(210, 173, 85, 0.28);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18);
    display: grid;
    gap: 0;
    left: 0;
    opacity: 0;
    padding: 0.35rem 1rem 0.8rem;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 100%;
    transform: translateY(-0.4rem);
    visibility: hidden;
    width: 100%;
    z-index: 1;
  }

  .site-header.is-nav-open nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }

  .site-header nav a {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: block;
    padding: 0.75rem 0;
  }

  .site-header nav a.is-active::after {
    margin-top: 0.3rem;
    width: 2.1rem;
  }

  .nav-toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand-mark,
  .brand-mark img {
    height: 36px;
    width: 36px;
  }

  .brand > span:not(.brand-mark) {
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 720px) {
  main {
    padding: 2rem 1rem;
  }

  h1,
  .listing-page .page-intro h1 {
    font-size: 2.2rem;
  }

  .home .home-copy h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 2rem;
  }

  .lede {
    font-size: 1rem;
  }

  .presentation-frame {
    max-width: none;
  }

  .home .home-hero {
    grid-template-columns: 1fr;
  }

  .home-portrait {
    justify-self: center;
    max-width: min(460px, 92vw);
  }

  .artifact-frame img {
    aspect-ratio: auto;
    max-height: 58vh;
  }

  .week-map-grid,
  .project-stage-grid,
  .flow-strip,
  .site-index-grid {
    grid-template-columns: 1fr;
  }

  .project-schedule.is-gantt .schedule-node {
    gap: 0.18rem;
    grid-template-columns: 1fr;
    min-height: 76px;
  }

  .project-schedule.is-gantt .schedule-node em {
    grid-column: 1;
  }

  .project-schedule.is-gantt .schedule-node::before {
    bottom: 0.48rem;
    left: 0.65rem;
    right: 0.65rem;
    top: auto;
    transform: none;
  }

  .project-schedule.is-gantt .schedule-node::after {
    bottom: 0.35rem;
    left: calc(0.65rem + var(--task-start));
    top: auto;
    transform: none;
    width: var(--task-width);
  }

  .week-lens {
    grid-template-columns: 1fr;
  }

  .presentation-frame {
    grid-template-columns: 1fr;
  }

  .shot-stage {
    aspect-ratio: auto;
  }

  .shot-controls {
    border-left: 0;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-left: 0;
    padding-top: 0.55rem;
  }

  .week-row,
  .archive-table.visual .week-row {
    grid-template-columns: 2.8rem minmax(0, 1fr);
  }

  .archive-table.compact .week-row {
    grid-template-columns: 2.8rem minmax(0, 1fr) 1rem;
  }

  .week-thumb {
    grid-column: 2 / -1;
    height: auto;
    min-height: 120px;
  }

  .archive-table.visual .week-thumb {
    grid-column: 1 / -1;
  }

  .week-tags,
  .week-row p {
    grid-column: 2 / -1;
  }

  .archive-table.visual .week-row p {
    grid-column: 1 / -1;
  }

  .section-title {
    align-items: start;
    flex-direction: column;
    gap: 0.5rem;
  }

  .reader-nav {
    grid-template-columns: 1fr;
  }

  .reader-nav a:last-child {
    text-align: left;
  }

  .visual-wall {
    gap: 0.55rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-table.visual {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .weekly-archive-grid.archive-table.visual {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-table.visual.home-week-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .visual-card:nth-child(1),
  .visual-card:nth-child(2),
  .visual-card:nth-child(3),
  .visual-card:nth-child(n + 4) {
    grid-column: span 1;
    min-height: 150px;
  }

  .visual-card:nth-child(1) {
    grid-column: span 2;
    min-height: 210px;
  }
}

/* Week 12 CoreXYZ interactive demo, restored from the original site. */
.corexyz-demo {
  --corexyz-bg: #0b0b0b;
  --corexyz-panel: #1d2021;
  --corexyz-panel-soft: #282828;
  --corexyz-border: #504945;
  --corexyz-text: #ebdbb2;
  --corexyz-muted: #a89984;
  --corexyz-accent: #d79921;
  --corexyz-red: #fb4934;
  --corexyz-blue: #458588;
  --corexyz-green: #b8bb26;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(220px, 0.75fr) minmax(320px, 1.6fr);
  margin: 2rem 0;
}

.corexyz-panel {
  background: var(--corexyz-panel);
  border: 1px solid var(--corexyz-border);
  border-radius: 4px;
  padding: 1rem;
}

.corexyz-panel-title {
  color: var(--corexyz-muted);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0.2rem 0 0.7rem;
  text-transform: uppercase;
}

.corexyz-panel-title:not(:first-child) {
  margin-top: 1.2rem;
}

.corexyz-button-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.corexyz-btn {
  background: #000;
  border: 1px solid var(--corexyz-border);
  border-radius: 4px;
  color: var(--corexyz-text);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
  min-height: 2.5rem;
  padding: 0.55rem 0.75rem;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.corexyz-btn:hover,
.corexyz-btn:focus-visible {
  background: var(--corexyz-panel-soft);
  border-color: var(--corexyz-accent);
  color: var(--corexyz-accent);
  outline: none;
}

.corexyz-btn:active {
  transform: translateY(1px);
}

.corexyz-btn.motor-a {
  border-color: var(--corexyz-red);
  color: var(--corexyz-red);
}

.corexyz-btn.motor-b {
  border-color: var(--corexyz-blue);
  color: var(--corexyz-blue);
}

.corexyz-btn.motor-c {
  border-color: var(--corexyz-green);
  color: var(--corexyz-green);
}

.corexyz-stage {
  align-items: center;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

#corexyz-svg {
  background: var(--corexyz-bg);
  border: 1px solid var(--corexyz-border);
  border-radius: 4px;
  height: auto;
  max-width: 560px;
  width: 100%;
}

.corexyz-rail {
  stroke: #3c3836;
  stroke-width: 20;
}

.corexyz-pulley {
  fill: #282828;
  stroke: #ebdbb2;
  stroke-width: 2;
}

.corexyz-carriage,
.corexyz-effector,
.corexyz-motor-box {
  fill: #111;
  stroke: #ebdbb2;
  stroke-width: 3;
}

.corexyz-z-fill {
  fill: #fff;
  stroke: #665c54;
  stroke-dasharray: 4;
  stroke-width: 2;
}

.corexyz-z-text,
.corexyz-motor-label {
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
}

.corexyz-z-text {
  fill: #665c54;
}

.corexyz-motor-label {
  fill: #ebdbb2;
}

.corexyz-thread {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.thread-a {
  stroke: var(--corexyz-red);
}

.thread-b {
  stroke: var(--corexyz-blue);
}

.corexyz-anchor-a {
  fill: var(--corexyz-red);
}

.corexyz-anchor-b {
  fill: var(--corexyz-blue);
}

.corexyz-motor-a {
  fill: #282828;
  stroke: var(--corexyz-red);
  stroke-width: 3;
}

.corexyz-motor-b {
  fill: #282828;
  stroke: var(--corexyz-blue);
  stroke-width: 3;
}

.corexyz-motor-c {
  fill: #282828;
  stroke: var(--corexyz-green);
  stroke-width: 3;
}

.corexyz-spin {
  fill: none;
  opacity: 0;
  stroke-linecap: round;
  stroke-width: 3;
  transform-box: fill-box;
  transform-origin: center;
}

.motor-a-spin {
  stroke: var(--corexyz-red);
}

.motor-b-spin {
  stroke: var(--corexyz-blue);
}

.motor-c-spin {
  stroke: var(--corexyz-green);
}

.corexyz-spin.anim-cw {
  animation: corexyz-spin-cw 0.45s linear infinite;
  opacity: 1;
}

.corexyz-spin.anim-ccw {
  animation: corexyz-spin-ccw 0.45s linear infinite;
  opacity: 1;
}

@keyframes corexyz-spin-cw {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes corexyz-spin-ccw {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

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

@media (prefers-reduced-motion: reduce) {
  .corexyz-spin.anim-cw,
  .corexyz-spin.anim-ccw {
    animation: none;
  }
}
