/* ============================================================
   Matt Cullen — Film Composer
   Mobile-first stylesheet
   ============================================================ */

:root {
  --bg: #0e0f12;
  --bg-elevated: #16181d;
  --bg-card: #1c1f26;
  --border: #2a2e37;
  --text: #f4f2ec;
  --text-dim: #a9adb8;
  --text-faint: #6f7480;
  --accent: #c9a15a;
  --accent-bright: #e3bd7a;
  --accent-dim: #8a6f3f;
  --danger: #d97a6a;
  --success: #7ac98a;
  --radius: 10px;
  --max-width: 1080px;
  --header-h: 64px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--text-dim); }

a { color: var(--accent-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------- Header / Nav ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 15, 18, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.brand {
  font-family: "Fraunces", serif;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
}
.brand span { color: var(--accent); }
.brand:hover { text-decoration: none; }

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

.nav-links {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.nav-links.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-links a {
  color: var(--text-dim);
  padding: 14px 20px;
  font-size: 1rem;
  border-radius: 0;
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: var(--accent-bright);
  background: var(--bg-card);
  text-decoration: none;
}

@media (min-width: 760px) {
  .nav-toggle { display: none; }
  .nav-links {
    position: static;
    flex-direction: row;
    gap: 4px;
    background: none;
    border: none;
    padding: 0;
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a { padding: 8px 14px; border-radius: 6px; }
}

/* ---------------- Hero ---------------- */

.hero {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--border);
}
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.hero p.lead {
  font-size: 1.1rem;
  max-width: 62ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.btn:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: #201a0d;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-bright); border-color: var(--accent-bright); }

/* ---------------- Sections ---------------- */

section { padding: 56px 0; }
section.alt { background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { margin-bottom: 32px; }
.section-head .eyebrow { margin-bottom: 8px; }

/* ---------------- Updates timeline ---------------- */

.updates { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.update-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.update-item:last-child { border-bottom: none; padding-bottom: 0; }
.update-date {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.update-text { color: var(--text-dim); margin: 0; }

@media (min-width: 640px) {
  .update-item { grid-template-columns: 160px 1fr; gap: 20px; align-items: baseline; }
}

/* ---------------- Music / Player ---------------- */

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.project-card h3 { margin-bottom: 4px; }
.project-meta { color: var(--text-faint); font-size: 0.9rem; margin-bottom: 18px; }

.track-list { list-style: none; margin: 0; padding: 0; }
.track-group-label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 700;
  padding: 18px 8px 6px;
}
.track-group-label:first-child { padding-top: 4px; }
.track {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 8px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
}
.track:hover { background: rgba(255,255,255,0.03); }
.track.playing { border-color: var(--accent-dim); background: rgba(201,161,90,0.08); }

.track-play {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.track.playing .track-play { background: var(--accent); border-color: var(--accent); color: #201a0d; }
.track-play svg { width: 15px; height: 15px; }

.track-info { flex: 1 1 auto; min-width: 0; }
.track-title { font-weight: 600; font-size: 0.98rem; }
.track-sub { font-size: 0.82rem; color: var(--text-faint); }

.track-duration { flex: 0 0 auto; font-size: 0.82rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }

.track-progress {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
  display: none;
}
.track.playing .track-progress { display: block; }
.track-progress-fill { height: 100%; width: 0%; background: var(--accent); }

/* Sticky mini player */
.mini-player {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 200;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  display: none;
  align-items: center;
  gap: 14px;
  box-shadow: 0 -6px 24px rgba(0,0,0,0.4);
}
.mini-player.visible { display: flex; }
.mini-player .track-play { width: 40px; height: 40px; flex: 0 0 auto; }
.mini-player-info { flex: 1 1 auto; min-width: 0; }
.mini-player-title { font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-player-sub { font-size: 0.78rem; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-player-bar {
  flex: 0 0 auto;
  width: 90px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  display: none;
}
@media (min-width: 560px) {
  .mini-player-bar { display: block; }
  .mini-player-bar { width: 160px; }
}
.mini-player-bar-fill { height: 100%; width: 0%; background: var(--accent); }
body.has-mini-player { padding-bottom: 72px; }

.audio-note {
  font-size: 0.85rem;
  color: var(--text-faint);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 8px;
}

/* ---------------- Bio ---------------- */

.bio-layout { display: flex; flex-direction: column; gap: 28px; }
.bio-photo {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  background: linear-gradient(155deg, var(--bg-card), var(--bg-elevated));
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 0.85rem;
  text-align: center;
  padding: 20px;
}
.bio-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }

.credits-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 10px; }
.credits-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.95rem;
}
.credits-list li span:last-child { color: var(--text-faint); white-space: nowrap; }

@media (min-width: 760px) {
  .bio-layout { flex-direction: row; align-items: flex-start; }
  .bio-photo { flex: 0 0 260px; }
  .bio-content { flex: 1 1 auto; }
}

/* ---------------- Contact ---------------- */

.contact-form { display: grid; gap: 18px; max-width: 560px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 0.85rem; color: var(--text-dim); font-weight: 600; }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.field textarea { resize: vertical; min-height: 140px; }
.hp-field { position: absolute; left: -9999px; opacity: 0; }

.form-status { font-size: 0.9rem; padding: 12px 14px; border-radius: 8px; display: none; }
.form-status.show { display: block; }
.form-status.success { background: rgba(122,201,138,0.12); color: var(--success); border: 1px solid rgba(122,201,138,0.3); }
.form-status.error { background: rgba(217,122,106,0.12); color: var(--danger); border: 1px solid rgba(217,122,106,0.3); }

.contact-alt {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 0.92rem;
}

/* ---------------- Footer ---------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 40px;
  color: var(--text-faint);
  font-size: 0.85rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; }
.footer-links a { color: var(--text-faint); }
.footer-links a:hover { color: var(--accent-bright); }

/* ---------------- Misc ---------------- */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #201a0d;
  padding: 10px 16px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
