/* ───────── Tokens — "Cosmic" #23212C ───────── */
:root {
  color-scheme: dark;
  --bg: #0d0c12;
  --bg-2: #23212c;
  --nebula-a: rgba(78, 92, 138, 0.50);
  --nebula-b: rgba(128, 58, 104, 0.38);
  --nebula-c: rgba(92, 78, 164, 0.30);
  --text: #ecebf3;
  --text-2: #a7a3b8;
  --text-3: #75718a;
  --glass: rgba(30, 28, 40, 0.10);
  --glass-strong: rgba(30, 28, 40, 0.22);
  --glass-hi: rgba(255, 255, 255, 0.04);
  --stroke: rgba(255, 255, 255, 0.11);
  --stroke-2: rgba(255, 255, 255, 0.16);
  --inner: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 0 0 0.5px rgba(255, 255, 255, 0.04);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.5);
  --accent: #a8a2ff;
  --accent-2: #e8a2c8;
  --accent-soft: rgba(168, 162, 255, 0.14);
  --green: #3ddc97;
  --green-soft: rgba(61, 220, 151, 0.14);
  --icon-filter: invert(1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --radius: 16px;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;
}

/* ───────── Base ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--accent-soft); color: var(--text); }

/* ───────── Desktop background ───────── */
#stars, .nebula { position: fixed; inset: 0; pointer-events: none; }
#stars { z-index: -1; }
.nebula {
  z-index: -2;
  background:
    radial-gradient(34vmax 26vmax at 14% 10%, var(--nebula-a), transparent 70%),
    radial-gradient(26vmax 22vmax at 26% 30%, rgba(70, 150, 190, 0.16), transparent 70%),
    radial-gradient(36vmax 28vmax at 86% 64%, var(--nebula-b), transparent 70%),
    radial-gradient(22vmax 18vmax at 70% 82%, rgba(200, 110, 90, 0.12), transparent 70%),
    radial-gradient(30vmax 26vmax at 38% 96%, var(--nebula-c), transparent 70%),
    radial-gradient(120% 90% at 50% 40%, #121019, #060509 75%);
  animation: drift 60s var(--ease-in-out) infinite alternate;
}
@keyframes drift { to { transform: scale(1.08) translate3d(-1.5%, 1%, 0); } }

/* ───────── Glass primitives ───────── */
.glass, .window, .menubar, .dock {
  background: var(--glass);
  border: 1px solid var(--stroke);
  box-shadow: var(--inner), var(--shadow);
  backdrop-filter: blur(10px) saturate(170%);
  -webkit-backdrop-filter: blur(10px) saturate(170%);
}

/* ───────── Menu bar ───────── */
.menubar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  height: 32px; padding: 0 14px;
  display: flex; align-items: center; gap: 18px;
  font-size: 13px;
  border-width: 0 0 1px; box-shadow: none;
  background: var(--glass-strong);
}
.mb-brand { display: flex; align-items: center; gap: 7px; }
.mb-brand strong { font-weight: 700; letter-spacing: -0.01em; }
.mb-nav { display: flex; gap: 2px; }
.mb-nav a {
  padding: 2px 9px; border-radius: 6px; color: var(--text-2);
  transition: background-color 150ms ease, color 150ms ease;
}
.mb-nav a:hover, .mb-nav a.active { background: var(--glass-hi); color: var(--text); }
.mb-status { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--text-2); }
.mb-clock { font-variant-numeric: tabular-nums; color: var(--text); }

.status-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none;
  box-shadow: 0 0 0 0 var(--green);
  animation: ping 2.4s var(--ease-out) infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 60%, transparent); }
  70%, 100% { box-shadow: 0 0 0 7px transparent; }
}

/* ───────── Layout ───────── */
main { width: min(1080px, 100% - 32px); margin: 0 auto; padding: 84px 0 40px; }
.section { padding: 56px 0; scroll-margin-top: 40px; }
.hero { padding-top: 28px; }
.sec-head { margin-bottom: 20px; }
.eyebrow {
  font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent); margin-bottom: 10px;
}
h2 { font-size: clamp(24px, 3.4vw, 34px); line-height: 1.15; font-weight: 700; letter-spacing: -0.025em; }

/* ───────── Windows ───────── */
.window { border-radius: var(--radius); overflow: hidden; position: relative; }
.window::after {
  /* pointer-follow sheen */
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -20%), var(--glass-hi), transparent 60%);
  opacity: 0; transition: opacity 300ms ease;
}
.window:hover::after { opacity: 1; }
.titlebar {
  height: 38px; display: grid; grid-template-columns: 64px 1fr 64px; align-items: center;
  padding: 0 14px; border-bottom: 1px solid var(--stroke);
  font-size: 12.5px; color: var(--text-2);
}
.title { text-align: center; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lights { display: flex; gap: 8px; }
.lights i {
  width: 12px; height: 12px; border-radius: 50%; position: relative;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.25);
}
.lights i:nth-child(1) { background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.lights i::after {
  content: ""; position: absolute; inset: 0; display: grid; place-items: center;
  font: 700 9px/12px var(--sans); text-align: center; color: rgba(0, 0, 0, 0.55);
  opacity: 0; transition: opacity 120ms ease;
}
.lights i:nth-child(1)::after { content: "×"; }
.lights i:nth-child(2)::after { content: "−"; }
.lights i:nth-child(3)::after { content: "+"; }
.window:hover .lights i::after { opacity: 1; }
.win-body { padding: 28px; }

/* ───────── Hero ───────── */
.hero-body { padding: 36px clamp(22px, 5vw, 56px) 40px; }
.prompt { font: 400 13px/1 var(--mono); color: var(--text-3); margin-bottom: 18px; }
.p-user { color: var(--accent); }
.p-sym { color: var(--accent-2); }
.name {
  font-size: clamp(42px, 8.4vw, 92px); line-height: 0.98; font-weight: 800;
  letter-spacing: -0.045em;
  background: linear-gradient(180deg, var(--text) 30%, color-mix(in srgb, var(--text) 62%, var(--accent)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cursor {
  display: inline-block; width: 0.09em; height: 0.82em; margin-left: 0.08em; vertical-align: -0.04em;
  background: var(--accent); border-radius: 2px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.role { margin-top: 14px; font-size: clamp(17px, 2.2vw, 21px); font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.focus { margin-top: 18px; font: 400 13px/1.5 var(--mono); color: var(--text-3); }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px;
  border-radius: 10px; font-size: 14px; font-weight: 600;
  border: 1px solid var(--stroke-2); background: var(--glass-hi); color: var(--text);
  transition: transform 160ms var(--ease-out), background-color 150ms ease, border-color 150ms ease;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--text); color: var(--bg); border-color: transparent; }
.btn-primary:hover { border-color: transparent; background: color-mix(in srgb, var(--text) 88%, var(--accent)); }


/* ───────── Stack ───────── */
.stack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px 28px; }
.group h3 {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-3); margin-bottom: 10px;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 9px 0 6px; border-radius: 7px;
  font-size: 12.5px; font-weight: 500; color: var(--text);
  background: var(--glass-hi); border: 1px solid var(--stroke);
  transition: border-color 150ms ease, background-color 150ms ease, transform 160ms var(--ease-out);
}
.chips li:hover { border-color: var(--green); background: var(--green-soft); transform: translateY(-1px); }
.chips img { width: 13px; height: 13px; filter: var(--icon-filter); opacity: 0.82; }
.chips .mono {
  display: inline-grid; place-items: center; min-width: 15px; height: 15px; padding: 0 2px;
  border-radius: 4px; font: 700 7.5px/1 var(--mono); font-style: normal; letter-spacing: 0;
  color: var(--bg); background: var(--text-2);
}
.chips-sm li { height: 24px; font-size: 12px; }


.repo-body { display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; }
.repo-info h3 { font: 600 22px/1.2 var(--mono); letter-spacing: -0.02em; margin: 14px 0 8px; }
.repo-info p { color: var(--text-2); margin-bottom: 16px; }
.repo-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px;
  border-radius: 999px; font-size: 11.5px; font-weight: 600;
  border: 1px solid var(--stroke-2); color: var(--text-2);
}
.pill-live { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); background: var(--green-soft); }
.pill-live .status-dot { width: 6px; height: 6px; }
.pill-ai { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 40%, transparent); background: color-mix(in srgb, var(--accent-2) 12%, transparent); }
.suites {
  border-radius: 12px; border: 1px solid var(--stroke); background: var(--glass-hi);
  padding: 6px; align-self: start; font-size: 13.5px;
}
.suites li {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px;
  transition: background-color 150ms ease;
}
.suites li:hover { background: var(--glass-hi); }
.suites em { margin-left: auto; font: 400 12px/1 var(--mono); font-style: normal; color: var(--text-3); }
.pass { width: 14px; height: 14px; border-radius: 50%; flex: none; position: relative; background: var(--green-soft); }
.pass::after {
  content: ""; position: absolute; left: 4.5px; top: 2.5px; width: 3.5px; height: 6.5px;
  border: solid var(--green); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg);
}
.pass.ai { background: color-mix(in srgb, var(--accent-2) 16%, transparent); }
.pass.ai::after { border-color: var(--accent-2); }

/* ───────── Certifications ───────── */
.certs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cert {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  transition: transform 220ms var(--ease-out), border-color 150ms ease, box-shadow 220ms var(--ease-out);
}
.cert:hover { transform: translateY(-3px); border-color: var(--accent); }
.cert img, .cert svg { width: 44px; height: 44px; flex: none; object-fit: contain; }
.cert b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.cert span { font-size: 12px; color: var(--text-2); }

/* ───────── Footer ───────── */
.footer { text-align: center; color: var(--text-3); font-size: 12.5px; padding: 8px 16px 128px; }

/* ───────── Dock ───────── */
.dock {
  position: fixed; left: 50%; bottom: 14px; z-index: 20; translate: -50% 0;
  display: flex; align-items: flex-end; gap: 6px; padding: 7px 8px;
  border-radius: 20px; background: var(--glass-strong);
  /* floats over content, so it blurs more than the windows to stay legible */
  backdrop-filter: blur(22px) saturate(170%); -webkit-backdrop-filter: blur(22px) saturate(170%);
}
.dock-item {
  --s: 1;
  position: relative; width: 42px; height: 42px; border-radius: 11px;
  display: grid; place-items: center; color: var(--text-2);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--stroke);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: scale(var(--s)) translateY(calc((var(--s) - 1) * -14px));
  transform-origin: bottom center;
  transition: transform 180ms var(--ease-out), color 150ms ease, border-color 150ms ease, box-shadow 200ms ease;
}
/* each item keeps a faint tint of its own color, shown only on hover / when active */
.dock-item:hover, .dock-item.active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--g1) 45%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 18px -4px color-mix(in srgb, var(--g1) 70%, transparent);
}
.dock-item:active { transform: scale(calc(var(--s) * 0.94)) translateY(calc((var(--s) - 1) * -14px)); }
.dock-item svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dock-item svg.fill { fill: currentColor; stroke: none; }
.dock-item::before {
  /* tooltip */
  content: attr(data-label); position: absolute; bottom: calc(100% + 12px); left: 50%;
  translate: -50% 4px; padding: 3px 9px; border-radius: 7px; white-space: nowrap;
  font-size: 12px; font-weight: 500; color: var(--text);
  background: var(--glass-strong); border: 1px solid var(--stroke);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  opacity: 0; pointer-events: none;
  transition: opacity 150ms ease, translate 200ms var(--ease-out);
}
.dock-item:hover::before { opacity: 1; translate: -50% 0; }
.dock-item::after {
  /* "running app" indicator */
  content: ""; position: absolute; bottom: -6px; left: 50%; width: 4px; height: 4px;
  translate: -50% 0; border-radius: 50%; background: var(--text);
  opacity: 0; transition: opacity 200ms ease;
}
.dock-item.active::after { opacity: 0.8; }
.dock-sep { width: 1px; align-self: stretch; margin: 4px 3px; background: var(--stroke-2); }

/* ───────── Reveal (window "open") ───────── */
.js .reveal {
  opacity: 0; transform: translateY(18px) scale(0.985); filter: blur(6px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out), filter 700ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js .reveal.in { opacity: 1; transform: none; filter: none; }
.js .reveal .group, .js .reveal .suites li {
  opacity: 0; transform: translateY(8px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
  transition-delay: calc(200ms + var(--i, 0) * 55ms);
}
.js .reveal.in .group, .js .reveal.in .suites li { opacity: 1; transform: none; }

/* ───────── Responsive ───────── */
@media (max-width: 900px) {
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .certs { grid-template-columns: repeat(2, 1fr); }
  .repo-body { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .mb-nav { display: none; }
  .win-body { padding: 20px; }
  .stack-grid, .certs { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
  .dock { gap: 4px; padding: 6px; border-radius: 18px; }
  .dock-item { width: 40px; height: 40px; border-radius: 10px; }
  .dock-item::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; }
  .js .reveal, .js .reveal .group, .js .reveal .suites li { opacity: 1; transform: none; filter: none; }
}
