:root {
  --bg: #FAF9F7;
  --bg-soft: #F3EEE7;
  --text-main: #222222;
  --text-muted: #555555;
  --accent: #C9A86A;
  --accent-dark: #A98C55;
  --border-subtle: rgba(0, 0, 0, 0.08);

  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 18px 32px rgba(0, 0, 0, 0.12);
}

/* RESET */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.7;
}

img {
  max-width: 100%;
  display: block;
}

/* LAYOUT GENERIC */

.container {
  width: min(1120px, 100% - 3rem);
  margin-inline: auto;
}

.section {
  padding: 6rem 0;
}

.section-soft {
  background: var(--bg-soft);
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-intro {
  margin-top: 0.7rem;
  max-width: 700px;
  color: var(--text-muted);
  font-size: 0.98rem;
  font-style: italic;
}

/* About intro a ancho completo */
#about .section-intro {
  max-width: 100%;
}

/* HEADINGS */

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  letter-spacing: 0.01em;
}

h2 {
  font-size: 2rem;
}

/* HEADER */

.main-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 249, 247, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--accent);
  background: white;
}

.brand-name {
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.3rem;
  font-size: 0.9rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-main);
  position: relative;
}

/* subrayado solo para enlaces “normales” */
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

/* Let’s talk como botón, sin rayita */
.main-nav a.btn-nav::after {
  display: none;
}

.btn-nav {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent-dark);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease, transform 0.15s ease;
}

.btn-nav:hover {
  background: rgba(201, 168, 106, 0.12);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.btn-nav:active {
  background: var(--accent);
  color: #fff;
  box-shadow: none;
  transform: translateY(0);
}

/* MOBILE NAV */

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 0.3rem;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: var(--text-main);
}

/* HERO */

.hero {
  position: relative;
  padding: 6rem 0 5rem;
  overflow: hidden;
}

.hero-bg-accent {
  position: absolute;
  inset: -120px auto auto 40%;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 168, 106, 0.25), transparent 60%);
  opacity: 0.9;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.1fr);
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 3vw + 1.4rem, 3.3rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.accent-underline {
  position: relative;
  display: inline-block;
}

.accent-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
}

.hero-subtitle {
  max-width: 560px;
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 0.7rem;
  text-align: justify;
}

.hero-roles {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease,
    box-shadow 0.15s ease, border 0.15s ease;
}

.btn.primary {
  background: var(--accent);
  color: white;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}

.btn.primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.btn.ghost {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: transparent;
}

.btn.ghost:hover {
  background: rgba(201, 168, 106, 0.12);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2.2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stat-number {
  display: block;
  font-weight: 600;
  color: var(--text-main);
}

.stat-label {
  display: block;
}

.hero-photo {
  display: flex;
  justify-content: flex-end;
}

.photo-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: white;
  box-shadow: var(--shadow-soft);
}

.photo-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.photo-chip {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  background: rgba(250, 249, 247, 0.9);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.floating-tag {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  max-width: 130px;
}

.floating-tag span {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.72rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* ABOUT */

#about p {
  text-align: justify;
  color: var(--text-main);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr);
  gap: 2.5rem;
  align-items: flex-start;
}

.about-text-only p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 1.1rem;
}

.about-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}

.about-pill {
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 168, 106, 0.35);
  background: rgba(201, 168, 106, 0.06);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

/* aparición escalonada de los chips */
#about.is-visible .about-pill {
  opacity: 1;
  transform: translateY(0);
}
#about.is-visible .about-pill:nth-child(2) { transition-delay: 0.05s; }
#about.is-visible .about-pill:nth-child(3) { transition-delay: 0.10s; }
#about.is-visible .about-pill:nth-child(4) { transition-delay: 0.15s; }

.about-highlight {
  position: relative;
  padding-left: 1.3rem;
  margin-bottom: 1.5rem;
}

.about-highlight::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2rem;
  bottom: 0.2rem;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.about-highlight p {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.15rem;
  color: var(--accent-dark);
}

/* animación de la línea vertical */
#about.is-visible .about-highlight::before {
  opacity: 1;
  transform: translateY(0);
}

/* TIMELINE ABOUT */

.about-timeline-column {
  position: relative;
}

.timeline-academic {
  position: relative;
  margin-top: 0.4rem;
  padding-left: 1.4rem;
}

.timeline-line {
  position: absolute;
  left: 6px;
  top: 0.3rem;
  bottom: 0.3rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), rgba(201, 168, 106, 0.15));
  overflow: hidden;
}

.timeline-line::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 0;
  background: inherit;
}

/* la línea “crece” cuando ABOUT entra en vista */
#about.is-visible .timeline-line::before {
  animation: growLine 0.9s ease forwards;
}

.timeline-events {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.9rem;
  margin-bottom: 1.4rem;
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* aparición escalonada */
#about.is-visible .timeline-item {
  opacity: 1;
  transform: translateX(0);
}
#about.is-visible .timeline-item:nth-child(2) { transition-delay: 0.05s; }
#about.is-visible .timeline-item:nth-child(3) { transition-delay: 0.10s; }
#about.is-visible .timeline-item:nth-child(4) { transition-delay: 0.15s; }
#about.is-visible .timeline-item:nth-child(5) { transition-delay: 0.20s; }
#about.is-visible .timeline-item:nth-child(6) { transition-delay: 0.25s; }
#about.is-visible .timeline-item:nth-child(7) { transition-delay: 0.30s; }
#about.is-visible .timeline-item:nth-child(8) { transition-delay: 0.35s; }
#about.is-visible .timeline-item:nth-child(9) { transition-delay: 0.40s; }

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  background: #fff;
  margin-top: 0.3rem;
  box-shadow: 0 0 0 4px rgba(201, 168, 106, 0.16);
}

.timeline-content {
  padding-bottom: 0.3rem;
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.15rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.timeline-year {
  font-weight: 500;
}

.timeline-tag {
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 168, 106, 0.4);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-dark);
  background: rgba(201, 168, 106, 0.06);
}

.timeline-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.05rem;
  margin-bottom: 0.1rem;
  color: var(--text-main);
}

.timeline-desc {
  font-size: 0.87rem;
  color: var(--text-muted);
}

@keyframes growLine {
  from { height: 0; }
  to   { height: 100%; }
}

/* PROJECTS */

#projects {
  background: var(--bg);
}

.projects-wrapper {
  max-width: 900px;
  margin-inline: auto;
}

.projects-subtitle {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin: 1rem 0 0.4rem;
}

/* GRID */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.3rem;
  margin-bottom: 1rem;
}

/* CARDS */
.project-card {
  background: #fafafa;
  border-radius: var(--radius-md);
  padding: 1rem;
  text-decoration: none;
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.project-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  filter: grayscale(1);
  transition: filter 0.4s ease, transform 0.4s ease;
}

.project-card:hover img {
  filter: grayscale(0);
  transform: scale(1.03);
}

/* GALLERY */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.4rem;
}

.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: white;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item figcaption {
  padding: 0.9rem 1rem 1.1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* TABS – Awards */

.tabs {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  padding: 1.6rem 1.7rem 1.9rem;
}

.tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1.4rem;
}

.tab-btn {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #f5f1ea;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--text-muted);
}

.tab-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.tab-panels {
  margin-top: 0.4rem;
  text-align: justify;
}

.tab-panel {
  display: none;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.tab-panel.active {
  display: block;
}

.subheading-inline {
  margin-top: 1.1rem;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Lists genéricas */

.bullet-list {
  margin-top: 0.6rem;
  padding-left: 1.2rem;
}

.bullet-list li {
  margin-bottom: 0.4rem;
}

/* CONTACT */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}

.contact-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.7rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  font-size: 0.95rem;
}

.contact-label {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.6rem;
}

.contact-card a {
  display: block;
  margin-top: 0.25rem;
  color: var(--accent-dark);
  text-decoration: none;
  font-size: 0.96rem;
}

.contact-card a:hover {
  text-decoration: underline;
}

.contact-note {
  margin-top: 1.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* FOOTER */

.footer {
  border-top: 1px solid var(--border-subtle);
  background: #f0e8dd;
  padding: 1.7rem 0 2.1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-tagline {
  opacity: 0.8;
}

/* ANIMACIÓN REVEAL */

[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* RESPONSIVE */

@media (min-width: 900px) {
  .eyebrow,
  .hero-roles {
    white-space: nowrap;
  }
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-photo {
    order: -1;
    justify-content: center;
  }

  .about-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-timeline-column {
    margin-top: 1.8rem;
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 780px) {
  .main-nav {
    position: absolute;
    inset: 60px 1.5rem auto;
    background: white;
    padding: 1rem 1.3rem;
    border-radius: 18px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  .main-nav.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-toggle {
    display: flex;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 4.5rem 0;
  }
}
