:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #62676f;
  --line: #dce1e6;
  --paper: #fbfaf7;
  --panel: #ffffff;
  --charcoal: #1f2933;
  --green: #1f7a5a;
  --blue: #2767a8;
  --rose: #a84659;
  --amber: #b86e18;
  --shadow: 0 24px 70px rgba(31, 41, 51, 0.12);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 16px clamp(18px, 5vw, 72px);
  background: rgba(251, 250, 247, 0.88);
  border-bottom: 1px solid rgba(220, 225, 230, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--charcoal);
  color: #fff;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  min-height: 40px;
  padding: 10px 13px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
}

.site-nav a:hover {
  background: #ece9e2;
  color: var(--ink);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.section,
.section-band {
  padding: clamp(56px, 8vw, 112px) clamp(18px, 5vw, 72px);
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100vh - 72px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero-photo {
  background:
    linear-gradient(90deg, rgba(2, 5, 10, 1) 0%, rgba(2, 5, 10, 0.98) 34%, rgba(2, 5, 10, 0.62) 56%, rgba(2, 5, 10, 0.18) 78%),
    linear-gradient(0deg, rgba(2, 5, 10, 0.76) 0%, rgba(2, 5, 10, 0) 30%),
    url("./assets/james-yuan-piano.jpg") right center / cover no-repeat;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding-top: clamp(80px, 12vh, 148px);
  padding-bottom: clamp(76px, 14vh, 160px);
  color: #fff;
}

.hero-photo .eyebrow {
  color: #9fd7c0;
}

.hero-photo h1 {
  max-width: 9ch;
  text-shadow: 0 18px 50px rgba(0, 0, 0, 0.48);
}

.hero-photo .hero-text {
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.42);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.02;
}

h1 {
  font-size: clamp(4rem, 15vw, 8.6rem);
  max-width: 8ch;
}

h2 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}

h3 {
  font-size: 1.35rem;
}

p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-text {
  max-width: 600px;
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 18px;
  border: 1px solid var(--charcoal);
  border-radius: 8px;
  font-weight: 750;
  text-decoration: none;
}

.button.primary {
  background: var(--charcoal);
  color: #fff;
}

.button.secondary {
  background: transparent;
}

.hero-photo .button.primary {
  border-color: #ffffff;
  background: #ffffff;
  color: #111418;
}

.hero-photo .button.secondary {
  border-color: rgba(255, 255, 255, 0.72);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.music-club-section {
  background: #f4f7f1;
  border-bottom: 1px solid var(--line);
}

.music-story {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: end;
}

.music-story-copy {
  margin-bottom: 0;
}

.club-lede {
  color: var(--charcoal);
  font-size: clamp(1.12rem, 2vw, 1.4rem);
  font-weight: 650;
  line-height: 1.55;
}

.club-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.club-points span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 8px 11px;
  border: 1px solid #ced8ce;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--charcoal);
  font-size: 0.86rem;
  font-weight: 800;
}

.club-feature {
  margin: 0;
}

.club-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(31, 41, 51, 0.2);
  border-radius: 8px;
  background: #111418;
  box-shadow: var(--shadow);
}

.club-feature figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.club-gallery {
  display: grid;
  grid-auto-flow: dense;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: clamp(36px, 6vw, 72px);
}

.club-photo {
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(31, 41, 51, 0.12);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(31, 41, 51, 0.08);
}

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

.club-photo.wide {
  grid-column: span 2;
}

.club-photo.wide img {
  aspect-ratio: 16 / 9;
}

.club-photo.tall {
  grid-row: span 2;
}

.club-photo.tall img {
  aspect-ratio: 3 / 4;
}

.research-hero {
  position: relative;
  display: flex;
  align-items: end;
  min-height: min(720px, calc(100vh - 72px));
  overflow: hidden;
  border-bottom: 1px solid rgba(31, 41, 51, 0.24);
  background:
    linear-gradient(90deg, rgba(6, 8, 11, 0.98) 0%, rgba(6, 8, 11, 0.82) 44%, rgba(6, 8, 11, 0.18) 100%),
    linear-gradient(0deg, rgba(6, 8, 11, 0.92) 0%, rgba(6, 8, 11, 0) 34%),
    url("./assets/james-yuan-piano.jpg") right center / cover no-repeat;
}

.research-hero-copy {
  max-width: 840px;
  color: #fff;
}

.research-hero-copy .eyebrow {
  color: #9fd7c0;
}

.research-hero-copy h1 {
  max-width: 11ch;
  font-size: clamp(3.4rem, 9vw, 7rem);
}

.research-hero-copy p:last-child {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.research-overview {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  background: #fbfaf7;
}

.research-lede {
  display: grid;
  gap: 18px;
}

.research-lede p {
  margin: 0;
  color: var(--charcoal);
  font-size: clamp(1.1rem, 2vw, 1.36rem);
  line-height: 1.65;
}

.brain-map-section {
  background: #eef3f7;
}

.brain-map-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.brain-card,
.evidence-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(31, 41, 51, 0.06);
}

.brain-card {
  min-height: 300px;
  padding: 22px;
}

.brain-card span {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 850;
}

.research-split {
  background: #f4f7f1;
}

.question-list {
  display: grid;
  gap: 16px;
}

.evidence-section {
  background: #fbfaf7;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.evidence-item {
  padding: 22px;
}

.research-note {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  background: var(--charcoal);
}

.research-note h2,
.research-note p {
  color: #fff;
}

.research-note > p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.08rem, 2vw, 1.32rem);
}

.sources-section {
  background: #eef3f0;
}

.source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.source-list a {
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--blue);
  font-weight: 750;
  line-height: 1.4;
  text-decoration: none;
}

.source-list a:hover {
  background: #f8fbfd;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.app-card,
.post-card,
.media-card,
.support-card,
.link-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(31, 41, 51, 0.06);
}

.app-card {
  display: flex;
  flex-direction: column;
  min-height: 430px;
  padding: 22px;
}

.app-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  border-radius: 15px;
  color: #fff;
  font-size: 1.8rem;
  font-weight: 850;
}

.accent-green .app-icon {
  background: var(--green);
}

.accent-blue .app-icon {
  background: var(--blue);
}

.accent-rose .app-icon {
  background: var(--rose);
}

.card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.app-card ul {
  display: grid;
  gap: 8px;
  margin: auto 0 24px;
  padding-left: 18px;
  color: var(--muted);
}

.text-link {
  color: var(--blue);
  font-weight: 750;
  text-decoration: none;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(28px, 5vw, 72px);
  background: #eef3f0;
}

.sticky-heading {
  position: sticky;
  top: 104px;
  align-self: start;
}

.post-list {
  display: grid;
  gap: 16px;
}

.post-card {
  padding: 24px;
}

.post-card > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.tag {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #edf0f2;
  color: var(--charcoal);
  font-size: 0.78rem;
  font-weight: 800;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.media-card {
  overflow: hidden;
}

.media-art {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: #fff;
  font-size: 2.1rem;
}

.media-art span {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.media-card > div:last-child {
  padding: 18px;
}

.media-portrait .media-art {
  background:
    radial-gradient(circle at 50% 32%, #f5c7a7 0 12%, transparent 13%),
    linear-gradient(150deg, #51677a, #d9c6bb);
}

.media-video .media-art {
  background: linear-gradient(135deg, #1f2933, #2767a8 48%, #d6e6ef);
}

.media-studio .media-art {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.18) 0 10px, transparent 10px 20px),
    linear-gradient(135deg, #1f7a5a, #f1dfbf);
}

.media-clip .media-art {
  background: linear-gradient(135deg, #a84659, #f0c987 58%, #eef3f0);
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 32px;
  align-items: center;
  border-top: 1px solid var(--line);
}

.link-panel {
  display: grid;
  padding: 12px;
}

.link-panel a {
  min-height: 48px;
  padding: 14px;
  border-radius: 8px;
  color: var(--blue);
  font-weight: 750;
  text-decoration: none;
}

.link-panel a:hover {
  background: #eef3f7;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 28px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.legal-page {
  min-height: calc(100vh - 132px);
}

.legal-hero {
  padding: clamp(56px, 8vw, 96px) clamp(18px, 5vw, 72px) 28px;
}

.legal-content,
.support-grid {
  max-width: 980px;
  padding: 0 clamp(18px, 5vw, 72px) clamp(64px, 8vw, 112px);
}

.legal-content h2 {
  margin-top: 34px;
  font-size: 1.4rem;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.support-card {
  padding: 22px;
}

.support-card h2 {
  font-size: 1.3rem;
}

@media (max-width: 980px) {
  .split-section,
  .music-story,
  .research-overview,
  .research-note,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-photo {
    min-height: calc(100vh - 64px);
    background:
      linear-gradient(90deg, rgba(2, 5, 10, 0.88) 0%, rgba(2, 5, 10, 0.56) 54%, rgba(2, 5, 10, 0.2) 100%),
      linear-gradient(0deg, rgba(2, 5, 10, 0.8) 0%, rgba(2, 5, 10, 0) 34%),
      url("./assets/james-yuan-piano.jpg") 58% center / cover no-repeat;
  }

  .app-grid,
  .brain-map-grid,
  .club-gallery,
  .evidence-grid,
  .media-grid,
  .source-list,
  .support-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sticky-heading {
    position: static;
  }
}

@media (max-width: 680px) {
  .site-header {
    min-height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav:not(.static-nav) {
    position: absolute;
    top: 64px;
    right: 18px;
    left: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .static-nav {
    gap: 2px;
  }

  .static-nav a {
    padding: 9px 8px;
    font-size: 0.85rem;
  }

  h1 {
    font-size: clamp(3.7rem, 21vw, 6rem);
  }

  .hero-copy {
    padding-top: clamp(86px, 18vh, 150px);
    padding-bottom: clamp(80px, 18vh, 150px);
  }

  .hero-photo {
    background:
      linear-gradient(90deg, rgba(2, 5, 10, 0.92) 0%, rgba(2, 5, 10, 0.72) 58%, rgba(2, 5, 10, 0.26) 100%),
      linear-gradient(0deg, rgba(2, 5, 10, 0.84) 0%, rgba(2, 5, 10, 0) 36%),
      url("./assets/james-yuan-piano.jpg") 63% center / cover no-repeat;
  }

  .research-hero {
    min-height: calc(100vh - 64px);
    background:
      linear-gradient(90deg, rgba(6, 8, 11, 0.96) 0%, rgba(6, 8, 11, 0.72) 62%, rgba(6, 8, 11, 0.28) 100%),
      linear-gradient(0deg, rgba(6, 8, 11, 0.88) 0%, rgba(6, 8, 11, 0) 38%),
      url("./assets/james-yuan-piano.jpg") 62% center / cover no-repeat;
  }

  .app-grid,
  .brain-map-grid,
  .club-gallery,
  .evidence-grid,
  .media-grid,
  .source-list,
  .support-grid {
    grid-template-columns: 1fr;
  }

  .club-photo.wide,
  .club-photo.tall {
    grid-column: auto;
    grid-row: auto;
  }

  .club-photo img,
  .club-photo.wide img,
  .club-photo.tall img {
    aspect-ratio: 4 / 3;
  }

  .app-card {
    min-height: 0;
  }
}
