/* Fedor Kitashov — personal site
   Identity shared with the Samokat game: the palette is tokens.css (Moscow dusk), the
   panorama is pixel art baked by skyline.js, the hero is the game's own sprite. Dark only. */

:root {
  --paper: var(--backdrop);
  --ink: var(--panel-text);
  --muted: rgba(239, 236, 248, 0.62);
  --rule: rgba(245, 208, 42, 0.22);
  --rule-strong: var(--ticker-rule);
  --chip: var(--hud-bg);

  --display: "Unbounded", "Golos Text", system-ui, sans-serif;
  --text: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;

  --pad: clamp(1.25rem, 5vw, 4rem);
  --measure: 36rem;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--rule-strong);
}

a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- skyline band ---------- */

.skyline {
  position: relative;
  height: clamp(176px, 22vw, 264px);
  overflow: hidden;
  background: var(--sky-1);
  border-bottom: 1px solid var(--rule-strong);
}

.skyline canvas {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* HUD-style header over the band, like the score chips over the game's panorama. */
.skyline .top {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  top: 1rem;
  margin: 0;
  z-index: 2;
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-md);
  background: var(--chip);
  color: var(--hud-text);
  text-decoration: none;
}

/* ---------- page ---------- */

.page {
  max-width: 58rem;
  margin: 0 auto;
  padding: var(--pad);
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 9vh, 5rem);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.top a {
  text-decoration: none;
}

.top.end {
  justify-content: flex-end;
}

.top .here {
  color: var(--accent);
}

.top nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top nav a,
.top nav .here {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-md);
  background: var(--chip);
}

.top nav a:hover {
  background: var(--btn-pressed);
  color: var(--accent);
}

.top .home {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  font-size: 1rem;
}

/* ---------- masthead ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
}

.masthead .line {
  display: block;
}

.masthead {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 8vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0;
  color: var(--hud-text);
}

.alias {
  display: inline-block;
  margin: 0.1em 0 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 8vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--accent);
  text-decoration: none;
}

.alias:hover,
.alias:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.1em;
}

.figure {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  justify-self: end;
}

/* The stage: the hero walks along it, right to the end, then left, like a lane of the game. */
.stage {
  position: relative;
  height: 176px;
  margin: clamp(1.5rem, 4vh, 2.5rem) 0 0;
  border-bottom: 1px solid var(--rule-strong);
  overflow: hidden;
}

.stage .figure {
  position: absolute;
  left: 0;
  bottom: 0;
  will-change: transform;
}

@media (max-width: 40rem) {
  .stage { height: 132px; }
}

/* ---------- prose ---------- */

.bio {
  max-width: var(--measure);
  margin: clamp(1.75rem, 5vh, 3rem) 0 0;
  font-size: 1.1875rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.bio + .bio {
  margin-top: 1.1em;
}

.note {
  max-width: var(--measure);
  color: var(--muted);
  font-size: 1.0625rem;
}

/* ---------- link row ---------- */

.elsewhere {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin: clamp(2rem, 6vh, 3rem) 0 0;
  padding: 0;
  list-style: none;
  font-size: 1.0625rem;
}

/* ---------- player ---------- */

.player {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: clamp(2rem, 6vh, 3rem) 0 0;
  padding: 0.75rem 0;
  background: var(--paper);
}

.player iframe {
  display: block;
  width: 100%;
  height: 80px;
  border: 0;
  border-radius: var(--radius-lg);
}

/* ---------- releases: one player each, newest first ---------- */

.releases {
  margin: clamp(2rem, 6vh, 3rem) 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 4vh, 2.25rem);
}

.release-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  margin-bottom: 0.6rem;
}

.release-head .title {
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.release-head .date {
  color: var(--muted);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.release iframe {
  display: block;
  width: 100%;
  height: 80px;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--panel-bg);
}

.track {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  width: 100%;
  padding: 1rem 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.track .title {
  font-size: clamp(1.25rem, 3.4vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.track .date {
  color: var(--muted);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.track:hover .title,
.track[aria-current="true"] .title {
  color: var(--accent);
}

.track[aria-current="true"] .title::after {
  content: "";
  display: inline-block;
  width: 0.42em;
  height: 0.42em;
  margin-left: 0.5em;
  background: var(--new-record);
  vertical-align: 0.08em;
}

.empty {
  max-width: var(--measure);
  margin: 2rem 0 0;
  color: var(--muted);
}

/* ---------- game promo ---------- */

.promo {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1.25rem;
  max-width: 40rem;
  margin: clamp(2rem, 6vh, 3rem) 0 0;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--panel-bg);
  border: 1px solid var(--rule);
}

.promo .figure {
  justify-self: start;
}

.promo p {
  margin: 0;
}

.promo .btn {
  display: inline-flex;
  align-items: center;
  height: 44px;
  margin-top: 0.75rem;
  padding: 0 var(--space-4);
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--backdrop);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.promo .btn:hover {
  color: var(--backdrop);
  background: var(--scooter-deck);
}

/* ---------- papers ---------- */

.papers {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.papers li {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule);
}

.papers .title {
  display: block;
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.papers .meta {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.papers .me {
  color: var(--ink);
}

/* ---------- footer ---------- */

.foot {
  margin-top: clamp(3rem, 10vh, 5rem);
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9375rem;
}

@media (max-width: 40rem) {
  .hero {
    grid-template-columns: 1fr;
  }

  .figure {
    justify-self: start;
  }

  .track {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .promo {
    grid-template-columns: 1fr;
  }
}
