:root,
:root[data-theme="light"] {
  color-scheme: light;
  --canvas: #edf4f7;
  --canvas-raised: #dceaf0;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, .74);
  --text-primary: #0e293a;
  --text-secondary: #4c6676;
  --border-subtle: #bbd1db;
  --border-active: #3b99ac;
  --accent: #1c7890;
  --accent-strong: #0d5872;
  --accent-soft: #c8eef0;
  --shadow: rgba(18, 72, 94, .13);
  --glow: rgba(44, 166, 188, .25);
  --hero-top: #e7f1f5;
  --hero-bottom: #cfe5eb;
  --scene-line: rgba(34, 117, 146, .44);
  --scene-glass: rgba(233, 251, 251, .24);
  --selection: #b7ebea;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #090d14;
  --canvas-raised: #111925;
  --surface: #1b2735;
  --surface-glass: rgba(25, 36, 50, .72);
  --text-primary: #f1f6fb;
  --text-secondary: #aebdcb;
  --border-subtle: #3a4b60;
  --border-active: #90c8e4;
  --accent: #99d4ee;
  --accent-strong: #c5e9fb;
  --accent-soft: #254255;
  --shadow: rgba(0, 3, 9, .47);
  --glow: rgba(93, 161, 207, .22);
  --hero-top: #131d2a;
  --hero-bottom: #090d14;
  --scene-line: rgba(141, 189, 221, .48);
  --scene-glass: rgba(145, 194, 229, .055);
  --selection: #335670;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text-primary);
  background: var(--canvas);
  line-height: 1.65;
}

/* Role-based fallback stacks keep Latin and CJK glyphs intentional in either locale. */
:root {
  --font-body: "Inter", "Noto Sans SC", sans-serif;
  --font-heading: "IBM Plex Sans", "Noto Serif SC", serif;
}
body { font-family: var(--font-body); }
:root[data-language-pending="true"] body { visibility: hidden; }
:where(h1, h2, h3),
.hero-title { font-family: var(--font-heading); }
.hero-title > span { display: block; }
.hero-title > br { display: none; }
::selection { background: var(--selection); }
a { color: inherit; }
button, select, input { font: inherit; }
:where(a, button, select, input):focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -60px; left: 16px; z-index: 20; padding: 10px 16px; color: var(--text-primary); background: var(--surface); }
.skip-link:focus { top: 12px; }
.shell { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }

/* Shared chrome */
.site-header {
  position: fixed !important;
  top: 0;
  right: 0;
  bottom: auto;
  left: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border-subtle);
}
.header-inner { display: flex; align-items: center; gap: 32px; min-height: 80px; }
.wordmark { flex: 0 0 auto; font-size: 1.35rem; font-weight: 780; letter-spacing: -.055em; line-height: 1; text-decoration: none; }
.wordmark span { color: var(--accent); }
.main-nav { display: flex; align-items: center; gap: 27px; margin-left: auto; }
.main-nav a { color: var(--text-secondary); font-size: .88rem; text-decoration: none; white-space: nowrap; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--text-primary); }
.main-nav a[aria-current="page"] { font-weight: 700; }
.preferences { display: flex; align-items: center; }
.preference-select { cursor: pointer; }

/* An abstract spatial field: depth and motion without a literal logo. */
.hero-copy { position: relative; z-index: 2; }
.section-index { margin: 0 0 22px; color: var(--accent); font-size: .83rem; font-weight: 700; letter-spacing: .04em; }
.hero h1 { margin: 0; font-size: clamp(3.15rem, 5.8vw, 5.9rem); font-weight: 780; letter-spacing: -.085em; line-height: 1.16; text-wrap: nowrap; }
.hero h1 span:last-child { color: var(--accent-strong); }
.hero-intro { max-width: 590px; margin: 29px 0 0; color: var(--text-secondary); font-size: 1.06rem; line-height: 1.9; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin-top: 38px; }
.primary-action { display: inline-flex; align-items: center; justify-content: space-between; gap: 38px; min-width: 198px; padding: 13px 19px; color: #f5ffff; background: #12637c; border: 1px solid #12637c; border-radius: 6px; box-shadow: 7px 7px 0 var(--glow); font-size: .93rem; font-weight: 700; text-decoration: none; transition: transform .25s ease, box-shadow .25s ease; }
:root[data-theme="dark"] .primary-action { color: #101c2b; background: #a9d8f0; border-color: #a9d8f0; }
.primary-action:hover { transform: translateY(-4px); box-shadow: 9px 11px 0 var(--glow); }
.secondary-action { color: var(--accent-strong); font-size: .9rem; font-weight: 700; text-underline-offset: 5px; }
.scroll-hint { position: absolute; bottom: 24px; left: 50%; z-index: 2; display: flex; align-items: center; gap: 13px; transform: translateX(-50%); color: var(--text-secondary); font-size: .75rem; }
.scroll-hint span:last-child { font-size: 1.2rem; }

.space-scene { perspective: 900px; }
.scene-grid { position: absolute; left: -14%; right: -14%; bottom: -34%; height: 105%; background-image: linear-gradient(var(--scene-line) 1px, transparent 1px), linear-gradient(90deg, var(--scene-line) 1px, transparent 1px); background-size: 32px 32px; opacity: .62; transform: rotateX(68deg) rotateZ(-23deg); mask-image: linear-gradient(to top, black 12%, transparent 88%); }
.scene-halo { position: absolute; inset: 11% 13%; border: 1px solid var(--scene-line); border-radius: 50%; transform: rotateY(65deg) rotateZ(-24deg); box-shadow: 0 0 30px var(--glow), inset 0 0 28px var(--glow); }
.scene-frame { position: absolute; top: 50%; left: 50%; width: 260px; height: 260px; margin: -130px 0 0 -130px; border: 1px solid var(--scene-line); border-radius: 19px; background: var(--scene-glass); box-shadow: 0 24px 45px var(--shadow), inset 0 0 40px var(--glow); }
.frame-far { transform: translate3d(76px, -71px, -170px) rotateY(-25deg) rotateZ(18deg); opacity: .43; }
.frame-mid { transform: translate3d(34px, -29px, -70px) rotateY(-21deg) rotateZ(12deg); opacity: .7; }
.frame-near { transform: translate3d(-17px, 23px, 30px) rotateY(-16deg) rotateZ(6deg); border-color: var(--border-active); background: linear-gradient(135deg, transparent, var(--scene-glass) 55%, var(--glow)); box-shadow: 17px 33px 49px var(--shadow), inset 0 0 43px var(--glow); }
.frame-near::before { content: ""; position: absolute; inset: 20px; border: 1px solid var(--scene-line); border-radius: 8px; }
.frame-near::after { content: ""; position: absolute; top: 50%; left: 50%; width: 9px; height: 9px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 9px var(--glow), 0 0 30px var(--accent); }
.scene-trace { position: absolute; top: 50%; left: 50%; width: 370px; height: 155px; margin: -77px 0 0 -185px; border: 1px solid var(--scene-line); border-radius: 50%; transform: rotate(-23deg); }
.trace-two { transform: rotate(57deg) scale(.72); opacity: .65; }
.scene-point { position: absolute; width: 7px; height: 7px; border: 1px solid var(--accent); border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 7px var(--glow); }
.point-one { left: 11%; top: 53%; }.point-two { right: 15%; top: 26%; }.point-three { right: 19%; bottom: 19%; }

/* Project discovery surfaces. */
.section-heading { position: relative; display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 34px; }
.section-heading .section-index { margin-bottom: 9px; }
.section-heading h2 { margin: 0; font-size: clamp(2rem, 3.4vw, 3rem); letter-spacing: -.055em; line-height: 1.22; }
.section-heading p:last-child { margin: 13px 0 0; color: var(--text-secondary); }
.shuffle-action { display: inline-flex; align-items: center; gap: 14px; padding: 11px 17px; color: var(--text-primary); background: var(--surface-glass); border: 1px solid var(--border-subtle); border-radius: 6px; font-size: .86rem; font-weight: 700; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.shuffle-action:hover { border-color: var(--border-active); background: var(--surface); transform: translateY(-2px); }
.shuffle-action span:last-child { font-size: 1.3rem; line-height: 1; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; perspective: 1300px; }
.project-card { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 256px; padding: 24px; overflow: hidden; color: var(--text-primary); background: var(--surface-glass); border: 1px solid var(--border-subtle); border-radius: 9px; box-shadow: 0 12px 27px var(--shadow); text-decoration: none; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: border-color .25s ease, box-shadow .3s ease, background .3s ease; }
.project-card::after { content: ""; position: absolute; right: -41px; bottom: -41px; width: 110px; height: 110px; border: 1px solid var(--scene-line); transform: rotate(26deg); opacity: .48; pointer-events: none; }
.project-card:hover, .project-card:focus-visible { z-index: 2; border-color: var(--border-active); box-shadow: 0 18px 42px var(--shadow), inset 0 0 0 1px var(--glow); }
.project-card:active { transform: scale(.99); }
.project-meta { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: start; gap: 10px; color: var(--text-secondary); font-size: .73rem; }
.project-category { color: var(--accent-strong); font-weight: 700; }
.project-date { flex: 0 0 auto; white-space: nowrap; }
.project-name { position: relative; z-index: 1; margin: 22px 0 9px; font-size: 1.12rem; letter-spacing: -.025em; line-height: 1.35; overflow-wrap: anywhere; transition: color .25s ease; }
.project-description { position: relative; z-index: 1; color: var(--text-secondary); font-size: .87rem; line-height: 1.73; }
.project-card-action { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: auto; padding-top: 20px; color: var(--accent-strong); font-size: .82rem; font-weight: 700; }
.project-card-arrow { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--border-subtle); border-radius: 50%; font-size: 1rem; transition: transform .25s ease, background .25s ease, box-shadow .25s ease; }
.project-card:hover .project-card-arrow, .project-card:focus-visible .project-card-arrow { background: var(--accent-soft); transform: translate(3px, -3px) scale(1.13); box-shadow: 0 0 15px var(--glow); }
.archive-action { position: relative; display: flex; align-items: center; gap: 40px; min-height: 172px; margin-top: 31px; padding: 28px 36px; overflow: hidden; color: var(--text-primary); background: linear-gradient(112deg, var(--surface-glass), var(--scene-glass)); border: 1px solid var(--border-active); border-radius: 10px; box-shadow: 0 17px 36px var(--shadow); text-decoration: none; transition: transform .3s ease, box-shadow .3s ease; }
.archive-action::before { content: ""; position: absolute; right: 7%; top: -120%; width: 38%; height: 350%; background: repeating-linear-gradient(90deg, transparent 0 23px, var(--scene-line) 24px 25px); opacity: .24; transform: rotate(28deg); pointer-events: none; }
.archive-action:hover, .archive-action:focus-visible { transform: translateY(-5px); box-shadow: 0 27px 50px var(--shadow); }
.archive-action-copy { position: relative; display: flex; flex-direction: column; gap: 4px; margin-right: auto; }
.archive-action-copy small { color: var(--accent); font-size: .79rem; font-weight: 700; }
.archive-action-copy strong { font-size: clamp(1.35rem, 2.3vw, 1.9rem); letter-spacing: -.04em; }
.archive-action-copy > span { color: var(--text-secondary); font-size: .9rem; }
.archive-action-count { position: relative; display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.archive-action-count > span { font-size: clamp(2.5rem, 4vw, 4rem); font-weight: 760; letter-spacing: -.08em; line-height: 1; }
.archive-action-count small { color: var(--text-secondary); font-size: .8rem; }
.archive-arrow { position: relative; display: grid; place-items: center; flex: 0 0 auto; width: 46px; height: 46px; color: var(--surface); background: var(--accent-strong); border-radius: 50%; font-size: 1.35rem; transition: transform .25s ease; }
.archive-action:hover .archive-arrow { transform: translate(3px, -3px); }

/* Archive page */
.catalog-main { padding-block: 64px 105px; }
.catalog-intro { position: relative; min-height: 284px; padding: 36px 42px; overflow: hidden; background: rgba(255, 255, 255, .53); border: 1px solid var(--border-subtle); border-radius: 12px; -webkit-backdrop-filter: blur(18px) saturate(135%); backdrop-filter: blur(18px) saturate(135%); box-shadow: 0 18px 48px var(--shadow), inset 0 1px rgba(255, 255, 255, .22); }
.catalog-intro::after { content: ""; position: absolute; right: -10%; bottom: -88%; width: 72%; height: 175%; background-image: linear-gradient(var(--scene-line) 1px, transparent 1px), linear-gradient(90deg, var(--scene-line) 1px, transparent 1px); background-size: 29px 29px; opacity: .6; transform: perspective(490px) rotateX(67deg) rotateZ(-23deg); mask-image: linear-gradient(to top, black, transparent 88%); pointer-events: none; }
.catalog-haze { position: absolute; inset: 0; background: radial-gradient(circle at 82% 58%, var(--glow), transparent 35%); pointer-events: none; }
.catalog-intro .section-index { margin-bottom: 7px; }
.catalog-intro h1 { margin: 0; font-size: clamp(2.7rem, 5vw, 4.7rem); line-height: 1.2; letter-spacing: -.065em; }
.catalog-intro > p:not(.section-index) { max-width: 690px; margin: 15px 0 0; color: var(--text-secondary); }
.catalog-summary { display: flex; flex-wrap: wrap; gap: 25px; margin-top: 21px; color: var(--accent-strong); font-size: .85rem; font-weight: 650; }
.catalog-controls { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-top: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--border-subtle); }
.view-switch { display: inline-flex; padding: 3px; border: 1px solid var(--border-subtle); border-radius: 6px; }
.view-switch button { padding: 8px 16px; color: var(--text-secondary); background: transparent; border: 0; border-radius: 4px; cursor: pointer; }
.view-switch button[aria-pressed="true"] { color: var(--surface); background: var(--accent-strong); }
.search-field { display: flex; flex-direction: column; gap: 6px; color: var(--text-secondary); font-size: .79rem; font-weight: 700; }
.search-field input { width: 280px; color: var(--text-primary); border-radius: 5px; }
.catalog-group { padding-top: 40px; }
.group-heading { margin: 0 0 16px; font-size: 1.5rem; letter-spacing: -.04em; }
.catalog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.project-card-compact { min-height: 190px; padding: 21px 23px; box-shadow: 0 6px 18px var(--shadow); }
.project-card-compact .project-name { margin: 10px 0 6px; font-size: 1.04rem; }
.project-card-compact .project-description { font-size: .84rem; }
.project-card-compact .project-card-action { padding-top: 10px; }
.empty-state { padding: 42px 0; color: var(--text-secondary); }
.no-script { padding: 24px; color: var(--text-secondary); background: var(--surface); border: 1px solid var(--border-subtle); border-radius: 8px; }
.site-footer {
  position: fixed !important;
  top: auto;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-glass);
  color: var(--text-secondary);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  font-size: .83rem;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 77px; }
.footer-inner a { color: var(--accent-strong); text-underline-offset: 4px; }


@media (max-width: 1050px) {
  .header-inner { gap: 18px; }
  .main-nav { gap: 17px; }
  .preferences { padding-left: 15px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
main { padding-top: 80px; padding-bottom: 77px; }
@media (max-width: 760px) {
  main { padding-top: 143px; padding-bottom: 92px; }
  .shell { width: min(100% - 32px, 620px); }
  .header-inner { flex-wrap: wrap; min-height: 0; padding-block: 16px; gap: 13px 16px; }
  .wordmark { font-size: 1.25rem; }
  .main-nav { order: 3; width: 100%; margin-left: 0; padding-top: 10px; border-top: 1px solid var(--border-subtle); }
  .main-nav a { font-size: .82rem; }
  .preferences { margin-left: auto; padding-left: 0; border-left: 0; }
  .preference-select { min-width: 68px; font-size: .73rem; }
  .theme-select { min-width: 91px; }
  .hero h1 { font-size: clamp(2.85rem, 10vw, 4.6rem); text-wrap: wrap; }
  .hero-intro { font-size: 1rem; }
  .scroll-hint { bottom: 16px; }
  .feature-grid, .catalog-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 215px; }
  .archive-action { gap: 20px; padding: 26px; }
  .catalog-main { padding-block: 44px 80px; }
  .catalog-intro { min-height: 0; padding: 31px 29px; }
}
@media (max-width: 480px) {
  .main-nav { justify-content: space-between; gap: 10px; }
  .hero-actions { gap: 18px; }
  .section-heading { align-items: start; flex-direction: column; }
  .archive-action { align-items: start; flex-wrap: wrap; min-height: 0; }
  .archive-action-copy { width: 100%; }
  .archive-action-count { margin-right: auto; }
  .catalog-controls { align-items: stretch; flex-direction: column; }
  .search-field input { width: 100%; }
  .footer-inner { align-items: start; flex-direction: column; justify-content: center; padding-block: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .project-card, .archive-action { transform: none !important; }
}

/* Shared atmosphere and frosted surfaces. The atmosphere continues behind both sections. */
body { position: relative; isolation: isolate; background: var(--canvas); }
body::before { content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none; background: linear-gradient(145deg, var(--hero-top) 0%, var(--canvas) 55%, var(--hero-bottom) 100%); }
.ambient-world { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.page-hidden .ambient-world *, .page-hidden .scene-halo { animation-play-state: paused !important; }

.site-header, .site-footer { background: var(--surface-glass); -webkit-backdrop-filter: blur(22px) saturate(135%); backdrop-filter: blur(22px) saturate(135%); }
.preferences { gap: 20px; padding-left: 24px; border-left: 1px solid var(--border-subtle); }
.preference-item { display: flex; flex-direction: column; gap: 0; min-width: 76px; }
.preference-item label { color: var(--text-secondary); font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.preference-select { min-width: 0; padding: 0 15px 1px 0; color: var(--text-primary); background: transparent; border: 0; border-radius: 0; font-size: .8rem; font-weight: 650; }
.theme-select { min-width: 0; }
.preference-select option { color: var(--text-primary); background: var(--surface); }

.hero.hero-scrolled .hero-copy { pointer-events: none; }
.project-card:hover .project-name, .project-card:focus-visible .project-name { color: var(--accent-strong); }
.archive-action, .view-switch, .search-field input, .shuffle-action { background: var(--surface-glass); -webkit-backdrop-filter: blur(16px) saturate(130%); backdrop-filter: blur(16px) saturate(130%); }
.archive-action { background: linear-gradient(112deg, var(--surface-glass), var(--scene-glass)); }

@media (max-width: 760px) {
  .preferences { gap: 10px; padding-left: 0; border-left: 0; }
  .preference-item { min-width: 67px; }
  .preference-item label { font-size: .58rem; }
  .preference-select { font-size: .73rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ambient-world * { animation: none !important; }
  .space-scene { opacity: 1 !important; }
}

/* Homepage scene, shared by the opening and project sections. */
body[data-page="home"] .space-scene { position: absolute; top: 20%; right: max(1vw, calc((100vw - 1510px) / 2)); z-index: 0; width: min(50vw, 680px); height: min(58vw, 560px); opacity: .95; transform: translate3d(var(--scene-journey-x), var(--scene-journey-y), 0) scale(var(--scene-journey-zoom)); transform-origin: 55% 50%; will-change: transform; }
body[data-page="home"] .scene-grid { mask-image: radial-gradient(ellipse at 60% 56%, black 17%, transparent 72%); }
body[data-page="home"] .scene-halo { animation: scene-orbit 13s ease-in-out infinite alternate; }
body[data-page="home"] .frame-near { animation: frame-hover 8s ease-in-out infinite alternate; }
body[data-page="home"] .scene-point { animation: point-breathe 4.5s ease-in-out infinite alternate; }
body[data-page="home"] .point-two { animation-delay: -2s; }
body[data-page="home"] .point-three { animation-delay: -3.5s; }
@keyframes scene-orbit { from { opacity: .45; transform: rotateY(58deg) rotateZ(-37deg) scale(.94); } to { opacity: .93; transform: rotateY(75deg) rotateZ(-4deg) scale(1.1); } }
@keyframes frame-hover { from { transform: translate3d(-24px, 29px, 25px) rotateY(-18deg) rotateZ(5deg); } to { transform: translate3d(-4px, 1px, 60px) rotateY(-9deg) rotateZ(10deg); } }
@keyframes point-breathe { from { opacity: .35; box-shadow: 0 0 0 4px var(--glow); } to { opacity: 1; box-shadow: 0 0 0 16px var(--glow); } }
@media (max-width: 760px) {
  body[data-page="home"] .hero-layout { padding-block: 76px 84px; }
  body[data-page="home"] .hero-copy { max-width: 100%; }
  body[data-page="home"] .space-scene { top: 70%; right: -12%; width: 70vw; height: 64vw; max-height: 350px; margin-block: -20px -38px; transform: scale(.78); opacity: .45; }
  body[data-page="home"] .hero-title > span { transform: none !important; }
}
@media (max-width: 480px) {
  body[data-page="home"] .space-scene { margin: -38px 0 -64px; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-page="home"] .hero-title > span { transform: none !important; }
  body[data-page="home"] .space-scene { transform: none !important; }
}

/* Weather lives behind the content; pointer light is applied only to glass. */
.weather-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; opacity: .92; pointer-events: none; }
.glass-surface { position: relative; isolation: isolate; }
.glass-surface > :not(.glass-light) { position: relative; z-index: 1; }
.glass-light { position: absolute; inset: 0; z-index: 0; opacity: 0; pointer-events: none; background: radial-gradient(circle 210px at var(--light-x, -250px) var(--light-y, -250px), rgba(143, 239, 246, .29) 0%, rgba(120, 210, 232, .12) 38%, transparent 75%), radial-gradient(circle 62px at var(--light-x, -250px) var(--light-y, -250px), rgba(255, 255, 255, .27), transparent 80%); -webkit-mask-image: radial-gradient(circle 230px at var(--light-x, -250px) var(--light-y, -250px), black 18%, transparent 83%); mask-image: radial-gradient(circle 230px at var(--light-x, -250px) var(--light-y, -250px), black 18%, transparent 83%); mix-blend-mode: screen; transition: opacity .14s ease; }
.glass-light.is-active { -webkit-backdrop-filter: blur(6px) saturate(150%); backdrop-filter: blur(6px) saturate(150%); }
:root[data-theme="light"] .glass-light { background: radial-gradient(circle 245px at var(--light-x, -250px) var(--light-y, -250px), rgba(255, 255, 255, .82) 0%, rgba(219, 245, 252, .56) 27%, rgba(92, 176, 211, .22) 57%, transparent 82%); mix-blend-mode: normal; }
.search-field { padding: 7px 10px; background: var(--surface-glass); border: 1px solid var(--border-subtle); border-radius: 8px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.search-field input { background: transparent; border: 0; padding: 2px 0; }
.search-field input:focus-visible { outline-offset: 2px; }
.atmosphere-tuner { position: fixed; right: 24px; bottom: 99px; z-index: 50; }
.atmosphere-tuner summary { display: block; min-width: 106px; padding: 10px 15px; color: var(--text-primary); background: var(--surface-glass); border: 1px solid var(--border-subtle); border-radius: 9px; box-shadow: 0 8px 25px var(--shadow); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); font-size: .78rem; font-weight: 700; cursor: pointer; list-style: none; }
.atmosphere-tuner summary::-webkit-details-marker { display: none; }
.atmosphere-tuner summary::after { content: "✦"; float: right; margin-left: 13px; color: var(--accent); }
.atmosphere-panel { position: absolute; right: 0; bottom: calc(100% + 10px); display: grid; gap: 18px; width: 270px; max-height: calc(100svh - 170px); padding: 20px; overflow-y: auto; color: var(--text-primary); background: var(--surface-glass); border: 1px solid var(--border-subtle); border-radius: 12px; box-shadow: 0 14px 45px var(--shadow); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
.atmosphere-panel label { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; align-items: center; font-size: .82rem; font-weight: 650; }
.atmosphere-panel input { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); cursor: pointer; }
.atmosphere-panel output { color: var(--text-secondary); font-size: .75rem; }
.motion-notice { margin: 0; color: var(--text-secondary); font-size: .75rem; line-height: 1.55; }
.atmosphere-panel .toggle-control { display: flex; grid-template-columns: none; justify-content: space-between; align-items: center; }
.atmosphere-panel .toggle-control input { grid-column: auto; width: 38px; height: 20px; margin: 0; cursor: pointer; }
.atmosphere-panel input:disabled { cursor: not-allowed; opacity: .45; }
.atmosphere-reset { padding: 8px 10px; color: var(--text-primary); background: transparent; border: 1px solid var(--border-subtle); border-radius: 6px; cursor: pointer; font-size: .76rem; font-weight: 700; }
.atmosphere-reset:hover { border-color: var(--border-active); background: var(--surface); }
@media (max-width: 760px) { .atmosphere-tuner { right: 14px; bottom: 106px; } .atmosphere-panel { width: min(270px, calc(100vw - 28px)); } }
@media (prefers-reduced-motion: reduce) { .glass-light { transition: none; } .weather-canvas { display: none; } }

/* Homepage scroll journey: values come straight from document position.
   No scroll input is captured or rewritten. */
body[data-page="home"] {
  --journey: 0;
  --title-journey: 0;
  --title-journey-y: 0px;
  --title-journey-scale: calc(1 - var(--title-journey) * .2);
  --title-line-two-x: 0px;
  --title-line-two-y: 0px;
  --support-copy-y: 0px;
  --scene-journey-x: calc(var(--journey) * -12vw);
  --scene-journey-y: calc(6vh + var(--journey) * 10vh);
  --scene-journey-zoom: calc(1.32 + var(--journey) * .18);
  --support-copy-opacity: clamp(0, calc(1 - var(--journey) * 1.5), 1);
}
body[data-page="home"] .hero { position: relative; height: 170svh; min-height: 1080px; isolation: isolate; }
body[data-page="home"] .hero-stage { position: sticky; top: 0; height: 100svh; min-height: 630px; overflow: hidden; isolation: isolate; z-index: 3; pointer-events: none; }
body[data-page="home"] .hero-copy,
body[data-page="home"] .scroll-hint { pointer-events: auto; }
body[data-page="home"] .hero-layout { position: relative; display: flex; align-items: center; min-height: 100%; padding-block: 80px 110px; }
body[data-page="home"] .hero-copy { width: 100%; max-width: 650px; }
body[data-page="home"] .hero-title {
  position: relative; z-index: 3; transform: translate3d(0, var(--title-journey-y), 0) scale(var(--title-journey-scale));
  transform-origin: top left; will-change: transform;
}
body[data-page="home"] .hero-title > span { transform-origin: top left; }
body[data-page="home"] .hero-title > span:last-child {
  transform: translate3d(var(--title-line-two-x), var(--title-line-two-y), 0);
  will-change: transform;
}
body[data-page="home"] .settled-title-slot {
  position: relative;
  height: var(--settled-title-height, 0px);
  margin-bottom: 16px;
  visibility: hidden;
}
body[data-page="home"] .settled-title {
  position: absolute;
  top: 0;
  left: 0;
  width: max-content;
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(3.15rem, 5.8vw, 5.9rem);
  font-weight: 780;
  letter-spacing: -.085em;
  line-height: 1.16;
  text-wrap: nowrap;
  transform: scale(.8);
  transform-origin: top left;
}
body[data-page="home"] .settled-title > span:last-child { color: var(--accent-strong); transform: translate3d(var(--title-line-two-x), var(--title-line-two-y), 0); }
body[data-page="home"].title-settled .settled-title-slot { visibility: visible; }
body[data-page="home"].title-settled .hero-copy > .hero-title { visibility: hidden; }
body[data-page="home"] .hero-copy > .section-index,
body[data-page="home"] .hero-intro,
body[data-page="home"] .hero-actions {
  opacity: var(--support-copy-opacity);
  transform: translate3d(0, var(--support-copy-y), 0);
}
body[data-page="home"] .discovery {
  position: relative; z-index: 2; margin-top: -85svh; padding: 30px 0 105px;
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
@media (max-width: 760px) {
  body[data-page="home"] .settled-title-slot { display: none; }
  body[data-page="home"] .hero { height: auto; min-height: 0; }
  body[data-page="home"] .hero-stage { position: relative; height: auto; min-height: 0; }
  body[data-page="home"] .hero-layout { min-height: 0; }
  body[data-page="home"] .hero-title { transform: none; }
  body[data-page="home"] .hero-title > span:last-child { transform: none; }
  body[data-page="home"] .discovery { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-page="home"] .settled-title-slot { display: none; }
  body[data-page="home"] .hero { height: auto; min-height: 0; }
  body[data-page="home"] .hero-stage { position: relative; height: auto; min-height: 0; }
  body[data-page="home"] .hero-title { transform: none; }
  body[data-page="home"] .hero-title > span:last-child { transform: none; }
  body[data-page="home"] .hero-copy > .section-index,
  body[data-page="home"] .hero-intro,
  body[data-page="home"] .hero-actions { opacity: 1; }
  body[data-page="home"] .discovery { margin-top: 0; }
}

/* Archive glass layers. */
:root[data-theme="dark"] .catalog-intro { background: rgba(24, 34, 47, .5); }
.catalog-intro > .catalog-haze { z-index: 0; opacity: .35; }
.catalog-intro > .glass-light { position: absolute; inset: 0; z-index: 1; }
.catalog-intro > :not(.catalog-haze, .glass-light) { position: relative; z-index: 2; }
.catalog-search { width: min(570px, 100%); margin-top: 26px; padding: 10px 16px; background: var(--surface-glass); }
.catalog-search input { width: 100%; min-height: 29px; font-size: .95rem; }

/* Soft prerendered haze returns; only two small layers are composited. */
.fog-layer { position: absolute; width: min(92vw, 1060px); height: min(58vw, 660px); background: center / contain no-repeat; pointer-events: none; opacity: .55; animation: fog-float 19s ease-in-out infinite alternate; }
.fog-cyan { top: -13vh; right: -13vw; background-image: url("assets/fog-cyan.webp"); }
.fog-secondary { bottom: -19vh; left: -19vw; background-image: url("assets/fog-secondary.webp"); animation-duration: 23s; animation-direction: alternate-reverse; }
:root[data-theme="dark"] .fog-layer { opacity: .43; }
:root[data-fog="off"] .fog-layer,
:root[data-pointer="off"] .glass-light { display: none; }
:root[data-scene-motion="off"] body[data-page="home"] .scene-halo,
:root[data-scene-motion="off"] body[data-page="home"] .frame-near,
:root[data-scene-motion="off"] body[data-page="home"] .scene-point { animation: none; }
:root[data-narrative="off"] body[data-page="home"] .hero { height: auto; min-height: 0; }
:root[data-narrative="off"] body[data-page="home"] .hero-stage { position: relative; height: auto; min-height: 0; overflow: visible; }
:root[data-narrative="off"] body[data-page="home"] .hero-layout { min-height: 0; }
:root[data-narrative="off"] body[data-page="home"] .hero-title,
:root[data-narrative="off"] body[data-page="home"] .hero-title > span:last-child { transform: none; }
:root[data-narrative="off"] body[data-page="home"] .settled-title-slot { display: none; }
:root[data-narrative="off"] body[data-page="home"] .hero-copy > .section-index,
:root[data-narrative="off"] body[data-page="home"] .hero-intro,
:root[data-narrative="off"] body[data-page="home"] .hero-actions { opacity: 1; }
:root[data-narrative="off"] body[data-page="home"] .discovery { margin-top: 0; }
@keyframes fog-float { from { transform: translate3d(-8%, 2%, 0) scale(.98); } to { transform: translate3d(10%, -7%, 0) scale(1.04); } }
@media (max-width: 760px) { .fog-layer { width: 110vw; height: 72vw; opacity: .36; } :root[data-theme="dark"] .fog-layer { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .fog-layer { animation: none; } }
