/* ============================================================
   ACADEMIC PERSONAL SITE — style.css
   Aesthetic: Refined editorial / softly modern
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --cream:    #f7f4ef;
  --ink:      #1a1a18;
  --muted:    #6b6860;
  --accent:   #3d5a4e;   /* deep sage green */
  --accent-light: #e8ede9;
  --rule:     #d8d4cc;
  --nav-h:    64px;
  --max-w:    860px;
  --serif:    'Cormorant Garamond', Georgia, serif;
  --sans:     'DM Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ───────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  backdrop-filter: blur(6px);
}

.nav-brand {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  opacity: 0;
  animation: fadeUp 0.6s 0.1s forwards;
}

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

.nav-links a {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  opacity: 0;
  animation: fadeUp 0.6s forwards;
  transition: color 0.2s;
}
.nav-links li:nth-child(1) a { animation-delay: 0.15s; }
.nav-links li:nth-child(2) a { animation-delay: 0.22s; }
.nav-links li:nth-child(3) a { animation-delay: 0.29s; }
.nav-links li:nth-child(4) a { animation-delay: 0.36s; }

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--accent); }

/* ── LAYOUT ────────────────────────────────────────────── */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) clamp(1.5rem, 5vw, 2rem);
}

/* ── HOME HERO ─────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 4rem;
  align-items: start;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 4rem;
}

.hero-text h1 {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 1.75rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.3s forwards;
}

.hero-text p {
  color: #3a3830;
  font-size: 0.95rem;
  max-width: 560px;
  opacity: 0;
  animation: fadeUp 0.7s 0.5s forwards;
}

.hero-text p + p { margin-top: 1rem; }

.hero-photo-wrap {
  opacity: 0;
  animation: fadeIn 0.9s 0.4s forwards;
}

.hero-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
}

/* ── CONTACT BLOCK ─────────────────────────────────────── */
.contact-block {
  opacity: 0;
  animation: fadeUp 0.7s 0.7s forwards;
}

.contact-block h2 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-list li {
  font-size: 0.9rem;
  color: var(--muted);
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}
.contact-list .label {
  font-weight: 500;
  color: var(--ink);
  min-width: 60px;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.contact-list a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.contact-list a:hover { border-color: var(--accent); }

/* ── SECTION HEADINGS ──────────────────────────────────── */
.page-title {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 300;
  margin-bottom: 0.4rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.2s forwards;
}
.page-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
  opacity: 0;
  animation: fadeUp 0.7s 0.35s forwards;
}

/* ── PAPER CARDS ───────────────────────────────────────── */
.papers { display: flex; flex-direction: column; gap: 2.5rem; }

.paper-card {
  padding: 2rem;
  border: 1px solid var(--rule);
  background: #fff;
  position: relative;
  opacity: 0;
  animation: fadeUp 0.6s forwards;
  transition: box-shadow 0.25s, border-color 0.25s;
}
.paper-card:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
  border-color: var(--accent);
}
.paper-card:nth-child(1) { animation-delay: 0.3s; }
.paper-card:nth-child(2) { animation-delay: 0.45s; }
.paper-card:nth-child(3) { animation-delay: 0.6s; }

.paper-status {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.paper-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.paper-coauthors {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  font-style: italic;
}

.paper-abstract {
  font-size: 0.88rem;
  color: #4a4840;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.paper-links { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.btn:hover { background: var(--accent); color: #fff; }
.btn-ghost {
  border-color: var(--rule);
  color: var(--muted);
}
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ── TEACHING ──────────────────────────────────────────── */
.course-list { display: flex; flex-direction: column; gap: 0; }

.course-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
  opacity: 0;
  animation: fadeUp 0.6s forwards;
}
.course-row:nth-child(1) { animation-delay: 0.3s; }
.course-row:nth-child(2) { animation-delay: 0.42s; }
.course-row:nth-child(3) { animation-delay: 0.54s; }
.course-row:nth-child(4) { animation-delay: 0.66s; }
.course-row:nth-child(5) { animation-delay: 0.78s; }

.course-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
}
.course-meta {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: right;
}
.course-level {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 0.2rem;
}

/* ── CV PAGE ───────────────────────────────────────────── */
.cv-section { margin-bottom: 3rem; }

.cv-section h2 {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
  opacity: 0;
  animation: fadeUp 0.6s forwards;
}
.cv-section:nth-child(1) h2 { animation-delay: 0.3s; }
.cv-section:nth-child(2) h2 { animation-delay: 0.4s; }
.cv-section:nth-child(3) h2 { animation-delay: 0.5s; }
.cv-section:nth-child(4) h2 { animation-delay: 0.6s; }

.cv-entry {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.5rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
  opacity: 0;
  animation: fadeUp 0.6s 0.4s forwards;
}
.cv-year {
  font-size: 0.82rem;
  color: var(--muted);
  padding-top: 0.1rem;
}
.cv-body strong {
  font-weight: 500;
  font-size: 0.95rem;
  display: block;
}
.cv-body span {
  font-size: 0.85rem;
  color: var(--muted);
}

.cv-download {
  margin-top: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.8s forwards;
}

/* ── ANIMATIONS ────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── FOOTER ────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--rule);
  padding: 2rem clamp(1.5rem, 5vw, 4rem);
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-top: 4rem;
}

/* ── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }
  .hero-photo-wrap {
    grid-row: 1;
    max-width: 180px;
  }
  .hero-text { grid-row: 2; }
  .nav-brand { display: none; }
  .nav-links { gap: 1.5rem; }
  .cv-entry { grid-template-columns: 80px 1fr; gap: 1rem; }
}
