@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  --background: #0b0b12;
  --surface: #13131f;
  --raised: #191828;
  --ink: #f1eff9;
  --muted: #a9a6bb;
  --subtle: #85819c;
  --line: #2a283c;
  --accent: #b7a3ff;
  --accent-bright: #d4c7ff;
  --accent-ink: #160e30;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  font-family: var(--body);
  background: var(--background);
  color: var(--ink);
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 4px; }
::selection { color: var(--accent-ink); background: var(--accent-bright); }
[id] { scroll-margin-top: 28px; }

.site-shell { width: min(100% - 104px, 1296px); margin-inline: auto; }
.skip { position: absolute; z-index: 5; top: 12px; left: 12px; padding: 12px 16px; transform: translateY(-160%); background: var(--surface); }
.skip:focus { transform: none; }

.site-header { border-bottom: 1px solid var(--line); background: #0e0e17; }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.header-inner { min-height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font: 700 21px/1 var(--display); letter-spacing: -.045em; text-decoration: none; white-space: nowrap; }
.brand-mark, .demo-icon { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 3px; border: 1px solid #383055; color: var(--accent); background: #1a162d; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; }
.brand-mark i, .demo-icon i { width: 2px; border-radius: 2px; background: currentColor; }
.brand-mark i:first-child { height: 7px; }
.brand-mark i:nth-child(2) { height: 12px; }
.brand-mark i:nth-child(3) { height: 17px; }
.site-nav { display: flex; align-items: center; gap: 32px; font-size: 13px; font-weight: 500; }
.site-nav a { padding-block: 11px; color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--ink); }
.site-nav .nav-resume { color: var(--accent-bright); }
.nav-resume span { margin-left: 3px; }

.hero {
  position: relative;
  overflow: clip;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 78% 42%, #201837 0, #100f1e 33%, transparent 72%);
}
.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image: linear-gradient(#a893f21c 1px, transparent 1px), linear-gradient(90deg, #a893f21c 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 77% 42%, black 15%, transparent 69%);
}
.hero-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .96fr) minmax(0, 1.04fr);
  align-items: center;
  gap: clamp(36px, 5vw, 82px);
  padding-block: clamp(58px, 7vw, 105px);
}
.hero-copy { min-width: 0; }
.eyebrow, .hero-location, .project-kind {
  font: 500 11px/1.55 var(--mono);
  letter-spacing: .09em;
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; gap: 11px; color: var(--accent-bright); }
.signal-line { position: relative; width: 27px; height: 1px; flex: none; background: var(--accent); }
.signal-line::after { position: absolute; inset: -2px 0 auto auto; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); content: ""; }
.hero h1 {
  margin: 22px 0 24px;
  font: 700 clamp(66px, 7.55vw, 123px)/.91 var(--display);
  letter-spacing: -.088em;
}
.hero h1 em {
  display: block;
  width: fit-content;
  padding-right: .09em;
  color: var(--accent);
  background: linear-gradient(112deg, #dbcfff, #a689ff);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: normal;
}
.hero-summary { max-width: 36ch; color: var(--muted); font-size: clamp(16px, 1.55vw, 20px); line-height: 1.65; }
.hero-actions, .contact-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.action {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color .18s, color .18s, border-color .18s;
}
.action-primary { background: var(--accent); color: var(--accent-ink); }
.action-primary:hover { background: var(--accent-bright); }
.action-secondary { border-color: #3a374b; background: #13131d; color: var(--ink); }
.action-secondary:hover { border-color: var(--accent); color: var(--accent-bright); }
.hero-location { display: flex; align-items: center; gap: 9px; margin-top: 38px; color: var(--subtle); }
.location-dot { width: 6px; height: 6px; border: 1px solid var(--accent); border-radius: 50%; }

.demo {
  --cycle-position: 0%;
  min-width: 0;
  padding: 0;
  border: 1px solid #39334f;
  border-radius: 17px;
  background: #141321;
  box-shadow: 0 26px 84px #0009, 0 0 62px #a68bff11;
}
.demo-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 17px; border-bottom: 1px solid #302a45; }
.demo-name { display: flex; min-width: 0; align-items: center; gap: 9px; }
.demo-name h2 { font: 700 17px/1.15 var(--display); letter-spacing: -.035em; }
.demo-icon { width: 29px; height: 29px; border-radius: 7px; gap: 2px; }
.demo-icon i:first-child, .demo-icon i:last-child { height: 6px; }
.demo-icon i:nth-child(2) { height: 12px; }
.demo-icon i:nth-child(3) { height: 9px; }
.simulation-label { padding: 4px 7px; border: 1px solid #38334c; border-radius: 4px; color: var(--muted); font: 500 10px/1.25 var(--mono); }
.demo-content { padding: 12px 14px 14px; }
.demo [hidden] { display: none; }
.source-panel { padding: 10px; border: 1px solid #332e46; border-radius: 8px; background: #191726; }
.source-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.source-controls .action { min-height: 34px; padding: 5px 10px; font-size: 12px; cursor: pointer; }
.choose-video { position: relative; border-color: #6e5ba1; background: #2a2141; color: var(--accent-bright); }
.choose-video:hover { border-color: var(--accent); background: #35284e; }
.choose-video:focus-within { outline: 2px solid var(--accent-bright); outline-offset: 3px; }
.choose-video input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  clip-path: inset(50%);
  overflow: hidden;
}
.source-button { border-color: #433a56; background: #201c31; color: var(--ink); }
.source-button:hover { border-color: #8976ac; }
.source-button:disabled { opacity: .6; cursor: wait; }
.source-details { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.5; }
#source-name { overflow: hidden; max-width: 100%; color: var(--ink); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
#source-status { min-width: 0; }
.video-panes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 8px; }
.video-pane { min-width: 0; }
.feed-heading { display: flex; min-height: 34px; justify-content: space-between; align-items: center; gap: 4px; }
.feed-heading h3 { color: var(--ink); font: 650 13px/1.1 var(--display); }
.video-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  min-height: 90px;
  isolation: isolate;
  border: 1px solid #3b3451;
  border-radius: 7px;
  background: #0c0b14;
}
.viewer-frame {
  background: radial-gradient(ellipse at center, #241d37b5, transparent 80%),
    repeating-linear-gradient(90deg, #b7a3ff16 0 1px, transparent 1px 19px),
    repeating-linear-gradient(#b7a3ff16 0 1px, transparent 1px 19px), #10101a;
}
.video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.viewer-frame video { visibility: hidden; background: #0c0b14; }
.demo[data-playback="running"] .viewer-frame video { visibility: visible; }
.viewer-state {
  position: absolute;
  inset: 7px;
  display: grid;
  place-items: center;
  text-align: center;
}
.viewer-state > strong { max-width: 16ch; color: #e9e2f9; font: 650 clamp(16px, 2.1vw, 25px)/1.13 var(--display); letter-spacing: -.04em; text-wrap: balance; }
.demo[data-playback="running"] .viewer-state { visibility: hidden; }
.live-label, .broadcast-time, .viewer-audio {
  color: var(--muted);
  font: 500 10px/1.2 var(--mono);
  letter-spacing: .04em;
}
.live-label { display: flex; align-items: center; gap: 5px; text-transform: uppercase; }
.live-label > i { width: 6px; height: 6px; flex: none; border-radius: 50%; background: #8a839e; }
.demo[data-source-state="live"] .live-label > i { background: #ff827e; box-shadow: 0 0 7px #f6717b90; }
.broadcast-time {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 4px 5px;
  border: 1px solid #e2d8fc2c;
  border-radius: 4px;
  background: #0b0b16e5;
  color: #ede8fb;
  font-variant-numeric: tabular-nums;
}
.viewer-audio {
  min-height: 32px;
  padding: 4px 7px;
  margin-left: auto;
  border: 1px solid #433a56;
  border-radius: 5px;
  background: #1d192b;
  cursor: pointer;
}
.viewer-audio:hover { border-color: #8976ac; color: var(--ink); }
.keyframe-readout { display: flex; align-items: center; gap: 12px; margin: 10px 0 13px; color: var(--subtle); font: 500 10px/1.3 var(--mono); font-variant-numeric: tabular-nums; }
.keyframe-track { position: relative; display: block; height: 6px; flex: 1; background: linear-gradient(90deg, #332d46 0 1px, transparent 1px) 0 0 / calc(100% / 12) 100%, #201d30; border-radius: 3px; }
.keyframe-track i { position: absolute; inset: 0 auto 0 0; width: var(--cycle-position); border-radius: inherit; background: linear-gradient(90deg, #4d3d75, #a48beb); }
.keyframe-track b { position: absolute; inset: 50% 0 auto auto; width: 7px; height: 7px; border-radius: 1px; transform: translateY(-50%) rotate(45deg); background: var(--accent); }
.demo[data-mode="guided"] .keyframe-track { display: none; }
.join-stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.join-stages li {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 33px;
  padding: 4px 8px;
  border: 1px solid #36304b;
  border-radius: 5px;
  background: #191726;
  color: #b5afc9;
  font: 500 10px/1.25 var(--mono);
}
.join-stages li > span { width: 6px; height: 6px; flex: none; border: 1px solid #8b819e; border-radius: 50%; }
.join-stages li[data-state="active"] { border-color: #9e85f1; color: #f0e9ff; background: #2b2344; }
.join-stages li[data-state="active"] > span { border-color: #d4c7ff; box-shadow: 0 0 6px #bcabfa8a; }
.join-stages li[data-state="done"] { border-color: #64518e; color: #e0d4ff; background: #231c36; }
.join-stages li[data-state="done"] > span { border-color: var(--accent); background: var(--accent); }
.demo-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.demo-button, .demo-guide { min-height: 42px; padding-inline: 11px; gap: 8px; cursor: pointer; }
.demo-button { min-width: 118px; }
.demo-guide { min-width: 108px; }
.demo-button, .demo[data-mode="guided"] .demo-guide { border-color: transparent; background: var(--accent); color: var(--accent-ink); }
.demo-button:hover, .demo[data-mode="guided"] .demo-guide:hover { background: var(--accent-bright); }
.demo-guide, .demo[data-mode="guided"] .demo-button { border-color: #52466e; background: #1c192d; color: var(--ink); }
.demo-guide:hover, .demo[data-mode="guided"] .demo-button:hover { border-color: var(--accent); background: #27203a; }
.demo-play { width: 0; height: 0; border: 4px solid transparent; border-left: 6px solid currentColor; border-right: 0; }
.demo:not([data-phase="idle"]) .demo-play { width: 7px; height: 7px; border: 0; border-radius: 1px; background: currentColor; }
.demo-status, .demo-guidance { margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.demo-status { min-height: 2.9em; }
.demo-guidance { margin-top: 10px; }

.section { padding-block: 78px; }
.section + .section { border-top: 1px solid var(--line); }
.section-heading { margin-bottom: 29px; }
.section-heading h2, .contact h2 { margin-top: 12px; font: 700 clamp(40px, 5.6vw, 70px)/.99 var(--display); letter-spacing: -.075em; }
.case-study { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 35px; padding: clamp(22px, 3.6vw, 47px); border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(110deg, #171523, #12121d 55%); }
.project-kind { color: var(--accent); }
.case-intro h3 { margin: 9px 0 13px; font: 700 clamp(27px, 3.5vw, 42px)/1 var(--display); letter-spacing: -.06em; }
.case-intro > p:not(.project-kind), .case-steps dd, .experience-row p, .experience-points, .contact p { color: var(--muted); font-size: 15px; line-height: 1.67; }
.tech-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 17px 0; padding: 0; list-style: none; }
.tech-list li { padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font: 500 11px/1.25 var(--mono); }
.text-link { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-bright); font-size: 14px; font-weight: 600; text-decoration-color: #8c75ce; text-underline-offset: 4px; }
.text-link:hover { color: var(--ink); }
.pipeline { display: grid; grid-template-columns: 1fr minmax(9px, .4fr) 1.55fr minmax(9px, .4fr) 1fr; align-items: center; gap: 7px; color: var(--muted); font: 500 12px/1.25 var(--mono); }
.pipeline > span, .pipeline strong { padding: 9px 3px; border: 1px solid #38334b; border-radius: 5px; background: #1b1929; text-align: center; }
.pipeline strong { border-color: #6e5ba1; color: var(--accent-bright); background: #2a2141; }
.pipeline i { position: relative; height: 1px; background: #73648b; }
.pipeline i::after { position: absolute; top: -2px; right: 0; width: 5px; height: 5px; transform: rotate(-45deg); border-right: 1px solid #73648b; border-bottom: 1px solid #73648b; content: ""; }
.case-steps { display: grid; gap: 13px; margin: 17px 0 0; }
.case-steps dt { font: 650 16px/1.3 var(--display); }
.case-steps dd { margin: 2px 0 0; font-size: 14px; }
.experience-list { border-top: 1px solid var(--line); }
.experience-row { display: grid; grid-template-columns: minmax(142px, .34fr) minmax(0, 1fr); gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.experience-meta { display: grid; align-content: start; gap: 4px; }
.experience-meta .experience-company { color: var(--ink); font: 650 17px/1.35 var(--display); }
.experience-meta p:last-child { color: var(--subtle); font: 500 11px/1.4 var(--mono); }
.experience-row h3 { margin-bottom: 8px; font: 650 clamp(20px, 2.4vw, 29px)/1.1 var(--display); letter-spacing: -.045em; }
.experience-points { margin: 0; padding-inline-start: 1.15em; }
.experience-points li + li { margin-top: 7px; }
.experience-points li::marker { color: var(--accent); }
.experience-row .tech-list { margin-bottom: 0; }
.contact { display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.contact h2 { margin-top: 0; }
.contact p { max-width: 54ch; margin-top: 12px; }
.contact-links { flex: none; margin-top: 0; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 66px; color: var(--subtle); font: 500 11px/1.4 var(--mono); }
.footer-inner a { color: var(--muted); text-decoration: none; }
.footer-inner a:hover { color: var(--accent-bright); }

@media (min-width: 1440px) {
  .hero-layout { padding-block: 104px; }
}
@media (max-width: 1060px) {
  .site-shell { width: calc(100% - 72px); }
  .hero h1 { font-size: clamp(56px, 8.2vw, 92px); }
}
@media (max-width: 800px) {
  .site-shell { width: min(100% - 48px, 648px); }
  .hero-layout { grid-template-columns: minmax(0, 1fr); gap: 34px; padding-block: 50px; }
  .hero h1 { font-size: clamp(65px, 12.8vw, 94px); }
  .hero-location { margin-top: 24px; }
  .section { padding-block: 54px; }
  .case-study { grid-template-columns: minmax(0, 1fr); gap: 25px; }
}
@media (max-width: 520px) {
  .site-shell { width: calc(100% - 36px); }
  .site-nav { gap: 13px; font-size: 12px; }
  .header-inner { min-height: 61px; gap: 9px; }
  .brand { gap: 7px; font-size: 18px; }
  .brand-mark { width: 27px; height: 27px; }
  .hero-layout { padding-block: 39px; }
  .hero h1 { margin-block: 17px 19px; font-size: clamp(56px, 13.4vw, 76px); }
  .hero-actions { margin-top: 22px; }
  .demo-heading { padding: 10px 12px; }
  .demo-content { padding: 10px; }
  .join-stages li { gap: 5px; padding-inline: 5px; }
  .demo-controls { gap: 9px; }
  .experience-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .experience-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 12px; }
  .contact { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 370px) {
  .site-nav { gap: 9px; }
  .site-nav .nav-resume span { display: none; }
  .viewer-audio { padding-inline: 3px; }
}
@media (pointer: coarse) {
  .site-nav a { display: inline-flex; align-items: center; min-height: 44px; }
  .demo-button, .demo-guide, .source-controls .action, .viewer-audio { min-height: 44px; }
  .feed-heading { min-height: 49px; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}
