:root {
  color-scheme: dark;
  --background: #101012;
  --surface: #18181b;
  --text: #f0eee9;
  --muted: #aaa6a7;
  --accent: #ff624f;
  --line: #303034;
  font-family: "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body { margin: 0; background: var(--background); color: var(--text); }
::selection { background: var(--accent); color: var(--background); }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 7px; }
.page-shell { width: min(1240px, calc(100% - 96px)); margin-inline: auto; }
.skip-link { position: absolute; top: -100px; left: 24px; z-index: 10; padding: 12px 20px; background: var(--text); color: var(--background); }
.skip-link:focus { top: 12px; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 104px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 13px; font-size: 15px; letter-spacing: .1em; font-weight: 750; }
.brand-light { font-weight: 400; margin-left: 5px; }
.site-header nav { display: flex; gap: 34px; align-items: center; font-size: 13px; }
.site-header nav a { display: flex; gap: 12px; align-items: center; padding-block: 12px; }
.site-header nav a:hover, .site-footer a:hover { color: var(--accent); }
.status-dot { display: inline-block; flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px #ff624f40; }
.hero { position: relative; display: grid; gap: 42px; padding: 54px 0 102px; }
.hero-copy { position: relative; z-index: 1; }
.eyebrow, .section-label, .art-coordinate, .art-caption, .status-badge { font-family: "Cascadia Mono", Consolas, monospace; font-size: 10px; letter-spacing: .14em; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 0 0 30px; }
.short-line { width: 25px; height: 1px; background: var(--accent); }
h1 { margin: 0; font-size: clamp(52px, 5.7vw, 82px); line-height: 1.08; font-weight: 620; letter-spacing: -.063em; }
h1 em { font-style: normal; color: var(--accent); }
.intro { color: var(--muted); font-size: 16px; line-height: 1.8; margin: 28px 0 32px; }
.button { display: inline-flex; align-items: center; gap: 35px; padding: 17px 22px; background: var(--text); color: var(--background); font-size: 13px; font-weight: 600; transition: background .15s; }
.button:hover { background: var(--accent); }
.button span { font-size: 20px; line-height: 1; }
.hero-note { color: var(--muted); font-size: 11px; margin: 20px 0 0; }
.hero-terminal { position: relative; min-height: 520px; display: grid; place-items: center; overflow: hidden; }
.hero-terminal::before { content: ""; position: absolute; inset: -8% -8% -2%; background: radial-gradient(ellipse, #ff40281c 0%, transparent 70%); pointer-events: none; }
.terminal-window { position: relative; width: min(100%, 880px); border: 1px solid #ff624f42; border-radius: 8px; background: linear-gradient(145deg, #151516 0%, #0c0c0d 100%); box-shadow: 0 0 0 1px #ffffff08 inset, 0 28px 90px #00000055, 0 0 44px #ff624f16; overflow: hidden; }
.terminal-window::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(180deg, #ffffff05 0 1px, transparent 1px 7px); opacity: .18; pointer-events: none; }
.terminal-topline, .terminal-footer { position: relative; display: flex; justify-content: space-between; gap: 18px; padding: 14px 16px; color: var(--muted); font-family: "Cascadia Mono", Consolas, monospace; font-size: 10px; letter-spacing: .08em; border-bottom: 1px solid #303034; }
.terminal-state-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px #ff624f80; }
.terminal-footer { border-top: 1px solid #303034; border-bottom: 0; color: #ffb0a6; }
.terminal-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; }
.terminal-panel { min-height: 92px; padding: 13px; border: 1px solid #303034; background: #ffffff05; }
.terminal-panel-wide { grid-column: 1 / -1; }
.terminal-label { display: block; margin-bottom: 13px; color: var(--muted); font-family: "Cascadia Mono", Consolas, monospace; font-size: 10px; letter-spacing: .11em; }
.terminal-panel strong { display: block; color: var(--accent); font-family: "Cascadia Mono", Consolas, monospace; font-size: clamp(24px, 3.2vw, 34px); font-weight: 500; letter-spacing: .02em; text-shadow: 0 0 18px #ff624f33; }
.terminal-panel pre { margin: 0; color: var(--accent); font-family: "Cascadia Mono", Consolas, monospace; font-size: 20px; line-height: 1.45; letter-spacing: .16em; }
.terminal-wave { display: block; width: 100%; height: auto; min-height: 210px; border: 1px solid #303034; border-radius: 8px; background: #080809; }
.wave-grid-line { fill: none; stroke: #f0eee91f; stroke-width: 1; }
.wave-trace { fill: none; stroke: #f0eee9; stroke-linecap: round; stroke-linejoin: round; stroke-width: 4; filter: drop-shadow(0 0 12px #ff624f44); }
.wave-shadow { stroke: #ff624f70; stroke-width: 2; filter: none; }
.terminal-controls { display: grid; gap: 14px; }
.terminal-controls label { display: grid; gap: 8px; color: var(--muted); font-family: "Cascadia Mono", Consolas, monospace; font-size: 10px; letter-spacing: .11em; }
.terminal-controls input { width: 100%; accent-color: var(--accent); cursor: pointer; }
.terminal-controls input:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.project-section { padding: 36px 0 59px; border-top: 1px solid var(--line); }
.section-label { display: flex; align-items: center; gap: 25px; color: var(--accent); }
.section-line { width: 45px; height: 1px; background: var(--line); }
.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin-top: 35px; }
h2 { margin: 0; font-size: 33px; font-weight: 500; letter-spacing: -.04em; line-height: 1.22; }
.project-copy { max-width: 460px; color: var(--muted); font-size: 14px; line-height: 1.85; }
.project-copy p { margin: 0 0 12px; }
.watcher-card { scroll-margin-top: 30px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 46px; margin-top: 56px; padding: 38px; border: 1px solid var(--line); background: linear-gradient(135deg, #19191c 0%, #111113 72%); box-shadow: 0 26px 80px #00000030; }
.watcher-copy { align-self: center; }
.watcher-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; color: var(--muted); font-family: "Cascadia Mono", Consolas, monospace; font-size: 9px; letter-spacing: .14em; }
.watcher-copy h3 { margin: 0; font-size: clamp(42px, 5.3vw, 70px); line-height: 1; font-weight: 620; letter-spacing: -.065em; }
.watcher-copy h3 span { color: var(--accent); }
.watcher-lead { max-width: 510px; margin: 25px 0 14px; color: var(--text); font-size: 17px; line-height: 1.55; }
.watcher-description { max-width: 540px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.watcher-actions { display: flex; align-items: stretch; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.watcher-link, .watcher-test { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 17px; border: 1px solid var(--line); font: 600 11px/1 "Segoe UI", Arial, sans-serif; cursor: pointer; }
.watcher-link { gap: 22px; color: var(--background); background: var(--text); }
.watcher-link:hover { background: var(--accent); }
.watcher-test { color: var(--text); background: transparent; }
.watcher-test:hover { border-color: var(--accent); color: var(--accent); }
.watcher-test:disabled { cursor: wait; opacity: .65; }
.watcher-link:focus-visible, .watcher-test:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.watcher-console { align-self: stretch; min-width: 0; border: 1px solid #ff624f3b; background: #09090a; box-shadow: 0 0 36px #ff624f0c; }
.watcher-console-head { display: flex; justify-content: space-between; gap: 16px; padding: 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-family: "Cascadia Mono", Consolas, monospace; font-size: 9px; letter-spacing: .08em; }
.watcher-state-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 11px #ff624f80; }
.watcher-console dl { margin: 0; padding: 8px 18px; }
.watcher-console dl div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; padding: 13px 0; border-bottom: 1px solid #303034b3; }
.watcher-console dt, .watcher-console dd, .watcher-result { font-family: "Cascadia Mono", Consolas, monospace; font-size: 9px; line-height: 1.5; }
.watcher-console dt { color: var(--muted); letter-spacing: .08em; }
.watcher-console dd { min-width: 0; margin: 0; color: var(--text); overflow-wrap: anywhere; }
.watcher-result { min-height: 53px; margin: 0; padding: 17px 18px; color: #ffb0a6; }
.watcher-card[data-state="connected"] .watcher-state-dot { background: #7df0a1; box-shadow: 0 0 12px #7df0a180; }
.watcher-card[data-state="connected"] .watcher-result { color: #9ef3b6; }
.watcher-card[data-state="error"] .watcher-state-dot { background: #ffd36a; box-shadow: 0 0 12px #ffd36a66; }
.watcher-card[data-state="error"] .watcher-result { color: #ffd36a; }
.status-section { display: grid; grid-template-columns: 1fr auto; gap: 10px 30px; padding: 30px; background: var(--surface); border: 1px solid var(--line); }
.status-heading { display: flex; align-items: center; gap: 13px; }
.status-heading h2 { font-size: 18px; letter-spacing: -.015em; }
.status-section p { grid-column: 1; color: var(--muted); font-size: 13px; margin: 0 0 0 20px; }
.status-badge { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--accent); font-size: 9px; border: 1px solid #ff624f45; padding: 10px 12px; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 65px; padding: 27px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; letter-spacing: .055em; }
.site-footer > :first-child { color: var(--text); font-weight: 600; }
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 32px; }
.error-content { width: min(620px, 100%); }
.error-content h1 { font-size: clamp(44px, 9vw, 72px); }
.error-content p { color: var(--muted); line-height: 1.7; margin-block: 28px; }

@media (max-width: 850px) {
  .page-shell { width: calc(100% - 48px); }
  .hero { padding-top: 44px; padding-bottom: 68px; }
  .hero-terminal { min-height: 500px; }
  .terminal-window { width: 100%; }
  h1 { font-size: 58px; }
  .project-grid { gap: 32px; }
  .watcher-card { gap: 30px; padding: 30px; }
  .watcher-console dl div { grid-template-columns: 105px minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .page-shell { width: calc(100% - 40px); }
  .site-header { min-height: 86px; gap: 14px; flex-wrap: wrap; padding-block: 18px; }
  .brand { font-size: 11px; gap: 8px; letter-spacing: .04em; }
  .brand img { width: 28px; height: 28px; }
  .brand-light { margin-left: 3px; }
  .site-header nav { font-size: 11px; gap: 16px; width: 100%; justify-content: space-between; }
  .site-header nav a { gap: 7px; }
  .hero { padding-top: 32px; padding-bottom: 40px; gap: 30px; }
  .eyebrow { font-size: 8px; letter-spacing: .1em; margin-bottom: 26px; }
  h1 { font-size: clamp(43px, 10.5vw, 63px); }
  .intro { font-size: 14px; margin-top: 24px; }
  .hero-terminal { width: 100%; min-height: 530px; margin: 0 auto; }
  .terminal-topline, .terminal-footer { flex-wrap: wrap; font-size: 8px; padding: 12px; }
  .terminal-grid { gap: 8px; padding: 10px; }
  .terminal-grid { grid-template-columns: 1fr; }
  .terminal-panel { min-height: 80px; padding: 11px; }
  .terminal-label { font-size: 8px; margin-bottom: 10px; }
  .terminal-panel pre { font-size: 16px; letter-spacing: .12em; }
  .terminal-wave { min-height: 160px; }
  .project-grid { grid-template-columns: 1fr; gap: 24px; margin-top: 28px; }
  .project-section { padding-bottom: 34px; }
  .watcher-card { grid-template-columns: 1fr; gap: 30px; margin-top: 38px; padding: 22px; }
  .watcher-lead { font-size: 15px; }
  .watcher-actions { display: grid; }
  .watcher-console-head { flex-wrap: wrap; }
  .watcher-console dl div { grid-template-columns: 1fr; gap: 5px; }
  h2 { font-size: 30px; }
  .status-section { padding: 23px 20px; grid-template-columns: 1fr; gap: 13px; }
  .status-heading h2 { font-size: 16px; }
  .status-badge { grid-column: 1; grid-row: auto; justify-self: start; margin-left: 20px; }
  .site-footer { flex-wrap: wrap; margin-top: 40px; line-height: 1.6; }
  .site-footer > :last-child { flex-basis: 100%; }
}
@media (max-width: 360px) {
  .site-header { flex-wrap: wrap; padding-block: 18px; }
  .site-header nav { width: 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
