/* ————— Warm cream / serif academic one-pager ————— */

:root {
  --bg: #faf6ee;
  --bg-panel: #f2ead9;
  --ink: #2e2a24;
  --muted: #6f6759;
  --accent: #8c3b2e;
  --rule: #e3d9c6;
  --header-h: 3.5rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Lora", Georgia, serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
a:hover { border-bottom-color: currentColor; }

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ————— Header ————— */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.nav {
  max-width: 60rem;
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 0.5rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.brand {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
}
.brand:hover { border-bottom-color: transparent; color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.nav-links a {
  color: var(--muted);
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.05rem;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); border-bottom-color: transparent; }

/* Animated underline that slides in on hover / active section */
.nav-links a:not(.cv-button) {
  position: relative;
  padding-bottom: 0.1rem;
}
.nav-links a:not(.cv-button)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links a:not(.cv-button):hover::after,
.nav-links a:not(.cv-button).active::after { transform: scaleX(1); }

.cv-button {
  color: var(--accent) !important;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.1rem 0.85rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.cv-button:hover {
  background: var(--accent);
  color: var(--bg) !important;
}

/* ————— Intro panel ————— */

.intro {
  background:
    radial-gradient(55rem 28rem at 88% -12%, rgba(140, 59, 46, 0.09), transparent 62%),
    radial-gradient(42rem 24rem at 8% 112%, rgba(176, 134, 56, 0.11), transparent 60%),
    linear-gradient(180deg, var(--bg-panel) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--rule);
}

.intro-inner {
  max-width: 60rem;
  margin: 0 auto;
  padding: 4.5rem 1.25rem 4rem;
  display: flex;
  align-items: center;
  gap: 3rem;
}

.portrait {
  width: 13rem;
  height: 13rem;
  object-fit: cover;
  object-position: 22% 30%;   /* subject sits left-of-center in the photo */
  border-radius: 50%;
  border: 4px solid #fff;
  outline: 1px solid rgba(140, 59, 46, 0.45);
  outline-offset: 7px;
  box-shadow: 0 10px 30px rgba(46, 42, 36, 0.18);
  flex-shrink: 0;
  transition: transform 0.4s ease, outline-offset 0.4s ease;
}
.portrait:hover {
  transform: scale(1.02) rotate(-1deg);
  outline-offset: 10px;
}

.intro-text h1 {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 3rem;
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.role {
  font-size: 1.25rem;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 0.15rem;
}

.affiliation {
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.intro-links { font-size: 0.95rem; }
.intro-links .sep { color: var(--muted); margin: 0 0.5rem; }

/* ————— Content sections (Read CV style) ————— */

.section {
  max-width: 46rem;
  margin: 0 auto;
  padding: 3.25rem 1.25rem 0;
}

.section:last-of-type { padding-bottom: 3.25rem; }

.section h2 {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Hairline that starts in the accent color and fades away */
.section h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--rule) 45%, transparent 100%);
}

/* Fade-up reveal on scroll (only when JS is available; respects reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  html.js .section {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  html.js .section.revealed {
    opacity: 1;
    transform: none;
  }
}

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

.subhead {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.note {
  margin-top: 1.25rem;
  font-style: italic;
  color: var(--muted);
}

.interest-list {
  list-style: none;
  margin-top: 1rem;
}

.interest-list li {
  padding-left: 1.4rem;
  position: relative;
  margin-bottom: 0.35rem;
}

.interest-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* CV-style entries: years in the left column, timeline dots on the right */

.entry {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.15rem;
}

.entry .entry-body {
  position: relative;
  padding-left: 1.5rem;
}

/* Timeline dot */
.entry .entry-body::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  transition: background 0.2s ease;
}

/* Connecting line down to the next entry */
.entry .entry-body::after {
  content: "";
  position: absolute;
  left: 6px;
  top: calc(0.45em + 15px);
  bottom: -1.05rem;
  width: 1px;
  background: var(--rule);
}
.entry:last-child .entry-body::after { display: none; }

.entry:hover .entry-body::before { background: var(--accent); }
.entry:hover .entry-years { color: var(--accent); }

.entry-years {
  flex: 0 0 6rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-top: 0.1rem;
}

.entry-body { flex: 1; }

.entry-title { font-weight: 500; }

.entry-detail {
  color: var(--muted);
  font-size: 0.97rem;
}

/* ————— Footer ————— */

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 3.5rem;
}

.site-footer p {
  max-width: 60rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 1.75rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.site-footer p::before {
  content: "❦";
  display: block;
  color: var(--accent);
  opacity: 0.65;
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

/* ————— Small screens ————— */

@media (max-width: 700px) {
  .intro-inner {
    flex-direction: column;
    text-align: center;
    gap: 1.75rem;
    padding: 3rem 1.25rem 2.75rem;
  }
  .portrait { width: 10.5rem; height: 10.5rem; }
  .intro-text h1 { font-size: 2.25rem; }
  .nav { justify-content: center; text-align: center; }
  .entry { gap: 1rem; }
  .entry-years { flex-basis: 5.2rem; }
}
