/* Art direction: Warm tropical jam band → laid-back island sunset
   Palette: warm sandy surfaces, sunset coral accent, ocean teal secondary
   Typography: Zodiak (display, serif warmth) + General Sans (body, clean readability)
   Density: spacious — this is a mood-driven music site */

/* ========================================
   DESIGN TOKENS
   ======================================== */

:root {
  /* Type scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  /* Spacing (4px base) */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;

  /* Fonts */
  --font-display: 'Zodiak', 'Georgia', serif;
  --font-body: 'General Sans', 'Helvetica Neue', sans-serif;
}

/* ========================================
   LIGHT MODE (Default)
   ======================================== */

:root, [data-theme="light"] {
  /* Warm sandy surfaces */
  --color-bg:               #faf6f0;
  --color-surface:          #fcf9f4;
  --color-surface-2:        #fdfcf9;
  --color-surface-offset:   #f4efe6;
  --color-surface-offset-2: #eee8de;
  --color-surface-dynamic:  #e6dfd4;
  --color-divider:          #ddd5c8;
  --color-border:           #d4cbbe;

  /* Text */
  --color-text:           #2a2418;
  --color-text-muted:     #7a7264;
  --color-text-faint:     #b5ad9f;
  --color-text-inverse:   #faf6f0;

  /* Primary accent — sunset coral/orange */
  --color-primary:        #c45a2c;
  --color-primary-hover:  #a34821;
  --color-primary-active: #843a1a;
  --color-primary-highlight: #f0ddd2;

  /* Secondary — ocean teal */
  --color-secondary:      #1a7a7a;
  --color-secondary-hover:#136363;

  /* Shadows */
  --shadow-sm: 0 1px 2px oklch(0.2 0.02 60 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.02 60 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.02 60 / 0.12);
}

/* ========================================
   DARK MODE
   ======================================== */

[data-theme="dark"] {
  --color-bg:               #1a1714;
  --color-surface:          #201d19;
  --color-surface-2:        #252219;
  --color-surface-offset:   #1e1b17;
  --color-surface-offset-2: #2a2620;
  --color-surface-dynamic:  #332e26;
  --color-divider:          #2e2a22;
  --color-border:           #3e3830;
  --color-text:             #d8d0c4;
  --color-text-muted:       #8a8274;
  --color-text-faint:       #5e5848;
  --color-text-inverse:     #1a1714;

  --color-primary:        #e88050;
  --color-primary-hover:  #d06838;
  --color-primary-active: #b85528;
  --color-primary-highlight: #3d2e24;

  --color-secondary:      #5aadad;
  --color-secondary-hover:#3d9494;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:               #1a1714;
    --color-surface:          #201d19;
    --color-surface-2:        #252219;
    --color-surface-offset:   #1e1b17;
    --color-surface-offset-2: #2a2620;
    --color-surface-dynamic:  #332e26;
    --color-divider:          #2e2a22;
    --color-border:           #3e3830;
    --color-text:             #d8d0c4;
    --color-text-muted:       #8a8274;
    --color-text-faint:       #5e5848;
    --color-text-inverse:     #1a1714;
    --color-primary:        #e88050;
    --color-primary-hover:  #d06838;
    --color-primary-active: #b85528;
    --color-primary-highlight: #3d2e24;
    --color-secondary:      #5aadad;
    --color-secondary-hover:#3d9494;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
  }
}

/* ========================================
   GLOBAL STYLES
   ======================================== */

body {
  font-family: var(--font-body);
  overflow-x: hidden;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-interactive);
}
a:hover {
  color: var(--color-primary-hover);
}

/* ========================================
   HEADER / NAV
   ======================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: var(--space-4) var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: oklch(from var(--color-bg) l c h / 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header--scrolled {
  box-shadow: var(--shadow-sm);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}

.logo svg {
  width: 40px;
  height: 40px;
}

.logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  transition: color var(--transition-interactive),
              background var(--transition-interactive);
}
.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-offset);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    oklch(from var(--color-bg) l c h / 0.3) 0%,
    oklch(from var(--color-bg) l c h / 0.15) 30%,
    oklch(from var(--color-bg) l c h / 0.4) 70%,
    var(--color-bg) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: var(--space-8);
  max-width: var(--content-default);
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 400;
  color: #fff;
  text-shadow: 0 2px 20px oklch(0 0 0 / 0.4), 0 1px 4px oklch(0 0 0 / 0.3);
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

.hero-tagline {
  font-size: var(--text-lg);
  color: oklch(0.95 0.01 60);
  text-shadow: 0 1px 8px oklch(0 0 0 / 0.4);
  margin-bottom: var(--space-8);
  font-weight: 300;
  max-width: 50ch;
  margin-inline: auto;
}

.hero-links {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: transform var(--transition-interactive),
              box-shadow var(--transition-interactive),
              background var(--transition-interactive),
              color var(--transition-interactive);
}

.hero-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.hero-link:active {
  transform: translateY(0);
}

.hero-link--primary {
  background: var(--color-primary);
  color: #fff;
}
.hero-link--primary:hover {
  background: var(--color-primary-hover);
  color: #fff;
}

.hero-link--secondary {
  background: oklch(1 0 0 / 0.15);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid oklch(1 0 0 / 0.2);
}
.hero-link--secondary:hover {
  background: oklch(1 0 0 / 0.25);
  color: #fff;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: oklch(1 0 0 / 0.6);
  animation: float 2.5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ========================================
   MUSIC SECTION
   ======================================== */

.music-section {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) var(--space-6);
  background: var(--color-bg);
}

.music-section-inner {
  max-width: var(--content-default);
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-10);
  max-width: 55ch;
}

.spotify-embed {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.spotify-embed iframe {
  display: block;
  border: none;
}

/* Album grid */
.albums-label {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 500;
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-4);
}

.album-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-align: center;
  border: 1px solid oklch(from var(--color-border) l c h / 0.5);
  transition: transform var(--transition-interactive),
              box-shadow var(--transition-interactive);
}
.album-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.album-card:active {
  transform: translateY(0);
}

.album-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-primary-highlight);
  display: grid;
  place-items: center;
  color: var(--color-primary);
}

.album-name {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.3;
}

.album-tracks {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* ========================================
   FOOTER
   ======================================== */

.site-footer {
  padding: var(--space-12) var(--space-6) var(--space-8);
  background: var(--color-surface-offset);
  text-align: center;
}

.footer-inner {
  max-width: var(--content-default);
  margin: 0 auto;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  color: var(--color-text);
  text-decoration: none;
}

.footer-logo svg {
  width: 32px;
  height: 32px;
}

.footer-logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
}

.social-links {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
  list-style: none;
}

.social-link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-border) l c h / 0.5);
  text-decoration: none;
  transition: color var(--transition-interactive),
              background var(--transition-interactive),
              transform var(--transition-interactive);
}
.social-link:hover {
  color: var(--color-primary);
  background: var(--color-primary-highlight);
  transform: translateY(-2px);
}
.social-link:active {
  transform: translateY(0);
}

.footer-divider {
  width: 60px;
  height: 1px;
  background: var(--color-divider);
  margin: 0 auto var(--space-6);
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-bottom: var(--space-2);
  text-align: center;
  max-width: 100%;
  width: 100%;
  margin-inline: auto;
}

.footer-copy a {
  color: var(--color-text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-copy a:hover {
  color: var(--color-primary);
}

.footer-attribution {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.footer-attribution a {
  color: var(--color-text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-attribution a:hover {
  color: var(--color-primary);
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */

.fade-in {
  opacity: 1;
}

@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 100%;
  }
}

@keyframes reveal-fade {
  to { opacity: 1; }
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 640px) {
  .site-header {
    padding: var(--space-3) var(--space-4);
  }

  .logo-text {
    font-size: var(--text-sm);
  }

  .hero-content {
    padding: var(--space-6) var(--space-4);
  }

  .hero-links {
    flex-direction: column;
    align-items: center;
  }

  .hero-link {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .album-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }

  .album-card {
    padding: var(--space-3);
  }
}
