:root {
  --bg: #e6dbc7;
  --surface: #ddd0b9;
  --ink: #062b8a;
  --muted: #22418b;
  --accent: #062b8a;
  --accent-ink: #e6dbc7;
  --font-display: 'Libre Franklin', sans-serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --step-small: clamp(0.875rem, 0.84rem + 0.12vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(1.85rem, 1.25rem + 3vw, 3.75rem);
  --step-display: clamp(4.2rem, 8.2vw, 8.5rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  font-variant-numeric: tabular-nums;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  filter: grayscale(1) contrast(1.08);
  transition: transform 0.9s var(--ease-out);
}

img[src$=".png"] {
  mix-blend-mode: multiply;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

a:hover {
  color: var(--muted);
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.page-surface {
  position: relative;
  z-index: 2;
  background-color: var(--bg);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  padding-left: 28px;
  padding-right: 28px;
  max-width: 1680px;
  margin: 0 auto;
}

/* Section 0: Hero — Narrow talk, wide headline */
.hero-sheet {
  min-height: 100svh;
  padding-top: 28px;
  padding-bottom: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  padding-left: 28px;
  padding-right: 28px;
  max-width: 1680px;
  margin: 0 auto;
  align-items: start;
}

.hero-left {
  grid-column: 1 / 5;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 82svh;
}

.wordmark-top {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-body);
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}

.hero-talk {
  margin-top: 22svh;
  font-size: var(--step-lead);
  line-height: 1.35;
  max-width: 24ch;
  color: var(--ink);
}

.btn-block {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
  padding: 18px 28px;
  background-color: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-small);
  text-decoration: none;
  width: fit-content;
  cursor: pointer;
  border: none;
  transition: transform 0.25s var(--ease-out), opacity 0.25s ease;
}

.btn-block:hover {
  color: var(--accent-ink);
  transform: translateY(-2px);
}

.btn-block:active {
  transform: translateY(0);
}

.hero-right {
  grid-column: 5 / 13;
  display: flex;
  flex-direction: column;
}

.hero-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 48px;
}

.hero-nav a {
  font-size: var(--step-small);
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}

.hero-nav a:hover {
  text-decoration: underline;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-display);
  line-height: 0.88;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 40px;
}

.mask-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.04em;
}

.mask-line > span {
  display: block;
  transform: translateY(105%);
  animation: maskRise 0.9s var(--ease-out) forwards;
}

.mask-line:nth-child(2) > span {
  animation-delay: 0.11s;
}

@keyframes maskRise {
  to { transform: translateY(0); }
}

.hero-fade {
  opacity: 0;
  transform: translateY(18px);
  animation: fadeRise 0.85s var(--ease-out) 0.28s forwards;
}

@keyframes fadeRise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-photo-wrap {
  position: relative;
  width: 100%;
  margin-top: 12px;
  overflow: visible;
}

.hero-photo-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--surface);
}

.hero-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: slowDrift 18s ease-in-out infinite alternate;
}

@keyframes slowDrift {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to { transform: scale(1.05) translate3d(-1.5%, -1%, 0); }
}

.hero-stat-block {
  position: relative;
  z-index: 3;
  width: 260px;
  background-color: var(--accent);
  color: var(--accent-ink);
  padding: 24px;
  margin-top: -64px;
  margin-left: 0;
}

.hero-stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-head);
  line-height: 0.95;
  letter-spacing: -0.03em;
  display: block;
}

.hero-stat-caption {
  font-size: var(--step-small);
  line-height: 1.35;
  margin-top: 8px;
  display: block;
  color: var(--accent-ink);
}

/* Section 1: intro — Lead line over four columns */
.section-intro {
  padding-top: 140px;
  padding-bottom: 120px;
}

.intro-lead {
  grid-column: 1 / 13;
  font-size: var(--step-lead);
  line-height: 1.28;
  max-width: 66ch;
  color: var(--ink);
}

.intro-cols {
  grid-column: 1 / 13;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 24px;
  margin-top: 72px;
  align-items: start;
}

.intro-col {
  font-size: var(--step-body);
  line-height: 1.55;
  color: var(--muted);
  max-width: 60ch;
}

.intro-col strong {
  color: var(--ink);
  font-weight: 600;
}

/* Section 2: showcase — Square plate, spare text */
.section-showcase {
  background-color: var(--surface);
  min-height: 88svh;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.showcase-left {
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.plate-container {
  width: 100%;
  max-width: 680px;
  aspect-ratio: 1 / 1;
  background-color: var(--bg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.plate-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--step-small);
  color: var(--ink);
}

.plate-canvas-wrap {
  position: relative;
  width: 100%;
  flex: 1;
  margin: 16px 0;
  background-color: var(--surface);
  overflow: hidden;
}

.plate-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.plate-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: var(--step-small);
}

.plate-controls input[type="range"] {
  flex: 1;
  accent-color: var(--ink);
  cursor: pointer;
}

.showcase-right {
  padding: 48px 48px 48px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.showcase-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.locus-tab {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: var(--step-body);
  color: var(--muted);
  cursor: pointer;
  padding: 4px 0;
  text-align: left;
  transition: transform 0.2s ease, color 0.2s ease;
}

.locus-tab[aria-selected="true"] {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.locus-tab:hover {
  color: var(--ink);
  transform: translateY(-1px);
}

.showcase-middle {
  margin: 48px 0;
}

.showcase-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-head);
  line-height: 0.96;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.showcase-desc {
  margin-top: 36px;
  font-size: var(--step-body);
  line-height: 1.55;
  max-width: 38ch;
  color: var(--ink);
}

.showcase-metrics {
  margin-top: 24px;
  font-size: var(--step-small);
  color: var(--muted);
  max-width: 42ch;
}

.showcase-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.action-cell {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-small);
  text-decoration: none;
  transition: transform 0.2s var(--ease-out);
}

.action-cell-primary {
  background-color: var(--accent);
  color: var(--accent-ink);
}

.action-cell-primary:hover {
  color: var(--accent-ink);
  transform: translateY(-2px);
}

.action-cell-secondary {
  background-color: var(--bg);
  color: var(--ink);
}

.action-cell-secondary:hover {
  color: var(--ink);
  transform: translateY(-2px);
}

/* Section 3: work — One strip per project */
.section-work {
  padding-top: 160px;
  padding-bottom: 160px;
}

.work-layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  padding-left: 28px;
  padding-right: 0;
  max-width: 1680px;
  margin: 0 auto;
}

.work-rail {
  grid-column: 1 / 3;
  position: sticky;
  top: 32px;
  align-self: start;
}

.work-rail-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-lead);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.work-filters {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-btn {
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-body);
  font-size: var(--step-small);
  color: var(--muted);
  cursor: pointer;
  padding: 2px 0;
}

.filter-btn[aria-pressed="true"] {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
}

.work-strips {
  grid-column: 3 / 13;
  display: flex;
  flex-direction: column;
  gap: 52px;
  overflow: hidden;
}

.project-strip {
  transition: opacity 0.3s ease;
}

.work-strips:hover .project-strip:not(:hover) {
  opacity: 0.48;
}

.strip-images {
  display: flex;
  gap: 8px;
  overflow: hidden;
  height: 190px;
}

.strip-images img {
  height: 190px;
  width: auto;
  min-width: 240px;
  object-fit: cover;
  flex-shrink: 0;
}

.strip-tile {
  height: 190px;
  min-width: 220px;
  padding: 20px;
  background-color: var(--accent);
  color: var(--accent-ink);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  font-size: var(--step-small);
}

.strip-tile strong {
  font-family: var(--font-display);
  font-size: var(--step-lead);
  line-height: 1.05;
}

.strip-caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-right: 28px;
  margin-top: 10px;
  font-size: var(--step-small);
  color: var(--ink);
}

.strip-caption span:nth-child(2) {
  color: var(--muted);
}

/* Section 4: about — Portrait as drop cap */
.section-about {
  padding-top: 140px;
  padding-bottom: 140px;
  background-color: var(--surface);
}

.about-facts {
  grid-column: 1 / 3;
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: var(--step-small);
  color: var(--muted);
}

.about-facts strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

.about-body {
  grid-column: 3 / 13;
}

.bio-statement {
  font-size: var(--step-lead);
  line-height: 1.32;
  color: var(--ink);
  max-width: 58ch;
}

.bio-portrait {
  float: left;
  width: 118px;
  height: 118px;
  object-fit: cover;
  margin-right: 20px;
  margin-bottom: 8px;
}

.bio-secondary {
  margin-top: 32px;
  font-size: var(--step-lead);
  line-height: 1.32;
  color: var(--muted);
  max-width: 58ch;
}

.bio-secondary a {
  color: var(--ink);
  font-weight: 600;
}

/* Section 5: list — Statement, table pushed right */
.section-list {
  padding-top: 160px;
  padding-bottom: 160px;
}

.list-heading {
  grid-column: 1 / 13;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-head);
  line-height: 0.96;
  letter-spacing: -0.035em;
  text-indent: 3vw;
  color: var(--ink);
}

.list-photo {
  grid-column: 1 / 5;
  align-self: end;
  margin-top: 96px;
}

.list-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.list-photo-note {
  margin-top: 12px;
  font-size: var(--step-small);
  color: var(--muted);
}

.list-label {
  grid-column: 6 / 7;
  margin-top: 96px;
  font-size: var(--step-small);
  color: var(--muted);
  font-weight: 600;
}

.list-table {
  grid-column: 7 / 13;
  margin-top: 96px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.pub-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  column-gap: 20px;
  align-items: baseline;
  font-size: var(--step-body);
  text-decoration: none;
  color: var(--ink);
}

.pub-row:nth-child(4) {
  margin-top: 22px;
}

.pub-venue-col {
  font-size: var(--step-small);
  color: var(--muted);
}

.pub-title-col {
  color: var(--ink);
  font-weight: 600;
}

.pub-title-col span {
  display: block;
  font-weight: 400;
  font-size: var(--step-small);
  color: var(--muted);
  margin-top: 4px;
}

.pub-year-col {
  font-size: var(--step-small);
  color: var(--ink);
  white-space: nowrap;
}

/* Section 6: contact — Sentence, portrait, two links */
.section-contact {
  padding-top: 160px;
  padding-bottom: 140px;
  background-color: var(--surface);
}

.contact-sentence {
  grid-column: 1 / 6;
  font-size: var(--step-lead);
  line-height: 1.25;
  color: var(--ink);
}

.contact-photo {
  grid-column: 8 / 10;
}

.contact-photo img {
  width: 164px;
  height: 164px;
  object-fit: cover;
}

.contact-links {
  grid-column: 10 / 13;
  display: flex;
  flex-direction: column;
}

.contact-question {
  font-size: var(--step-body);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 20px;
}

.contact-link-item {
  font-size: var(--step-body);
  color: var(--ink);
  margin-bottom: 10px;
  width: fit-content;
}

.contact-meta {
  margin-top: 18px;
  font-size: var(--step-small);
  color: var(--muted);
}

/* Section 7: footer — Columns above, wordmark below */
.site-footer {
  background-color: var(--ink);
  color: var(--accent-ink);
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 44px 28px 28px;
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  max-width: 1680px;
  width: 100%;
  margin: 0 auto;
}

.footer-col {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: var(--step-small);
  color: var(--accent-ink);
}

.footer-col strong {
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 4px;
}

.footer-col a {
  color: var(--accent-ink);
}

.footer-bottom {
  max-width: 1680px;
  width: 100%;
  margin: 0 auto;
}

.footer-wordmark {
  width: 100%;
  display: block;
  margin-bottom: 20px;
}

.footer-wordmark text {
  font-family: var(--font-display);
  font-weight: 700;
  fill: var(--accent-ink);
  letter-spacing: -0.04em;
}

.footer-legal {
  font-size: var(--step-small);
  color: var(--accent-ink);
  line-height: 1.5;
  max-width: 68ch;
}

.footer-legal a {
  color: var(--accent-ink);
}

/* Scroll reveal animations */
.reveal-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 960px) {
  .hero-sheet, .grid-12, .work-layout {
    grid-template-columns: 1fr;
    padding-left: 20px;
    padding-right: 20px;
  }
  .hero-left, .hero-right, .intro-lead, .intro-cols, .about-facts, .about-body, .list-heading, .list-photo, .list-label, .list-table, .contact-sentence, .contact-photo, .contact-links {
    grid-column: 1 / -1;
  }
  .hero-left {
    min-height: auto;
  }
  .hero-talk {
    margin-top: 28px;
  }
  .hero-right {
    margin-top: 36px;
  }
  .intro-cols {
    grid-template-columns: 1fr 1fr;
    row-gap: 36px;
  }
  .section-showcase {
    grid-template-columns: 1fr;
  }
  .showcase-left, .showcase-right {
    padding: 24px 20px;
  }
  .showcase-actions {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .work-rail {
    position: static;
    margin-bottom: 24px;
  }
  .work-strips {
    grid-column: 1 / -1;
  }
  .strip-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: auto;
    overflow: visible;
  }
  .strip-images img, .strip-tile {
    height: 140px;
    width: 100%;
    min-width: 0;
  }
  .pub-row {
    grid-template-columns: 1fr;
    row-gap: 4px;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    row-gap: 32px;
  }
  .footer-col {
    grid-column: span 1;
  }
}

@media (max-width: 560px) {
  .intro-cols {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal-item, .hero-fade, .mask-line > span {
    opacity: 1 !important;
    transform: none !important;
  }
}
