/* Steven Hori — Official Links */

:root {
  --bg: #0B1120;
  --surface: #151C2C;
  --text: #F9FAFB;
  --text-2: #CBD5E1;
  --muted: #9CA3AF;
  --faint: #6B7280;
  --blue: #3B82F6;
  --pink: #EC4899;
  --line: rgba(255, 255, 255, .06);
  --gutter: clamp(14px, 5.5vw, 24px);
  --font: Geist, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: Outfit, var(--font);
}

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

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--text); text-decoration: none; }
button { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
svg { flex-shrink: 0; }
[hidden] { display: none !important; }
.no-js .js-only { display: none; }

.page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  background:
    radial-gradient(120% 50% at 0% 0%, rgba(59, 130, 246, .16), transparent 60%),
    radial-gradient(80% 40% at 100% 35%, rgba(139, 92, 246, .14), transparent 70%),
    radial-gradient(70% 30% at 100% 75%, rgba(139, 92, 246, .08), transparent 70%),
    var(--bg);
}

.container {
  width: 100%;
  max-width: 480px;
  padding: max(clamp(16px, 5vw, 24px), env(safe-area-inset-top)) var(--gutter) max(48px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

/* ---------- Language pills ---------- */

.lang-pill {
  all: unset;
  cursor: pointer;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .1);
  transition: all .2s ease;
}
.lang-pill:hover { border-color: rgba(255, 255, 255, .28); color: var(--text); }
.lang-pill:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.lang-pill[aria-pressed="true"] { border-color: var(--blue); color: var(--text); background: rgba(59, 130, 246, .12); }

.lang-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: clamp(2px, 1vw, 6px);
  min-height: clamp(28px, 8vw, 34px);
}
.lang-grid .lang-pill { height: clamp(28px, 8vw, 34px); font-size: clamp(10px, 2.8vw, 12px); }
.no-js .lang-grid { display: none; }

/* ---------- Compact top bar ---------- */

.topbar {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 20;
  width: 100%;
  max-width: 480px;
  padding-top: env(safe-area-inset-top);
  background: rgba(11, 17, 32, .88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  opacity: 0;
  transform: translate(-50%, -100%);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.topbar.is-visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

.lang-row {
  display: flex;
  gap: 6px;
  padding: 10px var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}
.lang-row::-webkit-scrollbar { display: none; }
.lang-row .lang-pill { flex-shrink: 0; height: 28px; padding: 0 11px; font-size: 11px; }

.topbar-id { display: flex; align-items: center; gap: 12px; padding: 10px var(--gutter); }
.mini-avatar { width: 40px; height: 40px; border-radius: 50%; padding: 2px; flex-shrink: 0; background: linear-gradient(135deg, #3B82F6, #8B5CF6); }
.mini-avatar-inner { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: #fff; }
.mini-track { display: flex; width: 300%; height: 100%; transition: transform .6s ease; }
.mini-track img { width: 33.3333%; height: 100%; object-fit: cover; display: block; }
.topbar-name { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.topbar-name .name { font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 1.2; }
.short-role { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Badge ---------- */

.badge {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(59, 130, 246, .08);
  border: 1px solid rgba(59, 130, 246, .22);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-2);
}
.badge-dot { width: 9px; height: 9px; border-radius: 2px; background: var(--blue); box-shadow: 0 0 8px rgba(59, 130, 246, .8); }
.badge-sm { gap: 6px; height: 24px; padding: 0 10px; font-size: 10px; background: rgba(59, 130, 246, .1); border-color: rgba(59, 130, 246, .25); }
.badge-sm .badge-dot { width: 8px; height: 8px; box-shadow: none; }

/* ---------- Hero ---------- */

.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: clamp(20px, 7vw, 36px); }
.no-js .hero { padding-top: 0; }

.avatar-ring {
  width: clamp(160px, 56vw, 240px);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(140deg, #3B82F6 0%, #6366F1 50%, #A855F7 100%);
  box-shadow: 0 0 40px rgba(99, 102, 241, .45), 0 0 90px rgba(59, 130, 246, .18);
}
.avatar-gap { width: 100%; height: 100%; border-radius: 50%; padding: 4px; background: var(--bg); }
.avatar {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 1s ease;
}
.avatar img.is-active { opacity: 1; }

.dots { display: flex; gap: 6px; margin-top: 14px; }
.dot { all: unset; cursor: pointer; width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .2); transition: all .25s ease; }
.dot.is-active { width: 18px; background: var(--blue); }
.dot:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.no-js .dots { display: none; }

h1 { margin: clamp(16px, 5vw, 24px) 0 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 6.6vw, 28px); line-height: 1.2; }
.role { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(20px, 6vw, 26px); line-height: 1.2; text-wrap: balance; }
.subtitle { margin: 6px 0 0; font-size: clamp(15px, 4.6vw, 19px); line-height: 1.35; color: var(--muted); text-wrap: balance; }
.hero .badge { margin-top: 20px; }

/* ---------- Link blocks ---------- */
/* Each .block sets --c (accent as "r,g,b") and --hover-bg */

.block { margin-top: clamp(24px, 8vw, 32px); display: flex; flex-direction: column; gap: 12px; }
.hero + .block { margin-top: clamp(28px, 9vw, 40px); }

.block-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.block-head .bar { width: 3px; height: 16px; margin-top: 1px; border-radius: 2px; background: rgb(var(--c)); }
.head-icon { width: 16px; height: 16px; margin-top: 1px; fill: none; stroke: rgb(var(--c)); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.block-head h2 { margin: 0; font-size: 14px; font-weight: 600; line-height: 18px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
.head-text { display: flex; flex-direction: column; gap: 2px; }
.head-text span { font-size: 12px; color: var(--muted); }

.link {
  display: flex;
  align-items: center;
  gap: clamp(10px, 3.5vw, 14px);
  padding: clamp(12px, 3.5vw, 14px) clamp(12px, 4vw, 16px);
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: all .2s ease;
}
.link:hover { border-color: rgba(var(--c), .45); background: var(--hover-bg); transform: translateY(-1px); }

.link-icon { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(var(--c), .14); }
.link-icon svg { width: 18px; height: 18px; fill: none; stroke: rgb(var(--c)); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.link-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.link-label { font-size: 13px; line-height: 1.3; color: var(--muted); }
.link-domain { font-family: var(--font-display); font-size: clamp(15px, 4.4vw, 17px); font-weight: 600; line-height: 1.2; }

.chev { width: 16px; height: 16px; fill: none; stroke: var(--faint); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.link-tinted { border-color: rgba(var(--c), .22); }
.link-tinted:hover { border-color: rgba(var(--c), .55); }
.link-tinted .link-icon svg { stroke-width: 2; }

.link-featured {
  gap: 14px;
  padding: 18px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(var(--c), .14), rgba(var(--c), .05));
  border-color: rgba(var(--c), .5);
  box-shadow: 0 0 32px rgba(var(--c), .14);
}
.link-featured:hover { background: linear-gradient(135deg, rgba(var(--c), .14), rgba(var(--c), .05)); border-color: rgb(var(--c)); box-shadow: 0 0 40px rgba(var(--c), .28); }
.link-featured .link-icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(var(--c), .2); }
.link-featured .link-icon svg { width: 20px; height: 20px; stroke-width: 2; }
.link-featured .link-label { color: rgb(var(--c)); }
.link-featured .link-domain { font-size: 16px; line-height: 1.3; }
.link-featured .chev { width: 18px; height: 18px; stroke: rgb(var(--c)); }

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

.player {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(14px, 4vw, 18px) clamp(12px, 4vw, 16px);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(236, 72, 153, .10), rgba(99, 102, 241, .06) 60%, var(--surface));
  border: 1px solid rgba(236, 72, 153, .28);
  box-shadow: 0 0 32px rgba(236, 72, 153, .10);
}

.now { display: flex; align-items: center; gap: 14px; }
.cover { width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #EC4899, #6366F1); }
.cover svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.now-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.now-title { font-family: var(--font-display); font-size: clamp(15px, 4.4vw, 17px); font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-meta { font-size: 12px; color: #F9A8D4; }

.dl-btn { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); transition: all .2s ease; }
.dl-btn:hover { background: rgba(236, 72, 153, .18); border-color: rgba(236, 72, 153, .5); }
.dl-btn svg, .track-dl svg { width: 18px; height: 18px; fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.seek { display: flex; flex-direction: column; gap: 6px; }
input[type="range"] { width: 100%; margin: 0; accent-color: var(--pink); cursor: pointer; }
.times { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

.controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.transport { display: flex; align-items: center; gap: clamp(6px, 2.5vw, 10px); }

.round { all: unset; cursor: pointer; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .05); transition: background .2s ease, filter .2s ease; }
.round:hover { background: rgba(255, 255, 255, .12); }
.round:focus-visible, .mute:focus-visible, .playlist-toggle:focus-visible, .track-play:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.round svg { width: 18px; height: 18px; }
.round svg.filled { fill: var(--text); stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.round.play { width: 56px; height: 56px; background: linear-gradient(135deg, #EC4899, #8B5CF6); box-shadow: 0 6px 20px rgba(236, 72, 153, .35); }
.round.play:hover { filter: brightness(1.1); }
.round.play svg { width: 22px; height: 22px; fill: #fff; }
.round.play .icon-play { margin-left: 3px; }
.round.play .icon-pause, .round.play.is-playing .icon-play { display: none; }
.round.play.is-playing .icon-pause { display: block; }

.volume { display: flex; align-items: center; gap: 8px; flex: 1 1 110px; max-width: 160px; min-width: 96px; }
.volume input { flex: 1; min-width: 0; }
.mute { all: unset; cursor: pointer; width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.mute:hover { background: rgba(255, 255, 255, .08); }
.mute svg { width: 18px; height: 18px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-muted { stroke: #F9A8D4; display: none; }
.icon-unmuted { stroke: var(--text); }
.mute.is-muted .icon-muted { display: block; }
.mute.is-muted .icon-unmuted { display: none; }

.playlist { display: flex; flex-direction: column; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.playlist-toggle { all: unset; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.playlist-toggle:hover { background: rgba(255, 255, 255, .03); }
.pl-icon { width: 18px; height: 18px; fill: none; stroke: var(--pink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pl-title { flex: 1; font-size: 14px; font-weight: 600; }
.muted-text { color: var(--muted); font-weight: 500; }
.pl-chev { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease; }
.playlist-toggle[aria-expanded="true"] .pl-chev { transform: rotate(180deg); }

.track { display: flex; align-items: center; border-top: 1px solid rgba(255, 255, 255, .05); }
.track.is-current { background: rgba(236, 72, 153, .10); }
.track-play { all: unset; cursor: pointer; flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 11px 8px 11px 16px; }
.track-play:hover { background: rgba(255, 255, 255, .03); }
.track-num { width: 22px; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--faint); }
.track.is-current .track-num { color: var(--pink); }
.track-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.track-title { font-size: 14px; font-weight: 500; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track.is-current .track-title { color: var(--text); }
.track-mood { font-size: 11px; color: var(--muted); }
.track-dl { width: 44px; height: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.track-dl:hover { background: rgba(236, 72, 153, .12); }
.track-dl svg { width: 16px; height: 16px; stroke: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
