:root {
  color-scheme: light;
  --paper: #f2efe6;
  --surface: #faf8f2;
  --ink: #191917;
  --muted: #68665f;
  --rule: #c9c4b8;
  --rule-soft: rgba(25, 25, 23, 0.09);
  --accent: #1946d8;
  --signal: #e65a2f;
  --focus: #1946d8;
  --display: "Instrument Serif", Georgia, serif;
  --body: "Source Sans 3", "Trebuchet MS", sans-serif;
  --mono: "IBM Plex Mono", "Lucida Console", monospace;
  --page: 1280px;
  --gutter: clamp(20px, 4vw, 64px);
  --section-y: clamp(72px, 10vw, 144px);
  --baseline: 24px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --paper: #151513;
  --surface: #1d1d1a;
  --ink: #f1eee5;
  --muted: #aaa79e;
  --rule: #3c3b35;
  --rule-soft: rgba(241, 238, 229, 0.08);
  --accent: #6f8fff;
  --signal: #ff7043;
  --focus: #9aafff;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: linear-gradient(to bottom, transparent calc(var(--baseline) - 1px), var(--rule-soft) 1px);
  background-size: 100% var(--baseline);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  transition: color 180ms ease, background-color 180ms ease;
}

::selection { color: var(--surface); background: var(--accent); }

a { color: inherit; text-underline-offset: 4px; }
button { color: inherit; font: inherit; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  color: var(--surface);
  background: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-transform: uppercase;
}

.site-header,
.site-footer,
.section-shell {
  width: min(100%, var(--page));
  margin-inline: auto;
  border-inline: 1px solid var(--rule);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto auto;
  min-height: 68px;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(12px);
}

.wordmark,
.site-nav,
.theme-toggle {
  display: flex;
  align-items: center;
}

.wordmark {
  gap: 12px;
  padding-inline: var(--gutter);
  font-weight: 650;
  text-decoration: none;
}

.wordmark-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--surface);
  background: var(--accent);
  font-family: var(--display);
  font-size: 1.35rem;
  font-style: italic;
}

.site-nav { height: 100%; }

.site-nav a,
.theme-toggle {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-left: 1px solid var(--rule);
  background: transparent;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav a:hover,
.site-nav a[aria-current="true"],
.theme-toggle:hover { color: var(--surface); background: var(--ink); }

.theme-toggle { gap: 7px; cursor: pointer; }
.theme-icon { font-size: 1rem; }

.section-shell {
  padding: var(--section-y) var(--gutter);
  border-bottom: 1px solid var(--rule);
}

.hero { padding-top: clamp(56px, 8vw, 110px); padding-bottom: 0; }

.hero-kicker,
.hero-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.hero-kicker {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.7fr);
  gap: clamp(48px, 8vw, 112px);
  padding-block: clamp(56px, 9vw, 120px);
}

.hero-heading-wrap { display: grid; grid-template-columns: auto 1fr; gap: clamp(16px, 3vw, 42px); }
.section-index { margin: 7px 0 0; color: var(--accent); white-space: nowrap; }

.hero-title {
  max-width: 880px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(4.1rem, 10vw, 9.3rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.82;
}

.hero-title em { color: var(--accent); font-weight: 400; }
.hero-intro { align-self: end; padding-bottom: 7px; }

.hero-deck {
  margin: 0 0 32px;
  font-size: clamp(1.22rem, 1.8vw, 1.55rem);
  line-height: 1.32;
}

.hero-links { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 48px; }
.arrow-link, .project-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 650; text-decoration-thickness: 1px; }
.arrow-link:hover, .project-link:hover { color: var(--signal); }

.now-list { margin: 0; border-top: 1px solid var(--rule); }
.now-list div { display: grid; grid-template-columns: 78px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.now-list dt { color: var(--muted); font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; }
.now-list dd { margin: 0; font-size: 0.92rem; }

.hero-foot {
  margin-inline: calc(var(--gutter) * -1);
  padding: 18px var(--gutter);
  border-top: 1px solid var(--rule);
}
.hero-foot a { color: var(--accent); text-decoration: none; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #24965f; box-shadow: 0 0 0 4px color-mix(in srgb, #24965f 16%, transparent); }

.section-header {
  display: grid;
  grid-template-columns: minmax(120px, 0.32fr) minmax(0, 1fr) auto;
  gap: clamp(28px, 6vw, 96px);
  align-items: start;
  margin-bottom: clamp(56px, 8vw, 104px);
}

.section-header h2,
.contact h2 {
  max-width: 850px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.3rem, 7vw, 6.8rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.93;
}

.section-header > div > p { max-width: 640px; margin: 24px 0 0; color: var(--muted); font-size: 1.1rem; }

.project { display: grid; grid-template-columns: 52px minmax(0, 1.4fr) minmax(220px, 0.55fr); gap: clamp(20px, 4vw, 64px); padding: 48px 0; border-top: 1px solid var(--rule); }
.project:last-child { border-bottom: 1px solid var(--rule); }
.project-number { color: var(--muted); }
.project-meta { display: flex; flex-wrap: wrap; gap: 18px; color: var(--accent); }
.project h3 { margin: 14px 0 18px; font-family: var(--display); font-size: clamp(2.8rem, 5vw, 5.4rem); font-weight: 400; letter-spacing: -0.035em; line-height: 0.95; }
.project-main > p { max-width: 700px; margin: 0; font-size: 1.09rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 28px 0 0; padding: 0; list-style: none; }
.tag-list li { color: var(--muted); font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; }
.tag-list li::before { content: "/ "; color: var(--signal); }
.project-aside { align-self: end; padding-left: 24px; border-left: 1px solid var(--rule); color: var(--muted); font-size: 0.94rem; }
.project-aside p { margin-top: 0; }
.project-stat strong { display: block; color: var(--signal); font-family: var(--display); font-size: clamp(3rem, 5vw, 5.3rem); font-weight: 400; letter-spacing: -0.04em; line-height: 0.9; }
.project-stat > span { display: block; margin: 8px 0 26px; }
.private-label { display: inline-block; margin-top: 18px; color: var(--muted); }
.private-label::before { content: "● "; color: var(--signal); }

.watch-project {
  background: color-mix(in srgb, var(--surface) 58%, transparent);
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
}

.watch-gallery {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.45fr 0.65fr 1fr;
  grid-template-rows: auto auto;
  gap: clamp(10px, 1.5vw, 20px);
  margin-top: 18px;
}

.watch-image { position: relative; margin: 0; overflow: hidden; background: var(--ink); }
.watch-image-final { grid-row: 1 / 3; }
.watch-image-sketch { grid-row: 1 / 3; }
.watch-image img { display: block; width: 100%; height: 100%; min-height: 240px; object-fit: cover; transition: transform 400ms ease; }
.watch-image-final img { aspect-ratio: 1 / 1.02; }
.watch-image-sketch img { aspect-ratio: 0.66 / 1; object-position: center 25%; }
.watch-image-dial img, .watch-image-caseback img { aspect-ratio: 1.45 / 1; }
.watch-image:hover img { transform: scale(1.018); }
.watch-image figcaption { position: absolute; inset: auto 0 0; display: flex; justify-content: space-between; gap: 16px; padding: 12px 14px; color: #faf8f2; background: linear-gradient(transparent, rgba(0, 0, 0, 0.78)); font-size: 0.78rem; }
.watch-image figcaption .mono { color: #ff8a5e; }

.watch-specs {
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 4px 0 0;
  border-block: 1px solid var(--rule);
}

.watch-specs div { padding: 16px 14px; }
.watch-specs div + div { border-left: 1px solid var(--rule); }
.watch-specs dt { color: var(--muted); font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; }
.watch-specs dd { margin: 4px 0 0; font-weight: 650; }
.watch-links { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 12px 28px; }

.archive { background: color-mix(in srgb, var(--surface) 76%, transparent); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter, .print-button { min-height: 44px; padding: 9px 16px; border: 1px solid var(--rule); background: var(--surface); font-family: var(--mono); font-size: 0.67rem; letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; }
.filter:hover, .filter.is-active, .print-button:hover { color: var(--surface); background: var(--accent); border-color: var(--accent); }
.archive-table { margin: 0; padding: 0; border-top: 1px solid var(--rule); list-style: none; }
.archive-item { margin: 0; padding: 0; }
.archive-row { display: grid; grid-template-columns: 80px minmax(150px, 0.65fr) minmax(240px, 1.5fr) auto; gap: 24px; align-items: center; min-height: 64px; padding: 12px 8px; border-bottom: 1px solid var(--rule); text-decoration: none; transition: color 120ms ease, background-color 120ms ease; }
a.archive-row:hover { color: var(--surface); background: var(--ink); }
.archive-row > span:nth-child(3) { color: var(--muted); }
a.archive-row:hover > span { color: inherit; }
.archive-item[hidden] { display: none; }

.about-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.7fr); gap: clamp(48px, 10vw, 140px); }
.about-quote { margin: 0; font-family: var(--display); font-size: clamp(3.2rem, 6.2vw, 6.4rem); letter-spacing: -0.045em; line-height: 0.94; }
.about-copy { align-self: center; font-size: 1.1rem; }
.about-copy p:first-child::first-letter { float: left; margin: 5px 8px 0 0; color: var(--accent); font-family: var(--display); font-size: 4.8rem; line-height: 0.72; }
.about-facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); margin: 16px 0 0; border-block: 1px solid var(--rule); }
.about-facts div { padding: 20px 18px 20px 0; }
.about-facts div + div { padding-left: 18px; border-left: 1px solid var(--rule); }
.about-facts dt { color: var(--muted); font-family: var(--mono); font-size: 0.65rem; text-transform: uppercase; }
.about-facts dd { margin: 5px 0 0; font-weight: 600; }

.resume-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 8vw, 100px); }
.resume-column > h3, .capabilities h3 { margin: 0 0 24px; color: var(--accent); }
.resume-item { display: grid; grid-template-columns: 104px 1fr; gap: 20px; padding: 25px 0; border-top: 1px solid var(--rule); }
.resume-item:last-child { border-bottom: 1px solid var(--rule); }
.resume-item time { color: var(--muted); }
.resume-item h4 { margin: -4px 0 5px; font-family: var(--display); font-size: 1.7rem; font-weight: 400; line-height: 1.1; }
.resume-item p { margin: 0; color: var(--muted); }
.capabilities { display: grid; grid-template-columns: 120px 1fr; gap: 24px; margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--rule); }
.capabilities ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 32px; margin: 0; padding: 0; list-style: none; }
.capabilities li { padding-bottom: 10px; border-bottom: 1px solid var(--rule); }

.contact { display: grid; grid-template-columns: minmax(120px, 0.32fr) 1fr; gap: clamp(28px, 6vw, 96px); color: var(--surface); background: var(--accent); }
.contact .section-index { color: var(--surface); opacity: 0.72; }
.contact-body p { margin: 32px 0; font-size: 1.25rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.contact-links a { font-weight: 650; }

.site-footer { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 24px; padding: 22px var(--gutter); background: var(--paper); }
.site-footer a { color: var(--accent); text-decoration: none; }

.reveal { opacity: 1; transform: none; }
html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 500ms ease, transform 500ms ease; }
html.js .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; border-top: 1px solid var(--rule); }
  .site-nav a:first-child { margin-left: auto; }
  .site-nav a:last-child { margin-right: auto; border-right: 1px solid var(--rule); }
  .theme-toggle { grid-column: 2; grid-row: 1; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-intro { max-width: 650px; margin-left: min(25vw, 180px); }
  .project { grid-template-columns: 40px 1fr; }
  .project-aside { grid-column: 2; max-width: 620px; }
  .watch-gallery { grid-template-columns: 1.25fr 0.75fr; }
  .watch-image-final { grid-row: 1 / 3; }
  .watch-image-sketch { grid-row: auto; }
  .watch-image-sketch img, .watch-image-dial img, .watch-image-caseback img { aspect-ratio: 1.3 / 1; }
  .watch-image-caseback { grid-column: 1 / -1; }
  .watch-image-caseback img { aspect-ratio: 2.1 / 1; }
  .watch-specs, .watch-links { grid-column: 2; }
  .section-header { grid-template-columns: 110px 1fr; }
  .section-header .print-button { grid-column: 2; justify-self: start; }
  .about-facts { grid-template-columns: repeat(2, 1fr); }
  .about-facts div:nth-child(3) { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .about-facts div:nth-child(4) { border-top: 1px solid var(--rule); }
  .capabilities ul { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  :root { --gutter: 20px; --section-y: 76px; }
  body { font-size: 16px; }
  .wordmark { padding-inline: 14px; }
  .wordmark span:last-child { display: none; }
  .theme-label { display: none; }
  .site-nav { justify-content: flex-start; }
  .site-nav a:first-child { margin-left: 0; }
  .site-nav a:last-child { margin-right: 0; }
  .site-nav a { flex: 1 0 auto; justify-content: center; padding-inline: 15px; text-align: center; }
  .hero-kicker span:nth-child(2) { display: none; }
  .hero-grid { gap: 44px; padding-block: 54px; }
  .hero-heading-wrap { display: block; }
  .hero-heading-wrap .section-index { margin-bottom: 30px; }
  .hero-title { font-size: clamp(3.8rem, 20vw, 6.1rem); }
  .hero-intro { margin-left: 0; }
  .hero-foot { align-items: flex-start; }
  .hero-foot span:nth-child(2) { display: none; }
  .section-header { grid-template-columns: 1fr; gap: 20px; }
  .section-header h2, .contact h2 { font-size: clamp(3.1rem, 15vw, 5.2rem); }
  .section-header .print-button { grid-column: 1; }
  .project { grid-template-columns: 30px 1fr; gap: 14px; padding-block: 38px; }
  .project h3 { font-size: clamp(2.7rem, 14vw, 4.4rem); }
  .project-aside { grid-column: 1 / -1; margin-left: 44px; }
  .watch-gallery { grid-template-columns: 1fr 1fr; }
  .watch-image-final { grid-column: 1 / -1; grid-row: auto; }
  .watch-image-final img { aspect-ratio: 1.15 / 1; }
  .watch-image-sketch, .watch-image-dial { grid-row: auto; }
  .watch-image-sketch img, .watch-image-dial img { min-height: 180px; aspect-ratio: 0.9 / 1; }
  .watch-image-caseback { grid-column: 1 / -1; }
  .watch-image-caseback img { min-height: 180px; aspect-ratio: 1.65 / 1; }
  .watch-image figcaption { display: block; min-height: 0; padding: 9px 10px; font-size: 0.68rem; }
  .watch-image figcaption .mono { display: block; margin-bottom: 4px; }
  .watch-specs, .watch-links { grid-column: 1 / -1; margin-left: 44px; }
  .watch-specs { grid-template-columns: repeat(2, 1fr); }
  .watch-specs div:nth-child(3) { border-top: 1px solid var(--rule); border-left: 0; }
  .watch-specs div:nth-child(4) { border-top: 1px solid var(--rule); }
  .archive-row { grid-template-columns: 58px 1fr auto; gap: 12px; padding-block: 16px; }
  .archive-row > span:nth-child(3) { grid-column: 2 / -1; grid-row: 2; }
  .about-grid { grid-template-columns: 1fr; gap: 44px; }
  .about-quote { font-size: clamp(3rem, 15vw, 5rem); }
  .about-facts { grid-template-columns: 1fr; }
  .about-facts div, .about-facts div + div, .about-facts div:nth-child(3) { padding: 16px 0; border-left: 0; border-top: 1px solid var(--rule); }
  .about-facts div:first-child { border-top: 0; }
  .resume-grid { grid-template-columns: 1fr; }
  .resume-item { grid-template-columns: 86px 1fr; gap: 12px; }
  .capabilities { grid-template-columns: 1fr; }
  .capabilities ul { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr auto; }
  .site-footer span:nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body, .reveal, .watch-image img { transition: none; }
  html.js .reveal { opacity: 1; transform: none; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #151513;
    --surface: #1d1d1a;
    --ink: #f1eee5;
    --muted: #aaa79e;
    --rule: #3c3b35;
    --rule-soft: rgba(241, 238, 229, 0.08);
    --accent: #6f8fff;
    --signal: #ff7043;
    --focus: #9aafff;
  }
}

@media print {
  @page { margin: 0.55in; }
  :root { --paper: #fff; --surface: #fff; --ink: #111; --muted: #444; --rule: #bbb; --accent: #111; }
  body { background: #fff; font-size: 10.5pt; }
  .site-header, main > section:not(.resume), .site-footer, .print-button { display: none; }
  .section-shell { width: 100%; padding: 0; border: 0; }
  .resume .section-header { display: grid; grid-template-columns: 0 1fr; margin-bottom: 28px; }
  .resume .section-index { display: none; }
  .section-header h2 { font-size: 42pt; }
  .resume-grid { gap: 32px; }
  .resume-item { break-inside: avoid; padding: 16px 0; }
  .capabilities { margin-top: 32px; }
  .reveal { opacity: 1; transform: none; }
}
