/* ===========================
   Design System / Variables
   =========================== */

:root {
  --bg: #0c0c0e;
  --surface: #141418;
  --surface-hover: #1c1c22;
  --border: #2a2a33;
  --text: #e8e6e1;
  --text-muted: #8a8891;
  --accent-gold: #e2b93b;
  --accent-green: #34d058;
  --accent-orange: #ff5500;

  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;

  --max-width: 880px;
  --section-gap: 5rem;
  --radius: 10px;
  --transition: 0.2s ease;
}

/* ===========================
   Reset
   =========================== */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

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

/* ===========================
   Noise Overlay
   =========================== */

#noise {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
}

/* ===========================
   Ambient Glow
   =========================== */

.ambient-glow {
  position: fixed;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(226, 185, 59, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ===========================
   Fade-in Animations
   =========================== */

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   Nav
   =========================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 12, 14, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--accent-gold);
  letter-spacing: 0.02em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.nav__links a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav__links a:hover {
  color: var(--text);
}

.nav__divider {
  width: 1px;
  height: 16px;
  background: var(--border);
}

.nav__links a[target="_blank"]::after {
  content: ' ↗';
  font-size: 0.7em;
  opacity: 0.5;
}

/* ===========================
   Hero
   =========================== */

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 6rem 1.5rem 4rem;
  position: relative;
  z-index: 1;
}

.hero__intro {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.hero__headshot {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.hero__name {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero__tagline {
  font-size: 1.125rem;
  font-weight: 300;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.7;
}

/* ===========================
   Sections (shared)
   =========================== */

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  margin-bottom: var(--section-gap);
  position: relative;
  z-index: 1;

  /* The nav is sticky, so an anchor jump would otherwise park the section
     title underneath it. --nav-height is measured in main.js, since the nav
     wraps to two rows on narrow screens. */
  scroll-margin-top: calc(var(--nav-height, 4rem) + 1.25rem);
}

.section__title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 400;
  margin-bottom: 2rem;
}

/* ===========================
   Links Section
   =========================== */

.links-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background var(--transition), border-color var(--transition);
}

.link-card:hover {
  background: var(--surface-hover);
  border-color: var(--accent-gold);
}

.link-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(226, 185, 59, 0.1);
  color: var(--accent-gold);
  font-family: var(--font-serif);
  font-size: 0.875rem;
  flex-shrink: 0;
}

.link-card__name {
  display: block;
  font-weight: 500;
  font-size: 0.9375rem;
}

.link-card__desc {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.link-card__arrow {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 1.125rem;
  transition: transform var(--transition), color var(--transition);
}

.link-card:hover .link-card__arrow {
  transform: translateX(4px);
  color: var(--accent-gold);
}

/* ===========================
   Card Grid
   =========================== */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), background var(--transition);
}

.card:hover {
  border-color: rgba(226, 185, 59, 0.3);
  background: var(--surface-hover);
}

/* Badges are always the card's last child — pin them to the bottom so they
   line up across a row regardless of how long the title or excerpt runs. */
.card > .badge {
  margin-top: auto;
  align-self: flex-start;
}

.card__header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.5rem;
}

.card__tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
  margin-bottom: 0.75rem;
}

.card__title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.card__header .card__title {
  margin-bottom: 0;
}

.card__excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card__excerpt:last-child {
  margin-bottom: 0;
}

.card__logo {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 5px;
  background: var(--surface-hover);
}

/* No display of its own — .card's flex column has to survive, or the badge
   loses the `margin-top: auto` that pins it to the bottom of the card. */
.card--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.card__link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent-green);
  transition: opacity var(--transition);
}

.card__link:hover {
  opacity: 0.8;
}

.card__link--muted {
  color: var(--text-muted);
  font-style: italic;
  font-weight: 300;
}

.card__link--spotify {
  color: var(--accent-gold);
  font-style: italic;
  font-weight: 300;
  opacity: 0.7;
}

/* ===========================
   Music Cards
   =========================== */

.card__album-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--surface-hover) 0%, var(--border) 100%);
  border-radius: 6px;
  margin-bottom: 1rem;
}

.card__album-art {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 6px;
  margin-bottom: 1rem;
  background: var(--surface-hover);
  padding: 0.75rem;
}

/* ===========================
   Badges
   =========================== */

.badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.badge--live {
  background: rgba(29, 185, 84, 0.12);
  color: var(--accent-green);
}

.badge--progress {
  background: rgba(226, 185, 59, 0.12);
  color: var(--accent-gold);
}

.badge--done {
  background: rgba(52, 208, 88, 0.12);
  color: var(--accent-green);
}

.badge--soon {
  background: rgba(138, 136, 145, 0.12);
  color: var(--text-muted);
}

/* ===========================
   Footer
   =========================== */

.footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 768px) {
  .nav__inner {
    padding: 0.75rem 1.25rem;
    gap: 1.125rem;
  }

  .nav__logo {
    flex-shrink: 0;
  }

  /* Stacking the logo over two rows of wrapped links made the sticky nav
     140px tall — most of a phone screen's top third, and it sat over every
     anchor jump. One row that swipes sideways instead. */
  .nav__links {
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 1.125rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* Softens the right edge so it reads as more content, not a clipped row. */
    mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent);
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent);
  }

  .nav__links::-webkit-scrollbar {
    display: none;
  }

  .nav__links a {
    white-space: nowrap;
  }

  /* Reclaims ~19px of a 375px screen. */
  .nav__links a[target="_blank"]::after {
    content: none;
  }

  /* Only four items fit before the strip needs a swipe, so Resume takes the
     last visible slot and the social links move behind it. */
  .nav__social {
    order: 1;
  }

  .nav__divider {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 5rem 1.25rem 3rem;
  }

  .hero__intro {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .hero__headshot {
    width: 72px;
    height: 72px;
  }

  .section {
    padding: 0 1.25rem;
    margin-bottom: 3.5rem;
  }

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

  .section__title {
    font-size: 1.5rem;
  }

  .nav__links a {
    font-size: 0.8125rem;
  }
}
