:root {
  --paper: #f4f1e9;
  --paper-2: #ebe7dd;
  --ink: #10120f;
  --muted: #686b64;
  --line: #c9c7be;
  --accent: #baff52;
  --dark: #11130f;
  --white: #faf9f5;
  --display: "Iowan Old Style", "Baskerville", "Times New Roman", serif;
  --ui: Inter, "Helvetica Neue", Arial, sans-serif;
  --space: 8px;
  --shell: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  z-index: 20;
}
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.shell { width: min(calc(100% - 48px), var(--shell)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 91%, transparent);
  backdrop-filter: blur(14px);
}
.site-header.dark { color: var(--white); border-color: #343630; background: rgba(17,19,15,.92); }
.nav-row { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font: 700 23px/1 var(--display); text-decoration: none; letter-spacing: -.02em; }
.brand-dot { display: inline-block; width: 7px; height: 7px; margin-left: 5px; border-radius: 50%; background: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}
.dark .nav-links a { color: #c8cbc3; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: inherit; }
.nav-links a[aria-current="page"]::before { content: "•"; color: #4f7b16; margin-right: 7px; }
.dark .nav-links a[aria-current="page"]::before { color: var(--accent); }

.eyebrow { font-size: 11px; font-weight: 750; letter-spacing: .17em; text-transform: uppercase; }
.display { font-family: var(--display); font-weight: 600; letter-spacing: -.045em; }

.home-hero { min-height: 76vh; padding: 56px 0 40px; display: grid; align-content: center; }
.home-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: center; }
.orbit-stage { grid-column: 1 / 13; min-height: 420px; position: relative; overflow: hidden; }
.orbit-stage::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -188px;
  width: 650px;
  height: 650px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transform: translateX(-50%);
}
.orbit-card {
  --r: 0deg;
  position: absolute;
  left: 50%;
  bottom: 63px;
  width: 130px;
  aspect-ratio: 4 / 5;
  padding: 13px;
  border: 1px solid var(--ink);
  background: var(--paper-2);
  transform-origin: 50% 370px;
  transform: translateX(-50%) rotate(var(--r)) translateY(-238px) rotate(calc(var(--r) * -1));
  text-decoration: none;
  overflow: hidden;
  transition: transform .25s ease, background .25s ease, color .25s ease;
}
.orbit-card::before { content: attr(data-index); font-size: 10px; font-weight: 750; }
.orbit-card::after { content: ""; position: absolute; inset: 48% 13px auto; border-top: 1px solid currentColor; opacity: .35; }
.orbit-card span { position: absolute; left: 13px; right: 13px; bottom: 13px; font: 600 17px/1.05 var(--display); }
.orbit-card:hover { background: var(--ink); color: var(--white); transform: translateX(-50%) rotate(var(--r)) translateY(-250px) rotate(calc(var(--r) * -1)); }
.orbit-card:nth-child(1) { --r: -54deg; }
.orbit-card:nth-child(2) { --r: -36deg; }
.orbit-card:nth-child(3) { --r: -18deg; }
.orbit-card:nth-child(4) { --r: 0deg; background: var(--accent); }
.orbit-card:nth-child(5) { --r: 18deg; }
.orbit-card:nth-child(6) { --r: 36deg; }
.orbit-card:nth-child(7) { --r: 54deg; }
.hero-copy { grid-column: 2 / 12; position: relative; z-index: 2; margin-top: -112px; text-align: center; }
.hero-copy h1 { margin: 12px auto 14px; font-size: clamp(48px, 7vw, 92px); line-height: .95; }
.hero-copy p { max-width: 640px; margin: 0 auto; color: var(--muted); font-size: clamp(17px, 2vw, 22px); }
.actions { display: flex; justify-content: center; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.button { min-height: 48px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ink); text-decoration: none; font-size: 13px; font-weight: 750; transition: .2s ease; }
.button.primary { background: var(--ink); color: var(--white); }
.button:hover { background: var(--accent); color: var(--ink); transform: translateY(-2px); }

.feature-band { border-block: 1px solid var(--line); background: rgba(255,255,255,.2); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.feature { min-height: 184px; padding: 32px; border-right: 1px solid var(--line); }
.feature:last-child { border: 0; }
.feature-no { font: 700 32px/1 var(--display); }
.feature h2 { margin: 30px 0 8px; font: 600 21px/1.1 var(--display); }
.feature p { margin: 0; color: var(--muted); font-size: 14px; max-width: 31ch; }

.page-dark { background: var(--dark); color: var(--white); min-height: 100vh; }
.works-main { padding: 72px 0 112px; }
.works-heading { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 40px; }
.works-heading h1 { font-size: clamp(60px, 9vw, 120px); line-height: .82; margin: 0; }
.works-heading p { color: #aeb2a9; max-width: 430px; margin: 0 0 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.filter { min-height: 42px; padding: 0 16px; border: 1px solid #484b44; background: transparent; color: #c8cbc3; border-radius: 99px; cursor: pointer; }
.filter:hover, .filter.active { color: var(--ink); background: var(--accent); border-color: var(--accent); }
.work-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 92px; gap: 16px; }
.work-card { position: relative; grid-column: span 4; grid-row: span 4; overflow: hidden; border: 1px solid #3b3e37; background: #1b1e18; color: var(--white); text-decoration: none; }
.work-card.wide { grid-column: span 8; }
.work-card.tall { grid-row: span 6; }
.work-card[hidden] { display: none; }
.work-visual { position: absolute; inset: 0; overflow: hidden; }
.work-visual::before, .work-visual::after { content: ""; position: absolute; border: 1px solid #5b6056; }
.work-visual::before { width: 70%; aspect-ratio: 1; border-radius: 50%; right: -18%; top: -18%; }
.work-visual::after { inset: 14%; transform: rotate(12deg); }
.work-card:nth-child(2n) .work-visual::before { border-radius: 0; transform: rotate(32deg); background: #23271f; }
.work-card:nth-child(3n) .work-visual::after { background: var(--accent); opacity: .85; inset: 58% 8% 8% 48%; }
.work-info { position: absolute; inset: auto 0 0; padding: 22px; background: linear-gradient(transparent, rgba(0,0,0,.82)); }
.work-info small { color: #c4c8bf; text-transform: uppercase; letter-spacing: .12em; }
.work-info h2 { margin: 7px 0 0; font: 600 clamp(24px,3vw,38px)/1 var(--display); }
.work-card:hover .work-visual { transform: scale(1.025); }
.work-card .work-visual { transition: transform .3s ease; }
.work-card::after { content: "↗"; position: absolute; right: 18px; top: 16px; font-size: 22px; opacity: 0; transition: opacity .2s ease; }
.work-card:hover::after { opacity: 1; }
.archive-note { border: 1px dashed #55594f; padding: 22px; color: #aeb2a9; margin-top: 16px; }

.about-main { padding: 72px 0 112px; }
.about-grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(40px,7vw,100px); align-items: start; }
.portrait { position: sticky; top: 112px; min-height: 600px; display: grid; place-items: center; border: 1px solid var(--ink); background: var(--paper-2); overflow: hidden; }
.portrait::before { content: "MH"; font: 700 clamp(140px,22vw,310px)/1 var(--display); letter-spacing: -.12em; color: transparent; -webkit-text-stroke: 1px var(--ink); transform: translateX(-.05em); }
.portrait::after { content: "Portrait pending"; position: absolute; left: 18px; bottom: 14px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.about-copy h1 { margin: 0 0 24px; font-size: clamp(62px,9vw,120px); line-height: .82; }
.about-lead { font: 500 clamp(23px,3vw,36px)/1.24 var(--display); max-width: 23ch; }
.about-copy p { color: var(--muted); max-width: 64ch; }
.skill-list { margin-top: 48px; border-top: 1px solid var(--line); }
.skill-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 16px; align-items: center; min-height: 72px; border-bottom: 1px solid var(--line); }
.skill-row b { font-family: var(--display); font-size: 22px; }
.skill-row span { color: var(--muted); font-size: 13px; }

.contact-main { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 72px 0; text-align: center; }
.contact-card { width: min(760px, 100%); }
.contact-card h1 { margin: 12px 0 20px; font-size: clamp(68px,12vw,150px); line-height: .8; }
.contact-card p { color: var(--muted); font-size: 18px; }
.contact-links { margin: 44px auto 0; border-top: 1px solid var(--line); }
.contact-link { min-height: 68px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 650; }
.contact-link:hover { padding-inline: 12px; background: var(--accent); }

.site-footer { border-top: 1px solid var(--line); }
.footer-row { min-height: 78px; display: flex; justify-content: space-between; align-items: center; gap: 20px; color: var(--muted); font-size: 12px; }

@media (max-width: 820px) {
  .shell { width: min(calc(100% - 32px), var(--shell)); }
  .nav-row { min-height: 64px; align-items: start; padding: 18px 0 12px; }
  .nav-links { gap: 0; overflow-x: auto; padding-bottom: 4px; }
  .nav-links a { padding-inline: 9px; white-space: nowrap; }
  .home-hero { min-height: auto; padding-top: 32px; }
  .orbit-stage { min-height: 300px; }
  .orbit-stage::after { width: 430px; height: 430px; bottom: -154px; }
  .orbit-card { width: 86px; bottom: 34px; padding: 8px; transform-origin: 50% 250px; transform: translateX(-50%) rotate(var(--r)) translateY(-158px) rotate(calc(var(--r) * -1)); }
  .orbit-card:hover { transform: translateX(-50%) rotate(var(--r)) translateY(-164px) rotate(calc(var(--r) * -1)); }
  .orbit-card span { left: 8px; right: 8px; bottom: 8px; font-size: 12px; }
  .hero-copy { grid-column: 1 / 13; margin-top: -70px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature { border-right: 0; border-bottom: 1px solid var(--line); }
  .works-main, .about-main { padding-top: 48px; }
  .works-heading { display: block; }
  .works-heading p { margin-top: 24px; }
  .work-grid { display: block; }
  .work-card { display: block; min-height: 430px; margin-bottom: 16px; }
  .about-grid { grid-template-columns: 1fr; }
  .portrait { position: relative; top: auto; min-height: 430px; }
}

@media (max-width: 520px) {
  .brand { font-size: 20px; }
  .nav-links a { font-size: 12px; }
  .orbit-card:nth-child(1), .orbit-card:nth-child(7) { display: none; }
  .orbit-card:nth-child(2) { --r: -44deg; }
  .orbit-card:nth-child(3) { --r: -22deg; }
  .orbit-card:nth-child(5) { --r: 22deg; }
  .orbit-card:nth-child(6) { --r: 44deg; }
  .hero-copy h1 { font-size: 48px; }
  .footer-row { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 20px; }
  .skill-row { grid-template-columns: 42px 1fr; }
  .skill-row span { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
