/* ── Reset & base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #e8e3db;
  --card-bg:   #f0ece5;
  --text:      #1a1a18;
  --text-muted:#4a4a46;
  --radius:    20px;
  --font:      'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Nav ─────────────────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
}

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 450;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.nav-links a:hover { opacity: 1; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-icon-link {
  display: flex;
  align-items: center;
  color: var(--text);
  opacity: 0.7;
  transition: opacity 0.2s;
}

.nav-icon-link:hover { opacity: 1; }

.nav-cta {
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  border: 1.5px solid var(--text);
  border-radius: 999px;
  padding: 8px 20px;
  transition: background 0.2s, color 0.2s;
}

.nav-cta:hover {
  background: var(--text);
  color: var(--bg);
}

/* ── Hero wrapper ────────────────────────────────────────────── */
.hero-wrapper {
  padding: 24px 48px 0;
}

.hero-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 72px 80px 72px 80px;
  min-height: 600px;
}

/* ── Hero text ───────────────────────────────────────────────── */
.hero-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero-text h1 {
  font-size: clamp(36px, 4.5vw, 58px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-text h1 em {
  font-size: 0.5em;
  font-weight: 400;
  color: var(--text-muted);
  opacity: 0.7;
  letter-spacing: 0;
}

.hero-pronoun {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-muted);
  opacity: 0.7;
  margin-top: -22px;
}

.hero-divider {
  border: none;
  border-top: 1.5px solid rgba(26,26,24,0.2);
  width: 70%;
}

.hero-bio {
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 520px;
  text-align: justify;
}

/* ── Hero photo ──────────────────────────────────────────────── */
.hero-photo-wrap {
  flex: 0 0 auto;
  width: min(38%, 460px);
}

.hero-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  border-radius: 16px;
  display: block;
}

/* ── Projects Section ────────────────────────────────────────── */
.projects-section {
  padding: 64px 12% 0;
}

.section-title {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 400;
  text-align: center;
  letter-spacing: -0.02em;
  margin-bottom: 64px;
  position: sticky;
  top: 58px;
  z-index: 10;
  background: var(--bg);
  padding: 16px 0;
}

.projects-stack {
  position: relative;
  padding-bottom: 0;
}

/* ── Card spacer (creates scroll distance between sticky cards) ── */
.card-spacer {
  height: 400px;
}

.project-card {
  position: sticky;
  top: 140px;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid rgba(26,26,24,0.08);
  box-shadow: 0 4px 28px rgba(0,0,0,0.07);
  display: flex;
  overflow: hidden;
  min-height: 620px;
}

article.project-card:nth-of-type(1) { z-index: 1; }
article.project-card:nth-of-type(2) { z-index: 2; }
article.project-card:nth-of-type(3) { z-index: 3; }
article.project-card:nth-of-type(4) { z-index: 4; }

/* ── Project info (left — 55%) ────────────────────────────────── */
.project-info {
  flex: 0 0 55%;
  padding: 24px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

.info-top {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.info-bottom {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-name {
  font-size: clamp(25.5px, 2.4vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.project-desc {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-muted);
  text-align: justify;
}

.project-goal {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-muted);
  text-align: justify;
  padding-left: 14px;
  border-left: 2px solid rgba(26,26,24,0.18);
}

.goal-label {
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-right: 6px;
}

/* ── Tags ─────────────────────────────────────────────────────── */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 4px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(26,26,24,0.07);
  border-radius: 999px;
  padding: 5px 12px;
}

.tag::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot, #888);
  flex-shrink: 0;
}

/* ── View project link ────────────────────────────────────────── */
.project-link {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  opacity: 0.75;
  line-height: 1.5;
  transition: opacity 0.2s;
  width: fit-content;
}

.project-link:hover { opacity: 1; }

/* ── Project actions row ──────────────────────────────────────── */
.project-actions {
  display: flex;
  align-items: center;
  gap: 28px;
}

.collab-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  opacity: 0.75;
  cursor: pointer;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 3px;
  vertical-align: baseline;
  transition: opacity 0.2s;
}

.collab-btn:hover { opacity: 1; }

/* ── Collaborators Modal ──────────────────────────────────────── */
.collab-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,26,24,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.collab-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.collab-modal {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 40px 44px;
  width: 100%;
  max-width: 360px;
  position: relative;
  transform: translateY(12px);
  transition: transform 0.2s ease;
}

.collab-overlay.is-open .collab-modal {
  transform: translateY(0);
}

.collab-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 8px;
  transition: color 0.2s;
}

.collab-close:hover { color: var(--text); }

.collab-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

.collab-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.collab-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 450;
  padding: 9px 12px;
  border-radius: 10px;
  transition: background 0.15s;
}

.collab-list a:hover {
  background: rgba(26,26,24,0.06);
}

.collab-list a svg {
  flex-shrink: 0;
  opacity: 0.5;
}

/* ── Project media (right — 45%) ─────────────────────────────── */
.project-media {
  flex: 0 0 45%;
  overflow: hidden;
  align-self: stretch;
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Carousel ─────────────────────────────────────────────────── */
.carousel {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  height: 100%;
  will-change: transform;
  transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--card-bg);
}

.carousel-slide img {
  max-width: 100%;
  max-height: 600px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 12px;
}

/* ── Shift-left: cards 2 & 3 — same total padding (48px), redistributed */
.media--left .carousel-slide {
  padding: 24px 40px 24px 8px;
}

/* ── Projects CTA ─────────────────────────────────────────────── */
.projects-cta {
  text-align: center;
  padding-top: 56px;
}

.cta-btn {
  display: inline-block;
  text-decoration: none;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  padding: 13px 30px;
  border-radius: 999px;
  transition: opacity 0.2s;
}

.cta-btn:hover { opacity: 0.82; }

/* ── Reviews Section ─────────────────────────────────────────── */
.reviews-section {
  padding: 80px 12% 32px;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.review-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid rgba(26,26,24,0.08);
  box-shadow: 0 4px 28px rgba(0,0,0,0.07);
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.review-text {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-muted);
  flex: 1;
}

.review-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}

.review-byline {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.review-title {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ── Discovery Mode Modal ────────────────────────────────────── */
.dm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,26,24,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.dm-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.dm-modal {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 48px;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(16px);
  transition: transform 0.25s ease;
}

.dm-overlay.is-open .dm-modal {
  transform: translateY(0);
}

.dm-close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 8px;
  transition: color 0.2s;
}

.dm-close:hover { color: var(--text); }

.dm-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.dm-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.dm-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dm-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid rgba(26,26,24,0.18);
  border-radius: 12px;
  background: var(--bg);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  resize: none;
  outline: none;
  transition: border-color 0.2s;
}

.dm-textarea:focus { border-color: rgba(26,26,24,0.45); }
.dm-textarea::placeholder { color: var(--text-muted); opacity: 0.7; }

.dm-submit {
  align-self: flex-end;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 999px;
  padding: 11px 26px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}

.dm-submit:hover { opacity: 0.82; }
.dm-submit:disabled { opacity: 0.45; cursor: not-allowed; }

.dm-results { margin-top: 32px; }

.dm-loading {
  text-align: center;
  padding: 28px 0;
  font-size: 14px;
  color: var(--text-muted);
}

.dm-summary {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(26,26,24,0.1);
}

.dm-rec-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dm-rec {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.dm-rec-art {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.dm-rec-art-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: rgba(26,26,24,0.08);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-muted);
}

.dm-rec-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dm-rec-song {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.dm-rec-artist {
  font-size: 13px;
  color: var(--text-muted);
}

.dm-rec-why {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 4px;
}

.dm-rec-spotify {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #1DB954;
  text-decoration: none;
  transition: opacity 0.2s;
}

.dm-rec-spotify:hover { opacity: 0.75; }

.dm-more {
  margin-top: 24px;
  text-align: center;
}

.dm-more-btn {
  background: none;
  border: 1.5px solid var(--text);
  border-radius: 999px;
  padding: 9px 22px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.dm-more-btn:hover { background: var(--text); color: var(--bg); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav { padding: 16px 24px; }
  .hero-wrapper { padding: 16px 16px 60px; }

  .hero-card {
    flex-direction: column-reverse;
    padding: 40px 28px;
    gap: 32px;
  }

  .hero-photo-wrap { width: 100%; }
  .hero-divider { width: 100%; }

  .projects-section { padding: 60px 16px 80px; }

  .card-spacer { display: none; }

  .projects-stack { padding-bottom: 40px; }

  .project-card {
    position: relative !important;
    top: auto !important;
    flex-direction: column;
    height: auto !important;
    margin-bottom: 20px;
  }

  .project-media {
    flex: none;
    max-width: 100%;
    height: 220px;
  }

  .project-info { padding: 32px 24px; }

  .reviews-section { padding: 60px 16px 80px; }
  .reviews-grid { grid-template-columns: 1fr; }
}
