/* Ivan Tang — a small, self-hosted, progressively enhanced portfolio. */
@font-face {
  font-family: 'Outfit';
  src: url('./outfit-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f7f8f2;
  --white: #fffefb;
  --ink: #252c25;
  --muted: #61685c;
  --green: #335b43;
  --green-hover: #254532;
  --sage: #e6eade;
  --line: #d8ddd1;
  --lime: #e0edb7;
  --error: #a32d32;
  --font: 'Outfit', 'Segoe UI', sans-serif;
  --serif: Georgia, 'Times New Roman', serif;
}
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 7rem; }
body { background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 1rem; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, input, textarea, select, a { -webkit-tap-highlight-color: transparent; }
button, select, summary { cursor: pointer; }
button { color: inherit; }
input, textarea, select { min-width: 0; color: var(--ink); }
button { touch-action: manipulation; }
img { display: block; max-width: 100%; height: auto; }
svg { display: block; }
ul, ol { padding: 0; }
li { list-style: none; }
h1, h2, h3, h4 { font-weight: 500; line-height: 1.13; letter-spacing: -.045em; text-wrap: balance; }
h2 { font-size: clamp(2.1rem, 3.7vw, 3.7rem); }
h3 { font-size: 1.375rem; }
p { text-wrap: pretty; }
em { font-family: var(--serif); font-weight: 400; }
::selection { background: var(--green); color: var(--paper); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 5px; }
[hidden] { display: none !important; }
.wrap { width: min(100% - 6rem, 82rem); margin-inline: auto; }
.section-space { padding-block: clamp(4.5rem, 7vw, 7rem); }
.eyebrow { font-size: .75rem; letter-spacing: .105em; text-transform: uppercase; font-weight: 500; color: var(--muted); line-height: 1.6; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 1rem; left: 1rem; padding: .75rem 1.5rem; background: var(--green); color: white; z-index: 10; transform: translateY(-200%); border-radius: 4px; }
.skip-link:focus { transform: none; }
#main-content:focus { outline: none; }
.js-only { display: none; }
.js .js-only { display: block; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 2rem; min-height: 3.25rem; padding: .8rem 1.5rem; border: 1px solid var(--green); background: var(--green); color: var(--white); border-radius: 5px; font-size: .9375rem; font-weight: 500; line-height: 1.5; transition: background .18s, transform .18s; }
.button:hover { background: var(--green-hover); }
.button:active { transform: translateY(2px); }
.button > span[aria-hidden] { font-size: 1.25rem; }
.button-secondary { color: var(--green); background: transparent; border-color: var(--line); }
.button-secondary:hover { background: var(--sage); }
.text-link { display: inline-flex; align-items: center; gap: .6rem; min-height: 2.75rem; font-size: .9375rem; color: var(--green); font-weight: 500; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 5px; transition: text-decoration-color .18s; }
.text-link:hover { text-decoration-color: currentColor; }

/* Navigation */
.site-header { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: 5.5rem; }
.wordmark { display: inline-flex; align-items: center; gap: .65rem; font-size: 1.6rem; letter-spacing: -.065em; font-weight: 600; white-space: nowrap; line-height: 1; min-height: 2.75rem; }
.wordmark > span { color: var(--green); font-size: 1.9rem; font-weight: 400; }
.main-nav { display: flex; align-items: center; gap: 2.25rem; }
.main-nav a { display: inline-flex; align-items: center; gap: .35rem; font-size: .875rem; min-height: 2.75rem; position: relative; }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--green); }
.main-nav a[aria-current]::after { content: ''; height: 2px; background: var(--green); position: absolute; left: 0; right: 0; bottom: 0; }
.nav-count { font-size: .625rem; align-self: flex-start; padding-top: .35rem; color: var(--muted); }
.main-nav a:last-child { border-bottom: 1px solid var(--green); color: var(--green); }

/* Introduction */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 3rem; padding-block: 5.5rem 6.5rem; }
.hero-copy > .eyebrow { display: flex; align-items: center; gap: .65rem; margin-bottom: 1.75rem; }
.status-dot { width: .45rem; height: .45rem; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--sage); flex: none; }
.hero h1 { font-size: clamp(3.5rem, 5.7vw, 5.6rem); line-height: 1.015; letter-spacing: -.06em; text-wrap: initial; }
.hero h1 em { color: var(--green); letter-spacing: -.065em; line-height: 1.15; }
.hero-intro { max-width: 40ch; margin-top: 1.8rem; color: var(--muted); font-size: 1.1rem; line-height: 1.75; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1.5rem; margin-top: 2rem; }
.hero-showcase { position: relative; padding-bottom: 9rem; padding-top: 1.5rem; min-width: 0; }
.showcase-caption { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-inline: .5rem; margin-bottom: .8rem; }
.showcase-caption .eyebrow { font-size: .64rem; letter-spacing: .08em; }
.showcase-caption > span:last-child { color: var(--green); font-size: 1.7rem; line-height: 1; }
.showcase-main { display: block; background: var(--white); border: 1px solid #cfd6c5; border-radius: 8px; overflow: hidden; box-shadow: 0 16px 40px #2535200b; transform: rotate(-3deg); transition: transform .25s; }
.showcase-main:hover { transform: rotate(-1deg) translateY(-4px); }
.browser-bar { display: flex; align-items: center; gap: 4px; padding: .65rem .75rem; background: #e9eee2; border-bottom: 1px solid #d9dfd0; }
.browser-bar i { width: 5px; height: 5px; border-radius: 50%; background: #9ca695; }
.browser-bar span { flex: 1; text-align: center; font-size: .53rem; color: #4f5a49; letter-spacing: .04em; }
.showcase-main > img { width: 100%; aspect-ratio: 1.58; object-fit: cover; object-position: top; }
.showcase-label { display: flex; justify-content: space-between; gap: 1rem; font-size: .65rem; padding: .7rem .9rem; background: var(--white); color: var(--ink); }
.showcase-label > span { color: var(--muted); }
.showcase-secondary { position: absolute; width: 65%; bottom: 0; right: -1rem; background: #fdf1d5; border: 1px solid #cfd6c5; border-radius: 5px; overflow: hidden; transform: rotate(5deg); box-shadow: 0 12px 30px #25352015; transition: transform .25s; }
.showcase-secondary:hover { transform: rotate(2deg) translateY(-4px); }
.showcase-secondary img { width: 100%; aspect-ratio: 1.55; object-fit: cover; object-position: top; }
.showcase-stamp { display: grid; align-content: center; position: absolute; left: .5rem; bottom: .35rem; width: 6.5rem; height: 6.5rem; border: 1px solid #b8c5a9; border-radius: 50%; background: var(--lime); text-align: center; color: var(--green); font-size: .7rem; line-height: 1.55; transform: rotate(-12deg); }
.intro-strip { display: grid; grid-template-columns: 1fr 1fr 1.3fr; padding-block: 1.8rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.intro-strip > p { display: flex; align-items: center; gap: 1.15rem; padding-inline: 2rem; border-right: 1px solid var(--line); }
.intro-strip > p:first-child { padding-left: 0; }
.intro-strip > p:last-child { border: 0; padding-right: 0; }
.intro-strip strong { font-size: 2.65rem; letter-spacing: -.07em; font-weight: 500; line-height: 1; }
.intro-strip p > span { font-size: .8125rem; line-height: 1.5; color: var(--muted); }
.intro-strip .strip-note { justify-content: space-between; font-size: .9375rem; line-height: 1.5; }
.intro-strip .strip-note > span { font-size: 2.8rem; color: var(--green); }

/* The collection */
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 3rem; margin-bottom: 2.8rem; }
.section-heading .eyebrow, .about-copy > .eyebrow, .contact-copy > .eyebrow { margin-bottom: 1.2rem; }
.section-intro { color: var(--muted); max-width: 32ch; font-size: 1rem; padding-bottom: .2rem; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: .4rem; border-bottom: 1px solid var(--line); padding-bottom: 1.2rem; }
.filter-tabs button { display: inline-flex; align-items: center; gap: .7rem; border: 1px solid transparent; border-radius: 4px; background: transparent; padding: .65rem 1rem; min-height: 2.75rem; font-size: .875rem; }
.filter-tabs button span { font-size: .6875rem; }
.filter-tabs button:hover { background: var(--sage); }
.filter-tabs button[aria-pressed="true"] { color: var(--white); background: var(--green); }
.filter-controls { display: grid; grid-template-columns: minmax(0, 1fr) 15rem auto; gap: .85rem; margin-top: 1.25rem; }
.search-field { display: flex; align-items: center; gap: .55rem; border: 1px solid var(--line); border-radius: 5px; padding-left: 1rem; background: var(--white); }
.search-field > span { font-size: 1.6rem; color: var(--muted); line-height: 1; }
.search-field input { border: 0; background: transparent; padding: .65rem .9rem .65rem 0; min-height: 2.85rem; width: 100%; font-size: .875rem; }
.search-field:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
.search-field input:focus { outline: none; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
.style-field select { width: 100%; height: 100%; min-height: 2.85rem; border: 1px solid var(--line); border-radius: 5px; background: var(--white); padding: .65rem 2rem .65rem .8rem; font-size: .8125rem; }
.view-switch { display: flex; border: 1px solid var(--line); border-radius: 5px; padding: 3px; gap: 3px; }
.view-switch button { display: grid; place-items: center; width: 2.6rem; min-height: 2.5rem; background: transparent; border: 0; border-radius: 3px; }
.view-switch button[aria-pressed="true"] { background: var(--sage); }
.view-switch svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.collection-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-block: 1.25rem 1.7rem; color: var(--muted); font-size: .75rem; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.8rem 1.65rem; }
.project-card { min-width: 0; }
.project-link { display: block; height: 100%; }
.project-media { position: relative; aspect-ratio: 1.46; padding: 1.15rem; background: #e7eae1; border: 1px solid #e1e5d9; border-radius: 7px; overflow: hidden; display: flex; align-items: center; }
.project-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 2px; box-shadow: 0 4px 14px #2026200f; transition: transform .25s; }
.project-card[data-category="web"] .project-media, .project-card[data-category="apps"] .project-media, .project-card[data-category="games"] .project-media { background: #eeece4; }
.project-card:not([data-category="design"]) .project-media img { object-fit: contain; box-shadow: none; }
.project-card[data-project="synapse"] .project-media { background: #deddeb; }
.project-card[data-project="stackd"] .project-media { background: #f1e9cd; }
.project-card[data-project="lumen"] .project-media { background: #e4e2f0; }
.project-card[data-project="wildroot"] .project-media { background: #e9e4d7; }
.project-card[data-project="doodle-math"] .project-media { background: #f3e4d9; }
.project-card[data-project="the-long-field"] .project-media { background: #ece6d9; }
.project-card[data-project="loud-house"] .project-media { background: #ecdee6; }
.project-card[data-project="static-fm"] .project-media { background: #d8e5e3; }
.project-arrow { position: absolute; right: 1.6rem; bottom: 1.6rem; width: 2.35rem; height: 2.35rem; display: grid; place-items: center; color: var(--green); background: var(--white); border: 1px solid var(--line); border-radius: 50%; opacity: 0; transform: translateY(5px); transition: opacity .2s, transform .2s; }
.project-link:hover .project-arrow, .project-link:focus-visible .project-arrow { opacity: 1; transform: none; }
.project-link:hover .project-media img { transform: translateY(-3px); }
.project-copy { padding: 1.15rem .15rem 0; }
.project-kicker { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .45rem; font-size: .65rem; color: var(--muted); letter-spacing: .035em; text-transform: uppercase; }
.project-kicker span:last-child { font-size: .6rem; letter-spacing: 0; text-transform: none; border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px; flex-shrink: 0; }
.project-title-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.project-title-row h3 { font-size: 1.4rem; letter-spacing: -.035em; }
.project-title-row > span { color: var(--muted); font-size: 1.2rem; }
.project-summary { color: var(--muted); font-size: .875rem; line-height: 1.6; margin-top: .6rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: .4rem .7rem; margin-top: .9rem; font-size: .65rem; color: var(--green); }
.project-tags > span + span::before { content: '/'; color: #8b9485; margin-right: .7rem; }
.collection-note { max-width: 88ch; margin-top: 3rem; font-size: .8rem; color: var(--muted); padding-top: 1.25rem; border-top: 1px solid var(--line); }
.collection-note > span { color: var(--green); padding-right: .5rem; }
.empty-state { text-align: center; border: 1px dashed #bac5ad; padding: 3rem 1.5rem; border-radius: 7px; background: var(--sage); }
.empty-state > span { font-size: 2rem; color: var(--green); }
.empty-state p { color: var(--muted); margin-block: .65rem 1.5rem; }
.image-unavailable { color: var(--muted); }
.image-unavailable::after { content: 'Preview unavailable — open project for details'; display: grid; place-items: center; position: absolute; inset: 0; text-align: center; font-size: .8rem; padding: 2rem; }
.project-grid.is-list { grid-template-columns: 1fr; gap: 0; }
.is-list .project-card { border-top: 1px solid var(--line); }
.is-list .project-link { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 2rem; padding-block: 1.25rem; }
.is-list .project-media { padding: .65rem; }
.is-list .project-copy { padding: .25rem 0; }
.is-list .project-kicker { justify-content: flex-start; }
.is-list .project-summary { max-width: 70ch; }

/* About and résumé */
.about-section { background: var(--sage); border-block: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: .78fr 1.25fr; gap: 6rem; align-items: center; }
.about-portrait { max-width: 25rem; padding: 1rem; background: var(--white); border: 1px solid #cbd3c1; border-radius: 5px; transform: rotate(-3deg); }
.about-portrait img { width: 100%; border-radius: 2px; }
.portrait-caption { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem .25rem .2rem; font-size: .75rem; }
.portrait-caption span:last-child { color: var(--muted); }
.about-copy .lede { margin-top: 1.7rem; font-size: 1.25rem; max-width: 40ch; color: var(--ink); }
.about-copy > p:not(.eyebrow):not(.lede) { max-width: 59ch; color: var(--muted); margin-top: 1rem; }
.about-links { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 1.5rem; }
.capabilities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; margin-top: 4.5rem; }
.capabilities article { border-top: 1px solid #c8d0be; padding-top: 1.15rem; }
.capability-number { color: var(--green); font-size: .7rem; }
.capabilities h3 { margin-top: 1rem; font-size: 1.3rem; }
.capabilities p { margin-top: .75rem; font-size: .9rem; color: var(--muted); }
.resume-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; }
.column-title { font-size: 1.2rem; padding-block: .9rem; margin-bottom: 1.8rem; border-block: 1px solid var(--line); }
.timeline { display: grid; gap: 2rem; }
.timeline-date { color: var(--green); font-size: .75rem; font-variant-numeric: tabular-nums; }
.timeline h4 { margin-top: .45rem; font-size: 1.125rem; letter-spacing: -.025em; }
.timeline p { margin-top: .65rem; color: var(--muted); font-size: .9rem; max-width: 55ch; }
.toolkit { display: grid; grid-template-columns: .65fr 2fr; gap: 3rem; margin-top: 4rem; padding-top: 1.8rem; border-top: 1px solid var(--line); }
.toolkit h3 { font-size: 1.2rem; }
.toolkit dl { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem 2rem; }
.toolkit dt { font-size: .8rem; color: var(--green); }
.toolkit dd { font-size: .875rem; margin-top: .4rem; color: var(--muted); }

/* Contact */
.contact-section { background: #e9eddf; border-block: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; }
.contact-copy h2 { font-size: clamp(2.5rem, 4.25vw, 4.3rem); }
.contact-copy h2 em { color: var(--green); }
.contact-copy > p:not(.eyebrow) { max-width: 39ch; color: var(--muted); margin-top: 1.5rem; }
.contact-email { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .6rem; font-size: clamp(.95rem, 1.5vw, 1.35rem); color: var(--green); margin-top: 2rem; text-decoration: underline; text-underline-offset: .35em; overflow-wrap: anywhere; }
.contact-direct { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: .8rem; color: var(--muted); margin-top: 1rem; }
.contact-copy > .text-link { font-size: .8rem; margin-top: .6rem; }
.map-panel { grid-column: 1 / -1; min-width: 0; padding-top: 1.75rem; border-top: 1px solid #c0c9b3; }
.map-panel-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }
.map-panel-copy .eyebrow { margin-bottom: .65rem; }
.map-panel-copy h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.map-panel-intro { color: var(--muted); font-size: .875rem; margin-top: .6rem; }
.map-panel-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .5rem 1rem; flex-shrink: 0; }
.map-load-button { display: inline-flex; gap: .8rem; border-color: var(--green); font-size: .8125rem; }
html:not(.js) .map-load-button { display: none; }
.map-external-link { font-size: .8125rem; }
.map-stage { position: relative; min-height: 22rem; aspect-ratio: 16 / 7; margin-top: 1.5rem; overflow: hidden; border: 1px solid #c5cfb9; border-radius: 6px; background: radial-gradient(ellipse at 78% 20%, #d6dfc7 0, transparent 35%), radial-gradient(ellipse at 10% 85%, #d5decb 0, transparent 36%), #e1e8d7; }
.map-stage::before, .map-stage::after { position: absolute; inset: -50%; content: ""; pointer-events: none; background: repeating-linear-gradient(32deg, transparent 0, transparent 78px, rgb(51 91 67 / 8%) 79px, rgb(51 91 67 / 8%) 81px, transparent 82px, transparent 160px); }
.map-stage::after { transform: rotate(90deg); background: repeating-linear-gradient(32deg, transparent 0, transparent 100px, rgb(51 91 67 / 7%) 101px, rgb(51 91 67 / 7%) 103px, transparent 104px, transparent 184px); }
.map-placeholder { position: absolute; z-index: 1; inset: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; justify-content: center; gap: clamp(1rem, 4vw, 4rem); padding: clamp(1.25rem, 5vw, 4rem); }
.map-placeholder-icon { width: clamp(3.5rem, 9vw, 6rem); height: auto; color: var(--green); filter: drop-shadow(0 8px 10px rgb(37 69 50 / 14%)); }
.map-placeholder-copy { max-width: 30rem; }
.map-placeholder-copy .eyebrow { margin-bottom: .65rem; }
.map-placeholder-copy h4 { font-size: clamp(1.3rem, 2.5vw, 2rem); }
.map-placeholder-copy > p:last-child { margin-top: .7rem; color: #4d574a; font-size: .875rem; max-width: 43ch; }
.map-stage iframe { position: absolute; z-index: 2; inset: 0; display: block; width: 100%; height: 100%; border: 0; background: #e1e8d7; }
.map-privacy-note { margin-top: .65rem; color: var(--muted); font-size: .75rem; }
.contact-form h3 { font-size: 1.35rem; }
.form-help { font-size: .8125rem; color: var(--muted); margin-top: .7rem; max-width: 48ch; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.form-field { min-width: 0; }
.form-field label { display: block; font-size: .8rem; margin-bottom: .45rem; }
.form-field input, .form-field textarea { width: 100%; display: block; border: 1px solid #c0c9b3; background: rgb(255 254 251 / 75%); padding: .8rem .9rem; border-radius: 4px; font-size: .9rem; }
.form-field textarea { resize: vertical; min-height: 8.5rem; }
.contact-form > .form-field { margin-top: 1.1rem; }
.form-field [aria-invalid="true"] { border-color: var(--error); }
.field-hint { font-size: .725rem; margin-top: .5rem; color: var(--muted); }
.field-error { font-size: .8rem; margin-top: .45rem; color: var(--error); }
.contact-form > .button { margin-top: 1.5rem; }
.form-result { background: var(--white); padding: 1.25rem; border: 1px solid var(--line); border-radius: 5px; margin-top: 1.25rem; font-size: .9rem; }

/* Footer */
.site-footer { padding-block: 2.7rem 1.8rem; }
.footer-top, .footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.footer-top { padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.footer-top > p { font-size: .8125rem; color: var(--muted); }
.footer-top .wordmark { font-size: 1.35rem; }
.footer-top .text-link { font-size: .8rem; }
.footer-bottom { padding-top: 1.3rem; font-size: .75rem; color: var(--muted); }
.footer-social { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }
.footer-social a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.footer-social a:hover { color: var(--green); text-decoration: underline; }
.legal-notes { display: flex; flex-wrap: wrap; gap: .3rem 1.5rem; font-size: .7rem; color: var(--muted); }
.legal-notes details { max-width: 65ch; }
.legal-notes summary { min-height: 2.75rem; display: flex; align-items: center; gap: .5rem; }
.legal-notes summary::after { content: '+'; }
.legal-notes details[open] summary::after { content: '−'; }
.legal-notes p { padding-bottom: 1rem; }
.legal-notes a { text-decoration: underline; }

/* Static project pages: real links, even without JavaScript. */
.project-page { padding-top: 2.25rem; }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; font-size: .8rem; color: var(--muted); }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--green); }
.breadcrumb a:hover { text-decoration: underline; }
.project-hero { display: grid; grid-template-columns: 1.2fr .8fr; align-items: end; gap: 3rem; padding-block: 2.5rem 3rem; }
.project-hero .eyebrow { margin-bottom: 1rem; }
.project-hero h1 { font-size: clamp(2.5rem, 6vw, 5.5rem); }
.project-hero .project-lede { color: var(--muted); max-width: 52ch; font-size: 1.15rem; margin-top: 1.3rem; }
.project-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .75rem; }
.project-actions .button { gap: 1rem; font-size: .85rem; }
.case-image { background: var(--sage); padding: clamp(1rem, 3vw, 3rem); border: 1px solid var(--line); border-radius: 7px; position: relative; }
.case-image a { display: flex; justify-content: center; }
.case-image img { max-height: 48rem; width: 100%; object-fit: contain; object-position: top; box-shadow: 0 8px 25px #20282010; }
.case-image.is-original img { width: auto; max-width: 100%; }
.case-image figcaption { color: var(--muted); text-align: center; font-size: .75rem; margin-top: 1rem; }
.case-content { display: grid; grid-template-columns: .65fr 1.5fr; gap: 5rem; padding-block: 3.5rem; }
.case-facts > div { border-top: 1px solid var(--line); padding-block: .9rem 1.25rem; }
.case-facts dt { font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.case-facts dd { font-size: .9375rem; margin-top: .5rem; overflow-wrap: anywhere; }
.case-facts code { font-size: .78rem; }
.case-overview h2 { font-size: 2rem; }
.case-overview > p { font-size: 1.05rem; color: var(--muted); margin-top: 1.25rem; }
.case-overview h3 { margin-top: 2.5rem; font-size: 1.3rem; }
.case-highlights { display: grid; gap: 1.2rem; margin-top: 1.25rem; counter-reset: highlights; }
.case-highlights li { position: relative; padding-left: 2rem; color: var(--muted); font-size: .95rem; }
.case-highlights li::before { counter-increment: highlights; content: '0' counter(highlights); position: absolute; left: 0; top: .25rem; color: var(--green); font-size: .7rem; }
.case-note { background: var(--sage); border-left: 2px solid var(--green); padding: 1.25rem 1.5rem; margin-top: 2rem; }
.case-note h3 { margin-top: 0; font-size: 1rem; }
.case-note p { font-size: .8125rem; color: var(--muted); margin-top: .5rem; }
.project-pager { border-block: 1px solid var(--line); padding-block: 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.project-pager a { min-width: 0; padding: .5rem 0; }
.project-pager a:last-child { text-align: right; }
.project-pager span { display: block; color: var(--muted); font-size: .7rem; margin-bottom: .5rem; }
.project-pager strong { font-size: clamp(1.1rem, 2vw, 1.6rem); font-weight: 500; letter-spacing: -.03em; }
.project-pager a:hover strong { color: var(--green); text-decoration: underline; }
.case-footer { border-top: 0; }
.not-found { max-width: 48rem; min-height: 70vh; padding-block: 5rem; }
.not-found .eyebrow { margin-top: 3rem; }
.not-found h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); margin-top: 1rem; }
.not-found p:not(.eyebrow) { color: var(--muted); margin-block: 1.5rem; max-width: 47ch; }

@media (min-width: 1600px) {
  .hero { gap: 4rem; padding-block: 6.5rem 7rem; }
  .hero h1 { font-size: 6rem; }
}
@media (max-width: 1100px) {
  .wrap { width: calc(100% - 4rem); }
  .hero { gap: 2rem; padding-block: 4rem 4.5rem; }
  .hero h1 { font-size: clamp(3.1rem, 5.7vw, 4.5rem); }
  .hero-showcase { padding-bottom: 6rem; }
  .showcase-stamp { width: 5rem; height: 5rem; font-size: .6rem; }
  .intro-strip > p { padding-inline: 1.4rem; }
  .project-grid { gap: 2.5rem 1.25rem; }
  .project-media { padding: .85rem; }
  .about-grid { gap: 3.5rem; }
  .contact-grid { gap: 3rem; }
  .contact-email { font-size: 1rem; }
  .project-hero { grid-template-columns: 1fr; gap: 1.75rem; }
  .project-actions { justify-content: flex-start; }
}
@media (max-width: 900px) {
  .map-stage { min-height: min(22rem, 38vw); }
  .map-panel-header { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .map-panel-actions { justify-content: flex-start; }
  .main-nav { gap: 1.4rem; }
  .hero { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 3.25rem; }
  .hero-intro { font-size: 1rem; }
  .hero-copy > .eyebrow { font-size: .62rem; }
  .hero-actions { gap: .5rem 1rem; }
  .hero-actions .button { padding-inline: 1rem; gap: 1.25rem; }
  .hero-actions .text-link { font-size: .85rem; }
  .intro-strip strong { font-size: 2.2rem; }
  .intro-strip p > span { font-size: .7rem; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading { gap: 2rem; }
  .section-intro { max-width: 26ch; font-size: .9rem; }
  .about-grid { grid-template-columns: .8fr 1.2fr; gap: 2.5rem; }
  .about-copy .lede { font-size: 1.1rem; }
  .about-copy > p:not(.eyebrow):not(.lede) { font-size: .9rem; }
  .capabilities { gap: 1.5rem; }
  .resume-grid { gap: 3rem; }
  .toolkit { grid-template-columns: 1fr; gap: 1.5rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .contact-copy > p:not(.eyebrow) { max-width: 52ch; }
  .contact-email { font-size: 1.25rem; }
  .contact-form { max-width: 42rem; }
  .case-content { gap: 3rem; }
}
@media (max-width: 700px) {
  html { scroll-padding-top: 9rem; }
  .map-panel-header { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .map-panel-actions { justify-content: flex-start; }
  .map-stage { min-height: 18rem; aspect-ratio: 1 / 1; }
  .map-placeholder { grid-template-columns: 1fr; justify-items: center; align-content: center; text-align: center; gap: .8rem; }
  .map-placeholder-copy .eyebrow { font-size: .625rem; }
  .map-placeholder-copy > p:last-child { font-size: .8125rem; }
  .map-privacy-note { max-width: 56ch; }
  .wrap { width: calc(100% - 2.5rem); }
  .header-inner { flex-wrap: wrap; gap: 0; padding-top: .65rem; padding-bottom: .3rem; }
  .wordmark { font-size: 1.35rem; }
  .wordmark > span { font-size: 1.6rem; }
  .main-nav { width: 100%; justify-content: space-between; gap: .6rem; }
  .main-nav a { font-size: .75rem; min-height: 2.75rem; }
  .main-nav a:last-child { border-bottom: 0; }
  .hero { grid-template-columns: 1fr; gap: 2rem; padding-top: 3rem; padding-bottom: 3.5rem; }
  .hero h1 { font-size: clamp(3.5rem, 10.7vw, 5rem); }
  .hero-copy > .eyebrow { font-size: .65rem; margin-bottom: 1.5rem; }
  .hero-intro { max-width: 44ch; margin-top: 1.35rem; }
  .hero-actions { gap: 1.5rem; margin-top: 1.5rem; }
  .hero-showcase { max-width: 29rem; width: calc(100% - 1.2rem); margin-inline: auto; padding-top: .8rem; padding-bottom: 7.5rem; }
  .showcase-stamp { width: 5.5rem; height: 5.5rem; font-size: .65rem; bottom: 0; }
  .intro-strip { grid-template-columns: 1fr 1fr; padding-block: 1.4rem; }
  .intro-strip > p { gap: .75rem; padding-inline: 1rem; }
  .intro-strip > p:nth-child(2) { border-right: 0; padding-right: 0; }
  .intro-strip .strip-note { display: none; }
  .section-heading { display: block; margin-bottom: 2rem; }
  .section-intro { max-width: 43ch; margin-top: 1.3rem; font-size: .9375rem; }
  .filter-tabs { gap: .35rem; }
  .filter-tabs button { font-size: .75rem; padding: .55rem .6rem; gap: .45rem; }
  .filter-controls { grid-template-columns: 1fr auto; gap: .7rem; }
  .search-field { grid-column: 1 / -1; }
  .collection-meta { align-items: flex-start; font-size: .7rem; }
  .collection-meta > p:last-child { max-width: 20ch; text-align: right; }
  .project-grid { gap: 2rem 1rem; }
  .project-media { padding: .65rem; }
  .project-kicker { font-size: .55rem; flex-wrap: wrap; gap: .25rem; }
  .project-title-row h3 { font-size: 1.25rem; }
  .project-summary { font-size: .8rem; }
  .project-tags { font-size: .6rem; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-portrait { max-width: 18rem; margin-left: .5rem; }
  .capabilities { grid-template-columns: 1fr; gap: 1.5rem; margin-top: 3rem; }
  .capabilities h3 { margin-top: .65rem; }
  .capabilities p { max-width: 50ch; }
  .resume-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .experience-section .section-heading > .text-link { margin-top: 1rem; }
  .toolkit dl { gap: 1.25rem; }
  .footer-top { flex-wrap: wrap; gap: .5rem 1.5rem; }
  .footer-top > p { order: 3; width: 100%; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: .4rem; }
  .case-content { grid-template-columns: 1fr; gap: 2rem; padding-block: 2.5rem; }
  .case-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }
  .project-hero { padding-top: 1.5rem; }
  .project-hero .project-lede { font-size: 1rem; }
  .project-pager { gap: 1.5rem; }
  .is-list .project-link { grid-template-columns: 7rem minmax(0, 1fr); gap: 1rem; }
  .is-list .project-media { align-self: start; padding: .4rem; }
  .is-list .project-kicker span:last-child { display: none; }
  .is-list .project-summary { font-size: .8rem; }
}
@media (max-width: 460px) {
  .project-grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .project-media { padding: 1rem; }
  .project-kicker { font-size: .65rem; flex-wrap: nowrap; }
  .project-title-row h3 { font-size: 1.45rem; }
  .project-summary { font-size: .9rem; }
  .project-tags { font-size: .65rem; }
  .hero h1 { font-size: clamp(2.9rem, 10.7vw, 4rem); }
  .hero-actions { gap: .5rem 1.1rem; }
  .showcase-label { font-size: .6rem; padding: .55rem .6rem; }
  .showcase-secondary { width: 68%; }
  .showcase-stamp { width: 4.7rem; height: 4.7rem; font-size: .6rem; }
  .form-row, .toolkit dl { grid-template-columns: 1fr; }
  .contact-email { font-size: .9375rem; }
  .contact-direct { flex-direction: column; }
  .is-list .project-link { grid-template-columns: 5rem minmax(0, 1fr); gap: .75rem; }
  .is-list .project-title-row h3 { font-size: 1.15rem; }
  .is-list .project-kicker { font-size: .6rem; }
  .is-list .project-tags { font-size: .6rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .showcase-main:hover { transform: rotate(-3deg); }
  .showcase-secondary:hover { transform: rotate(5deg); }
  .project-link:hover .project-media img { transform: none; }
}
@media (forced-colors: active) {
  .button, .filter-tabs button[aria-pressed="true"], .view-switch button[aria-pressed="true"] { border: 2px solid ButtonText; }
  .project-media, .showcase-main, .showcase-secondary { border: 1px solid CanvasText; }
}
@media print {
  .site-header { position: static; }
  .project-tools, .hero-showcase, .contact-form, .legal-notes, .skip-link { display: none !important; }
  .wrap { width: 100%; }
  .hero, .section-space { padding-block: 2rem; }
  .hero, .about-grid, .contact-grid { display: block; }
  .about-portrait { max-width: 10rem; margin-bottom: 2rem; transform: none; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .project-card, .timeline li { break-inside: avoid; }
  .project-link, .case-image img { box-shadow: none; }
}
