:root {
  --ink: #17292a;
  --ink-soft: #3e504d;
  --paper: #f6f2ea;
  --paper-2: #efe9dd;
  --line: #d8d1c2;
  --coral: #e8745a;
  --coral-deep: #c9553b;
  --leaf: #b7c99e;
  --sun: #f7d676;
  --muted: #66716c;
  --radius: 18px;
  --surface: #fbf9f4;
  --ink-deep: #0f1d1e;
  --on-sun: #3a3720;
  --on-sun-soft: #5b5230;
  --contact-bg: var(--coral);
  --hl: var(--sun);
  --contact-ink: var(--ink);
  --sun-em: var(--coral-deep);
  --sun-shadow: rgba(23, 41, 42, .9);
  --shadow: 0 18px 40px -22px rgba(23, 41, 42, .35);
}

/* Color themes: switch with <html data-theme="..."> or ?theme=... */
[data-theme="ocean"] {
  --ink: #0f2233; --ink-soft: #35506a; --paper: #f3f7fa; --paper-2: #e6eef4; --line: #cfdce6;
  --coral: #3d8fdc; --coral-deep: #1b5ea6; --leaf: #bfdcee; --sun: #f6c453; --muted: #5d7385;
  --surface: #ffffff; --ink-deep: #0a1824; --on-sun: #3a2d08; --on-sun-soft: #6a5314; --contact-bg: #8cc1f0;
}
[data-theme="dusk"] {
  --ink: #241b3a; --ink-soft: #51486b; --paper: #f8f5fb; --paper-2: #efe9f6; --line: #ded4ea;
  --coral: #8b5cf6; --coral-deep: #6535d1; --leaf: #d9cdf3; --sun: #ffd9a8; --muted: #766d8c;
  --surface: #fdfbff; --ink-deep: #181027; --on-sun: #43290f; --on-sun-soft: #75512b; --contact-bg: #c2aefa;
}
[data-theme="mono"] {
  --ink: #121212; --ink-soft: #444; --paper: #fafaf8; --paper-2: #f0f0ec; --line: #dcdcd6;
  --coral: #ff5a3c; --coral-deep: #d03418; --leaf: #dfe9d6; --sun: #ffe45c; --muted: #6b6b66;
  --surface: #ffffff; --ink-deep: #0a0a0a; --on-sun: #2a2606; --on-sun-soft: #5c5410; --contact-bg: #ff7a5f;
}
[data-theme="graphite"] {
  --hl: #c6f432;
  --ink: #0b1220; --ink-soft: #3b4658; --paper: #f5f7fa; --paper-2: #e9edf3; --line: #d5dbe4;
  --coral: #2563eb; --coral-deep: #1d4ed8; --leaf: #dbe2ec; --sun: #c6f432; --muted: #5b6678;
  --surface: #ffffff; --ink-deep: #070c16; --on-sun: #0b1220; --on-sun-soft: #2f3a14; --sun-em: #1d4ed8;
  --sun-shadow: #0b1220; --contact-bg: #2563eb; --contact-ink: #ffffff;
}
[data-theme="teal"] {
  --hl: #7ef0d9;
  --ink: #0a1a1f; --ink-soft: #33474d; --paper: #f4f8f8; --paper-2: #e6eeee; --line: #d0dcdd;
  --coral: #0d9488; --coral-deep: #0f766e; --leaf: #d6e4e4; --sun: #0f766e; --muted: #587177;
  --surface: #ffffff; --ink-deep: #061216; --on-sun: #ffffff; --on-sun-soft: #c9ece8; --sun-em: #7ef0d9;
  --sun-shadow: #0a1a1f; --contact-bg: #0d9488; --contact-ink: #ffffff;
}
[data-theme="noir"] {
  --hl: #fb7185;
  --ink: #09090b; --ink-soft: #3f3f46; --paper: #ffffff; --paper-2: #f4f4f5; --line: #e4e4e7;
  --coral: #e11d48; --coral-deep: #be123c; --leaf: #e4e4e7; --sun: #09090b; --muted: #71717a;
  --surface: #fafafa; --ink-deep: #000000; --on-sun: #ffffff; --on-sun-soft: #a1a1aa; --sun-em: #fb7185;
  --sun-shadow: #e11d48; --contact-bg: #e11d48; --contact-ink: #ffffff;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 4px; }

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

.wrap { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }

/* Type */
h1, h2, h3, blockquote { font-family: 'Playfair Display', Georgia, serif; letter-spacing: -.03em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(48px, 7vw, 92px); }
h2 { font-size: clamp(32px, 4.4vw, 56px); }
em { font-style: italic; font-weight: 600; color: var(--coral-deep); }
.kicker, .eyebrow, .mono, .card-no, footer {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
}
.kicker { color: var(--muted); margin: 0 0 18px; }
.sub { color: var(--ink-soft); font-size: 18px; margin: 14px 0 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: box-shadow .25s, border-color .25s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 24px -20px rgba(23, 41, 42, .5); }
.bar { height: 72px; display: flex; align-items: center; justify-content: space-between; }
.wordmark { font-size: 28px; font-weight: 700; text-decoration: none; letter-spacing: -.06em; }
.wordmark span { color: var(--coral); }
nav { display: flex; align-items: center; gap: 28px; }
nav a { text-decoration: none; font-size: 14px; font-weight: 600; color: var(--ink-soft); transition: color .2s; }
nav a:hover { color: var(--ink); }
nav .nav-cta { background: var(--ink); color: var(--paper); padding: 9px 16px; border-radius: 999px; }
nav .nav-cta:hover { background: var(--coral-deep); color: #fff; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; gap: 14px;
  background: var(--ink); color: var(--paper);
  padding: 15px 22px; border-radius: 999px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  transition: transform .2s, background .2s;
}
.button:hover { background: var(--coral-deep); transform: translateY(-2px); }
.button.light { background: var(--paper); color: var(--ink); }
.button.light:hover { background: #fff; }
.text-link { font-size: 15px; font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--coral); padding-bottom: 2px; }
.text-link:hover { color: var(--coral-deep); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 72px; align-items: center; padding: 56px 0 110px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-soft); margin: 0 0 26px; padding: 7px 14px 7px 12px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #5f9a6f; box-shadow: 0 0 0 4px rgba(95, 154, 111, .25); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(95, 154, 111, 0); } }
.lede { max-width: 520px; font-size: 19px; color: var(--ink-soft); margin: 26px 0 34px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
.facts { list-style: none; display: flex; gap: 34px; padding: 30px 0 0; margin: 44px 0 0; border-top: 1px solid var(--line); }
.facts li { display: flex; flex-direction: column; }
.facts strong { font-family: 'Playfair Display', serif; font-size: 24px; letter-spacing: -.02em; }
.facts span { font-size: 13px; color: var(--muted); }

.hero-photo { position: relative; max-width: 460px; justify-self: end; width: 100%; }
.hero-photo::before { content: ''; position: absolute; inset: 22px -22px -22px 22px; background: var(--leaf); border-radius: 28px; z-index: 0; }
.hero-photo img { position: relative; z-index: 1; border-radius: 28px; aspect-ratio: 4/5; object-fit: cover; object-position: 50% 18%; box-shadow: var(--shadow); }
.hero-photo figcaption {
  position: absolute; z-index: 2; left: -18px; bottom: 28px;
  background: var(--hl); color: #0b0b0b; padding: 10px 16px; border-radius: 12px;
  font: 500 11px 'DM Mono', monospace; text-transform: uppercase; letter-spacing: .04em;
  box-shadow: var(--shadow); transform: rotate(-2deg);
}

/* About */
.about { display: grid; grid-template-columns: .85fr 1.15fr; gap: 80px; align-items: center; padding: 100px 0; border-top: 1px solid var(--line); }
.about-photo img { border-radius: var(--radius); aspect-ratio: 4/5; object-fit: cover; box-shadow: var(--shadow); }
.about-copy h2 { margin-bottom: 26px; }
.about-copy p:not(.kicker) { font-size: 18px; color: var(--ink-soft); max-width: 600px; margin: 0 0 16px; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 28px 0 0; }
.tags li { padding: 8px 15px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 500; background: var(--surface); }

/* Section heads */
.section-head { max-width: 680px; margin-bottom: 48px; }

/* Work cards */
.work { padding: 20px 0 110px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { display: flex; flex-direction: column; padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card.accent { background: var(--leaf); border-color: var(--leaf); }
.card-no { color: var(--muted); margin: 0; }
.card.accent .card-no { color: var(--ink-soft); }
.card h3 { font-size: 30px; margin: 56px 0 14px; }
.card p:not(.card-no) { color: var(--ink-soft); margin: 0 0 26px; }
.card ul { list-style: none; padding: 20px 0 0; margin: auto 0 0; border-top: 1px solid rgba(23, 41, 42, .15); display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; font-weight: 600; }

/* Workspace */
.workspace { background: var(--ink); color: var(--paper); padding: 110px 0; }
.workspace .kicker { color: #a9b8b2; }
.workspace .sub { color: #c4d0cb; }
.workspace em { color: var(--hl); }
.bento { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 300px); gap: 18px; }
.bento figure { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--ink-deep); }
.bento img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.bento figure:hover img { transform: scale(1.04); }
.b-wide { grid-column: span 2; }
.b-tall { grid-row: span 2; grid-column: 3; grid-row: 1 / span 2; }
.bento figcaption {
  position: absolute; left: 14px; right: 14px; bottom: 14px;
  padding: 12px 16px; border-radius: 12px; font-size: 14px; color: var(--paper);
  background: color-mix(in srgb, var(--ink-deep) 72%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.bento figcaption strong { color: var(--hl); }
.b-tall img { object-position: 50% 30%; }
/* Bottom-left photo: anchor near the top so Nova's head isn't cropped */
.bento figure:nth-child(3) img { object-position: 50% -15px; }

/* Approach */
.approach { padding: 110px 0; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.steps li { padding-top: 24px; border-top: 2px solid var(--ink); }
.steps span { font: 500 12px 'DM Mono', monospace; color: var(--coral-deep); }
.steps h3 { font-size: 26px; margin: 12px 0 10px; }
.steps p { margin: 0; color: var(--ink-soft); }

/* Sunny */
.sunny { background: var(--sun); color: var(--on-sun); padding: 100px 0; }
.sunny-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; align-items: center; }
.sunny-photo img { border-radius: var(--radius); aspect-ratio: 4/5; object-fit: cover; box-shadow: 14px 14px 0 var(--sun-shadow); }
.sunny .kicker { color: var(--on-sun-soft); }
.sunny em { color: var(--sun-em); }
.sunny-copy h2 { margin-bottom: 24px; }
.sunny-copy p:not(.kicker):not(.mono) { font-size: 18px; max-width: 560px; color: var(--on-sun); }
.sunny blockquote { font-size: clamp(22px, 2.6vw, 30px); margin: 30px 0; padding-left: 22px; border-left: 4px solid currentColor; max-width: 560px; font-weight: 600; font-style: italic; }
.sunny .mono { color: var(--on-sun-soft); margin: 0; }

/* Beyond */
.beyond { padding: 110px 0; }
.beyond-card { display: grid; grid-template-columns: 340px 1fr; gap: 64px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 28px 56px 28px 28px; }
.beyond-card img { border-radius: 20px; aspect-ratio: 4/5; object-fit: cover; object-position: 50% 30%; }
.beyond-card h2 { margin-bottom: 18px; }
.beyond-card p:not(.kicker) { font-size: 18px; color: var(--ink-soft); max-width: 520px; margin: 0; }

/* Contact */
.contact { background: var(--contact-bg); color: var(--contact-ink); padding: 100px 0; }
.contact .kicker { color: var(--contact-ink); opacity: .75; }
.contact h2 { font-size: clamp(40px, 6vw, 76px); max-width: 780px; margin-bottom: 18px; }
.contact p:not(.kicker) { font-size: 20px; margin: 0 0 28px; }

footer { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding: 28px 0; color: var(--muted); font-size: 11px; }
footer p { margin: 0; }

/* Reveal */
.js-reveal .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js-reveal .reveal.in { opacity: 1; transform: none; }
.js-reveal .cards .reveal:nth-child(2), .js-reveal .steps .reveal:nth-child(2) { transition-delay: .1s; }
.js-reveal .cards .reveal:nth-child(3), .js-reveal .steps .reveal:nth-child(3) { transition-delay: .2s; }
.js-reveal .steps .reveal:nth-child(4) { transition-delay: .3s; }

/* Tablet */
@media (max-width: 960px) {
  .wrap { width: min(100% - 36px, 1160px); }
  nav a:not(.nav-cta) { display: none; }
  .hero { grid-template-columns: 1fr; gap: 64px; padding: 36px 0 80px; }
  .hero-photo { justify-self: center; max-width: 420px; }
  .hero-photo::before { inset: 16px -12px -16px 12px; }
  .about, .sunny-grid { grid-template-columns: 1fr; gap: 48px; padding-block: 72px; }
  .about-photo, .sunny-photo { max-width: 440px; }
  .sunny-photo img { box-shadow: 10px 10px 0 var(--sun-shadow); }
  .work, .approach, .beyond { padding-block: 72px; }
  .workspace, .sunny, .contact { padding-block: 72px; }
  .cards { grid-template-columns: 1fr; }
  .card h3 { margin-top: 32px; }
  .bento { grid-template-columns: 1fr 1fr; grid-template-rows: auto; grid-auto-rows: 260px; }
  .b-wide { grid-column: span 2; }
  .b-tall { grid-column: span 1; grid-row: span 2; }
  .steps { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .beyond-card { grid-template-columns: 1fr; gap: 28px; padding: 20px 20px 36px; }
  .beyond-card img { aspect-ratio: 16/11; }
  .beyond-card > div { padding: 0 8px; }
}

/* Phone */
@media (max-width: 560px) {
  h1 { font-size: 46px; }
  .bar { height: 64px; }
  .facts { gap: 22px; }
  .facts strong { font-size: 20px; }
  .hero-photo figcaption { left: 8px; font-size: 10px; }
  .bento { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .b-wide, .b-tall { grid-column: auto; grid-row: auto; }
  .b-tall { grid-row: span 2; }
  .steps { grid-template-columns: 1fr; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Theme picker (only rendered when SHOW_PICKER is true in script.js) */
.theme-picker { position: fixed; right: 14px; bottom: 14px; z-index: 90; display: flex; flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 28px); gap: 6px; padding: 6px; background: var(--ink); border-radius: 999px; box-shadow: var(--shadow); }
.theme-picker button { font: 600 12px 'DM Sans', sans-serif; padding: 8px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--paper); cursor: pointer; }
.theme-picker button[aria-pressed="true"] { background: var(--coral); color: #fff; }
