*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }

/* ── Tokens ─────────────────────────────────────────────────────────── */
:root {
  --bg:          #fdfcf5;
  --bg-alt:      #f5f3e8;
  --text:        #1c1b18;
  --muted:       #6b6860;
  --faint:       #ccc9b8;
  --accent:      #3d3222;
  --link:        #3d3222;

  --serif:       'EB Garamond', Georgia, serif;
  --mono:        'Courier New', Courier, monospace;

  --max:         800px;
  --gap:         2rem;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

body {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--faint);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}
a:hover { text-decoration-color: var(--accent); }


header {
  margin-bottom: var(--gap);
}

.site-name {
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 0.45rem;
}

.site-sub {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

nav {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
nav a:hover,
nav a.active {
  color: var(--text);
  border-bottom-color: var(--faint);
}

.rule {
  border: none;
  border-top: 1px dashed var(--faint);
  margin: var(--gap) 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 2rem;
  align-items: start;
}

.photo-wrap img,
.photo-placeholder {
  width: 130px;
  height: 162px;
  object-fit: cover;
  border-radius: 2px;
  background: var(--bg-alt);
  border: 1px solid var(--faint);
  overflow: hidden;
}

.photo-placeholder svg { opacity: 0.35; }

.about-text p {
  margin-bottom: 1rem;
  font-size: 1rem;
}
.about-text p:last-child { margin-bottom: 0; }

.contact-line {
  margin-top: 1.25rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
}

.contact-line a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--faint);
  padding-bottom: 1px;
}
.contact-line a:hover { color: var(--text); border-bottom-color: var(--accent); }


.section-label {
  font-family: var(--mono);
  font-size: 0.90rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0rem;
}


.pub-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pub-item {
  padding: 1rem 0;
  border-top: 1px dashed var(--faint);
}

.pub-list li:first-child { border-top: none; }

.pub-title {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 0.2rem;
}

.pub-authors {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.pub-authors strong {
  color: var(--text);
  font-weight: 500;
}

.pub-venue {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.pub-note {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.04em;
  color: var(--faint);
  margin-bottom: 0.4rem;
}

.pub-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pub-links a {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--faint);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.pub-links a:hover { color: var(--text); border-bottom-color: var(--accent); }

.pub-links button {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 1px solid var(--faint);
  padding: 0 0 1px 0;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.pub-links button:hover { color: var(--text); border-bottom-color: var(--accent); }
.pub-links button.active { color: var(--accent); border-bottom-color: var(--accent); }

.pub-abstract {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

.pub-abstract.open {
  grid-template-rows: 1fr;
}

.pub-abstract-inner {
  overflow: hidden;
}

.pub-abstract-inner p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  font-style: italic;
  padding: 0.6rem 0 0.2rem 0.9rem;
  margin-top: 0.6rem;
  border-left: 1px dashed var(--faint);
}


.teaching-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.teaching-item {
  padding: 0.85rem 0;
  border-top: 1px dashed var(--faint);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 1rem;
}

.teaching-list li:first-child { border-top: none; }

.teaching-links {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.teaching-links a {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--faint);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.teaching-links a:hover { color: var(--text); border-bottom-color: var(--accent); }

.teaching-title {
  font-size: 0.95rem;
  color: var(--text);
}

.teaching-role {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.teaching-year {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}


.back-top {
  position: fixed;
  bottom: 1.75rem;
  right: 1.25rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  border: 1px dashed var(--faint);
  padding: 0.45rem 0.75rem;
  border-radius: 2px;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.back-top.visible {
  opacity: 1;
  pointer-events: auto;
}


footer {
  margin-top: var(--gap);
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--faint);
  letter-spacing: 0.05em;
}


@media (max-width: 520px) {
  html { font-size: 17px; }
  body { padding: 2.5rem 1.25rem 4rem; }

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

  .photo-wrap img,
  .photo-placeholder {
    width: 100px;
    height: 125px;
  }

  .teaching-item {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .teaching-year { text-align: left; }
}