/* Tokens. Neutrals are tinted toward the accent hue (oklch hue ~85). */
:root {
  --hue: 85;
  --bg: oklch(99% 0.006 var(--hue));
  --bg-soft: oklch(96.5% 0.012 var(--hue));
  --fg: oklch(18% 0.012 var(--hue));
  --muted: oklch(46% 0.014 var(--hue));
  --line: oklch(90% 0.012 var(--hue));
  --accent: oklch(82% 0.17 var(--hue));      /* #F9B71D */
  --accent-deep: oklch(70% 0.16 var(--hue));
  --accent-ink: oklch(18% 0.012 var(--hue));
  --ok: oklch(48% 0.14 150);
  --err: oklch(50% 0.18 25);

  --max: 1120px;
  --prose: 62ch;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);   /* ease-out-quart */
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Bricolage Grotesque", var(--font-body);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: oklch(15% 0.01 var(--hue));
    --bg-soft: oklch(20% 0.012 var(--hue));
    --fg: oklch(95% 0.008 var(--hue));
    --muted: oklch(70% 0.012 var(--hue));
    --line: oklch(28% 0.012 var(--hue));
    --ok: oklch(75% 0.14 150);
    --err: oklch(72% 0.16 25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; overflow-x: clip; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 0.5em; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul { padding-left: 1.2em; }
li { margin-bottom: .35em; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: .5rem; background: var(--accent); color: var(--accent-ink); padding: .5rem 1rem; border-radius: 999px; font-weight: 600; }
.skip:focus { left: 1rem; z-index: 100; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: .6rem clamp(1rem, 4vw, 3rem);
  background: color-mix(in oklch, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--font-display); font-weight: 800; text-decoration: none;
  background: var(--accent); color: var(--accent-ink);
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  display: grid; place-items: center; font-size: .95rem; letter-spacing: -0.02em;
  transition: transform .25s var(--ease);
}
.brand:hover { transform: rotate(-8deg); }
.site-header nav { display: flex; gap: clamp(.25rem, 1.5vw, 1rem); }
.site-header nav a {
  text-decoration: none; font-weight: 500; font-size: .95rem;
  padding: .7rem .6rem; min-height: 44px; display: inline-flex; align-items: center;
  border-radius: 6px; transition: background .2s var(--ease);
}
.site-header nav a:hover { background: var(--bg-soft); }
.nav-cta { position: relative; }
.nav-cta::after { content: ""; position: absolute; left: .6rem; right: .6rem; bottom: .45rem; height: 2px; background: var(--accent); }
@media (max-width: 479px) {
  .site-header { padding-inline: .75rem; }
  .brand { width: 2.5rem; height: 2.5rem; font-size: .85rem; }
  .site-header nav { gap: 0; }
  .site-header nav a { font-size: .875rem; padding: .7rem .45rem; }
  .nav-cta::after { left: .45rem; right: .45rem; }
}

main { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
section { padding-block: clamp(3.5rem, 9vw, 7rem); }
.section-title { font-size: clamp(2rem, 4.5vw, 2.75rem); font-weight: 800; margin-bottom: 1.75rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; min-height: 48px;
  padding: .8rem 1.5rem; border-radius: 999px; text-decoration: none; font-weight: 600;
  border: 2px solid var(--fg); background: transparent;
  transition: transform .25s var(--ease), background .2s var(--ease), color .2s var(--ease);
  cursor: pointer; font: inherit; font-weight: 600;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.link-cta {
  display: inline-block; font-weight: 600; padding-block: .4rem;
  text-underline-offset: .35em; text-decoration-color: var(--accent); text-decoration-thickness: 2px;
  transition: text-underline-offset .2s var(--ease);
}
.link-cta:hover { text-underline-offset: .5em; }

/* Hero */
.hero { display: grid; gap: 2.5rem; align-items: center; padding-top: clamp(2.5rem, 7vw, 6rem); }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.25rem; }
.display {
  font-size: clamp(3.75rem, 15vw, 10rem); font-weight: 800; line-height: .88;
  letter-spacing: -0.05em; margin-bottom: 1.75rem;
}
.display span { display: block; }
.lede { font-size: clamp(1.15rem, 2vw, 1.4rem); max-width: 34ch; line-height: 1.45; }
.lede a { text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: .2em; }
.hero-photo { margin: 0; justify-self: start; position: relative; order: -1; }
.hero-photo img { border-radius: 50%; width: clamp(120px, 34vw, 400px); box-shadow: 0 30px 60px -30px oklch(30% 0.05 var(--hue) / .35); }
@media (max-width: 899px) {
  .hero { gap: 1.5rem; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { justify-content: center; }
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.4fr 1fr; }
  .hero-photo { justify-self: end; order: 0; }
}

/* Hero entrance */
.hero-text > *, .hero-photo {
  animation: rise .8s var(--ease) both;
}
.hero-text > :nth-child(1) { animation-delay: .05s; }
.hero-text > :nth-child(2) { animation-delay: .12s; }
.hero-text > :nth-child(3) { animation-delay: .22s; }
.hero-text > :nth-child(4) { animation-delay: .28s; }
.hero-text > :nth-child(5) { animation-delay: .34s; }
.hero-photo { animation-delay: .18s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero-text > *, .hero-photo { animation: none; } }

/* Proof */
.proof { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-block: 2.5rem; }
.proof ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.75rem 2rem; }
.proof li { font-size: .95rem; color: var(--muted); margin: 0; line-height: 1.5; }
.proof strong { display: block; font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--fg); letter-spacing: -0.03em; line-height: 1; margin-bottom: .4rem; }
@media (min-width: 640px) { .proof ul { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .proof ul { grid-template-columns: repeat(4, 1fr); } }

/* Work */
.work { display: grid; gap: 2.5rem; }
.service { border-top: 3px solid var(--accent); padding-top: 1.5rem; display: flex; flex-direction: column; }
.service h3 { font-size: 1.6rem; font-weight: 700; }
.service .for { color: var(--muted); font-style: italic; }
.service ul { margin-bottom: 1.25rem; }
.service .shape { font-size: .95rem; color: var(--muted); margin-top: auto; }
.service .shape strong { color: var(--fg); }
@media (min-width: 900px) {
  .work { grid-template-columns: repeat(3, 1fr); gap: 3rem 2.5rem; }
  .work .section-title { grid-column: 1 / -1; margin-bottom: 0; }
}

/* Approach */
.thesis { font-family: var(--font-display); font-size: clamp(1.4rem, 2.8vw, 2rem); max-width: 30ch; font-weight: 500; line-height: 1.3; letter-spacing: -0.015em; margin-bottom: 3.5rem; }
.principles { display: grid; gap: 2.5rem 3rem; }
.principle h3 { font-size: 1.2rem; font-weight: 700; display: flex; align-items: center; gap: .6rem; }
.principle h3::before { content: ""; flex: none; width: .55em; height: .55em; background: var(--accent); border-radius: 2px; transform: rotate(45deg); }
.principle p { color: var(--muted); max-width: 42ch; }
@media (min-width: 640px) { .principles { grid-template-columns: repeat(2, 1fr); } }

/* Projects */
.projects-intro { font-size: 1.15rem; max-width: 52ch; margin-bottom: 3rem; }
.case { background: var(--bg-soft); border-radius: 1.25rem; padding: clamp(1.5rem, 4vw, 3rem); margin-bottom: 3.5rem; }
.case-label { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .75rem; display: flex; align-items: center; gap: .5rem; }
.case-label::before { content: ""; width: .55em; height: .55em; background: var(--accent); border-radius: 2px; transform: rotate(45deg); }
.case h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; max-width: 24ch; }
.case > p { max-width: var(--prose); }
.case-points { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1.25rem; }
.case-points li { padding-top: 1.25rem; border-top: 1px solid var(--line); max-width: var(--prose); }
.case-points strong { display: block; margin-bottom: .25rem; }
@media (min-width: 900px) {
  .case-points { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .case-points li { max-width: none; }
}
.project-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 2.5rem 3rem; }
.project-list li { border-top: 1px solid var(--line); padding-top: 1.25rem; }
.project-list h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: .4rem; }
.project-list p { color: var(--muted); }
.project-list .meta { font-size: .85rem; color: var(--fg); font-weight: 500; margin: 0; }
@media (min-width: 640px) { .project-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .project-list { grid-template-columns: repeat(3, 1fr); } }

/* About */
.about { display: grid; gap: 2.5rem; align-items: start; }
.about-text p { max-width: var(--prose); }
.about-photo { margin: 0; }
.about-photo img { border-radius: 1.25rem; box-shadow: 0 30px 60px -30px oklch(30% 0.05 var(--hue) / .35); }
@media (min-width: 900px) {
  .about { grid-template-columns: 1.4fr 1fr; gap: 4rem; }
  .about-photo { position: sticky; top: 6rem; }
}

/* Contact: full-bleed accent band */
.contact {
  --fg: var(--accent-ink);
  --muted: oklch(32% 0.06 var(--hue));
  --line: oklch(60% 0.14 var(--hue));
  --field-bg: oklch(98% 0.02 var(--hue));
  color: var(--fg);
  background: var(--accent);
  margin-inline: calc(50% - 50vw);
  padding-inline: max(1rem, calc(50vw - var(--max) / 2));
  display: grid; gap: 2.5rem;
}
.contact-intro p { max-width: 42ch; }
.contact-intro .section-title { font-size: clamp(2.5rem, 6vw, 4rem); }
.contact .alt { color: var(--muted); font-size: .95rem; }
.contact .alt a { color: var(--fg); }
form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 600; font-size: .95rem; }
.optional { color: var(--muted); font-weight: 400; }
input, select, textarea {
  font: inherit; color: var(--accent-ink); background: var(--field-bg);
  border: 1.5px solid transparent; border-radius: .6rem; padding: .75rem .9rem; width: 100%;
  min-height: 48px; transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
textarea { resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--accent-ink); box-shadow: 0 0 0 3px oklch(18% 0.012 var(--hue) / .15); }
.contact .btn-primary { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--accent); }
.contact .btn-primary:hover { background: oklch(28% 0.02 var(--hue)); border-color: oklch(28% 0.02 var(--hue)); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
#form-status { margin: .75rem 0 0; font-weight: 600; min-height: 1.5em; }
#form-status.ok { color: var(--ok); }
#form-status.err { color: var(--err); }
.contact #form-status.ok { color: oklch(30% 0.12 150); }
.contact #form-status.err { color: oklch(35% 0.16 25); }
@media (min-width: 640px) {
  form { grid-template-columns: 1fr 1fr; }
  .field-wide { grid-column: 1 / -1; }
}
@media (min-width: 900px) { .contact { grid-template-columns: 1fr 1.4fr; gap: 4rem; } }

/* Footer */
.site-footer { padding: 2rem clamp(1rem, 4vw, 3rem); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .9rem; color: var(--muted); }
.site-footer p { margin: 0; }
.site-footer a { text-underline-offset: .25em; }
.site-footer a:hover { color: var(--fg); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
.no-js .reveal { opacity: 1; transform: none; }
