:root {
  color-scheme: dark;
  --bg: #050506;
  --panel: rgba(16, 16, 18, 0.96);
  --panel-solid: #101012;
  --panel-soft: rgba(255, 255, 255, 0.045);
  --ink: #f5f4ef;
  --muted: #a4a2a8;
  --dim: #66656d;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);
  --blue: #3e6cff;
  --red: #ff4f42;
  --green: #35d399;
  --yellow: #ffd166;
  --max: 1220px;
  --radius: 8px;
  --page-x: clamp(18px, 4vw, 48px);
  --page-y: clamp(28px, 5vw, 52px);
  --gap: 18px;
  --card-pad: clamp(16px, 2vw, 22px);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f4ef;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-solid: #ffffff;
  --panel-soft: rgba(17, 17, 18, 0.045);
  --ink: #111112;
  --muted: #5f5e66;
  --dim: #8b8a92;
  --line: rgba(17, 17, 18, 0.13);
  --line-strong: rgba(17, 17, 18, 0.24);
  --shadow: 0 28px 80px rgba(20, 20, 24, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  transition:
    background 240ms ease,
    color 240ms ease;
}

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

button {
  font: inherit;
}

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

.wave-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 12%, rgba(62, 108, 255, 0.22), transparent 30%),
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: auto, 72px 72px, 72px 72px;
}

body[data-theme="light"]::before {
  background:
    radial-gradient(circle at 18% 12%, rgba(62, 108, 255, 0.14), transparent 32%),
    linear-gradient(rgba(17, 17, 18, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 18, 0.055) 1px, transparent 1px);
  background-size: auto, 72px 72px, 72px 72px;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100vh;
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(22px);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-transform: uppercase;
}

.brand span {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 30px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: 950;
}

.brand strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 780;
}

.side-nav {
  display: grid;
  gap: 7px;
  scrollbar-width: none;
}

.side-nav::-webkit-scrollbar {
  display: none;
}

.side-nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
}

.side-nav a:hover,
.side-nav a.active {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
}

.side-nav a.active::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 18px rgba(62, 108, 255, 0.9);
}

.sidebar-note {
  margin-top: auto;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.sidebar-note span {
  display: block;
  margin-bottom: 8px;
  color: var(--dim);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.sidebar-note strong {
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 78px;
  padding: 16px var(--page-x);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  backdrop-filter: blur(22px);
}

.crumb {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle,
.icon-link {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.theme-toggle {
  background: var(--ink);
  color: var(--bg);
}

.theme-toggle svg,
.icon-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.moon-icon,
body[data-theme="light"] .sun-icon {
  display: none;
}

body[data-theme="light"] .moon-icon {
  display: block;
}

.page-root {
  width: min(var(--max), calc(100% - (var(--page-x) * 2)));
  min-height: calc(100vh - 78px);
  margin: 0 auto;
  padding: var(--page-y) 0 calc(var(--page-y) + 12px);
}

.page-enter {
  animation: pageIn 260ms ease both;
}

@keyframes pageIn {
  from {
    transform: translateY(10px);
  }
  to {
    transform: translateY(0);
  }
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: var(--gap);
  align-items: stretch;
}

.hero-main,
.panel,
.feature-card,
.post-card,
.project-card,
.timeline-row,
.about-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hero-main {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 640px;
  overflow: hidden;
  padding: clamp(26px, 4vw, 48px);
}

.hero-main::after {
  content: "";
  position: absolute;
  right: -8%;
  bottom: -18%;
  width: 54%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(62, 108, 255, 0.2), transparent 66%);
}

.terminal-line,
.mono {
  font-family: "SFMono-Regular", Consolas, monospace;
}

.terminal-line {
  margin: 0 0 18px;
  color: var(--blue);
  font-size: 14px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  position: relative;
  z-index: 1;
  max-width: 7.8ch;
  margin-bottom: 24px;
  font-size: clamp(54px, 7vw, 96px);
  line-height: 0.88;
  font-weight: 950;
  letter-spacing: 0;
}

.hero-main > p:not(.terminal-line) {
  position: relative;
  z-index: 1;
  max-width: 690px;
  color: #d1cfd6;
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.58;
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 34px 0;
}

.home-now-playing {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 146px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(62, 108, 255, 0.12), rgba(255, 255, 255, 0.02)),
    rgba(0, 0, 0, 0.24);
  box-shadow: var(--shadow);
}

.home-now-playing.empty {
  grid-template-columns: 110px minmax(0, 1fr);
}

.home-live-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.9fr);
  gap: 14px;
  margin-bottom: 26px;
}

.cassette-shell {
  position: relative;
  display: grid;
  place-items: center;
  width: 146px;
  aspect-ratio: 1;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.32)),
    rgba(7, 10, 18, 0.74);
  overflow: hidden;
}

.cassette-shell::before,
.cassette-shell::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  top: 18px;
}

.cassette-shell::before {
  left: 18px;
}

.cassette-shell::after {
  right: 18px;
}

.cassette-disc {
  position: relative;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.08) 0 18%, transparent 18% 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.2));
  box-shadow: inset 0 0 0 10px rgba(0, 0, 0, 0.3);
}

.cassette-shell.is-playing .cassette-disc {
  animation: spinDisc 4.6s linear infinite;
}

.cassette-disc img,
.cassette-disc .disc-core {
  width: 82px;
  height: 82px;
  border-radius: 50%;
}

.cassette-disc img {
  object-fit: cover;
}

.disc-core {
  display: grid;
  place-items: center;
  background: rgba(11, 15, 24, 0.88);
  color: var(--ink);
  font-size: 26px;
  font-weight: 900;
}

.cassette-disc > .disc-core:last-child {
  position: absolute;
  width: 18px;
  height: 18px;
  background: rgba(245, 244, 239, 0.9);
  box-shadow: 0 0 0 5px rgba(11, 15, 24, 0.7);
}

.home-now-copy {
  min-width: 0;
}

.home-now-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 860;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.home-now-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 14px currentColor;
}

.home-now-copy strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.home-now-copy p,
.home-now-copy small {
  margin: 0;
  color: color-mix(in srgb, var(--ink) 76%, var(--muted));
  overflow-wrap: anywhere;
}

.home-now-copy p {
  font-size: 15px;
}

.home-now-copy small {
  display: block;
  margin-top: 8px;
  font-size: 13px;
}

.home-discord-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(88, 101, 242, 0.14), rgba(255, 255, 255, 0.03)),
    rgba(0, 0, 0, 0.22);
  box-shadow: var(--shadow);
  margin-bottom: 26px;
}

.home-discord-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.home-discord-avatar {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  object-fit: cover;
  flex: 0 0 auto;
}

.home-discord-kicker {
  display: block;
  margin-bottom: 6px;
  color: #bfc7ff;
  font-size: 12px;
  font-weight: 860;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.home-discord-head strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.home-discord-head small,
.home-discord-card p,
.home-discord-status span:last-child {
  color: color-mix(in srgb, var(--ink) 74%, var(--muted));
  overflow-wrap: anywhere;
}

.home-discord-head small {
  display: block;
  margin-top: 4px;
}

.home-discord-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

@keyframes spinDisc {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 17px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.055);
  font-size: 14px;
  font-weight: 860;
}

.button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.button.danger {
  border-color: var(--red);
  background: rgba(255, 79, 66, 0.12);
  color: #ffd2cd;
}

.hero-strip {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: auto;
}

.metric {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.34);
}

.metric strong {
  display: block;
  margin-bottom: 6px;
  font-size: 28px;
  line-height: 1;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
}

.activity-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: var(--card-pad);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.panel-head h2,
.page-title h1 {
  margin: 0;
}

.panel-head h2 {
  max-width: 220px;
  font-size: 25px;
  line-height: 1.05;
}

.panel-head a,
.text-link {
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
}

.tab {
  min-height: 35px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 780;
}

.tab.active {
  background: var(--ink);
  color: var(--bg);
}

.activity-list,
.timeline,
.post-list,
.project-list {
  display: grid;
  gap: 12px;
}

.activity-item {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
}

.activity-item img,
.timeline-row img {
  object-fit: cover;
  border-radius: 5px;
  background: #171719;
}

.activity-item img {
  width: 62px;
  height: 84px;
}

.activity-item h3 {
  margin-bottom: 5px;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.15;
}

.activity-item p,
.activity-item time,
.timeline-row p,
.post-card p,
.project-card p,
.about-card p,
.page-title p {
  color: var(--muted);
}

.activity-item p {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.activity-item time {
  align-self: start;
  color: var(--red);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: auto;
}

.stats-grid span {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
}

.stats-grid strong {
  display: block;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-top: var(--gap);
}

.feature-card {
  min-height: 218px;
  padding: var(--card-pad);
}

.feature-card strong {
  color: var(--blue);
  font-family: "SFMono-Regular", Consolas, monospace;
}

.feature-card h3 {
  margin: 44px 0 10px;
  font-size: 24px;
}

.page-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--gap);
  align-items: end;
  margin-bottom: var(--gap);
}

.page-title h1 {
  max-width: 820px;
  font-size: clamp(48px, 7vw, 96px);
}

.page-title p {
  max-width: 680px;
  margin: 14px 0 0;
  font-size: 18px;
  line-height: 1.6;
}

.post-list,
.project-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}

.post-card,
.project-card,
.about-card {
  min-width: 0;
  overflow: hidden;
  padding: var(--card-pad);
}

.post-media,
.project-shot {
  display: grid;
  min-height: 220px;
  margin-bottom: 16px;
  padding: 18px;
  place-items: end start;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.code-media {
  background:
    linear-gradient(135deg, rgba(62, 108, 255, 0.78), rgba(5, 5, 6, 0.9)),
    repeating-linear-gradient(0deg, transparent 0 18px, rgba(255, 255, 255, 0.13) 18px 19px);
  color: white;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-weight: 780;
}

.city-media {
  background:
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.88)),
    url("https://images.unsplash.com/photo-1524231757912-21f4fe3a7200?auto=format&fit=crop&w=900&q=80")
      center/cover;
}

.manga-media {
  background:
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.88)),
    url("https://images.unsplash.com/photo-1612036782180-6f0b6cd846fe?auto=format&fit=crop&w=900&q=80")
      center/cover;
}

.post-card time,
.post-card a {
  color: var(--red);
  font-size: 12px;
  font-weight: 820;
}

.post-card .text-link,
.project-card .text-link {
  display: inline-flex;
  margin-top: 14px;
  color: var(--blue);
}

.post-card h2,
.project-card h2 {
  margin: 8px 0 9px;
  font-size: 25px;
  line-height: 1.08;
}

.post-card p,
.project-card p {
  font-size: 15px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.project-shot {
  min-height: 250px;
  place-content: center;
  text-align: center;
}

.project-shot span {
  font-size: 42px;
  font-weight: 950;
}

.project-shot small {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
}

.dark-shot {
  background:
    radial-gradient(circle at 70% 20%, rgba(255, 79, 66, 0.5), transparent 28%),
    #080809;
}

.grid-shot {
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    #0d0d0f;
  background-size: 32px 32px;
}

.note-shot {
  background:
    repeating-linear-gradient(90deg, rgba(62, 108, 255, 0.18) 0 1px, transparent 1px 16px),
    #111114;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.tags span {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d2d0d7;
  font-size: 12px;
  font-weight: 760;
}

.timeline-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
}

.timeline-row img {
  width: 96px;
  height: 128px;
}

.timeline-row h2 {
  margin-bottom: 7px;
  overflow-wrap: anywhere;
  font-size: 27px;
}

.timeline-row p {
  margin-bottom: 14px;
  line-height: 1.55;
}

.timeline-row footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.score {
  min-width: 76px;
  color: var(--yellow);
  font-size: 28px;
  font-weight: 900;
  text-align: right;
}

.about-layout {
  display: grid;
  grid-template-columns: 0.72fr 1fr;
  gap: var(--gap);
}

.portrait-card {
  min-height: 620px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 18%, rgba(62, 108, 255, 0.24), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    var(--panel-solid);
}

.portrait-mark {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 560px;
  place-items: center;
  color: var(--ink);
  font-size: clamp(180px, 23vw, 310px);
  font-weight: 950;
}

.about-stack {
  display: grid;
  gap: var(--gap);
}

.about-card h2 {
  margin-bottom: 14px;
  font-size: clamp(34px, 4.6vw, 66px);
  line-height: 0.95;
}

.about-card p {
  font-size: 17px;
  line-height: 1.7;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}

.contact-grid a {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  font-weight: 820;
}

.detail-page {
  display: grid;
  gap: var(--gap);
}

.detail-hero {
  display: grid;
  grid-template-columns: 0.72fr 1fr;
  gap: var(--gap);
  align-items: stretch;
  padding: var(--card-pad);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.detail-hero .post-media,
.detail-hero .project-shot {
  min-height: 420px;
  margin-bottom: 0;
}

.detail-hero time {
  display: block;
  margin-bottom: 16px;
  color: var(--red);
  font-size: 13px;
  font-weight: 820;
}

.detail-hero h1 {
  max-width: 9ch;
  font-size: clamp(42px, 6vw, 82px);
}

.detail-hero p {
  max-width: 680px;
  color: color-mix(in srgb, var(--ink) 78%, var(--muted));
  font-size: 18px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.detail-body {
  max-width: 820px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel-solid) 92%, transparent);
}

.detail-body p {
  color: color-mix(in srgb, var(--ink) 82%, var(--muted));
  font-size: 19px;
  line-height: 1.85;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}

.activity-dashboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}

.live-card {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: var(--card-pad);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel-solid) 94%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.live-card.wide {
  grid-column: 1 / -1;
}

.live-card-head,
.identity-row,
.track-card,
.played-item,
.integration-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.live-card-head {
  align-items: flex-start;
}

.live-card h2 {
  margin-bottom: 5px;
  font-size: 28px;
}

.live-card p,
.identity-row span,
.track-card span,
.track-card small,
.played-item span {
  color: color-mix(in srgb, var(--ink) 72%, var(--muted));
}

.status-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 9px;
  border-radius: 50%;
  background: var(--dim);
  box-shadow: 0 0 18px currentColor;
}

.status-dot.online,
.status-dot.spotify {
  background: var(--green);
  color: var(--green);
}

.status-dot.idle {
  background: var(--yellow);
  color: var(--yellow);
}

.status-dot.dnd,
.status-dot.game {
  background: var(--red);
  color: var(--red);
}

.avatar,
.avatar-fallback,
.track-card img {
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  border-radius: 8px;
}

.avatar,
.track-card img {
  object-fit: cover;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--ink);
  font-weight: 900;
}

.identity-row strong,
.track-card strong,
.played-item strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  overflow-wrap: anywhere;
}

.track-card,
.played-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-solid) 78%, transparent);
}

.track-card.empty {
  align-items: flex-start;
}

.integration-stack {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-solid) 78%, transparent);
}

.integration-copy strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 16px;
}

.integration-copy span {
  color: color-mix(in srgb, var(--ink) 72%, var(--muted));
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.integration-actions {
  flex-wrap: wrap;
}

.profile-link {
  margin-left: auto;
}

.discord-profile-card {
  position: relative;
  overflow: hidden;
}

.discord-banner {
  margin: -14px -14px 0;
  height: 110px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--discord-accent, var(--blue)) 72%, #0d1019), rgba(0, 0, 0, 0.16)),
    rgba(255, 255, 255, 0.04);
}

.discord-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.discord-banner.fallback {
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.18), transparent 26%),
    linear-gradient(135deg, color-mix(in srgb, var(--discord-accent, var(--blue)) 72%, #0d1019), rgba(0, 0, 0, 0.2));
}

.discord-profile-head {
  display: flex;
  align-items: end;
  gap: 14px;
  margin-top: -34px;
}

.discord-profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  border: 4px solid color-mix(in srgb, var(--panel-solid) 94%, transparent);
  object-fit: cover;
  background: var(--panel-solid);
}

.discord-profile-copy strong {
  display: block;
  color: var(--ink);
  font-size: 19px;
}

.discord-profile-copy span {
  color: color-mix(in srgb, var(--ink) 72%, var(--muted));
  font-size: 13px;
}

.played-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .side-nav {
    display: flex;
    flex-wrap: wrap;
  }

  .side-nav a {
    flex: 1 1 auto;
  }

  .sidebar-note {
    display: none;
  }

  .hero-layout,
  .about-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .page-root {
    width: min(100% - 28px, var(--max));
    padding-top: 28px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-main {
    min-height: 600px;
  }

  .home-live-grid {
    grid-template-columns: 1fr;
  }

  .home-now-playing,
  .home-now-playing.empty {
    grid-template-columns: 1fr;
  }

  .cassette-shell {
    width: 128px;
  }

  h1,
  .page-title h1 {
    max-width: 9ch;
    font-size: clamp(46px, 14vw, 64px);
    line-height: 0.95;
  }

  .hero-main > p:not(.terminal-line),
  .page-title p,
  .project-card p,
  .detail-hero p {
    max-width: 32ch;
    font-size: 16px;
    color: color-mix(in srgb, var(--ink) 82%, var(--muted));
  }

  .detail-hero h1,
  .detail-grid h2 {
    color: var(--ink);
  }

  .project-shot {
    width: 100%;
  }

  .page-title h1 {
    color: var(--ink);
  }

  .hero-strip,
  .feature-grid,
  .post-list,
  .project-list,
  .activity-dashboard,
  .played-list,
  .contact-grid,
  .detail-hero,
  .detail-grid,
  .page-title {
    grid-template-columns: 1fr;
  }

  .detail-hero .post-media,
  .detail-hero .project-shot {
    min-height: 260px;
  }

  .detail-body {
    padding: 18px;
  }

  .detail-body p {
    font-size: 17px;
  }

  .hero-strip {
    margin-top: 34px;
  }

  .activity-item {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .activity-item time {
    grid-column: 2;
  }

  .timeline-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .timeline-row img {
    width: 72px;
    height: 98px;
  }

  .score {
    grid-column: 2;
    text-align: left;
  }
}

@media (max-width: 520px) {
  :root {
    --page-x: 14px;
    --page-y: 24px;
    --gap: 14px;
  }

  .sidebar {
    padding: 20px 14px;
  }

  .side-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .side-nav a {
    flex: 0 0 auto;
  }

  .topbar {
    min-height: auto;
    padding: 16px 14px;
  }

  .hero-main,
  .activity-panel,
  .panel,
  .live-card,
  .about-card,
  .post-card,
  .project-card,
  .timeline-row {
    border-radius: 7px;
  }

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

  .panel-head {
    flex-direction: column;
  }

  .home-now-playing {
    padding: 16px;
  }

  .track-card,
  .identity-row,
  .played-item {
    align-items: flex-start;
  }
}
