:root {
  --ink: #e9f1ff;
  --muted: #9fb0c8;
  --surface: rgba(26, 45, 70, 0.9);
  --surface-2: #203752;
  --line: rgba(184, 204, 232, 0.25);
  --accent: #63e6be;
  --accent-2: #7aa2ff;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(122, 162, 255, .2), transparent 30rem),
    radial-gradient(circle at 90% 20%, rgba(99, 230, 190, .15), transparent 30rem),
    #102136;
  font: 17px/1.72 "Segoe UI Variable Text", Aptos, "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
}
a { color: var(--accent); }
img, video { display: block; max-width: 100%; height: auto; border-radius: 18px; }
video { width: 100%; background: #02060c; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 29, 48, .88);
  backdrop-filter: blur(18px);
}
.nav {
  width: min(var(--max), calc(100% - 32px));
  min-height: 72px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { color: var(--ink); font-weight: 800; letter-spacing: -.02em; text-decoration: none; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.nav-links a { color: var(--muted); padding: 8px 12px; border-radius: 999px; text-decoration: none; }
.nav-links a:hover, .nav-links a.active { color: #06111e; background: var(--accent); }

.shell { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; padding: 72px 0 96px; }
.hero { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: 64px; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 800; }
h1, h2, h3 { font-family: "Segoe UI Variable Display", "Aptos Display", "Segoe UI", ui-sans-serif, system-ui, sans-serif; line-height: 1.18; letter-spacing: -.025em; }
h1 { margin: 12px 0 22px; font-size: clamp(2.15rem, 4vw, 3.5rem); }
h2 { margin-top: 2.4em; font-size: clamp(1.65rem, 3vw, 2.5rem); }
h3 { margin-top: 2em; font-size: 1.3rem; }
.lede { max-width: 700px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.35rem); }
.portrait { width: min(360px, 80vw); aspect-ratio: 1; margin: auto; object-fit: cover; border-radius: 38% 62% 54% 46% / 45% 42% 58% 55%; box-shadow: 0 28px 90px rgba(0,0,0,.5); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button { display: inline-flex; padding: 12px 18px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; background: var(--surface); }
.button.primary { background: var(--accent); color: #06111e; border-color: transparent; font-weight: 750; }

.project-intro { max-width: 780px; margin-bottom: 38px; }
.project-intro h1 { font-size: clamp(2rem, 3.2vw, 2.9rem); }
.tabs, .subtabs { display: flex; gap: 10px; overflow-x: auto; padding: 6px; border: 1px solid var(--line); border-radius: 16px; background: rgba(15, 32, 52, .82); }
.tab { flex: 1 0 auto; min-width: 180px; padding: 13px 18px; border: 0; border-radius: 11px; color: var(--muted); background: transparent; font: inherit; font-weight: 750; cursor: pointer; }
.tab[aria-selected="true"] { color: #06111e; background: var(--accent); }
.panel { display: none; padding-top: 24px; }
.panel.active { display: block; }
.subtabs { width: fit-content; margin-bottom: 18px; }
.subtabs .tab { min-width: 140px; }
.embed-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 12px; padding: 12px 4px; }
.embed-toolbar p { margin: 0; color: var(--muted); }
.embed-toolbar a { flex: 0 0 auto; font-weight: 750; text-decoration: none; }
.frame-wrap { min-height: 72vh; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #d8e3ed; }
.project-frame { width: 100%; min-height: 78vh; border: 0; background: #d8e3ed; }
.external-frame .project-frame { min-height: 900px; background: #fff; }

.output-page { max-width: var(--max); }
.output-section { margin-top: 70px; }
.section-heading { display: grid; grid-template-columns: 170px 1fr; align-items: end; gap: 28px; margin-bottom: 20px; }
.section-heading .eyebrow { margin: 0 0 7px; }
.section-heading h2 { margin: 0; }
.output-item { display: grid; grid-template-columns: 170px 1fr; gap: 28px; padding: 30px 0; border-top: 1px solid var(--line); }
.output-item:last-child { border-bottom: 1px solid var(--line); }
.output-meta { display: flex; align-items: flex-start; flex-direction: column; gap: 7px; }
.output-year { color: var(--ink); font-size: 1.25rem; font-weight: 800; }
.output-kind { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; font-weight: 800; }
.output-content h3 { max-width: 850px; margin: 0 0 10px; font-size: clamp(1.3rem, 2.5vw, 1.75rem); line-height: 1.3; }
.output-content p { max-width: 850px; margin: 8px 0; color: var(--muted); }
.output-content .authors { color: #c9d7e9; }
.output-content .authors strong { color: var(--ink); }
.output-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 20px; }
.output-links a { font-weight: 750; text-decoration: none; }
.patent-details { display: flex; flex-wrap: wrap; gap: 10px 30px; margin: 18px 0 0; }
.patent-details div { min-width: 150px; }
.patent-details dt { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: .68rem; font-weight: 800; }
.patent-details dd { margin: 2px 0 0; color: var(--ink); font-weight: 700; }

/* Detail pages receive the same visual system. */
.embedded .site-header { display: none; }
.document-page, .embedded body { color: #172238; background: #d8e3ed; }
.box, .box1 { width: min(1020px, calc(100% - 32px)); margin: 0 auto; padding: 36px 30px 64px; }
.box1 { background: #e2eaf2; font-size: 1rem; line-height: 1.72; }
.box1 > br { display: none; }
.box1 > h1 {
  margin: .35em 0;
  text-align: left;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  letter-spacing: -.015em;
}
.box1 > h1:first-of-type { color: #087866; }
.box1 > h2 { margin-top: 1.9em; font-size: clamp(1.3rem, 2.2vw, 1.75rem); }
.box1 > h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }
.box1 p, .box p { color: #26344b; text-align: left; }
.box1 a { color: #2459a8; }
.box1 > img { margin: 0 auto 24px; }
.box1 video { margin-top: 30px; }
.vcaption p, figcaption { margin: 10px 0 38px; color: #53637b; font-size: .92rem; }
figure { margin: 30px 0; }
table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
th, td { padding: 10px; border: 1px solid var(--line); }
.research-page .box1 { color: var(--ink); background: transparent; }
.research-page .box1 p { color: #c9d6e7; }
.research-page .box1 a { color: var(--accent); }
.research-page .box1 > h1:first-of-type { color: var(--accent); }
.research-page figure { padding: 18px; color: #172238; background: #fff; border: 1px solid #c4cfdb; border-radius: 10px; }
.research-page figure img { width: 100%; max-width: none; border-radius: 0; object-fit: contain; }
.research-page figcaption { color: #53637b; }
.research-page table { display: table; width: 100% !important; max-width: 100%; overflow: visible; table-layout: fixed; border-collapse: collapse; font-size: clamp(.65rem, 1.25vw, .88rem); }
.research-page th, .research-page td { padding: 7px 4px; text-align: center; overflow-wrap: anywhere; }
.research-page th:first-child, .research-page td:first-child { width: 24%; text-align: left; }
.research-page caption { padding-top: 12px; color: #aebdd0; text-align: left; font-size: .78rem; line-height: 1.45; }

@media (max-width: 760px) {
  .nav { min-height: auto; padding: 14px 0; align-items: flex-start; flex-direction: column; }
  .hero { grid-template-columns: 1fr; padding: 48px 0; gap: 40px; }
  .portrait { order: -1; width: 210px; }
  .shell { padding-top: 44px; }
  .embed-toolbar { align-items: flex-start; flex-direction: column; gap: 4px; }
  .section-heading, .output-item { grid-template-columns: 1fr; gap: 10px; }
  .output-meta { flex-direction: row; align-items: center; }
  .box, .box1 { padding-right: 18px; padding-left: 18px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
