/* Complete standalone page style 1 */

:root {
  --sidebar-w: 220px;
  --page-bg: #fff;
  --page-text: #222;
  --link: #280F9C;
  --sidebar-hover: #547ca5;
  --dark-bg: #121212;
  --dark-panel: #1e1e1e;
  --dark-text: #f2f2f2;
  --dark-link: #82aaff;
}

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

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: var(--page-bg);
  color: var(--page-text);
}

a {
  color: var(--link);
}

img, iframe, video, canvas, table {
  max-width: 100%;
}

iframe {
  display: block;
}

.layout {
  display: flex;
  flex-direction: row;
  min-height: 100%;
}

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 10000;
  width: var(--sidebar-w);
  overflow-y: auto;
  background-color: var(--page-bg);
  padding: 12px 10px 10px 16px;
}

.sidebar a {
  display: block;
  color: var(--link);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.sidebar a:hover {
  background-color: var(--sidebar-hover);
  color: #000;
}

.sidebar p,
.sidebar span,
.sidebar img {
  margin: 0;
  padding: 0;
}

.sidebar-heading {
  margin: 14px 0 4px 0;
  padding-left: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #444;
  border-left: 3px solid #ccc;
  text-align: left;
}

.sidebar-divider {
  width: 50%;
  margin-left: 0;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}

.menu-item .icon {
  width: 20px;
  font-size: 18px;
  line-height: 1;
  text-align: center;
}

.site-search {
  margin: 14px 0 12px;
}

.site-search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 56px;
  align-items: center;
  width: 95%;
  column-gap: 4px;
  row-gap: 3px;
}

.site-search-input-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}

#site-search-box {
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid #46515c;
  border-radius: 4px;
  outline: none;
  background: #080a0c;
  color: #f7f9fb;
  caret-color: #8ec5ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 8px rgba(0, 0, 0, 0.22);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

#site-search-box:focus {
  border-color: #8ec5ff;
  box-shadow: 0 0 0 3px rgba(76, 151, 232, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.site-search-welcome {
  position: absolute;
  top: 50%;
  left: 16px;
  max-width: calc(100% - 32px);
  overflow: hidden;
  color: #dce8f3;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0;
  pointer-events: none;
  transform: translateY(-50%);
  white-space: nowrap;
  transition: opacity 100ms ease;
}

.site-search-welcome::after {
  display: inline-block;
  width: 1px;
  height: 1em;
  margin-left: 3px;
  background: #8ec5ff;
  content: "";
  vertical-align: -2px;
  animation: site-search-caret 850ms steps(1) infinite;
}

.site-search.is-focused .site-search-welcome,
.site-search.has-input .site-search-welcome {
  opacity: 0;
}

.site-search-submit {
  display: grid;
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  width: 48px;
  height: 48px;
  padding: 0;
  place-items: center;
  border: 1px solid #4c97e8;
  border-radius: 4px;
  background: #1769aa;
  color: #fff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.site-search-submit:hover,
.site-search-submit:focus-visible {
  border-color: #8ec5ff;
  outline: none;
  background: #215f91;
}

.site-search-submit:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.site-search-loading-dots {
  display: inline-flex;
  gap: 4px;
  color: #dce8f3;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 18px;
  line-height: 1;
}

.site-search-loading-dots span {
  opacity: 0;
}

.site-search.is-loading .site-search-loading-dots span {
  animation: site-search-dot-one 3s steps(1, end) infinite;
}

.site-search.is-loading .site-search-loading-dots span:nth-child(2) {
  animation-name: site-search-dot-two;
}

.site-search.is-loading .site-search-loading-dots span:nth-child(3) {
  animation-name: site-search-dot-three;
}

.site-search-diagnostics {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #4a5560;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

.site-search-diagnostics input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #1769aa;
  cursor: pointer;
}

.site-search-diagnostics input:disabled,
.site-search-diagnostics input:disabled + span {
  cursor: not-allowed;
  opacity: 0.55;
}

body.dark-mode .site-search-diagnostics {
  color: #b9c3cc;
}

.site-search-result {
  display: none;
  margin-top: 12px;
  padding: 12px 14px;
  border-left: 4px solid #4c97e8;
  border-radius: 4px;
  background: #111;
  color: #f8f8f8;
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.55;
  white-space: normal;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.site-search-panel-loading {
  display: grid;
  min-height: 24px;
  place-items: center;
}

@keyframes site-search-caret {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}

@keyframes site-search-dot-one {
  0%, 99% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes site-search-dot-two {
  0%, 32% { opacity: 0; }
  33%, 99% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes site-search-dot-three {
  0%, 65% { opacity: 0; }
  66%, 99% { opacity: 1; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .site-search-welcome::after {
    animation: none;
  }

  .site-search.is-loading .site-search-loading-dots span {
    opacity: 1;
    animation: none;
  }
}

@media (max-width: 520px) {
  .site-search-controls {
    grid-template-columns: minmax(0, 1fr) 48px;
    width: 100%;
    column-gap: 8px;
  }

  .site-search-input-wrap {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
  }

  .site-search-submit {
    grid-column: 2;
    grid-row: 1;
  }

  .site-search-diagnostics {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  #site-search-box {
    padding-right: 12px;
    padding-left: 12px;
    font-size: 14px;
  }

  .site-search-welcome {
    left: 12px;
    max-width: calc(100% - 24px);
    font-size: 12px;
    line-height: 1.2;
    white-space: normal;
  }
}

@media (max-width: 360px) {
  .site-search-controls {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
  }

  .site-search-diagnostics {
    grid-column: 1;
    grid-row: 2;
  }

  .site-search-submit {
    position: absolute;
    top: 0;
    right: 0;
  }

  .site-search-submit {
    visibility: hidden;
  }

  .site-search.is-focused .site-search-submit,
  .site-search.has-input .site-search-submit {
    visibility: visible;
  }

  .site-search.is-focused #site-search-box,
  .site-search.has-input #site-search-box {
    padding-right: 60px;
  }

  .site-search-welcome {
    font-size: 11.5px;
  }
}

.main-content,
main {
  margin-left: var(--sidebar-w);
  width: calc(100vw - var(--sidebar-w));
  max-width: calc(100vw - var(--sidebar-w));
  min-width: 0;
  overflow-x: hidden;
  padding: 6px 1rem 20px 1rem;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5em 0;
}

#name-heading {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--page-text);
  text-align: left;
}

#menu-toggle {
  display: none;
}

.site-title {
  margin: 0;
  font-size: 1.2em;
}

.name-block {
  display: flex;
  align-items: center;
  gap: 1em;
}

.name-block img {
  flex-shrink: 0;
  border-radius: 4px;
}

.intro-layout {
  display: flow-root;
  width: 100%;
  margin: 1em 0 1.5em;
  line-height: 1.35;
}

.intro-media {
  float: right;
  width: min(52%, 900px);
  min-width: 0;
  margin: 0 0 16px 28px;
}

.intro-bio {
  display: flow-root;
  min-width: 0;
}

.bio-photo {
  float: left;
  width: clamp(115px, 11vw, 150px);
  max-width: 150px;
  height: auto;
  margin: 0 16px 10px 0;
  border-radius: 4px;
}

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

.intro-layout p {
  margin-top: 0;
  margin-bottom: 0.65em;
}

.education-text {
  margin-top: 0;
}

.carousel-container {
  position: relative;
  width: 100%;
  max-width: 700px;
  aspect-ratio: 16 / 9;
  margin: auto;
  overflow: hidden;
  background-color: #fff;
}

.intro-media .carousel-container {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  margin: 0;
}

@media (max-width: 1050px) {
  .intro-media {
    width: 55%;
    margin-left: 20px;
  }

  .bio-photo {
    width: 120px;
  }
}

@media (max-width: 760px) {
  .intro-media {
    float: none;
    width: 100%;
    margin: 0 0 20px;
  }
}

@media (max-width: 520px) {
  .bio-photo {
    float: none;
    width: 130px;
    margin: 0 0 16px;
  }
}
.carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carousel-item {
  position: absolute;
  inset: 0;
  display: none;
  grid-template-rows: minmax(0, 1fr) auto;
  background-color: #fff;
}

.carousel-item.is-active {
  display: grid;
}

.carousel-item video,
.carousel-item img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  background-color: #fff;
}

.carousel-caption {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  text-align: center;
  font-size: 0.9em;
  line-height: 1.2em;
  color: #333;
  background-color: rgba(255, 255, 255, 0.85);
  overflow-wrap: anywhere;
}

.carousel-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 4px;
  background: rgba(255,255,255,0.48);
  color: rgba(0,0,0,0.64);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.45;
  transform: translateY(-50%);
  transition: opacity 120ms ease, background 120ms ease;
}

.carousel-control:hover,
.carousel-control:focus {
  opacity: 0.9;
  background: rgba(255,255,255,0.78);
  outline: none;
}

.carousel-control:focus-visible {
  outline: 2px solid #1769aa;
  outline-offset: 2px;
  opacity: 0.95;
}

.carousel-control-prev {
  left: 8px;
}

.carousel-control-next {
  right: 8px;
}

.icon-spacer {
  display: inline-block;
  width: 15px;
  height: 18px;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 0;
  width: 100%;
  margin: 0;
}

.icon-link img {
  width: 15px;
  height: 18px;
  vertical-align: middle;
}

main a,
.main-content a,
.pub-title,
.pub-authors,
.pub-meta,
.pub-abstract,
.teach-card,
.news-title,
.news-blurb {
  overflow-wrap: anywhere;
  word-break: normal;
}

.pub-grid,
.teach-grid,
.student-grid,
.news-grid,
.arch-survey-grid {
  min-width: 0;
}

.news-title,
.news-blurb,
.news-meta,
.news-cta {
  overflow-wrap: normal;
  word-break: normal;
}

.pub-filters,
.teach-filters {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
}

.pub-filter,
.teach-filter {
  flex: 0 0 auto;
}

body.dark-mode {
  background-color: var(--dark-bg);
  color: var(--dark-text);
}

body.dark-mode a {
  color: var(--dark-link);
}

body.dark-mode a:visited {
  color: #c792ea;
}

body.dark-mode a:hover {
  color: #fff;
  background-color: #333;
  border-radius: 4px;
}

body.dark-mode .sidebar {
  background-color: var(--dark-panel);
}

body.dark-mode .sidebar a {
  color: #a0cfff;
}

body.dark-mode .sidebar a:hover {
  background-color: #2d2d2d;
  color: #fff;
}

body.dark-mode .sidebar-heading {
  color: #bbb;
  border-left-color: #555;
}

body.dark-mode .main-content,
body.dark-mode .main-content p,
body.dark-mode .main-content h1,
body.dark-mode .main-content h2,
body.dark-mode .main-content h3,
body.dark-mode .main-content li,
body.dark-mode .main-content span,
body.dark-mode .main-content div,
body.dark-mode .main-content strong,
body.dark-mode .main-content em {
  color: var(--dark-text);
}

body.dark-mode #name-heading {
  color: var(--dark-text);
}

body.dark-mode .carousel-container,
body.dark-mode .carousel-item,
body.dark-mode .carousel-item img,
body.dark-mode .carousel-item video {
  background-color: var(--dark-bg);
}

body.dark-mode .carousel-caption {
  background-color: rgba(30, 30, 30, 0.85);
  color: var(--dark-text);
}

body.dark-mode .carousel-control {
  border-color: rgba(255,255,255,0.22);
  background: rgba(0,0,0,0.42);
  color: rgba(255,255,255,0.82);
}

body.dark-mode .carousel-control:hover,
body.dark-mode .carousel-control:focus {
  background: rgba(0,0,0,0.68);
}

@media (max-width: 1050px) {
  :root {
    --sidebar-w: 0px;
  }

  .main-content,
  main {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
    overflow-x: hidden;
  }

  .header {
    padding-right: 3.25rem;
  }

  #menu-toggle {
    display: grid;
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    z-index: 10001;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(0,0,0,0.18);
    border-radius: 8px;
    background: rgba(255,255,255,0.84);
    color: var(--link);
    cursor: pointer;
    backdrop-filter: blur(8px);
  }

  body.dark-mode #menu-toggle {
    background: rgba(0,0,0,0.54);
    border-color: rgba(255,255,255,0.22);
    color: rgba(255,255,255,0.94);
  }

  .sidebar {
    width: min(320px, 86vw);
    height: 100dvh;
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  body.sidebar-open .sidebar,
  .sidebar.open {
    transform: translateX(0);
  }

  #site-search-box,
  iframe {
    width: 100%;
    max-width: 100%;
  }

  #Schedule + p + iframe,
  iframe[src*="outlook.office365.com"] {
    height: min(62vh, 520px);
  }

  .pub-filters,
  .teach-filters,
  .pub-links,
  .teach-chiprow {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    padding-bottom: 6px;
  }

  .pub-filter,
  .teach-filter,
  .pub-pill,
  .teach-pill,
  .teach-chip {
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .teaching-header,
  .teaching-tools {
    display: block;
  }

  .teach-search {
    width: 100%;
    margin: 0.5rem 0;
  }

  .teach-search input {
    width: 100%;
    min-width: 0;
  }

  .pub-grid,
  .teach-grid,
  .student-grid,
  .news-grid,
  .arch-survey-grid {
    grid-template-columns: 1fr;
    width: 100%;
    min-width: 0;
  }

  .pub-card,
  .teach-card,
  .student-card,
  .news-card,
  .arch-survey-card {
    max-width: 100%;
    min-width: 0;
  }

  .student-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .student-card img {
    width: min(220px, 70vw);
    height: auto;
    max-width: 100%;
  }

  .news-link {
    display: flex;
    flex-direction: column;
  }

  .news-thumb {
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .news-body {
    padding: 12px 14px 14px 14px;
  }

  .arch-survey-gallery {
    max-width: 100%;
  }

  .arch-survey-gallery--four {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
  }
}

@media (max-width: 520px) {
  .main-content,
  main {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  .pub-card,
  .teach-card,
  .student-card {
    padding: 10px 11px;
  }

  .pub-header,
  .teach-card-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .pub-badge,
  .teach-badges {
    align-self: flex-start;
  }

  .pub-title {
    font-size: 1rem;
  }

  .pub-abstract {
    font-size: 0.92rem;
    line-height: 1.5;
  }

  h1 { font-size: 1.55rem; }
  h2 { font-size: 1.35rem; }
}


/* Extracted component styles */

#ryan-nick-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 12px;
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-in-out;
    z-index: 9999;
}

body.ryan-nick-skew #ryan-nick-banner {
    opacity: 1;
}




  :root{
    /* Sandstone theme tokens */
    --card-bg: rgba(214, 198, 165, 0.92);           /* warm tan */
    --card-bg-2: rgba(198, 180, 146, 0.92);         /* deeper ochre */
    --card-border: rgba(60, 48, 32, 0.18);

    --text: rgba(43, 36, 25, 0.98);                 /* dark brown ink */
    --muted: rgba(58, 49, 35, 0.78);                /* softer brown */

    --chip-bg: rgba(123, 102, 74, 0.18);
    --chip-border: rgba(90, 73, 52, 0.26);

    --btn-bg: rgba(255, 255, 255, 0.28);
    --btn-bg-hover: rgba(255, 255, 255, 0.42);
    --btn-border: rgba(60, 48, 32, 0.18);

    --shadow: 0 14px 34px rgba(0,0,0,0.18);
    --radius: 18px;
    --sans: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
    --mono: ui-monospace, Menlo, Consolas, monospace;
  }

/* Dark mode overrides for the archaeology cards */
body.dark-mode{
  --card-bg: rgba(24, 22, 18, 0.92);        /* near-black warm */
  --card-bg-2: rgba(36, 33, 26, 0.92);      /* slightly lighter for gradient */
  --card-border: rgba(255, 255, 255, 0.12);

  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.70);

  --chip-bg: rgba(255, 255, 255, 0.08);
  --chip-border: rgba(255, 255, 255, 0.14);

  --btn-bg: rgba(255, 255, 255, 0.08);
  --btn-bg-hover: rgba(255, 255, 255, 0.14);
  --btn-border: rgba(255, 255, 255, 0.14);

  --shadow: 0 14px 34px rgba(0,0,0,0.45);
}

  /* Layout grid */
  .arch-survey-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
  }

  /* Card */
  .arch-survey-card{
    background: linear-gradient(180deg, var(--card-bg), var(--card-bg-2));
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    color: var(--text);

    /* Important: do not clip text against rounded corners */
    overflow: visible;
  }

  /* Top image (16:9) */
  .arch-survey-thumb{
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: rgba(255,255,255,0.20);
    display: block;

    /* Clip ONLY the image to the rounded card top */
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
    overflow: hidden;
  }

  /* Inner content */
  .arch-survey-card__inner{
    padding: 12px 24px 24px 24px;
  }

  /* Title / meta / flags row */
  .arch-survey-card__top{
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;

    /* Important: guarantee breathing room from rounded corners */
    padding: 12px 24px 0 12px;
     }

  .arch-survey-card__title{
    margin: 0;
    font-family: var(--sans);
    font-size: 16px;
    letter-spacing: 0.1px;
    color: var(--text);
  }

  .arch-survey-card__meta{
    margin-top: 6px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
  }

  /* Flags */
  .arch-survey-card__flags{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 2px;
  }

  .arch-survey-flag{
    font-family: var(--mono);
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(0,0,0,0.18);
    color: rgba(0,0,0,0.85);
    white-space: nowrap;
  }

  /* Badge (if you still use it anywhere) */
  .arch-survey-card__badge{
    font-family: var(--mono);
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(123, 102, 74, 0.22);
    border: 1px solid rgba(90, 73, 52, 0.28);
    white-space: nowrap;
    color: rgba(43, 36, 25, 0.95);
  }

  /* Body text */
  .arch-survey-card__desc{
    margin: 10px 14px 14px;
    font-family: var(--sans);
    font-size: 13px;
    line-height: 1.55;
    color: var(--muted);
  }

  /* Links inside the card */
  .arch-survey-card a{
    color: rgba(43, 111, 119, 0.98);
    text-decoration: underline;
    text-underline-offset: 2px;
  }
  .arch-survey-card a:hover{
    color: rgba(31, 138, 143, 1);
  }

  /* Chips */
  .arch-survey-chips{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
  }

  .arch-survey-chip{
    font-family: var(--mono);
    font-size: 11px;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--chip-bg);
    border: 1px solid var(--chip-border);
    color: rgba(43, 36, 25, 0.92);
  }

  /* Section divider */
  .arch-survey-card__section{
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(60, 48, 32, 0.14);
  }

  .arch-survey-card__label{
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: rgba(58, 49, 35, 0.70);
    margin-bottom: 8px;
  }

  /* Buttons / links list */
  .arch-survey-links{
    display: grid;
    gap: 8px;
  }

  .arch-survey-btn{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    text-decoration: none;
    font-family: var(--mono);
    font-size: 12px;
    color: rgba(43, 36, 25, 0.92);
  }

  .arch-survey-btn:hover{
    background: var(--btn-bg-hover);
  }

  /* -----------------------------
     Gallery (figures + captions)
     ----------------------------- */

  .arch-survey-gallery{
    margin: 16px auto 8px;
    max-width: min(72vw, 1000px);
  }

  .arch-survey-gallery--four{
    display: grid;
    gap: 12px;
    align-items: start;

    /* Dynamic columns */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .arch-survey-figure{
    margin: 0;
  }

  .arch-survey-figure a{
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255,255,255,0.26);
    border: 1px solid rgba(60, 48, 32, 0.16);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);

    /* subtle hover motion without affecting layout */
    transition: transform 0.12s ease, box-shadow 0.12s ease;
  }

  .arch-survey-figure img.arch-survey-thumb{
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    border-radius: 0; /* handled by the <a> wrapper */
  }

  .arch-survey-figure figcaption{
    margin-top: 6px;
    padding: 0 2px;
    font-family: var(--sans);
    font-size: 12px;
    line-height: 1.25;
    font-weight: 500;
    text-align: left;
    color: rgba(58, 49, 35, 0.78);
  }

  .arch-survey-figure a:hover{
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.35);
  }

  /* Responsive: let gallery breathe on small screens */
  @media (max-width: 760px){
    .arch-survey-gallery{
      max-width: 92vw;
    }
    .arch-survey-card__inner{
      padding: 10px 18px 20px 18px;
    }
    .arch-survey-card__top{
      padding: 16px 18px 0 18px;
      margin: 0 -18px 10px -18px;
    }
  }

  body.dark-mode .arch-survey-figure figcaption{
  color: rgba(235, 230, 220, 0.90);
}



  .student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.student-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: var(--pub-bg, rgba(255,255,255,0.04));
  border: 1px solid var(--pub-border, rgba(255,255,255,0.12));
  border-radius: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.student-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.student-card img {
  width: 150px;
  height: 150px;
  border-radius: 14px; 
  object-fit: cover;
  flex-shrink: 0;
  background: #333;
}

.student-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.student-name {
  font-weight: 600;
  font-size: 1.05em;
}

.student-degree {
  font-size: 0.85em;
  opacity: 0.8;
}

.student-title {
  font-size: 0.9em;
  line-height: 1.4;
}

.student-links a {
  font-size: 0.85em;
  color: #6fa8ff;
  text-decoration: none;
}

.student-links a:hover {
  text-decoration: underline;
}




/* Light mode (default) */
:root{
  --teach-accent: #281bba;

  --teach-bg: #ffffff;
  --teach-bg-2: #eef0fb;

  --teach-border: rgba(47, 33, 203, 0.35);

  --teach-text: #1e1e2a;
  --teach-muted: rgba(30, 30, 42, 0.65);
}

/* Dark mode overrides */
body.dark-mode{
  --teach-accent: #8f8cff;

  --teach-bg: #15151f;
  --teach-bg-2: #1d1d2b;

  --teach-border: rgba(143, 140, 255, 0.35);

  --teach-text: rgba(255, 255, 255, 0.92);
  --teach-muted: rgba(255, 255, 255, 0.65);
}

  .teaching-wrap{
    margin-top: 18px;
  }

  .teaching-header{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border: 1px solid var(--teach-border);
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(40,15,156,0.18), rgba(255,255,255,0.02));
  }

  .teaching-header h2{
    margin: 0;
  }

  .teaching-tools{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
  }

  .teach-search{
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--teach-border);
    background: rgba(0,0,0,0.25);
  }

  .teach-search input{
    width: min(360px, 60vw);
    font-size: 14px;
    color: var(--teach-text);
    border: none;
    outline: none;
    background: transparent;
  }

  .teach-chiprow{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .teach-chip{
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--teach-border);
    background: rgba(255,255,255,0.04);
    color: var(--teach-text);
    cursor: pointer;
    user-select: none;
  }

  .teach-chip[aria-pressed="true"]{
    border-color: rgba(40,15,156,0.65);
    box-shadow: 0 0 0 3px rgba(40,15,156,0.18);
    background: rgba(40,15,156,0.16);
  }

  .teach-groups{
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .teach-group{
    border: 1px solid var(--teach-border);
    border-radius: 12px;
    background: var(--teach-bg);
    overflow: hidden;
  }

  .teach-group summary{
    list-style: none;
    cursor: pointer;
    padding: 12px 14px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    background: rgba(0,0,0,0.12);
  }

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

  .teach-title{
    display: block;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--teach-text);
  }

  .teach-subtitle{
    display: block;
    margin: 0;
    font-size: 12px;
    color: var(--teach-muted);
    white-space: nowrap;
  }

  .teach-summary-copy{
    display: block;
  }

  .teach-grid{
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  @media (max-width: 820px){
    .teach-grid{ grid-template-columns: 1fr; }
    .teach-search input{ width: min(320px, 70vw); }
  }

  .teach-card{
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--teach-border);
    background: rgba(255,255,255,0.03);
    text-decoration: none;
    color: var(--teach-text);
    transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
  }

  .teach-card:hover{
    transform: translateY(-1px);
    border-color: rgba(40,15,156,0.55);
    background: rgba(40,15,156,0.10);
  }

  .teach-card:focus{
    outline: none;
    box-shadow: 0 0 0 3px rgba(40,15,156,0.22);
  }

  .teach-card-top{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .teach-card-name{
    margin: 0;
    font-size: 14px;
    font-weight: 700;
  }

  .teach-badges{
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .teach-badge{
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.04);
    color: var(--teach-muted);
  }

  .teach-badge.accent{
    border-color: rgba(40,15,156,0.55);
    color: rgba(255,255,255,0.88);
    background: rgba(40,15,156,0.16);
  }

  .teach-meta{
    margin-top: 6px;
    font-size: 12px;
    color: var(--teach-muted);
    line-height: 1.35;
  }

  .teach-meta a{
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
  }

  .teach-hidden{
    display: none !important;
  }




/* Publications cards */
.pub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 12px 0 24px 0;
}

@media (min-width: 900px) {
  .pub-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.pub-card {
  border: 1px solid rgba(0,0,0,0.12);
  border-left: 6px solid #280F9C; /* default accent */
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

body.dark-mode .pub-card {
  background: rgba(20,20,20,0.85);
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}

.pub-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.pub-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.pub-title a {
  text-decoration: none;
  color: inherit;
}

.pub-title a:hover {
  text-decoration: underline;
}

.pub-meta {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.9;
}

.pub-authors {
  margin: 6px 0 0 0;
  font-size: 0.95rem;
  opacity: 0.9;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pub-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid rgba(0,0,0,0.18);
  background: rgba(40,15,156,0.08);
  text-decoration: none;
}

body.dark-mode .pub-pill {
  border-color: rgba(255,255,255,0.18);
  background: rgba(40,15,156,0.22);
}

.pub-abstract {
  margin: 10px 0 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(0,0,0,0.04);
  border-left: 3px solid rgba(40,15,156,0.35);
  font-size: 0.95rem;
  line-height: 1.55;
}

body.dark-mode .pub-abstract {
  background: rgba(255,255,255,0.06);
}

/* Colour accents by category */
.pub-card.journal { border-left-color: #0B6E4F; }     /* green */
.pub-card.conference { border-left-color: #1D4ED8; }  /* blue */
.pub-card.whitepaper { border-left-color: #B45309; }  /* amber */
.pub-card.chapter { border-left-color: #7C3AED; }     /* purple */

/* Small badge for year/type */
.pub-badge {
  flex: none;
  font-size: 0.8rem;
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.18);
  background: rgba(0,0,0,0.03);
  opacity: 0.9;
  white-space: nowrap;
}

body.dark-mode .pub-badge {
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
}
  



/* UNM News article cards */
.news-section {
  margin-top: 1.5rem;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin-bottom: 2rem;
  align-items: stretch;
}

.news-card {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.03);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.news-link {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  text-decoration: none;
  color: inherit;
}

.news-thumb {
  display: block;
  width: calc(100% - 24px);
  height: auto;
  aspect-ratio: 16 / 9;
  margin: 12px 12px 0 12px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(0,0,0,0.05);
}

/* Body */
.news-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 12px 14px 16px 14px;
  color: #1e1e2a;
}

.news-meta {
  font-size: 0.9rem;
  line-height: 1.25;
  color: rgba(30,30,42,0.65);
}

.news-title {
  margin: 6px 0 6px 0;
  line-height: 1.2;
  color: #1e1e2a;
}

.news-blurb {
  margin: 0 0 10px 0;
  line-height: 1.35;
  color: rgba(30,30,42,0.75);
}

.news-cta {
  margin-top: auto;
  font-weight: 600;
  color: #281bba;
}

.news-inline-link {
  color: #281bba;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Hover */
.news-card:hover {
  background: rgba(0,0,0,0.05);
  border-color: rgba(40,27,186,0.35);
  transform: translateY(-1px);
}

.news-card:hover .news-title {
  text-decoration: underline;
}

/* =========================================================
   DARK MODE
   ========================================================= */

body.dark-mode .news-card {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.14);
}

body.dark-mode .news-body {
  color: rgba(255,255,255,0.92);
}

body.dark-mode .news-title {
  color: rgba(255,255,255,0.96);
}

body.dark-mode .news-blurb {
  color: rgba(255,255,255,0.75);
}

body.dark-mode .news-meta {
  color: rgba(255,255,255,0.65);
}

body.dark-mode .news-cta,
body.dark-mode .news-inline-link {
  color: #8f8cff;
}

body.dark-mode .news-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(143,140,255,0.45);
}

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

  .news-thumb {
    aspect-ratio: 16 / 10;
  }
}
  


/* Publication filter controls */
.pub-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 10px 0 12px 0;
  font-size: 0.95rem;
  opacity: 0.9;
}

.pub-key {
  display:inline-block;
  width:10px;
  height:10px;
  border-radius:2px;
  margin-right:6px;
}

.pub-key-journal { background:#0B6E4F; }
.pub-key-conference { background:#1D4ED8; }
.pub-key-whitepaper { background:#B45309; }
.pub-key-chapter { background:#7C3AED; }

.pub-intro {
  margin: 0.75rem 0 0.75rem 0;
  max-width: 78rem;
  line-height: 1.45;
}

.pub-filter-wrap {
  margin: 0.5rem 0 0.4rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.25rem;
}

.pub-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  align-items: center;
  min-width: max-content;
}

.pub-filter {
  cursor: pointer;
  font: inherit;
  border: 1px solid rgba(0,0,0,0.18);
  white-space: nowrap;
}

.pub-filter.active {
  font-weight: 700;
  filter: brightness(0.92);
  box-shadow: 0 0 0 2px rgba(40,15,156,0.18) inset;
}

.pub-filter-status {
  min-height: 1.2em;
  margin: 0.35rem 0 1.1rem 0;
  font-size: 0.9rem;
  opacity: 0.78;
}

.pub-tags {
  display: none;
}

.pub-card[hidden] {
  display: none !important;
}

body.dark-mode .pub-filter {
  border-color: rgba(255,255,255,0.18);
}

.pub-filter[data-tag="all"] {
  font-weight: 700;
}


/* Publication filter colour coding */
.pub-filter {
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 120ms ease;
}

.pub-filter:hover {
  transform: translateY(-1px);
}

.pub-filter.active {
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  filter: none;
}

.pub-filter[data-tag="all"].active { background: #280F9C; }
.pub-filter[data-tag="none"].active { background: #111827; }
.pub-filter[data-tag="climate-change"].active { background: #0B6E4F; }
.pub-filter[data-tag="volcanology"].active { background: #B45309; }
.pub-filter[data-tag="infrastructure-monitoring"].active { background: #1D4ED8; }
.pub-filter[data-tag="autonomous-systems"].active { background: #2563EB; }
.pub-filter[data-tag="swarm-robotics"].active { background: #4F46E5; }
.pub-filter[data-tag="biological-search"].active { background: #7C3AED; }
.pub-filter[data-tag="immunology"].active { background: #9333EA; }
.pub-filter[data-tag="causal-discovery"].active { background: #0F766E; }
.pub-filter[data-tag="complex-systems"].active { background: #475569; }
.pub-filter[data-tag="astrobiology"].active { background: #A16207; }
.pub-filter[data-tag="origins-of-life"].active { background: #CA8A04; }
.pub-filter[data-tag="computer-vision"].active { background: #0369A1; }
.pub-filter[data-tag="engineering-education"].active { background: #BE185D; }

.pub-filter[data-tag="all"] {
  border-style: solid;
  border-width: 2px;
}

.pub-filter-status {
  font-weight: 600;
}

body.dark-mode .pub-filter.active {
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.45);
}



/* Crawler-visible publication PDF index */
.pub-pdf-index {
  margin: 0.5rem 0 1.25rem 0;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.025);
  font-size: 0.9rem;
}
.pub-pdf-index summary {
  cursor: pointer;
  font-weight: 700;
}
.pub-pdf-index-note {
  margin: 0.55rem 0;
  opacity: 0.82;
}
.pub-pdf-index ul {
  margin: 0.5rem 0 0 1.25rem;
  padding: 0;
  columns: 2;
  column-gap: 2rem;
}
.pub-pdf-index li {
  break-inside: avoid;
  margin: 0 0 0.35rem 0;
}
body.dark-mode .pub-pdf-index {
  border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.045);
}
@media (max-width: 800px) {
  .pub-pdf-index ul { columns: 1; }
}



/* Crawler-visible teaching materials index */
.teach-link-index {
  margin: 1rem 0 1.5rem 0;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.025);
}

.teach-link-index summary {
  cursor: pointer;
  font-weight: 700;
}

.teach-link-index-note {
  margin: 0.5rem 0 0.75rem 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

.teach-link-index ul {
  columns: 2 22rem;
  margin: 0.5rem 0 0 1.2rem;
  padding: 0;
}

.teach-link-index li {
  break-inside: avoid;
  margin: 0 0 0.35rem 0;
}

body.dark-mode .teach-link-index {
  border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
}



/* Teaching filter pills, matching the publications filter behaviour */
.teach-filter-wrap {
  width: 100%;
  min-width: 0;
}

.teach-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  align-items: center;
  overflow-x: auto;
  padding: 0.25rem 0.1rem 0.45rem 0.1rem;
  scrollbar-width: thin;
  max-width: 100%;
}

.teach-pill {
  display: inline-block;
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  line-height: 1.35;
  border: 1px solid rgba(0,0,0,0.18);
  background: rgba(40,15,156,0.08);
  color: var(--teach-text);
  cursor: pointer;
  font: inherit;
  white-space: nowrap;
}

body.dark-mode .teach-pill {
  border-color: rgba(255,255,255,0.18);
  background: rgba(40,15,156,0.22);
}

.teach-filter.active {
  font-weight: 700;
  color: #fff;
  background: #281bba;
  border-color: rgba(40,27,186,0.8);
  box-shadow: 0 0 0 2px rgba(40,27,186,0.18), 0 2px 8px rgba(0,0,0,0.18);
}

.teach-filter[data-filter="show-all"].active { background: #111827; border-color: #111827; }
.teach-filter[data-filter="hide-all"].active { background: #6B7280; border-color: #6B7280; }
.teach-filter[data-filter="courses"].active { background: #1D4ED8; border-color: #1D4ED8; }
.teach-filter[data-filter="workshops"].active { background: #0B6E4F; border-color: #0B6E4F; }
.teach-filter[data-filter="hpc"].active { background: #C2410C; border-color: #C2410C; }
.teach-filter[data-filter="quantum"].active { background: #7C3AED; border-color: #7C3AED; }
.teach-filter[data-filter="scientific-computing"].active { background: #0F766E; border-color: #0F766E; }
.teach-filter[data-filter="domain-science"].active { background: #166534; border-color: #166534; }

.teach-filter-status {
  margin: 0.25rem 0 0 0;
  font-size: 0.88rem;
  opacity: 0.82;
}

.teach-card[hidden], .teach-group[hidden], .teach-grid[hidden], .teach-subsection-heading[hidden] { display: none !important; }



.pub-filter-wrap {
  overflow-x: visible !important;
  overflow-y: visible !important;
}

.pub-filters {
  display: flex !important;
  flex-wrap: wrap !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  gap: 0.45rem !important;
}

.pub-filter {
  flex: 0 1 auto !important;
  white-space: nowrap !important;
}

/* Dark-mode inactive buttons only */
body.dark-mode .pub-filter:not(.active) {
  color: rgba(255,255,255,0.9) !important;
  background: rgba(143,140,255,0.13) !important;
  border-color: rgba(143,140,255,0.34) !important;
}

/* Preserve existing colour-coded active buttons */
body.dark-mode .pub-filter.active {
  color: #fff !important;
  border-color: transparent !important;
}


/* Selected visual theme */
/* Midnight Aurora — luminous glass over deep space */
body.theme-aurora {
  --sidebar-w: 250px;
  --page-bg: #07101f;
  --page-text: #eaf3ff;
  --link: #69e7ff;
  --sidebar-hover: rgba(116, 92, 255, 0.28);
  --dark-bg: #07101f;
  --dark-panel: rgba(8, 16, 35, 0.86);
  --dark-text: #eaf3ff;
  --dark-link: #75efff;
  background:
    radial-gradient(circle at 78% 5%, rgba(112, 76, 255, 0.28), transparent 34rem),
    radial-gradient(circle at 22% 72%, rgba(0, 218, 190, 0.16), transparent 30rem),
    linear-gradient(145deg, #050914 0%, #0a1830 48%, #07101f 100%) fixed;
  color: #eaf3ff;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

body.theme-aurora::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.13;
  background-image: linear-gradient(rgba(104,231,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(104,231,255,.18) 1px, transparent 1px);
  background-size: 48px 48px;
  content: "";
  pointer-events: none;
}

body.theme-aurora .sidebar {
  border-right: 1px solid rgba(117, 239, 255, 0.22);
  background: rgba(5, 10, 24, 0.82);
  box-shadow: 18px 0 50px rgba(0,0,0,.3);
  backdrop-filter: blur(18px) saturate(135%);
}

body.theme-aurora .sidebar::before {
  display: block;
  margin: 2px 8px 18px;
  color: #75efff;
  content: "INTERFACE // 01";
  font: 700 11px/1.3 "Space Mono", monospace;
  letter-spacing: .16em;
}

body.theme-aurora .sidebar a { color: #b9d9ff; border: 1px solid transparent; }
body.theme-aurora .sidebar a:hover { color: #fff; border-color: rgba(117,239,255,.28); background: linear-gradient(90deg,rgba(117,239,255,.13),rgba(124,92,255,.18)); }
body.theme-aurora .sidebar-heading { color: #75efff; border-left-color: #755cff; font-family: "Space Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
body.theme-aurora .main-content { padding: 18px clamp(18px,3vw,54px) 60px; }
body.theme-aurora #name-heading { color: #fff; font: 700 clamp(0.825rem,1.3vw,1.4rem)/1 Georgia,serif; letter-spacing: -.055em; text-shadow: 0 0 28px rgba(105,231,255,.24); }
body.theme-aurora .header { margin-bottom: 18px; border-bottom: 1px solid rgba(117,239,255,.2); }
body.theme-aurora h2 { margin-top: 2.4rem; color: #fff; font-family: "Space Mono",monospace; font-size: clamp(1.15rem,2vw,1.6rem); letter-spacing: -.04em; }
body.theme-aurora h2::before { color: #75efff; content: "// "; }
body.theme-aurora h3 { color: #bfaeff; }
body.theme-aurora a { color: #75efff; text-decoration-color: rgba(117,239,255,.45); text-underline-offset: 3px; }
body.theme-aurora a:visited { color: #c6a9ff; }
body.theme-aurora .bio-photo { padding: 4px; border: 1px solid rgba(117,239,255,.6); border-radius: 18px 4px 18px 4px; box-shadow: 0 0 34px rgba(105,231,255,.2); }
body.theme-aurora .carousel-container { border: 1px solid rgba(117,239,255,.42); border-radius: 18px; background: #030711; box-shadow: 0 22px 70px rgba(0,0,0,.45),0 0 40px rgba(110,83,255,.16); }
body.theme-aurora .carousel-item, body.theme-aurora .carousel-item img, body.theme-aurora .carousel-item video { background: #030711; }
body.theme-aurora .carousel-caption { color: #eaf3ff; background: rgba(4,10,25,.86); backdrop-filter: blur(12px); }
body.theme-aurora .carousel-control { border-color: rgba(117,239,255,.5); background: rgba(5,12,28,.58); color: #75efff; }
body.theme-aurora :is(.pub-card,.student-card,.news-card,.arch-survey-card,.teach-group,.teach-card) { border: 1px solid rgba(117,239,255,.18); background: linear-gradient(145deg,rgba(18,34,61,.78),rgba(10,18,37,.72)); color: #eaf3ff; box-shadow: 0 14px 38px rgba(0,0,0,.22); backdrop-filter: blur(12px); }
body.theme-aurora :is(.pub-card,.student-card,.news-card,.arch-survey-card,.teach-card):hover { border-color: rgba(117,239,255,.5); box-shadow: 0 18px 50px rgba(0,0,0,.3),0 0 26px rgba(105,231,255,.09); transform: translateY(-2px); }
body.theme-aurora :is(.pub-filter,.teach-filter,.teach-chip,.pub-pill,.arch-survey-btn,button) { border-color: rgba(117,239,255,.32); background: rgba(117,239,255,.08); color: #dffaff; }
body.theme-aurora :is(input,textarea,select) { border-color: rgba(117,239,255,.35); background: rgba(3,7,17,.8); color: #fff; }
body.theme-aurora table { border-collapse: collapse; background: rgba(8,16,35,.65); }
body.theme-aurora th { background: rgba(117,239,255,.12); color: #75efff; }
body.theme-aurora td, body.theme-aurora th { border: 1px solid rgba(117,239,255,.18); padding: .65rem; }
body.theme-aurora iframe { border-radius: 14px; border: 1px solid rgba(117,239,255,.2) !important; }
@media (max-width:1050px){body.theme-aurora .sidebar{background:#07101f} body.theme-aurora .main-content{padding-top:16px}}
/* Shared style selector */
.style-picker {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 5px;
  margin: 8px 0 14px;
}
.style-picker a {
  display: grid;
  min-width: 0;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 8px;
  font: 700 11px/1 "Space Mono", monospace;
  text-decoration: none;
  opacity: 1;
}
.style-picker a:hover,
.style-picker a[aria-current="true"] {
  opacity: 1;
  transform: translateY(-1px);
}
.style-picker a[aria-current="true"] {
  box-shadow: inset 0 0 0 2px currentColor;
}
/* STYLE 1 LIGHT/DARK PAIR — Aurora Day / Aurora Night */
body.theme-aurora:not(.dark-mode) {
  --page-bg:#eaf4f8;--page-text:#172936;--link:#176987;
  background:radial-gradient(circle at 80% 4%,rgba(138,117,255,.2),transparent 30rem),radial-gradient(circle at 15% 82%,rgba(50,190,181,.15),transparent 32rem),linear-gradient(145deg,#f6fbfd 0%,#dcecf2 50%,#edf7f8 100%) fixed;color:#172936;
}
body.theme-aurora:not(.dark-mode)::before{opacity:.08;filter:saturate(.55)}
body.theme-aurora:not(.dark-mode) .sidebar{border-right-color:rgba(34,97,119,.17);background:rgba(238,248,251,.78);box-shadow:14px 0 44px rgba(36,76,91,.12);}
body.theme-aurora:not(.dark-mode) .sidebar::before{color:#276b80;background:rgba(255,255,255,.42);border-color:rgba(34,97,119,.17)}
body.theme-aurora:not(.dark-mode) .sidebar a{color:#28556a}body.theme-aurora:not(.dark-mode) .sidebar a:hover{color:#12394b;background:linear-gradient(90deg,rgba(60,170,183,.12),rgba(123,99,203,.1));}
body.theme-aurora:not(.dark-mode) .sidebar-heading{color:#39758a;border-left-color:#8375be}
body.theme-aurora:not(.dark-mode) #name-heading,body.theme-aurora:not(.dark-mode) h2{color:#172936;text-shadow:none}body.theme-aurora:not(.dark-mode) h2::before{color:#398aa0}
body.theme-aurora:not(.dark-mode) a{color:#176987}body.theme-aurora:not(.dark-mode) a:visited{color:#695c91}
body.theme-aurora:not(.dark-mode) .bio-photo{border-color:rgba(32,108,132,.3);background:rgba(255,255,255,.46);box-shadow:0 14px 34px rgba(40,83,99,.16),0 0 25px rgba(46,166,181,.1)}
body.theme-aurora:not(.dark-mode) .carousel-container{border-color:rgba(32,108,132,.24);background:rgba(248,253,254,.72);box-shadow:0 22px 62px rgba(40,83,99,.18),0 0 30px rgba(121,101,199,.1)}
body.theme-aurora:not(.dark-mode) .carousel-item,body.theme-aurora:not(.dark-mode) .carousel-item img,body.theme-aurora:not(.dark-mode) .carousel-item video{background:#edf7fa}body.theme-aurora:not(.dark-mode) .carousel-caption{background:rgba(238,248,250,.88);color:#203846}
body.theme-aurora:not(.dark-mode) :is(.pub-card,.student-card,.news-card,.arch-survey-card,.teach-group,.teach-card){border-color:rgba(34,97,119,.16);background:linear-gradient(145deg,rgba(255,255,255,.72),rgba(224,239,244,.58));color:#172936;box-shadow:0 13px 34px rgba(40,83,99,.12)}
body.theme-aurora:not(.dark-mode) :is(.news-body,.news-title,.news-blurb,.student-info,.teach-title,.teach-meta,.arch-survey-card__desc){color:#172936}
body.theme-aurora:not(.dark-mode) :is(.pub-filter,.teach-filter,.teach-chip,.pub-pill,.arch-survey-btn,button){border-color:rgba(34,97,119,.2);background:rgba(255,255,255,.54);color:#28556a}
body.theme-aurora:not(.dark-mode) :is(input,textarea,select),body.theme-aurora:not(.dark-mode) #site-search-box{border-color:rgba(34,97,119,.2);background:rgba(255,255,255,.72);color:#172936}
body.theme-aurora:not(.dark-mode) .site-search-result{background:rgba(246,252,253,.94);color:#172936}body.theme-aurora:not(.dark-mode) table{background:rgba(255,255,255,.58)}body.theme-aurora:not(.dark-mode) th{color:#28556a;background:rgba(48,140,160,.1)}
body.theme-aurora.dark-mode{background:radial-gradient(circle at 78% 5%,rgba(112,76,255,.28),transparent 34rem),radial-gradient(circle at 22% 72%,rgba(0,218,190,.16),transparent 30rem),linear-gradient(145deg,#050914 0%,#0a1830 48%,#07101f 100%) fixed;color:#eaf3ff}
body.theme-aurora.dark-mode #name-heading,body.theme-aurora.dark-mode h2{color:#fff}

/* FINAL LLM contrast invariant — must remain after all mode rules. */
.site-search-result {
  color-scheme: dark;
  border: 1px solid rgba(215, 226, 238, 0.22) !important;
  border-left: 4px solid #6f91ad !important;
  background: #090c10 !important;
  color: #ffffff !important;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.42) !important;
}
.site-search-result a { color: #a9d8ff; }
.site-search-result a:visited { color: #d3bdf1; }
/* The style picker replaces the decorative menu title. */
.sidebar::before { display: none !important; content: none !important; }
.style-picker--top { margin: 2px 0 16px; }
/* Comprehensive component contrast contract. Streamed LLM response descendants are excluded. */
body.theme-aurora:not(.dark-mode){--ui-text:#172936;--ui-muted:#355463;--ui-link:#155f7a;--ui-control-bg:#ffffff;--ui-control-text:#172936;--ui-sidebar-text:#28556a;}
body.theme-aurora.dark-mode{--ui-text:#f4f8fb;--ui-muted:#c4d3dd;--ui-link:#86ddf5;--ui-control-bg:#101b2c;--ui-control-text:#ffffff;--ui-sidebar-text:#eaf3ff;}
body.theme-aurora .main-content :is(p,li,label,summary,figcaption,.pub-title,.pub-authors,.pub-meta,.pub-abstract,.news-title,.news-blurb,.news-meta,.student-name,.student-degree,.student-title,.teach-title,.teach-meta,.arch-survey-card__title,.arch-survey-card__desc,.arch-survey-card__meta):not(.site-search-result *){color:var(--ui-text)!important}
body.theme-aurora .main-content :is(.pub-meta,.news-meta,.student-degree,.teach-meta,.arch-survey-card__meta,figcaption):not(.site-search-result *){color:var(--ui-muted)!important}
body.theme-aurora .main-content a:not(.site-search-result *){color:var(--ui-link)!important}
body.theme-aurora .sidebar :is(a,.sidebar-heading),body.theme-aurora .style-description{color:var(--ui-sidebar-text)!important}
body.theme-aurora .style-description{margin:0 2px 14px;padding:7px 8px;border:1px solid currentColor;border-radius:6px;background:var(--ui-control-bg);color:var(--ui-control-text)!important;font:700 9px/1.3 "Space Mono",monospace;text-align:center;letter-spacing:.02em}
body.theme-aurora :is(.pub-filter,.teach-filter,.teach-chip,.pub-pill,.arch-survey-btn,.teach-badge){border-color:var(--ui-text)!important;background:var(--ui-control-bg)!important;color:var(--ui-control-text)!important}
body.theme-aurora :is(input,textarea,select),body.theme-aurora #site-search-box{border-color:var(--ui-muted)!important;background:var(--ui-control-bg)!important;color:var(--ui-control-text)!important}
body.theme-aurora :is(input,textarea)::placeholder{color:var(--ui-control-text)!important;opacity:1!important}
body.theme-aurora .site-search-welcome{color:var(--ui-control-text)!important;opacity:1;text-shadow:none}
body.theme-aurora .carousel-caption{border-top-color:rgba(255,255,255,.28)!important;background:#10151b!important;color:#ffffff!important}
/* Wide custom caret for the LLM input. */
#site-search-box { caret-color: transparent !important; }
.site-search-input-caret {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: none;
  width: 3px;
  border-radius: 1px;
  background: currentColor;
  box-shadow: 0 0 0 1px rgba(0,0,0,.45);
  pointer-events: none;
  transform: translateY(-50%);
  animation: llm-input-caret-blink 1s steps(1,end) infinite;
}
.site-search-input-caret.is-visible { display: block; }
.site-search-welcome::after { width: 3px !important; background: currentColor !important; }
@keyframes llm-input-caret-blink { 0%,48%{opacity:1}49%,100%{opacity:0} }
@media (prefers-reduced-motion: reduce) {
  .site-search-input-caret { animation: none; }
}
/* Mobile biography: wrap the opening paragraph around the portrait. */
@media (max-width: 700px) {
  .intro-bio {
    display: block !important;
    min-width: 0;
  }

  .bio-photo {
    float: left !important;
    display: block !important;
    width: clamp(95px, 28vw, 125px) !important;
    max-width: 125px !important;
    height: auto !important;
    margin: 0 16px 10px 0 !important;
    border-radius: 12px;
  }

  .bio-text {
    display: block !important;
    min-width: 0;
  }

  .bio-text p {
    margin-top: 0;
  }

  .intro-bio::after {
    display: block;
    clear: both;
    content: "";
  }
}