:root {
  --orange: #F4511E;
  --lime: #E6F25C;
  --green: #0E5A45;
  --cream: #F4EAD5;
  --ink: #161616;
  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --sans: "Inter", system-ui, sans-serif;
  /* hero blob: shared by the cream shape and the green copy of the headline */
  --blob: circle(34% at 74% 40%);
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--ink); background: var(--orange); overflow-x: hidden; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.label { font-size: clamp(.78rem, .68rem + .35vw, .95rem); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.display { font-family: var(--display); text-transform: uppercase; line-height: .85; font-weight: 400; }
.stripes { height: 28px; background: repeating-linear-gradient(90deg, var(--green) 0 56px, var(--cream) 56px 112px); }

/* ---------- nav ---------- */
nav { position: absolute; top: 0; left: 0; right: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: 20px clamp(16px, 4vw, 48px); }
nav ul { list-style: none; display: flex; flex: 1; justify-content: space-between; padding: 0 0 0 0; margin-right: clamp(24px, 6vw, 96px); }
nav ul a { text-decoration: none; }
nav ul a:hover { text-decoration: underline 2px; text-underline-offset: 4px; }
.menu-btn { display: none; }
.burger { width: 34px; height: 12px; border-block: 3px solid var(--ink); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: max(100svh, 640px); overflow: hidden; display: flex; flex-direction: column; }
.hero-cream { position: absolute; inset: 0; background: var(--cream); clip-path: var(--blob); }
.hero-wave { position: absolute; left: -12vw; bottom: -18vw; width: 52vw; height: 52vw; border-radius: 50%; background: var(--cream); }
.headline { position: absolute; inset: 0; padding-top: 70px; text-align: center; font-size: 20.5vw; white-space: nowrap; color: var(--lime); pointer-events: none; }
.headline.on-blob { color: var(--green); clip-path: var(--blob); }
.portrait {
  position: absolute; left: 50%; bottom: 28px; translate: -50% 0; z-index: 2;
  width: clamp(220px, 34vw, 440px); aspect-ratio: 3 / 4;
  border-radius: 999px 999px 24px 24px; background: var(--green);
  display: grid; place-items: center; text-align: center; color: var(--cream);
  box-shadow: 0 0 0 6px var(--ink);
}
.portrait span { opacity: .8; max-width: 14ch; }
.side { position: absolute; z-index: 3; line-height: 1.4; font-size: clamp(.9rem, 1.3vw, 1.35rem); font-weight: 800; max-width: calc(33vw - clamp(16px, 4vw, 48px) - 24px); }
.side strong { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(1.3rem, 2.2vw, 2.4rem); letter-spacing: .03em; line-height: 1.05; margin-block: 2px; }
.side.l1 { left: clamp(16px, 4vw, 48px); top: 48%; }
.side.l2 { left: clamp(16px, 4vw, 48px); top: 66%; color: var(--ink); }
.side.r1 { right: clamp(16px, 4vw, 48px); top: 48%; text-align: right; color: var(--ink); }
.cta-circle {
  position: absolute; right: clamp(16px, 5vw, 64px); bottom: 64px; z-index: 3;
  width: clamp(110px, 14vw, 170px); aspect-ratio: 1; border-radius: 50%;
  background: var(--lime); color: var(--green); display: grid; place-items: center;
  font-family: var(--display); font-size: clamp(1.2rem, 2.2vw, 2rem); text-decoration: none; text-align: center; line-height: .95;
  transition: transform .2s;
}
.cta-circle:hover { transform: rotate(-8deg) scale(1.05); }
.hero .stripes { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; }

/* ---------- shared sections ---------- */
section { padding: clamp(48px, 6vw, 88px) clamp(16px, 5vw, 64px); }
.section-title { font-size: clamp(3.5rem, 9vw, 7.5rem); margin-bottom: 28px; }

/* ---------- projects ---------- */
#projects { background: var(--cream); }
#projects .section-title { color: var(--orange); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.card { background: #fff; border: 3px solid var(--ink); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: 8px 8px 0 var(--green); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translate(-4px, -4px); box-shadow: 12px 12px 0 var(--green); }
.card-num { font-family: var(--display); font-size: 3rem; color: var(--orange); line-height: 1; }
.card h3 { font-family: var(--display); font-size: 2rem; font-weight: 400; text-transform: uppercase; }
.card p { line-height: 1.55; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.tags li, .pill { background: var(--lime); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 12px; font-size: .85rem; font-weight: 600; }
.card-links { display: flex; gap: 12px; margin-top: auto; padding-top: 8px; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; border: 3px solid var(--ink); font-weight: 800; text-decoration: none; text-transform: uppercase; font-size: .8rem; letter-spacing: .08em; transition: transform .2s; }
.btn:hover { transform: translateY(-2px); }
.btn.dark { background: var(--ink); color: var(--cream); }
.btn.light { background: transparent; }
.btn.green { background: var(--green); color: var(--cream); }
.btn.cream { background: var(--cream); }

.featured { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; background: #fff; border: 3px solid var(--ink); border-radius: 32px; padding: clamp(24px, 4vw, 48px); box-shadow: 12px 12px 0 var(--green); }
.featured-shot .phone { max-width: 280px; margin-inline: auto; rotate: -4deg; }
.featured-eyebrow { color: var(--orange); }
.featured h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(3rem, 7vw, 5.5rem); line-height: .9; color: var(--green); margin: 8px 0 16px; }
.featured-main > p { line-height: 1.6; margin-bottom: 16px; font-size: clamp(1rem, .9rem + .2vw, 1.15rem); }
.featured-main .card-links { margin-bottom: 24px; }
.featured-side .highlights { line-height: 1.7; }
@media (min-width: 1000px) {
  .featured-body { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 4vw, 56px); align-items: center; }
  /* label above its tags, so the tags get the column's full width */
  .featured-side .facts { margin-top: 0; grid-template-columns: 1fr; gap: 8px; }
  .featured-side .facts dd { margin-bottom: 10px; }
}
.featured .role { border-left: 6px solid var(--orange); padding-left: 14px; font-weight: 800; font-size: 1.25rem; line-height: 1.3; }
.featured .role .label { display: block; color: var(--orange); }
.highlights { padding-left: 1.2em; margin-bottom: 24px; line-height: 1.6; }

/* ---------- stack ---------- */
#stack { background: var(--green); color: var(--cream); }
#stack .section-title { color: var(--lime); }
/* wrapping row: each line of groups stretches edge to edge, so no group sits beside empty space */
.stack-groups { display: flex; flex-wrap: wrap; gap: 32px 48px; }
.stack-groups > div { flex: 1 1 320px; }
.stack-groups h3 { margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; padding: 0; }
.chips li { font-family: var(--display); font-size: clamp(1.3rem, 2.4vw, 1.9rem); text-transform: uppercase; padding: 8px 20px; border-radius: 999px; background: var(--cream); color: var(--green); }
.chips li:nth-child(3n+1) { background: var(--lime); rotate: -3deg; }
.chips li:nth-child(3n+2) { background: var(--orange); color: var(--ink); rotate: 2deg; }

/* ---------- about ---------- */
#about { position: relative; overflow: hidden; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 48px; align-items: center; }
@media (min-width: 761px) { #about { grid-template-columns: minmax(240px, .8fr) 1.2fr; } }
.about-blob { aspect-ratio: 1; max-width: 520px; width: 100%; justify-self: center; background: var(--cream); border-radius: 62% 38% 55% 45% / 48% 60% 40% 52%; display: grid; place-items: center; color: var(--green); text-align: center; }
.about-blob .display { font-size: clamp(4rem, 12vw, 8rem); }
.about-text h2 { font-size: clamp(3rem, 8vw, 6rem); color: var(--lime); margin-bottom: 24px; }
.about-text p { font-size: clamp(1.05rem, .9rem + .35vw, 1.3rem); line-height: 1.6; margin-bottom: 16px; color: var(--ink); }
.about-text .facts { margin-top: 24px; }
.facts dd .label { font-weight: 600; opacity: .75; }

/* ---------- certs ---------- */
#certs { background: var(--cream); }
#certs .section-title { color: var(--green); }
.cert-list { list-style: none; padding: 0; border-top: 3px solid var(--ink); }
.cert { display: grid; grid-template-columns: 6rem 1fr auto; gap: 24px; align-items: center; padding: 24px 0; border-bottom: 3px solid var(--ink); }
.cert-year { font-size: 2.5rem; color: var(--orange); }
.cert h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(1.4rem, 2.6vw, 2.2rem); line-height: 1.05; }
.cert .label { margin-top: 6px; }
.cert-note { margin-top: 10px; line-height: 1.55; max-width: 90ch; }
.cert-side { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: flex-end; }
.cert-viewer { margin: auto; border: 3px solid var(--ink); border-radius: 24px; padding: 0; max-width: min(92vw, 1000px); background: var(--cream); box-shadow: 10px 10px 0 var(--green); }
.cert-viewer::backdrop { background: rgb(22 22 22 / .75); }
.cert-viewer img { display: block; max-width: 100%; max-height: 78vh; margin: 0 auto; }
.cert-viewer img[hidden] { display: none; }
.cert-viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 12px 12px 20px; border-bottom: 3px solid var(--ink); }
.cert-missing { padding: 64px 32px; text-align: center; font-weight: 600; line-height: 1.8; min-width: min(80vw, 480px); }
.cert-missing code { background: var(--lime); border: 2px solid var(--ink); border-radius: 8px; padding: 2px 8px; }
.cert-viewer-bar button { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--ink); background: var(--lime); font: 1.4rem/1 var(--display); cursor: pointer; flex: none; }

/* ---------- contact ---------- */
#contact { background: var(--lime); text-align: center; }
#contact .section-title { color: var(--green); font-size: clamp(4rem, 13vw, 11rem); line-height: .95; }
#contact p { font-size: clamp(1.05rem, .9rem + .45vw, 1.45rem); max-width: 46ch; margin: 0 auto 32px; line-height: 1.6; }
.contact-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-bottom: 18px; }

footer { background: var(--ink); color: var(--cream); }
footer .row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding: 24px clamp(16px, 5vw, 64px); }

/* ---------- project page ---------- */
nav.simple ul { display: flex; margin-right: 0; }
.headline.long { font-size: 18.5vw; }
.hero-phone { position: absolute; left: 50%; bottom: 56px; translate: -50% 0; rotate: -5deg; z-index: 2; width: clamp(150px, 18vw, 240px); }
.phone { aspect-ratio: 9 / 19.5; border: 6px solid var(--ink); border-radius: 36px; background: var(--cream); color: var(--green); display: grid; place-items: center; text-align: center; overflow: hidden; }
.phone span { max-width: 12ch; }
.phone img { width: 100%; height: 100%; object-fit: cover; }
#overview { background: var(--cream); }
#overview .section-title { color: var(--orange); }
.overview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 48px; }
@media (min-width: 761px) { .overview-grid { grid-template-columns: 1.2fr 1fr; } }
.overview-grid > div > p { font-size: clamp(1.05rem, .9rem + .35vw, 1.3rem); line-height: 1.6; margin-bottom: 16px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 16px 24px; align-items: center; border-top: 3px solid var(--ink); padding-top: 24px; margin-bottom: 28px; }
.facts dd { font-weight: 600; }
#snapshots { background: var(--green); color: var(--cream); }
#snapshots .section-title { color: var(--lime); }
.shots { display: flex; gap: 24px; list-style: none; padding: 0; }
.shots li { flex: 1 1 0; min-width: 0; }
.shots figcaption { margin-top: 14px; text-align: center; }
#features .section-title { color: var(--lime); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 40px; }
.features .display { font-size: 4rem; color: var(--lime); }
.features h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 2rem; margin: 12px 0; }
.features p { line-height: 1.6; }

/* ---------- back to top ---------- */
.to-top { position: fixed; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px); z-index: 50; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: var(--green); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); font: 1.6rem/1 var(--display); text-decoration: none; opacity: 0; visibility: hidden; translate: 0 12px; transition: opacity .2s, translate .2s, visibility .2s; }
.to-top.show { opacity: 1; visibility: visible; translate: 0 0; }
.to-top:hover { translate: 0 -3px; }

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  .menu-btn { display: block; background: none; border: 0; padding: 8px; cursor: pointer; }
  nav ul { display: none; }
  nav.open ul { display: flex; flex-direction: column; gap: 18px; position: absolute; top: 64px; left: 16px; right: 16px; margin: 0; padding: 24px; background: var(--ink); color: var(--cream); border-radius: 20px; }
  :root { --blob: circle(36% at 90% 37%); }
  .headline { padding-top: 96px; }
  .side.l1 { top: 34%; }
  .side.r1 { top: 42%; }
  .side.l2 { display: none; }
  .side { max-width: 58vw; }
  .portrait { width: 62vw; }
  .cta-circle { bottom: 48px; }
  .cert { grid-template-columns: 1fr; gap: 10px; justify-items: start; }
  .cert-side { justify-content: flex-start; }
  .featured { grid-template-columns: 1fr; }
  .featured-shot .phone { max-width: 200px; }
  .shots { overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
  .shots li { flex: 0 0 62vw; scroll-snap-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
