@font-face {
  font-family: "Product Sans";
  src: url("../fonts/product-sans-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Product Sans";
  src: url("../fonts/product-sans-medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Product Sans";
  src: url("../fonts/product-sans-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --font-primary: "Product Sans", Arial, sans-serif;
  --font-secondary: "Instrument Sans", Arial, sans-serif;
  --font: var(--font-primary);
  --font-display: var(--font-primary);
  --sans: var(--font-primary);
  --text-xs: .8125rem;
  --text-sm: .9375rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --heading-card: clamp(1.5rem, 2.5vw, 2rem);
  --heading-section: clamp(2rem, 3.4vw, 3rem);
  --heading-page: clamp(2.5rem, 5.5vw, 4.5rem);
}

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { font-family: var(--font-primary); font-size: var(--text-base); line-height: 1.75; font-synthesis: none; }
button, input, textarea, select { font-family: inherit; }

body h1, body .intro h1, body .hero h1, body .inner-hero h1, body.error-page h1 {
  font-family: var(--font-primary);
  font-size: var(--heading-page);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.045em;
}

body h2, body .section-heading h2, body .about-intro h2, body .prose h2,
body .craft-copy h2, body .hero-copy h2, body .contact h2,
body .contact-intro h2, body .contact-band h2 {
  font-family: var(--font-primary);
  font-size: var(--heading-section);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.035em;
}

body h3, body .portfolio-grid h3, body .card-copy h3, body .project-lead h3 {
  font-family: var(--font-primary);
  font-size: var(--heading-card);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -.025em;
}

body .more-work-heading h3, body .list-copy h3, body .project-row-copy h3,
body .engineering-heading h3, body .stack-grid h3, body .expertise-item h3,
body .contact-aside h2, body .contact-layout h2 {
  font-size: var(--text-xl);
  line-height: 1.3;
}

body .hero-description, body .project-description, body .card-description,
body .work-heading p, body .section-note, body .list-copy > p:not(.eyebrow),
body .about-copy > p, body .prose p, body .expertise-item p, body .stack-grid p,
body .craft-copy > p, body .contact-intro > p:not(.eyebrow), body .contact-aside p,
body .contact-band-copy > p, body.error-page > p:not(.eyebrow) {
  font-size: var(--text-base);
  line-height: 1.8;
}

body .intro-lead, body .inner-lead, body .about-copy > p:first-child {
  font-size: var(--text-lg);
  line-height: 1.75;
}

body .eyebrow, body .mono, body .breadcrumbs, body .intro-baseline,
body .intro-portrait figcaption, body .about-photo-caption, body .hero-caption,
body .hero-baseline .byline, body .project-stack, body .contribution-note,
body .list-number, body .list-detail, body .contact-label, body .copy-status,
body .tags > li, body .stack-tools, body .section-code, body .section-kicker,
body .physics-top, body .physics-help, body .physics-values, body .reset,
body .code-head, body .screen-head, body pre, body .study-help,
body .diagram-status, body .diagram-legend, body .node-index, body .node-caption,
body .footer-note, body .copyright {
  font-family: var(--font-secondary);
  font-size: var(--text-xs);
  line-height: 1.6;
}

body .eyebrow, body .eyebrow.mono, body .expertise-item .mono,
body .portfolio-grid .project-copy > .eyebrow, body .list-copy .eyebrow,
body .more-work-heading .eyebrow, body .hero-copy .eyebrow,
body .intro-copy .eyebrow, body .engineering-heading .eyebrow {
  font-size: var(--text-xs);
  letter-spacing: .08em;
}

body .button, body .text-link, body .project-link, body .copy-button,
body .nav-github, body .brand-copy, body .footer-brand, body .footer-links,
body .build-status, body .contact-card-row > a, body .contact-card-row > div,
body .contact-page-link, body .contact-aside ul, body .craft-detail,
body .craft-detail p, body .project-facts, body .metric > span,
body .state-buttons button, body .live-ticket button, body .demo-control,
body .section-current {
  font-size: var(--text-sm);
}

body .nav-links a, body .header .nav-links a, body .nav-contact,
body .show-navigation, body .identity, body .header .identity,
body .site-footer, body .footer-inner > p {
  font-size: var(--text-xs);
}

body .header .nav-links a[href="#about"] { font-size: var(--text-xs); }
body .section-kicker { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body pre, body code, body kbd, body samp { font-family: var(--font-secondary); }
body .source-grid :is(.code-head, .screen-head) { font-size: var(--text-sm); }
body .code-window pre { font-size: var(--text-base); line-height: 1.8; }
body .live-ticket h4 { font-size: var(--heading-section); }
body .live-ticket p:not(.eyebrow) { font-size: var(--text-lg); }
@media (max-width: 760px) {
  body .code-window pre { font-size: var(--text-sm); }
  body .live-ticket p:not(.eyebrow) { font-size: var(--text-base); }
}
body .brand-copy > span, body .identity small { font-size: var(--text-xs); }
body .physics-values small { font-size: var(--text-xs); }
body .physics-values output { font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
body .diagram-node h4 { font-family: var(--font-primary); font-size: var(--text-sm); }
body .node-glyph text, body .wire-caption { font-family: var(--font-secondary); }
body .nav-number, body .visual-index, body .visual-note,
body .figure-label, body .diagram-caption, body .scroll-cue,
body .annotation, body .annotation .eyebrow, body .layer-number {
  font-family: var(--font-secondary);
  font-size: var(--text-xs);
  line-height: 1.6;
}
body .visual-index { right: 24px; }
body .portfolio-grid > .project:not(.project-lead) .project-visual { height: 400px; min-height: 400px; }
body .section-code { width: auto; min-width: 32px; padding-inline: 6px; }
body .section-code:empty { display: none; }
body .diagram-stage, body .diagram-key { display: contents; }
body .hero-baseline { flex-wrap: wrap; }
body .hero-baseline .diagram-caption { position: static; transform: none; white-space: normal; }
body .email-link, body .contact-layout .email-link { font-size: clamp(1rem, 2vw, 1.5rem); }
body .phone-block > a { font-size: var(--text-lg); }

.icon {
  display: inline-block;
  width: 1.125em;
  height: 1.125em;
  flex: 0 0 auto;
  vertical-align: -.18em;
  overflow: visible;
}

body .button .icon, body .text-link .icon, body .project-link .icon,
body .nav-github .icon, body .footer-links .icon, body .site-footer .icon,
body .reset .icon { width: 1rem; height: 1rem; }
body .text-link { align-items: center; }
body .site-footer nav a { gap: 6px; }
body .project-link > span[aria-hidden] { display: inline-flex; }
body .row-arrow, body .list-arrow { display: inline-flex; }
body .row-arrow .icon, body .list-arrow .icon, body .back-top .icon { width: 1.5rem; height: 1.5rem; }
body .contact-action .icon { width: 2rem; height: 2rem; }
body .contact-band h2 > span { display: inline-flex; font-size: inherit; }
body .contact-band h2 .icon { width: .7em; height: .7em; }
body .section-number .icon { width: 1rem; height: 1rem; }
body .source-connector .icon { width: 1.25rem; height: 1.25rem; }
body .travel-route .icon { width: 2rem; height: 2rem; }
body .signal { display: inline-flex; align-items: center; gap: 3px; }
body .signal .icon { width: 13px; height: 9px; }
body .signal .icon-battery { width: 16px; }
body .phone-status { min-height: 31px; }
body .workspace-add .icon, body .plane .icon { width: 1em; height: 1em; }
body .booking-icons { display: inline-flex; align-items: center; }
body .booking-icons .icon { width: 1rem; height: 1rem; }
body #booking-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
body #booking-button .icon-check, body #booking-button .icon-loader,
body #booking-button[data-variant="reserving"] .icon-arrow-up-right,
body #booking-button[data-variant="confirmed"] .icon-arrow-up-right { display: none; }
body #booking-button[data-variant="reserving"] .icon-loader,
body #booking-button[data-variant="confirmed"] .icon-check { display: inline-block; }

@media (max-width: 760px) {
  body .header .nav-links a { padding-inline: 6px; }
  body .header .nav { padding-inline: 8px; gap: 6px; }
  body .header .identity { gap: 6px; }
  body .section-code { min-width: 28px; }
  body .section-top { align-items: flex-start; }
  body .engineering-caption { flex-wrap: wrap; gap: 8px; }
  body .diagram-node, body .release-canvas .diagram-node { min-height: 144px; height: auto; }
  body .physics-values { gap: 8px; }
  body .contact-action .icon { width: 1.5rem; height: 1.5rem; }
  body .exploded { height: auto; }
  body .hero-pin { position: relative; top: 0; height: auto; min-height: 0; overflow: visible; }
  body .hero-layout { height: auto; }
  body .hero-copy { position: relative; top: auto; left: auto; width: 100%; padding-top: 32px; }
  body .diagram { position: relative; top: auto; right: auto; width: 100%; height: auto; margin-top: 32px; }
  body .figure-label { position: static; margin-bottom: 24px; }
  body .diagram-stage { display: block; position: relative; height: 440px; }
  body .diagram-key { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
  body .diagram-key .annotation { position: static; width: auto; opacity: 1 !important; transform: none !important; }
  body .diagram-key .annotation::before, body .diagram-key .annotation::after { display: none; }
  body .diagram-key .annotation .eyebrow { letter-spacing: .03em; }
  body .hero-baseline { position: static; margin-top: 32px; padding-bottom: 24px; }
  body .hero-baseline .diagram-caption { flex-basis: 100%; }
  body .hero-baseline .scroll-cue { gap: 12px; }
}

@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  body .diagram-stage { height: 640px; }
}
