:root {
  --font-geist-sans: Arial, Helvetica, sans-serif;
  --font-geist-mono: "Courier New", Courier, monospace;
  --ink: #f7f3ff;
  --purple: #9d6cff;
  --purple-bright: #b993ff;
  --muted: #a79bb8;
  --line: rgba(177, 132, 255, 0.3);
  --panel: rgba(10, 5, 17, 0.8);
  --background: #040206;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--background);
}

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: var(--font-geist-sans), Arial, sans-serif;
  overflow-x: hidden;
}

button,
a,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.site-shell {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 74% 23%, rgba(147, 79, 255, 0.16), transparent 35%),
    radial-gradient(circle at 14% 75%, rgba(94, 33, 170, 0.1), transparent 34%),
    #040206;
}

.ambient-image {
  position: fixed;
  z-index: -3;
  inset: 0;
  overflow: hidden;
}

.ambient-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 24%, rgba(115, 58, 205, 0.24), transparent 42%),
    linear-gradient(to bottom, rgba(4, 2, 6, 0.2), rgba(4, 2, 6, 0.7) 74%, rgba(4, 2, 6, 0.9));
}

.ambient-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.035);
  filter: brightness(0.48) saturate(0.82) contrast(1.16) hue-rotate(12deg);
}

.grain,
.entry-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.18;
  background-image:
    repeating-radial-gradient(circle at 17% 31%, rgba(255,255,255,0.11) 0 0.5px, transparent 0.8px 4px),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(174,120,255,0.03) 4px);
  background-size: 9px 11px, 100% 4px;
  mix-blend-mode: color-dodge;
}

.fx-off .grain {
  display: none;
}

.entry-screen {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 54%, rgba(126, 66, 220, 0.16), transparent 32%), #030104;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.entry-screen--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.entry-screen h1 {
  margin: 18px 0 30px;
  font-size: clamp(5rem, 18vw, 13rem);
  letter-spacing: -0.085em;
  line-height: 0.75;
  color: var(--ink);
  text-shadow: 0 0 70px rgba(157,108,255,0.3);
}

.entry-screen button,
.hero-actions button,
.hero-actions a {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255,255,255,0.02);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.entry-screen button {
  padding: 15px 26px;
  text-transform: uppercase;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
}

.entry-screen button:hover,
.hero-actions button:hover,
.hero-actions a:hover {
  background: var(--purple);
  border-color: var(--purple-bright);
  color: #08030f;
}

.entry-screen small {
  margin-top: 17px;
  color: #707070;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0;
  color: var(--purple-bright);
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.topbar {
  position: sticky;
  top: 18px;
  z-index: 20;
  width: min(1120px, calc(100% - 34px));
  height: 58px;
  margin: 18px auto 0;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(6, 2, 10, 0.78);
  box-shadow: 0 12px 45px rgba(49, 16, 86, 0.18);
  backdrop-filter: blur(18px);
}

.brand,
.topbar nav a,
.topbar button {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 700;
}

.brand {
  letter-spacing: 0.18em;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--purple-bright);
  box-shadow: 0 0 14px var(--purple);
}

.topbar nav {
  display: flex;
  gap: 30px;
}

.topbar nav a {
  color: #bcbcbc;
  transition: color 0.2s ease;
}

.topbar nav a:hover {
  color: #fff;
}

.topbar-controls {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-controls time {
  margin-right: 8px;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
}

.topbar button {
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.topbar button:hover {
  color: var(--purple-bright);
  border-color: var(--purple);
}

main {
  width: min(1120px, calc(100% - 34px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100svh - 95px);
  padding: 100px 0 70px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 68px;
  align-items: end;
}

.hero-copy .eyebrow span {
  display: inline-block;
  width: 22px;
  height: 1px;
  margin: 0 9px 3px 0;
  background: var(--purple-bright);
}

.hero h1 {
  margin: 24px 0 22px -0.06em;
  font-size: clamp(6rem, 15vw, 12rem);
  line-height: 0.72;
  letter-spacing: -0.095em;
  text-shadow: 0 0 80px rgba(103, 40, 200, 0.2);
}

.hero-description {
  max-width: 440px;
  margin: 0;
  color: #b2b2b2;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 34px;
}

.hero-actions button,
.hero-actions a {
  padding: 12px 18px;
  font-size: 0.73rem;
  font-weight: 700;
}

.profile-card {
  align-self: end;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 90px rgba(40, 10, 74, 0.3);
}

.profile-card__top,
.profile-card__status {
  padding: 15px 18px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  color: #9e9e9e;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.59rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.online-label i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--purple-bright);
  box-shadow: 0 0 10px var(--purple);
}

.profile-card__identity {
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.profile-card__identity img {
  width: 118px;
  height: 118px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--line);
  filter: grayscale(1) sepia(0.1) hue-rotate(225deg) saturate(2.4) contrast(1.16);
}

.profile-card h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -0.06em;
}

.profile-card__identity p {
  margin: 6px 0 0;
  color: #8c8c8c;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
}

.profile-card__status {
  position: relative;
  display: grid;
  justify-content: stretch;
  gap: 7px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  overflow: hidden;
}

.profile-card__status strong {
  color: #fff;
  font-family: var(--font-geist-sans), sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: none;
}

.waveform {
  position: absolute;
  right: 14px;
  bottom: 14px;
  height: 28px;
  display: flex;
  align-items: end;
  gap: 3px;
  opacity: 0.72;
}

.waveform i {
  display: block;
  width: 2px;
  height: 35%;
  background: var(--purple-bright);
  animation: wave 1.15s ease-in-out infinite alternate;
}

.waveform i:nth-child(3n) { height: 95%; animation-delay: -0.3s; }
.waveform i:nth-child(4n) { height: 60%; animation-delay: -0.7s; }
.waveform i:nth-child(5n) { height: 25%; animation-delay: -0.5s; }

@keyframes wave {
  to { height: 10%; opacity: 0.35; }
}

.links-section,
.notes-section,
.sound-section {
  padding: 110px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 46px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
}

.section-heading h2,
.notes-section h2,
.sound-section h2 {
  margin: 10px 0 0;
  font-size: clamp(2.7rem, 7vw, 5.3rem);
  line-height: 0.95;
  letter-spacing: -0.065em;
}

.section-heading > p {
  width: 330px;
  margin: 0;
  color: #898989;
  line-height: 1.5;
  font-size: 0.82rem;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.link-grid > a {
  grid-column: span 2;
  min-height: 190px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: linear-gradient(145deg, rgba(14,7,23,0.8), rgba(5,3,8,0.84));
  text-decoration: none;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.link-grid > a:nth-child(4),
.link-grid > a:nth-child(5) {
  grid-column: span 3;
}

.link-grid > a:hover {
  transform: translateY(-5px);
  border-color: var(--purple-bright);
  background: var(--purple);
  color: #09030f;
  box-shadow: 0 18px 50px rgba(105, 46, 196, 0.24);
}

.link-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
}

.link-body {
  display: flex;
  align-items: center;
  gap: 15px;
}

.link-code {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.68rem;
}

.link-body h3 {
  margin: 0;
  font-size: 1.28rem;
}

.link-body p {
  margin: 3px 0 0;
  color: #8d8d8d;
  font-size: 0.72rem;
}

.link-grid > a:hover .link-body p {
  color: #4b4b4b;
}

.notes-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 14px;
}

.notes-card,
.notes-wall {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(14,7,23,0.88), rgba(5,3,8,0.88));
  box-shadow: 0 24px 70px rgba(44, 15, 80, 0.2);
}

.notes-card {
  padding: 0 18px 18px;
  align-self: start;
}

.notes-card__top {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #9c8cac;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
}

.notes-wall__controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notes-wall__controls button {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #bba7cf;
  background: transparent;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.notes-wall__controls button:hover,
.notes-wall__controls button[data-active="true"] {
  border-color: var(--purple-bright);
  color: #08030f;
  background: var(--purple-bright);
}

.notes-card textarea {
  width: 100%;
  min-height: 142px;
  resize: vertical;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.28);
  line-height: 1.55;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.notes-card textarea::placeholder {
  color: #766d80;
}

.notes-card textarea:focus {
  border-color: var(--purple-bright);
  box-shadow: 0 0 0 3px rgba(157, 108, 255, 0.12);
}

.notes-form__meta {
  min-height: 34px;
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #8c8099;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
}

#note-status {
  text-align: right;
}

.notes-card > button {
  width: 100%;
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border: 1px solid var(--purple);
  border-radius: 12px;
  color: #08030f;
  background: var(--purple-bright);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.notes-card > button:hover {
  transform: translateY(-2px);
  background: #c5a8ff;
}

.notes-card > button:disabled {
  opacity: 0.52;
  cursor: wait;
  transform: none;
}

.notes-wall {
  min-height: 330px;
  padding: 0 18px 18px;
}

.notes-wall .notes-card__top {
  border-bottom: 1px solid var(--line);
}

.notes-list {
  display: grid;
}

.note-item {
  padding: 18px 2px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 20px;
  border-bottom: 1px solid rgba(177, 132, 255, 0.16);
}

.note-item:last-child {
  border-bottom: 0;
}

.note-item p {
  margin: 0;
  color: #e5dcf1;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.note-item time,
.note-item span {
  color: #746b7e;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.note-item span {
  grid-column: 1 / -1;
}

.note-item__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.note-delete {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 111, 164, 0.42);
  border-radius: 8px;
  color: #ff94bb;
  background: rgba(84, 8, 39, 0.2);
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.53rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.note-delete:hover {
  color: #17020a;
  background: #ff94bb;
}

.note-delete:disabled {
  opacity: 0.5;
  cursor: wait;
}

.notes-empty {
  margin: 0;
  padding: 42px 4px;
  color: #786e82;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
}

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

.note-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.admin-dialog {
  width: min(430px, calc(100% - 28px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink);
  background: #0a0510;
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.78), 0 0 70px rgba(104, 48, 185, 0.22);
}

.admin-dialog::backdrop {
  background: rgba(2, 1, 4, 0.82);
  backdrop-filter: blur(9px);
}

.admin-dialog form {
  padding: 20px;
}

.admin-dialog__top {
  margin: -4px 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #8f809f;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.57rem;
  letter-spacing: 0.13em;
}

.admin-dialog__top button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  font-size: 1.1rem;
  cursor: pointer;
}

.admin-dialog h2 {
  margin: 10px 0 8px;
  font-size: 2.45rem;
  letter-spacing: -0.06em;
}

.admin-dialog h2 + p {
  margin: 0 0 26px;
  color: #958a9f;
  line-height: 1.55;
  font-size: 0.82rem;
}

.admin-dialog label {
  display: block;
  margin-bottom: 8px;
  color: #a695b7;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.admin-dialog input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.28);
}

.admin-dialog input:focus {
  border-color: var(--purple-bright);
  box-shadow: 0 0 0 3px rgba(157, 108, 255, 0.12);
}

#admin-status {
  min-height: 34px;
  display: block;
  padding-top: 9px;
  color: #ff9fc1;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.59rem;
}

.admin-dialog form > button[type="submit"] {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--purple);
  border-radius: 11px;
  color: #08030f;
  background: var(--purple-bright);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.admin-dialog form > button[type="submit"]:disabled {
  opacity: 0.5;
  cursor: wait;
}

.sound-section {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 60px;
  align-items: center;
}

.sound-panel {
  min-width: 0;
  padding: 20px;
  display: grid;
  grid-template-columns: auto minmax(120px, 0.8fr) minmax(150px, 1fr);
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(19,8,32,0.88), rgba(6,3,10,0.84));
  box-shadow: 0 25px 70px rgba(44, 15, 80, 0.24);
}

.play-button {
  width: 50px;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #08030f;
  background: var(--purple-bright);
  cursor: pointer;
}

.track-info {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.track-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-info span,
.timeline span,
.volume-control span {
  color: #8a8a8a;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.56rem;
  letter-spacing: 0.12em;
}

.timeline {
  min-width: 0;
  display: grid;
  gap: 8px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--purple-bright);
  cursor: pointer;
}

.volume-control {
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

footer {
  width: min(1120px, calc(100% - 34px));
  margin: 0 auto;
  padding: 28px 0 36px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: #707070;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.58rem;
  letter-spacing: 0.15em;
}

@media (max-width: 850px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .topbar nav,
  .topbar-controls time,
  .topbar-controls button:first-of-type {
    display: none;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 110px 0 80px;
  }

  .profile-card {
    width: min(520px, 100%);
    justify-self: end;
  }

  .link-grid > a {
    grid-column: span 3;
  }

  .link-grid > a:last-child {
    grid-column: span 6;
  }

  .sound-section {
    grid-template-columns: 1fr;
  }

  .notes-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .entry-screen h1 {
    font-size: 29vw;
  }

  .topbar,
  main,
  footer {
    width: calc(100% - 24px);
  }

  .hero {
    gap: 52px;
  }

  .hero h1 {
    font-size: 29vw;
  }

  .profile-card__identity {
    padding: 18px;
  }

  .profile-card__identity img {
    width: 86px;
    height: 86px;
  }

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

  .section-heading > p {
    width: auto;
  }

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

  .link-grid > a,
  .link-grid > a:nth-child(4),
  .link-grid > a:nth-child(5),
  .link-grid > a:last-child {
    grid-column: auto;
    min-height: 160px;
  }

  .sound-panel {
    grid-template-columns: auto 1fr;
  }

  .notes-card,
  .notes-wall {
    border-radius: 15px;
  }

  .timeline,
  .volume-control {
    grid-column: 1 / -1;
  }

  footer {
    gap: 14px;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
