:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --text: #1b1a17;
  --muted: #6b665e;
  --line: #e2ddd4;
  --accent: #c2502e;
  --accent-ink: #ffffff;
  --radius: 14px;
  --wrap: 1180px;
  --prose: 700px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141311;
    --surface: #1d1c19;
    --text: #efebe4;
    --muted: #a39d93;
    --line: #2f2d29;
    --accent: #ec7a55;
    --accent-ink: #141311;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { font: 500 20px/1 var(--serif); text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }
nav { display: flex; gap: 4px; }
nav a {
  text-decoration: none; font-size: 15px; font-weight: 500; color: var(--muted);
  padding: 8px 12px; border-radius: 999px; transition: color .15s, background .15s;
}
nav a:hover { color: var(--text); background: var(--line); }
nav a[aria-current="page"] { color: var(--text); }
@media (max-width: 480px) { .logo { font-size: 17px; } nav a { padding: 8px 8px; font-size: 14px; } }

/* Type */
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.display {
  font: 400 clamp(36px, 6vw, 72px)/1.04 var(--serif);
  letter-spacing: -.025em; margin: 0; text-wrap: balance;
}
.lede { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 640px; margin: 22px 0 0; text-wrap: pretty; }
.section-title { font: 500 clamp(24px, 3vw, 32px)/1.2 var(--serif); letter-spacing: -.015em; margin: 56px 0 8px; }

/* Buttons */
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn {
  display: inline-flex; align-items: center; height: 48px; padding: 0 24px; border-radius: 999px;
  background: var(--text); color: var(--bg); text-decoration: none; font-weight: 500; font-size: 15px;
  border: 1px solid var(--text); transition: transform .15s, background .15s, color .15s;
}
.btn:hover { transform: translateY(-1px); background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }

/* Home */
.hero { padding-top: clamp(56px, 10vw, 120px); padding-bottom: clamp(48px, 7vw, 88px); }
.hero .display { max-width: 15em; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(24px, 4vw, 48px) clamp(20px, 3vw, 36px); padding-bottom: 96px; }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }
.card { text-decoration: none; display: block; }
.card:nth-child(even) { margin-top: clamp(0px, 8vw, 96px); }
@media (max-width: 760px) { .card:nth-child(even) { margin-top: 0; } }
.card-media { border-radius: var(--radius); overflow: hidden; background: var(--line); aspect-ratio: 3 / 4; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.card:hover .card-media img { transform: scale(1.035); }
.card-body { padding-top: 18px; }
.card-body .eyebrow { margin-bottom: 8px; font-size: 12px; }
.card-title { font: 500 clamp(22px, 2.4vw, 28px)/1.2 var(--serif); letter-spacing: -.015em; margin: 0; }
.card:hover .card-title { color: var(--accent); }
.card-summary { color: var(--muted); margin: 8px 0 0; font-size: 16px; max-width: 34em; }

/* Project */
.project-header { padding-top: clamp(32px, 6vw, 72px); padding-bottom: clamp(36px, 5vw, 64px); }
.back { display: inline-block; text-decoration: none; color: var(--muted); font-size: 15px; margin-bottom: 40px; }
.back:hover { color: var(--accent); }
.details {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px 32px;
  margin: 44px 0 0; padding-top: 28px; border-top: 1px solid var(--line);
}
.details dt { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.details dd { margin: 6px 0 0; font-size: 16px; }

.project-body { display: flex; flex-direction: column; align-items: center; gap: 28px; padding-bottom: 40px; }
.project-body > * { width: 100%; }
.prose { max-width: var(--prose); }
.prose p { margin: 0 0 1em; text-wrap: pretty; }
.prose p:last-child { margin-bottom: 0; }
.prose ul { margin: 0 0 1em; padding-left: 1.2em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--accent); }
.prose .section-title:first-child { margin-top: 32px; }
.prose a { color: var(--accent); }

.figure { margin: 8px 0; }
.figure img, .gallery img { border-radius: var(--radius); background: var(--surface); width: 100%; }
.figure--tall { max-width: 760px; }
.zoom { display: block; cursor: zoom-in; }
.gallery { display: grid; gap: 16px; margin: 8px 0; }
.gallery--2 { grid-template-columns: repeat(2, 1fr); }
.gallery--3 { grid-template-columns: repeat(3, 1fr); }
.gallery img { height: 100%; object-fit: cover; }
@media (max-width: 600px) { .gallery--2, .gallery--3 { grid-template-columns: 1fr; } }
.graphic .gallery + .prose { color: var(--muted); font-size: 15px; margin-top: -12px; margin-bottom: 32px; }
.row { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 24px; align-items: start; }
.row .col { display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 700px) { .row { grid-auto-flow: row; } }
.embed { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); margin: 8px 0; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.next { padding-top: 40px; padding-bottom: 96px; }
.next a { display: block; text-decoration: none; border-top: 1px solid var(--line); padding-top: 36px; }
.next-title { display: block; font: 400 clamp(30px, 5vw, 56px)/1.1 var(--serif); letter-spacing: -.02em; transition: color .15s; }
.next a:hover .next-title { color: var(--accent); }

/* About */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 80px); padding-top: clamp(40px, 7vw, 88px); padding-bottom: 96px; align-items: start; }
.about-photo { position: sticky; top: 100px; }
.about-photo img { border-radius: var(--radius); width: 100%; }
.about .display { font-size: clamp(34px, 4.6vw, 56px); margin-bottom: 32px; }
.chips { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 14px; background: var(--surface); }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } .about-photo { position: static; max-width: 420px; } }

/* Contact */
.contact { padding-top: clamp(56px, 10vw, 120px); padding-bottom: 120px; min-height: 60vh; }
.big-mail {
  display: inline-block; margin-top: 44px; font: 400 clamp(22px, 4.4vw, 48px)/1.2 var(--serif);
  letter-spacing: -.02em; text-decoration: none; border-bottom: 2px solid var(--accent); overflow-wrap: anywhere;
}
.big-mail:hover { color: var(--accent); }
.contact-list { list-style: none; padding: 0; margin: 56px 0 0; max-width: 640px; border-top: 1px solid var(--line); }
.contact-list li { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.contact-list span { color: var(--muted); }
.contact-list a { text-decoration: none; overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--accent); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; padding-top: 56px; padding-bottom: 40px; }
.footer-cta { font: 400 clamp(28px, 4vw, 44px)/1.1 var(--serif); letter-spacing: -.02em; margin: 0 0 10px; }
.footer-mail { color: var(--accent); text-decoration: none; font-weight: 500; overflow-wrap: anywhere; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a, .footer-base a { color: var(--muted); text-decoration: none; font-size: 15px; }
.footer-links a:hover, .footer-base a:hover { color: var(--text); }
.footer-base { display: flex; justify-content: space-between; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(10,10,9,.92); display: flex; align-items: center; justify-content: center; padding: 24px; overflow: auto; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1600px, 100%); max-height: none; margin: auto; border-radius: 8px; }
.lightbox button { position: fixed; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }

/* Motion */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card-media img, .btn { transition: none; }
}
