
/* Shared typography and navigation */
html { --page-scroll-padding: 96px; scroll-padding-top: var(--page-scroll-padding); }
body { font-size: 16px; }
h1, h2, h3, h4 { letter-spacing: -.018em; }
.eyebrow, .mono { font-size: 14px; letter-spacing: .05em; }
.text-link, .button { font-size: 15px; }
.button { gap: 16px; }
.section { padding-block: clamp(60px, 9vw, 116px); }
.section-heading { align-items: end; }
.section-heading h2 { margin-top: 10px; }
.section-intro { font-size: 16px; }
.caption, figcaption, .muted { font-size: 14px; color: var(--muted); }
.header-shell { position: sticky; inset-block-start: 0; z-index: 20; isolation: isolate; background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header { min-height: 77px; border: 0; }
.site-header nav { font-size: 15px; gap: clamp(14px, 2vw, 28px); }
.site-header nav a[aria-current] { color: var(--accent); }
.site-header nav a[aria-current]::after { transform: scaleX(1); }
.site-header .brand-name { font-size: 11px; }
.nav-resume { color: var(--accent); }
.palette-toggle, .site-header .theme-toggle { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); background: none; border-radius: 50%; }
.palette-toggle:hover, .site-header .theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-moon, [data-theme="light"] .theme-sun { display: none; }
[data-theme="light"] .theme-moon { display: block; }
.scroll-progress { position: absolute; inset: auto 0 -1px; height: 2px; pointer-events: none; }
.scroll-progress span { display: block; background: var(--accent); height: 100%; transform: scaleX(0); transform-origin: left; }

/* Home */
.hero { grid-template-columns: minmax(0, 1.03fr) minmax(0, 1.17fr); padding-block: clamp(45px, 6vw, 88px); gap: clamp(26px, 5vw, 65px); }
.hero h1 { font-size: clamp(46px, 6.5vw, 102px); line-height: 1.02; letter-spacing: -.022em; margin-top: 18px; }
.hero .eyebrow { font-size: 14px; }
.hero-statement { font-size: clamp(20px, 2.1vw, 30px); letter-spacing: -.015em; max-width: 27ch; margin-top: 20px; }
.hero-description { font-size: 16px; max-width: 40ch; margin-top: 12px; }
.hero-copy::before { content: none; }
.availability { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 7px 13px; margin-top: 21px; font-size: 14px; }
.hero-actions { gap: 13px; flex-wrap: wrap; margin-top: 18px; }
.hero-actions .primary span { transform: translate(var(--magnet-x,0),var(--magnet-y,0)); }
.hero .circuit { margin: 0; min-width: 0; }
.flight-launch { color: var(--accent); margin-top: 10px; font-size: 14px; }
.project-flight {
  background: #081222;
  color: #eef7ff;
  --accent: #24ddff;
  --flight-line: #30506a;
  --flight-muted: #adbed3;
  --flight-viewport: calc(100svh - var(--flight-header, 80px));
  --flight-step: 35.6svh;
  --flight-runway: calc(var(--flight-step) * var(--flight-stops, 1));
  height: calc(var(--flight-viewport) + var(--flight-runway));
  scroll-margin-top: calc(var(--flight-header, 80px) - var(--page-scroll-padding));
}
.flight-stage {
  position: sticky;
  top: var(--flight-header, 80px);
  isolation: isolate;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: var(--flight-viewport);
  overflow: clip;
  background:
    radial-gradient(ellipse at 50% 51%, #12354d 0%, #0a1c30 43%, transparent 75%),
    #081222;
}
.flight-top, .flight-index { position: relative; z-index: 1; }
.flight-top {
  grid-row: 1;
  padding-top: clamp(16px, 3.2vh, 34px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}
.flight-top h2 { font-size: clamp(32px, 5vw, 68px); margin-block: 4px; }
.flight-top .eyebrow { color: var(--accent); font-size: 13px; }
.flight-instruction { color: var(--flight-muted); font-size: 15px; }
.flight-skip { white-space: nowrap; color: var(--flight-muted); font-size: 14px; }
.flight-collections {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  align-items: center;
  color: var(--flight-muted);
}
.flight-collections label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.flight-collections select {
  min-height: 44px;
  max-width: min(58vw, 230px);
  padding: 5px 8px;
  border: 1px solid var(--flight-line);
  background: #13263d;
  color: #eef7ff;
  color-scheme: dark;
  font: inherit;
}
.flight-collections .text-link { font-size: 14px; white-space: nowrap; }
.flight-collections [role="status"] { flex-basis: 100%; font-size: 14px; }
.flight-visual {
  grid-row: 2;
  position: relative;
  min-height: 0;
  overflow: hidden;
  container-type: size;
  mask-image: linear-gradient(transparent, #000 13%, #000 88%, transparent);
}
.flight-visual canvas { display: block; width: 100%; height: 100%; }
.flight-tile {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(49vw, 580px, 110vh);
  margin: 0;
  border: 1px solid #32bfd7;
  box-shadow: 0 12px 48px #030b19a6, 0 0 28px #23dfff30;
  background: #0b2034;
  opacity: 0;
}
.flight-tile img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center; }
.flight-tile.portrait { width: min(58vw, 240px, 56cqh); }
.flight-tile.portrait img { aspect-ratio: 3 / 4; object-fit: contain; }
.flight-tile figcaption {
  padding: 5px 12px;
  font: 500 13px / 1.5 var(--mono);
  color: #e8f5fc;
}
.flight-title-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: .65em;
  aspect-ratio: 16 / 9;
  padding: 8%;
  background: linear-gradient(135deg, #122c44, #081828 76%);
}
.flight-title-card p { font: 400 clamp(10px, 1.4vw, 15px) / 1.2 var(--mono); color: var(--accent); }
.flight-title-card strong { font-size: clamp(17px, 3.4vw, 50px); line-height: 1.08; letter-spacing: -.02em; }
.flight-index { grid-row: 3; padding-bottom: clamp(10px, 2.2vh, 24px); }
.flight-meter { height: 2px; background: var(--flight-line); }
.flight-meter span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.flight-index ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.flight-index a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding-inline: 9px;
  border-inline-start: 1px solid var(--flight-line);
  color: var(--flight-muted);
  font-size: 15px;
  line-height: 1.2;
}
.flight-index a span:first-child { color: var(--accent); font: 12px var(--mono); }
.flight-index a:hover, .flight-index a[data-in-view] { color: #fff; border-color: var(--accent); background: #13354a; }
.flight-index a:focus-visible, .flight-skip:focus-visible { outline-offset: -2px; }
@media (max-width: 690px) {
  .project-flight { --flight-step: 31svh; }
  .flight-tile { width: min(72vw, 430px, 116vh); }
  .flight-index ul { grid-template-columns: 1fr 1fr; }
  .flight-index a { font-size: 14px; }
}
@media (max-width: 690px) and (max-height: 670px) {
  .flight-top h2 { font-size: clamp(24px, 6.8vw, 36px); }
  .flight-top .eyebrow { font-size: 11px; }
  .flight-collections .text-link { min-height: 40px; }
  .flight-index ul { grid-template-columns: repeat(var(--flight-columns, 4), minmax(0, 1fr)); }
  .flight-index a { justify-content: center; }
  .flight-index a span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 390px) {
  .flight-collections label span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .flight-collections select { max-width: 52vw; }
}
@media (max-height: 570px) {
  .flight-tile { max-width: 118cqh; }
  .flight-tile.portrait { max-width: 44cqh; }
  .flight-top .eyebrow { display: none; }
  .flight-top { gap: 4px 8px; padding-top: 10px; }
  .flight-top .flight-instruction { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce), (max-height: 420px), print {
  .project-flight, .flight-launch { display: none; }
}
.catalog-link { margin-top: 24px; color: var(--accent); font-size: 15px; }
.work-catalog { padding-block: clamp(36px, 7vw, 96px); }
.work-catalog-heading { display: grid; gap: 16px; padding-bottom: 25px; }
.work-catalog-heading p { color: var(--muted); }
.work-catalog-heading nav { display: flex; flex-wrap: wrap; gap: 6px; }
.work-catalog-heading nav a { padding: 9px 14px; border: 1px solid var(--line); min-height: 44px; font-size: 15px; }
.work-catalog-heading nav a:hover { border-color: var(--accent); }
.work-catalog > section { padding-top: 40px; }
.work-catalog h2 { font-size: clamp(28px, 4vw, 45px); margin-bottom: 17px; }
.catalog-cases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 195px), 1fr)); gap: 5px 15px; }
.catalog-cases li { border-bottom: 1px solid var(--line); }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 10px; }
.catalog-grid article { min-width: 0; padding: 20px; border: 1px solid var(--line); background: var(--surface); }
.catalog-grid article:target { border-color: var(--accent); }
.catalog-grid h3 { font-size: 22px; margin-block: 7px 10px; }
.catalog-grid .eyebrow { color: var(--accent); font-size: 13px; }
.catalog-sources { display: flex; flex-wrap: wrap; gap: 0 12px; margin-top: 8px; }
.catalog-sources .text-link { font-size: 14px; }
.hero .figure-top, .hero .figure-bottom { font-size: 14px; }
.hero .figure-bottom .mono, .core-hint, .layer-toggle { font-size: 14px; }
.circuit .diagram-labels text { font-size: 12px; }
.circuit .circuit-trace { stroke: var(--accent); stroke-dasharray: 1; stroke-opacity: .4; }
.core-hint { color: var(--ink); }
.core-tiles .mono, .core-tiles a > span:last-child { font-size: 14px; }
.core-tiles strong { letter-spacing: -.02em; }
.stats-band { background: var(--surface); border-block: 1px solid var(--line); }
.stats-strip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin-block: 0; }
.stats-strip > div { display: flex; flex-direction: column-reverse; padding: 25px clamp(8px, 2.9vw, 40px); border-right: 1px solid var(--line); }
.stats-strip > div:first-child { padding-left: 0; }
.stats-strip > div:last-child { border-right: 0; }
.stats-strip dd { color: var(--accent); font-size: clamp(30px,4.3vw,60px); letter-spacing: -.02em; line-height: 1.1; margin: 0 0 7px; font-variant-numeric: tabular-nums; }
.stats-strip dt { color: var(--muted); font-size: 15px; }

.filters button { font-size: 14px; min-height: 44px; border-radius: 99px; }
.filter-count { font-size: 14px; }
.project-grid { gap: 60px clamp(20px, 3vw, 42px); }
.project-visual { aspect-ratio: auto; padding: 15px; gap: 12px; min-width: 0; }
.visual-label { font-size: 14px; min-height: 26px; }
.project-visual .image-frame, .project-visual.signspeak-junior .image-frame { position: relative; display: grid; place-items: center; aspect-ratio: 16/10; width: 100%; height: auto; max-width: none; margin: 0; border: 0; border-radius: 3px; box-shadow: none; overflow: hidden; background: var(--surface); }
.project-visual .image-frame img { object-fit: cover; object-position: center top; }
.project-visual.smart-face-door-lock .image-frame img, .project-visual.signspeak-junior .image-frame img { object-fit: contain; object-position: center; }
.project-visual.signspeak-junior .image-frame { background: linear-gradient(130deg, var(--surface), var(--surface-raised)); }
.project-visual::after { display: none; }
.project-visual:hover .image-frame, .project-visual:focus-visible .image-frame { transform: perspective(900px) rotateX(var(--tilt-y,0deg)) rotateY(var(--tilt-x,0deg)); }
.project-heading h3 { font-size: clamp(24px, 3vw, 34px); }
.project > p { font-size: 16px; line-height: 1.7; max-width: none; margin-top: 9px; }
.project > .project-result { margin-top: 13px; border-inline-start: 2px solid var(--accent); padding-inline-start: 12px; color: var(--ink); font-size: 15px; }
.card-preview { margin-top: 12px; }
.card-preview summary { min-height: 44px; padding-block: 10px; color: var(--accent); font-size: 15px; cursor: pointer; width: fit-content; }
.card-preview video, .case-video { display: block; width: 100%; background: var(--media-matte); }
.card-preview p, .case-video + p { margin-top: 9px; }

.achievement-section, .research-section { background: var(--surface); }
.award-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.award { padding: clamp(24px,3vw,38px); background: var(--paper); min-width: 0; }
.award-lead { grid-column: span 2; background: var(--surface-raised); }
.award h3 { font-size: clamp(23px,2.8vw,38px); margin-block: 10px; }
.award-lead h3 { font-size: clamp(28px,4.5vw,62px); }
.award .award-result { color: var(--accent); font-weight: 750; }
.award p { color: var(--muted); font-size: 15px; }
.credentials { margin-top: 60px; }
.credentials > h3 { margin-bottom: 17px; font-size: 24px; }
.credential-list li { grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 12px 24px; padding: 15px 0; }
.credential-list h4 { margin: 0; font-size: 16px; }
.credential-list p, .credential-list time { font-size: 14px; }
.credential-list .text-link { min-height: 44px; color: var(--accent); }
.experience-entries { gap: 22px; }
.experience-entries article { border-top: 2px solid var(--accent); background: var(--surface); padding: 25px; }
.experience-entries h3 { margin-block: 10px; font-size: 30px; }
.experience-company { font-weight: 700; margin-bottom: 9px; }

.about-section { background: var(--surface-raised); }
.about-grid { gap: clamp(24px, 6vw, 95px); grid-template-columns: .85fr 1.15fr; }
.about-portrait { max-width: none; }
.about-portrait img { max-height: 640px; filter: none; aspect-ratio: 4/5; object-position: center 26%; }
.about-portrait .portrait-caption { display: block; font-size: 14px; line-height: 1.6; }
.portrait-caption a, .community-photo figcaption a { text-decoration: underline; text-underline-offset: 4px; }
.about-copy h2 { margin-block: 14px 20px; letter-spacing: -.018em; }
.about-copy p:not(.eyebrow) { font-size: 16px; }
.about-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 18px 0 0; margin: 23px 0 0; border-top: 1px solid var(--line); list-style: none; color: var(--muted); font-size: 14px; }
.about-links { gap: 6px 22px; }
.about-links .text-link { font-size: 15px; }
.dataset-spotlight { background: var(--midnight); color: var(--on-midnight); --accent:var(--signal); --muted:var(--on-midnight-muted); --line:var(--midnight-line); padding-block: clamp(48px,8vw,95px); }
.spotlight-grid { display: grid; grid-template-columns: 1.13fr .87fr; gap: clamp(20px,6vw,90px); align-items: center; }
.dataset-spotlight h2 { margin-block: 12px 16px; }
.dataset-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border-block: 1px solid var(--line); margin: 0 0 14px; }
.dataset-grid div { display: flex; flex-direction: column-reverse; padding: 14px 16px; }
.dataset-grid div:nth-child(odd) { border-right: 1px solid var(--line); }
.dataset-grid div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.dataset-grid dt { font-size: 14px; color: var(--muted); }
.dataset-grid dd { margin: 0; color: var(--signal); font-size: clamp(26px,4vw,48px); }
.tools-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.tool-card { border: 1px solid var(--line); padding: 23px; background: var(--surface); }
.tool-card svg { color: var(--accent); margin-bottom: 15px; }
.tool-card h3 { font-size: 23px; }
.tool-card ul { padding: 0; margin: 14px 0 0; list-style: none; }
.tool-card li { color: var(--muted); font-size: 16px; }
.community-photo { background: var(--media-matte); color: var(--on-midnight); }
.community-photo img { width: 100%; height: clamp(270px, 45vw, 590px); object-fit: cover; object-position: center 40%; }
.community-photo figcaption { padding-block: 13px; color: var(--on-midnight-muted); }
.roadmap-card { background: var(--surface); }
.roadmap-heading p, .role-step .mono, .roadmap-outreach p { font-size: 14px; }
.role-step p { font-size: 16px; }
.roadmap-node, .chapter-mark { font-size: 14px; }
.roadmap-outreach .text-link { color: var(--accent); }
.research-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.research-grid article { border: 1px solid var(--line); background: var(--paper); padding: clamp(18px, 4vw, 35px); }
.research-grid h3 { margin-block: 9px 12px; }
.research-grid p:not(.eyebrow), .now-section > p { color: var(--muted); }
.now-section { display: grid; grid-template-columns: 1fr 1.5fr; align-items: center; gap: clamp(16px, 5vw, 60px); }
.now-section > p { font-size: 18px; }
.github-section { background: var(--surface); }
.activity-block { border: 1px solid var(--line); padding: 24px; }
.activity-cells { display: grid; width: fit-content; max-width: 100%; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); grid-auto-columns: minmax(0, 1fr); gap: clamp(2px,.4vw,5px); margin-block: 14px; }
.activity-cells span { width: clamp(6px, 2.1vw, 15px); aspect-ratio: 1; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 2px; }
.activity-cells [data-level="1"] { background: color-mix(in srgb, var(--accent) 34%, var(--paper)); }
.activity-cells [data-level="2"] { background: color-mix(in srgb, var(--accent) 56%, var(--paper)); }
.activity-cells [data-level="3"] { background: color-mix(in srgb, var(--accent) 78%, var(--paper)); }
.activity-cells [data-level="4"] { background: var(--accent); }
.pinned-title { margin-top: 25px; }
.pinned-list { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; padding: 0; }
.pinned-list .text-link { text-decoration: underline; text-underline-offset: 3px; word-break: break-word; }
.contact-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 35px; align-items: start; }
.contact-section { padding-block: clamp(45px, 8vw, 95px); }
.contact-section .eyebrow { font-size: 14px; }
.contact-grid h2 { margin-block: 13px; }
.contact-grid h2 span { color: var(--accent); }
.contact-button { width: fit-content; min-width: 0; }
.contact-form { display: grid; gap: 12px; }
.contact-form[data-netlify]:not([data-draft-ready]) { display: none; }
.contact-form .caption { color: var(--on-midnight-muted); }
.contact-form label { display: grid; gap: 4px; }
.contact-form input, .contact-form textarea, #palette-search { width: 100%; border: 1px solid var(--line); border-radius: 3px; padding: 10px 12px; background: var(--paper); color: var(--ink); font: inherit; }
.contact-form { --paper: var(--media-matte); --ink: var(--on-midnight); --line: var(--midnight-line); }
.contact-form button { justify-self: start; }

.site-footer .footer-signature { display: inline-block; min-height: 0; letter-spacing: -.018em; }
.footer-heading { gap: 20px; padding-bottom: 24px; }
.footer-columns { gap: 24px; padding-block: 27px 35px; }
.footer-columns > div { gap: 0; }
.footer-columns a { font-size: 15px; min-height: 42px; }
.footer-columns .eyebrow { font-size: 14px; }
.footer-bottom { font-size: 14px; }
.connected-footer.site-footer { padding-top: 40px; }

/* Project pages */
.detail-hero h1 { letter-spacing: -.018em; }
.detail-cover { padding: 0; background: var(--surface); }
.detail-cover img { width: 100%; max-height: none; aspect-ratio: auto; border-radius: 0; background: transparent; object-fit: contain; box-shadow: none; }
.detail-cover.signspeak-junior img { margin-inline: auto; width: min(100%, 540px); max-width: none; max-height: 900px; }
.detail-cover figcaption { font-size: 14px; padding: 0 12px 14px; }
.detail-cover > a, .case-image > a { display: block; }
#screenshots { scroll-margin-top: 16px; }
.project-facts dt { font-size: 14px; }
.project-facts dd { font-size: 16px; }
.case-layout { grid-template-columns: minmax(150px, .29fr) minmax(0,1.71fr); gap: 5%; align-items: start; }
.case-navigation { top: 105px; }
.case-navigation a, .case-navigation .eyebrow { font-size: 15px; min-height: 35px; }
.case-content { max-width: none; }
.case-content h2, .case-content h3 { letter-spacing: -.018em; }
.case-content h2:first-child { margin-top: 0; }
.case-content p, .case-content .feature-list li { font-size: 17px; line-height: 1.75; }
.case-content .caption, .case-content .small-note, .case-image figcaption, .architecture-figure figcaption { font-size: 14px; }
#companion .case-image { max-width: 320px; }
.case-content .source-links .text-link { font-size: 15px; }
.case-content .case-result { border-left: 3px solid var(--accent); padding-left: 16px; color: var(--ink); margin-bottom: 22px; }
.architecture { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 24px; }
.architecture li { position: relative; min-height: 124px; padding: 14px; border: 1px solid var(--line); border-top: 2px solid var(--accent); font-size: 16px; line-height: 1.35; gap: 12px; }
.architecture li:not(:last-child)::after { content: '→'; position: absolute; right: -22px; top: calc(50% - 12px); color: var(--accent); font-size: 20px; }
.architecture-node { display: flex; align-items: center; gap: 8px; font: 14px var(--mono); color: var(--accent); }
.next-project > a { letter-spacing: -.018em; }

/* Photo gallery, quick navigation, and résumé */
.photo-intro h1 { letter-spacing: -.018em; }
.photo-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(20px,4vw,48px); columns: unset; }
.event-photo { margin: 0; min-width: 0; }
.event-photo > a { display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); }
.event-photo img { max-height: clamp(300px,44vw,530px); width: 100%; height: auto; object-fit: contain; }
.event-photo figcaption { color: var(--ink); }
.event-photo figcaption p { font-size: 16px; }
.event-photo small { font-size: 14px; }
.photo-return { margin-top: 35px; border-color: var(--line); }
dialog { background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 20px; width: min(94vw, 640px); max-height: 90dvh; box-shadow: 0 24px 80px #0006; }
dialog::backdrop { background: #020817d9; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.dialog-heading h2 { font-size: 24px; }
.dialog-heading button, .lightbox-controls button { min-height: 44px; min-width: 44px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); }
.dialog-heading button { font-size: 24px; }
.palette-results { padding: 0; margin: 12px 0 0; list-style: none; max-height: min(55vh, 440px); overflow: auto; }
.palette-results a { display: block; padding: 9px 8px; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px; }
.palette-results a:hover, .palette-results a:focus-visible { color: var(--accent); background: var(--surface); outline-offset: -3px; }
.palette-empty { color: var(--muted); margin-top: 15px; }
.lightbox { width: min(94vw, 1050px); }
.lightbox img { width: 100%; height: min(62dvh, 680px); object-fit: contain; }
.lightbox figcaption { font-size: 14px; margin-block: 9px; }
.lightbox-controls { display: flex; justify-content: space-between; gap: 6px; }
.lightbox-controls button { padding-inline: 12px; }
.resume-main { max-width: 920px; padding-block: 34px 70px; }
.resume-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 25px; }
.resume-actions > a:first-child { margin-right: auto; }
.resume-sheet { padding: clamp(18px, 5vw, 52px); border: 1px solid var(--line); background: var(--surface); }
.resume-sheet header { border-bottom: 2px solid var(--accent); padding-bottom: 14px; }
.resume-sheet h1 { font-size: clamp(34px,6vw,57px); }
.resume-sheet address { font-style: normal; font-size: 15px; margin-top: 5px; }
.resume-sheet a { text-decoration: underline; text-underline-offset: 3px; }
.resume-sheet section { margin-top: 20px; }
.resume-sheet h2 { color: var(--accent); font-size: 22px; margin-bottom: 6px; }
.resume-sheet h3 { font-size: 17px; font-weight: 750; }
.resume-sheet p { max-width: none; }
.resume-item + .resume-item { margin-top: 8px; }

@media (max-width: 1050px) {
  .site-header nav { gap: 14px; font-size: 14px; }
  .tools-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .case-layout { grid-template-columns: minmax(130px,.35fr) minmax(0,1.65fr); }
}
@media (max-width: 760px) {
  html { --page-scroll-padding: 79px; }
  .site-header { min-height: 64px; }
  .header-controls { gap: 6px; }
  .site-header nav { gap: 2px; }
  .hero { grid-template-columns: 1fr; gap: 23px; }
  .hero h1 { font-size: clamp(48px, 12.4vw, 78px); }
  .hero .figure-top, .hero .figure-bottom .mono { font-size: 12px; }
  .hero .figure-bottom .mono { max-width: 48%; }
  .core-tiles .mono, .core-tiles a > span:last-child { font-size: 11px; }
  .stats-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stats-strip > div { padding: 12px 13px; }
  .stats-strip > div:nth-child(odd) { padding-left: 0; }
  .stats-strip > div:nth-child(even) { border-right: 0; }
  .stats-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .work-controls { align-items: flex-start; flex-direction: column; }
  .filters button { font-size: 14px; padding-inline: 10px; }
  .project-grid, .contact-grid, .spotlight-grid, .about-grid, .now-section { grid-template-columns: 1fr; }
  .project-grid { gap: 35px; }
  .award-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .credential-list li { grid-template-columns: minmax(0,1fr) auto; }
  .credential-list a { grid-column: 1/-1; justify-self: start; }
  .case-layout { display: block; }
  .case-navigation { gap: 8px 15px; }
  .architecture { grid-template-columns: 1fr; gap: 20px; }
  .architecture li { min-height: 65px; flex-direction: row; align-items: center; gap: 14px; }
  .architecture li:not(:last-child)::after { content: '↓'; right: auto; left: 19px; top: calc(100% - 2px); }
}
@media (max-width: 520px) {
  .tools-grid, .research-grid, .photo-columns { grid-template-columns: 1fr; }
  .site-header .brand-name { display: none; }
  .footer-columns { gap: 20px; }
  .award { padding: 17px; }
  .roadmap-card { padding: 18px 13px; }
  .activity-block { padding: 12px; }
  .activity-cells span { width: clamp(5px, 1.8vw, 9px); }
  .photo-intro h1 { font-size: clamp(36px, 11vw, 64px); }
  .footer-columns > div:last-child { grid-column: auto; }
  .resume-actions .button { min-height: 44px; padding: 9px 11px; font-size: 14px; }
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
}
@media (prefers-reduced-motion: reduce) {
  .project-visual:hover .image-frame, .hero-actions .primary span { transform: none; }
}
@media print {
  :root, :root[data-theme] { color-scheme: light !important; background: white; }
  .header-shell, .resume-actions, .connected-footer.site-footer, dialog { display: none !important; }
  .resume-main { width: 100%; max-width: none; padding: 0; }
  .resume-sheet { padding: 0; border: 0; background: white; color: #102645; font-size: 10.5pt; line-height: 1.42; }
  .resume-sheet header { padding-bottom: 8px; }
  .resume-sheet h1 { font-size: 27pt; }
  .resume-sheet address { font-size: 9pt; }
  .resume-sheet section { margin-top: 13px; }
  .resume-sheet h2 { color: #006479; font-size: 12pt; margin-bottom: 4px; }
  .resume-sheet h3 { font-size: 10pt; }
  .resume-item, .resume-sheet header { break-inside: avoid; }
  .resume-item + .resume-item { margin-top: 4px; }
  .resume-sheet a::after { content: none !important; }
  @page { size: A4; margin: 15mm 17mm; }
}
