:root {
  /* Monochromatic "warm paper & ink" palette — minimal / scholarly look */
  --navy: #1b1a16;          /* ink: headings, nav name, course code */
  --primary: #3a382f;       /* links & interactive accent (warm dark gray) */
  --primary-hover: #000000; /* link / interactive hover */
  --text: #26241d;          /* body ink (warm near-black) */
  --muted: #5a584e;         /* secondary text — ~6.7:1 on paper (WCAG AA) */
  --bg: #faf8f2;            /* warm paper */
  --bg-alt: #f1eee4;        /* deeper paper for alternating sections */
  --border: #dcd8cb;        /* warm hairline border */
  --blue-tint: #eae7db;     /* subtle chip/badge background (kept monochrome) */
  --blue-mid: #cbc7b8;      /* accent rule / left border (kept monochrome) */
}

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

/* ── Skip Navigation (WCAG 2.4.1) ── */
.skip-link {
  position: absolute;
  top: -999px;
  left: 0;
  background: var(--navy);
  color: #ffffff;
  padding: 0.5rem 1rem;
  z-index: 100;
  font-size: 0.875rem;
  text-decoration: none;
  border-radius: 0 0 4px 0;
}
.skip-link:focus {
  top: 0;
}

/* ── Focus Indicators (WCAG 2.4.7) ── */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 2px;
}

body {
  margin: 0;
  font-family: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Georgia, 'Times New Roman', serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 1rem;
}

a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1040px, 92%);
  margin: 0 auto;
}

/* ── Header & Nav ── */

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 0;
}

.nav-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: normal;
  flex-shrink: 0;
}

.nav-name:hover {
  color: var(--primary);
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  flex: 1;
}

.nav-links a {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.nav-links a:hover {
  color: var(--primary);
  text-decoration: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.icon-link {
  display: flex;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.icon-link:hover {
  color: var(--primary);
  text-decoration: none;
}


/* ── Sections ── */

.section {
  padding: 4rem 0;
}

.section h2 {
  font-size: 1.65rem;
  font-weight: 700;
  margin: 0 0 1.75rem;
  color: var(--navy);
  letter-spacing: normal;
}

.paper-abstract {
  margin: 0.5rem 0 0;
  font-size: 1rem;
  color: var(--text);
}

.alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ── About / Profile ── */

.profile-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 3rem;
  align-items: start;
}

.profile-photo-wrap {
  display: flex;
  justify-content: center;
  padding-top: 0.3rem;
}

.profile-photo-placeholder {
  width: 185px;
  height: 225px;
  border-radius: 0.75rem;
  background: var(--blue-tint);
  border: 2px dashed var(--blue-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  user-select: none;
}

.profile-img {
  width: 185px;
  height: 225px;
  object-fit: cover;
  border-radius: 0.75rem;
  display: block;
}

.profile-bio h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--navy);
  letter-spacing: normal;
  line-height: 1.2;
}

.title-line {
  color: var(--muted);
  font-size: 1rem;
  margin: 0 0 1.25rem;
}

.profile-bio p {
  margin: 0 0 0.9rem;
  max-width: 64ch;
}

.contact-email {
  margin-top: 1.25rem !important;
  font-size: 1rem;
}

/* ── Research ── */

.paper-group {
  margin-bottom: 2.25rem;
}

.paper-group:last-child {
  margin-bottom: 0;
}

.paper-group h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
  margin: 0 0 1rem;
}

.paper-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.paper {
  padding-left: 1rem;
  border-left: 3px solid var(--blue-mid);
}

.paper-title {
  font-weight: normal;
  margin: 0 0 0.1rem;
  font-size: 1rem;
}

.paper-title a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.paper-title a:hover {
  color: var(--primary);
}

.paper-details {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.paper-abstract {
  margin: 0.5rem 0 0;
  font-size: 1rem;
  color: var(--text);
}

.abstract-toggle {
  background: none;
  border: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 0; /* hide ▼ character; chevron drawn via ::after */
  padding: 0 0.3rem;
  vertical-align: middle;
  min-height: 1.75rem;
  min-width: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.abstract-toggle::after {
  content: '';
  display: block;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.abstract-toggle[aria-expanded="true"]::after {
  transform: rotate(-135deg) translate(-1px, -1px);
}

.abstract-toggle:hover {
  color: var(--primary);
}

/* ── Teaching ── */

.teaching-statement {
  color: var(--muted);
  margin: 0 0 2rem;
}

.course-group {
  margin-bottom: 1.5rem;
}

.course-group:last-child {
  margin-bottom: 0;
}

.course-group h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
  margin: 0 0 1rem;
}

.course-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.course {
  padding-left: 1rem;
  border-left: 3px solid var(--blue-mid);
}

.course-title {
  margin: 0;
}

.course-code {
  font-weight: normal;
  font-size: 0.95rem;
  color: var(--navy);
  white-space: nowrap;
  margin-right: 0.5rem;
}

.course-name {
  font-size: 1rem;
}

.course-abstract {
  margin: 0.5rem 0 0;
  font-size: 1rem;
  color: var(--text);
}

.course-abstract p {
  margin: 0 0 0.5rem;
}

.course-abstract p:last-child {
  margin-bottom: 0;
}

/* ── Footer ── */

.footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}

.footer a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer a:hover {
  color: var(--primary);
}

/* ── Responsive ── */

@media (max-width: 720px) {
  .nav {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 0;
  }

  .nav-name {
    flex: 1 1 auto;
  }

  .nav-links {
    order: 3;
    flex-wrap: wrap;
    gap: 0.75rem;
    width: 100%;
  }

  .nav-actions {
    order: 2;
  }

  .profile-layout {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .profile-photo-wrap {
    justify-content: flex-start;
  }
}
