:root,
html[data-theme="dark"] {
  --bg: #0a0a0b;
  --fg: #eeeeee;
  --muted: #9a9a9e;
  --line: #383838;
  --accent: #b39eb5;
  --accent-ink: #161218;
  --accent-rgb: 179 158 181;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease: ease;
  --heat-empty: #171518;
  --now-line: rgb(255 255 255 / 0.08);
  --player-h: 92px;

  --glass-blur: 20px;
  --glass-saturate: 160%;
  --glass-tint: 18 18 20;
  --glass-tint-opacity: 0.72;
  --glass-fill: rgb(var(--glass-tint) / 0.55);
  --glass-border: rgb(255 255 255 / 0.1);
  --glass-radius: 22px;
  --glass-highlight: rgb(255 255 255 / 0.28);
  --glass-inner-shadow: rgb(0 0 0 / 0.35);
  --glass-shadow: 0 24px 64px rgb(0 0 0 / 0.55);
  --glass-focus: var(--accent);
}

html[data-theme="light"] {
  --bg: #f3eef3;
  --fg: #1b171d;
  --muted: #6d6670;
  --line: #d4ccd6;
  --accent-ink: #161218;
  --heat-empty: #e7e1e8;
  --now-line: rgb(20 16 22 / 0.08);
  --glass-tint: 255 255 255;
  --glass-fill: rgb(255 255 255 / 0.7);
  --glass-border: rgb(20 16 22 / 0.08);
  --glass-highlight: rgb(255 255 255 / 0.9);
  --glass-inner-shadow: rgb(80 60 90 / 0.06);
  --glass-shadow: 0 18px 40px rgb(40 30 45 / 0.08);
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: calc(var(--player-h) + 28px);
  transition: background 200ms var(--ease), color 200ms var(--ease);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

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

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgb(var(--accent-rgb) / 0.18), transparent 55%),
    radial-gradient(circle at 80% 80%, rgb(var(--accent-rgb) / 0.06), transparent 40%);
}

.top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 880px;
  margin: 0 auto;
  padding: 22px 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.top__right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.prefs {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  width: 184px;
}

.prefs .chip {
  width: 88px;
  min-width: 88px;
  padding: 0;
  justify-content: center;
}

.chip {
  appearance: none;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgb(255 255 255 / 0.04);
  color: var(--fg);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    transform 160ms var(--ease-out),
    background 200ms var(--ease),
    border-color 200ms var(--ease),
    color 200ms var(--ease);
}

.chip--icon {
  width: 34px;
  padding: 0;
}

.chip:active {
  transform: scale(0.97);
}

.chip:disabled {
  opacity: 0.35;
  cursor: default;
}

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

@media (hover: hover) and (pointer: fine) {
  .chip:hover:not(:disabled) {
    border-color: rgb(var(--accent-rgb) / 0.45);
    background: rgb(var(--accent-rgb) / 0.1);
  }
}

.nav a {
  transition: color 160ms var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .nav a:hover {
    color: var(--fg);
  }
}

main {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 22px 32px;
}

.hero {
  display: grid;
}

.glass {
  position: relative;
  isolation: isolate;
  background: rgb(var(--glass-tint) / 0.88);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  box-shadow: var(--glass-shadow);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass {
    background: var(--glass-fill);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  }
}

.glass--l2 {
  background:
    linear-gradient(160deg, rgb(255 255 255 / 0.07), rgb(255 255 255 / 0.02)),
    rgb(var(--glass-tint) / 0.88);
  box-shadow:
    var(--glass-shadow),
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -10px 28px var(--glass-inner-shadow);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass--l2 {
    background:
      linear-gradient(160deg, rgb(255 255 255 / 0.08), rgb(255 255 255 / 0.02)),
      var(--glass-fill);
  }
}

.glass--l2::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(158deg, rgb(255 255 255 / 0.16), transparent 38%);
  opacity: 0.55;
}

.card {
  padding: 36px 36px 28px;
}

.eyebrow {
  margin: 0 0 22px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.identity {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.35);
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(1.85rem, 4vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

h1 em {
  font-style: normal;
  color: var(--accent);
}

.lede a,
.bio a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lede,
.bio {
  margin: 0;
  color: var(--muted);
  max-width: 52ch;
}

.lede {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.45;
}

.bio {
  margin-top: 22px;
  font-size: 15px;
}

.love {
  padding-top: 4px;
  color: var(--fg);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 160ms var(--ease-out),
    background 200ms var(--ease),
    box-shadow 200ms var(--ease),
    color 200ms var(--ease),
    border-color 200ms var(--ease);
}

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

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 28px rgb(var(--accent-rgb) / 0.22), inset 0 1px rgb(255 255 255 / 0.35);
}

.btn--ghost {
  background: rgb(255 255 255 / 0.04);
  color: var(--fg);
  border-color: var(--line);
}

.btn__arrow {
  display: inline-block;
  transition: transform 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgb(var(--accent-rgb) / 0.3), inset 0 1px rgb(255 255 255 / 0.4);
  }

  .btn--primary:hover .btn__arrow {
    transform: translateX(3px);
  }

  .btn--ghost:hover {
    background: rgb(255 255 255 / 0.07);
    border-color: rgb(var(--accent-rgb) / 0.4);
  }
}

.now {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 32px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--now-line);
}

.now dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.now dd {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 600;
}

.graph-wrap {
  margin-top: 16px;
}

.graph-card {
  padding-bottom: 24px;
}

.graph-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.graph-head .lede {
  max-width: 62ch;
}

.heat-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.heat-nav__range {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

.heat {
  position: relative;
  margin-top: 14px;
  overflow: hidden;
  width: 100%;
}

.heat__months {
  display: grid;
  grid-template-columns: 18px 1fr;
  margin-bottom: 6px;
}

.heat__month-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 12px;
  column-gap: 3px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.heat__month-row span {
  grid-column: span var(--span, 1);
}

.heat__body {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 6px;
  align-items: start;
}

.heat__dows {
  display: grid;
  grid-template-rows: repeat(7, 12px);
  gap: 3px;
  font-size: 9px;
  font-weight: 600;
  color: var(--muted);
  line-height: 12px;
}

.heat__grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 12px);
  grid-auto-columns: 12px;
  gap: 3px;
}

.heat__cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: var(--heat-empty);
  outline: 1px solid rgb(255 255 255 / 0.04);
  outline-offset: -1px;
}

.heat__cell[data-level="1"] { background: rgb(var(--accent-rgb) / 0.22); }
.heat__cell[data-level="2"] { background: rgb(var(--accent-rgb) / 0.42); }
.heat__cell[data-level="3"] { background: rgb(var(--accent-rgb) / 0.68); }
.heat__cell[data-level="4"] {
  background: var(--accent);
  box-shadow: 0 0 10px rgb(var(--accent-rgb) / 0.28);
}

@media (hover: hover) and (pointer: fine) {
  .heat__cell[data-level]:not([data-level="0"]):hover {
    outline-color: rgb(var(--accent-rgb) / 0.7);
  }
}

.heat__legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--muted);
}

.heat__legend i {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: var(--heat-empty);
}

.heat-tip {
  position: fixed;
  z-index: 20;
  padding: 6px 8px;
  border-radius: 8px;
  background: #1c1a1e;
  border: 1px solid rgb(255 255 255 / 0.1);
  color: var(--fg);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -8px) scale(0.97);
  transform-origin: center bottom;
  transition:
    opacity 125ms var(--ease-out),
    transform 125ms var(--ease-out);
}

.heat-tip.is-on {
  opacity: 1;
  transform: translate(-50%, -12px) scale(1);
}

.link-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
}

.link-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 100%;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(255 255 255 / 0.03);
  transition:
    transform 200ms var(--ease-out),
    border-color 200ms var(--ease),
    background 200ms var(--ease);
}

.link-card:active {
  transform: scale(0.98);
}

.link-card__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.link-card strong {
  font-size: 15px;
  letter-spacing: -0.02em;
}

.link-card__hint {
  font-size: 13px;
  color: var(--muted);
}

@media (hover: hover) and (pointer: fine) {
  .link-card:hover {
    transform: translateY(-2px);
    border-color: rgb(var(--accent-rgb) / 0.4);
    background: rgb(255 255 255 / 0.05);
  }
}

.foot {
  max-width: 880px;
  margin: 0 auto;
  padding: 8px 22px 36px;
  color: var(--muted);
  font-size: 13px;
}

.foot a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.reveal-item {
  opacity: 0;
  transform: translateY(10px);
  animation: rise 480ms var(--ease-out) forwards;
}

.reveal-item:nth-child(1) { animation-delay: 40ms; }
.identity.reveal-item,
.reveal-item:nth-child(2) { animation-delay: 90ms; }
.bio.reveal-item,
.reveal-item:nth-child(3) { animation-delay: 140ms; }
.actions.reveal-item,
.reveal-item:nth-child(4) { animation-delay: 190ms; }
.now.reveal-item,
.reveal-item:nth-child(5) { animation-delay: 240ms; }

.link-grid .reveal-item:nth-child(1) { animation-delay: 280ms; }
.link-grid .reveal-item:nth-child(2) { animation-delay: 330ms; }
.link-grid .reveal-item:nth-child(3) { animation-delay: 380ms; }
.link-grid .reveal-item:nth-child(4) { animation-delay: 430ms; }

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-item {
    animation: fade 200ms ease forwards;
    transform: none;
  }

  .btn,
  .btn__arrow,
  .link-card,
  .nav a,
  .heat-tip,
  .chip {
    transition: none;
  }
}

@keyframes fade {
  to {
    opacity: 1;
  }
}

html[data-theme="light"] .heat__cell {
  outline-color: rgb(20 16 22 / 0.06);
}

html[data-theme="light"] .heat-tip {
  background: #fff;
  border-color: rgb(20 16 22 / 0.1);
}

.player {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 8;
  display: grid;
  grid-template-columns: 64px minmax(0, 140px) minmax(180px, 1fr);
  align-items: center;
  gap: 14px;
  width: min(880px, calc(100% - 28px));
  padding: 12px 14px;
  transform: translateX(-50%);
}

.player__art {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
}

.player__meta strong {
  display: block;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.player__meta span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.player__transport {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 72px;
  grid-template-rows: 14px 14px;
  align-items: center;
  column-gap: 10px;
  row-gap: 4px;
}

.player__play {
  grid-row: 1 / -1;
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}

#seek {
  grid-column: 2;
  grid-row: 1;
}

.player__vol {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  align-items: center;
  margin: 0;
  min-width: 0;
}

.player__times {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  line-height: 14px;
}

.player input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 14px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.player input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 99px;
  background: rgb(var(--accent-rgb) / 0.22);
}

.player input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 99px;
  background: rgb(var(--accent-rgb) / 0.22);
}

.player input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--accent);
  border: 0;
}

.player input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 0;
}

@media (max-width: 720px) {
  :root {
    --player-h: 156px;
  }

  .top {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
  }

  .top__right {
    width: 100%;
    justify-content: space-between;
  }

  .nav {
    justify-content: flex-start;
  }

  .prefs {
    width: 168px;
  }

  .prefs .chip {
    width: 80px;
    min-width: 80px;
  }

  main {
    padding: 28px 16px 24px;
  }

  .card {
    padding: 24px 18px 20px;
  }

  .identity {
    flex-direction: column;
  }

  .now,
  .link-grid {
    grid-template-columns: 1fr;
  }

  .now {
    gap: 14px;
  }

  .actions .btn {
    flex: 1 1 calc(50% - 10px);
  }

  .heat-nav__range {
    font-size: 11px;
  }

  .player {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    transform: none;
    grid-template-columns: 52px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 10px;
    padding: 10px 10px 12px;
  }

  .player__art {
    width: 52px;
    height: 52px;
  }

  .player__transport {
    grid-column: 1 / -1;
    grid-template-columns: 34px minmax(0, 1fr) 64px;
  }
}

@media (max-width: 400px) {
  .prefs {
    width: 148px;
  }

  .prefs .chip {
    width: 70px;
    min-width: 70px;
    font-size: 11px;
  }

  .player__transport {
    grid-template-columns: 34px minmax(0, 1fr) 52px;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .glass,
  .glass--l2 {
    background: #141416;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  html[data-theme="light"] .glass,
  html[data-theme="light"] .glass--l2 {
    background: #fff;
  }
}
