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

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  --bg:          #F5F1EB;
  --bg-alt:      #EDE8DF;
  --bg-dark:     #1C1C1A;
  --text:        #1C1C1A;
  --muted:       #74706A;
  --accent:      #3A5741;
  --accent-lt:   #EBF0EC;
  --warm:        #8C6B4A;
  --border:      #D5CFC4;
  --serif:       'Cormorant Garamond', Georgia, serif;
  --sans:        'DM Sans', system-ui, sans-serif;
  --nav-h:       64px;
  --max:         1060px;
  --gutter:      60px;
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.75;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── NAV ────────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 36px;
}

.nav-links a {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--accent); border-bottom-color: var(--accent); }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 14px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--text);
  transition: all 0.3s;
}

/* ── LAYOUT ─────────────────────────────────────────────────── */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section { padding: 80px 0; }
section + section { border-top: 1px solid var(--border); }

/* ── TYPOGRAPHY ─────────────────────────────────────────────── */
.label {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

h1.display {
  font-family: var(--serif);
  font-size: clamp(3.2rem, 7vw, 5.6rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h1.page-title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 6px;
}

p { margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--muted);
}

/* ── DIVIDER ────────────────────────────────────────────────── */
.rule {
  width: 40px;
  height: 1px;
  background: var(--accent);
  margin: 28px 0;
}

/* ── TAGS ───────────────────────────────────────────────────── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}
.tag {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  padding: 5px 14px;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 2px;
}

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 10px 22px;
  transition: background 0.2s, color 0.2s;
}
.btn:hover { background: var(--accent); color: var(--bg); }

.link-arrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s;
}
.link-arrow:hover { gap: 10px; }

/* ── EXTERNAL LINKS ROW ─────────────────────────────────────── */
.ext-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.ext-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 8px 16px;
  transition: color 0.2s, border-color 0.2s;
}
.ext-link:hover { color: var(--accent); border-color: var(--accent); }
.ext-link svg { flex-shrink: 0; }

/* ── IMAGE PLACEHOLDER ──────────────────────────────────────── */
.img-placeholder {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}
.img-placeholder::before {
  content: '';
  position: absolute;
  width: 55%;
  height: 55%;
  border: 1px dashed var(--border);
  border-radius: 50%;
}
.img-placeholder .ph-icon {
  width: 32px;
  height: 32px;
  opacity: 0.3;
  z-index: 1;
}
.img-placeholder span {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 1;
  opacity: 0.6;
}

/* ── LIST STYLES ────────────────────────────────────────────── */
ul.dot-list {
  list-style: none;
  padding: 0;
}
ul.dot-list li {
  padding: 6px 0 6px 18px;
  position: relative;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
}
ul.dot-list li:first-child { border-top: 1px solid var(--border); }
ul.dot-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.7rem;
  top: 10px;
}

/* ── TWO COLUMN GRID ────────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.two-col-wide {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 80px;
  align-items: start;
}

/* ── STAT CARDS ─────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin: 40px 0;
}
.stat-card {
  background: var(--bg);
  padding: 28px 24px;
  text-align: center;
}
.stat-card .stat-num {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  display: block;
  margin-bottom: 8px;
}
.stat-card .stat-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.4;
}

/* ── AREA CARDS ─────────────────────────────────────────────── */
.area-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 32px;
}
.area-card {
  background: var(--bg);
  padding: 32px 28px;
  transition: background 0.2s;
}
.area-card:hover { background: var(--accent-lt); }
.area-card .area-num {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 300;
  color: var(--border);
  line-height: 1;
  margin-bottom: 12px;
}
.area-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.area-card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* ── COURSE ENTRIES ─────────────────────────────────────────── */
.course-list { margin-top: 24px; }
.course-entry {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.course-entry:first-child { border-top: 1px solid var(--border); }
.course-code {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
  display: block;
}
.course-entry h3 { font-size: 1.1rem; margin-bottom: 6px; }
.course-entry p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* ── PUBLICATIONS ACCORDION ─────────────────────────────────── */
.pub-section { margin-bottom: 60px; }
.pub-section-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 4px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--text);
}

.pub-entry {
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.pub-entry:first-of-type { border-top: 1px solid var(--border); }

.pub-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 22px 0;
  cursor: pointer;
  gap: 20px;
  transition: opacity 0.2s;
}
.pub-header:hover { opacity: 0.75; }

.pub-info { flex: 1; }
.pub-info h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 6px;
}
.pub-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.pub-meta em {
  font-style: italic;
  font-family: var(--serif);
}

.pub-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 2px;
  margin-top: 8px;
}
.badge-published { background: var(--accent-lt); color: var(--accent); }
.badge-review    { background: #F3EFE9; color: var(--warm); }
.badge-forthcoming { background: #EEF0F5; color: #4A5568; }

.pub-toggle {
  font-size: 1.3rem;
  color: var(--muted);
  font-weight: 300;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 4px;
  transition: transform 0.3s;
  user-select: none;
}

.pub-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s;
  padding: 0 0 0 0;
}
.pub-entry.open .pub-body {
  max-height: 400px;
  padding-bottom: 24px;
}
.pub-entry.open .pub-toggle { transform: rotate(45deg); }

.pub-body-inner {
  border-left: 2px solid var(--accent);
  padding-left: 20px;
}
.pub-body-inner p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.7;
}
.pub-doi {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  transition: opacity 0.2s;
}
.pub-doi:hover { opacity: 0.7; }
.if-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-left: 12px;
}

/* ── TESTIMONIALS ───────────────────────────────────────────── */
.testimonial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 32px;
}
.testimonial {
  background: var(--bg);
  padding: 32px 28px;
}
.testimonial blockquote {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 16px;
}
.testimonial blockquote::before { content: '\201C'; }
.testimonial blockquote::after  { content: '\201D'; }

/* ── CONTACT FORM ───────────────────────────────────────────── */
.form-group {
  margin-bottom: 24px;
}
.form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 12px 16px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text);
  transition: border-color 0.2s;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-group textarea { resize: vertical; min-height: 140px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 36px var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
footer p {
  font-size: 0.75rem;
  color: var(--muted);
}
.footer-social {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.footer-social a {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.footer-social a:hover { color: var(--accent); border-color: var(--accent); }
.footer-links {
  display: flex;
  gap: 24px;
  justify-content: flex-end;
}
.footer-links a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }

/* ── PAGE HEADER ────────────────────────────────────────────── */
.page-header {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--border);
}
.page-header .label { margin-bottom: 16px; }

/* ── CV EMBED ───────────────────────────────────────────────── */
.cv-embed-wrap {
  border: 1px solid var(--border);
  overflow: hidden;
}
.cv-embed-wrap iframe {
  display: block;
  width: 100%;
  height: 800px;
  border: none;
}

/* ── BLOCKQUOTE ─────────────────────────────────────────────── */
.pull-quote {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 300;
  line-height: 1.5;
  color: var(--accent);
  border-left: 3px solid var(--accent);
  padding-left: 28px;
  margin: 40px 0;
}

/* ── METHODS GRID ───────────────────────────────────────────── */
.methods-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 32px;
}
.method-card {
  background: var(--bg);
  padding: 28px 24px;
}
.method-card h3 { font-size: 1rem; margin-bottom: 12px; }
.method-card ul {
  list-style: none;
  padding: 0;
}
.method-card ul li {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
}
.method-card ul li:last-child { border-bottom: none; }

/* ── ANIMATIONS ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.7s ease both; }
.fade-up-1 { animation-delay: 0.1s; }
.fade-up-2 { animation-delay: 0.2s; }
.fade-up-3 { animation-delay: 0.35s; }
.fade-up-4 { animation-delay: 0.5s; }

/* ── MOBILE ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --gutter: 24px; }

  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 28px var(--gutter);
    gap: 20px;
  }
  .nav-links.open { display: flex; }

  .two-col,
  .two-col-wide { grid-template-columns: 1fr; gap: 40px; }

  .stat-grid { grid-template-columns: 1fr 1fr; }
  .area-grid { grid-template-columns: 1fr; }
  .methods-grid { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  footer {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 20px;
    padding: 36px var(--gutter);
  }
  .footer-links { justify-content: center; flex-wrap: wrap; gap: 14px 20px; }

  .pull-quote { font-size: 1.2rem; }
}
