:root {
  --bg: #e5ddcb;
  --surface: #f0ece0;
  --surface-strong: #faf8f3;
  --text: #2e2530;
  --muted: #6e5f72;
  --quiet: #9a8d9e;
  --accent: #5d9990;
  --accent-strong: #3d7870;
  --accent-soft: #d4e8e4;
  --warm: #eb7b59;
  --warm-soft: #fce9e3;
  --border: #cec8ba;
  --shadow: 0 18px 50px rgba(82, 70, 86, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

body {
  border-top: 5px solid var(--accent);
}

a {
  color: var(--accent-strong);
  text-decoration-color: rgba(93, 153, 144, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--warm);
  text-decoration-color: rgba(235, 123, 89, 0.45);
}

.site-header,
main,
.site-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  padding: 34px 0 0;
}

.profile {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.portrait-column {
  display: grid;
  gap: 18px;
  justify-items: center;
}

.headshot {
  width: 220px;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-strong);
  border: 1px solid rgba(93, 153, 144, 0.28);
  box-shadow: 0 14px 34px rgba(82, 70, 86, 0.18);
}

.logo {
  display: block;
  width: min(180px, 100%);
  height: auto;
}

.profile-links {
  display: grid;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}

.profile-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(93, 153, 144, 0.25);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
}

.profile-links a:hover {
  border-color: rgba(235, 123, 89, 0.40);
  background: var(--warm-soft);
  color: #c25e3e;
}

.profile-text {
  min-width: 0;
}

.profile-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 172px;
  gap: 22px;
  align-items: start;
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 2px;
  margin: 10px 0 0;
  color: var(--warm);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow-item {
  padding: 2px 9px;
  border: 1px solid rgba(235, 123, 89, 0.35);
  border-radius: 999px;
  background: rgba(235, 123, 89, 0.10);
  white-space: nowrap;
}

.eyebrow-sep {
  padding: 0 2px;
  color: var(--quiet);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  color: #1e1520;
  font-size: clamp(1.6rem, 2.8vw, 2.5rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.title {
  margin: 10px 0 16px;
  color: var(--accent-strong);
  font-size: 1.08rem;
  font-weight: 680;
}

.address {
  margin: 0 0 16px;
  color: var(--muted);
  max-width: 620px;
}

.contact {
  display: grid;
  gap: 8px;
  margin: 12px 0 16px;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact a,
.contact .email-obfuscated {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(93, 153, 144, 0.25);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.contact a:hover,
.contact .email-obfuscated:hover {
  border-color: rgba(235, 123, 89, 0.40);
  background: var(--warm-soft);
  color: #c25e3e;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.site-header > .actions {
  justify-content: flex-end;
  margin: 14px 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(93, 153, 144, 0.32);
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 720;
  cursor: pointer;
  text-decoration: none;
}

.btn.secondary {
  background: var(--surface-strong);
  color: var(--accent-strong);
}

.btn:hover {
  filter: brightness(0.98);
  text-decoration: none;
}

.bio {
  max-width: 820px;
  margin: 16px 0 0;
  color: #4a3d4e;
  font-size: 1.01rem;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  margin: 18px 0 0;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(229, 221, 203, 0.96);
  box-shadow: 0 10px 28px rgba(82, 70, 86, 0.09);
  backdrop-filter: blur(12px);
}

.tab {
  appearance: none;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.94rem;
  font-weight: 720;
  cursor: pointer;
}

.tab.active,
.tab:focus {
  border-color: rgba(93, 153, 144, 0.38);
  background: var(--accent-soft);
  color: var(--accent-strong);
  outline: none;
}

.tab.hidden {
  display: none;
}

main {
  padding-top: 26px;
}

.panel {
  display: none !important;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(240, 236, 224, 0.88);
}

.panel.active {
  display: block !important;
}

.panel-header {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

.panel-header h2 {
  margin: 0;
  color: #1e1520;
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

input[type="search"],
select {
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
}

input[type="search"] {
  width: min(320px, 100%);
}

select {
  max-width: 180px;
}

.external-link-note {
  margin: -6px 0 18px;
  color: var(--muted);
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.card-list,
.stack {
  display: grid;
  gap: 11px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-strong);
  padding: 15px 16px;
  box-shadow: 0 5px 18px rgba(82, 70, 86, 0.08);
}

.card:hover {
  border-color: rgba(93, 153, 144, 0.45);
}

.card strong {
  color: #2e2530;
}

.card .title {
  color: #2e2530;
  font-weight: 620;
}

#pubList .card .title {
  color: #eb7b59;
  font-weight: 760;
}

.appointment-title {
  color: #eb7b59;
  font-weight: 760;
}

.appointment-period {
  color: var(--quiet);
  font-size: 0.9rem;
  font-weight: 650;
}

.appointment-institution {
  margin-top: 4px;
  color: var(--accent-strong);
  font-weight: 700;
}

.appointment-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

.education-detail {
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
}

.education-title {
  color: #eb7b59;
  font-weight: 760;
}

.subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.subtab {
  appearance: none;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 720;
  cursor: pointer;
}

.subtab.active,
.subtab:focus {
  border-color: rgba(93, 153, 144, 0.38);
  background: var(--accent-soft);
  color: var(--accent-strong);
  outline: none;
}

.subtab-level-3 {
  margin-top: -6px;
  padding-left: 12px;
  border-left: 3px solid var(--accent-soft);
}

.subtab.tertiary {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 0.82rem;
}

.activity-group-card {
  padding: 0;
  overflow: hidden;
}

.activity-group-card + .activity-group-card {
  margin-top: 12px;
}

.activity-group-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  cursor: pointer;
  list-style: none;
}

.activity-group-summary > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.activity-group-summary .badge {
  flex: 0 0 42px;
  justify-content: center;
  min-width: 42px;
  margin-left: auto;
}

.activity-group-summary::-webkit-details-marker {
  display: none;
}

.activity-group-summary::after {
  content: "+";
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(93, 153, 144, 0.28);
  border-radius: 999px;
  color: var(--accent-strong);
  font-weight: 800;
}

.activity-group-card[open] .activity-group-summary::after {
  content: "-";
}

.activity-group-title {
  display: block;
  color: var(--accent-strong);
  font-weight: 800;
}

.activity-group-summary small {
  display: block;
  margin-top: 3px;
  color: var(--quiet);
  font-size: 0.84rem;
}

.activity-list {
  padding: 0 16px 16px;
}

.activity-item {
  padding: 13px 0;
  border-top: 1px solid var(--border);
}

.activity-item .activity-title,
strong.activity-title {
  color: #eb7b59;
  font-weight: 760;
}

.stack.activity-list {
  display: grid;
  gap: 11px;
  padding: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 13px;
}

.student-section {
  margin-bottom: 24px;
}

.student-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 14px;
  padding: 10px 16px;
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: rgba(93, 153, 144, 0.09);
  color: var(--accent-strong);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.student-section:first-child .student-section-title {
  margin-top: 4px;
}

.student-count-chip {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(93, 153, 144, 0.3);
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 750;
}

.student-group-title {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 18px 0 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--warm-soft);
  border: 1px solid rgba(235, 123, 89, 0.35);
  color: var(--warm);
  font-size: 0.8rem;
  font-weight: 780;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.student-topic {
  margin-top: 4px;
  font-size: 0.9rem;
  color: var(--muted);
}

.student-meta {
  font-size: 0.88rem;
  color: var(--quiet);
  font-weight: 500;
}

.student-coadvisor {
  font-style: italic;
}

.student-pubs {
  margin: 10px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  list-style: disc;
}

.student-pubs li {
  font-size: 0.87rem;
  color: var(--muted);
  line-height: 1.55;
}

.student-pubs em {
  color: var(--text);
  font-style: normal;
  font-weight: 600;
}


.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid rgba(93, 153, 144, 0.22);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 720;
}

pre {
  padding: 13px;
  border: 1px solid #c5bfaf;
  border-radius: 8px;
  background: #f5f0e4;
  color: #2e2530;
  font-size: 0.86rem;
  line-height: 1.45;
}

.empty-state {
  padding: 15px 16px !important;
  border: 1px dashed var(--border) !important;
  border-radius: 8px !important;
  background: var(--surface-strong) !important;
  color: var(--muted) !important;
}

.site-footer {
  padding: 28px 0 36px;
  color: var(--muted);
}

:focus-visible {
  outline: 2px solid var(--warm);
  outline-offset: 3px;
}

@media (max-width: 860px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .profile {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 22px;
  }

  .portrait-column {
    grid-template-columns: auto 1fr;
    justify-items: start;
    align-items: center;
  }

  .headshot {
    width: 156px;
  }

  .logo {
    width: 168px;
  }

  .profile-heading {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .profile-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .panel,
  .profile {
    border-radius: 8px;
  }

  .panel-header {
    grid-template-columns: 1fr;
  }

  .tools {
    justify-content: start;
  }
}

@media (max-width: 560px) {
  body {
    border-top-width: 4px;
  }

  .site-header {
    padding-top: 16px;
  }

  .profile,
  .panel {
    padding: 18px;
  }

  .portrait-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: center;
  }

  .headshot {
    width: min(150px, 100%);
  }

  .logo {
    width: min(150px, 100%);
  }

  .profile-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact a,
  .contact .email-obfuscated,
  .profile-links a,
  .tab,
  .btn {
    font-size: 0.88rem;
  }

  input[type="search"],
  select {
    width: 100%;
    max-width: none;
  }
}

/* === Alternate layout: compact three-zone banner === */
.profile {
  grid-template-columns: 184px minmax(0, 1fr) 210px;
  gap: 26px;
  align-items: stretch;
  padding: 24px;
}

.portrait-column {
  align-content: start;
}

.headshot {
  width: 184px;
}

.profile-text {
  display: grid;
  align-content: start;
}

.profile-heading {
  display: block;
}

.profile-rail {
  display: grid;
  gap: 10px;
  align-content: start;
}

.profile-rail .logo {
  width: 100%;
  max-width: none;
}

.profile-rail .contact,
.profile-rail .profile-links {
  display: grid;
  gap: 8px;
  width: 100%;
  margin: 0;
}

.profile-rail .contact a,
.profile-rail .contact .email-obfuscated,
.profile-rail .profile-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(93, 153, 144, 0.25);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
}

.profile-rail .contact a:hover,
.profile-rail .contact .email-obfuscated:hover,
.profile-rail .profile-links a:hover {
  border-color: rgba(235, 123, 89, 0.40);
  background: var(--warm-soft);
  color: #c25e3e;
}

.profile .address {
  margin-top: 12px;
}

.profile .bio {
  margin-top: 12px;
}

@media (max-width: 960px) {
  .profile {
    grid-template-columns: 160px minmax(0, 1fr);
  }

  .headshot {
    width: 160px;
  }

  .profile-rail {
    grid-column: 1 / -1;
    grid-template-columns: 170px repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .profile-rail .contact,
  .profile-rail .profile-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .profile {
    grid-template-columns: 1fr;
  }

  .portrait-column {
    justify-items: center;
  }

  .headshot {
    width: min(190px, 100%);
  }

  .profile-rail {
    grid-template-columns: 1fr;
  }

  .profile-rail .logo {
    width: min(190px, 100%);
    justify-self: center;
  }
}
