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

:root {
  --cream: #f8f6f1;
  --white: #ffffff;
  --ink: #1c1a17;
  --muted: #6b6760;
  --rule: #e2dfd8;
  --accent: #8b4a2b;
  --nav-h: 64px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.75;
  font-weight: 300;
}

/* 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, 6vw, 5rem);
}
.nav-name {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.15rem; letter-spacing: 0.01em;
  color: var(--ink); text-decoration: none;
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-size: 0.85rem; font-weight: 400;
  letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }

/* LAYOUT */
main { max-width: 760px; margin: 0 auto; padding: 0 clamp(1.5rem, 6vw, 2rem); }

section { padding: 5rem 0; border-bottom: 1px solid var(--rule); }
section:last-of-type { border-bottom: none; }

h2 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.05rem; font-weight: 400;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 2.5rem;
}

p { margin-bottom: 1rem; color: var(--ink); }
p:last-child { margin-bottom: 0; }
a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

/* HOME */
#home {
  display: grid; grid-template-columns: 1fr auto;
  gap: 3rem; align-items: start; padding: 5rem 0;
}
.hero-text h1 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400; line-height: 1.15; margin-bottom: 0.4rem;
}
.hero-text .subtitle {
  font-size: 0.9rem; letter-spacing: 0.04em;
  color: var(--muted); margin-bottom: 2rem; font-weight: 400;
}
.hero-text .bio { font-size: 1.05rem; line-height: 1.8; }
.hero-links { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-links a {
  font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; border: 1px solid var(--rule);
  padding: 0.45rem 1rem; border-radius: 2px; color: var(--muted);
  transition: border-color 0.2s, color 0.2s;
}
.hero-links a:hover { border-color: var(--ink); color: var(--ink); }
.profile-photo {
  width: 200px; height: 250px; border-radius: 2px;
  background: var(--rule); display: flex; align-items: center;
  justify-content: center; overflow: hidden; flex-shrink: 0;
}
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }

/* TEACHING */
.course {
  display: grid; grid-template-columns: 1fr auto;
  align-items: baseline; gap: 1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--rule);
}
.course:last-child { border-bottom: none; }
.course-name { font-family: 'EB Garamond', Georgia, serif; font-size: 1.05rem; }
.course-role { font-size: 0.82rem; color: var(--muted); }
.course-year { font-size: 0.82rem; color: var(--muted); white-space: nowrap; }

/* CV */
.cv-note { font-size: 1.05rem; line-height: 1.8; }
.cv-download {
  display: inline-block; margin-top: 1.5rem;
  font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; background: var(--ink); color: var(--cream);
  padding: 0.65rem 1.5rem; border-radius: 2px; transition: opacity 0.2s;
}
.cv-download:hover { opacity: 0.8; color: var(--cream); }

/* CONTACT */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.contact-block .label {
  font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.4rem; font-weight: 400;
}
.contact-block .value { font-size: 1rem; }

/* FOOTER */
footer { text-align: center; padding: 2.5rem 0; font-size: 0.8rem; color: var(--muted); }

/* RESPONSIVE */
@media (max-width: 600px) {
  #home {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .profile-photo {
    width: 150px;
    height: 190px;
    margin: 0 auto;
    order: -1;
  }
  .hero-links {
    justify-content: center;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}
