:root {
  color-scheme: dark;
  --bg: #000;
  --panel: #030000;
  --line: rgba(255, 32, 32, 0.28);
  --text: #ff3131;
  --muted: #8f1b1b;
  --shadow: 0 0 52px rgba(255, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  font-family: "Courier New", Consolas, monospace;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  color: var(--text);
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 49, 49, 0.055) 0,
      rgba(255, 49, 49, 0.055) 1px,
      transparent 1px,
      transparent 4px
    ),
    radial-gradient(circle at 50% 0%, rgba(255, 0, 0, 0.12), transparent 24rem),
    #000;
  overflow-x: hidden;
}

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

.corner-art {
  position: fixed;
  z-index: 2;
  left: 0;
  bottom: 0;
  width: min(28vw, 260px);
  max-width: 45vh;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 0 28px rgba(255, 0, 0, 0.16));
}

.site-tabs {
  position: fixed;
  z-index: 30;
  left: 50%;
  top: 14px;
  width: min(620px, calc(100vw - 32px));
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  background: #050000;
  box-shadow: 0 0 32px rgba(255, 0, 0, 0.1);
  scrollbar-width: none;
  transform: translateX(-50%);
}

.site-tabs::-webkit-scrollbar {
  display: none;
}

.shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 40px 0;
}

.profile-panel {
  position: fixed;
  z-index: 20;
  left: 50%;
  top: calc(50% + 26px);
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  border-radius: 0;
  transform: translate(-50%, -50%);
  user-select: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  will-change: left, top, box-shadow;
  transition: box-shadow 160ms ease, border-color 160ms ease;
}

.profile-panel.dragging {
  border-color: rgba(255, 49, 49, 0.48);
  box-shadow: 0 0 76px rgba(255, 0, 0, 0.22);
}

.profile-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 36px rgba(255, 0, 0, 0.08);
}

.terminal-bar {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #070000;
  cursor: grab;
  touch-action: none;
  transition: background 160ms ease;
}

.terminal-bar:active {
  cursor: grabbing;
}

.profile-panel.dragging .terminal-bar {
  background: #0d0000;
}

.window-dots {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.window-dots:focus-visible {
  outline: 1px solid rgba(255, 49, 49, 0.8);
  outline-offset: -3px;
}

.window-dots span {
  width: 8px;
  height: 8px;
  border: 1px solid rgba(255, 49, 49, 0.48);
  background: rgba(255, 49, 49, 0.12);
}

.terminal-title {
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.tab-button {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  border: 0;
  border-radius: 0;
  border-left: 1px solid rgba(255, 49, 49, 0.16);
  background: transparent;
  color: var(--muted);
  font: inherit;
  padding: 0 12px;
  cursor: pointer;
  line-height: 38px;
}

.tab-button:hover,
.tab-button:focus-visible,
.tab-button.active {
  background: rgba(255, 49, 49, 0.055);
  color: var(--text);
  outline: none;
}

.profile-content {
  position: relative;
  z-index: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 30px;
}

.identity {
  margin-top: 0;
}

.eyebrow,
.tagline,
.bio,
.link-card small,
.terminal-copy {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9rem;
  font-weight: 700;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(2.7rem, 12vw, 5.3rem);
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(255, 49, 49, 0.32);
}

.tagline {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

h2 {
  margin-bottom: 18px;
  color: var(--text);
  font-size: clamp(2rem, 8vw, 3.4rem);
  line-height: 0.95;
  text-transform: lowercase;
  text-shadow: 0 0 18px rgba(255, 49, 49, 0.24);
}

.bio {
  max-width: 58ch;
  margin: 26px 0;
  line-height: 1.65;
}

.bio span,
.terminal-copy span {
  color: var(--text);
  font-weight: 700;
}

.terminal-copy {
  max-width: 58ch;
  margin: 0 0 22px;
  line-height: 1.65;
}

.terminal-list {
  display: grid;
  gap: 8px;
}

.terminal-list p {
  margin: 0;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 49, 49, 0.14);
  color: var(--muted);
}

.terminal-list span {
  display: inline-block;
  min-width: 86px;
  color: var(--text);
}

.audio-panel {
  margin-bottom: 22px;
  border-top: 1px solid rgba(255, 49, 49, 0.14);
  border-bottom: 1px solid rgba(255, 49, 49, 0.14);
  padding: 14px 0;
}

.audio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.86rem;
}

.audio-actions {
  display: flex;
  gap: 8px;
}

.terminal-button {
  appearance: none;
  -webkit-appearance: none;
  min-width: 74px;
  border: 1px solid rgba(255, 49, 49, 0.28);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  padding: 6px 9px;
  cursor: pointer;
  line-height: normal;
}

.terminal-button:hover,
.terminal-button:focus-visible {
  background: rgba(255, 49, 49, 0.08);
  outline: none;
}

.audio-progress {
  height: 8px;
  margin-top: 14px;
  border: 1px solid rgba(255, 49, 49, 0.24);
  background: #050000;
  pointer-events: none;
  overflow: hidden;
}

.audio-progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: rgba(255, 49, 49, 0.65);
}

.audio-time {
  display: flex;
  gap: 7px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.links {
  display: grid;
  gap: 8px;
}

.link-card {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 52px;
  padding: 10px 0;
  border: 0;
  border-top: 1px solid rgba(255, 49, 49, 0.14);
  border-radius: 0;
  background: transparent;
  transition: color 160ms ease, background 160ms ease, padding 160ms ease;
}

.link-card.single {
  margin-top: 6px;
}

.link-card:hover,
.link-card:focus-visible {
  padding-left: 10px;
  background: rgba(255, 49, 49, 0.045);
  color: #ff6868;
  outline: none;
}

.link-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 1rem;
  font-weight: 900;
}

.link-card span:last-child {
  min-width: 0;
}

.link-card strong,
.link-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-card strong {
  margin-bottom: 4px;
  text-transform: lowercase;
}

#bg-audio {
  position: fixed;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

@media (max-width: 860px) {
  .shell {
    padding: 28px 0;
  }
}

@media (max-width: 620px) {
  .shell {
    padding: 0;
  }

  .site-tabs {
    left: 10px;
    top: 10px;
    width: calc(100vw - 20px);
    transform: none;
  }

  .corner-art {
    display: none;
  }

  .profile-panel {
    left: 10px;
    top: 62px;
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 72px);
    transform: none;
  }

  .terminal-bar {
    min-height: 42px;
    padding-left: 10px;
    cursor: default;
    touch-action: auto;
  }

  .window-dots {
    gap: 6px;
  }

  .window-dots span {
    width: 7px;
    height: 7px;
  }

  .tab-button {
    padding: 0 9px;
    font-size: 0.78rem;
    line-height: 40px;
    white-space: nowrap;
  }

  .profile-content {
    padding: 22px;
  }

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

  .audio-panel,
  #bg-audio {
    display: none;
  }

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