:root {
  --bg: #05030a;
  --panel: rgba(8, 4, 16, 0.82);
  --panel-deep: rgba(0, 0, 0, 0.88);
  --ink: #efe8ff;
  --muted: #9a8caf;
  --dim: #6f6385;
  --line: rgba(181, 140, 255, 0.24);
  --line-strong: rgba(223, 205, 255, 0.5);
  --accent: #b58cff;
  --accent-hot: #e3c0ff;
  --warn: #cf8cff;
  --shadow: rgba(0, 0, 0, 0.62);
  --cursor-x: 50%;
  --cursor-y: 30%;
  color-scheme: dark;
  font-family: "Courier New", Courier, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at var(--cursor-x) var(--cursor-y), rgba(181, 140, 255, 0.18), transparent 17rem),
    linear-gradient(rgba(5, 3, 10, 0.42), rgba(5, 3, 10, 0.86)),
    url("assets/8bit-bg.png") center / cover fixed no-repeat,
    var(--bg);
  background-attachment: fixed, fixed, fixed, scroll;
  letter-spacing: 0;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
}

body::before {
  opacity: 0.32;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(226, 201, 255, 0.055) 0,
      rgba(226, 201, 255, 0.055) 1px,
      transparent 1px,
      transparent 5px
    );
  mix-blend-mode: screen;
}

body::after {
  background:
    radial-gradient(circle at center, transparent 0 44%, rgba(0, 0, 0, 0.56) 74%, rgba(0, 0, 0, 0.92) 100%),
    linear-gradient(90deg, rgba(181, 140, 255, 0.08), transparent 18%, transparent 82%, rgba(119, 74, 196, 0.08));
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

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

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10;
  transform: translateY(-160%);
  border: 1px solid var(--accent);
  padding: 8px 10px;
  color: var(--accent);
  background: var(--panel-deep);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 34px;
}

.system-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 44px;
  margin-bottom: clamp(28px, 6vh, 74px);
  border: 1px solid var(--line-strong);
  padding: 8px 10px;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.66);
  box-shadow: 0 18px 58px var(--shadow);
}

.wordmark {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 16px;
}

.nav-links a,
.panel-kicker,
.mini-control,
.site-footer {
  font-size: 0.78rem;
  text-transform: lowercase;
}

.nav-links a {
  color: var(--muted);
}

.nav-links a:hover,
.music-links a:hover,
.archive-list a:hover,
.social-links a:hover {
  color: var(--accent-hot);
}

.terminal-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(320px, 1fr) minmax(240px, 0.74fr);
  grid-template-areas:
    ". profile ."
    ". statement ."
    "visual music archive"
    ". contact .";
  gap: 18px;
  align-items: start;
}

.panel {
  position: relative;
  border: 1px solid var(--line);
  padding: clamp(18px, 3vw, 28px);
  background:
    linear-gradient(rgba(255, 255, 255, 0.018), transparent 54%),
    var(--panel);
  box-shadow: 0 24px 70px var(--shadow);
  backdrop-filter: blur(4px);
}

.panel::before {
  position: absolute;
  inset: 8px 10px auto;
  height: 1px;
  background: var(--line);
  content: "";
}

.profile-panel {
  grid-area: profile;
  text-align: center;
}

.statement-panel {
  grid-area: statement;
}

.player-panel {
  grid-area: music;
}

.visual-panel {
  grid-area: visual;
  padding: 12px;
}

.archive-panel {
  grid-area: archive;
}

.contact-panel {
  grid-area: contact;
}

.panel-kicker {
  margin: 0 0 16px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.18em;
}

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

h1 {
  margin-bottom: 16px;
  color: var(--ink);
  font-size: clamp(2.5rem, 8vw, 5rem);
  line-height: 0.9;
  text-shadow:
    2px 0 rgba(181, 140, 255, 0.48),
    -2px 0 rgba(228, 176, 255, 0.22);
  text-transform: lowercase;
}

h2 {
  margin-bottom: 16px;
  color: var(--ink);
  font-size: clamp(1.05rem, 2.5vw, 1.52rem);
  line-height: 1.25;
  text-transform: lowercase;
}

.statement-panel p,
.contact-note {
  color: #c7bddb;
  font-size: 0.95rem;
  line-height: 1.75;
}

.hero-tagline {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  line-height: 1.4;
}

.hero-copy {
  max-width: 34rem;
  margin: 0 auto 22px;
  color: #c7bddb;
  font-size: 0.98rem;
  line-height: 1.7;
}

.hero-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-width: 420px;
  margin: 0 auto;
}

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

.mini-control,
.hero-links a,
.music-links a,
.social-links a,
.guestbook-button {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: rgba(0, 0, 0, 0.52);
}

.mini-control {
  min-height: 32px;
  padding: 6px 9px;
  cursor: pointer;
}

.mini-control[aria-pressed="true"] {
  color: #07100d;
  background: var(--accent);
}

.music-links,
.social-links {
  display: grid;
  gap: 8px;
}

.music-links {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.music-links a,
.hero-links a,
.social-links a,
.guestbook-button {
  min-height: 42px;
  padding: 12px 13px 10px;
  text-decoration: none;
}

.hero-links a:first-child {
  border-color: var(--accent);
  color: var(--accent);
}

.music-links a:first-child {
  grid-column: 1 / -1;
  border-color: var(--accent);
  color: var(--accent);
}

.fake-player {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.78rem;
}

.meter {
  height: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
}

.meter span {
  display: block;
  width: 34%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-hot), var(--accent));
}

.is-signal-playing .meter span {
  animation: scan-meter 1.8s steps(7, end) infinite;
}

.visual-panel img {
  aspect-ratio: 1;
  width: 100%;
  height: clamp(220px, 26vw, 320px);
  object-fit: cover;
  filter: saturate(0.82) brightness(0.78) contrast(1.16);
}

figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--muted);
  font-size: 0.72rem;
}

figcaption strong {
  color: var(--accent);
  font-weight: 400;
}

.archive-list {
  display: grid;
  gap: 1px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.archive-list li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  border-top: 1px solid rgba(181, 140, 255, 0.16);
  padding: 11px 0;
}

.archive-list span {
  color: var(--warn);
}

.archive-list a {
  color: var(--ink);
}

.social-links {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.guestbook-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  margin: 2px 0 12px;
  border-color: var(--accent-hot);
  color: var(--accent-hot);
  font-weight: 700;
  text-align: center;
  text-transform: lowercase;
  box-shadow:
    inset 0 0 0 1px rgba(181, 140, 255, 0.18),
    0 0 28px rgba(181, 140, 255, 0.16);
}

.guestbook-button::before {
  margin-right: 0.6ch;
  color: var(--accent);
  content: ">>";
}

.guestbook-button::after {
  margin-left: 0.6ch;
  color: var(--accent);
  content: "<<";
}

.site-footer {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 34px;
  color: var(--muted);
  text-align: center;
}

@keyframes scan-meter {
  0% {
    width: 14%;
  }

  45% {
    width: 86%;
  }

  100% {
    width: 38%;
  }
}

@media (max-width: 920px) {
  .terminal-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "profile"
      "statement"
      "music"
      "visual"
      "archive"
      "contact";
  }

  .visual-panel {
    max-width: 520px;
    margin: 0 auto;
  }
}

@media (max-width: 620px) {
  .site-shell {
    width: min(100% - 22px, 1120px);
    padding-top: 12px;
  }

  .system-bar {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 22px;
  }

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

  .panel {
    padding: 18px 14px;
  }

  .profile-panel {
    text-align: left;
  }

  .panel-heading,
  figcaption,
  .site-footer {
    flex-direction: column;
  }

  .hero-links,
  .music-links,
  .social-links {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(3rem, 19vw, 4.6rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
