/* reactive.org — built from the Nocturne design-system tokens. */

/* Inter (variable, 400–700), self-hosted. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/inter-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* The canvas script reads --color-accent, --color-accent-300/400 and
   --color-text as #hex — keep those four literal. */
:root {
  --color-bg: #161826;
  --color-text: #e9e9ed;
  --color-accent: #9184d9;
  --color-divider: color-mix(in srgb, #e9e9ed 16%, transparent);

  --color-neutral-300: #cfd3e5;
  --color-neutral-400: #b2b6ca;
  --color-neutral-500: #9397ab;

  --color-accent-200: #e7e5fe;
  --color-accent-300: #d2cefd;
  --color-accent-400: #b5abfc;
  --color-accent-800: #423a6a;
  --color-accent-900: #2b2741;

  --font-body: "Inter", system-ui, sans-serif;
  --radius-md: 8px;
  --gutter: clamp(24px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%;
  background: var(--color-bg); color: var(--color-text);
  font-family: var(--font-body); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow: hidden;
}
h1 { font-weight: 500; }
a { color: var(--color-accent-300); text-decoration: none; }
a:hover { color: var(--color-accent-200); }
svg { display: block; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

.scene {
  position: fixed; inset: 0; overflow: hidden;
  background:
    radial-gradient(70% 70% at 70% 36%, var(--color-accent-900) 0%, transparent 60%),
    linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg) 45%, var(--color-accent-900) 100%);
  user-select: none; -webkit-user-select: none; touch-action: none;
}
/* The custom cursor replaces the system one only where there is a mouse. */
@media (hover: hover) and (pointer: fine) {
  .scene, .scene a { cursor: none; }
}

.glow {
  position: absolute; left: 0; top: 0; width: 700px; height: 700px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--color-accent) 12%, transparent) 0%, transparent 62%);
  pointer-events: none;
}
.stage { position: absolute; left: 0; top: 0; width: 1280px; height: 800px; transform-origin: 0 0; }
.stage canvas { position: absolute; inset: 0; width: 1280px; height: 800px; }
.satellite {
  position: absolute; left: 0; top: 0;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--color-text); will-change: transform;
}
.satellite svg { filter: drop-shadow(0 0 10px color-mix(in srgb, var(--color-accent) 55%, transparent)); }

.topbar {
  position: absolute; left: 0; right: 0; top: 0;
  display: flex; align-items: center; gap: 24px; padding: 28px var(--gutter);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.brand svg { flex: none; }
.topbar nav { margin-left: auto; display: flex; gap: 28px; font-size: 13px; }
.topbar nav a { color: var(--color-neutral-300); }
.topbar nav a:hover { color: var(--color-accent-200); }

.hero {
  position: absolute; left: var(--gutter); top: clamp(110px, 19vh, 180px);
  display: flex; flex-direction: column; gap: 24px; pointer-events: none;
}
.hero h1 { margin: 0; font-size: clamp(48px, 6.2vw, 96px); line-height: 0.96; letter-spacing: -0.045em; }
.hero p { margin: 0; font-size: 16px; color: var(--color-neutral-300); max-width: 340px; line-height: 1.5; }

.projects {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(24px, 5vh, 44px);
  display: flex; align-items: flex-end; gap: 16px; pointer-events: none;
}
.projects-list { display: flex; flex-direction: column; gap: 12px; width: min(400px, 100%); pointer-events: auto; }
.projects-head { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 11px; font-weight: 400; color: var(--color-neutral-400); letter-spacing: 0.14em; }
.projects-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--color-divider), transparent); }
.projects ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.proj-link {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px 10px 10px; margin-left: -10px; border-radius: var(--radius-md);
  color: var(--color-text); background: transparent; border: 1px solid transparent;
  transition: background .2s, border-color .2s;
}
.proj-link:hover, .proj-link:focus-visible {
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-bg) 70%, transparent);
  border-color: var(--color-accent-800);
}
.proj-link > svg { flex: none; }
.proj-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.proj-name { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
.proj-desc { font-size: 13px; line-height: 1.4; color: var(--color-neutral-300); text-wrap: pretty; }
.proj-arrow { color: var(--color-accent-400); }
.hint { margin-left: auto; font-size: 12px; color: var(--color-neutral-400); white-space: nowrap; }

.cursor {
  position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--color-accent-400); pointer-events: none; opacity: 0;
  display: flex; align-items: center; justify-content: center;
}
.cursor span { width: 4px; height: 4px; border-radius: 50%; background: var(--color-accent-200); }

/* Narrow viewports: keep the brand on one line and stack the hint under the list. */
@media (max-width: 520px) {
  .topbar { gap: 16px; }
  .brand span { white-space: nowrap; }
  .topbar nav { gap: 18px; }
  .projects { flex-direction: column; align-items: stretch; gap: 12px; }
  .hint { margin-left: 0; }
}

/* Short viewports (phones in landscape): keep the hero clear of the project list. */
@media (max-height: 520px) {
  .topbar { padding-block: 16px; }
  .hero { top: 64px; gap: 12px; }
  .hero h1 { font-size: clamp(32px, 9vh, 48px); }
  .hero p { display: none; } /* no room beside the project list */
  .projects ul { gap: 2px; }
  .proj-link { padding-block: 6px; }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
