:root {
  --ink: #2E231C;
  --muted: #6B5E53;
  --paper: #F3F1EB;
  --panel: #E9E6DE;
  --line: #DAD7CD;
  --accent: #1F6FC0;
  --accent-dark: #003049;
  --accent-display: #BC4749;
  --accent-on-dark: #8DBCEB;
  --white: #fff;
  --mono: "DM Mono", ui-monospace, monospace;
  --sans: "Manrope", system-ui, sans-serif;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); }
a { color: inherit; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 10; padding: .75rem 1rem; background: var(--ink); color: white; }
.skip-link:focus { left: 1rem; top: 1rem; }

.site-header, .site-footer { width: min(calc(100% - 3rem), var(--max)); margin: auto; }
.site-header { min-height: 92px; display: flex; align-items: center; gap: 3rem; border-bottom: 1px solid var(--line); }
.wordmark { margin-right: auto; font-size: 1.35rem; font-weight: 700; text-decoration: none; letter-spacing: -.06em; }
.wordmark span { color: var(--accent-display); }
.site-header nav { flex: 0 1 auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem 2rem; }
/* Left-aligned so overflow spills right, where scrollWidth can measure it; the wordmark's auto margin still pushes the nav right. */
.site-header.js-nav nav { flex-wrap: nowrap; justify-content: flex-start; min-width: 0; overflow: hidden; }
.site-header nav a { flex: none; white-space: nowrap; }
.nav-more { position: relative; flex: none; margin-left: -1.5rem; }
.nav-more button { display: inline-flex; align-items: center; gap: .3rem; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; }
.nav-more-menu { display: none; position: absolute; z-index: 10; top: calc(100% + .9rem); right: 0; min-width: 10rem; flex-direction: column; padding: .3rem 0; border: 1px solid var(--line); background: var(--paper); }
.nav-more.open .nav-more-menu { display: flex; }
.nav-more-menu a { padding: .65rem 1rem; font-size: .9rem; font-weight: 600; text-decoration: none; }
.nav-more-menu a:hover { color: var(--accent-dark); background: var(--panel); }
.site-header nav a, .header-link { font-size: .84rem; font-weight: 600; text-decoration: none; }
.header-links { display: flex; gap: 1.5rem; }
.header-links { gap: 1.1rem; }
.header-link { display: inline-flex; align-items: center; }
.header-link-label { display: none; }
.site-header nav a:hover, .header-link:hover { color: var(--accent-dark); }

.hero, .section { width: min(calc(100% - 3rem), var(--max)); margin: auto; }
.hero { min-height: 700px; padding: 8rem 0 4rem; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 72px 72px; background-position: right top; }
.eyebrow, .kicker, .project-meta { font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; padding: .5rem .7rem; background: var(--paper); border: 1px solid var(--line); }
.status-dot { width: .48rem; height: .48rem; border-radius: 50%; background: #2f8a61; box-shadow: 0 0 0 4px rgb(47 138 97 / 13%); }
.hero h1 { max-width: 900px; margin: 2rem 0 1.5rem; font-size: clamp(3.5rem, 7.4vw, 6.7rem); line-height: .98; letter-spacing: -.07em; }
.hero h1 em { color: var(--accent-display); font-style: normal; }
.hero-copy { max-width: 700px; margin: 0; color: var(--muted); font-size: clamp(1.08rem, 1.8vw, 1.35rem); line-height: 1.7; }
.hero-copy strong { color: var(--ink); font-weight: 700; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 2.3rem 0 1.4rem; }
.hero-latest { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .7rem; margin: 0 0 3.1rem; color: var(--ink); font-weight: 600; text-decoration: none; line-height: 1.4; }
.hero-latest span { color: var(--muted); font-family: var(--mono); font-size: .72rem; font-weight: 400; text-transform: uppercase; letter-spacing: .08em; }
.hero-latest b { font-weight: inherit; }
.hero-latest i { color: var(--accent); font-style: normal; }
.hero-latest:hover { color: var(--accent-dark); }
.button { display: inline-flex; align-items: center; gap: 1rem; padding: .9rem 1.15rem; border: 1px solid var(--ink); font-size: .84rem; font-weight: 700; text-decoration: none; }
.button-primary { background: var(--ink); color: var(--white); }
.button-primary:hover { background: var(--accent); border-color: var(--accent); }
.button-secondary:hover { border-color: var(--accent); color: var(--accent-dark); }
.resume-downloads { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 680px; gap: 1px; margin: 2rem 0 1rem; background: var(--line); border: 1px solid var(--line); }
.resume-download { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 1.6rem; background: var(--paper); }
.resume-download-primary { background: var(--panel); }
.resume-download .kicker { margin: 0 0 .7rem; }
.resume-download h3 { margin: 0 0 .7rem; font-size: 1.35rem; line-height: 1.12; }
.resume-download p:not(.kicker) { margin: 0 0 1.35rem; color: var(--muted); line-height: 1.55; }
.resume-download .button { margin-top: auto; }
.resume-download-note { margin: 0 0 3rem; color: var(--muted); font-size: .9rem; }
.hero-proof { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--paper); border-top: 1px solid var(--line); }
.hero-proof div { display: flex; flex-direction: column; gap: .15rem; padding: 1.6rem 1.5rem 1rem 0; border-right: 1px solid var(--line); }
.hero-proof div:not(:first-child) { padding-left: 1.5rem; }
.hero-proof strong { font-size: 1.75rem; letter-spacing: -.05em; }
.hero-proof span { color: var(--muted); font-family: var(--mono); font-size: .67rem; text-transform: uppercase; letter-spacing: .06em; }

.section { padding: 7rem 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.section-heading h2 { margin: .45rem 0 0; font-size: clamp(2.2rem, 4vw, 3.5rem); letter-spacing: -.055em; }
.kicker, .project-meta { margin: 0; color: var(--accent-dark); }
.section-heading > a { font-family: var(--mono); font-size: .76rem; text-transform: uppercase; text-underline-offset: .25rem; }
.project-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.project-card { min-height: 330px; position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding: 2rem; overflow: hidden; background: var(--paper); text-decoration: none; }
.project-card-featured { grid-row: span 2; min-height: 661px; }
/* The closing career-arc card spans both columns, so a sixth card leaves no empty cell. */
.project-card-wide { grid-column: 1 / -1; }
.project-card:hover { background: var(--white); }
.project-number { position: absolute; top: 1.5rem; right: 1.5rem; color: #9A9087; font-family: var(--mono); font-size: .72rem; }
.project-card-copy { position: relative; z-index: 1; }
.project-card h3 { margin: .45rem 0 .7rem; font-size: 2rem; letter-spacing: -.04em; }
.project-card p:not(.project-meta) { max-width: 560px; color: var(--muted); line-height: 1.6; }
.project-brand { position: absolute; z-index: 0; top: 1.6rem; left: 2rem; display: block; height: auto; object-fit: contain; object-position: left top; opacity: .82; }
.project-brand-square { width: 82px; }
.project-brand-wordmark { width: 168px; }
.brand-cluster { display: flex; align-items: center; gap: .55rem; }
.brand-cluster span { display: grid; width: 58px; height: 58px; place-items: center; padding: .38rem; border: 1px solid var(--line); background: var(--white); }
.brand-cluster img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.project-brand-cluster { position: absolute; top: 1.55rem; left: 2rem; }
.text-link { display: inline-block; margin-top: .8rem; font-size: .8rem; font-weight: 700; }
.project-art { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 1.1rem; margin: 1.5rem 0 2.5rem; color: var(--muted); font-family: var(--mono); font-size: .66rem; }
.project-art ol { display: flex; flex-direction: column; gap: 1.1rem; margin: 0; padding: 0; list-style: none; }
.project-art li { position: relative; display: flex; align-items: baseline; gap: 1rem; padding: .7rem 1rem; border: 1px solid var(--line); background: var(--paper); }
.project-art li:not(:last-child)::after { content: "↓"; position: absolute; left: 1rem; bottom: -1.15rem; color: var(--accent); font-size: .8rem; line-height: 1.1rem; }
.project-art li b { flex: 0 0 1.4rem; }
.project-art li span { flex: 0 0 10.5rem; }
.project-art li b { color: #9A9087; font-weight: 400; font-size: .6rem; }
.project-art li span { color: var(--ink); font-family: var(--sans); font-size: .92rem; font-weight: 700; letter-spacing: -.01em; }
.project-art li small { font-size: .62rem; }
.project-art .art-code { border-color: var(--accent); }
.project-art .art-model { border-style: dashed; border-color: #9A9087; }
.project-art p { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: .6rem; text-transform: uppercase; letter-spacing: .06em; }
.art-key { display: inline-block; width: 18px; height: 10px; border: 1px solid var(--accent); }
.art-key-model { margin-left: 1rem; border-style: dashed; border-color: #9A9087; }

.operating-section { border-top: 1px solid var(--line); }
.principles-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.principles-grid article { padding: 2rem 2rem 0 0; }
.principles-grid article:not(:first-child) { padding-left: 2rem; border-left: 1px solid var(--line); }
.principles-grid span, .timeline-item > span { color: var(--accent-dark); font-family: var(--mono); font-size: .68rem; }
.principles-grid h3 { margin: 2.5rem 0 .8rem; font-size: 1.25rem; }
.principles-grid p, .timeline-item p { color: var(--muted); line-height: 1.65; }
.career-section { width: 100%; max-width: none; padding-left: max(1.5rem, calc((100% - var(--max)) / 2)); padding-right: max(1.5rem, calc((100% - var(--max)) / 2)); background: var(--ink); color: var(--paper); }
.career-section .kicker, .career-section .timeline-item > span { color: var(--accent-on-dark); }
.timeline { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid #4A4038; }
.timeline-item { position: relative; padding: 2rem 2rem 0 0; }
.timeline-item::before { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-on-dark); }
.timeline-item h3 { font-size: 1.02rem; }
.timeline-item p { font-size: .88rem; }

@media (max-width: 1200px) {
  .timeline { grid-template-columns: repeat(3, 1fr); }
  .timeline-item { padding-bottom: 2rem; }
  .timeline-item:not(:first-child) { padding-left: 2rem; border-left: 1px solid #4A4038; }
  .timeline-item:nth-child(n+4) { border-top: 1px solid #4A4038; }
  .timeline-item:nth-child(3n+1) { padding-left: 0; border-left: 0; }
  .timeline-item::before { display: none; }
}
.timeline-item h3 { margin: 1.6rem 0 .6rem; }
.timeline-item p { color: #C2B8AE; }
.writing-list { border-top: 1px solid var(--line); }
.writing-list a { display: grid; grid-template-columns: 120px 1fr auto; gap: 2rem; align-items: center; padding: 1.5rem .5rem; border-bottom: 1px solid var(--line); text-decoration: none; }
.writing-list a:hover { background: var(--white); }
.writing-list span { color: var(--muted); font-family: var(--mono); font-size: .67rem; }
.writing-list h3 { margin: 0; font-size: 1.05rem; }
.writing-list i { color: var(--accent); font-style: normal; }
.contact-cta { width: min(calc(100% - 3rem), var(--max)); margin: 0 auto 7rem; display: flex; align-items: end; justify-content: space-between; gap: 3rem; padding: 4rem; background: var(--accent-dark); color: var(--paper); }
.contact-cta .kicker { color: var(--accent-on-dark); }
.contact-cta h2 { margin: .7rem 0; font-size: clamp(2.4rem, 5vw, 4.5rem); line-height: 1; letter-spacing: -.06em; }
.contact-cta p:not(.kicker) { max-width: 640px; line-height: 1.65; }
.contact-cta-actions { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: .7rem; }
.contact-cta .button-primary { flex: 0 0 auto; background: var(--paper); border-color: var(--paper); color: var(--ink); }
.contact-cta .button-primary:hover { background: var(--accent-on-dark); border-color: var(--accent-on-dark); }
.contact-cta .button-secondary { border-color: var(--paper); color: var(--paper); }
.contact-cta .button-secondary:hover { border-color: var(--paper); background: var(--paper); color: var(--ink); }

.site-footer { display: flex; justify-content: space-between; padding: 2rem 0 3rem; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: .68rem; text-transform: uppercase; }

.content-page { width: min(calc(100% - 3rem), 860px); margin: auto; padding: 7rem 0; }
.content-header { padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.content-header h1 { margin: .65rem 0 1rem; font-size: clamp(3rem, 7vw, 5.5rem); line-height: 1; letter-spacing: -.065em; }
.content-deck { max-width: 680px; color: var(--muted); font-size: 1.2rem; line-height: 1.65; }
.content-meta { color: var(--muted); font-family: var(--mono); font-size: .72rem; text-transform: uppercase; }
.prose { padding-top: 2.5rem; font-size: 1.04rem; line-height: 1.78; }
.prose h2 { margin: 3.5rem 0 1rem; font-size: 2rem; letter-spacing: -.035em; }
.prose h3 { margin-top: 2.5rem; font-size: 1.3rem; }
.prose a { text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: .2em; }
.prose img { max-width: 100%; height: auto; }
.prose blockquote { margin: 2rem 0; padding: .25rem 0 .25rem 1.5rem; border-left: 3px solid var(--accent); color: var(--muted); }
.prose code { padding: .15rem .35rem; background: var(--panel); font-family: var(--mono); font-size: .9em; }
.prose pre { overflow-x: auto; padding: 1.25rem; background: var(--ink); color: var(--paper); }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.prose th, .prose td { padding: .75rem; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--panel); }
.prose .case-diagram { width: 100%; max-width: 100%; margin: 2.5rem 0; }
.prose .case-diagram img { display: block; width: 100%; border: 1px solid var(--line); background: var(--panel); }
.prose .case-diagram figcaption { margin-top: .7rem; color: var(--muted); font-family: var(--mono); font-size: .68rem; line-height: 1.6; }
.article-toc { margin-top: 2rem; padding: 1.5rem; background: var(--panel); font-size: .86rem; }
.article-toc ul { margin: .5rem 0; }
.contact-form { display: grid; gap: .6rem; }
.contact-form label { margin-top: .75rem; font-size: .8rem; font-weight: 700; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; padding: .8rem; border: 1px solid var(--line); border-radius: 0; background: var(--white); color: var(--ink); font: inherit; }
.contact-form input:focus-visible, .contact-form select:focus-visible, .contact-form textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.contact-form select:invalid { color: var(--muted); }
.contact-form button { width: fit-content; margin-top: 1rem; cursor: pointer; }
.contact-form button:disabled { cursor: wait; opacity: .65; }
.field-optional { color: var(--muted); font-weight: 500; }
.form-status, .form-response-note, .form-privacy-note { max-width: 620px; margin: .25rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.55; }
.form-status { color: var(--ink); font-weight: 700; }
.form-response-note { font-weight: 700; }
.form-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.booking-cta { margin: 3rem 0; padding: 2rem; border: 1px solid var(--line); background: var(--panel); }
.booking-cta h2 { margin-top: .55rem; }
.booking-cta p:not(.kicker) { max-width: 620px; color: var(--muted); }
.booking-cta .button { margin-top: .5rem; }

.listing-page, .case-study { width: min(calc(100% - 3rem), var(--max)); margin: auto; padding: 7rem 0; }
.listing-header { max-width: 850px; margin-bottom: 4rem; }
.listing-header h1, .case-hero h1 { margin: .7rem 0 1rem; font-size: clamp(3.5rem, 8vw, 6.8rem); line-height: .97; letter-spacing: -.07em; }
.listing-header > p:last-child, .case-deck { max-width: 720px; color: var(--muted); font-size: 1.22rem; line-height: 1.65; }
.listing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.listing-card { min-height: 320px; position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 2rem; background: var(--paper); text-decoration: none; }
.listing-card:hover { background: var(--white); }
.listing-card-top { display: flex; justify-content: space-between; }
.listing-brand { position: absolute; top: 4.35rem; left: 2rem; display: block; height: auto; object-fit: contain; object-position: left top; opacity: .82; }
.listing-brand-square { right: 2rem; left: auto; width: 72px; }
.listing-brand-wordmark { right: 2rem; left: auto; width: 174px; }
.listing-brand-cluster { position: absolute; top: 4.15rem; right: 2rem; }
.listing-brand-cluster span { width: 50px; height: 50px; }
.listing-brand-spacer { flex: 0 0 5rem; }
.listing-card h2 { margin: auto 0 .6rem; font-size: 2rem; letter-spacing: -.045em; }
.listing-card > p { color: var(--muted); line-height: 1.6; }
.tag-list { display: flex; flex-wrap: wrap; gap: .45rem; margin: .7rem 0 0; padding: 0; list-style: none; }
.tag-list li { padding: .35rem .55rem; border: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: .64rem; text-transform: uppercase; }
.listing-date { margin-top: 1.2rem; color: var(--muted); font-family: var(--mono); font-size: .68rem; text-transform: uppercase; }
.back-link { display: inline-block; margin-bottom: 4rem; font-family: var(--mono); font-size: .72rem; text-transform: uppercase; }
.case-hero { position: relative; padding-bottom: 3rem; border-bottom: 1px solid var(--line); }
.case-brand { position: absolute; top: 0; right: 0; display: block; height: auto; object-fit: contain; object-position: right top; }
.case-brand-square { width: clamp(102px, 11vw, 132px); }
.case-brand-wordmark { width: clamp(190px, 24vw, 280px); }
.case-brand-cluster { position: absolute; top: 0; right: 0; }
.case-brand-cluster span { width: 66px; height: 66px; }
.case-facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 3rem 0 0; }
.case-facts div { padding: 1rem 1.5rem 1rem 0; border-right: 1px solid var(--line); }
.case-facts div:not(:first-child) { padding-left: 1.5rem; }
.case-facts dt { color: var(--muted); font-family: var(--mono); font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; }
.case-facts dd { margin: .4rem 0 0; font-size: .92rem; font-weight: 700; }
.case-media { padding: 4rem 0; border-bottom: 1px solid var(--line); }
.case-media-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1.5rem; }
.case-media-heading h2 { max-width: 620px; margin: 0; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1; letter-spacing: -.055em; }
.case-media-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.case-media-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 35%); grid-template-areas: "copy player"; align-items: center; overflow: hidden; border: 1px solid var(--line); background: var(--paper); }
.case-media-card:focus-within { border-color: var(--accent); }
.case-media-player { grid-area: player; position: relative; aspect-ratio: 16 / 9; margin: 1rem 1rem 1rem 0; background: var(--ink); }
.case-media-player iframe { display: block; width: 100%; height: 100%; border: 0; }
.case-media-poster { width: 100%; height: 100%; position: relative; display: block; overflow: hidden; margin: 0; padding: 0; border: 0; background: var(--ink); color: var(--white); cursor: pointer; }
.case-media-poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgb(10 17 16 / 72%)); }
.case-media-poster img { width: 100%; height: 100%; display: block; object-fit: cover; opacity: .86; transition: transform .25s ease, opacity .25s ease; }
.case-media-poster:hover img, .case-media-poster:focus-visible img { transform: scale(1.025); opacity: 1; }
.case-media-poster:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.case-media-play { width: 3.25rem; height: 3.25rem; position: absolute; z-index: 1; inset: 50% auto auto 50%; display: inline-flex; align-items: center; justify-content: center; transform: translate(-50%, -50%); border-radius: 50%; background: var(--accent); color: var(--white); border: 1px solid var(--accent-dark); font-size: .95rem; } /* design-rules trial: border instead of drop shadow */
.case-media-play-label { position: absolute; z-index: 1; left: 1rem; bottom: .85rem; font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; }
.case-media-card-copy { grid-area: copy; align-self: stretch; display: flex; flex-direction: column; padding: 1.6rem; }
.case-media-type { color: var(--accent-dark); font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; }
.case-media-card strong { max-width: 520px; margin: 1.8rem 0 .7rem; font-size: 1.2rem; line-height: 1.3; letter-spacing: -.025em; }
.case-media-description { max-width: 540px; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.case-media-action { width: fit-content; display: inline-flex; align-items: center; gap: .55rem; margin-top: auto; padding-top: 1.5rem; font-size: .75rem; font-weight: 700; text-underline-offset: .2rem; }
.case-layout { display: grid; grid-template-columns: 240px minmax(0, 720px); gap: clamp(3rem, 8vw, 8rem); align-items: start; padding-top: 4rem; }
.case-layout aside { position: sticky; top: 2rem; padding-top: 2.5rem; }
.focus-list { margin: 1rem 0 2.5rem; padding: 0; list-style: none; }
.focus-list li { padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .82rem; }
.case-layout aside > a { font-size: .8rem; font-weight: 700; }
.case-prose { min-width: 0; padding-top: 0; }

@media (max-width: 900px) {
  .case-media-card { grid-template-columns: minmax(0, 1fr) minmax(240px, 40%); }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .timeline-item:not(:first-child) { padding-left: 2rem; border-left: 1px solid #4A4038; }
  .timeline-item:nth-child(n+3) { border-top: 1px solid #4A4038; }
  .timeline-item:nth-child(odd) { padding-left: 0; border-left: 0; }
}

/* Tablets. Placed after the base rules so it overrides them, and before the phone block so phones override it. */
@media (max-width: 1200px) {
  .hero { min-height: auto; padding: 5rem 0 3rem; }
  .hero-latest { margin-bottom: 2rem; }
  .section { padding-top: 4rem; padding-bottom: 4rem; }
  .principles-grid h3 { margin-top: 1.25rem; }
  .timeline-item h3 { margin-top: 1.2rem; }
  .contact-cta { margin-bottom: 4rem; }
  .content-page, .listing-page, .case-study { padding: 4rem 0; }
}

@media (max-width: 900px) {
  /* CalmTrader and the career-arc card take the full width; the rest sit two by two. */
  .project-grid { grid-template-columns: 1fr 1fr; }
  .project-card-featured { grid-column: 1 / -1; grid-row: auto; min-height: auto; }
  /* Logos join the flow above the copy, so a tall card body can't slide under them. */
  .project-brand, .project-brand-cluster { position: static; margin-bottom: auto; padding-bottom: 1.25rem; }
  .project-brand-cluster { align-self: flex-start; }
  .contact-cta { flex-direction: column; align-items: flex-start; gap: 1.75rem; padding: 3rem; }
}

@media (max-width: 720px) {
  .resume-downloads { grid-template-columns: 1fr; }
  .site-header { min-height: 76px; gap: 1rem; }
  .site-header nav { gap: 1rem; }
  .nav-more { margin-left: 0; }
  .header-links { gap: .9rem; }
  .hero { min-height: auto; padding: 5.5rem 0 3rem; background-size: 48px 48px; }
  .hero h1 { font-size: clamp(3rem, 14vw, 4.5rem); }
  .listing-header h1, .case-hero h1 { font-size: clamp(2.4rem, 11vw, 3.5rem); }
  .hero-proof { grid-template-columns: repeat(2, 1fr); }
  .hero-proof div:nth-child(2) { border-right: 0; }
  .hero-proof div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .project-grid { grid-template-columns: 1fr; }
  .principles-grid, .timeline { grid-template-columns: 1fr; }
  .principles-grid article, .principles-grid article:not(:first-child), .timeline-item, .timeline-item:not(:first-child) { padding: .75rem 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .timeline-item:nth-child(n) { border-top: 0; }
  .timeline-item, .timeline-item:not(:first-child) { border-color: #4A4038; }
  .timeline-item:last-child { border-bottom: 0; }
  .writing-list a { grid-template-columns: 1fr auto; gap: .7rem; }
  .writing-list span { grid-column: 1 / -1; }
  .contact-cta { align-items: start; flex-direction: column; padding: 2rem; }
  .listing-grid { grid-template-columns: 1fr; }
  .listing-brand-square { width: 56px; }
  .listing-brand-wordmark { width: 140px; }
  .listing-brand-cluster { gap: .35rem; }
  .listing-brand-cluster span { width: 42px; height: 42px; padding: .28rem; }
  .case-facts { grid-template-columns: 1fr; }
  .case-brand { position: static; margin: -2rem 0 2rem; object-position: left top; }
  .case-brand-cluster { position: static; margin: -2rem 0 2rem; }
  .case-brand-cluster span { width: 48px; height: 48px; padding: .3rem; }
  .case-brand-square { width: 80px; }
  .case-brand-wordmark { width: 150px; }
  .case-facts div, .case-facts div:not(:first-child) { padding: 1rem 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .case-layout { grid-template-columns: 1fr; gap: 1rem; }
  .case-layout aside { position: static; }
  .case-media-heading { align-items: start; flex-direction: column; }
  .case-media-card { grid-template-columns: 1fr; grid-template-areas: "copy" "player"; }
  .case-media-player { margin: 0 1rem 1rem; }
  .prose .case-diagram { overflow-x: auto; padding-bottom: .35rem; -webkit-overflow-scrolling: touch; }
  .prose .case-diagram::before { content: "Swipe to follow the workflow →"; display: block; margin-bottom: .55rem; color: var(--accent-dark); font-family: var(--mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .05em; }
  .prose .case-diagram img { width: 720px; max-width: none; }
  .project-card-featured { min-height: 540px; grid-row: auto; }
  .project-art li { gap: .7rem; padding: .6rem .8rem; }
  .project-art li:not(:last-child)::after { left: .8rem; }
  .project-art li b { flex-basis: 1.2rem; }
  .project-art li span { flex-basis: 7.8rem; font-size: .86rem; }
  .project-brand-square { width: 64px; }
  .project-brand-wordmark { width: 140px; }
  .project-brand-cluster { position: static; align-self: flex-start; gap: .35rem; margin: 0 0 auto; padding-bottom: 1.25rem; }
  .project-brand-cluster span { width: 42px; height: 42px; padding: .28rem; }
  /* Top and bottom only: the career section's side padding must survive this. */
  /* The headings separate sections on a phone; keep just enough room for the kicker to clear the divider. */
  .section { padding-top: 1rem; padding-bottom: 0; }
  .career-section { margin-top: 1.5rem; padding-top: 1.75rem; padding-bottom: 1.75rem; }
  .operating-section { border-top: 0; padding-top: 2.75rem; }
  /* Space above each divider only: the text sits close to the line below it. */
  .principles-grid article, .principles-grid article:not(:first-child), .timeline-item, .timeline-item:not(:first-child) { padding-bottom: .6rem; }
  .principles-grid article p, .timeline-item p { margin-bottom: 0; }
  .writing-section { padding-top: 3rem; padding-bottom: 3rem; }
  .writing-list a { padding: 1rem .5rem; }
  .contact-cta { gap: 1.5rem; margin-bottom: 3rem; }
  .site-footer { padding: 1.5rem 0 2rem; }
  /* Inner pages, tightened to match the homepage. */
  .content-page, .listing-page, .case-study { padding: 2.5rem 0 2rem; }
  .content-header { padding-bottom: 1.25rem; }
  .prose { padding-top: 1.25rem; }
  .prose h2 { margin: 2rem 0 .6rem; }
  .prose h3 { margin-top: 1.5rem; }
  .prose .case-diagram, .prose .article-mark { margin: 1.5rem 0; }
  .article-toc { margin-top: 1.25rem; padding: 1rem 1.25rem; }
  .listing-header { margin-bottom: 1.75rem; }
  .listing-card { min-height: 240px; padding: 1.5rem; }
  .case-hero { padding-bottom: 1.5rem; }
  .case-facts { margin-top: 1.5rem; }
  .case-media { padding: 2rem 0; }
  .case-layout { padding-top: 1.5rem; }
  .case-layout aside { padding-top: 0; }
  .section-heading { margin-bottom: .75rem; }
  .principles-grid h3 { margin: .5rem 0 .35rem; }
  .timeline-item h3 { margin: .5rem 0 .35rem; }
  .site-footer { flex-direction: column; gap: .7rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .case-media-poster img { transition: none; }
}
.meta-repo { display: inline-flex; align-items: center; gap: .35rem; color: var(--ink); font-weight: 600; text-transform: none; text-decoration: none; vertical-align: bottom; }
.meta-repo:hover { color: var(--accent); }
.case-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1.1rem; font-size: .95rem; }
.prose .article-mark { margin: 2.5rem 0; }
.prose .article-mark img { display: block; width: 280px; max-width: 100%; }
