:root {
  --bg: #000;
  --panel: #111522;
  --panel-2: #0f1320;
  --text: #e9ecf1;
  --muted: #aab2c0;
  --border: rgba(255, 255, 255, 0.12);
  --accent: #7dd3fc;
  --accent-2: #a78bfa;
  --shadow: 0 14px 50px rgba(0, 0, 0, 0.45);
  --radius: 16px;
}

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

html,
body {
  height: 100%;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: -9999px;
  background: var(--panel);
  color: var(--text);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1.25rem 0;
  background: rgba(11, 13, 18, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  max-width: 980px;
  margin: 0 auto;
  flex-wrap: nowrap;
}

.avatar {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-text {
  min-width: 0;
}

.hero-text h1 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.1;
  letter-spacing: 0.2px;
}

.email {
  margin: 0.2rem 0 0.55rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
}

.lede {
  margin: 0 0 0.75rem;
  color: var(--muted);
  max-width: 70ch;
}

.icon-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.icon-link {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(17, 21, 34, 0.65);
  color: var(--text);
  display: grid;
  place-items: center;
  text-decoration: none;
}

.icon-link:hover {
  text-decoration: none;
  border-color: rgba(125, 211, 252, 0.55);
}

.icon-link i {
  font-size: 20px;
}

main.container {
  padding: 1.25rem 0 2.5rem;
}

.section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(17, 21, 34, 0.78), rgba(15, 19, 32, 0.72));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  margin: 0 0 1rem;
  overflow: hidden;
  scroll-margin-top: 120px;
}

.section > summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  align-items: center;
}

.section > summary::-webkit-details-marker {
  display: none;
}

.summary-title {
  font-size: 1.05rem;
  font-weight: 800;
}

.summary-chevron {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 900;
  transform: rotate(0deg);
  transform-origin: center;
  transition: transform 160ms ease, color 160ms ease;
}

.section[open] > summary {
  border-bottom: 1px solid var(--border);
  background: rgba(17, 21, 34, 0.55);
}

.section[open] > summary .summary-chevron {
  transform: rotate(90deg);
  color: rgba(255, 255, 255, 0.95);
}

.section-body {
  padding: 1rem;
}

.note {
  color: var(--muted);
  margin-top: 0;
}

.small {
  font-size: 0.95rem;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.card {
  grid-column: span 6;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem;
  background: rgba(0, 0, 0, 0.14);
}

.card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
}

.card img,
.card video {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.6rem;
  display: block;
}

.media-link {
  display: block;
}

.media-link:hover {
  text-decoration: none;
}

.card p {
  margin: 0.45rem 0;
}

.card-media {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.albums {
  display: grid;
  gap: 1rem;
}

.album {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.14);
}

.album-meta {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  align-items: start;
}

.album-meta img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.player {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.75rem;
}

.player audio {
  width: 100%;
}

.tracklist {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.35rem;
}

.track-btn {
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
}

.track-btn:hover {
  border-color: rgba(125, 211, 252, 0.45);
}

.track-btn[aria-current="true"] {
  border-color: rgba(167, 139, 250, 0.6);
  background: rgba(167, 139, 250, 0.12);
}

.inline-video {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.yt-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  margin: 0 0 1rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
}

.photo-grid-tight {
  margin: 0.75rem 0 1rem;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.photo {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
}

.photo img {
  width: 100%;
  height: 100%;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.lightbox.is-open {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: 1fr;
  gap: 0.75rem;
}

.lightbox-img {
  max-width: min(1100px, 92vw);
  max-height: 78vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  align-self: center;
}

.lightbox-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  display: grid;
  place-items: center;
  user-select: none;
}

.lightbox-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.lightbox-btn:hover {
  border-color: rgba(125, 211, 252, 0.55);
}

.lightbox-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  font-size: 30px;
}

.lightbox-prev {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
}

.lightbox-next {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
}

.site-footer {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Timeline (adapted from your existing timeline CSS, but without Bootstrap dependencies) */
.timeline-wrap {
  padding: 0.5rem 0;
}

.timeline {
  line-height: 1.4em;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

.timeline-item {
  padding-left: 40px;
  position: relative;
}

.timeline-info {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  margin: 0 0 0.45rem 0;
  text-transform: uppercase;
  color: var(--muted);
}

.timeline-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 15px;
}

.timeline-marker:before {
  background: var(--accent-2);
  border: 3px solid transparent;
  border-radius: 100%;
  content: "";
  display: block;
  height: 15px;
  position: absolute;
  top: 4px;
  left: 0;
  width: 15px;
  transition: background 0.25s ease-in-out, border 0.25s ease-in-out;
}

.timeline-marker:after {
  content: "";
  width: 3px;
  background: rgba(255, 255, 255, 0.16);
  display: block;
  position: absolute;
  top: 24px;
  bottom: 0;
  left: 6px;
}

.timeline-item:last-child .timeline-marker:after {
  content: none;
}

.timeline-item:hover .timeline-marker:before {
  background: transparent;
  border: 3px solid var(--accent-2);
}

.timeline-content {
  padding-bottom: 32px;
}

.timeline-title {
  margin: 0;
}

@media (max-width: 820px) {
  .avatar {
    width: 76px;
    height: 76px;
  }

  .card {
    grid-column: span 12;
  }

  .album-meta {
    grid-template-columns: 1fr;
  }

  .album-meta img {
    width: 140px;
    height: 140px;
  }

  .lightbox.is-open {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .lightbox-img {
    grid-column: 1;
    grid-row: 2;
    max-height: 72vh;
  }

  .lightbox-prev,
  .lightbox-next {
    display: none;
  }
}

/* --------------------------
   Writing pages (v2-style)
-------------------------- */

.story-page {
  padding: 1.25rem 0 2.5rem;
}

.story-top {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  padding: 0.35rem 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(17, 21, 34, 0.55);
}

.back-link:hover {
  text-decoration: none;
  border-color: rgba(125, 211, 252, 0.55);
}

.story-title {
  margin: 0;
  font-size: 1.35rem;
}

.story {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(17, 21, 34, 0.78), rgba(15, 19, 32, 0.72));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  padding: 1rem;
}

.story p {
  margin: 0 0 1rem;
  text-indent: 1.6rem;
}

.story p:last-child {
  margin-bottom: 0;
}

.story-float {
  float: left;
  width: min(280px, 42%);
  margin: 0.2rem 1rem 0.5rem 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

@media (max-width: 820px) {
  .story-top {
    flex-wrap: wrap;
  }

  .story-float {
    float: none;
    width: 100%;
    margin: 0 0 1rem;
  }

  .story p {
    text-indent: 0;
  }
}


