:root {
  --crimson: #a6093d;
  --crimson-dark: #7a0630;
  --grey-band: #f2f2f2;
  --yellow-band: #fdf6e3;
  --lightblue-band: #eaf3fb;
  --blue-band: #dcebfa;
  --text: #2b2b2b;
  --muted: #5e6a71;
  --max-width: 1100px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  line-height: 1.55;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

h1, h2, h3, h4 { line-height: 1.2; }
h2 { font-size: 1.9rem; margin-top: 0; color: var(--crimson-dark); }
h3 { font-size: 1.3rem; }
a { color: var(--crimson); }
a:hover { color: var(--crimson-dark); }
.prose a, .focus a, .project-body a, .software-body a, .course-body a, .pub-list a {
  text-decoration: underline;
}

a:focus-visible, .nav-toggle-label:focus-visible, .brand:focus-visible {
  outline: 3px solid var(--crimson-dark);
  outline-offset: 2px;
}
.site-header :focus-visible { outline-color: #fff; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  color: var(--crimson-dark);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  font-weight: 700;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

img { max-width: 100%; height: auto; }

/* Header / nav */
.site-header {
  background: var(--crimson);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.brand {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  font-size: 1.1rem;
}
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.site-nav a:hover { text-decoration: underline; }
.nav-toggle, .nav-toggle-label { display: none; }

@media (max-width: 720px) {
  .nav-toggle {
    /* Visually hidden but still focusable/keyboard-operable (unlike display:none) */
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    display: block;
  }
  .nav-toggle:focus-visible ~ .nav-toggle-label {
    outline: 3px solid #fff;
    outline-offset: 2px;
  }
  .nav-toggle-label {
    display: block;
    cursor: pointer;
    width: 28px;
    height: 22px;
    position: relative;
  }
  .nav-toggle-label span,
  .nav-toggle-label span::before,
  .nav-toggle-label span::after {
    content: "";
    position: absolute;
    left: 0;
    width: 28px;
    height: 3px;
    background: #fff;
  }
  .nav-toggle-label span { top: 10px; }
  .nav-toggle-label span::before { top: -8px; }
  .nav-toggle-label span::after { top: 8px; }
  .site-nav {
    display: none;
    width: 100%;
    order: 3;
  }
  .site-nav ul { flex-direction: column; gap: 0; padding-top: 0.5rem; }
  .site-nav li { border-top: 1px solid rgba(255,255,255,0.2); }
  .site-nav a { display: block; padding: 0.6rem 0; }
  .nav-toggle:checked ~ .site-nav { display: block; }
}

/* Hero */
.hero {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
}
.hero-overlay {
  background: linear-gradient(180deg, rgba(30,10,20,0.55), rgba(122,6,48,0.75));
  padding: 4.5rem 0;
}
.hero-inner { text-align: center; }
.hero h1 {
  margin: 1rem 0 0;
  font-size: 2.4rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.hero-logo-plate {
  display: inline-block;
  background: #fff;
  padding: 0.9rem 1.4rem;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}
.hero-logo { max-width: 220px; display: block; }

@media (max-width: 600px) {
  .hero-overlay { padding: 3rem 0; }
  .hero h1 { font-size: 1.7rem; }
}

/* Bands */
.band { padding: 3rem 0; }
.band-white { background: #fff; }
.band-grey { background: var(--grey-band); }
.band-yellow { background: var(--yellow-band); }
.band-lightblue { background: var(--lightblue-band); }
.band-blue { background: var(--blue-band); }

.prose img { border-radius: 4px; }
.profile-photo {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 6px;
  float: left;
  margin: 0 1.25rem 0.75rem 0;
}
@media (max-width: 500px) {
  .profile-photo { float: none; display: block; margin: 0 auto 1rem; }
}

/* Projects */
.project-list { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.project { background: #fff; padding: 1.25rem; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.project-logo { max-height: 80px; max-width: 140px; float: right; margin-left: 1rem; }
.project .meta { color: var(--muted); font-size: 0.9rem; }

/* People */
.people-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 2rem; }
.person { text-align: center; }
.person-photo { width: 100%; max-width: 200px; aspect-ratio: 3/4; object-fit: cover; border-radius: 6px; }
.person h4 { margin: 0.6rem 0 0.1rem; }
.person .position { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.5rem; }
.person .focus { font-size: 0.9rem; text-align: left; }

/* Publications */
.pub-list { padding-left: 1.25rem; }
.pub-list li { margin-bottom: 0.6rem; }

/* Software */
.software-list { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.software-card { background: #fff; padding: 1.25rem; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.software-logo { max-height: 60px; margin-bottom: 0.5rem; }

/* Teaching */
.course { margin-bottom: 2rem; }
.meta-list { padding-left: 1.25rem; }

/* Footer */
.site-footer {
  background: #222;
  color: #ccc;
  text-align: center;
  padding: 1.5rem 0;
  font-size: 0.85rem;
}
