/* omid.gg: shared by every page with the site nav (/, /simfiles/, /dimocracy/, the 404). Page-specific CSS stays inline.
   Accents: the subpages set --acc/--acc2 (registered in /subpage.css); the homepage leaves them unset,
   so the var() fallbacks give it --blue-light/--purple, which its own accent glide animates.
   Column: --container is the subpage width; the homepage sets its own narrower one. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }
:root {
  --blue: #0044a1;         /* dimo's blue (Velocity Blue slot); 2.2:1 on black, so fills only, never text */
  --blue-light: #8db4ee;   /* for small text on black */
  --purple: #9146FF;       /* Twitch */
  --bg: #0a0a0c;
  --text: #f2f2f0;
  --text-dim: #9a9a96;
  --text-faint: #8a8a86;   /* tiny meta: "last updated", row counts */
  --card-surface: #101013; /* every card and tile */
  --border: #1e1e20;
  --border-strong: #2a2a2e; /* pill buttons, artist cards, the dropdown edge */
  --border-hover: #34343a;  /* a card edge under the pointer */
  --live-green: #3ddc84;   /* the live dot, done ticks */
  --radius-card: 14px;
  --radius-pill: 999px;
  --container: 1040px;
  --gutter: 32px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Bricolage Grotesque', -apple-system, sans-serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--acc2, var(--purple)); color: #fff; }
:focus-visible { outline: 2px solid var(--acc, var(--blue-light)); outline-offset: 3px; }
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 20;
  padding: 8px 14px; border-radius: var(--radius-pill); background: var(--text); color: var(--bg);
  font-family: 'Inter Tight', sans-serif; font-size: 14px; font-weight: 600; text-decoration: none;
}
.skip:focus-visible { top: 16px; }

/* ---------- nav ---------- */
nav {
  position: absolute; top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 32px;
  font-size: 15px;
}
.brand {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 700; font-size: 20px; letter-spacing: -0.02em;
  color: var(--text); text-decoration: none;
}
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a {
  color: rgba(242,242,240,.72); text-decoration: none;
  transition: color .2s;
}
/* aria-current: the subpages mark their own nav link (the homepage marks the brand, outside .nav-links) */
.nav-links a:hover, .nav-links a[aria-current] { color: #fff; }
.nav-links a[aria-current] { box-shadow: 0 1px 0 var(--acc); }
.nav-links .biz .x { color: var(--acc, var(--blue-light)); }

/* projects dropdown: anchored to its button on desktop, to the nav edges on phones */
.drop { position: relative; }
.drop-btn {
  font: inherit; color: rgba(242,242,240,.72); background: none; border: 0; padding: 0; margin: 0;
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer; transition: color .2s;
}
.drop-btn:hover, .drop-btn[aria-expanded="true"] { color: #fff; }
.drop-btn .chev { width: 9px; height: 9px; transition: transform .35s var(--ease-out); }
.drop-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.drop-panel {
  position: absolute; top: calc(100% + 14px); right: -14px;
  width: min(290px, calc(100vw - 32px));
  margin: 0; padding: 6px; list-style: none;
  background: rgba(16,16,19,.88); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong); border-radius: var(--radius-card);
  box-shadow: 0 20px 44px -14px rgba(0,0,0,.75);
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98); transform-origin: top right;
  transition: opacity .18s, transform .35s var(--ease-out), visibility 0s .18s;
}
.drop.open .drop-panel { opacity: 1; visibility: visible; transform: none; transition: opacity .18s, transform .35s var(--ease-out), visibility 0s; }
.drop-panel a { display: block; padding: 10px 12px; border-radius: 9px; color: var(--text); text-decoration: none; transition: background .2s; }
.drop-panel a:hover { color: var(--text); background: rgba(255,255,255,.06); }
.drop-panel .t { display: block; font-family: 'Inter Tight', sans-serif; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.drop-panel .t i { font-style: normal; color: var(--acc, var(--blue-light)); }
.drop-panel .d { display: block; margin-top: 3px; font-size: 13px; line-height: 1.4; color: var(--text-dim); }
@media (max-width: 640px) {
  .drop { position: static; }
  .drop-panel { right: 16px; top: calc(100% - 4px); }
  nav { padding: 16px; }
  nav .nav-links { gap: 14px; font-size: 14px; }
  .nav-links .tld { display: none; }  /* four links + brand only fit a phone as "takimo" */
}
@media (max-width: 400px) {
  nav .nav-links { gap: 11px; font-size: 13px; }
}

/* ---------- header: scanline grain + the drifting notes' scroll (each page sizes and places its own .arrows) ---------- */
.hero-grain {
  position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: .35;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.025) 0 1px, transparent 1px 3px);
}
@keyframes scroll {
  0%   { transform: translateZ(var(--z)) translateY(0); opacity: 0; }
  10%  { opacity: var(--op); }
  80%  { opacity: var(--op); }
  100% { transform: translateZ(var(--z)) translateY(var(--travel)); opacity: 0; }
}
.arrow { position: absolute; bottom: -60px; opacity: 0; pointer-events: none; will-change: transform, opacity; animation: scroll linear infinite; }

/* ---------- body: one column of numbered sections ---------- */
main { max-width: var(--container); margin: 0 auto; padding: 8px var(--gutter) 72px; counter-reset: sec; }
section { padding: 36px 0; border-top: 1px solid var(--border); counter-increment: sec; }
section:first-of-type { border-top: 0; }
.label {
  font-family: 'Inter Tight', sans-serif; font-size: 13px; font-weight: 600;
  color: var(--text-dim); letter-spacing: .08em; text-transform: uppercase;
  margin: 0 0 14px;
}
/* section number: the subpages use their first accent, the homepage its purple */
.label::before { content: counter(sec, decimal-leading-zero); display: inline-block; margin-right: 10px; padding-right: 10px;
  border-right: 1px solid #2c2c31; color: var(--acc, var(--purple)); font-variant-numeric: tabular-nums; }
.bio { font-size: 18px; line-height: 1.65; }
.bio p:last-child { margin-bottom: 0; }
/* text links: a thin second-accent underline that fills on hover */
.bio a, a.u { color: var(--text); text-decoration: none;
  background: linear-gradient(var(--acc2, var(--purple)), var(--acc2, var(--purple))) 0 100% / 100% 1px no-repeat;
  transition: background-size .25s var(--ease-out), color .2s; }
.bio a:hover, a.u:hover { color: #fff; background-size: 100% 100%; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Inter Tight', sans-serif; font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim);
}

/* ---------- cards: dark until touched. Cursor spotlight + light-catching border (the pages' JS sets --mx/--my);
   the homepage turns the spotlight down with --spot ---------- */
.card { display: block; position: relative; background: var(--card-surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 18px 20px; margin-bottom: 12px; color: var(--text); text-decoration: none;
  --mx: 50%; --my: 50%; isolation: isolate; }
.card::before, .card::after { content: ""; position: absolute; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s var(--ease-out); }
.card::before { inset: 0; z-index: -1; background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--acc2, var(--purple)) var(--spot, 13%), transparent), transparent 45%); }
.card::after { inset: -1px; padding: 1px;
  background: radial-gradient(240px circle at var(--mx) var(--my), color-mix(in srgb, var(--acc, var(--blue-light)) 70%, transparent), color-mix(in srgb, var(--acc2, var(--purple)) 35%, transparent) 35%, transparent 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.card:hover::before, .card:hover::after, .card:focus-visible::before, .card:focus-visible::after { opacity: 1; }

/* the pulsing "live / now" dot */
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live-green); animation: pulse 2s infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live-green) 60%, transparent); }
  70%  { box-shadow: 0 0 0 7px color-mix(in srgb, var(--live-green) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live-green) 0%, transparent); }
}

/* ---------- footer: as wide as the page column ---------- */
footer { max-width: var(--container); margin: 0 auto; padding: 24px var(--gutter) 56px; display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--border); font-size: 13px; color: var(--text-dim); }
.socials { display: flex; gap: 18px; }
/* 18px icons, 32px hit area */
footer a { color: var(--text-dim); display: inline-flex; padding: 7px; margin: -7px; border-radius: 8px; transition: color .2s, transform .2s; }
footer a svg { width: 18px; height: 18px; fill: currentColor; }
footer a:hover { color: var(--acc, var(--purple)); transform: translateY(-2px); }

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .bio { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .arrow { display: none; }
}
