:root {
  color-scheme: dark;
  --bg: #080e18;
  --panel: #101a2a;
  --panel-strong: #15243a;
  --line: #273b55;
  --muted: #90a2bc;
  --text: #edf5ff;
  --mint: #5ce3c1;
  --blue: #9fb6ff;
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: radial-gradient(ellipse 60% 40% at 75% -15%, #253a5a55, transparent 75%), var(--bg);
  color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}
body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 50% 55% at -12% 75%, rgba(41, 177, 155, .06), transparent 80%);
}
a { color: inherit; text-decoration: none; }
button, a { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 30; padding: 10px 14px; border-radius: 8px; background: var(--mint); color: #07141c; font-weight: 700; }
.skip-link:focus { top: 12px; }
.shell { width: min(1230px, calc(100% - 64px)); margin: auto; }
.topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid rgba(132, 159, 191, .13); }
.mark { font-size: 24px; font-weight: 800; letter-spacing: -1.2px; }
.mark span { color: var(--mint); }
.topnav { display: flex; align-items: center; gap: 4px; }
.topnav a { padding: 9px 12px; border-radius: 9px; color: #a3b2c9; font-size: 13px; transition: color .2s, background .2s; }
.topnav a:hover { background: #152338; color: #fff; }
.availability, .pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #2b5c56; border-radius: 50px; background: rgba(36, 153, 127, .09); color: #78eacb; font: 10px "Space Mono", monospace; letter-spacing: .02em; white-space: nowrap; }
.availability { padding: 9px 12px; }
.status-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px #5ce3c119, 0 0 14px #5ce3c169; }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(24px, 4vw, 56px); min-height: 390px; padding: 42px 0 30px; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--mint); font: 11px/1.5 "Space Mono", monospace; letter-spacing: 1.3px; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--mint); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 20px; font-size: clamp(46px, 5.1vw, 72px); line-height: 1.04; letter-spacing: -3.8px; }
h1 span { color: var(--blue); }
.hero-copy { max-width: 540px; margin-bottom: 10px; color: #b8c6da; font-size: 17px; line-height: 1.7; }
.intro-small { max-width: 510px; margin-bottom: 0; color: #7890ad; font-size: 13px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.action { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 10px 14px; border: 1px solid #354c68; border-radius: 11px; color: #dae7fa; font-size: 13px; font-weight: 700; transition: transform .2s, border-color .2s, background .2s; }
.action:hover { transform: translateY(-2px); border-color: var(--blue); background: #172941; }
.action.primary { border-color: var(--blue); background: var(--blue); color: #0b1221; }
.action.primary:hover { background: #c2ceff; }
.social-icon { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; border: 1px solid #395471; border-radius: 6px; color: var(--mint); font: 10px "Space Mono", monospace; }
.statbox { position: relative; isolation: isolate; overflow: hidden; border: 1px solid #314762; border-radius: var(--radius); background: linear-gradient(145deg, rgba(22, 38, 62, .96), rgba(14, 25, 43, .97)); box-shadow: 0 18px 65px #0005, 0 0 70px #667cdd0c; }
.statbox { padding: 25px; }
.spotlight::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(126, 161, 255, .135), transparent 63%); transition: opacity .3s; }
.spotlight:hover::before, .spotlight:focus-within::before { opacity: 1; }
.spotlight > * { position: relative; z-index: 1; }
.stat-top, .stat-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-top { color: #9bb3cf; font: 10px "Space Mono", monospace; letter-spacing: 1.1px; text-transform: uppercase; }
.pill { padding: 7px 10px; letter-spacing: 0; text-transform: none; }
.pill[data-state="connected"] { border-color: #2b6a62; color: var(--mint); }
.pill[data-state="stale"], .pill[data-state="checking"] { border-color: #665731; color: #edc878; }
.refresh-stats { border: 0; background: transparent; color: #9fb6ff; font: 10px "Space Mono", monospace; }
.refresh-stats:hover { color: #fff; }
.refresh-stats:disabled { cursor: wait; opacity: .5; }
.statbox h2 { margin: 25px 0 20px; font-size: clamp(24px, 2.2vw, 31px); line-height: 1.2; letter-spacing: -1px; }
.statbox h2 small { display: block; margin-bottom: 9px; color: #99b0cf; font: 11px "Space Mono", monospace; letter-spacing: 1px; text-transform: uppercase; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.metric { min-width: 0; padding: 13px 11px; border: 1px solid #334a6b; border-radius: 12px; background: #1a2b45; }
.metric strong { display: block; overflow: hidden; font-size: clamp(20px, 2.2vw, 31px); line-height: 1.1; letter-spacing: -1.5px; text-overflow: ellipsis; white-space: nowrap; }
.metric span { display: block; margin-top: 8px; color: #a0b2cb; font-size: 10px; line-height: 1.4; }
.chart-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid #2b4363; }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #abc3e3; font: 10px "Space Mono", monospace; }
.chart-head strong { color: #e5f0ff; font-weight: 400; }
.chart-frame { position: relative; display: grid; place-items: center; height: 72px; margin-top: 10px; overflow: hidden; border: 1px dashed #35506e; border-radius: 10px; background: linear-gradient(180deg, #24395833, transparent); }
.chart-placeholder { padding: 5px; color: #8299b7; font-size: 10px; line-height: 1.4; text-align: center; }
.chart-frame svg { display: block; width: 100%; height: 100%; }
.chart-frame.has-data { border-style: solid; }
.chart-frame.has-data .chart-placeholder { display: none; }
.stat-bottom { margin-top: 20px; padding-top: 15px; border-top: 1px solid #314761; color: #91a6c3; font-size: 11px; }
.stat-bottom a { color: #bed0ff; font-weight: 700; white-space: nowrap; }
.stat-bottom a:hover { text-decoration: underline; }
.trust-strip { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); align-items: center; gap: 12px; padding: 18px 0; border-top: 1px solid #25354b; border-bottom: 1px solid #25354b; }
.strip-label { color: #7792b4; font: 10px "Space Mono", monospace; letter-spacing: 1px; text-transform: uppercase; }
.strip-label span { color: #c5d7ee; font: 12px system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: 0; text-transform: none; }
.strip-item { color: #d6e2f3; font-size: 12px; font-weight: 700; }
.strip-item span { display: block; margin-top: 3px; color: #8096b1; font-size: 11px; font-weight: 400; }
.workspace { margin-top: 32px; }
.workspace-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.workspace-head h2 { margin: 5px 0 4px; font-size: 30px; letter-spacing: -1.3px; }
.workspace-head > div:first-child > p:last-child { margin: 0; color: #96aac4; font-size: 13px; }
.tabs { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(100%, 250px); padding: 5px; overflow: hidden; border: 1px solid #293d56; border-radius: 13px; background: #0e1827; }
.tab { position: relative; z-index: 1; padding: 11px 13px; border: 0; border-radius: 9px; background: transparent; color: #9eafc6; font-size: 12px; font-weight: 700; }
.tab[aria-selected="true"] { color: #f0f5ff; }
.tab-slider { position: absolute; z-index: 0; top: 5px; left: 5px; width: 0; height: calc(100% - 10px); border-radius: 9px; background: #273e5d; box-shadow: 0 3px 16px #0003; pointer-events: none; transition: transform .28s cubic-bezier(.2, .9, .2, 1), width .28s cubic-bezier(.2, .9, .2, 1); }
.stage { min-height: 252px; padding: 14px; overflow: hidden; border: 1px solid #2b405b; border-radius: var(--radius); background: linear-gradient(135deg, #101d30, #0f1a2a); }
.panel[hidden] { display: none; }
.panel { animation: panel-in .36s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.cap-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.cap, .project { border: 1px solid #2b4260; border-radius: 14px; background: var(--panel-strong); }
.cap { min-height: 212px; padding: 20px 17px; transition: transform .2s, border-color .2s, background .2s; }
.cap:hover, .project:hover { transform: translateY(-3px); border-color: #6d91c8; background: #192c47; }
.cap-top { display: flex; align-items: center; justify-content: space-between; color: #9eb8d8; font: 11px "Space Mono", monospace; }
.cap-icon { color: var(--blue); font: 22px "Space Mono", monospace; }
.cap h3 { margin: 23px 0 8px; font-size: 17px; line-height: 1.25; letter-spacing: -.35px; }
.cap p, .project p { color: #9eafc8; font-size: 12px; line-height: 1.55; }
.cap p { margin-bottom: 15px; }
.cap-tag { display: block; color: #97baff; font: 10px "Space Mono", monospace; }
.projects { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 11px; }
.project { display: flex; min-height: 260px; flex-direction: column; padding: 21px; transition: transform .2s, border-color .2s, background .2s; }
.project.featured { background: linear-gradient(145deg, #1c304e, #16253d); }
.kicker, .repo, .mono { color: #9bb7e4; font: 10px "Space Mono", monospace; letter-spacing: 1px; text-transform: uppercase; }
.project h3 { margin: 11px 0 2px; font-size: 21px; line-height: 1.2; letter-spacing: -.7px; }
.project.featured h3 { font-size: 25px; }
.repo { color: #7998c1; font-size: 10px; letter-spacing: 0; overflow-wrap: anywhere; text-transform: none; }
.project-visual { display: flex; align-items: center; justify-content: center; gap: 8px; height: 68px; margin-top: 14px; padding: 10px; overflow: hidden; border: 1px solid #344d6f; border-radius: 10px; background: #0d192b; }
.pv-node { padding: 7px 8px; border: 1px solid #426383; border-radius: 7px; color: #b8d2f7; font: 10px "Space Mono", monospace; white-space: nowrap; }
.pv-arrow { color: var(--mint); font-size: 15px; }
.pv-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 15px var(--mint); }
.project p { margin: 11px 0 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tags span { padding: 5px 8px; border-radius: 50px; background: #273c5d; color: #b7cced; font: 10px "Space Mono", monospace; }
.details-btn { align-self: flex-start; margin-top: 15px; padding: 0; border: 0; background: transparent; color: #bbd0ff; font-size: 12px; font-weight: 700; }
.details-btn:hover, .project-link:hover { text-decoration: underline; }
.project-link { align-self: flex-start; margin-top: 8px; color: #bbd0ff; font-size: 12px; font-weight: 700; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 24px 0 32px; color: #687e9b; font-size: 11px; }
.footer a:hover { color: var(--mint); }
.reveal { opacity: 1; transform: none; }
.project-modal { width: min(560px, calc(100vw - 32px)); max-height: min(720px, calc(100dvh - 34px)); margin: auto; padding: 26px; overflow: auto; border: 1px solid rgba(156, 190, 244, .32); border-radius: 22px; background: linear-gradient(145deg, rgba(24, 40, 66, .98), rgba(11, 21, 37, .99)); color: #eef4ff; box-shadow: 0 40px 130px rgba(0, 0, 0, .65); }
.project-modal::backdrop { background: rgba(2, 7, 18, .78); backdrop-filter: blur(7px); }
.project-modal[open] { animation: modal-in .22s ease-out both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-close { width: 38px; height: 38px; border: 1px solid #405473; border-radius: 10px; background: #1c2b44; color: #d9e7ff; font-size: 20px; }
.project-modal h2 { margin: 18px 0 8px; font-size: clamp(25px, 3vw, 37px); line-height: 1.12; letter-spacing: -.05em; }
.modal-repo { color: #96abd0; font: 12px ui-monospace, monospace; overflow-wrap: anywhere; }
.modal-diagram .project-visual { width: 100%; height: 100px; margin: 22px 0; }
.project-modal #modal-description { color: #cfdbef; font-size: 15px; line-height: 1.6; }
.project-modal .tags { margin: 18px 0; }
.modal-note { margin: 12px 0 25px; color: #94a7c4; font-size: 11px; line-height: 1.55; }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr 1fr; }
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .projects { grid-template-columns: 1fr 1fr; }
  .project.featured { grid-column: span 2; }
  .trust-strip { grid-template-columns: repeat(3, 1fr); }
  .strip-label { grid-column: span 3; }
  .workspace-head { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 740px) {
  .shell { width: min(100% - 36px, 560px); }
  .topbar { min-height: 70px; }
  .topnav { display: none; }
  .availability { font-size: 9px; }
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 27px; padding: 30px 0 25px; }
  h1 { margin-top: 16px; font-size: clamp(43px, 10.5vw, 62px); letter-spacing: -2.8px; }
  .hero-copy { font-size: 15px; }
  .statbox { padding: 20px; }
  .metric { padding: 12px 9px; }
  .metric strong { font-size: clamp(20px, 5.7vw, 28px); }
  .metric span { font-size: 9px; }
  .trust-strip { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .strip-label { grid-column: span 2; }
  .workspace { margin-top: 27px; }
  .workspace-head h2 { font-size: 27px; }
  .tabs { width: 100%; }
  .stage { min-height: 0; padding: 12px; }
  .cap-grid, .projects { grid-template-columns: 1fr; }
  .cap { min-height: 0; padding: 19px; }
  .cap h3 { margin-top: 13px; }
  .project, .project.featured { grid-column: auto; min-height: 0; padding: 20px; }
  .project.featured h3 { font-size: 22px; }
  .chart-block { margin-top: 13px; }
  .footer { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 500px) {
  .stat-top { flex-wrap: wrap; }
  .stat-top > span:first-child { width: 100%; }
  .hero h1 { font-size: clamp(37px, 10vw, 54px); }
  .workspace-head h2 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
