/* ════════════════════════════════════════════════════════════════════════
   Tutoring & Teaching — the reading room.

   White, warm, and quiet. A serif you'd happily read an essay in, wall
   labels in sans for anything that is really a fact, and hairlines instead
   of borders. The classroom next door to the gallery.
   ═══════════════════════════════════════════════════════════════════════ */

.teaching .page-head { border-bottom: 1px solid var(--rule-soft); }

/* ── About ──────────────────────────────────────────────────────────── */
.about {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(1.75rem, 5vw, 4.5rem);
  align-items: start;
  padding: clamp(2.5rem, 7vw, 5rem) 0;
}

.portrait { margin: 0; }
.portrait img {
  display: block;
  width: 100%;
  /* height:auto is load-bearing: the img's height="1280" attribute is a
     presentational hint that otherwise beats aspect-ratio and stretches it. */
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.portrait figcaption {
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-dim);
}

.about-text > .label { color: var(--accent); }

#bio { margin-top: 1rem; }
#bio p { font-size: clamp(1.15rem, 2.1vw, 1.45rem); line-height: 1.55; }
#bio p:last-child { margin-bottom: 0; }
#bio p + p { font-size: 1.05rem; line-height: 1.7; color: var(--ink-mid); }

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin: 2rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule-soft);
  list-style: none;
}
.about-links a { color: var(--ink-mid); text-decoration: none; }
.about-links a:hover { color: var(--accent); }

/* ── Body: CV on the left, the places I teach on the right ──────────── */
.teaching-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
  padding-bottom: clamp(2rem, 6vw, 4rem);
  border-top: 1px solid var(--rule-soft);
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
}

/* ── The CV ─────────────────────────────────────────────────────────── */
.cv-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.cv-head h2 {
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.05;
}
.cv-head a { color: var(--ink-mid); text-decoration: none; }
.cv-head a:hover { color: var(--accent); }
.cv-head a::after { content: " \2197"; }

.cv-section { margin-top: clamp(2.25rem, 5vw, 3.25rem); }
.cv-section > .label {
  display: block;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
}

.cv-entry {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 0.35rem 1.75rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.cv-dates {
  grid-row: span 3;
  padding-top: 0.42rem;
  color: var(--ink-dim);
  font-variant-numeric: oldstyle-nums;
  font-family: var(--label);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.cv-entry h3 { font-size: 1.25rem; line-height: 1.3; }
.cv-org { margin: 0; color: var(--ink-mid); font-style: italic; }
.cv-loc::before { content: " \00b7 "; color: var(--ink-dim); font-style: normal; }
.cv-entry ul { margin: 0.5rem 0 0; padding-left: 1.1rem; color: var(--ink-mid); font-size: 0.97rem; }
.cv-entry li { margin-bottom: 0.3rem; }
.cv-entry li::marker { color: var(--ink-dim); }

/* Publications read as a checklist, not as prose. */
.cv-pubs { margin: 0; padding: 0; list-style: none; }
.cv-pubs li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.cv-pubs a, .cv-pubs .cv-pub-title { color: var(--ink); text-decoration: none; }
.cv-pubs a:hover { color: var(--accent); text-decoration: underline; }
.cv-pub-pub { color: var(--ink-mid); font-style: italic; font-size: 0.92rem; }
.cv-pub-fill { flex: 1 1 1.5rem; min-width: 1rem; }
.cv-pub-year {
  color: var(--ink-dim);
  font-variant-numeric: oldstyle-nums;
  font-family: var(--label);
  font-size: 0.75rem;
}

.cv-empty { padding: 1.2rem 0; color: var(--ink-dim); font-style: italic; }

/* ── Where I teach ──────────────────────────────────────────────────── */
.affiliations { position: sticky; top: 5rem; }
.affiliations > .label { display: block; margin-bottom: 1rem; color: var(--ink-dim); }

.affil-list { display: grid; gap: 0.9rem; }

.affil {
  position: relative;
  display: block;
  padding: 1.35rem 1.4rem 1.45rem;
  background: var(--wall);
  border: 1px solid var(--rule-soft);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
/* An ochre edge lights up along the left as you arrive. */
.affil::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--dur) var(--ease);
}
.affil:hover,
.affil:focus-visible {
  background: var(--paper);
  border-color: var(--rule);
  transform: translateY(-2px);
}
.affil:hover::before,
.affil:focus-visible::before { transform: scaleY(1); }

.affil-role { display: block; color: var(--accent); }
.affil-name {
  display: block;
  margin: 0.5rem 0 0.45rem;
  font-family: var(--display);
  font-size: 1.4rem;
  line-height: 1.15;
}
.affil-desc { margin: 0; font-size: 0.93rem; line-height: 1.55; color: var(--ink-mid); }
.affil-host {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--rule-soft);
  color: var(--ink-dim);
  overflow-wrap: anywhere;
}
.affil-host::after { content: "\2197"; font-family: var(--text); font-size: 0.9rem; }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 920px) {
  .teaching-body { grid-template-columns: minmax(0, 1fr); }
  .affiliations { position: static; padding-top: 1rem; border-top: 1px solid var(--rule-soft); }
  .affil-list { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
}

@media (max-width: 620px) {
  .about { grid-template-columns: minmax(0, 1fr); }
  .portrait { max-width: 15rem; }
  .cv-entry { grid-template-columns: minmax(0, 1fr); gap: 0.3rem; }
  .cv-dates { grid-row: auto; padding-top: 0; order: -1; }
}
