/* =============================================
   SANTIAGO PEREA — Personal Academic Website
   Nature-inspired, clean academic aesthetic
   ============================================= */

/* ── Color Palette ── */
:root {
  --forest-dark:   #1b4332;
  --forest-mid:    #2d6a4f;
  --forest-light:  #40916c;
  --forest-pale:   #74c69d;
  --forest-mist:   #d8f3dc;
  --warm-white:    #f8faf8;
  --text-dark:     #1a202c;
  --text-mid:      #4a5568;
  --text-light:    #718096;
  --border:        #e2e8f0;
  --card-shadow:   0 2px 12px rgba(27, 67, 50, 0.08);
  --card-hover:    0 6px 24px rgba(27, 67, 50, 0.16);
}

/* ── Global ── */
body {
  font-family: 'Source Serif 4', 'Georgia', serif;
  color: var(--text-dark);
  background-color: var(--warm-white);
  line-height: 1.75;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
  font-weight: 700;
  color: var(--forest-dark);
}

a {
  color: var(--forest-mid);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--forest-light);
  text-decoration: underline;
}

.quarto-title { display: none; }
.quarto-title-meta { display: none; }
h1.title { display: none; }

/* ── Navbar ── */
.navbar {
  background-color: var(--forest-dark) !important;
  padding: 0.6rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.navbar-brand {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  color: #fff !important;
}

.navbar-nav .nav-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.88) !important;
  margin: 0 4px;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.navbar-nav .nav-link:hover {
  background: rgba(255,255,255,0.12);
  color: #fff !important;
}

/* ── Hero / Profile Section ── */
.hero-section {
  padding: 60px 0 50px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 50px;
}

.profile-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--forest-pale);
  box-shadow: 0 4px 24px rgba(27, 67, 50, 0.2);
  display: block;
  margin: 0 auto 20px;
}

.profile-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--forest-mist), var(--forest-pale));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  border: 4px solid var(--forest-pale);
  box-shadow: 0 4px 24px rgba(27, 67, 50, 0.2);
  font-size: 4rem;
}

.hero-name {
  font-family: 'Inter', sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--forest-dark);
  margin-bottom: 4px;
  line-height: 1.2;
}

.hero-title {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--forest-mid);
  margin-bottom: 4px;
}

.hero-institution {
  font-size: 0.9rem;
  color: var(--text-mid);
  margin-bottom: 20px;
}

.hero-bio {
  font-size: 1rem;
  color: var(--text-mid);
  line-height: 1.8;
  max-width: 680px;
}

/* Social icon links */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
  justify-content: center;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--forest-dark);
  color: #fff !important;
  padding: 6px 14px;
  border-radius: 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none !important;
  transition: background 0.2s, transform 0.15s;
}

.social-btn:hover {
  background: var(--forest-light) !important;
  color: #fff !important;
  transform: translateY(-1px);
  text-decoration: none !important;
}

/* ── Section Headings ── */
.section-heading {
  font-family: 'Inter', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--forest-dark);
  margin-bottom: 8px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--forest-pale);
  display: inline-block;
}

.section-intro {
  color: var(--text-mid);
  font-size: 0.97rem;
  margin-bottom: 30px;
  max-width: 750px;
}

/* ── Interest Tags ── */
.interests-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.interest-tag {
  display: inline-block;
  background: var(--forest-mist);
  color: var(--forest-dark);
  border-radius: 20px;
  padding: 5px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(45, 106, 79, 0.2);
}

/* ── Education Cards ── */
.edu-item {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
  align-items: flex-start;
}

.edu-icon {
  color: var(--forest-pale);
  font-size: 1.2rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.edu-degree {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.edu-details {
  font-size: 0.87rem;
  color: var(--text-mid);
}

/* ── Research Cards ── */
.research-card {
  background: #fff;
  border-radius: 12px;
  padding: 28px 28px 24px;
  margin-bottom: 24px;
  border-left: 4px solid var(--forest-mid);
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}

.research-card:hover {
  box-shadow: var(--card-hover);
  transform: translateY(-2px);
}

.research-card h3 {
  font-size: 1.1rem;
  color: var(--forest-dark);
  margin-bottom: 10px;
}

.research-card .location-badge {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: var(--forest-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  display: block;
}

.research-card p {
  font-size: 0.94rem;
  color: var(--text-mid);
  margin-bottom: 12px;
  line-height: 1.75;
}

.tag-pill {
  display: inline-block;
  background: var(--forest-mist);
  color: var(--forest-dark);
  border-radius: 12px;
  padding: 2px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  margin: 2px;
}

/* ── Publications ── */
.pub-year-header {
  font-family: 'Inter', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--forest-dark);
  margin: 36px 0 16px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--forest-mist);
}

.pub-item {
  padding: 14px 0 14px 16px;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 4px;
}

.pub-item:hover {
  border-left-color: var(--forest-pale);
  background: rgba(216, 243, 220, 0.2);
  border-radius: 0 6px 6px 0;
}

.pub-item.highlight {
  border-left-color: var(--forest-mid);
  background: rgba(216, 243, 220, 0.25);
  border-radius: 0 6px 6px 0;
}

.pub-authors {
  font-size: 0.9rem;
  color: var(--text-mid);
  margin-bottom: 3px;
}

.pub-authors strong {
  color: var(--forest-dark);
}

.pub-title {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
  line-height: 1.5;
}

.pub-journal {
  font-size: 0.87rem;
  color: var(--text-mid);
  font-style: italic;
}

.pub-journal a {
  font-style: normal;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  background: var(--forest-mist);
  color: var(--forest-dark);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  font-weight: 600;
  font-style: normal;
}

.pub-badge {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
}

.badge-review {
  background: #fef3c7;
  color: #92400e;
}

.badge-accepted {
  background: #d8f3dc;
  color: var(--forest-dark);
}

.badge-mentee {
  background: #ede9fe;
  color: #5b21b6;
}

/* ── Teaching / Mentorship ── */
.teaching-item {
  background: #fff;
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--card-shadow);
  border-left: 3px solid var(--forest-pale);
}

.teaching-item h4 {
  font-size: 0.97rem;
  color: var(--forest-dark);
  margin-bottom: 4px;
}

.teaching-meta {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: var(--forest-light);
  font-weight: 600;
  margin-bottom: 8px;
}

.teaching-desc {
  font-size: 0.9rem;
  color: var(--text-mid);
  margin-bottom: 0;
}

/* ── Outreach / News ── */
.news-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--card-shadow);
  border-top: 3px solid var(--forest-pale);
}

.news-source {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--forest-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.news-title {
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.news-desc {
  font-size: 0.88rem;
  color: var(--text-mid);
}

/* ── Contact ── */
.contact-card {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: var(--card-shadow);
  border-top: 4px solid var(--forest-mid);
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  font-size: 0.95rem;
}

.contact-icon {
  color: var(--forest-pale);
  font-size: 1.1rem;
  margin-top: 2px;
  flex-shrink: 0;
  width: 20px;
}

.contact-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  margin-bottom: 2px;
}

/* ── Affiliations ── */
.affil-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.affil-list li {
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
  font-size: 0.93rem;
  color: var(--text-mid);
  border-bottom: 1px solid var(--border);
}

.affil-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--forest-pale);
  font-size: 0.8rem;
}

/* ── Footer ── */
.nav-footer {
  background-color: var(--forest-dark) !important;
  color: rgba(255,255,255,0.75) !important;
  font-size: 0.83rem;
  padding: 20px 0;
}

.nav-footer a {
  color: rgba(255,255,255,0.85) !important;
}

/* ── Page layout ── */
.page-columns .content {
  max-width: 900px;
  margin: 0 auto;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero-section {
    padding: 40px 0 30px;
  }

  .hero-name {
    font-size: 1.8rem;
    text-align: center;
  }

  .hero-title, .hero-institution {
    text-align: center;
  }

  .research-card {
    padding: 20px 18px;
  }
}

/* ── Hero Banner ── */
.hero-banner {
  position: relative;
  width: 100%;
  height: 45vh;
  min-height: 280px;
  max-height: 420px;
  background-image: url('images/hero.jpg');
  background-size: cover;
  background-position: center 60%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 30, 20, 0.35) 0%,
    rgba(10, 30, 20, 0.55) 60%,
    rgba(10, 30, 20, 0.75) 100%
  );
}

.hero-text {
  position: relative;
  text-align: center;
  padding: 0 20px;
  z-index: 1;
}

.hero-text .hero-name {
  font-size: 4.5rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.hero-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.88);
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
  margin-bottom: 28px;
  font-weight: 400;
}

.hero-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff !important;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.5);
  padding: 10px 28px;
  border-radius: 30px;
  text-decoration: none !important;
  backdrop-filter: blur(4px);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.hero-btn:hover {
  background: rgba(255,255,255,0.28);
  border-color: rgba(255,255,255,0.85);
  transform: translateY(-2px);
  text-decoration: none !important;
}

/* ── Page wrap (constrains content width after hero) ── */
.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 48px 0;
}

/* ── Profile section ── */
.profile-section {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.profile-left {
  flex: 0 0 200px;
  text-align: center;
}

.profile-right {
  flex: 1;
  min-width: 260px;
}

/* ── Two-column section ── */
.two-col-section {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  margin-bottom: 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.two-col-section > div {
  flex: 1;
  min-width: 240px;
}

/* ── Research card image ── */
.research-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 16px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero-text .hero-name {
    font-size: 2.2rem;
  }
  .hero-subtitle {
    font-size: 0.95rem;
  }
  .hero-banner {
    height: 70vh;
  }
  .profile-left {
    flex: 0 0 100%;
  }
}

/* ── Single-page sections ── */
.page-section {
  padding: 28px 0;
  border-top: 1px solid var(--border);
}

.section-alt {
  background-color: #f2f7f4;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

/* scroll hint arrow on hero */
.hero-scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 1.6rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

@media (max-width: 768px) {
  .research-grid {
    grid-template-columns: 1fr;
  }
  .page-section {
    padding: 52px 0;
  }
}

/* ── Icon links ── */
.icon-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 14px 0;
}

.icon-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--forest-dark);
  color: #fff !important;
  font-size: 1rem;
  text-decoration: none !important;
  transition: background 0.2s, transform 0.15s;
}

.icon-links a:hover {
  background: var(--forest-light);
  transform: translateY(-2px);
}

