:root {
  --ink: #26312f;
  --muted: #687270;
  --paper: #fbfaf6;
  --stone: #ece7dc;
  --mist: #eef5f3;
  --teal: #2f706b;
  --teal-deep: #23534f;
  --copper: #b56b43;
  --line: #d9d2c5;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(36, 48, 46, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: var(--teal-deep);
  text-decoration: none;
}

a:hover {
  color: var(--copper);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(251, 250, 246, 0.93);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--teal);
  background: var(--mist);
  color: var(--teal-deep);
  font-family: "Lora", Georgia, serif;
  font-weight: 600;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: "Lora", Georgia, serif;
  font-size: 1.02rem;
  font-weight: 600;
}

.brand small {
  color: var(--muted);
  font-size: 0.76rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.88rem;
  font-weight: 600;
}

.main-nav > a,
.nav-group > button {
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.nav-group {
  position: relative;
}

.nav-group > button::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.main-nav > a:hover,
.nav-group > button:hover,
.nav-group.open > button {
  color: var(--teal-deep);
  background: var(--mist);
}

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 250px;
  padding: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.nav-group.open .dropdown,
.nav-group:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown a,
.dropdown-group span {
  display: block;
  padding: 8px 10px;
}

.dropdown a {
  color: var(--ink);
  font-weight: 500;
}

.dropdown a:hover {
  background: var(--mist);
  color: var(--teal-deep);
}

.dropdown-group {
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.dropdown-group span {
  color: var(--copper);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--white);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

main {
  width: 100%;
}

about-section {
  display: contents;
}

teaching-section {
  display: contents;
}

research-section {
  display: contents;
}

.research-note {
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.collapsible-table.research-projects-table > summary {
  grid-template-columns: 58% 42%;
}

.research-projects-table > summary span {
  text-align: left;
}

.research-projects-table .project-table th:first-child,
.research-projects-table .project-table td:first-child {
  width: 58%;
}

.research-projects-table .project-table col:first-child {
  width: 58%;
}

.research-projects-table .project-table col:last-child {
  width: 42%;
}

.course-meta {
  color: var(--teal-deep);
  font-size: 0.9em;
  white-space: nowrap;
}

.section-band,
.section-grid,
.contact-section {
  padding: clamp(56px, 8vw, 96px) clamp(18px, 5vw, 76px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  align-items: center;
  gap: clamp(32px, 6vw, 82px);
  min-height: calc(100vh - 78px);
  background:
    linear-gradient(110deg, rgba(238, 245, 243, 0.92), rgba(251, 250, 246, 0.62)),
    linear-gradient(180deg, var(--paper), var(--stone));
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--copper);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.15;
}

h1,
h2 {
  font-family: "Lora", Georgia, serif;
  font-weight: 500;
}

h1 {
  max-width: 880px;
  font-size: clamp(2.15rem, 3.5vw, 3.65rem);
}

h2 {
  font-size: clamp(2rem, 3.8vw, 3.3rem);
}

h3 {
  font-size: 1.3rem;
}

h4 {
  font-size: 1.05rem;
}

.profile-text {
  max-width: 830px;
  margin-top: 30px;
  color: #3a4744;
  font-family: "Lora", Georgia, serif;
  font-size: clamp(1.04rem, 1.5vw, 1.22rem);
}

.cv-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 11px 0 5px;
  border-bottom: 2px solid var(--copper);
  color: var(--teal-deep);
  font-weight: 700;
}

.cv-link:hover {
  border-color: var(--teal);
}

.portrait-panel {
  padding: 16px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.portrait-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  min-height: 340px;
  background:
    linear-gradient(135deg, rgba(47, 112, 107, 0.16), rgba(181, 107, 67, 0.12)),
    var(--stone);
  border: 1px solid var(--line);
  color: var(--teal-deep);
  font-family: "Lora", Georgia, serif;
  font-size: 1.4rem;
}

.portrait-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--line);
}

.portrait-panel p {
  margin: 14px 4px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.5fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  border-top: 1px solid var(--line);
}

.section-stack {
  grid-template-columns: minmax(280px, 0.62fr) minmax(0, 2fr);
}

.section-heading {
  align-self: start;
  min-width: 0;
}

.content-panel {
  min-width: 0;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 8px 28px rgba(36, 48, 46, 0.07);
}

.content-panel h3 {
  margin-bottom: 18px;
}

.section-stack .content-panel {
  grid-column: 2;
}

.accordion-item {
  border: 1px solid var(--line);
  background: var(--paper);
}

.accordion-item + .accordion-item {
  margin-top: 12px;
}

.accordion-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 16px 18px;
  color: var(--teal-deep);
  font-family: "Lora", Georgia, serif;
  font-size: 1.14rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.accordion-item summary::-webkit-details-marker,
.row-details summary::-webkit-details-marker,
.collapsible-table > summary::-webkit-details-marker {
  display: none;
}

.accordion-item summary::after,
.collapsible-table > summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-65%) rotate(45deg);
}

.accordion-item[open] summary::after,
.collapsible-table[open] > summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.accordion-item .publication-list {
  padding: 0 24px 18px 42px;
}

.publication-list,
.deliverable-list {
  margin: 0;
  padding-left: 1.2rem;
}

.publication-list li,
.deliverable-list li {
  margin-bottom: 14px;
}

.publication-list strong,
.publication-list span {
  display: block;
}

.publication-list strong a {
  display: inline;
  margin-top: 0;
}

.publication-list .external-mark {
  display: inline;
}

.publication-list span {
  color: var(--muted);
  font-size: 0.94rem;
}

.project-card {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.project-card:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.project-title {
  display: inline-block;
  margin-bottom: 8px;
  font-weight: 700;
}

.role {
  margin-bottom: 0;
  color: var(--teal-deep);
}

.project-table td:first-child {
  width: 58%;
}

.row-details summary {
  color: var(--teal-deep);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.row-details p {
  margin: 10px 0 0;
}

.row-details .deliverable-list {
  margin-top: 10px;
}

.deliverable-list li > a {
  display: inline;
  margin-top: 0;
}

.project-full-title {
  display: inline;
  margin-top: 0;
  font-weight: 600;
}

.compact {
  border-top: 1px solid var(--line);
  background: var(--mist);
}

.compact .section-heading {
  max-width: 900px;
  margin-bottom: 24px;
}

.table-wrap {
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.94rem;
  table-layout: fixed;
}

th,
td {
  padding: 15px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  background: #f6f2eb;
  color: var(--teal-deep);
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

details a {
  display: inline-block;
  margin-top: 8px;
}

.collapsible-table {
  background: var(--white);
  border: 1px solid var(--line);
}

.collapsible-table > summary {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  align-items: center;
  min-height: 54px;
  padding: 0;
  background: #f6f2eb;
  color: var(--teal-deep);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.collapsible-table > summary span {
  padding: 15px 16px;
}

.teaching-table > summary,
.consulting-projects-table > summary {
  grid-template-columns: 23.8% 47.6% 28.6%;
}

.teaching-table table col:nth-child(1),
.consulting-projects-table table col:nth-child(1) {
  width: 23.8%;
}

.teaching-table table col:nth-child(2),
.consulting-projects-table table col:nth-child(2) {
  width: 47.6%;
}

.teaching-table table col:nth-child(3),
.consulting-projects-table table col:nth-child(3) {
  width: 28.6%;
}

.committees-table > summary {
  grid-template-columns: 11.4% 45.6% 20.3% 22.7%;
}

.committees-table table col:nth-child(1) {
  width: 11.4%;
}

.committees-table table col:nth-child(2) {
  width: 45.6%;
}

.committees-table table col:nth-child(3) {
  width: 20.3%;
}

.committees-table table col:nth-child(4) {
  width: 22.7%;
}

.committee-report-list {
  margin: 0.65rem 0 0;
  padding-left: 1.15rem;
}

.committee-report-list li + li {
  margin-top: 0.45rem;
}

.committee-report-list li > a {
  display: inline;
  margin-top: 0;
}

.no-reports {
  color: var(--muted);
}

.collapsible-table .table-wrap {
  border: 0;
  border-top: 1px solid var(--line);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.service-panel {
  grid-column: span 2;
}

.consulting-grid {
  grid-template-columns: minmax(220px, 0.5fr) minmax(0, 2fr);
}

.consulting-grid .content-panel {
  grid-column: 2;
}

.consulting-grid > selected-projects-section {
  display: block;
  min-width: 0;
  grid-column: 2;
}

.consulting-grid > services-section {
  display: block;
  min-width: 0;
  grid-column: 2;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.service-list div {
  padding: 22px;
  background: var(--mist);
  border-left: 4px solid var(--teal);
}

.service-list p {
  margin-bottom: 0;
  color: var(--muted);
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.55fr);
  gap: 28px;
  align-items: center;
  background: var(--ink);
  color: var(--white);
}

.contact-section .eyebrow {
  color: #e4b28e;
}

.contact-copy {
  max-width: 720px;
  color: #d6dedb;
}

.contact-table-wrap {
  overflow-x: auto;
}

.contact-table {
  width: 100%;
  min-width: 0;
  max-width: 760px;
  border-collapse: collapse;
  color: #d6dedb;
}

.contact-table th,
.contact-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  text-align: left;
  vertical-align: top;
}

.contact-table th {
  width: 105px;
  background: transparent;
  color: #f0c7a7;
  font-weight: 700;
}

.contact-table a {
  color: #f0c7a7;
  overflow-wrap: anywhere;
}

.profile-links {
  display: grid;
  gap: 12px;
}

.profile-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--white);
}

.profile-links a:hover {
  background: rgba(255, 255, 255, 0.14);
}

.logo-chip {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--mist);
  color: var(--teal-deep);
  font-weight: 800;
  overflow: hidden;
  border-radius: 6px;
}

.logo-chip img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.profile-links a:first-child .logo-chip {
  width: 76px;
  padding: 3px;
  box-sizing: border-box;
}

footer {
  padding: 22px clamp(18px, 5vw, 76px);
  background: #1d2523;
  color: #cbd4d1;
  font-size: 0.86rem;
}

footer p {
  margin: 0;
}

@media (max-width: 980px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    right: 18px;
    left: 18px;
    display: none;
    align-items: stretch;
    flex-direction: column;
    padding: 10px;
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav > a,
  .nav-group > button {
    width: 100%;
    text-align: left;
  }

  .dropdown {
    position: static;
    display: none;
    min-width: 0;
    padding: 4px 0 8px 12px;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-group.open .dropdown {
    display: block;
  }

  .hero,
  .section-grid,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .section-stack .content-panel {
    grid-column: auto;
  }

  .consulting-grid .content-panel {
    grid-column: auto;
  }

  .consulting-grid > selected-projects-section {
    grid-column: auto;
  }

  .consulting-grid > services-section {
    grid-column: auto;
  }

  .hero {
    min-height: auto;
  }

  .service-panel {
    grid-column: auto;
  }
}

@media (max-width: 680px) {
  .site-header {
    min-height: 68px;
  }

  .brand small {
    display: none;
  }

  .section-band,
  .section-grid,
  .contact-section {
    padding: 44px 18px;
  }

  h1 {
    font-size: 2.15rem;
  }

  .profile-text {
    font-size: 1rem;
  }

  .portrait-placeholder {
    min-height: 280px;
  }

  .content-panel {
    padding: 22px;
  }

  .service-list {
    grid-template-columns: 1fr;
  }

  .collapsible-table > summary {
    grid-template-columns: 1fr;
  }

  .collapsible-table.research-projects-table > summary {
    grid-template-columns: 1fr;
  }

  .committees-table > summary {
    grid-template-columns: 1fr;
  }

  .collapsible-table > summary span:nth-child(2),
  .collapsible-table > summary span:nth-child(3),
  .collapsible-table > summary span:nth-child(4) {
    display: none;
  }
}
