:root {
  color-scheme: dark;
  --page: #161714;
  --card: #20211c;
  --line: #383a31;
  --text: #f6f5ed;
  --muted: #bdbfb0;
  --lime: #def38d;
  --sans: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', 'Cascadia Mono', Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--text); font: 1rem/1.5 var(--sans); }
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
p, h1, h2, h3 { margin: 0; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
::selection { color: var(--page); background: var(--lime); }
[id] { scroll-margin-top: 24px; }
.wrap { width: min(1200px, calc(100% - 96px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 4; inset: 12px auto auto 12px; padding: 12px; background: var(--lime); color: var(--page); transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.mark { flex: none; }
nav { display: flex; align-items: center; gap: clamp(16px, 3.3vw, 46px); }
nav a, .footer-inner a { color: var(--muted); padding-block: 10px; }
nav a:hover, .footer-inner a:hover { color: var(--lime); }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(225px, 0.32fr);
  align-items: end;
  column-gap: 36px;
  padding: clamp(58px, 7vw, 108px) 0 clamp(58px, 7.8vw, 112px);
}
.hero::after {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 50%;
  content: '';
  pointer-events: none;
  background-image: linear-gradient(to right, #4e5437 1px, transparent 1px), linear-gradient(to bottom, #4e5437 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at 77% 30%, #0005 0%, transparent 67%);
}
.eyebrow, .kind { font: 500 0.875rem/1.5 var(--mono); letter-spacing: 0.032em; }
.eyebrow { color: var(--lime); margin-bottom: 22px; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ''; width: 19px; height: 2px; background: currentColor; }
h1 { font-size: clamp(3.1rem, 6.55vw, 6.25rem); letter-spacing: -0.059em; line-height: 0.99; font-weight: 760; }
h1 span { color: var(--lime); }
.hero-side { display: grid; justify-items: start; gap: 22px; padding-bottom: 4px; }
.hero-side p { color: var(--muted); font-size: 1.125rem; max-width: 26ch; }
.button {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 650;
  transition: background-color 160ms, border-color 160ms, color 160ms;
}
.button-primary { color: var(--page); background: var(--lime); }
.button-primary:hover { background: #edffaf; }
.button-outline { background: transparent; border-color: #616455; color: var(--text); }
.button-outline:hover { background: #2a2e20; border-color: var(--lime); color: var(--lime); }

.section-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 5px 20px; border-top: 1px solid var(--line); padding-block: 24px 22px; }
h2 { font-size: clamp(1.85rem, 3.25vw, 3rem); letter-spacing: -0.045em; line-height: 1.12; }
.project { border: 1px solid var(--line); background: var(--card); border-radius: 18px; padding: 15px; min-width: 0; }
.featured { display: grid; grid-template-columns: minmax(235px, 0.46fr) minmax(0, 1fr); }
.featured + .featured { margin-top: 20px; }
.project-copy { display: grid; align-content: center; justify-items: start; padding: 24px 17px 16px; }
.featured .project-copy { padding: clamp(18px, 3vw, 40px); }
.kind { color: var(--lime); }
.project h3 { font-size: clamp(2rem, 3.3vw, 3.2rem); letter-spacing: -0.042em; line-height: 1.05; margin: 8px 0 12px; }
.project-description { color: var(--muted); max-width: 32ch; }
.project-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 23px; }
.project-overview { align-self: stretch; display: grid; align-content: center; min-width: 0; padding: clamp(16px, 3.5vw, 48px); border: 1px solid var(--line); border-radius: 10px; background: var(--page); }
.project-overview h4 { margin: 0 0 1em; font: 500 0.875rem/1.5 var(--mono); color: var(--muted); }
.project-overview ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.project-overview li { padding-block: 12px; border-top: 1px solid var(--line); font-weight: 600; }

.art { display: grid; place-items: center; container-type: inline-size; position: relative; overflow: hidden; border-radius: 10px; isolation: isolate; min-width: 0; }
.site-art { width: 100%; aspect-ratio: 2.05; min-height: 270px; background: #aeb7bc; }
.site-cover { width: 88%; height: auto; border-radius: 6px; box-shadow: 0 10px 30px #14171154; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: clamp(54px, 6.7vw, 90px) 0 56px; }
.profile-grid section { border-top: 1px solid var(--line); padding: 25px 16px 0 0; }
.profile-grid h2 { font-size: clamp(1.75rem, 2.6vw, 2.55rem); margin-bottom: 12px; }
.profile-grid p { max-width: 43ch; color: var(--muted); }
.contact-methods { display: flex; flex-wrap: wrap; gap: 14px 32px; margin: 0; }
.contact-methods dt { font-size: 0.875rem; color: var(--muted); }
.contact-methods dd { margin: 3px 0 0; }
.contact-methods a { color: var(--lime); text-decoration: underline; text-underline-offset: 0.2em; }
.site-footer { border-top: 1px solid var(--line); }

.case-dialog { width: min(760px, calc(100% - 28px)); max-height: calc(100% - 28px); padding: 0; color: var(--text); background: var(--card); border: 1px solid #646658; border-radius: 16px; }
.case-dialog::backdrop { background: #070806d6; }
.case-toolbar { position: sticky; z-index: 1; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px clamp(15px, 4vw, 30px); background: var(--card); border-bottom: 1px solid var(--line); }
.case-body { padding: 22px clamp(15px, 4vw, 30px) 28px; }
.case-description { margin: 10px 0 20px; color: var(--muted); }
.case-preview .art { min-height: 0; }
.case-details { display: grid; row-gap: 8px; margin: 22px 0 0; }
.case-preview:empty + .case-details { margin-top: 0; }
.case-details dt { color: var(--lime); font-weight: 650; }
.case-details dd { margin: 0 0 6px; color: var(--muted); }
.case-site { margin-top: 18px; }
.case-site[hidden] { display: none; }

@media (max-width: 850px) {
  .wrap { width: calc(100% - 48px); }
  .hero { grid-template-columns: 1fr; row-gap: 28px; }
  .hero-side { gap: 15px; }
  .featured .project-copy { padding: 22px 14px; }
}

@media (max-width: 650px) {
  .wrap { width: calc(100% - 36px); }
  .header-inner, .footer-inner { min-height: 66px; }
  .wordmark > span { display: none; }
  nav { gap: clamp(12px, 4.4vw, 26px); }
  nav a { font-size: 0.9375rem; }
  .hero { padding-block: 54px 48px; }
  .hero::after { inset-inline-start: 32%; }
  .eyebrow { margin-bottom: 16px; }
  h1 { font-size: clamp(2.05rem, 10vw, 4rem); }
  .hero-side p { font-size: 1rem; }
  .featured, .profile-grid { grid-template-columns: 1fr; }
  .featured .art { grid-row: 1; }
  .site-art { min-height: 0; aspect-ratio: 1.65; }
  .project { padding: 10px; }
  .project-copy, .featured .project-copy { padding: 18px 12px 14px; }
  .project-overview ul { gap: 0 14px; }
}

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