/* ==== Base Styles ==== */
:root {
  --bg-color: #fff;
  --text-color: #222;
  --card-border: #ccc;
  --photo-bg: #eee;
  --link-color: #004499;
}
html.dark-mode {
  --bg-color: #111;
  --text-color: #eee;
  --card-border: #555;
  --photo-bg: #444;
  --link-color: #ADD8E6;
}

body {
  font-family: system-ui, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
}

a {
  color: var(--link-color);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ==== Header & Nav ==== */
header, footer {
  background: #222;
  color: #fff;
  padding: 1rem;
}

/* Override link colors in header/nav for dark background */
header a,
header nav a,
footer a {
  color: #fff;
}
header a:hover,
header nav a:hover,
footer a:hover {
  color: #ddd;
}

.logo-container {
  text-align: center;
  padding-bottom: 0.5rem;
}
.logo-container .site-logo {
  max-height: 120px;  /* Bigger logo */
  width: auto;
  display: block;
  margin: 0 auto;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}
nav a {
  margin: 0.5rem;
}

/* ==== Main Content ==== */
main {
  padding: 1rem;
}

/* ==== Social Icons ==== */
.social a {
  margin-left: 0.5rem;
  font-size: 1.3rem;
  display: inline-flex;
  align-items: center;
}
.social svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ==== People Page (and any grid-based page) ==== */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 2rem 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* Single‐column fallback on phones */
@media (max-width: 600px) {
  .people-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }
}

/* ==== Person Card ==== */
.person-card {
  background: var(--bg-color);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ==== Photo Styling ==== */
.person-photo {
  width: 120px;
  height: 120px;
  background: var(--photo-bg);
  border-radius: 50%;
  margin: 0 auto 1rem;

  /* add this so the container actually clips down to a circle */
  overflow: hidden;
}

.person-photo img {
  /* make the image fill the circle and crop to fit */
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;  /* remove any inline whitespace artifacts */
}

/* ==== Responsive tweaks ==== */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    align-items: flex-start;
  }
  .logo-container {
    padding-bottom: 1rem;
  }
  .site-logo {
    max-height: 60px;
  }
}

/* ==== Dark‐mode via media query (optional fallback) ==== */
@media (prefers-color-scheme: dark) {
  header, footer {
    background: #000;
  }
  nav a {
    color: #eee;
  }
}

/* ==== Overrides for mobile DuckDuckGo ==== */
.bio-section .person-photo {
  border-radius: 50% !important;
  overflow: hidden !important;
  margin-bottom: 1.25rem !important;
}

.bio-section .person-photo img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.bio-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.bio-section h2 {
  margin-top: 0;
  padding-top: 0.5rem;
}
