:root {
  color-scheme: dark;
  --background: #111111;
  --surface: #1d1d1d;
  --surface-raised: #242424;
  --text: #eae8e2;
  --muted: #a4a4a0;
  --subtle: #888888;
  --border: #333333;
  --grid: #252528;
  --accent: #526bff;
  --accent-text: #9ba8ff;
  --accent-button: #4359df;
  --on-accent: #fff;
  --mark: #dddcd7;
  --heading: 'Space Grotesk', 'Arial', sans-serif;
  --body: 'Inter', 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', 'Consolas', monospace;
}

:root[data-theme='light'] {
  color-scheme: light;
  --background: #f1f0eb;
  --surface: #e7e5df;
  --surface-raised: #dedcd6;
  --text: #171717;
  --muted: #494947;
  --subtle: #5b5b58;
  --border: #c9c7c1;
  --grid: #d9d7d1;
  --accent: #334acb;
  --accent-text: #2b40b0;
  --accent-button: #334acb;
  --mark: #272725;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--text);
  font: 400 1rem/1.65 var(--body);
}
main { flex: 1; }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, .filter-chip input:focus-visible + span {
  outline: 2px solid var(--accent-text);
  outline-offset: 4px;
}
button { cursor: pointer; }
p, dl, figure { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--heading); line-height: 1.07; }
img { display: block; }
[hidden] { display: none !important; }

.shell { width: min(1280px, calc(100% - 112px)); margin-inline: auto; }
.mono {
  font: 500 .75rem/1.5 var(--mono);
  letter-spacing: .045em;
  text-transform: uppercase;
}
.accent { color: var(--accent-text); }
.skip-link {
  position: absolute;
  z-index: 5;
  left: 1rem;
  top: 1rem;
  padding: .75rem 1rem;
  background: var(--text);
  color: var(--background);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.site-header { border-bottom: 1px solid var(--border); }
.header-inner {
  min-height: 80px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  justify-self: start;
  font: 700 .94rem/.99 var(--heading);
  letter-spacing: -.035em;
}
.mark {
  display: inline-block;
  width: 31px;
  aspect-ratio: 1;
  flex: none;
  position: relative;
  color: var(--mark);
}
.mark::before, .mark::after {
  content: '';
  position: absolute;
  inset: 0;
  background: currentColor;
}
.mark::before { clip-path: polygon(1% 1%, 28% 1%, 99% 99%, 72% 99%); }
.mark::after {
  background: linear-gradient(currentColor 40%, transparent 40% 60%, currentColor 60%);
  clip-path: polygon(72% 1%, 99% 1%, 28% 99%, 1% 99%);
}
.main-nav { display: flex; gap: clamp(1.1rem, 3.3vw, 2.8rem); align-self: stretch; }
.main-nav a {
  display: grid;
  place-items: center;
  position: relative;
  color: var(--muted);
  font-size: .875rem;
  min-height: 44px;
  transition: color .2s ease;
}
.main-nav a:hover, .main-nav a[aria-current] { color: var(--text); }
.main-nav a::after {
  content: '';
  height: 2px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform .2s ease;
}
.main-nav a:hover::after, .main-nav a[aria-current]::after { transform: scaleX(1); }
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  justify-self: end;
  min-height: 42px;
  padding: .4rem .75rem;
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}
.theme-toggle:hover { background: var(--surface); }
.theme-icon {
  width: .8rem;
  height: .8rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

.hero {
  min-height: 548px;
  display: grid;
  grid-template-columns: 1.28fr 1fr;
  align-items: center;
  gap: clamp(1.75rem, 5.6vw, 6rem);
  padding-block: 4.75rem;
}
.hero-copy { animation: enter .45s ease-out both; }
.eyebrow { color: var(--accent-text); display: flex; align-items: center; gap: .65rem; }
.eyebrow::before { content: ''; width: 1rem; height: 1px; background: currentColor; }
.hero h1 {
  font-size: clamp(4.6rem, 8.3vw, 8.5rem);
  line-height: .83;
  letter-spacing: -.085em;
  font-weight: 700;
  margin: 1.55rem 0 1.6rem;
}
.hero-description { font-size: clamp(1rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 29rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.8rem; margin-top: 1.85rem; }
.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: .63rem 1.05rem;
  border: 1px solid transparent;
  font-size: .9rem;
  font-weight: 650;
  transition: background-color .2s ease, border-color .2s ease;
}
.primary { background: var(--accent-button); color: var(--on-accent); }
.primary:hover { background: #374bc2; }
.secondary { background: var(--surface); border-color: var(--border); color: var(--text); }
.secondary:hover { background: var(--surface-raised); }
.text-link {
  display: inline-flex;
  width: fit-content;
  gap: .5rem;
  align-items: center;
  padding-block: .3rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: .36em;
  text-decoration-color: var(--subtle);
  transition: color .2s ease, text-decoration-color .2s ease;
}
.text-link:hover { color: var(--accent-text); text-decoration-color: currentColor; }

.hero-art, .about-mark {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 1.13;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: center;
  border: 1px solid var(--border);
}
.hero-mark-frame { width: 62%; aspect-ratio: 1; position: relative; display: grid; place-items: center; }
.hero-mark { width: 78%; color: var(--mark); }
.hero-mark-node { position: absolute; width: 7px; height: 7px; background: var(--accent); top: 7%; right: 7%; }
.crosshair { position: absolute; background: var(--border); }
.crosshair.horizontal { width: 115%; height: 1px; }
.crosshair.vertical { height: 115%; width: 1px; }
.art-corner { position: absolute; width: 10px; height: 10px; border: 1px solid var(--subtle); }
.tl { left: -1px; top: -1px; border-right: 0; border-bottom: 0; }
.tr { right: -1px; top: -1px; border-left: 0; border-bottom: 0; }
.bl { left: -1px; bottom: -1px; border-right: 0; border-top: 0; }
.br { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }
.art-label { position: absolute; bottom: .8rem; left: .9rem; color: var(--muted); background: var(--background); padding: 0 .25rem; }

.section { border-top: 1px solid var(--border); padding-block: 2rem 4.4rem; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .7rem 1.5rem; flex-wrap: wrap; }
.section-heading h2, .intro-inner h2 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  letter-spacing: -.065em;
  font-weight: 650;
}
.section-heading .text-link { font-size: .9rem; }
.sample-note { color: var(--subtle); margin-block: .65rem 1.25rem; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.3rem; }
.featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 1rem; }
.project-card { min-width: 0; display: flex; }
.card-link {
  width: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color .2s ease, background-color .2s ease;
}
.card-link:hover { border-color: var(--accent); background: var(--surface-raised); }
.preview {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #242424;
  isolation: isolate;
  --preview-x: 0%;
  --preview-y: 0%;
  --preview-origin-x: 16.6667%;
  --preview-origin-y: 25%;
}
.preview-1, .preview-4 { --preview-x: -100%; --preview-origin-x: 50%; }
.preview-2, .preview-5 { --preview-x: -200%; --preview-origin-x: 83.3333%; }
.preview-3, .preview-4, .preview-5 { --preview-y: -100%; --preview-origin-y: 75%; }
.preview-window {
  position: absolute;
  top: 50%;
  width: 100%;
  aspect-ratio: 1;
  transform: translateY(-50%);
  overflow: hidden;
}
.preview-window img {
  position: absolute;
  width: 300%;
  height: 200%;
  max-width: none;
  left: var(--preview-x);
  top: var(--preview-y);
  transform-origin: var(--preview-origin-x) var(--preview-origin-y);
  transition: transform .35s ease;
}
.custom-preview img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card-link:hover .preview img { transform: scale(1.045); }
.empty-preview {
  display: grid;
  place-items: center;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border);
}
.empty-preview .mark { width: 18%; opacity: .55; }
.card-content { padding: 1.1rem 1.15rem 1.3rem; display: grid; gap: .65rem; }
.card-meta { display: flex; gap: .4rem .85rem; flex-wrap: wrap; justify-content: space-between; align-items: center; color: var(--muted); }
.meta-divider { margin-inline: .12rem; color: var(--subtle); }
.status { color: var(--muted); }
.status[data-status='Completed'] { color: var(--accent-text); }
.card-content h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.045em; font-weight: 650; }
.card-content p { color: var(--muted); }

.recent-list { list-style: none; padding: 0; margin: 1.5rem 0 0; border-top: 1px solid var(--border); }
.recent-list a {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr) minmax(9rem, .45fr) 8rem;
  gap: 1rem;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: .9rem .5rem;
  transition: background-color .2s ease;
}
.recent-list a:hover { background: var(--surface); }
.recent-list strong { font: 650 1.2rem/1.35 var(--heading); }
.recent-list time, .recent-category, .recent-id { color: var(--muted); }
.archive-intro { border-block: 1px solid var(--border); background: var(--surface); }
.intro-inner { display: grid; grid-template-columns: 1.15fr 1fr; gap: 2rem 4rem; align-items: end; padding-block: 3.4rem; }
.intro-inner .eyebrow { margin-bottom: .6rem; }
.intro-inner p:not(.eyebrow) { color: var(--muted); max-width: 34rem; }
.intro-inner .text-link { margin-top: .7rem; }
.site-footer { border-top: 1px solid var(--border); }
.archive-intro:last-child { border-bottom: 0; }
.footer-inner { display: flex; min-height: 108px; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-inner p { color: var(--subtle); }
.footer-inner .brand { opacity: .85; }
.footer-inner .mark { width: 24px; }

.subpage { padding-block: 4.25rem 5rem; animation: enter .36s ease-out both; }
.page-intro { margin-bottom: 2.5rem; }
.page-intro h1 { font-size: clamp(3.4rem, 8vw, 7.25rem); letter-spacing: -.075em; margin: .5rem 0 1rem; overflow-wrap: anywhere; }
.page-intro > p:last-child { max-width: 43rem; color: var(--muted); font-size: clamp(1rem, 1.8vw, 1.2rem); }
.archive-controls { padding-block: 1.3rem; border-block: 1px solid var(--border); }
.filter-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(11rem, 17rem); gap: 1rem; }
.filter-top label { display: grid; gap: .4rem; color: var(--muted); }
.filter-top input, .filter-top select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 0;
  background-color: var(--surface);
  color: var(--text);
  padding: .55rem .85rem;
}
.filter-top input::placeholder { color: var(--muted); }
.sort-label { position: relative; }
.sort-label select { appearance: none; padding-right: 2.25rem; }
.sort-label::after {
  content: '';
  position: absolute;
  right: 1rem;
  bottom: 20px;
  width: 7px;
  height: 7px;
  border: solid var(--muted);
  border-width: 0 1px 1px 0;
  transform: rotate(45deg);
  pointer-events: none;
}
.category-filters { display: flex; flex-wrap: wrap; gap: .55rem; min-width: 0; margin: 1.1rem 0 0; border: 0; padding: 0; }
.category-filters legend { color: var(--muted); padding: 0; margin-bottom: .45rem; }
.filter-chip { position: relative; cursor: pointer; }
.filter-chip input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.filter-chip span {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: .4rem .7rem;
  color: var(--muted);
  border: 1px solid var(--border);
  font: 500 .86rem/1.2 var(--body);
}
.filter-chip:hover span { background: var(--surface); color: var(--text); }
.filter-chip input:checked + span { background: var(--surface); border-color: var(--accent); color: var(--accent-text); }
.result-info { display: flex; flex-wrap: wrap; gap: .3rem 1rem; justify-content: space-between; color: var(--subtle); margin-block: 1rem; }
.empty-state { padding: 2.5rem 1.5rem; border: 1px solid var(--border); }
.empty-state p { color: var(--muted); margin-block: .6rem 1rem; }

.detail .page-intro { margin-block: 1.4rem 2rem; }
.detail-figure { background: var(--surface); border: 1px solid var(--border); }
.detail-figure .preview { max-width: min(100%, 980px); margin-inline: auto; }
.detail-figure figcaption { color: var(--muted); border-top: 1px solid var(--border); padding: .7rem .85rem; }
.detail-layout, .about-grid { display: grid; align-items: start; grid-template-columns: minmax(220px, .7fr) minmax(0, 1.65fr); gap: clamp(1.6rem, 6vw, 5rem); margin-top: 2.5rem; }
.record-data { padding: 1.15rem; background: var(--surface); border: 1px solid var(--border); }
.record-data h2 { color: var(--muted); margin-bottom: .75rem; }
.record-data dl { margin-bottom: 1.35rem; }
.record-data dl > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .55rem;
  border-bottom: 1px solid var(--border);
  padding-block: .42rem;
  font-size: .88rem;
}
.record-data dt { color: var(--muted); }
.record-data dd { margin: 0; text-align: right; }
.tool-list { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; padding: 0; margin: 0 0 1.35rem; }
.tool-list li { font: 500 .8rem/1.4 var(--mono); padding: .25rem .45rem; border: 1px solid var(--border); }
.record-links { display: grid; gap: .2rem; font-size: .9rem; }
.record-links p { color: var(--muted); }
.case-study section { padding-block: 1.4rem; border-top: 1px solid var(--border); }
.case-study h2 { font-size: clamp(1.6rem, 3.2vw, 2.35rem); letter-spacing: -.045em; margin-bottom: .65rem; }
.case-study p:not(.sample-note), .case-study ul { color: var(--muted); max-width: 46rem; }
.case-study ul { margin: 0; padding-left: 1.3rem; }
.case-study .sample-note { margin-top: 0; }
.process-flow { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; margin: 1rem 0 0; gap: .45rem; counter-reset: step; }
.process-flow li { border: 1px solid var(--border); padding: .65rem; font: 500 .85rem/1.4 var(--mono); counter-increment: step; }
.process-flow li::before { content: counter(step) '. '; color: var(--accent-text); }
.next-record { border-block: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 1.4rem .5rem; margin-top: 2.5rem; }
.next-record:hover { background: var(--surface); }
.next-record .mono { display: block; color: var(--muted); }
.next-record strong { font: 650 clamp(1.55rem, 4vw, 2.35rem)/1.12 var(--heading); letter-spacing: -.045em; display: block; margin-top: .3rem; }
.about-mark .hero-mark { width: 48%; }
.lower-actions { margin-top: 2rem; }
.contact-list { max-width: 50rem; border-top: 1px solid var(--border); }
.contact-list > div { display: grid; grid-template-columns: minmax(6rem, .45fr) 1fr; align-items: center; gap: 1rem; padding: 1.2rem 0; border-bottom: 1px solid var(--border); }
.contact-list dt, .pending { color: var(--muted); }
.contact-list dd { margin: 0; overflow-wrap: anywhere; }
.profile-links { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.no-script { padding-block: 3rem; }
.archive-notice { padding-block: 1.25rem; color: var(--muted); }

@keyframes enter {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1020px) {
  .shell { width: calc(100% - 64px); }
  .hero { min-height: 480px; padding-block: 3.5rem; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 750px) {
  .shell { width: calc(100% - 40px); }
  .header-inner { min-height: 69px; grid-template-columns: 1fr auto; gap: 0 1rem; padding-top: .65rem; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; gap: .5rem; margin-top: .25rem; }
  .theme-toggle { grid-column: 2; grid-row: 1; }
  .hero { grid-template-columns: 1fr; gap: 2rem; padding-block: 3.2rem 2.6rem; }
  .hero h1 { font-size: clamp(4.3rem, 12vw, 6.75rem); }
  .hero-art { aspect-ratio: 1.5; }
  .hero-mark-frame { width: 47%; }
  .recent-list a { grid-template-columns: 5.25rem 1fr auto; gap: .6rem; }
  .recent-category { display: none; }
  .intro-inner, .detail-layout, .about-grid { grid-template-columns: 1fr; }
  .about-mark { aspect-ratio: 1.7; }
  .about-mark .hero-mark { width: 36%; }
  .subpage { padding-block: 3.1rem 3.5rem; }
}

@media (max-width: 480px) {
  .shell { width: calc(100% - 32px); }
  .hero h1 { font-size: clamp(3.7rem, 13vw, 5rem); }
  .section { padding-bottom: 3rem; }
  .project-grid { grid-template-columns: 1fr; }
  .filter-top { grid-template-columns: 1fr; }
  .recent-list a { grid-template-columns: 4.5rem 1fr; padding-inline: 0; }
  .recent-list time { grid-column: 2; }
  .footer-inner { flex-wrap: wrap; padding-block: 1.2rem; }
  .footer-inner p { order: 3; width: 100%; }
  .process-flow { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
