/* ==========================================================================
   THE DAILY BIO — NYT Newspaper × guns.lol Bio-Link Hub
   ========================================================================== */

:root {
  --bg-outer: #0b0b0a;
  --bg-paper: #141412;
  --bg-hover: #1e1e1b;
  --ink: #f1eee7;
  --ink-soft: #cfc9be;
  --ink-muted: #8c887e;
  --rule-hair: #2d2c28;
  --accent-red: #e05a64;
  --accent-green: #58c07f;

  --font-masthead: "UnifrakturMaguntia", Georgia, serif;
  --font-display: "JetBrains Mono", monospace;
  --font-body: "JetBrains Mono", monospace;
  --font-ui: "JetBrains Mono", monospace;
  --font-mono: "JetBrains Mono", monospace;
}

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

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

body {
  background-color: var(--bg-outer);
  color: var(--ink);
  font-family: var(--font-body);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 28px 16px 48px;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Subtle tactile newsprint grain */
.paper-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  z-index: 50;
  background-image: radial-gradient(var(--ink) 0.5px, transparent 0.5px);
  background-size: 4px 4px;
}

/* Falling snow overlay */
.snow-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 45;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

.mono {
  font-family: var(--font-mono);
}

/* Minimal guns.lol-style enter screen to unlock autoplay */
.enter-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: rgba(11, 11, 10, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.enter-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.enter-text {
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--ink);
  border-bottom: 1px solid var(--rule-hair);
  padding-bottom: 4px;
}

/* Floating music toggle outside the card */
.audio-toggle-btn {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 60;
  background-color: var(--bg-paper);
  border: 1px solid var(--rule-hair);
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 6px 11px;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
  border-radius: 10%;
}

.audio-toggle-btn:hover {
  border-color: var(--rule);
  color: var(--ink);
  background-color: var(--bg-hover);
}

.audio-toggle-btn.paused {
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   Centered Broadsheet Sheet (guns.lol compact proportion)
   -------------------------------------------------------------------------- */
.broadsheet-card {
  width: 100%;
  max-width: 620px;
  background-color: var(--bg-paper);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.65);
  padding: 18px 26px 22px;
  position: relative;
}

/* --------------------------------------------------------------------------
   Top Meta Strip
   -------------------------------------------------------------------------- */
.meta-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule-hair);
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.meta-left,
.meta-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.views-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-soft);
}

.edition-tag {
  border: 1px solid var(--rule-hair);
  color: var(--ink-muted);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  padding: 2px 7px;
}

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */
.masthead {
  text-align: center;
  padding: 14px 0 4px;
}

.masthead-ears {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.masthead-title {
  margin: 0;
  font-family: var(--font-masthead);
  font-size: clamp(2.3rem, 7vw, 3.35rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--ink);
}

.masthead-rule {
  margin-top: 12px;
  border-top: 3px double var(--rule-hair);
}

/* --------------------------------------------------------------------------
   Profile Front-Page Lead
   -------------------------------------------------------------------------- */
.profile-lead {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule-hair);
}

.avatar-box {
  position: relative;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background-color: var(--bg-paper);
  overflow: hidden;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.08);
  display: block;
}

.presence-dot {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--accent-green);
  border: 2px solid var(--bg-paper);
}

.handle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}


.profile-bio {
  margin: 7px 0 11px;
  font-size: 0.9rem;
  line-height: 1.48;
  color: var(--ink-soft);
}

.badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stamp-badge {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border: 1px solid var(--rule-hair);
  border-radius: 10%;
  background-color: var(--bg-hover);
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Radio / Rounded Playlist Player
   -------------------------------------------------------------------------- */
.radio-wrap [hidden] {
  display: none !important;
}

.radio-wrap {
  margin: 16px 0;
}

.radio-strip {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 10px 14px 10px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background-color: var(--bg-hover);
}

.play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background-color: var(--ink);
  color: var(--bg-paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.play-btn:hover {
  opacity: 0.88;
  transform: scale(1.04);
}

.play-btn:active {
  transform: scale(0.96);
}

.radio-meta {
  min-width: 0;
}

.radio-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.radio-kicker {
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-red);
}

.radio-time {
  font-size: 0.64rem;
  color: var(--ink-muted);
}

.radio-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.progress-track {
  width: 100%;
  height: 14px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
  position: relative;
}

.progress-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 999px;
  background-color: var(--rule-hair);
}

.progress-fill {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background-color: var(--ink);
  pointer-events: none;
}

.radio-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-circle-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--rule-hair);
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.nav-circle-btn:hover {
  border-color: var(--rule);
  color: var(--ink);
  background-color: var(--bg-paper);
}

.eq-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
  margin-right: 4px;
}

.eq-bars span {
  width: 3px;
  height: 4px;
  border-radius: 999px;
  background-color: var(--ink);
  transition: height 0.2s ease;
}

.eq-bars.playing span:nth-child(1) {
  animation: eqPulse 0.7s infinite alternate ease-in-out;
}

.eq-bars.playing span:nth-child(2) {
  animation: eqPulse 0.55s 0.15s infinite alternate ease-in-out;
}

.eq-bars.playing span:nth-child(3) {
  animation: eqPulse 0.8s 0.05s infinite alternate ease-in-out;
}

.eq-bars.playing span:nth-child(4) {
  animation: eqPulse 0.6s 0.25s infinite alternate ease-in-out;
}

@keyframes eqPulse {
  from {
    height: 4px;
  }

  to {
    height: 18px;
  }
}

/* --------------------------------------------------------------------------
   "my other names" Inline Row
   -------------------------------------------------------------------------- */
.names-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--rule-hair);
}

.names-label {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  white-space: nowrap;
}

.names-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}

.alias-inline {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}

.alias-inline:hover {
  color: var(--ink);
  text-decoration: underline;
}

.alias-sep {
  color: var(--ink-muted);
  font-size: 0.7rem;
  user-select: none;
}

/* --------------------------------------------------------------------------
   Section Labels
   -------------------------------------------------------------------------- */
.section-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 18px 0 10px;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--rule);
}

.section-label {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-sub {
  font-size: 0.64rem;
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   Main Links List (NYT Index Style)
   -------------------------------------------------------------------------- */
.links-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.link-item {
  border-bottom: 1px solid var(--rule-hair);
}

.link-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 10px;
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  color: var(--ink);
  transition: background-color 0.16s ease, padding-left 0.16s ease;
}

.link-row:hover {
  background-color: var(--ink);
  color: var(--bg-paper);
  padding-left: 16px;
}

.link-row:hover .link-desc,
.link-row:hover .link-tag,
.link-row:hover .link-arrow {
  color: var(--bg-paper);
  opacity: 0.85;
}

.link-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.link-main {
  min-width: 0;
}

.link-title-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.link-title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.2;
}

.link-tag {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.link-desc {
  margin: 2px 0 0;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.link-arrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   Classifieds Grid (Secondary / Quick Links)
   -------------------------------------------------------------------------- */
.classifieds-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.classified-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 11px 12px;
  border: 1px solid var(--rule-hair);
  border-radius: 10px;
  background-color: transparent;
  text-align: left;
  color: var(--ink);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.classified-card:hover {
  border-color: var(--rule);
  background-color: var(--bg-hover);
}

.classified-kicker {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 3px;
}

.classified-title {
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.25;
}

.classified-sub {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--ink-muted);
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Colophon / Footer
   -------------------------------------------------------------------------- */
.colophon {
  margin-top: 22px;
  padding-top: 12px;
  border-top: 3px double var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.colophon-left {
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.share-link {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink);
}

.share-link:hover {
  text-decoration: underline;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translate(-50%, 10px);
  background-color: var(--ink);
  color: var(--bg-paper);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 8px 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* --------------------------------------------------------------------------
   Mobile Tweaks
   -------------------------------------------------------------------------- */
@media (max-width: 520px) {
  body {
    padding: 12px 10px 28px;
  }

  .broadsheet-card {
    padding: 14px 16px 18px;
  }

  .profile-lead {
    grid-template-columns: 82px 1fr;
    gap: 14px;
  }

  .avatar-box {
    width: 82px;
    height: 82px;
  }

  .profile-name {
    font-size: 1.35rem;
  }

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