:root {
  --bg: #ffffff;
  --text: #000000;
  --muted: #555555;

  /* University of South Carolina colors */
  --brand: #73000a;
  --brand-dark: #4a0006;
  --brand-light: #f5e8ea;
  --brand-dark-actual: #570008;
  --brand-light-actual: #844247;

  --surface: #f7f2f3;
  --border: #e2d4d6;
  --focus: #ffbf47;

  --max-width: 1120px;
  --radius: 18px;
  --shadow-soft: 0 6px 18px rgba(115, 0, 10, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--brand-dark);
}

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

a:focus-visible,
button:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--text);
  color: #fff;
  border-radius: 0.5rem;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  border-bottom: 2px solid var(--border);
  background: #000;
  color: #fff;
}

.header-inner,
main,
.footer-inner {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--bg);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-link:hover {
  color: var(--brand);
}

.site-title-text {
  display: inline-flex;
  flex-direction: column;
}

.site-title-text span {
  color: #ffffff;
  font-size: 0.9rem;
  border-bottom: 2px solid var(--brand);
  padding-bottom: 2px;
}

.site-logo {
  height: 60px;
  width: auto;
}

.site-title {
  display: inline-flex;
  flex-direction: column;
  color: var(--bg);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-title:hover {
  color: var(--brand);
}

.site-title span {
  color: #ffffff;
  font-size: 0.9rem;
  border-bottom: 2px solid var(--brand);
  padding-bottom: 2px;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  display: inline-block;
  padding: 0.65rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  color: var(--bg);
}

.nav-list a[aria-current="page"],
.nav-list a:hover {
  background: var(--brand-dark-actual);
  color: var(--bg);
}

/* Updated main section styling */
main {
  padding: 2rem 0 4rem;
}

.hero {
  margin: 2rem 0;
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand-light), #ffffff);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.hero p {
  max-width: 70ch;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.15rem;
}

section {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: clamp(1.25rem, 3vw, 2rem);
  margin-block: 1.5rem;
}

section:first-of-type {
  border-top: 6px solid var(--brand);
}

h1,
h2,
h3 {
  line-height: 1.2;
  color: #111111;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 4rem);
  margin: 0 0 0.75rem;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  margin-top: 2.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 3px solid var(--brand);
}

section h2:first-child,
.card h2:first-child {
  margin-top: 0;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
  color: var(--brand);
}

.eyebrow {
  color: var(--brand-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  margin: 0 0 0.5rem;
}

.lede,
.intro,
.hero-text {
  font-size: 1.18rem;
  color: var(--muted);
}

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

.card,
.publication,
.news-item {
  text-align: center;
}

.card h2,
.card h3,
.publication h3,
.news-item h3 {
  text-align: center;
}

.card p,
.publication p,
.news-item p {
  text-align: center;
}

.card,
.callout {
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-link:hover .card {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.callout {
  background: var(--brand-light);
  border-left: 6px solid var(--brand);
}

.news-list,
.publication-list {
  padding-left: 1.25rem;
}

.news-list li,
.publication-list li {
  margin-block: 0.8rem;
}

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

.profile-placeholder {
  min-height: 220px;
  border-radius: 1rem;
  border: 1px dashed var(--border);
  background: var(--brand-light);
  display: grid;
  place-items: center;
  color: var(--brand);
  font-weight: 700;
  text-align: center;
  padding: 1rem;
}

.profile-photo {
  width: 280px;
  max-width: 100%;
}

.profile-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.button-link {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.button-link:hover {
  background: var(--brand-dark);
  color: #fff;
}
.lab-photo figure,
.photo-gallery figure {
  margin: 1.25rem 0 0;
}

.lab-photo img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.gallery-grid figure {
  margin: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.gallery-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.lab-photo figcaption,
.gallery-grid figcaption {
  padding: 0.75rem 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.88);
}

.lightbox.open {
  display: flex;
}

.lightbox-img {
  display: block;
  max-width: min(96vw, 1200px);
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.75rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.lightbox button {
  position: absolute;
  border: none;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  line-height: 1;
  transition: background 160ms ease;
}

.lightbox button:hover {
  background: rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
  font-size: 2.5rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

body.lightbox-open {
  overflow: hidden;
}

.site-footer {
  margin-top: 4rem;
  border-top: 2px solid var(--border);
  background: #000;
}

.footer-inner {
  padding: 1.5rem 0;
  color: #fff;
}

.footer-inner p {
  margin: 0.25rem 0;
}

.footer-inner a {
  color: #fff;
}

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

@media (min-width: 760px) {
  .profile {
    grid-template-columns: 280px 1fr;
  }
}
