/* Layout: one centred column. Black, grey and white only, inspired by a black and white GT3 RS.
   Every link is a number plate: white plates and graphite plates alternate, with bolts at each end.
   Telegram sits in its own garage strip. */
:root {
  --bg: #0b0b0c;
  --surface: #151516;
  --line: #2a2a2d;
  --fg: #f2f2f3;
  --muted: #8b8b90;
  --grey: #5c5c61;
  --white-plate: #f4f4f5;
  --graphite-plate: #2a2a2d;
  --ink: #0b0b0c;
  --font-display: "Saira Condensed", "Arial Narrow", Impact, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  padding-block: 22px 32px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  position: relative;
  overflow-x: hidden;
}
/* background, layer 1: woven carbon fibre (each square is a thread lit from one side, alternating direction) with a dark vignette so the edges fall away to black */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 25%, transparent 35%, rgba(0,0,0,.8) 100%),
    url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%3E%3Cdefs%3E%3ClinearGradient%20id='h'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3E%3Cstop%20offset='0'%20stop-color='%23fff'%20stop-opacity='.16'/%3E%3Cstop%20offset='.55'%20stop-color='%23fff'%20stop-opacity='.035'/%3E%3Cstop%20offset='1'%20stop-color='%23000'%20stop-opacity='.4'/%3E%3C/linearGradient%3E%3ClinearGradient%20id='v'%20x1='0'%20y1='0'%20x2='1'%20y2='0'%3E%3Cstop%20offset='0'%20stop-color='%23fff'%20stop-opacity='.16'/%3E%3Cstop%20offset='.55'%20stop-color='%23fff'%20stop-opacity='.035'/%3E%3Cstop%20offset='1'%20stop-color='%23000'%20stop-opacity='.4'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect%20x='0'%20y='0'%20width='8'%20height='8'%20fill='url(%23h)'/%3E%3Crect%20x='8'%20y='0'%20width='8'%20height='8'%20fill='url(%23v)'/%3E%3Crect%20x='0'%20y='8'%20width='8'%20height='8'%20fill='url(%23v)'/%3E%3Crect%20x='8'%20y='8'%20width='8'%20height='8'%20fill='url(%23h)'/%3E%3Cpath%20d='M0%20.5H16M0%208.5H16M.5%200V16M8.5%200V16'%20stroke='%23000'%20stroke-opacity='.55'%20fill='none'/%3E%3C/svg%3E") 0 0 / 16px 16px;
}
/* background, layer 2: soft light glows (top and bottom corner) */
body::after {
  content: "";
  position: fixed;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(50% 32% at 50% 8%, rgba(255,255,255,.13), transparent 70%),
    radial-gradient(45% 28% at 88% 96%, rgba(255,255,255,.08), transparent 70%);
  filter: blur(7px);
  will-change: transform;
}
.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* profile */
.profile { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.avatar {
  position: relative;
  width: 104px;
  height: 104px;
  margin-bottom: 2px;
  display: grid;
  place-items: center;
}
.avatar svg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* profile picture: covers the VX letters, which show only if the image is missing */
.avatar .initial { position: relative; overflow: hidden; }
.avatar .initial img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar .initial {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 34px;
  letter-spacing: .02em;
  color: var(--fg);
}
h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 11vw, 50px);
  line-height: 1;
  letter-spacing: .08em;
  padding-left: .08em;
  text-transform: uppercase;
  text-wrap: balance;
}
.handle {
  padding: 4px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(21,21,22,.7);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: .1em;
  color: var(--muted);
}

/* number plates */
.plates {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.plates li { min-width: 0; }
.plates li.wide { grid-column: 1 / -1; }

.plate {
  --plate-bg: var(--white-plate);
  --plate-fg: var(--ink);
  --plate-edge: rgba(11,11,12,.85);
  --plate-bolt: rgba(11,11,12,.5);
  --shine: rgba(11,11,12,.16);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  padding: 8px 26px;
  background-color: var(--plate-bg);
  /* light that sweeps across the plate on hover or touch */
  background-image: linear-gradient(110deg, transparent 38%, var(--shine) 50%, transparent 62%);
  background-size: 280% 100%;
  background-position: 100% 0;
  background-repeat: no-repeat;
  color: var(--plate-fg);
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 0 0 2px var(--plate-bg), inset 0 0 0 4px var(--plate-edge), 0 6px 14px rgba(0,0,0,.5);
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease;
}
.plates li:nth-child(even) .plate {
  --plate-bg: var(--graphite-plate);
  --plate-fg: var(--fg);
  --plate-edge: rgba(242,242,243,.8);
  --plate-bolt: rgba(242,242,243,.45);
  --shine: rgba(255,255,255,.28);
}
/* bolts */
.plate::before, .plate::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--plate-bolt);
}
.plate::before { left: 11px; }
.plate::after { right: 11px; }
@keyframes plate-shine {
  from { background-position: 100% 0; }
  to { background-position: 0% 0; }
}
/* computer: lift, tilt a touch, glow and let the light sweep across */
@media (hover: hover) and (pointer: fine) {
  .plate:hover {
    transform: translateY(-4px) rotate(-.6deg);
    box-shadow: inset 0 0 0 2px var(--plate-bg), inset 0 0 0 4px var(--plate-edge), 0 12px 26px rgba(255,255,255,.2);
    animation: plate-shine .8s ease-out;
  }
}
/* phone: press down on touch, spring back on release, light sweeps across */
.plate:active {
  transform: scale(.94);
  transition-duration: .08s, .08s;
  box-shadow: inset 0 0 0 2px var(--plate-bg), inset 0 0 0 4px var(--plate-edge), 0 0 22px rgba(255,255,255,.35);
  animation: plate-shine .45s ease-out;
}
.plate:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.plate .name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.plate .sub {
  max-width: 100%;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: .02em;
  opacity: .7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* telegram garage */
.garage {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px dashed var(--grey);
  border-radius: 12px;
  background: rgba(21,21,22,.6);
}
.garage-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}
.garage-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.garage-links li { min-width: 0; }
.chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 52px;
  padding: 6px 6px;
  border: 1px solid var(--grey);
  border-radius: 8px;
  background: var(--surface);
  color: var(--fg);
  text-decoration: none;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), background-color .15s ease, color .15s ease, border-color .15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .chip:hover { transform: translateY(-3px); background: var(--white-plate); border-color: var(--white-plate); color: var(--ink); }
}
.chip:active { transform: scale(.92); transition-duration: .08s; background: var(--white-plate); border-color: var(--white-plate); color: var(--ink); }
.chip:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.chip .tg { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; opacity: .7; }
.chip .name {
  max-width: 100%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.05;
  letter-spacing: .04em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

/* music player: styled like a car stereo head unit */
.player {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #19191c, #0f0f11);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 8px 20px rgba(0,0,0,.45);
}
.player-top { display: flex; align-items: center; gap: 12px; }
.play-btn {
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--white-plate);
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--grey);
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s ease;
}
.play-btn svg { width: 20px; height: 20px; fill: currentColor; }
.play-btn .icon-pause { display: none; }
.player.playing .play-btn .icon-play { display: none; }
.player.playing .play-btn .icon-pause { display: block; }
@media (hover: hover) and (pointer: fine) {
  .play-btn:hover { transform: scale(1.08); box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--fg), 0 0 18px rgba(255,255,255,.25); }
}
.play-btn:active { transform: scale(.92); transition-duration: .08s; }
.play-btn:focus-visible, .mute-btn:focus-visible, .slider:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

.track { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.track-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.track-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
  overflow: hidden;
  white-space: nowrap;
}
/* the title always scrolls, on phone and computer, in a seamless loop */
.track-title {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.track-title-inner {
  display: inline-flex;
  will-change: transform;
  animation: title-marquee var(--dur, 14s) linear infinite;
}
.track-title-inner > span { flex: none; padding-right: 2.5em; }
@keyframes title-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.track-artist { font-family: var(--font-mono); font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.eq { flex: none; display: flex; align-items: flex-end; gap: 3px; height: 24px; }
.eq span { width: 3px; height: 22%; border-radius: 1px; background: var(--fg); opacity: .35; }
.player.playing .eq span { opacity: 1; animation: eq .9s ease-in-out infinite; }
.player.playing .eq span:nth-child(2) { animation-delay: -.3s; animation-duration: .7s; }
.player.playing .eq span:nth-child(3) { animation-delay: -.6s; animation-duration: 1.1s; }
.player.playing .eq span:nth-child(4) { animation-delay: -.15s; animation-duration: .8s; }
.player.playing .eq span:nth-child(5) { animation-delay: -.45s; animation-duration: 1s; }
@keyframes eq { 0%, 100% { height: 22%; } 50% { height: 100%; } }

.seek-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.time { font-family: var(--font-mono); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vol-row { display: flex; align-items: center; gap: 10px; }
.vol-row[hidden] { display: none; }
.mute-btn {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mute-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mute-btn .icon-off { display: none; }
.player.muted .mute-btn .icon-on { display: none; }
.player.muted .mute-btn .icon-off { display: block; }
.vol-value { flex: none; width: 4ch; text-align: right; font-family: var(--font-mono); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

.slider {
  --fill: 0%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-width: 0;
  height: 22px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.slider::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--fg) var(--fill), var(--line) var(--fill)); }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: var(--fg); border: 2px solid var(--bg); box-shadow: 0 0 0 1px var(--grey); }
.slider::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line); }
.slider::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--fg); }
.slider::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: var(--fg); border: 2px solid var(--bg); box-shadow: 0 0 0 1px var(--grey); }

footer { text-align: center; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: none; color: var(--muted); }

/* ---------- small signature touches (all still, no motion) ---------- */

/* livery stripe under the profile: one thick white line, one thin grey line, fading at the ends */
.profile::after {
  content: "";
  align-self: center;
  width: 72%;
  height: 9px;
  margin-top: 6px;
  background:
    linear-gradient(var(--fg), var(--fg)) 0 0 / 100% 4px no-repeat,
    linear-gradient(var(--grey), var(--grey)) 0 7px / 100% 2px no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 18%, #000 82%, transparent);
}

/* telegram label with a line on each side */
.garage-label { display: flex; align-items: center; gap: 12px; }
.garage-label::before, .garage-label::after { content: ""; flex: 1; height: 1px; background: var(--grey); opacity: .6; }

/* corner marks on the telegram strip and the music player, like a dashboard display */
.garage, .player {
  --mark: linear-gradient(rgba(242,242,243,.6), rgba(242,242,243,.6));
  background-repeat: no-repeat;
  background-size: 12px 1.5px, 1.5px 12px, 12px 1.5px, 1.5px 12px, 12px 1.5px, 1.5px 12px, 12px 1.5px, 1.5px 12px, auto;
  background-position:
    left 8px top 8px, left 8px top 8px,
    right 8px top 8px, right 8px top 8px,
    left 8px bottom 8px, left 8px bottom 8px,
    right 8px bottom 8px, right 8px bottom 8px,
    0 0;
}
.garage {
  background-image: var(--mark), var(--mark), var(--mark), var(--mark), var(--mark), var(--mark), var(--mark), var(--mark), none;
}
.player {
  background-image: var(--mark), var(--mark), var(--mark), var(--mark), var(--mark), var(--mark), var(--mark), var(--mark), linear-gradient(180deg, #19191c, #0f0f11);
}
.garage, .player { padding: 16px; }

/* footer name with short lines either side */
footer { display: flex; align-items: center; justify-content: center; gap: 12px; }
footer::before, footer::after { content: ""; width: 28px; height: 1px; background: var(--grey); opacity: .7; }

/* ---------- a little life (gentle, nothing busy) ---------- */

/* 1. a soft glow slowly breathes behind the profile picture */
.avatar::before {
  content: "";
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 66%);
  pointer-events: none;
  animation: avatar-breathe 5s ease-in-out infinite alternate;
}
@keyframes avatar-breathe {
  from { opacity: .25; transform: scale(.94); }
  to { opacity: 1; transform: scale(1.05); }
}

/* 2. the plates catch the light now and then, one after another */
@keyframes plate-idle {
  0% { background-position: 100% 0; }
  14% { background-position: 0% 0; }
  100% { background-position: 0% 0; }
}
.plate:not(:hover):not(:active) { animation: plate-idle 9s ease-in-out infinite; }
.plates li:nth-child(1) .plate { animation-delay: 2s; }
.plates li:nth-child(2) .plate { animation-delay: 4.5s; }
.plates li:nth-child(3) .plate { animation-delay: 7s; }

/* 3. moving background: thin light streaks flow across the page, like road lights passing at night */
html::before {
  content: "";
  position: fixed;
  left: 50%;
  top: 50%;
  width: 200vmax;
  height: 200vmax;
  margin: -100vmax 0 0 -100vmax;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(105deg,
    transparent 0, transparent 60px,
    rgba(255,255,255,.10) 60px, rgba(255,255,255,.10) 66px,
    transparent 66px, transparent 150px,
    rgba(255,255,255,.2) 150px, rgba(255,255,255,.2) 152px,
    transparent 152px, transparent 240px,
    rgba(255,255,255,.08) 240px, rgba(255,255,255,.08) 243px,
    transparent 243px, transparent 310px,
    rgba(255,255,255,.14) 310px, rgba(255,255,255,.14) 311px,
    transparent 311px, transparent 360px);
  will-change: transform;
  animation: streaks 16s linear infinite;
}
/* moves exactly one pattern length (360px) along the stripe direction, so the loop never jumps */
@keyframes streaks {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(347.8px, 93.2px, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .avatar::before { animation: none; opacity: .6; }
  html::before { animation: none; }
  .plate:not(:hover):not(:active) { animation: none; }
  .plate, .chip { transition: none; animation: none !important; }
  .plate:hover, .chip:hover, .plate:active, .chip:active { transform: none; animation: none !important; }
  .play-btn { transition: none; }
  body::after { animation: none; }
  .track-title-inner { animation: none; display: inline; }
  .track-title-inner > span { display: inline; padding-right: 0; }
  .track-title-inner > span:nth-child(2) { display: none; }
  .track-title { text-overflow: ellipsis; -webkit-mask-image: none; mask-image: none; }
  .player.playing .eq span { animation: none !important; height: 60%; }
}