/* Shape system: images and cards 20px, buttons and chips full pill. One accent (rose). */
:root {
  --bg: #f6f5f3;
  --surface: #ecebe7;
  --ink: #141413;
  --body: #3d3c39;
  --muted: #6b6964;
  --line: #dcdad5;
  --accent: #d6285a;
  --accent-soft: #fbe3ea;
  --on-accent: #ffffff;
  --on-ink: #f6f5f3;
  --slot: #e4e2dd;
  --radius: 20px;
  --pill: 999px;
  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --display: "Inter", system-ui, sans-serif;
  --text: "Inter", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121211;
    --surface: #1c1c1a;
    --ink: #f2f1ee;
    --body: #c9c7c2;
    --muted: #9a978f;
    --line: #2d2c29;
    --accent: #ff5c84;
    --accent-soft: #3a1621;
  --on-accent: #121211;
    --on-ink: #121211;
    --slot: #232321;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121211;
  --surface: #1c1c1a;
  --ink: #f2f1ee;
  --body: #c9c7c2;
  --muted: #9a978f;
  --line: #2d2c29;
  --accent: #ff5c84;
  --accent-soft: #3a1621;
  --on-accent: #121211;
  --on-ink: #121211;
  --slot: #232321;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 400 17px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
a, button { touch-action: manipulation; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); font-weight: 600; margin: 0; letter-spacing: -0.03em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--on-ink); padding: 8px 14px; border-radius: var(--pill); z-index: 100; }
.skip:focus { left: 8px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 19px; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; white-space: nowrap; }
.brand span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.btn) { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--body); transition: color .2s; }
.nav-links a:not(.btn):hover { color: var(--ink); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: var(--pill); cursor: pointer; font-size: 18px; transition: background .2s; }
.icon-btn:hover { background: var(--surface); }
@media (max-width: 760px) { .nav-links .text-link { display: none; } .nav-links { gap: 10px; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: var(--pill); font: 600 15px/1 var(--text); text-decoration: none; white-space: nowrap; cursor: pointer; border: 1px solid transparent; transition: transform .2s var(--ease), background .2s, border-color .2s; }
.btn:active { transform: scale(0.97); }
.btn-ink { background: var(--ink); color: var(--on-ink); }
.btn-ink:hover { background: var(--accent); color: var(--on-accent); }
.btn-line { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-line:hover { border-color: var(--ink); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn i { font-size: 18px; }

/* Hero */
.hero { padding: clamp(32px, 6vw, 80px) 0 clamp(48px, 7vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.hero-kicker { font-size: 15px; font-weight: 500; color: var(--muted); margin-bottom: 20px; }
.hero-kicker strong { color: var(--ink); font-weight: 600; }
.hero h1 { font-size: clamp(44px, 6.4vw, 92px); line-height: 0.98; letter-spacing: -0.045em; max-width: 11ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-intro { margin-top: 26px; font-size: clamp(17px, 1.5vw, 20px); max-width: 44ch; color: var(--body); }
.hero-ctas { margin-top: 34px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-photo { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--slot); transform: rotate(1.5deg); box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--accent) 45%, transparent); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-photo { max-width: 420px; transform: none; }
}

/* Stats */
.stats { padding: 8px 0 clamp(64px, 9vw, 120px); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.stat { padding: 28px 24px 0 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat-value { font-family: var(--display); font-size: clamp(36px, 4.2vw, 60px); font-weight: 600; color: var(--ink); letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { margin-top: 12px; font-size: 15px; color: var(--muted); max-width: 22ch; }
@media (max-width: 860px) {
  .stats-grid { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
}

/* Section heads */
.section { padding: clamp(64px, 9vw, 128px) 0; }
.section-title { font-size: clamp(34px, 4.6vw, 64px); line-height: 1.02; letter-spacing: -0.04em; }
.section-sub { margin-top: 16px; max-width: 56ch; color: var(--muted); }

/* Work */
.work-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 38px; padding: 0 16px; border-radius: var(--pill); border: 1px solid var(--line); background: transparent; color: var(--body); font: 500 14px/1 var(--text); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }

.bento { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(260px, auto); gap: 20px; }
.card { grid-column: span 2; display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: inherit; }
.card.large { grid-column: span 4; grid-row: span 2; }
.card.tall { grid-column: span 2; grid-row: span 2; }
.card.wide { grid-column: span 4; }
.card-media { flex: 1; min-height: 220px; border-radius: var(--radius); overflow: hidden; background: var(--slot); position: relative; }
.card-media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; transition: transform .8s var(--ease); }
.card:hover .card-media img { transform: scale(1.04); }
.card-text { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.card h3 { font-size: 22px; letter-spacing: -0.02em; }
.card p { font-size: 15px; color: var(--muted); margin-top: 4px; max-width: 46ch; }
.card .arrow { flex: none; width: 38px; height: 38px; border-radius: var(--pill); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); transition: background .3s, color .3s, transform .3s var(--ease); }
.card:hover .arrow { background: var(--accent); border-color: var(--accent); color: var(--on-accent); transform: rotate(-45deg); }
.bento.filtered .card { grid-column: span 3; grid-row: auto; }
.bento.filtered { grid-auto-rows: minmax(340px, auto); }
.empty { grid-column: 1 / -1; padding: 48px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
@media (max-width: 860px) {
  .bento, .bento.filtered { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .card, .card.large, .card.tall, .card.wide, .bento.filtered .card { grid-column: auto; grid-row: auto; }
  .card-media { aspect-ratio: 4 / 3; flex: none; }
}

/* Missing-image slot */
.slot { position: absolute; inset: 0; display: grid; place-content: center; gap: 8px; text-align: center; padding: 20px; background: repeating-linear-gradient(-45deg, var(--slot), var(--slot) 14px, color-mix(in srgb, var(--slot) 70%, var(--bg)) 14px, color-mix(in srgb, var(--slot) 70%, var(--bg)) 28px); color: var(--muted); font-size: 13px; }
.slot i { font-size: 28px; justify-self: center; }
.slot code { font: 500 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); background: var(--bg); padding: 4px 8px; border-radius: 6px; word-break: break-all; }

/* Marquee */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 22px 0; }
.marquee-track { display: flex; gap: 40px; width: max-content; }
.marquee-track span { font-family: var(--display); font-size: clamp(22px, 2.6vw, 34px); font-weight: 500; color: var(--ink); white-space: nowrap; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 40px; }
.marquee-track span::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: marquee 48s linear infinite; }
  .marquee:hover .marquee-track { animation-play-state: paused; }
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes marquee { to { transform: translateX(-50%); } }

/* About */
.about-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.about-photo { position: relative; aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden; background: var(--slot); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-body p { font-size: clamp(18px, 1.6vw, 21px); color: var(--body); max-width: 58ch; }
.about-body p + p { margin-top: 18px; }
.about-body .section-title { margin-bottom: 28px; }
.facts { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding-top: 32px; border-top: 1px solid var(--line); }
.facts h3 { font-family: var(--text); font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-bottom: 12px; }
.facts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.facts li { font-size: 15px; line-height: 1.45; color: var(--ink); }
.facts li small { display: block; color: var(--muted); font-size: 14px; }
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 420px; }
  .facts { grid-template-columns: 1fr; }
}

/* Experience */
.exp-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 96px); }
.exp-grid > div:first-child { position: sticky; top: 108px; align-self: start; }
.exp-list { display: grid; }
.exp { padding: 26px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; }
.exp:last-child { border-bottom: 1px solid var(--line); }
.exp h3 { font-size: clamp(19px, 1.8vw, 23px); letter-spacing: -0.02em; line-height: 1.25; }
.exp .org { color: var(--accent); font-weight: 500; font-size: 15px; }
.exp .dates { grid-column: 2; grid-row: 1; font-size: 14px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: 4px; }
.exp ul { grid-column: 1 / -1; margin: 10px 0 0; padding-left: 18px; color: var(--body); font-size: 15px; display: grid; gap: 4px; }
.exp-actions { margin-top: 28px; }
@media (max-width: 860px) {
  .exp-grid { grid-template-columns: 1fr; }
  .exp-grid > div:first-child { position: static; }
  .exp { grid-template-columns: 1fr; }
  .exp .dates { grid-column: 1; grid-row: auto; padding-top: 0; }
}

/* Contact */
.contact { padding: clamp(80px, 12vw, 160px) 0; text-align: center; }
.contact .avail { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: var(--pill); background: var(--accent-soft); color: var(--ink); font-size: 14px; font-weight: 500; }
.contact .avail::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.contact h2 { margin: 28px auto 0; font-size: clamp(40px, 7vw, 104px); line-height: 0.98; letter-spacing: -0.05em; max-width: 12ch; }
.contact-mail { display: inline-block; margin-top: 28px; font-size: clamp(18px, 2vw, 24px); color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 6px; word-break: break-all; }
.contact-ctas { margin-top: 36px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer nav { display: flex; gap: 20px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

/* Project page */
.back { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--muted); text-decoration: none; margin-bottom: 32px; }
.back:hover { color: var(--ink); }
.p-head { padding: clamp(32px, 5vw, 64px) 0 40px; }
.p-head h1 { font-size: clamp(44px, 7vw, 104px); line-height: 0.98; letter-spacing: -0.05em; }
.p-head .lede { margin-top: 22px; font-size: clamp(18px, 1.7vw, 22px); max-width: 52ch; }
.p-meta { margin-top: 36px; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 12px 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.p-meta dt { font-size: 13px; color: var(--muted); }
.p-meta dd { margin: 4px 0 0; color: var(--ink); font-weight: 500; font-size: 15px; }
.p-cover { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--slot); }
.p-cover img { width: 100%; height: 100%; object-fit: cover; }
.p-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 20px; }
.p-result { background: var(--surface); border-radius: var(--radius); padding: 28px; }
.p-result:first-child { background: var(--accent); }
.p-result:first-child .stat-value, .p-result:first-child .stat-label { color: var(--on-accent); }
.p-sections { padding: clamp(56px, 8vw, 112px) 0 clamp(40px, 6vw, 80px); display: grid; gap: 48px; }
.p-section { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 24px clamp(32px, 6vw, 96px); }
.p-section h2 { font-size: clamp(24px, 2.4vw, 32px); }
.p-section p { font-size: clamp(17px, 1.5vw, 20px); max-width: 60ch; }
.gallery { columns: 2; column-gap: 20px; }
.gallery button { display: block; width: 100%; margin: 0 0 20px; padding: 0; border: 0; background: var(--slot); border-radius: var(--radius); overflow: hidden; cursor: zoom-in; break-inside: avoid; position: relative; min-height: 240px; }
.gallery img { width: 100%; height: auto; transition: transform .8s var(--ease); }
.gallery button:hover img { transform: scale(1.03); }
.next { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 48px 0; margin-top: 40px; border-top: 1px solid var(--line); text-decoration: none; }
.next small { display: block; color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.next strong { font-family: var(--display); font-size: clamp(32px, 5vw, 64px); color: var(--ink); letter-spacing: -0.04em; line-height: 1; font-weight: 600; }
.next .arrow { width: 64px; height: 64px; flex: none; border-radius: var(--pill); background: var(--ink); color: var(--on-ink); display: grid; place-items: center; font-size: 26px; transition: background .3s, transform .3s var(--ease); }
.next:hover .arrow { background: var(--accent); color: var(--on-accent); transform: translateX(6px); }
@media (max-width: 760px) {
  .p-meta { grid-template-columns: 1fr; }
  .p-section { grid-template-columns: 1fr; }
  .gallery { columns: 1; }
}

/* Lightbox */
.lightbox { overscroll-behavior: contain; border: 0; padding: 0; background: transparent; max-width: min(1200px, 94vw); max-height: 92vh; }
.lightbox::backdrop { background: rgb(10 10 10 / .86); }
.lightbox img { max-height: 88vh; width: auto; border-radius: 12px; margin: 0 auto; }
.lightbox .close { position: fixed; top: 16px; right: 16px; background: #f2f1ee; color: #141413; border: 0; }

/* Reveal on scroll */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
  .reveal.in { opacity: 1; transform: none; }
  .rise { animation: rise 1s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Case studies: cards stack on top of each other as you scroll */
.cases { margin-top: 48px; display: grid; gap: 24px; }
.case { position: sticky; top: 92px; display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(24px, 3.5vw, 48px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); min-height: min(560px, 78vh); }
.case:nth-child(3n + 2) { background: var(--accent-soft); }
.case-tag { font-size: 14px; color: var(--muted); }
.case h3 { margin-top: 10px; font-size: clamp(32px, 4vw, 56px); line-height: 1; letter-spacing: -0.04em; }
.case-text > p { margin-top: 16px; font-size: clamp(17px, 1.5vw, 19px); max-width: 42ch; }
.case-results { margin: 28px 0 32px; display: flex; flex-wrap: wrap; gap: 20px 36px; }
.case-results div { display: flex; flex-direction: column-reverse; }
.case-results dd { margin: 0; font-family: var(--display); font-size: clamp(26px, 2.6vw, 36px); font-weight: 600; color: var(--ink); letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.case-results dt { font-size: 14px; color: var(--muted); max-width: 18ch; margin-top: 4px; }
.case-media { position: relative; height: 100%; min-height: 320px; border-radius: calc(var(--radius) - 6px); overflow: hidden; background: var(--slot); }
.case-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .case { position: static; grid-template-columns: 1fr; min-height: 0; }
  .case-media { min-height: 0; aspect-ratio: 4 / 3; order: -1; }
}

/* Testimonials */
.quotes-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; }
.quotes-nav { display: flex; gap: 8px; }
.quotes-nav .icon-btn { width: 48px; height: 48px; }
.quotes { --edge: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); display: grid; grid-auto-flow: column; grid-auto-columns: min(460px, 86vw); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge); padding: 4px var(--edge) 16px; scrollbar-width: none; overscroll-behavior-x: contain; }
.quotes::-webkit-scrollbar { display: none; }
.quote { scroll-snap-align: start; margin: 0; display: flex; flex-direction: column; gap: 20px; padding: 32px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.quote > i { font-size: 36px; color: var(--accent); }
.quote blockquote { margin: 0; flex: 1; font-family: var(--display); font-size: clamp(20px, 1.8vw, 24px); line-height: 1.35; color: var(--ink); letter-spacing: -0.015em; font-weight: 500; }
.quote figcaption { display: flex; align-items: center; gap: 14px; }
.quote figcaption strong { display: block; color: var(--ink); font-size: 15px; }
.quote figcaption small { display: block; color: var(--muted); font-size: 14px; }
.avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 15px; }

/* Case study page extras */
.p-section > div { display: grid; gap: 18px; }
.p-points { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.p-points li { position: relative; padding-left: 28px; font-size: 17px; color: var(--ink); }
.p-points li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 14px; height: 2px; background: var(--accent); }
.p-section-img { grid-column: 2; position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--slot); }
.p-section-img img { width: 100%; height: 100%; object-fit: cover; }
.p-quote .quote { max-width: 760px; margin-left: auto; }
.p-quote blockquote { font-size: clamp(22px, 2.4vw, 30px); }
@media (max-width: 760px) {
  .p-section-img { grid-column: auto; }
  .quotes-head { align-items: flex-start; flex-direction: column; }
}
