/* =============================================================================
   1. Custom properties
   ============================================================================= */

:root {
  /* Color */
  --bg:           #080c0c;   /* near-black with cold tint */
  --surface:      #0d1414;   /* dark cyan-tinted surface */
  --border:       #162020;   /* cold dark border */
  --text:         #c8d8d8;   /* slightly cyan-tinted white */
  --text-muted:   #3a5050;   /* muted cyan-grey */
  --accent:       #4dd9d9;   /* cold cyan */

  /* Typography */
  --font-body:    'Space Grotesk', sans-serif;
  --font-mono:    'Space Mono', monospace;

  /* Scale */
  --size-hero:    clamp(2.5rem, 8vw, 5rem);

  /* Layout */
  --max-width:    720px;
  --space-xl:     8rem;
  --space-lg:     4rem;
  --space-md:     2rem;
  --space-sm:     1rem;

  /* Motion */
  --transition:   200ms ease;

  /* Artwork hooks — set these when artwork is ready, cost nothing until then */
  --noise-texture: none;
  --hero-bg:       url('IMG_0286.PNG');
}


/* =============================================================================
   2. Reset / base
   ============================================================================= */

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

html {
  scroll-behavior: smooth;
  /* Prevent layout shift from scrollbar appearing/disappearing */
  scrollbar-gutter: stable;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Noise texture overlay — position: fixed so it covers the whole viewport
   regardless of scroll. Zero visual cost while --noise-texture is none. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: var(--noise-texture);
  opacity: 0.03;
  pointer-events: none;
  z-index: 1000;
}

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

ul {
  list-style: none;
}

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


/* =============================================================================
   3. Typography
   ============================================================================= */

h1, h2, h3 {
  font-family: var(--font-mono);  /* monospace throughout for cold/digital feel */
  line-height: 1.1;
}

/* Section labels — understated, not dominant */
h2 {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}


/* =============================================================================
   4. Layout
   ============================================================================= */

/* Shared section spacing and width cap */
section {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-block: var(--space-xl);
  padding-inline: var(--space-md);
}

/* Music section gets more room for side-by-side players */
#music {
  max-width: 1100px;
}

/* Hero breaks out of the max-width constraint to bleed full-width */
#hero {
  max-width: 100%;
  padding-inline: 0;
}


/* =============================================================================
   5. Nav
   ============================================================================= */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-sm) var(--space-md);
  /* Subtle border without a heavy bar */
  border-bottom: 1px solid var(--border);
  background-color: rgba(10, 10, 10, 0.92);
  /* Frosted-glass blur for depth without a hard edge */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  max-width: var(--max-width);
  margin-inline: auto;
}

nav a {
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  transition: color var(--transition);
}

nav a:first-child {
  color: var(--text);
  font-weight: 700;
  margin-right: auto;
}

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

/* Active section — set by IntersectionObserver in script.js */
nav a[aria-current='page'] {
  color: var(--accent);
}


/* =============================================================================
   6. Hero
   ============================================================================= */

#hero {
  position: relative;
  overflow: hidden;               /* clips future artwork without reflow */
  min-height: 100svh;             /* svh = small viewport height, handles mobile chrome bar */
  display: flex;
  align-items: center;
  /* Logo sits behind the glitch art as a ghost watermark.
     CSS allows multiple backgrounds — first listed = on top. */
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Logo ghost — sits to the right of the hero text */
.hero-logo-bg {
  position: absolute;
  top: 50%;
  right: 15%;
  transform: translateY(-50%);
  width: clamp(200px, 30vw, 480px);
  height: auto;
  opacity: 0.4;
  mix-blend-mode: screen;  /* treats black as transparent, only bright parts show */
  pointer-events: none;
  z-index: 1;
}

/* Dark overlay so text stays readable over the artwork */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 12, 0.75);
  pointer-events: none;
}

/* Keep text above the overlay and logo ghost */
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
  width: 100%;
}

h1 {
  font-size: var(--size-hero);
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.tagline {
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);  /* full brightness over artwork */
}


/* =============================================================================
   7. Music / players
   ============================================================================= */

.players {
  display: flex;
  flex-direction: row;   /* side by side on desktop */
  gap: var(--space-md);
  align-items: stretch;
}

.player {
  flex: 1;  /* each player takes equal width */
}

.player {
  background-color: var(--surface);
  border: 1px solid var(--border);
  /* Slight rounding — not card-ish, just softens the hard rectangle */
  border-radius: 2px;
  overflow: hidden;
}

/* SoundCloud injects a white bg — shift it up to hide the white header bar */
.player--soundcloud {
  overflow: hidden;
}

.player--soundcloud iframe {
  display: block;
  margin-top: -2px;
  filter: brightness(0.92);  /* tones down the bright white slightly */
}


/* =============================================================================
   8. Bio
   ============================================================================= */

#bio p {
  font-size: 1rem;
  line-height: 1.75;
  max-width: 55ch;   /* ~comfortable reading width, narrower than section max */
  color: var(--text);
}


/* =============================================================================
   9. Gigs
   ============================================================================= */

#gigs ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

#gigs li {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  padding-block: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

#gigs li:first-child {
  border-top: 1px solid var(--border);
}

.gig-date {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;   /* date never wraps mid-string */
  min-width: 6rem;
}

.gig-info {
  font-size: 0.9375rem;
  color: var(--text);
}


/* =============================================================================
   10. Links
   ============================================================================= */

#links ul {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

#links a {
  display: inline-block;
  font-size: 0.9375rem;
  padding-block: 0.375rem;
  color: var(--text-muted);
  transition: color var(--transition);
  /* Underline grows from left on hover — cleaner than a box highlight */
  position: relative;
}

#links a::after {
  content: '';
  position: absolute;
  bottom: 0.25rem;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--accent);
  transition: width var(--transition);
}

#links a:hover {
  color: var(--accent);
}

#links a:hover::after {
  width: 100%;
}


/* =============================================================================
   11. Footer
   ============================================================================= */

footer {
  border-top: 1px solid var(--border);
  padding: var(--space-lg) var(--space-md);
  max-width: var(--max-width);
  margin-inline: auto;
}

footer p {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}


/* =============================================================================
   12. Media queries
   ============================================================================= */

@media (max-width: 640px) {
  :root {
    --space-xl: 5rem;
    --space-lg: 2.5rem;
  }

  /* Stack players on mobile */
  .players {
    flex-direction: column;
  }

  /* Reduce nav gap, keep items readable */
  nav {
    gap: var(--space-sm);
  }

  nav a {
    font-size: 0.75rem;
  }

  /* Gig list: date above venue on small screens */
  #gigs li {
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
  }

  .gig-date {
    min-width: unset;
  }
}
