/* Nick Caplan - shared site styles (home / experience / contact) */
:root {
  --phone-ring: #b45e3f;
  --phone-glow: rgba(180, 94, 63, .3);
  --bg: #f4f0e8;
  --surface: #fbfaf6;
  --surface-strong: #e8e1d5;
  --ink: #18211f;
  --muted: #5a6057;
  --line: rgba(24, 33, 31, .16);
  --accent-ink: var(--accent);
  --accent: #dd5e3c;
  --accent-2: #b6ce74;
  --display: "Fraunces", Georgia, serif;
  --body: "DM Sans", "DM Sans FB", Arial, sans-serif;
  --mono: "DM Mono", monospace;
  --radius: 24px;
  --shadow: 0 22px 60px rgba(33, 37, 31, .12);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--body);
  line-height: 1.55;
}
/* Theme transitions switch on only after the page has painted (site.js sets
   data-motion="on"), so the first paint is instantly the themed background on
   every engine; manual toggles afterwards still animate. */
body[data-motion="on"] { transition: background .45s var(--ease), color .45s var(--ease); }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
::selection { background: var(--accent); color: var(--surface); }

.site-shell { container: site / inline-size; min-height: 100vh; overflow: hidden; }

/* Navigation: real page URLs, visible on every screen size (no menu button). */
.site-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1240px;
  padding: 28px 32px;
  position: relative;
  row-gap: 18px;
  z-index: 3;
}
.wordmark { font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.wordmark span { color: var(--accent-ink); }
.nav-links { align-items: center; display: flex; flex-wrap: wrap; gap: 28px; row-gap: 10px; }
.nav-links a { color: var(--muted); font-size: 13px; transition: color .2s ease; }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-contact {
  border-bottom: 1px solid var(--ink);
  color: var(--ink) !important;
  padding-bottom: 3px;
}
/* Mobile nav chips: the same destinations, always visible on small screens. */
.nav-chips { display: none; }

.style-picker {
  align-items: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .05);
  display: flex;
  gap: 3px;
  left: 50%;
  padding: 4px;
  position: fixed;
  top: 18px;
  transform: translateX(-50%);
  z-index: 10;
  backdrop-filter: blur(16px);
}
.theme-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 8px;
  transition: background .25s ease, border-color .25s ease, color .25s ease;
}
.theme-icon { font-size: 17px; line-height: 1; }
.theme-label { display: none; }
.mobile-toggle { align-items: center; background: transparent; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; display: inline-flex; justify-content: center; line-height: 1; min-height: 44px; min-width: 44px; padding: 8px 10px; transition: background .25s ease, border-color .25s ease, color .25s ease; }
.mobile-icon { fill: none; height: 14px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 14px; }
.mobile-toggle[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
@media (hover: hover) {
  .mobile-toggle:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
  .nav-links a:not([aria-current="page"]):hover { color: var(--accent); }
  .theme-toggle:hover { background: var(--surface); border-color: var(--accent); color: var(--accent); }
  .button:hover { background: var(--ink); color: var(--bg); transform: translateY(-3px); }
  .button-primary:hover { background: var(--ink); border-color: var(--ink); }
  .thumb:hover span { color: var(--ink); }
  .credstrip .r:hover { text-decoration: underline; }
  .footer-cta:hover .cta-icon { transform: translate(6px, -.22em); }
}
.mobile-toggle:focus-visible, .theme-toggle:focus-visible, .style-button:focus-visible, .button:focus-visible, a:focus-visible, .thumb:focus-visible, .arr:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.style-picker { display: none; }

/* Hero (home): text-led, websites first. */
.hero { margin: 0 auto; max-width: 1240px; padding: 54px 32px 34px; position: relative; }
.eyebrow, .section-kicker { margin: 0; color: var(--accent-ink); font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.hero h1 { font-family: var(--display); font-size: clamp(56px, 9vw, 118px); font-weight: 500; letter-spacing: -.075em; line-height: .94; margin: 22px 0 34px; max-width: 900px; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-intro { color: var(--muted); font-size: clamp(18px, 2vw, 23px); letter-spacing: -.02em; line-height: 1.35; margin: 0; max-width: none; }
.intro-contact { align-items: center; color: var(--accent-ink); display: inline-flex; font-size: 16px; font-weight: 600; min-height: 44px; margin-top: 12px; text-decoration: underline; text-underline-offset: 5px; }
.intro-contact .cta-icon { display: inline-block; margin-left: 8px; }
.hero-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 18px; margin-top: 36px; }
.button {
  align-items: center;
  border: 1px solid var(--ink);
  border-radius: 100px;
  display: inline-flex;
  font-size: 15px;
  gap: 10px;
  justify-content: center;
  height: 58px;
  min-width: 184px;
  padding: 13px 19px;
  transition: background .25s ease, color .25s ease, transform .25s var(--ease);
}
.button-primary { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.mail-icon { fill: none; height: 17px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 17px; }
/* Nick's rule (24 October 2026): a CTA symbol, arrow or icon, never wraps away
   from the end of its label - the final word and its symbol form one no-wrap unit. */
.cta-end { white-space: nowrap; }
.button .cta-icon { display: inline-block; font-size: 18px; line-height: 1; margin-left: 10px; }
.github-link .cta-end .github-icon { display: inline-block; vertical-align: -2px; }
.button .cta-end .mail-icon { display: inline-block; margin-left: 10px; vertical-align: -2px; }

/* Portrait (shared; placed where the design puts it). */
.portrait-wrap { width: 230px; }
.portrait-frame { width: 100%; }
.portrait { aspect-ratio: 1; border: 2px solid var(--accent); border-radius: 50%; box-shadow: 0 10px 24px rgba(24, 33, 31, .14); display: block; filter: saturate(.9); height: auto; object-fit: cover; object-position: center top; padding: 4px; width: 100%; }
.portrait-note { color: var(--muted); font-family: var(--mono); font-size: 9px; margin: 8px 0 0; text-align: center; }

/* Home hero: the portrait sits beside the headline; the intro below runs full width. */
.hero-grid { align-items: center; display: grid; gap: 48px 32px; grid-template-columns: minmax(0, 1fr) auto; }
.hero-grid .portrait-wrap { width: clamp(250px, 30vw, 400px); }
.hero-text { grid-column: 1; grid-row: 1; }
.hero-grid .portrait-wrap { grid-column: 2; grid-row: 1; }

/* Project headings precede the imagery in reading order. Desktop uses a
   two-column composition; smaller layouts follow the same natural DOM order. */
.showcase { margin: 0 auto; max-width: 1240px; padding: 30px 32px 10px; }
.case { display: grid; column-gap: 44px; row-gap: 12px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); padding: 36px 0; }
.case + .case { border-top: 1px solid var(--line); }
.case-shot { grid-column: 1; grid-row: 1 / span 2; min-width: 0; align-self: center; }
.case-heading { grid-column: 2; align-self: end; }
.case-copy { grid-column: 2; align-self: start; }
.case-flip .case-shot { grid-column: 2; }
.case-flip .case-heading, .case-flip .case-copy { grid-column: 1; }
/* Wider Work canvas only; preserve the dedicated device preview. */
@media (min-width: 1280px) {
  body:not([data-mobile="true"]) .showcase { max-width: 1480px; padding-left: 48px; padding-right: 48px; }
  body:not([data-mobile="true"]) .case { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  body:not([data-mobile="true"]) .case-flip { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
}

.shot { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.shotbar { align-items: center; background: #10131a; display: flex; gap: 8px; padding: 10px 14px; }
.shotbar .t { color: #edf1ed; font-family: var(--body); font-size: 12px; letter-spacing: .06em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shotbar .pill { background: #3d4a41; border-radius: 99px; color: #d8e0d8; flex: none; font-family: var(--body); font-size: 10.5px; letter-spacing: .12em; margin-left: auto; padding: 3px 9px; }
/* Reserve screenshot space before its theme-aware template is activated. */
.shot:not(:has(noscript .shot-img)) .shot-template:first-of-type { display: block; aspect-ratio: 1280 / 713; width: 100%; }
.shot-img { display: block; object-fit: cover; width: 100%; }
.shot-desk, .shotlay-desk { aspect-ratio: 1280 / 713; }
.shot-mob, .shotlay-mob { aspect-ratio: 390 / 844; }
.shot { position: relative; }
/* The composed shot is an overview, not a miniature interactive website.
   Keep a single, readable set of page selectors and let visitors explore live. */
.shot-mob, .shotlay-mob { position: absolute; right: 7%; bottom: 2%; display: block; height: 80%; width: auto; object-fit: cover; object-position: center top; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 20px rgba(0, 0, 0, .38); }

/* Exploration (Nick, 27 October 2026): one capture per viewport. Desktop
   widths show the desktop capture alone, framed by its address bar - the
   phone capture no longer overlays it. */
@media (min-width: 961px) {
  .shot-mob, .shotlay-mob { display: none; }
}
.shot-tag { display: none; }
.thumbs { display: flex; flex-wrap: wrap; gap: 0; margin-top: 12px; }
/* Screenshot choices are quieter than page navigation and live-site actions. */
.thumb { position: relative; background: transparent; border: 0; border-radius: 0; box-shadow: inset 0 -1px var(--line); cursor: pointer; flex: 1 1 auto; min-height: 44px; margin: 0; padding: 10px 8px; text-align: center; }
.thumb span { color: var(--muted); display: block; font-size: 13px; line-height: 1.4; }
.thumb.sel::after { content: ""; position: absolute; bottom: 0; left: 12px; right: 12px; height: 2px; background: var(--accent); }
.thumb.sel span { color: var(--accent-ink); font-weight: 600; }
/* Gesture feedback: horizontal drags are handled in JS, vertical swipes keep
   scrolling the page natively. */
.shot, .thumbs { touch-action: pan-y; }
/* Capture paging: the incoming capture slides across the stage while the
   outgoing one leaves. The stage clips only mid-slide, so the phone's glow
   and the page layout are untouched at rest. */
.shot-stage { position: relative; }
/* Clip the carousel sideways, not the outline/glow outside the phone
   above and below its border box. A clip-path changes no layout geometry. */
.shot-stage.sliding { clip-path: inset(-48px 0); }
.shot-layer { inset: 0; pointer-events: none; position: absolute; z-index: 1; }
/* The selected choice's underline is a single indicator that slides between
   buttons; with JS off the per-button ::after underline remains. */
.thumbs { position: relative; }
.thumb-ind-clip { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.thumb-ind, .thumb-ind-wrap { background: var(--accent); height: 2px; pointer-events: none; position: absolute; }
.thumbs-anim .thumb.sel::after { content: none; }
.case-copy .kicker, .kicker { color: var(--accent-ink); font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.case-heading h2 { font-family: var(--display); font-size: 32px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; margin: 10px 0 0; }
.case-copy p { color: var(--muted); font-size: 16.5px; line-height: 1.55; margin: 8px 0 0; }
.case-copy .button { margin-top: 22px; }

/* "Built by an engineering leader" strip linking to the experience page. */
.credstrip { align-items: center; background: #29362e; border-radius: 18px; color: #edf1ed; display: flex; gap: 20px; justify-content: space-between; margin: 26px auto 60px; max-width: 1176px; padding: 26px 30px; width: calc(100% - 64px); }
.credstrip .l { font-size: 17px; line-height: 1.5; }
.credstrip .l b { font-family: var(--display); font-size: 19px; }
.credstrip .r { color: #eda88c; flex: none; font-family: var(--mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }

/* Subpage hero (experience / contact). */
.page-hero { margin: 0 auto; max-width: 1240px; padding: 54px 32px 20px; }
.page-hero h1 { font-family: var(--display); font-size: clamp(42px, 6vw, 72px); font-weight: 500; letter-spacing: -.06em; line-height: .95; margin: 18px 0 20px; overflow-wrap: break-word; }
.page-hero h1 em { color: var(--accent); font-style: normal; }
.page-hero .intro + .intro { margin-top: 18px; }
.page-hero .intro { color: var(--muted); font-size: clamp(17px, 2vw, 21px); letter-spacing: -.02em; line-height: 1.4; margin: 0; max-width: 620px; }

/* Experience content (shared by the experience page). */
.content { margin: 0 auto; max-width: 1240px; padding: 56px 32px 76px; }
.section-heading { margin-bottom: 38px; }
.section-heading h2 { font-family: var(--display); font-size: clamp(38px, 5vw, 68px); font-weight: 500; letter-spacing: -.06em; line-height: .95; margin: 0; }
.section-heading p { color: var(--muted); font-size: 13px; margin: 18px 0 0; max-width: 560px; }
.experience-list { border-top: 1px solid var(--line); }
.role { display: grid; gap: 40px; grid-template-columns: 190px 1fr; padding: 36px 0 40px; }
.role + .role { border-top: 1px solid var(--line); }
.role-meta { color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .04em; line-height: 1.7; text-transform: uppercase; }
.role-meta strong { color: var(--accent-ink); display: block; font-weight: 500; margin-bottom: 5px; }
.role-title { font-size: 21px; font-weight: 600; letter-spacing: -.035em; margin: 0; }
.role-company { color: var(--muted); font-size: 14px; margin: 3px 0 17px; }
.role-summary { color: var(--muted); font-size: 14px; margin: 0; max-width: 745px; }
.role-highlights { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); list-style: none; margin: 25px 0 0; max-width: 820px; padding: 0; }
.role-highlights li { border-left: 2px solid var(--accent-2); color: var(--ink); font-size: 13px; line-height: 1.45; padding-left: 13px; }
.role-highlights strong { display: block; font-size: 11px; margin-bottom: 4px; }

.career-history { margin-top: 26px; }
.career-history summary { align-items: center; border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); cursor: pointer; display: flex; gap: 20px; justify-content: space-between; list-style: none; padding: 21px 0; }
.career-history summary::-webkit-details-marker { display: none; }
.career-history summary:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 4px; }
.career-history[open] summary { border-bottom: 0; }
.career-label strong { display: block; font-family: var(--display); font-size: 20px; font-weight: 500; letter-spacing: -.04em; }
.career-note { color: var(--muted); display: block; font-size: 13px; margin-top: 4px; }
.career-chev { color: var(--accent-ink); font-family: var(--display); font-size: 26px; line-height: 1; transition: transform .18s ease; }
.career-history[open] .career-chev { transform: rotate(45deg); }
.career-history .experience-list { border-top: 0; }
.career-panel { overflow: hidden; transition: height .32s ease; }

.lower-grid { display: grid; gap: 90px; grid-template-columns: 1.15fr .85fr; margin-top: 100px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tag { border: 1px solid var(--line); border-radius: 100px; color: var(--muted); font-family: var(--mono); font-size: 10px; padding: 8px 12px; }
.principles { border-top: 1px solid var(--line); margin-top: 28px; }
.principle { border-bottom: 1px solid var(--line); padding: 17px 0 19px; }
.principle strong { display: block; font-family: var(--display); font-size: 20px; font-weight: 500; letter-spacing: -.04em; line-height: 1.1; }
.principle p { color: var(--muted); font-size: 13px; margin: 8px 0 0; max-width: 510px; }
.details-list { border-top: 1px solid var(--line); margin: 22px 0 0; }
.detail { border-bottom: 1px solid var(--line); display: grid; gap: 20px; grid-template-columns: 100px 1fr; padding: 17px 0; }
.detail-label { color: var(--accent-ink); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.detail p { font-size: 13px; margin: 0; }
.community { color: var(--muted); font-size: 13px; margin: 22px 0 0; max-width: 600px; }

/* Contact page. */
.contact-grid { display: grid; gap: 70px; grid-template-columns: .8fr 1.2fr; }
.contact-form { display: grid; gap: 16px; }
.form-field { display: grid; gap: 7px; }
.form-field label { color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.visually-hidden { border: 0; clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; white-space: nowrap; width: 1px; }
.form-field textarea::placeholder { color: var(--muted); line-height: 1.5; opacity: 1; }
.form-field input, .form-field textarea { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; color: var(--ink); font: inherit; font-size: 16px; padding: 13px 14px; width: 100%; }
.form-field textarea { min-height: 150px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus { border-color: var(--accent); outline: 2px solid color-mix(in srgb, var(--accent) 25%, transparent); outline-offset: 1px; }
body[data-style="atelier"][data-theme="dark"] .form-field input,
body[data-style="atelier"][data-theme="dark"] .form-field textarea {
  background: #2c3931; border-color: rgba(237, 240, 232, .34); color: #edf0e8; }
body[data-style="atelier"][data-theme="dark"] .form-field input:focus,
body[data-style="atelier"][data-theme="dark"] .form-field textarea:focus { border-color: var(--accent); }
.contact-form .button { justify-self: start; }

@media (min-width: 1281px) {
  .lower-grid { grid-template-columns: 1fr .42fr; }
  .tag-cloud { gap: 6px; max-width: none; }
  .tag { font-size: 9px; padding: 7px 9px; }
}

.footer { background: var(--ink); color: var(--bg); padding: 54px 32px 24px; }
.footer-inner { margin: 0 auto; max-width: 1240px; }
.footer h2 { font-family: var(--display); font-size: clamp(42px, 7vw, 92px); font-weight: 500; letter-spacing: -.07em; line-height: .92; margin: 0 0 42px; max-width: 700px; overflow-wrap: break-word; }
.footer-intro { color: #fff; font-size: 17px; margin: -18px 0 32px; max-width: 560px; }
.footer h2 em { color: var(--accent); font-style: normal; }
.footer-cta { color: inherit; display: block; text-decoration: none; }
.footer-cta .cta-icon { display: inline-block; font-size: .42em; line-height: 1; margin-left: .14em; vertical-align: middle; transform: translateY(-.22em); transition: transform .25s var(--ease); }
.footer-cta:focus-visible .cta-icon { transform: translate(6px, -.22em); }
.footer-links { display: none; }
.footer-bottom { align-items: end; border-top: 1px solid rgba(244, 240, 232, .18); color: rgba(244, 240, 232, .55); display: grid; font-family: var(--mono); font-size: 9px; font-weight: 400; gap: 12px 20px; grid-template-areas: "identity credit" "source privacy"; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); line-height: 2; padding-top: 18px; text-transform: uppercase; }
.footer-bottom > span { min-width: 0; }
.footer-bottom > span:first-child { grid-area: identity; }
.footer-bottom > span:nth-child(2) { grid-area: source; }
.footer-bottom > span:nth-child(3) { grid-area: privacy; text-align: right; }
.footer-bottom > span:last-child { grid-area: credit; text-align: right; }
.footer-bottom a { align-items: center; display: inline-flex; font: inherit; letter-spacing: inherit; }
.github-link { align-items: center; display: inline-flex; gap: 7px; }
.github-icon { display: block; fill: currentColor; height: 15px; width: 15px; }
body[data-style="atelier"] .footer .section-kicker { color: #fff; }
body[data-style="atelier"] .footer-bottom { border-top-color: rgba(255, 255, 255, .3); color: #fff; }

/* Option 02 - midnight product system */
body[data-style="systems"] {
  --bg: #10131a;
  --surface: #171b24;
  --surface-strong: #1d2330;
  --ink: #edf1ed;
  --muted: #929ba8;
  --line: rgba(237, 241, 237, .15);
  --accent: #c5f36b;
  --accent-2: #78b6ff;
  --display: "Space Grotesk", Arial, sans-serif;
  --body: "DM Sans", "DM Sans FB", Arial, sans-serif;
  --radius: 8px;
  --shadow: none;
}
body[data-style="systems"] .hero { padding-top: 72px; }
body[data-style="systems"] .hero h1 { font-size: clamp(52px, 8vw, 112px); font-weight: 600; letter-spacing: -.085em; max-width: 850px; }
body[data-style="systems"] .hero h1 em { color: var(--accent); }
body[data-style="systems"] .hero-intro { font-size: 18px; max-width: 585px; }
body[data-style="systems"] .case-heading h2 { font-family: var(--display); }
body[data-style="systems"] .portrait { filter: grayscale(1) contrast(1.12); }
body[data-style="systems"] .role { padding: 30px 0; }
body[data-style="systems"] .role-title { font-family: var(--display); font-size: 20px; }
body[data-style="systems"] .role-highlights li { border-left-color: var(--accent); }
body[data-style="systems"] .tag { border-radius: 5px; }
body[data-style="systems"] .footer { background: var(--accent); color: #10131a; }
body[data-style="systems"] .footer h2 em { color: #547d23; }
body[data-style="systems"] .footer-bottom { border-color: rgba(16, 19, 26, .22); color: rgba(16, 19, 26, .6); }

/* Option 03 - warm, restrained portfolio */
body[data-style="atelier"] {
  --accent-ink: #9a4527;
  --bg: #eee9e2;
  --surface: #f7f4ef;
  --surface-strong: #e2d9d0;
  --ink: #28332c;
  --muted: #5a6057;
  --line: rgba(40, 51, 44, .17);
  --accent: #b45e3f;
  --accent-2: #9cae6c;
  --display: "DM Sans", "DM Sans FB", Arial, sans-serif;
  --body: "DM Sans", "DM Sans FB", Arial, sans-serif;
  --mono: "DM Mono", monospace;
  --radius: 4px;
}
body[data-style="atelier"][data-theme="dark"] {
  --phone-ring: #f09a7c;
  --phone-glow: rgba(240, 154, 124, .45);
  --accent-ink: #e0805f;
  --bg: #18211d;
  --surface: #212b25;
  --surface-strong: #29362e;
  --ink: #edf0e8;
  --muted: #a1aaa0;
  --line: rgba(237, 240, 232, .17);
  --accent: #e0805f;
  --accent-2: #bdcf80;
  --shadow: none;
}
body[data-style="atelier"] .site-nav { padding-top: 36px; }
body[data-style="atelier"] .wordmark { font-size: 17px; font-weight: 500; letter-spacing: -.055em; }
body[data-style="atelier"] .wordmark span { font-weight: 700; }
body[data-style="atelier"] .hero { padding-top: 44px; }
body[data-style="atelier"] .hero h1 { font-family: var(--body); font-size: clamp(52px, 8vw, 104px); font-weight: 400; letter-spacing: -.085em; line-height: .91; }
body[data-style="atelier"] .hero h1 em { font-weight: 600; }
body[data-style="atelier"] .hero-intro { font-size: 19px; max-width: 620px; }
body[data-style="atelier"] .portrait { filter: sepia(.16) saturate(.7); }
body[data-style="atelier"] .section-heading h2, body[data-style="atelier"] .footer h2, body[data-style="atelier"] .page-hero h1 { font-weight: 400; }
body[data-style="atelier"] .role { gap: 70px; grid-template-columns: 160px 1fr; }
body[data-style="atelier"] .role-highlights { grid-template-columns: 1fr; }
body[data-style="atelier"] .role-highlights li { border-left: 0; border-top: 1px solid var(--line); padding: 11px 0 0; }
body[data-style="atelier"] .footer { background: var(--accent); }
body[data-style="atelier"] .footer h2 em { color: #f7f4ef; }
body[data-style="atelier"][data-theme="dark"] .footer { background: var(--accent); color: #f7f4ef; }
body[data-style="atelier"][data-theme="dark"] .footer h2 em { color: #f7f4ef; }
body[data-style="atelier"][data-theme="dark"] .footer .section-kicker { color: #101711; }
body[data-style="atelier"][data-theme="dark"] .footer-bottom { border-color: rgba(16, 23, 17, .3); color: #101711; }
body[data-style="atelier"][data-theme="dark"] .footer h2, body[data-style="atelier"][data-theme="dark"] .footer h2 em { color: #101711; }
body[data-style="atelier"][data-theme="dark"] .footer-intro { color: #101711; }
body[data-style="atelier"][data-theme="dark"] .button-primary { color: #101711; }
body[data-style="atelier"][data-theme="dark"] .credstrip { background: #101711; }

@media (max-width: 960px) {
  /* Exploration (Nick, 27 October 2026): show the capture matching the
     visitor's own device. On small screens the phone capture stands alone,
     large and readable, instead of crowding both captures together; desktop
     widths show only the framed desktop capture. */
  /* No redundant panel around the solo phone. A 5:9 top crop keeps the
     capture readable without making each project a screen and a half long. */
  .shot { background: transparent; border: 0; box-shadow: none; overflow: visible; }
  .shotbar, .shot-desk, .shotlay-desk { display: none; }
  .shot:not(:has(noscript .shot-img)) .shot-template:first-of-type { display: none; }
  .shot-mob, .shotlay-mob { display: block; position: static; height: auto; aspect-ratio: 5 / 9; object-fit: cover; object-position: center top; width: min(85%, 300px); margin: 0 auto; border: solid #0b0d10; border-width: 22px 8px 8px; box-sizing: border-box; border-radius: 36px; outline: 3px solid var(--phone-ring); outline-offset: 0; box-shadow: 0 0 34px var(--phone-glow); }
  /* Reserve the phone block before its template is activated, so activation
     does not shift the thumbnails and copy below. */
  .shot:not(:has(noscript .shot-img)) .shot-template:last-of-type { display: block; aspect-ratio: 5 / 9; width: min(85%, 300px); margin: 0 auto; }
  .site-nav { padding: 22px 20px; }
  .hero-grid { gap: 28px; }
  .hero-grid .portrait-wrap { width: 190px; }
  .nav-links { gap: 13px; }
  .hero { padding: 60px 20px 40px; }
  .hero h1 { font-size: clamp(54px, 15vw, 88px); margin: 20px 0 26px; }
  .hero-intro { font-size: 17px; }
  .page-hero { padding: 60px 20px 10px; }
  .showcase { padding: 10px 20px; }
  .case { display: flex; flex-direction: column; gap: 20px; padding: 32px 0; }
  .case-heading, .case-copy, .case-shot { align-self: stretch; }
  .content { padding: 48px 20px 60px; }
  .section-heading { margin-bottom: 30px; }
  .section-heading h2 { margin-bottom: 14px; }
  .role { display: block; padding: 27px 0 32px; }
  .role-meta { margin-bottom: 22px; }
  .role-title { font-size: 19px; }
  .role-highlights { grid-template-columns: 1fr; }
  .lower-grid { display: block; margin-top: 72px; }
  .lower-grid > section + section { margin-top: 65px; }
  .contact-grid { display: block; }
  .footer { padding: 60px 20px 24px; }
  .credstrip { width: calc(100% - 40px); }
  body[data-style="atelier"] .role { display: block; }
}

/* Only an explicit development-preview choice creates a fixed phone frame.
   Public layouts remain fluid, including tablet and small-laptop widths. */
body[data-preview="true"] { background: #d8d2c8; }
body[data-preview="true"] .site-shell { background: var(--bg); box-shadow: 0 0 45px rgba(24, 33, 31, .16); margin: 0 auto; max-width: 430px; }
body[data-mobile="true"] .site-nav { padding: 22px 20px 14px; }
body[data-mobile="true"] .nav-links { gap: 13px; }
body[data-mobile="true"] .nav-links a:not(.nav-contact) { display: none; }
body[data-mobile="true"] .nav-contact { align-items: center; display: inline-flex; gap: 7px; }
/* Mobile page tabs: plain text on one row with the active page underlined. The row scrolls sideways when more pages are added, so the header never grows taller. */
body[data-mobile="true"] .nav-chips { border-bottom: 1px solid var(--line); display: flex; flex-wrap: nowrap; gap: 24px; margin: 0 20px 18px; overflow-x: auto; padding: 0; scrollbar-width: none; }
body[data-mobile="true"] .nav-chips::-webkit-scrollbar { display: none; }
/* The tab row stays pinned while the page scrolls, so switching page never needs a scroll back to the top. The shell clips (not hides) its overflow on phones, because overflow hidden would stop sticky from working. */
body[data-mobile="true"] .site-shell { overflow: clip; }
body[data-mobile="true"] .nav-chips { background: var(--bg); box-shadow: -20px 0 0 var(--bg), 20px 0 0 var(--bg); position: sticky; top: 0; z-index: 8; }
body[data-mobile="true"] .contact-form { scroll-margin-top: 56px; }
body[data-mobile="true"] .nav-chips a { align-items: center; border-bottom: 2px solid transparent; color: var(--muted); display: flex; flex: 0 0 auto; font-size: 14px; line-height: 20px; margin-bottom: -1px; min-height: 48px; padding: 0; white-space: nowrap; }
body[data-mobile="true"] .nav-chips a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--ink); font-weight: 600; }
body[data-mobile="true"] .hero { padding: 24px 20px 30px; }
body[data-mobile="true"] .hero h1 { font-size: clamp(38px, 11cqi, 48px); letter-spacing: -.065em; line-height: .98; margin: 14px 0 22px; }
/* Leave the first headline line full-width, then wrap the rest around the
   portrait. WebKit ignores shape-outside and excludes a float's whole margin
   box, so a top margin on the float itself would shorten every headline line.
   Instead an in-flow spacer drops the float's static position by 72px (below
   "Websites that", the only line wider than the beside-float measure at
   320px) and the negative margin pulls the text back up over the spacer.
   Plain CSS2.1 float behaviour in every engine. */
body[data-mobile="true"] .hero-grid { display: flow-root; }
body[data-mobile="true"] .hero-grid::before { content: ""; display: block; height: 72px; }
body[data-mobile="true"] .hero-grid .hero-text { margin-top: -72px; }
body[data-mobile="true"] .hero-grid .portrait-wrap { float: right; margin: 0 0 12px 14px; width: clamp(88px, 28cqi, 130px); }
body[data-mobile="true"] .hero-intro { font-size: 17px; }
body[data-mobile="true"] .hero-actions { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); margin-top: 26px; }
body[data-mobile="true"] .hero-actions .button { min-width: 0; width: 100%; }
body[data-mobile="true"] .page-hero { padding: 24px 20px 8px; }
body[data-mobile="true"] .page-hero h1 { font-size: 44px; margin: 12px 0 14px; }
body[data-mobile="true"] .showcase { padding: 0 20px; }
body[data-mobile="true"] .case { display: flex; flex-direction: column; gap: 18px; padding: 24px 0 28px; }
body[data-mobile="true"] .case-heading, body[data-mobile="true"] .case-copy, body[data-mobile="true"] .case-shot { align-self: stretch; }
body[data-mobile="true"] .shot { border-radius: 12px; }
body[data-mobile="true"] .shotbar { padding: 8px 10px; }
body[data-mobile="true"] .shotbar .t { font-size: 9.5px; max-width: 170px; }
body[data-mobile="true"] .shotbar .pill { font-size: 8.5px; letter-spacing: .1em; padding: 2px 7px; }
body[data-mobile="true"] .shot-mob, body[data-mobile="true"] .shotlay-mob { border-radius: 8px; }
  body[data-mobile="true"] .shot-mob, body[data-mobile="true"] .shotlay-mob { border-radius: 36px; } /* Solo presentation: full device corner. */
/* The desktop mobile preview mirrors the small-screen presentation: the
   phone capture stands alone there too. */
body[data-mobile="true"] .shot { background: transparent; border: 0; box-shadow: none; overflow: visible; }
body[data-mobile="true"] .shotbar, body[data-mobile="true"] .shot-desk, body[data-mobile="true"] .shotlay-desk { display: none; }
body[data-mobile="true"] .shot:not(:has(noscript .shot-img)) .shot-template:first-of-type { display: none; }
body[data-mobile="true"] .shot-mob, body[data-mobile="true"] .shotlay-mob { display: block; position: static; height: auto; aspect-ratio: 5 / 9; object-fit: cover; object-position: center top; width: min(85%, 300px); margin: 0 auto; border: solid #0b0d10; border-width: 22px 8px 8px; box-sizing: border-box; border-radius: 36px; outline: 3px solid var(--phone-ring); outline-offset: 0; box-shadow: 0 0 34px var(--phone-glow); }
body[data-mobile="true"] .shot:not(:has(noscript .shot-img)) .shot-template:last-of-type { display: block; aspect-ratio: 5 / 9; width: min(85%, 300px); margin: 0 auto; }
body[data-mobile="true"] .thumb { padding: 10px 8px; }
body[data-mobile="true"] .case-heading h2 { font-size: 26px; margin: 8px 0 0; }
body[data-mobile="true"] .case-copy p { font-size: 16px; line-height: 1.55; margin-top: 0; }
body[data-mobile="true"] .case-copy .button { display: flex; margin: 18px 0 0; }
body[data-mobile="true"] .credstrip { align-items: flex-start; border-radius: 12px; flex-direction: column; gap: 10px; margin: 22px 20px 40px; padding: 18px; width: calc(100% - 40px); }
body[data-mobile="true"] .credstrip .l { font-size: 13px; }
body[data-mobile="true"] .credstrip .l b { font-size: 15px; }
body[data-mobile="true"] .credstrip .r { font-size: 11px; }
body[data-mobile="true"] .content { padding: 28px 20px 54px; }
body[data-mobile="true"] .section-heading { margin-bottom: 24px; }
body[data-mobile="true"] .section-heading h2 { margin-bottom: 14px; }
body[data-mobile="true"] .role { display: block; padding: 27px 0 32px; }
body[data-mobile="true"] .role-meta { margin-bottom: 22px; }
body[data-mobile="true"] .role-title { font-size: 19px; }
body[data-mobile="true"] .role-highlights { grid-template-columns: 1fr; }
body[data-mobile="true"] .lower-grid { display: block; margin-top: 28px; }
body[data-mobile="true"] .lower-grid > section + section { margin-top: 36px; }
body[data-mobile="true"] .contact-grid { display: block; }
body[data-mobile="true"] .footer { padding: 28px 20px 18px; }
body[data-mobile="true"] .footer h2 { font-size: 48px; line-height: .95; margin-bottom: 18px; }
body[data-mobile="true"] .footer-intro { font-size: 16px; margin: 0 0 28px; }
body[data-mobile="true"] .footer-bottom { grid-template-areas: "source privacy"; grid-template-columns: minmax(0, 1fr) auto; }
body[data-mobile="true"] .footer-bottom > span:first-child,
body[data-mobile="true"] .footer-bottom > span:last-child { display: none; }
body[data-mobile="true"][data-style="atelier"] .role { display: block; }
@media (max-width: 430px) {
  body[data-preview="true"] { background: var(--bg); }
  body[data-preview="true"] .site-shell { box-shadow: none; max-width: none; }
}

/* Enlarged text: rem thresholds follow the browser's text scaling, so these
   only apply when the user has genuinely enlarged their text. Keep the
   headline, buttons, chips and thumbnails readable instead of crushed. */
@media (max-width: 15rem) {
  .hero h1, body[data-mobile="true"] .hero h1 { font-size: min(3.5rem, 13vw); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-grid .portrait-wrap { grid-column: 1; grid-row: 2; }
  .hero-grid .portrait-wrap { width: 160px; }
  /* Genuine enlarged text: undo the mobile float wrap and stack the portrait
     below the headline, as the grid placement above intends. */
  body[data-mobile="true"] .hero-grid { display: grid; }
  body[data-mobile="true"] .hero-grid::before { content: none; }
  body[data-mobile="true"] .hero-grid .hero-text { margin-top: 0; }
  body[data-mobile="true"] .hero-grid .portrait-wrap { float: none; margin: 0; width: 160px; }
  .page-hero h1, body[data-mobile="true"] .page-hero h1 { font-size: min(2.8rem, 12vw); }
  .footer h2, body[data-mobile="true"] .footer h2 { font-size: min(2.8rem, 12vw); }
  .button { height: auto; min-height: 58px; }
  .shotbar { flex-wrap: wrap; }
  .shotbar .pill { max-width: 100%; }
  .thumbs { flex-wrap: wrap; }
  .thumb { flex: 1 1 40%; }
  .credstrip { align-items: flex-start; flex-direction: column; }
  .hero-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .hero-actions .button { min-width: 0; width: 100%; }
}

/* Keep the page-name track continuous on narrow phones, including four Sam views. */
@media (max-width: 400px) {
  .thumbs { flex-wrap: nowrap; }
  .thumb { flex: 1 1 auto; min-width: 0; padding-inline: 3px; }
  .thumb span { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

.contact-form { max-width: 640px; }
body[data-mobile="true"] .contact-form { max-width: none; }

.wordmark { white-space: nowrap; }

/* Consent controls use the site themes and equal-weight choices.
   Both choices have equal visual weight and remain reachable at enlarged text. */
.cookie-banner[hidden] { display: none; }
.cookie-banner { background: var(--surface); color: var(--ink); border-top: 1px solid var(--line); padding: 14px max(20px, calc((100vw - 1176px) / 2)); }
.cookie-banner h2 { font: 600 18px/1.3 var(--body); margin: 0 0 6px; }
.cookie-banner p { font-size: 14px; line-height: 1.45; max-width: 65ch; margin: 0 0 10px; overflow-wrap: anywhere; }
.cookie-banner a, .privacy-details a { text-decoration: underline; text-underline-offset: .2em; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-actions .button { background: var(--surface-strong); color: var(--ink); border: 1px solid var(--line); height: auto; min-height: 44px; min-width: 0; padding: 10px 14px; white-space: normal; text-align: center; max-width: 100%; font-size: 14px; overflow-wrap: anywhere; }
.cookie-actions .button:focus-visible, [data-cookie-preferences]:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.privacy-details { max-width: 760px; margin: 0 auto; padding: 0 32px 64px; overflow-wrap: anywhere; font-size: 16px; }
.privacy-details h2 { font: 600 24px/1.3 var(--body); margin: 32px 0 16px; }
.privacy-details [data-cookie-preferences] { white-space: normal; max-width: 100%; height: auto; min-height: 48px; }
/* Keep first-visit consent visible without shifting the portfolio content. */
.cookie-banner { position: fixed; z-index: 20; inset: auto 0 0; max-height: 70vh; overflow-y: auto; box-shadow: var(--shadow); }
body[data-theme] .cookie-actions .button { background: var(--surface-strong); color: var(--ink); border-color: var(--line); }

/* Native buttons need explicit theme colours, including preference reopening. */
body[data-theme] .privacy-details [data-cookie-preferences] { background: var(--surface-strong); color: var(--ink); border-color: var(--line); }

@media (max-width: 600px) { .cookie-actions .button { flex: 1 1 0; } }
@media (min-width: 601px) {
  .cookie-banner { inset: auto 24px 24px auto; width: 420px; max-width: calc(100vw - 48px); padding: 18px; border: 1px solid var(--line); border-radius: 16px; }
  .cookie-actions .button { flex: 1 1 0; }
}

/* The phone-layout preview control is useful only above the phone breakpoint. */
@media (max-width: 600px) { .mobile-toggle { display: none; } }

/* Failed consent saves remain visible after the choice panel closes. */
.cookie-save-warning { position: relative; margin: 0; padding: 12px 20px; background: var(--bg); color: var(--ink); border-bottom: 1px solid var(--line); font-size: 14px; }

/* Viewport-specific examples never enter the desktop keyboard order. */
.thumb[hidden] { display: none !important; }

/* Phone frame (Nick, 29 October 2026): the dark bezel vanished against the dark
   theme, so the device carries a coral ring and a speaker slot in the bezel. */
@media (max-width: 960px) {
  .shot::before { content: ""; position: absolute; z-index: 2; left: 50%; top: 8px; transform: translateX(-50%); width: 54px; height: 7px; border-radius: 99px; background: #2a2f36; pointer-events: none; }
}
body[data-mobile="true"] .shot::before { content: ""; position: absolute; z-index: 2; left: 50%; top: 8px; transform: translateX(-50%); width: 54px; height: 7px; border-radius: 99px; background: #2a2f36; pointer-events: none; }

/* A newly visible form factor waits for its own capture, never a wrong or
   undecoded frame. Visibility preserves the screenshot geometry. */
.capture-loading .shot { visibility: hidden; }
.capture-loading .shot-stage::after { content: "Loading screenshot..."; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.capture-loading[data-capture-error="true"] .shot-stage::after { content: "Screenshot unavailable. Try the live site below."; }
