:root {
  color-scheme: dark;
  --bg: #0d0d10;
  --surface: #17171c;
  --border: #34343b;
  --text: #f5f3f3;
  --muted: #b9b7c0;
  --accent: #ff555b;
  --button: #c92032;
  --shell: 1312px;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; line-height: 1.58; }
body:has(dialog[open]) { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
figure, dl, dd, p, h1, h2, h3 { margin: 0; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #ff8387; outline-offset: 4px; }
[id] { scroll-margin-top: 106px; }

.shell { width: min(calc(100% - 112px), var(--shell)); margin-inline: auto; }
.section-space { padding-block: clamp(56px, 8vw, 122px); }
.visually-hidden, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip-link:focus { position: fixed; top: 12px; left: 12px; z-index: 20; padding: 10px 15px; background: white; color: black; }
.eyebrow { font-weight: 760; font-size: .73rem; line-height: 1.4; letter-spacing: .14em; color: var(--accent); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: 0 0 8px; }
h2 { font-size: clamp(2.25rem, 4.5vw, 4.5rem); font-weight: 760; letter-spacing: -.056em; line-height: 1.02; }
h3 { font-size: clamp(1.2rem, 2vw, 1.8rem); font-weight: 720; letter-spacing: -.026em; line-height: 1.15; }
.text-link { display: inline-block; font-size: .91rem; font-weight: 680; text-underline-offset: 5px; text-decoration: underline; text-decoration-color: #807d85; }
.text-link:hover, .sources-section a:hover { color: #ff8387; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 13px; padding: 10px 17px; font-size: .88rem; font-weight: 740; }
.button-red { background: var(--button); color: #fff; }
.button-red:hover { background: #a71728; }

.site-header { position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--border); background: #0d0d10f7; }
.header-inner { min-height: 72px; display: flex; gap: 26px; align-items: center; }
.brand { display: inline-block; flex: 0 0 auto; width: 98px; }
.main-nav { margin-left: auto; display: flex; align-items: center; gap: clamp(14px, 2.5vw, 34px); font-size: .86rem; }
.main-nav a { padding-block: 10px; color: var(--muted); }
.main-nav a:hover { color: var(--text); }
.header-contact, .menu-toggle { border: 1px solid var(--border); background: transparent; padding: 7px 11px; font-size: .84rem; font-weight: 680; white-space: nowrap; }
.header-contact:hover, .menu-toggle:hover { border-color: var(--accent); }
.menu-toggle { display: none; }

.hero { display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.42fr); align-items: center; gap: clamp(26px, 4vw, 68px); padding-block: clamp(45px, 6vw, 91px); }
.hero-copy { padding-block: 10px; }
.hero .eyebrow { display: flex; align-items: center; gap: 8px; }
.hero h1 { margin-block: 17px 15px; font-size: clamp(3.05rem, 6.1vw, 6.3rem); font-weight: 820; letter-spacing: -.071em; line-height: .94; }
.hero h1 em { display: inline-block; color: var(--accent); font-style: normal; font-size: .83em; white-space: nowrap; }
.hero-deck { font-size: clamp(1.2rem, 2vw, 1.78rem); font-weight: 720; letter-spacing: -.036em; line-height: 1.18; }
.hero-description { margin-block: 15px 22px; max-width: 40ch; color: var(--muted); }
.hero-art { position: relative; min-width: 0; border: 1px solid #4e262d; background: #1f1519; box-shadow: 0 26px 90px #0005; }
.hero-art img { width: 100%; }
.hero-art figcaption { display: flex; justify-content: space-between; gap: 10px; padding: 11px 15px; border-top: 1px solid #4e262d; background: #151115; color: var(--muted); font-size: .69rem; letter-spacing: .12em; font-weight: 720; }
.hero-art figcaption span:first-child { color: var(--accent); }
.concept-strip { background: #191317; border-block: 1px solid #40242c; }
.concept-strip .shell { display: flex; align-items: baseline; gap: 13px; padding-block: 13px; color: var(--muted); font-size: .9rem; }
.concept-strip strong { color: var(--text); }

.metrics { display: grid; grid-template-columns: minmax(155px, .62fr) minmax(0, 3fr); align-items: center; gap: 22px; padding-block: 30px; border-bottom: 1px solid var(--border); }
.metric-heading p:nth-child(2) { margin-block: 5px 8px; font-weight: 700; line-height: 1.35; }
.metric-heading .text-link { font-size: .8rem; }
.metrics dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metrics dl > div { padding: 5px 14px; border-left: 1px solid var(--border); }
.metrics dt { color: var(--muted); font-size: .8rem; }
.metrics dd:not(.metric-note) { color: var(--text); font-size: clamp(1.75rem, 3.3vw, 3.25rem); font-weight: 780; letter-spacing: -.07em; line-height: 1.11; }
.metrics small { font-size: .49em; letter-spacing: -.02em; }
.metrics .metric-note { margin-top: 3px; font-size: .74rem; color: var(--muted); }

.section-heading { display: grid; grid-template-columns: minmax(0, 1.27fr) minmax(0, .73fr); align-items: end; gap: 20px 40px; margin-bottom: 29px; }
.section-heading h2, .memory-layout h2, .project-inner h2 { margin-top: 10px; }
.section-heading > p, .section-heading > div:last-child > p:not(.eyebrow) { color: var(--muted); max-width: 48ch; }
.spec-wrap { overflow-x: auto; border: 1px solid var(--border); background: #141418; }
.spec-table { width: 100%; min-width: 730px; border-collapse: collapse; text-align: left; line-height: 1.47; font-size: .91rem; }
.spec-table th, .spec-table td { padding: 15px 16px; vertical-align: top; border-bottom: 1px solid var(--border); }
.spec-table thead th { background: #23191e; color: var(--text); font-weight: 750; }
.spec-table thead th:nth-child(2), .spec-table thead th:nth-child(3) { width: 42%; }
.spec-table tbody th { color: var(--text); font-weight: 700; }
.spec-table tbody td { color: #d4d0d7; }
.spec-table tbody tr:nth-child(even) { background: #19191e; }
.spec-table tbody tr:last-child > * { border-bottom: 0; }
.table-hint { display: none; margin-bottom: 8px; color: var(--muted); font-size: .82rem; }
.fine-print { margin-top: 12px; color: var(--muted); font-size: .84rem; }
.fine-print a { text-decoration: underline; text-underline-offset: 4px; }

.memory-section { border-block: 1px solid var(--border); background: #131317; }
.memory-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .83fr); align-items: center; gap: clamp(22px, 5vw, 80px); }
.memory-layout > div > p:last-child, .memory-example p:last-child { margin-top: 17px; color: var(--muted); }
.memory-example { border: 1px solid #512831; border-top: 3px solid var(--accent); background: linear-gradient(140deg, #271a21, #1b171c 74%); padding: clamp(20px, 3.5vw, 46px); }
.memory-example h3 { margin-top: 9px; }
.equation { margin-top: 18px; color: var(--muted); font-size: .9rem; }
.equation strong { display: block; color: var(--text); font-size: clamp(2rem, 4vw, 3.7rem); line-height: 1.1; letter-spacing: -.055em; }

.feature-figure { min-width: 0; border: 1px solid var(--border); background: #151519; }
.feature-figure img { width: 100%; }
#cooling > .feature-figure { max-width: 1040px; margin-inline: auto; }
.feature-figure figcaption { display: flex; flex-wrap: wrap; gap: 10px 20px; padding: 12px 15px; color: var(--muted); font-size: .79rem; }
.feature-figure figcaption span:last-child { margin-left: auto; }
.feature-figure i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.legend-blue { background: #56ceff; }
.legend-orange { background: #ff9c44; }
.thermal-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; margin: 26px 0; padding: 0; list-style: none; }
.thermal-steps li { padding: 18px; background: var(--surface); border: 1px solid var(--border); border-top-color: #91454e; }
.thermal-steps li > strong { display: block; margin-bottom: 6px; color: var(--accent); font-size: .75rem; letter-spacing: .1em; }
.thermal-steps h3 { font-size: 1.12rem; }
.thermal-steps p { margin-top: 7px; color: var(--muted); font-size: .88rem; }
.thermal-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.validation { margin-top: 27px; padding: clamp(18px, 3vw, 31px); display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 10px 25px; border: 1px solid var(--border); border-left: 3px solid var(--accent); background: #18161b; }
.validation h3 { margin-block: 7px 8px; }
.validation p:not(.eyebrow), .validation ul { color: var(--muted); font-size: .9rem; }
.validation ul { margin-block: 0; padding-left: 18px; }
.validation li + li { margin-top: 7px; }

.gallery-section { border-top: 1px solid var(--border); }
.gallery-section .section-heading .text-link { margin-top: 12px; }
.gallery-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 9px 16px; align-items: center; margin-bottom: 17px; }
.gallery-filters { display: none; flex-wrap: wrap; gap: 7px; }
.has-js .gallery-filters { display: flex; }
.gallery-filters button { min-height: 40px; border: 1px solid var(--border); padding: 5px 13px; background: var(--surface); font-size: .84rem; font-weight: 680; }
.gallery-filters button[aria-pressed="true"] { border-color: #e15561; background: #4c1923; }
.gallery-filters button:hover { border-color: #e15561; }
.gallery-count { color: var(--muted); font-size: .81rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.gallery-card { min-width: 0; background: var(--surface); border: 1px solid var(--border); }
.gallery-card a { display: block; position: relative; }
.gallery-card a:hover .image-expand { background: #a71728; }
.gallery-card img { width: 100%; }
.image-expand { position: absolute; right: 8px; bottom: 8px; display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #fff6; background: #100d10e8; }
.gallery-card figcaption { padding: 10px 12px 13px; border-top: 1px solid var(--border); }
.gallery-card figcaption > span { color: var(--accent); font-size: .69rem; font-weight: 750; letter-spacing: .09em; }
.gallery-card h3 { margin-top: 3px; font-size: 1rem; }

.sources-section { padding-block: 30px 46px; border-top: 1px solid var(--border); }
.sources-section h2 { margin-top: 7px; font-size: clamp(1.7rem, 3vw, 2.35rem); }
.sources-section ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px 26px; padding: 0; margin: 19px 0 0; list-style: none; }
.sources-section li p { margin-top: 4px; color: var(--muted); font-size: .82rem; }
.sources-section a { font-size: .92rem; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.project-section { border-block: 1px solid #4a2930; background: radial-gradient(ellipse at 15% 0%, #431923, #1c151b 70%); }
.project-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 19px; padding-block: 36px; }
.project-inner h2 { font-size: clamp(2rem, 4.3vw, 3.9rem); }
.project-inner p:not(.eyebrow) { margin-top: 10px; color: #dfd6dd; }
.footer-inner { display: grid; grid-template-columns: 98px minmax(0, 1fr) auto; gap: 12px 25px; align-items: start; padding-block: 24px; color: var(--muted); font-size: .8rem; }
.footer-inner p { max-width: 69ch; margin-bottom: 9px; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.footer-inner nav a:hover { text-decoration: underline; }

dialog { width: min(990px, calc(100% - 28px)); max-height: calc(100dvh - 28px); padding: 0; border: 1px solid #62505a; background: #151419; color: var(--text); }
dialog::backdrop { background: #08080be8; }
.lightbox-head, .lightbox-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 7px 15px; padding: 9px 13px; }
.lightbox-head h2 { font-size: 1rem; letter-spacing: 0; }
.lightbox-stage { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; align-items: center; gap: 5px; background: #0d0c10; }
.lightbox-stage img { width: 100%; max-height: min(64dvh, 655px); object-fit: contain; }
.lightbox-head button, .lightbox-stage button { border: 1px solid var(--border); background: #231f27; width: 36px; min-height: 39px; font-size: 1.4rem; line-height: 1; }
.lightbox-stage button { justify-self: center; }
.lightbox-stage button:disabled { opacity: .38; }
.lightbox-foot { color: var(--muted); font-size: .83rem; }
.lightbox-foot a { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 1050px) {
  .shell { width: calc(100% - 64px); }
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero h1 { font-size: clamp(3rem, 6.5vw, 5rem); }
}
@media (max-width: 800px) {
  .shell { width: calc(100% - 36px); }
  .header-inner { flex-wrap: wrap; min-height: 61px; gap: 8px 13px; }
  .brand { width: 84px; }
  .header-contact { margin-left: auto; }
  .main-nav { order: 3; width: 100%; margin-left: 0; flex-wrap: wrap; column-gap: 20px; }
  .has-js .menu-toggle { display: inline-block; }
  .has-js .main-nav:not(.is-open) { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 26px 35px; }
  .hero h1 { font-size: clamp(3.2rem, 10.8vw, 5.6rem); }
  .hero h1 br { display: none; }
  .hero h1 em { margin-left: .12em; }
  .hero-description { max-width: 52ch; }
  .metrics { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .metrics dl > div { padding: 5px 10px; }
  .metric-heading p:nth-child(2) br { display: none; }
  .section-heading, .memory-layout, .validation, .project-inner { grid-template-columns: minmax(0, 1fr); }
  .table-hint { display: block; }
  .footer-inner { grid-template-columns: 84px minmax(0, 1fr); }
  .footer-inner nav { grid-column: 2; }
}
@media (max-width: 520px) {
  .hero h1 br { display: block; }
  .hero h1 em { margin-left: 0; }
  .hero-art figcaption { font-size: .62rem; padding: 8px 10px; }
  .metrics dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 0; }
  .thermal-steps, .thermal-pair, .sources-section ul { grid-template-columns: minmax(0, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .gallery-card h3 { font-size: .91rem; }
  .gallery-card figcaption { padding: 8px; }
  .feature-figure figcaption span:last-child { margin-left: 0; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .footer-inner nav { grid-column: auto; }
  .lightbox-stage { grid-template-columns: 33px minmax(0, 1fr) 33px; gap: 3px; }
  .lightbox-stage button { width: 30px; }
}
