:root {
  --paper: #f4f3ef;
  --paper-2: #eae9e4;
  --ink: #101010;
  --muted: #6f706c;
  --line: #c9c9c3;
  --accent: #3157ff;
  --accent-ink: #ffffff;
  --panel: #171717;
  --panel-ink: #f8f7f2;
  --hover: #e2e5ff;
  --font: "Arial Nova", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

html[data-theme="dark"] {
  --paper: #111210;
  --paper-2: #191a18;
  --ink: #f3f2ed;
  --muted: #9a9b95;
  --line: #343531;
  --accent: #ff4d4f;
  --accent-ink: #0d0d0d;
  --panel: #ecebe6;
  --panel-ink: #111210;
  --hover: #241819;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.35;
  transition: background .2s ease, color .2s ease;
}
a { color: inherit; }
button { font: inherit; }

.site-shell {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
}

.masthead {
  min-height: 82px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 42px;
  border-bottom: 1px solid var(--ink);
}

.wordmark {
  width: max-content;
  color: var(--ink);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-decoration: none;
}

.top-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.top-links a {
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
}
.top-links a span { color: var(--accent); }
.top-links a:hover { text-decoration: underline; text-underline-offset: 4px; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: .78rem;
  font-weight: 800;
}
.theme-dot {
  width: 14px;
  height: 14px;
  display: inline-block;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: linear-gradient(90deg, var(--ink) 50%, transparent 50%);
}

.hero {
  min-height: 590px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 335px);
  gap: clamp(52px, 7vw, 110px);
  align-items: stretch;
  padding: 58px 0 54px;
  border-bottom: 1px solid var(--ink);
}
.hero-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 4px;
}
.hero-kicker {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .06em;
}
.hero-kicker span { color: var(--accent); margin: 0 6px; }
.hero h1 {
  margin: 58px 0 54px;
  font-size: clamp(5rem, 10vw, 9.6rem);
  line-height: .78;
  letter-spacing: -.075em;
  font-weight: 900;
}
.hero h1 span { display: block; }
.hero h1 span:last-child {
  color: var(--accent);
  margin-left: clamp(28px, 5vw, 74px);
}
.hero-bottom {
  display: grid;
  grid-template-columns: minmax(0, 500px) auto;
  gap: 40px;
  align-items: end;
}
.hero-bottom p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.35rem);
}
.jump-link {
  justify-self: end;
  white-space: nowrap;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--ink);
  font-size: .88rem;
  font-weight: 800;
  text-decoration: none;
}
.jump-link span { color: var(--accent); margin-left: 10px; }

.logo-panel {
  position: relative;
  min-height: 475px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  background: var(--panel);
  color: var(--panel-ink);
}
.logo-panel::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -94px;
  top: 92px;
  border: 34px solid var(--accent);
  border-radius: 50%;
  opacity: .95;
}
.logo-topline,
.logo-footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .08em;
}
.logo-footer strong {
  font-family: var(--font);
  font-size: .7rem;
  letter-spacing: .15em;
}
.monogram {
  position: relative;
  z-index: 2;
  align-self: center;
  margin: auto 0;
  font-size: clamp(7.5rem, 12vw, 11rem);
  line-height: .72;
  font-weight: 900;
  letter-spacing: -.13em;
}
.mono-e {
  color: var(--accent);
  font-size: .62em;
  vertical-align: .16em;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--ink);
}
.category-strip a {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: .62rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .055em;
  text-decoration: none;
  opacity: .7;
  transition: opacity .15s ease, color .15s ease;
}
.category-strip a:first-child {
  border-left: 0;
  padding-left: 0;
}
.category-strip a:hover,
.category-strip a:focus-visible {
  color: var(--ink);
  opacity: 1;
}
.category-strip a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: -1px;
}

.project-index { padding: 84px 0 0; }
.index-heading {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  align-items: end;
  padding-bottom: 34px;
  border-bottom: 3px solid var(--ink);
}
.section-label,
.index-total {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .06em;
}
.index-heading h2 {
  margin: 0;
  font-size: clamp(3.4rem, 6vw, 6.6rem);
  line-height: .82;
  letter-spacing: -.06em;
}
.index-total { text-align: right; }

.project-group {
  display: grid;
  grid-template-columns: minmax(250px, .85fr) 2fr;
  gap: clamp(30px, 7vw, 110px);
  padding: 54px 0 70px;
  border-bottom: 1px solid var(--ink);
  scroll-margin-top: 24px;
}
.group-intro {
  align-self: start;
  position: sticky;
  top: 24px;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 18px;
}
.group-number {
  margin: 8px 0 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 800;
}
.group-intro h3 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 4.4rem);
  line-height: .95;
  letter-spacing: -.055em;
}
.group-intro div p {
  margin: 10px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .67rem;
}

.project-list { border-top: 1px solid var(--line); }
.project-list a {
  min-height: 62px;
  display: grid;
  grid-template-columns: 42px 1fr 28px;
  align-items: center;
  gap: 14px;
  padding: 0 8px 0 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background-color .15s ease, padding .15s ease, color .15s ease;
}
.project-list a:hover {
  background: var(--hover);
  padding-left: 13px;
}
.project-no {
  color: var(--muted);
  font-family: var(--mono);
  font-size: .64rem;
}
.project-name {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: 750;
  letter-spacing: -.015em;
}
.project-arrow {
  justify-self: end;
  color: var(--accent);
  font-size: 1rem;
  transition: transform .15s ease;
}
.project-list a:hover .project-arrow { transform: translate(3px, -3px); }

.footer {
  min-height: 120px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 32px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .66rem;
}
.footer-left { display: flex; gap: 10px; color: var(--ink); }
.footer p { margin: 0; }

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  min-width: 74px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  color: var(--muted);
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease, color .15s ease, border-color .15s ease;
  backdrop-filter: blur(8px);
}
.back-to-top.is-visible {
  opacity: .82;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover,
.back-to-top:focus-visible {
  opacity: 1;
  color: var(--ink);
  border-color: var(--ink);
}
.back-to-top:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 850px) {
  .site-shell { width: min(100% - 28px, 720px); }
  .masthead {
    grid-template-columns: 1fr auto;
    gap: 16px;
    min-height: 72px;
  }
  .top-links {
    grid-row: 2;
    grid-column: 1 / -1;
    width: 100%;
    justify-content: space-between;
    padding: 0 0 16px;
  }
  .theme-toggle { justify-self: end; }
  .hero {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 22px;
    padding: 36px 0;
  }
  .hero h1 { margin: 46px 0 52px; font-size: clamp(3.8rem, 17vw, 7rem); }
  .hero h1 span:last-child { margin-left: 0; }
  .hero-bottom { grid-template-columns: 1fr; gap: 24px; }
  .jump-link { justify-self: start; }
  .logo-panel { min-height: 300px; padding: 13px; }
  .logo-panel::after { width: 110px; height: 110px; right: -66px; top: 68px; border-width: 22px; }
  .logo-topline span:last-child { display: none; }
  .monogram { font-size: clamp(4rem, 19vw, 6rem); }
  .logo-footer { align-items: flex-end; }
  .logo-footer strong { display: none; }
  .logo-footer span { margin-left: auto; }
  .category-strip { display: none; }
  .project-index { padding-top: 62px; }
  .index-heading { grid-template-columns: 1fr auto; gap: 22px; }
  .index-heading .section-label { grid-column: 1 / -1; }
  .index-heading h2 { font-size: clamp(3.3rem, 16vw, 5.6rem); }
  .project-group { grid-template-columns: 1fr; gap: 32px; padding: 42px 0 54px; }
  .group-intro { position: static; }
  .group-intro h3 { font-size: clamp(2.5rem, 12vw, 4rem); }
  .project-list a { min-height: 58px; }
  .footer { grid-template-columns: 1fr; gap: 8px; padding: 34px 0; }
  .back-to-top {
    right: 14px;
    bottom: 14px;
    min-width: 42px;
    width: 42px;
    padding: 0;
  }
  .back-to-top-label { display: none; }
}

@media (max-width: 520px) {
  .hero { grid-template-columns: 1fr 88px; gap: 16px; }
  .hero-kicker { font-size: .61rem; }
  .hero h1 { font-size: clamp(3rem, 18vw, 5rem); }
  .logo-panel { min-height: 240px; }
  .logo-topline, .logo-footer { font-size: .56rem; }
  .monogram { font-size: clamp(3.25rem, 19vw, 4.8rem); }
  .project-list a { grid-template-columns: 32px 1fr 22px; gap: 9px; }
}

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