:root {
  --color-surface: #fbf9f8;
  --color-on-surface: #1b1c1c;
  --color-on-surface-variant: #43474e;
  --color-secondary: #556067;
  --color-primary: #0056b3;
  --color-primary-container: #cce5ff;
  --color-accent-warm: #dcb67d;
  --color-outline-variant: #c3c6cf;

  --font-display: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;

  --section-padding-sm: 64px;
  --section-padding-lg: 120px;
  --gutter: 32px;
  --container-max: 1040px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-bottom: 96px; /* deja espacio para el reproductor fijo */
  background: var(--color-surface);
  color: var(--color-on-surface);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

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

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

.hero {
  position: relative;
  width: 100%;
  height: 60vh;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 3s ease-in-out;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(251, 249, 248, 0) 0%, rgba(251, 249, 248, 0.25) 60%, var(--color-surface) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 var(--gutter) var(--section-padding-sm);
}

.portrait {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--color-surface);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  margin-bottom: 32px;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content h1 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 40px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-primary);
  text-shadow: 0 0 4px var(--color-surface), 0 0 10px var(--color-surface);
}

.dates {
  margin: 0;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-on-surface-variant);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.divider {
  width: 64px;
  height: 2px;
  margin: 24px auto 0;
  border: 0;
  background: var(--color-accent-warm);
  opacity: 0.8;
}

/* ---------- Biografía ---------- */

.biography {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--section-padding-sm) var(--gutter);
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.biography-text h2 {
  margin: 0 0 32px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 28px;
  color: var(--color-primary);
}

.biography-text p {
  margin: 0 0 24px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-on-surface);
}

.biography-text p:last-child {
  margin-bottom: 0;
}

.biography-photo {
  order: -1;
}

.biography-photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  padding: 8px;
  background: var(--color-surface);
  border: 1px solid rgba(195, 198, 207, 0.3);
  border-radius: 2px;
}

/* ---------- Dedicatoria ---------- */

.dedication {
  padding: var(--section-padding-sm) var(--gutter);
  background: var(--color-primary-container);
  display: flex;
  justify-content: center;
  text-align: center;
}

.dedication-inner {
  position: relative;
  max-width: 720px;
}

.quote-icon {
  position: absolute;
  top: -56px;
  left: -24px;
  width: 96px;
  height: 96px;
  fill: var(--color-accent-warm);
  opacity: 0.4;
}

.dedication blockquote {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.5;
  color: var(--color-primary);
}

.dedication-label {
  margin: 32px 0 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-warm);
}

/* ---------- Reproductor de música ---------- */

.audio-player {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  background: rgba(251, 249, 248, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(195, 198, 207, 0.4);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.audio-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  color: var(--color-primary);
  cursor: pointer;
  border-radius: 50%;
}

.audio-btn--mute {
  color: var(--color-secondary);
}

.audio-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.audio-btn--play svg {
  width: 28px;
  height: 28px;
}

.audio-info {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 120px;
}

.track-toggle {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.audio-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-warm);
}

.audio-track {
  font-size: 10px;
  color: rgba(67, 71, 78, 0.7);
}

.track-list {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  min-width: 170px;
  max-height: 220px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: rgba(251, 249, 248, 0.97);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(195, 198, 207, 0.4);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.track-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  color: var(--color-on-surface);
  cursor: pointer;
  border-radius: 8px;
}

.track-item:hover {
  background: rgba(0, 86, 179, 0.08);
}

.track-item.is-active {
  color: var(--color-primary);
  font-weight: 600;
}

/* ---------- Escritorio ---------- */

@media (min-width: 768px) {
  .hero {
    height: 70vh;
  }

  .portrait {
    width: 224px;
    height: 224px;
    border-width: 4px;
    margin-bottom: 40px;
  }

  .hero-content h1 {
    font-size: 64px;
    text-shadow: 0 0 6px var(--color-surface), 0 0 14px var(--color-surface);
  }

  .biography {
    grid-template-columns: 5fr 3fr;
    gap: 64px;
    padding: var(--section-padding-lg) var(--gutter);
  }

  .biography-photo {
    order: 0;
  }

  .dedication {
    padding: var(--section-padding-lg) var(--gutter);
  }

  .dedication blockquote {
    font-size: 32px;
  }
}
