/* ==========================================================================
   Sci-fi HUD theme — readability first.
   Effects are limited to: faint grid background, corner brackets, glow on hover.
   ========================================================================== */

:root {
  --bg: #070b12;
  --bg-2: #0c1320;
  --panel: rgba(16, 26, 42, 0.78);
  --line: #1d2b40;
  --line-bright: #2d4566;
  --fg: #e6edf5;
  --muted: #9aabc0;
  --accent: #4de1ff;
  --accent-dim: rgba(77, 225, 255, 0.14);
  --amber: #ffb547;
  --green: #5cf2a4;
  --radius: 4px;
  --max: 1180px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg);
  background-color: var(--bg);
  /* faint blueprint grid */
  background-image:
    linear-gradient(rgba(77, 225, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 225, 255, 0.035) 1px, transparent 1px),
    radial-gradient(ellipse at top, #0f1d33 0%, transparent 60%);
  background-size: 40px 40px, 40px 40px, 100% 100%;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

img { max-width: 100%; display: block; }

h1, h2, h3 { line-height: 1.2; letter-spacing: 0.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin: 0.3rem 0 0.8rem; }
h2 { font-size: 1.7rem; margin: 0 0 1rem; }
h3 { font-size: 1.2rem; margin: 0 0 0.5rem; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--bg); padding: 0.5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Monospace HUD labels ---------- */
.label {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.label::before { content: "// "; color: var(--muted); }

.muted { color: var(--muted); }

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7, 11, 18, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: var(--max); margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
}
.logo {
  font-family: var(--mono); font-weight: 700; font-size: 1.05rem;
  color: var(--fg); letter-spacing: 0.12em;
}
.logo span { color: var(--accent); }
.logo:hover { text-decoration: none; }

.nav-links {
  list-style: none; margin: 0 0 0 auto; padding: 0;
  display: flex; gap: 0.35rem; flex-wrap: wrap;
}
.nav-links a {
  display: block;
  font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
  padding: 0.45rem 0.85rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
}
.nav-links a:hover { color: var(--fg); border-color: var(--line-bright); text-decoration: none; }
.nav-links a[aria-current="page"] {
  color: var(--accent); border-color: var(--accent); background: var(--accent-dim);
}

/* ---------- Layout ---------- */
main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.5rem 4rem; }
.section { padding: 3.5rem 0 1rem; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.section-head h2 { margin: 0.25rem 0 0; }

.page-head { padding: 4rem 0 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.page-head p.lead { color: var(--muted); max-width: 680px; font-size: 1.1rem; margin: 0; }

/* ---------- HUD panel with corner brackets ---------- */
.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.panel::before, .panel::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border-color: var(--accent); border-style: solid; pointer-events: none;
}
.panel::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.panel::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--line-bright); border-radius: var(--radius);
  color: var(--fg); background: transparent; cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:hover { text-decoration: none; border-color: var(--accent); box-shadow: 0 0 14px rgba(77, 225, 255, 0.25); }
.btn.primary { background: var(--accent); color: #04121a; border-color: var(--accent); font-weight: 700; }
.btn.primary:hover { background: #7ae9ff; }
.btn-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ---------- Hero ---------- */
.hero { padding: 6rem 0 3rem; display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; align-items: center; }
.hero .tagline { font-size: 1.2rem; color: var(--muted); max-width: 560px; margin: 0 0 2rem; }
.hero h1 .accent { color: var(--accent); }

.status-list { list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: 0.9rem; }
.status-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px dashed var(--line); }
.status-list li:last-child { border-bottom: 0; }
.status-list .k { color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.78rem; }
.status-list .v { color: var(--fg); text-align: right; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 0.4rem; box-shadow: 0 0 8px var(--green); }

/* ---------- Tags ---------- */
.tag {
  display: inline-block;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.2rem 0.55rem; border-radius: 2px;
  border: 1px solid var(--line-bright); color: var(--muted);
}
.tag.robotics { color: var(--green); border-color: rgba(92, 242, 164, 0.4); }
.tag.three-d { color: var(--amber); border-color: rgba(255, 181, 71, 0.4); }
.tag.software { color: var(--accent); border-color: rgba(77, 225, 255, 0.4); }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ---------- Project cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: var(--fg);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--accent-dim); }
.card[hidden] { display: none; }
.card-media { aspect-ratio: 10 / 9; background: var(--bg-2); border-bottom: 1px solid var(--line); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1rem 1.15rem; display: flex; flex-direction: column; gap: 0.45rem; flex: 1; }
.card-body p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.card-id { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.15em; }
.card-cta { margin-top: auto; padding-top: 0.2rem; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }

/* ---------- Filter bar ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0 2rem; }
.filter-btn {
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.5rem 1rem; background: transparent; color: var(--muted);
  border: 1px solid var(--line-bright); border-radius: var(--radius); cursor: pointer;
}
.filter-btn:hover { color: var(--fg); border-color: var(--accent); }
.filter-btn[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }

/* ---------- Resume ---------- */
.resume-grid { display: grid; grid-template-columns: 1fr 290px; gap: 2rem; align-items: start; margin-top: 2rem; }
.resume-main { display: flex; flex-direction: column; gap: 2rem; min-width: 0; }
.resume-block .label { margin-bottom: 0.6rem; }
.contact-line { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; font-family: var(--mono); font-size: 0.88rem; }
.contact-line li { overflow-wrap: anywhere; }
.resume-side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 1.5rem; }
.resume-side h3 { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.75rem; }
.resume-side ul { list-style: none; margin: 0; padding: 0; }
.resume-side li { padding: 0.25rem 0; color: var(--fg); font-size: 0.95rem; }
.timeline { display: flex; flex-direction: column; gap: 1.25rem; }
.entry-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.entry-head h3 { margin: 0; }
.entry-date { font-family: var(--mono); font-size: 0.8rem; color: var(--amber); letter-spacing: 0.08em; white-space: nowrap; }
.entry-org { color: var(--muted); margin: 0.2rem 0 0.6rem; }
.entry ul { margin: 0; padding-left: 1.2rem; }
.entry li { margin: 0.25rem 0; }

/* ---------- Project detail page ---------- */
.breadcrumb { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.08em; color: var(--muted); padding-top: 2rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.project-hero { aspect-ratio: 21 / 9; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-2); margin: 1.5rem 0 2rem; }
.project-hero img { width: 100%; height: 100%; object-fit: cover; }
.project-layout { display: grid; grid-template-columns: 1fr 300px; gap: 2.5rem; align-items: start; }
.project-content h2 { margin-top: 2.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--line); }
.project-content h2:first-child { margin-top: 0; }
.project-content p, .project-content li { max-width: 72ch; }
.project-meta { position: sticky; top: 90px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-top: 1rem; }
.gallery figure { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.gallery figcaption { font-size: 0.85rem; color: var(--muted); padding: 0.5rem 0.75rem; }
.project-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); flex-wrap: wrap; }

.video-embed { aspect-ratio: 16 / 9; border: 1px dashed var(--line-bright); border-radius: var(--radius); display: grid; place-items: center; color: var(--muted); font-family: var(--mono); font-size: 0.85rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.contact-item .k { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); }
.contact-item .v { font-size: 1.1rem; margin-top: 0.3rem; word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 1.75rem 1.5rem; }
.site-footer .inner { max-width: calc(var(--max) - 3rem); margin: 0 auto; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-family: var(--mono); font-size: 0.8rem; color: var(--muted); letter-spacing: 0.05em; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 4rem; }
  .resume-grid, .project-layout { grid-template-columns: 1fr; }
  .resume-side, .project-meta { position: static; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav-links { margin-left: 0; width: 100%; }
  .nav-links a { padding: 0.4rem 0.6rem; font-size: 0.78rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Print (resume prints cleanly on 1 page) ---------- */
@page { size: letter; margin: 0.32in 0.45in; }
@media print {
  body { background: #fff; color: #111; font-size: 8.5pt; line-height: 1.28; display: block; min-height: 0; }
  .site-header, .site-footer, .no-print, .skip-link { display: none !important; }
  main { padding: 0; max-width: none; }
  .page-head { padding: 0 0 0.36rem; margin: 0; border-bottom: 2px solid #111; }
  .page-head h1 { font-size: 18pt; margin: 0 0 0.05rem; }
  .page-head p.lead { color: #333; font-size: 9.8pt; margin: 0; max-width: none; }
  .contact-line { margin-top: 0.22rem; font-size: 8.4pt; }
  a { color: #111; text-decoration: none; }
  .panel { background: none; border: none; padding: 0; }
  .panel::before, .panel::after { display: none; }
  .label, .resume-block .label { color: #111; font-weight: 700; font-size: 8.8pt; border-bottom: 1px solid #999; padding-bottom: 0.11rem; margin: 0 0 0.24rem; }
  .label::before { content: none; }
  .resume-block p { margin: 0; }
  .resume-grid { display: block; margin-top: 0.4rem; }
  .resume-main { gap: 0.4rem; }
  .timeline { gap: 0.32rem; }
  .entry { break-inside: avoid; }
  .entry-head h3 { font-size: 9.7pt; }
  .entry-date { color: #111; font-size: 8.4pt; }
  .entry-org { color: #444; margin: 0 0 0.12rem; font-style: italic; font-size: 8.4pt; }
  .entry ul { margin: 0; padding-left: 1rem; }
  .entry li { margin: 0.045rem 0; }
  .resume-side { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem 1.2rem; margin-top: 0.4rem; padding-top: 0.34rem; border-top: 1px solid #999; break-inside: avoid; }
  .resume-side h3 { color: #111; font-size: 8.5pt; margin: 0 0 0.08rem; }
  .resume-side li { color: #111; font-size: 8.3pt; padding: 0; display: inline; }
  .resume-side li:not(:last-child)::after { content: " · "; }
  .muted { color: #555; }
}

/* ---------- Utilities (CSP blocks inline style attributes) ---------- */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1.5rem; }
.mt-3 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }

/* ---------- Overflow guards for small screens ---------- */
.hero > *, .project-layout > *, .resume-grid > * { min-width: 0; }
.cards { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.contact-grid { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.status-list .v { overflow-wrap: anywhere; }

/* ==========================================================================
   Interactive layer (enabled by script.js adding .js to <html>)
   Motion is short, one-shot, and disabled under prefers-reduced-motion.
   ========================================================================== */
body { overflow-x: clip; }

/* ---------- Header state + scroll progress ---------- */
.site-header { transition: background 0.25s, box-shadow 0.25s; }
.site-header.scrolled { background: rgba(7, 11, 18, 0.96); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45); }
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 50;
  background: linear-gradient(90deg, var(--accent), var(--green));
  transform-origin: 0 50%; transform: scaleX(0); pointer-events: none;
  box-shadow: 0 0 8px var(--accent);
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 30;
  width: 44px; height: 44px; border-radius: var(--radius);
  background: var(--panel); color: var(--accent); border: 1px solid var(--line-bright);
  font-size: 1.1rem; cursor: pointer; backdrop-filter: blur(6px);
  opacity: 0; translate: 0 12px; pointer-events: none;
  transition: opacity 0.25s, translate 0.25s, border-color 0.15s;
}
.to-top.show { opacity: 1; translate: 0 0; pointer-events: auto; }
.to-top:hover { border-color: var(--accent); box-shadow: 0 0 14px rgba(77, 225, 255, 0.3); }

/* ---------- Mobile nav ---------- */
.nav-toggle { display: none; }
@media (max-width: 720px) {
  .js .nav { flex-wrap: nowrap; }
  .js .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    margin-left: auto; width: 44px; height: 44px; padding: 0 11px;
    background: transparent; border: 1px solid var(--line-bright); border-radius: var(--radius); cursor: pointer;
  }
  .js .nav-toggle span { display: block; height: 2px; background: var(--fg); border-radius: 2px; transition: transform 0.25s, opacity 0.2s; }
  .js .nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .js .nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .js .nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .js .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; width: auto; margin: 0;
    flex-direction: column; gap: 0; padding: 0.5rem 1rem 1rem;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 16px 32px rgba(0, 0, 0, 0.6); z-index: 25;
    clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path 0.3s ease, visibility 0s linear 0.3s;
  }
  .js .nav.open .nav-links { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 0.3s ease; }
  .js .nav-links a { padding: 0.9rem 0.75rem; font-size: 0.95rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .js .nav-links li:last-child a { border-bottom: 0; }
}

/* ---------- Reveal on scroll (uses `translate` so it composes with tilt transforms) ---------- */
.js .reveal { opacity: 0; translate: 0 18px; transition: opacity 0.6s ease var(--delay, 0ms), translate 0.6s cubic-bezier(.2,.7,.2,1) var(--delay, 0ms); }
.js .reveal.is-visible { opacity: 1; translate: 0 0; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(78vh, 760px); padding: 5rem 0 3rem; isolation: isolate; }
.hero-canvas {
  position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; height: 100%;
  translate: -50% 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
  mask-image: linear-gradient(to bottom, #000 60%, transparent);
}
.hero-role { font-family: var(--mono); font-size: clamp(1rem, 2.4vw, 1.3rem); margin: 0 0 1rem; min-height: 1.7em; }
.typer { color: var(--accent); }
.typer::after { content: "▍"; margin-left: 2px; color: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-panel { backdrop-filter: blur(4px); }

/* ---------- Stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.stat { background: var(--bg-2); padding: 1.5rem 1.25rem; display: flex; flex-direction: column; gap: 0.25rem; }
.stat-num { font-family: var(--mono); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; color: var(--fg); line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* ---------- Capabilities ---------- */
.cap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 1.25rem; }
.cap { display: flex; flex-direction: column; gap: 0.6rem; transition: border-color 0.2s, box-shadow 0.2s; }
.cap p { margin: 0; color: var(--muted); }
.cap .tags { margin-top: auto; padding-top: 0.5rem; }
.cap-icon { font-size: 1.6rem; color: var(--accent); line-height: 1; }
.cap:hover { border-color: var(--line-bright); box-shadow: 0 0 0 1px var(--accent-dim), 0 12px 32px rgba(0, 0, 0, 0.35); }

/* ---------- Cards: tilt + spotlight ---------- */
.card {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s ease-out, opacity 0.6s ease var(--delay, 0ms), translate 0.6s cubic-bezier(.2,.7,.2,1) var(--delay, 0ms);
}
.card:hover { --lift: -4px; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift)); }
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.25s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(77, 225, 255, 0.12), transparent 60%);
}
.card:hover::after { opacity: 1; }
.card-media img { transition: transform 0.5s ease; }
.card:hover .card-media img { transform: scale(1.05); }
.card-cta { transition: letter-spacing 0.2s; }
.card:hover .card-cta { letter-spacing: 0.2em; }
.card.pop { animation: pop 0.35s ease both; }
@keyframes pop { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }

/* ---------- Mission log (home timeline) ---------- */
.mission-log { list-style: none; margin: 0; padding: 0 0 0 1.5rem; position: relative; }
.mission-log::before { content: ""; position: absolute; left: 5px; top: 0.4rem; bottom: 0.4rem; width: 1px; background: linear-gradient(var(--accent), var(--line)); }
.mission-log li { position: relative; display: grid; grid-template-columns: 140px 1fr; gap: 1rem; padding: 0.9rem 0; border-bottom: 1px dashed var(--line); }
.mission-log li:last-child { border-bottom: 0; }
.mission-log li::before {
  content: ""; position: absolute; left: calc(-1.5rem + 1px); top: 1.35rem; width: 9px; height: 9px;
  border: 2px solid var(--accent); background: var(--bg); border-radius: 50%;
}
.mission-log li:first-child::before { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.mission-log h3 { margin: 0 0 0.15rem; font-size: 1.05rem; }
.mission-log p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.ml-date { font-family: var(--mono); font-size: 0.8rem; color: var(--amber); letter-spacing: 0.08em; padding-top: 0.2rem; }

/* ---------- CTA ---------- */
.cta { margin-top: 4rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding: 2rem; background: linear-gradient(120deg, rgba(77, 225, 255, 0.08), rgba(16, 26, 42, 0.8)); }
.cta h2 { margin: 0.3rem 0 0.4rem; }

/* ---------- Buttons: subtle sheen ---------- */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transform: skewX(-20deg); transition: left 0.5s ease; pointer-events: none;
}
.btn:hover::after { left: 120%; }

/* ---------- Project page: TOC + lightbox ---------- */
.toc { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.toc ol { list-style: none; margin: 0.6rem 0 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: block; padding: 0.35rem 0 0.35rem 0.75rem; border-left: 2px solid var(--line); color: var(--muted); font-size: 0.92rem; transition: color 0.15s, border-color 0.15s; }
.toc a::before { content: counter(toc, decimal-leading-zero) "  "; font-family: var(--mono); font-size: 0.75rem; color: var(--line-bright); }
.toc a:hover { color: var(--fg); text-decoration: none; }
.toc a.active { color: var(--accent); border-left-color: var(--accent); }
.toc a.active::before { color: var(--accent); }
.project-content h2 { scroll-margin-top: 90px; }

.zoomable { cursor: zoom-in; transition: transform 0.4s ease, filter 0.3s; }
.gallery figure { overflow: hidden; }
.gallery figure:hover .zoomable { transform: scale(1.04); filter: brightness(1.1); }
.lightbox {
  max-width: min(1100px, 92vw); max-height: 92vh; padding: 0; border: 1px solid var(--accent);
  background: var(--bg-2); color: var(--fg); border-radius: var(--radius); box-shadow: 0 0 40px rgba(77, 225, 255, 0.2);
}
.lightbox::backdrop { background: rgba(3, 6, 12, 0.85); backdrop-filter: blur(4px); }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; }
.lightbox p { margin: 0; padding: 0.75rem 1rem; font-size: 0.9rem; color: var(--muted); border-top: 1px solid var(--line); }
.lightbox-close {
  position: absolute; top: 0.5rem; right: 0.5rem; width: 36px; height: 36px; z-index: 1;
  background: rgba(7, 11, 18, 0.8); color: var(--fg); border: 1px solid var(--line-bright); border-radius: var(--radius); font-size: 1.3rem; cursor: pointer;
}
.lightbox[open] { animation: pop 0.25s ease both; }

/* ---------- Responsive tweaks for new sections ---------- */
@media (max-width: 860px) {
  .hero { min-height: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .mission-log li { grid-template-columns: 1fr; gap: 0.2rem; }
  .cta { padding: 1.5rem; }
  .to-top { right: 0.9rem; bottom: 0.9rem; }
}

/* ---------- Reduced motion: show everything immediately ---------- */
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; translate: none; }
  .typer::after { animation: none; }
  .card, .card:hover { transform: none; }
  .btn::after { display: none; }
}

/* Print: never hide content behind reveal state */
@media print {
  .js .reveal { opacity: 1 !important; translate: none !important; }
  .scroll-progress, .to-top, .nav-toggle, .hero-canvas { display: none !important; }
}

/* ==========================================================================
   Rich project page components (EO-01 and future projects)
   ========================================================================== */
.check-list { list-style: none; padding: 0; }
.check-list li { position: relative; padding-left: 1.6rem; margin: 0.45rem 0; }
.check-list li::before { content: "▸"; position: absolute; left: 0.2rem; color: var(--accent); }

.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 1rem; }
.feature { padding: 1.25rem; }
.feature h3 { font-size: 1.02rem; margin: 0.5rem 0 0.35rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.feature-icon { font-size: 1.4rem; color: var(--green); line-height: 1; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 1rem; margin-top: 1rem; }
.video-card {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--fg);
  transition: border-color 0.2s, box-shadow 0.2s, translate 0.2s;
}
.video-card:hover { text-decoration: none; border-color: var(--accent); box-shadow: 0 0 18px rgba(77, 225, 255, 0.18); }
.video-play {
  flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%;
  border: 2px solid var(--accent); color: var(--accent); font-size: 1rem; padding-left: 3px;
  transition: background 0.2s, color 0.2s;
}
.video-card:hover .video-play { background: var(--accent); color: #04121a; }
.video-meta { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.video-meta strong { font-size: 0.98rem; }
.video-meta .muted { font-size: 0.85rem; }

.table-wrap { overflow-x: auto; margin-top: 1rem; border: 1px solid var(--line); border-radius: var(--radius); }
.bom { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.bom caption { text-align: left; padding: 0.75rem 1rem; font-size: 0.85rem; caption-side: bottom; }
.bom th { text-align: left; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); background: var(--bg-2); padding: 0.7rem 1rem; border-bottom: 1px solid var(--line-bright); }
.bom td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.bom tbody tr:hover { background: var(--accent-dim); }
.bom td:first-child { font-family: var(--mono); color: var(--amber); white-space: nowrap; }
.bom td:nth-child(2) { font-weight: 600; white-space: nowrap; }

.sys-diagram { display: flex; flex-direction: column; gap: 0.9rem; margin-top: 1rem; padding: 1.25rem; background: var(--bg-2); border: 1px dashed var(--line-bright); border-radius: var(--radius); }
.sys-lane { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.sys-lane-label { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.18em; color: var(--muted); width: 5.5rem; flex: none; }
.sys-node { font-family: var(--mono); font-size: 0.82rem; padding: 0.4rem 0.7rem; border: 1px solid var(--accent); border-radius: 3px; color: var(--fg); background: rgba(77, 225, 255, 0.06); white-space: nowrap; }
.sys-node.amber { border-color: var(--amber); background: rgba(255, 181, 71, 0.08); }
.sys-node.green { border-color: var(--green); background: rgba(92, 242, 164, 0.08); }
.sys-arrow { font-family: var(--mono); font-size: 0.75rem; color: var(--accent); white-space: nowrap; }
.sys-sep { flex-basis: 100%; height: 0; }
.sys-sep + .sys-node { margin-left: 6rem; }
@media (max-width: 560px) { .sys-lane-label { width: 100%; } .sys-sep + .sys-node { margin-left: 0; } }

.cta-inline { margin-top: 1rem; background: linear-gradient(120deg, rgba(92, 242, 164, 0.07), rgba(16, 26, 42, 0.85)); }

/* Featured (flagship) card */
.card.featured { border-color: rgba(92, 242, 164, 0.45); }
.card.featured .card-id { color: var(--green); }
.badge { display: inline-block; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 0.15rem 0.5rem; border-radius: 2px; background: var(--green); color: #04121a; font-weight: 700; margin-left: 0.4rem; vertical-align: middle; }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }

/* Unified video + photo showcase grid (4 per row on desktop, wraps cleanly as more videos/photos are added) */
.photo-trio, .media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  scroll-margin-top: 90px;
}
.photo-trio figure, .media-gallery figure { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-2); display: flex; flex-direction: column; }
.photo-trio img, .media-gallery img { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; object-position: center 40%; }
.photo-trio figcaption, .media-gallery figcaption { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; color: var(--muted); padding: 0.55rem 0.75rem; border-top: 1px solid var(--line); }
@media (max-width: 560px) { .photo-trio, .media-gallery { grid-template-columns: 1fr; } }
.card-media img[src*="eo-01/"], .card-media img[src*="enco-02/"] { object-position: center 22%; }
.schematic-figure { margin: 1.25rem 0 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-2); display: flex; flex-direction: column; }
.schematic-figure img { width: 100%; height: auto; display: block; }
.schematic-figure figcaption { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em; color: var(--muted); padding: 0.55rem 0.75rem; border-top: 1px solid var(--line); margin-top: auto; }

/* Idea -> AI Blueprint -> 3D CAD -> Physical Robot pipeline steps + comparison grid */
.pipeline-steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1.25rem 0; }
.pipeline-step { padding: 1.15rem 1.25rem; border-left: 2px solid var(--accent); }
.pipeline-step h3 { font-size: 1.02rem; margin: 0.35rem 0 0.35rem; }
.pipeline-step p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.step-num { font-family: var(--mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; color: var(--accent); }
.compare-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1.25rem 0; align-items: stretch; }
.compare-grid .schematic-figure { margin: 0; }
.compare-grid.blueprint-compare .schematic-figure img { aspect-ratio: 1 / 1; object-fit: cover; object-position: center 35%; }
.compare-grid.face-compare .schematic-figure img { aspect-ratio: 16 / 10; object-fit: contain; background: #0c1121; }
@media (max-width: 640px) {
  .pipeline-steps, .compare-grid { grid-template-columns: 1fr; }
}

/* Video tile with Play button overlay inside the media gallery */
.video-tile {
  margin: 0; border: 1px solid rgba(77, 225, 255, 0.45); border-radius: var(--radius);
  overflow: hidden; background: var(--bg-2); display: flex; flex-direction: column;
  cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.video-tile:hover { border-color: var(--accent); box-shadow: 0 0 22px rgba(77, 225, 255, 0.22); }
.video-tile figcaption { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; color: var(--accent); padding: 0.55rem 0.75rem; border-top: 1px solid var(--line); }
.video-tile-media { position: relative; aspect-ratio: 4 / 5; width: 100%; overflow: hidden; background: #000; }
.video-tile-media img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.78) contrast(1.05); transition: transform 0.4s ease, filter 0.3s; }
.video-tile:hover .video-tile-media img { transform: scale(1.04); filter: brightness(0.9); }
.video-tile-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at center, rgba(7, 11, 18, 0.1) 0%, rgba(7, 11, 18, 0.65) 100%);
}
.play-badge {
  position: absolute; top: 0.65rem; left: 0.65rem; z-index: 2;
  font-family: var(--mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em;
  padding: 0.22rem 0.55rem; border-radius: 2px;
  background: rgba(7, 11, 18, 0.82); color: var(--accent); border: 1px solid var(--accent);
}
.play-btn-overlay {
  position: absolute; top: 50%; left: 50%; translate: -50% -50%; z-index: 2;
  width: 68px; height: 68px; border-radius: 50%;
  background: rgba(7, 11, 18, 0.78); border: 2px solid var(--accent);
  box-shadow: 0 0 24px rgba(77, 225, 255, 0.45), inset 0 0 14px rgba(77, 225, 255, 0.2);
  display: grid; place-items: center;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.video-tile:hover .play-btn-overlay {
  transform: scale(1.1); background: var(--accent);
  box-shadow: 0 0 32px rgba(77, 225, 255, 0.75);
}
.play-triangle {
  display: block; width: 0; height: 0; margin-left: 5px;
  border-top: 11px solid transparent; border-bottom: 11px solid transparent;
  border-left: 18px solid var(--accent); transition: border-left-color 0.2s;
}
.video-tile:hover .play-triangle { border-left-color: #04121a; }

/* On-page video modal */
.lightbox.video-lightbox { width: min(420px, 92vw); }
.video-lightbox-mount { width: 100%; background: #000; }
.video-lightbox-mount iframe { width: 100%; height: min(680px, 78vh); border: 0; display: block; }

/* Interactive Media Showcase (Stage + Compact Thumbnail Gallery on project detail pages) */
.media-gallery.is-enhanced {
  display: block;
  margin: 1.5rem 0 2rem;
}
.media-gallery.is-enhanced > figure {
  display: none !important;
}
.media-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.95fr);
  gap: 1rem;
  background: var(--panel);
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  padding: 0.9rem;
  align-items: stretch;
}
.media-stage {
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 0;
}
.media-stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  background: rgba(7, 11, 18, 0.9);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.76rem;
}
.media-stage-counter {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.media-stage-caption {
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.media-stage-action {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--accent);
  border-radius: 2px;
  background: rgba(77, 225, 255, 0.1);
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
}
.media-stage-action:hover {
  background: var(--accent);
  color: #04121a;
}
.media-stage-viewport {
  position: relative;
  height: 460px;
  background: #05080f;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.media-stage-viewport img.stage-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  aspect-ratio: auto;
  cursor: zoom-in;
}
.media-stage-viewport.is-video img.stage-img {
  cursor: pointer;
  filter: brightness(0.86);
  transition: transform 0.35s ease, filter 0.25s ease;
}
.media-stage-viewport.is-video:hover img.stage-img {
  transform: scale(1.02);
  filter: brightness(0.96);
}
.media-stage-viewport iframe {
  width: min(390px, 100%);
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}
.stage-nav-btn {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  z-index: 4;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-bright);
  background: rgba(7, 11, 18, 0.82);
  color: var(--fg);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.stage-nav-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(7, 11, 18, 0.96);
}
.stage-nav-btn.prev { left: 0.65rem; }
.stage-nav-btn.next { right: 0.65rem; }

.media-playlist {
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 503px;
}
.media-playlist-head {
  padding: 0.55rem 0.85rem;
  background: rgba(7, 11, 18, 0.9);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.media-playlist-head strong {
  color: var(--green);
  font-weight: 600;
}
.media-thumb-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: max-content;
  gap: 0.6rem;
  padding: 0.65rem;
  overflow-y: auto;
  align-content: start;
  flex: 1 1 auto;
  min-height: 0;
}
.media-thumb {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  color: var(--fg);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.media-thumb:hover {
  border-color: var(--line-bright);
  transform: translateY(-1px);
}
.media-thumb.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 14px rgba(77, 225, 255, 0.22);
}
.media-thumb-media {
  position: relative;
  height: 92px;
  flex: none;
  width: 100%;
  overflow: hidden;
  background: #000;
}
.media-thumb-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  aspect-ratio: auto;
}
.media-thumb-badge {
  position: absolute;
  top: 0.35rem;
  left: 0.35rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.12rem 0.38rem;
  border-radius: 2px;
  background: rgba(7, 11, 18, 0.85);
  color: var(--muted);
  border: 1px solid var(--line-bright);
}
.media-thumb.is-video .media-thumb-badge {
  color: var(--accent);
  border-color: var(--accent);
}
.media-thumb-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(7, 11, 18, 0.28);
  pointer-events: none;
}
.media-thumb-play-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(7, 11, 18, 0.82);
  border: 1.5px solid var(--accent);
  display: grid;
  place-items: center;
}
.media-thumb-play-icon::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid var(--accent);
}
.media-thumb-cap {
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1.3;
  color: var(--muted);
  padding: 0.42rem 0.55rem;
  border-top: 1px solid var(--line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  width: 100%;
}
.media-thumb.active .media-thumb-cap {
  color: var(--fg);
}
@media (max-width: 860px) {
  .media-showcase {
    grid-template-columns: 1fr;
  }
  .media-stage-viewport {
    height: 380px;
  }
  .media-playlist {
    max-height: none;
  }
  .media-thumb-grid {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    max-height: 250px;
  }
}

/* ---------- Full-Screen Media Review Dialog (Videos + Photos with Left/Right switching) ---------- */
.lightbox.media-review-dialog {
  width: min(1040px, 95vw);
  max-width: min(1040px, 95vw);
  height: min(88vh, 860px);
  max-height: min(88vh, 860px);
  padding: 0;
  border: 1px solid var(--accent);
  background: var(--bg-2);
  color: var(--fg);
  border-radius: var(--radius);
  box-shadow: 0 0 48px rgba(77, 225, 255, 0.28);
  overflow: hidden;
}
.lightbox.media-review-dialog[open] {
  display: flex;
  flex-direction: column;
}
.review-dialog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1rem;
  background: rgba(7, 11, 18, 0.95);
  border-bottom: 1px solid var(--line-bright);
  font-family: var(--mono);
  font-size: 0.8rem;
  flex: none;
}
.review-dialog-counter {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.review-dialog-caption {
  color: var(--fg);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.review-dialog-close {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  border: 1px solid var(--line-bright);
  background: rgba(16, 26, 42, 0.9);
  color: var(--fg);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: none;
}
.review-dialog-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.review-dialog-body {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #04070d;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.5rem 3.75rem;
}
.review-dialog-body img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}
.review-dialog-body iframe {
  width: min(500px, 100%);
  height: 100%;
  border: 0;
  display: block;
  background: #000;
  border-radius: 4px;
  box-shadow: 0 0 32px rgba(0, 0, 0, 0.7);
}
.review-nav-btn {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: rgba(7, 11, 18, 0.88);
  color: var(--accent);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 0 18px rgba(77, 225, 255, 0.25);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.review-nav-btn:hover {
  background: var(--accent);
  color: #04121a;
  transform: scale(1.08);
}
.review-nav-btn.prev { left: 0.85rem; }
.review-nav-btn.next { right: 0.85rem; }

.review-dialog-strip {
  display: flex;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  background: rgba(7, 11, 18, 0.95);
  border-top: 1px solid var(--line);
  overflow-x: auto;
  flex: none;
  justify-content: center;
}
.review-strip-btn {
  position: relative;
  width: 68px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line-bright);
  border-radius: 3px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  flex: none;
  opacity: 0.6;
  transition: opacity 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.review-strip-btn:hover {
  opacity: 0.9;
}
.review-strip-btn.active {
  opacity: 1;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 10px rgba(77, 225, 255, 0.35);
}
.review-strip-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: none;
}
.review-strip-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-family: var(--mono);
  font-size: 0.55rem;
  font-weight: 700;
  padding: 0.05rem 0.25rem;
  border-radius: 2px;
  background: rgba(7, 11, 18, 0.88);
  color: var(--accent);
}
@media (max-width: 640px) {
  .review-dialog-body {
    padding: 0.25rem 0.25rem;
  }
  .review-nav-btn {
    width: 38px;
    height: 38px;
    font-size: 1.25rem;
  }
  .review-nav-btn.prev { left: 0.4rem; }
  .review-nav-btn.next { right: 0.4rem; }
  .review-dialog-strip {
    justify-content: flex-start;
  }
}


