/* =====================================================
   Leah Hoogstra — Personal Academic Website
   Color palette:
     --ocean:   #0e4d6b  (deep ocean blue)
     --green:   #2d6a4f  (forest green)
     --foam:    #7ec8c8  (sea foam accent)
     --bg:      #f8f9f5  (warm white)
     --card-bg: #ffffff
     --text:    #1a2332  (dark navy)
     --muted:   #6b7280
   ===================================================== */

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

:root {
  --ocean: #0e4d6b;
  --ocean-light: #1a6b8a;
  --green: #2d6a4f;
  --green-light: #3a7d44;
  --foam: #7ec8c8;
  --foam-light: #b2e0e0;
  --bg: #f8f9f5;
  --card-bg: #ffffff;
  --text: #1a2332;
  --muted: #6b7280;
  --border: #e2e8e4;
  --nav-height: 64px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  line-height: 1.25;
}

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

a:hover {
  color: var(--green);
}

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

/* ---------- Nav ---------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  background: rgba(248, 249, 245, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}

.site-nav.scrolled {
  box-shadow: 0 2px 16px rgba(14, 77, 107, 0.08);
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ocean);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.nav-logo:hover {
  color: var(--green);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ocean);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  width: 32px;
  height: 32px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ocean);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero / About ---------- */
#about {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-height) + 4rem) 2.5rem 5rem;
  background: linear-gradient(135deg, #0b3d56 0%, #0e4d6b 40%, #1a5e48 80%, #2d6a4f 100%);
  position: relative;
  overflow: hidden;
}

/* Subtle math/wave overlay */
#about::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(126, 200, 200, 0.07) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(126, 200, 200, 0.05) 0%, transparent 40%);
  pointer-events: none;
}

.about-inner {
  max-width: 1050px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.about-photo-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.about-photo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(126, 200, 200, 0.5);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.about-photo-placeholder {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 4px solid rgba(126, 200, 200, 0.5);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
}

.about-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.about-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  padding: 0.45rem 1rem;
  border: 1.5px solid rgba(126, 200, 200, 0.4);
  border-radius: 999px;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.about-links a:hover {
  color: #fff;
  border-color: var(--foam);
  background: rgba(126, 200, 200, 0.12);
}

.about-text h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: #ffffff;
  margin-bottom: 0.3rem;
}

.about-text .subtitle {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--foam-light);
  margin-bottom: 0.15rem;
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
}

.about-text .affil {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 1.8rem;
  font-style: italic;
}

.about-text .bio {
  font-size: 1rem;
  color: rgba(255,255,255,0.88);
  margin-bottom: 1.2rem;
  max-width: 580px;
}

.about-text .advisors {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
}

.about-text .advisors strong {
  color: rgba(255,255,255,0.8);
  font-weight: 600;
}

/* ---------- Wave Divider ---------- */
.wave-divider {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  background: var(--ocean);
}

.wave-divider svg {
  display: block;
  width: 100%;
  height: 60px;
}

/* ---------- Section Shared ---------- */
.section {
  padding: 5rem 2.5rem;
}

.section-inner {
  max-width: 900px;
  margin: 0 auto;
}

.section-heading {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--ocean);
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.section-heading::after {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--foam), transparent);
  border-radius: 2px;
  margin-top: 0.4rem;
  width: 80%;
}

.section-intro {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  max-width: 640px;
}

/* ---------- Recent Work ---------- */
#work {
  background: var(--bg);
}

.work-cards {
  display: grid;
  gap: 1.5rem;
}

.work-card {
  background: var(--card-bg);
  border-radius: 10px;
  border-left: 4px solid var(--green);
  padding: 1.75rem 2rem;
  box-shadow: 0 2px 12px rgba(14, 77, 107, 0.06);
  transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.work-card:hover {
  box-shadow: 0 6px 24px rgba(14, 77, 107, 0.12);
  transform: translateY(-2px);
}

.work-card-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(45, 106, 79, 0.09);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.work-card h3 {
  font-size: 1.15rem;
  color: var(--ocean);
  margin-bottom: 0.5rem;
}

.work-card .advisors-note {
  font-size: 0.83rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  font-style: italic;
}

.work-card p {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 1rem;
}

.work-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.work-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ocean);
  padding: 0.3rem 0.8rem;
  border: 1.5px solid var(--ocean-light);
  border-radius: 999px;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.work-link:hover {
  background: var(--ocean);
  color: white;
}

/* ---------- CV ---------- */
#cv {
  background: #eef3f0;
}

.cv-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.4rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--ocean);
  color: #fff;
}

.btn-primary:hover {
  background: var(--ocean-light);
  color: #fff;
}

.cv-embed-wrap {
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(14, 77, 107, 0.1);
  border: 1px solid var(--border);
}

.cv-embed-wrap iframe {
  width: 100%;
  height: 780px;
  border: none;
  display: block;
}

.cv-placeholder {
  height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--muted);
  background: var(--card-bg);
  border-radius: 10px;
  border: 2px dashed var(--border);
}

.cv-placeholder p {
  font-size: 0.9rem;
}

/* ---------- Odds & Ends ---------- */
#odds {
  background: var(--bg);
}

.odds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.odds-item {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 1.5rem;
  border-top: 3px solid var(--foam);
  box-shadow: 0 2px 10px rgba(14, 77, 107, 0.05);
}

.odds-item h3 {
  font-size: 1.05rem;
  color: var(--ocean);
  margin-bottom: 0.6rem;
}

.odds-item p,
.odds-item li {
  font-size: 0.93rem;
  color: var(--text);
}

.odds-item ul {
  list-style: none;
  padding: 0;
}

.odds-item ul li {
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--border);
}

.odds-item ul li:last-child {
  border-bottom: none;
}

.odds-item ul li a {
  color: var(--ocean);
  font-weight: 500;
}

/* ---------- Contact ---------- */
#contact {
  background: var(--ocean);
  color: rgba(255,255,255,0.9);
  text-align: center;
}

#contact .section-heading {
  color: #fff;
}

#contact .section-heading::after {
  background: linear-gradient(90deg, var(--foam), transparent);
  margin-left: auto;
  margin-right: auto;
}

.contact-email {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-family: 'Playfair Display', serif;
  color: var(--foam-light);
  margin: 1rem 0 2rem;
  word-break: break-all;
}

.contact-email a {
  color: var(--foam-light);
}

.contact-email a:hover {
  color: #fff;
}

.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.8);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.5rem 1.2rem;
  border: 1.5px solid rgba(126, 200, 200, 0.35);
  border-radius: 999px;
  transition: all 0.2s ease;
}

.contact-link:hover {
  color: #fff;
  border-color: var(--foam);
  background: rgba(126, 200, 200, 0.15);
}

/* ---------- Footer ---------- */
.site-footer {
  background: #08303f;
  color: rgba(255,255,255,0.4);
  text-align: center;
  padding: 1.25rem 2rem;
  font-size: 0.8rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .site-nav {
    padding: 0 1.25rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(248, 249, 245, 0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li a {
    display: block;
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  #about {
    padding: calc(var(--nav-height) + 2.5rem) 1.25rem 3.5rem;
  }

  .about-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .about-photo-col {
    order: -1;
  }

  .about-text .bio {
    max-width: 100%;
  }

  .section {
    padding: 3.5rem 1.25rem;
  }

  .work-card {
    padding: 1.25rem 1.25rem;
  }

  .cv-embed-wrap iframe {
    height: 500px;
  }

  .odds-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .about-photo-placeholder {
    width: 160px;
    height: 160px;
  }

  .cv-embed-wrap iframe {
    height: 400px;
  }
}
