:root {
  color-scheme: dark;
  --bg: #11100e;
  --surface: #191815;
  --surface-2: #22201c;
  --line: #37332d;
  --text: #ede9e1;
  --muted: #a39e92;
  --accent: #e8683f;
  --accent-ink: #11100e;
  --max: 1200px;
  --gutter: 24px;
  --radius: 6px;
  --display: "Bricolage Grotesque", "Arial", sans-serif;
  --body: "Hanken Grotesk", "Arial", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f2eb;
  --surface: #ebe7dd;
  --surface-2: #e0dbcf;
  --line: #cfc9ba;
  --text: #1a1814;
  --muted: #5e584e;
  --accent: #c4421a;
  --accent-ink: #fffaf3;
}
@media (prefers-color-scheme: light) {
  html[data-theme="system"] {
    color-scheme: light;
    --bg: #f5f2eb;
    --surface: #ebe7dd;
    --surface-2: #e0dbcf;
    --line: #cfc9ba;
    --text: #1a1814;
    --muted: #5e584e;
    --accent: #c4421a;
    --accent-ink: #fffaf3;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 18px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
body, button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
button, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.shell { width: min(var(--max), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; background: var(--text); color: var(--bg); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid transparent; transition: background .25s ease, border-color .25s ease; }
.site-header.is-scrolled { background: color-mix(in srgb, var(--bg) 90%, transparent); border-color: var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header.is-scrolled { background: var(--bg); }
}
.nav { min-height: 78px; display: flex; align-items: center; gap: 28px; }
.wordmark { display: inline-flex; align-items: baseline; white-space: nowrap; font-family: var(--display); font-weight: 700; font-size: 23px; letter-spacing: -.055em; }
.wordmark-period { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 30px); margin-left: auto; }
.nav-links a, .theme-toggle { font-size: 15px; color: var(--muted); transition: color .18s ease; }
.nav-links a:hover, .theme-toggle:hover { color: var(--text); }
.nav-links a span { color: var(--accent); }
.theme-toggle { min-height: 44px; padding: 8px 0 8px 10px; border: 0; background: transparent; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.theme-glyph { font-size: 20px; color: var(--accent); }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; align-items: center; justify-content: center; flex-direction: column; gap: 5px; cursor: pointer; }
.menu-toggle span { width: 17px; height: 1px; background: var(--text); }
.kicker, .project-meta, .stack-line, .media-corner, .image-caption, .project-table thead, .principles > div > span, .site-footer > p {
  font-family: var(--mono); font-size: 14px; line-height: 1.5; letter-spacing: .015em;
}
.kicker { margin: 0 0 20px; color: var(--muted); text-transform: uppercase; }
.hero { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(340px, .82fr); align-items: center; gap: clamp(40px, 7vw, 100px); padding-top: clamp(66px, 9vw, 124px); padding-bottom: clamp(86px, 11vw, 150px); }
.hero-copy { max-width: 720px; }
.hero h1 { max-width: 800px; margin: 0; font-family: var(--display); font-size: clamp(2.75rem, 6.4vw, 6rem); line-height: 1.02; letter-spacing: -.055em; font-weight: 600; }
.hero h1 span { color: inherit; }
.hero-intro { max-width: 620px; margin: 28px 0 0; color: var(--muted); font-size: clamp(18px, 1.6vw, 21px); line-height: 1.58; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 18px 26px; margin-top: 32px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 14px; padding: 11px 17px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 16px; font-weight: 600; cursor: pointer; transition: transform .2s var(--ease), background .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(1px); }
.button-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.button-primary:hover { background: transparent; color: var(--accent); }
.button-secondary { background: transparent; }
.button-secondary:hover { border-color: var(--accent); }
.text-link { display: inline-flex; gap: 8px; align-items: center; color: var(--text); font-size: 16px; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px; transition: text-decoration-color .2s ease; }
.text-link:hover { text-decoration-color: var(--accent); }
.now-line { display: flex; gap: 12px; align-items: flex-start; max-width: 590px; margin: 38px 0 0; color: var(--muted); font-size: 15px; }
.now-line strong { color: var(--text); font-weight: 600; }
.now-marker { flex: 0 0 8px; height: 8px; margin-top: 9px; border-radius: 50%; background: var(--accent); }
.hero-art { min-width: 0; margin: 0; }
.hero-art-link { position: relative; display: block; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.hero-art-link img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; object-position: center; background: var(--surface); }
.image-caption { display: flex; justify-content: space-between; gap: 16px; padding: 13px 15px; background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); }
.image-caption span:last-child { color: var(--text); }
.hero-art figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; }
.section { padding-top: clamp(68px, 9vw, 120px); padding-bottom: clamp(68px, 9vw, 120px); }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 390px); align-items: end; gap: 32px; margin-bottom: 52px; }
.section-heading .kicker { margin-bottom: 12px; }
.section-heading h2, .contact-inner h2 { margin: 0; font-family: var(--display); font-size: clamp(2.1rem, 4.2vw, 4rem); line-height: 1.05; letter-spacing: -.045em; font-weight: 600; }
.section-intro { max-width: 400px; margin: 0; color: var(--muted); }
.featured-list { border-top: 1px solid var(--line); }
.featured-project { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); gap: clamp(28px, 5.5vw, 76px); align-items: center; padding: 36px 0; border-bottom: 1px solid var(--line); }
.featured-project.featured-reverse .project-media { order: 2; }
.featured-project.featured-reverse .project-copy { order: 1; }
.project-media { display: block; position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.project-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; object-position: center; background: var(--surface); transition: transform .5s var(--ease); }
.project-media:hover img { transform: scale(1.015); }
.media-corner { position: absolute; right: 12px; bottom: 12px; padding: 5px 9px; background: var(--bg); color: var(--text); border: 1px solid var(--line); }
.project-copy { padding: 12px 0; }
.project-meta { color: var(--muted); text-transform: uppercase; margin: 0 0 12px; }
.project-copy h3 { font-family: var(--display); font-size: clamp(1.8rem, 3vw, 2.65rem); line-height: 1.1; letter-spacing: -.04em; margin: 0 0 17px; font-weight: 600; }
.project-copy h3 a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 5px; transition: text-decoration-color .2s ease; }
.project-copy h3 a:hover { text-decoration-color: var(--accent); }
.project-copy h3 a span { color: var(--accent); font-family: var(--body); font-size: .62em; vertical-align: .12em; }
.project-copy > p:not(.project-meta) { color: var(--muted); margin: 0 0 16px; }
.project-copy .project-result { padding-left: 14px; border-left: 2px solid var(--line); font-size: 16px; }
.project-result strong { color: var(--text); }
.stack-line { display: flex; flex-wrap: wrap; gap: 8px 16px; list-style: none; padding: 0; margin: 20px 0 0; color: var(--muted); }
.stack-line li + li::before { content: "/"; color: var(--line); margin-right: 16px; }
.project-actions { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 23px; }
.project-actions a { font-size: 15px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px; }
.project-actions a:hover { text-decoration-color: var(--accent); }
.image-failed { min-height: 190px; display: grid; place-items: center; }
.image-failed img { display: none; }
.image-failed::after { content: "Preview unavailable · open the live project"; display: block; padding: 24px; color: var(--muted); font-size: 15px; text-align: center; }
.hero-art-link.image-failed { min-height: 360px; }
.index-section { padding: clamp(68px, 9vw, 120px) 0; background: var(--surface); border-block: 1px solid var(--line); }
.project-table-wrap { overflow-x: auto; }
.project-table { width: 100%; border-collapse: collapse; text-align: left; }
.project-table thead { color: var(--muted); text-transform: uppercase; }
.project-table th, .project-table td { padding: 18px 16px 18px 0; vertical-align: top; border-bottom: 1px solid var(--line); }
.project-table tbody th { min-width: 190px; font-size: 17px; font-weight: 600; }
.project-table tbody td { color: var(--muted); font-size: 16px; min-width: 150px; }
.project-table tbody td:nth-child(2) { min-width: 280px; }
.project-table a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; }
.project-table a:hover { text-decoration-color: var(--accent); }
.index-status { color: var(--text); white-space: nowrap; }
.hover-preview { display: none; }
.about-section .section-heading { grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); align-items: start; }
.about-section .section-heading h2 { max-width: 540px; }
.about-copy p { margin: 0 0 18px; color: var(--muted); }
.about-copy .about-note { color: var(--text); }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.principles > div { display: grid; grid-template-columns: 34px 1fr; gap: 12px; }
.principles > div > span { color: var(--accent); }
.principles p { margin: 0; color: var(--muted); font-size: 16px; }
.principles strong { color: var(--text); font-weight: 600; }
.contact-section { border-top: 1px solid var(--line); padding: clamp(70px, 10vw, 132px) 0; }
.contact-inner { max-width: var(--max); }
.contact-inner h2 { font-size: clamp(2.5rem, 6vw, 5.5rem); }
.contact-inner h2 span { color: var(--muted); }
.contact-copy { max-width: 560px; color: var(--muted); margin: 24px 0 0; }
.copy-feedback { min-height: 24px; margin: 10px 0 0; color: var(--accent); font-size: 15px; }
.site-footer { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); }
.site-footer .wordmark { font-size: 20px; }
.site-footer > p { color: var(--muted); margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--muted); font-size: 15px; }
.footer-links a:hover { color: var(--text); }
.site-footer > a:last-child { color: var(--muted); font-size: 15px; }
.site-footer > a:last-child:hover { color: var(--text); }
@media (min-width: 1000px) and (hover: hover) and (pointer: fine) {
  .project-table tbody tr { transition: background .15s ease; }
  .project-table tbody tr:hover { background: color-mix(in srgb, var(--bg) 28%, transparent); }
  .hover-preview { position: fixed; z-index: 30; top: 0; left: 0; display: block; width: 250px; pointer-events: none; opacity: 0; transform: translate(18px, 18px) scale(.98); transition: opacity .15s ease, transform .15s ease; background: var(--bg); border: 1px solid var(--line); padding: 7px; }
  .hover-preview.is-visible { opacity: 1; transform: translate(18px, 18px) scale(1); }
  .hover-preview img { width: 100%; aspect-ratio: 7 / 5; object-fit: contain; background: var(--surface); }
  .hover-preview span { display: block; padding: 7px 2px 2px; font: 14px var(--mono); color: var(--muted); }
}
@media (max-width: 900px) {
  :root { --gutter: 24px; }
  .nav { gap: 18px; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 14px; }
  .theme-label { display: none; }
  .hero { grid-template-columns: minmax(0, 1.05fr) minmax(270px, .95fr); gap: 34px; }
  .hero h1 { font-size: clamp(2.65rem, 6.3vw, 4.7rem); }
  .section-heading { grid-template-columns: 1fr; gap: 18px; }
  .section-intro { max-width: 600px; }
  .project-table tbody td:nth-child(2) { min-width: 230px; }
}
@media (max-width: 680px) {
  :root { --gutter: 18px; }
  body { font-size: 17px; }
  html { scroll-padding-top: 76px; }
  .nav { min-height: 70px; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
  .wordmark { font-size: 21px; }
  .menu-toggle { display: inline-flex; order: 3; }
  .theme-toggle { margin-left: auto; padding: 8px; min-width: 44px; justify-content: center; }
  .nav-links { display: none; order: 4; flex: 0 0 100%; margin: 0; padding: 0 0 18px; align-items: stretch; flex-direction: column; gap: 0; }
  .nav-links.is-open { display: flex; }
  .nav-links a { min-height: 44px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); font-size: 16px; }
  .hero { grid-template-columns: 1fr; padding-top: 62px; padding-bottom: 76px; gap: 36px; }
  .hero h1 { max-width: 600px; font-size: clamp(2.8rem, 12vw, 4.6rem); }
  .hero-intro { margin-top: 22px; }
  .hero-art-link img { aspect-ratio: 4 / 3; }
  .hero-art-link.image-failed { min-height: 260px; }
  .section, .index-section { padding-top: 70px; padding-bottom: 70px; }
  .section-heading { margin-bottom: 32px; }
  .section-heading h2 { font-size: clamp(2.2rem, 10vw, 3.4rem); }
  .featured-project { grid-template-columns: 1fr; gap: 20px; padding: 26px 0; }
  .featured-project.featured-reverse .project-media, .featured-project.featured-reverse .project-copy { order: initial; }
  .project-copy { padding: 0; }
  .project-copy h3 { font-size: 2rem; }
  .project-media img { aspect-ratio: 16 / 10; }
  .project-table { min-width: 760px; }
  .about-section .section-heading { grid-template-columns: 1fr; gap: 24px; }
  .principles { grid-template-columns: 1fr; gap: 20px; }
  .contact-inner h2 { font-size: clamp(2.5rem, 11vw, 4.4rem); }
  .site-footer { padding: 22px 0; min-height: 0; flex-wrap: wrap; gap: 12px 22px; }
  .site-footer > p { order: 3; flex: 0 0 100%; }
  .footer-links { order: 2; gap: 12px; }
}
@media (max-width: 380px) {
  :root { --gutter: 16px; }
  .hero h1 { font-size: 2.65rem; }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .image-caption { flex-direction: column; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Case study pages */
.case-main { padding-bottom: clamp(72px, 10vw, 128px); }
.case-hero { padding-top: clamp(58px, 8vw, 108px); padding-bottom: 42px; }
.case-back { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 28px; color: var(--muted); font-size: 15px; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.case-back:hover { color: var(--text); text-decoration-color: var(--accent); }
.case-hero h1 { max-width: 1000px; margin: 0; font-family: var(--display); font-size: clamp(2.8rem, 7.2vw, 6.2rem); line-height: .99; letter-spacing: -.055em; font-weight: 600; }
.case-hero h1 span { color: inherit; }
.case-lede { max-width: 740px; margin: 24px 0 0; color: var(--muted); font-size: clamp(18px, 2vw, 22px); }
.case-meta { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 30px; padding: 18px 0; border-block: 1px solid var(--line); color: var(--muted); font: 14px/1.5 var(--mono); }
.case-meta strong { color: var(--text); font-weight: 500; }
.case-cover { margin: 32px auto 0; }
.case-cover img { display: block; width: 100%; height: auto; max-height: 660px; aspect-ratio: 16 / 10; object-fit: contain; object-position: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.case-cover figcaption { margin-top: 9px; color: var(--muted); font-size: 14px; }
.case-layout { display: grid; grid-template-columns: 190px minmax(0, 760px); gap: clamp(30px, 7vw, 92px); align-items: start; margin-top: clamp(60px, 8vw, 100px); }
.case-rail { position: sticky; top: 112px; border-left: 1px solid var(--line); padding-left: 17px; }
.case-progress { height: 2px; background: var(--line); margin: 0 0 18px -18px; }
.case-progress span { display: block; width: 0; height: 100%; background: var(--accent); }
.case-rail a { display: block; padding: 7px 0; color: var(--muted); font-size: 14px; text-decoration: none; }
.case-rail a:hover, .case-rail a[aria-current="location"] { color: var(--text); }
.case-rail a[aria-current="location"]::before { content: "↳ "; color: var(--accent); }
.case-content { min-width: 0; }
.case-section { padding: 0 0 44px; margin: 0 0 42px; border-bottom: 1px solid var(--line); scroll-margin-top: 110px; }
.case-section h2 { margin: 0 0 18px; font: 600 clamp(1.7rem, 3.2vw, 2.4rem)/1.1 var(--display); letter-spacing: -.04em; }
.case-section p, .case-section li { color: var(--muted); }
.case-section p { margin: 0 0 16px; }
.case-section strong { color: var(--text); font-weight: 600; }
.case-section ul { padding-left: 22px; margin: 16px 0; }
.case-section li { padding-left: 5px; margin: 8px 0; }
.case-callout { padding: 18px 20px; background: var(--surface); border-left: 2px solid var(--accent); color: var(--text) !important; }
.case-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 26px 0; }
.case-stat { padding: 18px; background: var(--surface); }
.case-stat strong { display: block; font: 600 clamp(1.7rem, 4vw, 2.6rem)/1.1 var(--display); letter-spacing: -.04em; }
.case-stat span { display: block; margin-top: 8px; color: var(--muted); font-size: 15px; }
.case-next { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 28px; }
.case-next a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px; }
.case-next a:hover { text-decoration-color: var(--accent); }
@media (max-width: 760px) {
  .case-layout { grid-template-columns: 1fr; gap: 30px; margin-top: 52px; }
  .case-rail { position: static; display: flex; flex-wrap: wrap; gap: 6px 17px; border-left: 0; border-bottom: 1px solid var(--line); padding: 0 0 14px; }
  .case-progress { flex: 0 0 100%; margin: 0 0 8px; }
  .case-rail a { padding: 4px 0; }
  .case-meta { gap: 10px 18px; }
}
