/* ==========================================================================
   Swank Program — Minimal CSS
   ========================================================================== */

/* --- Custom Properties --- */
:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-text-secondary: #555555;
  --color-text-light: #999999;
  --color-accent: #2c5530;
  --color-accent-hover: #1a3a1f;
  --color-border: #e5e5e5;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 960px;
  --nav-height: 64px;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Base --- */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; margin-bottom: 1.5rem; }
h3 { font-size: 1.1rem; margin-bottom: 0.75rem; }

/* --- Navigation --- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}

.nav-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55%;
}

.nav-logo:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--color-text-secondary);
  text-transform: lowercase;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* Hamburger button */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  position: relative;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  position: absolute;
  left: 9px;
}

.hamburger {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger::before {
  content: '';
  top: -7px;
}

.hamburger::after {
  content: '';
  top: 7px;
}

.nav-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* --- Skip Link (accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-accent);
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 3px;
  z-index: 200;
  text-decoration: none;
  font-size: 0.9rem;
}

.skip-link:focus {
  top: 0.5rem;
  color: #ffffff;
  text-decoration: none;
}

/* --- Hero Image (clean, no overlay) --- */
.hero {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  overflow: hidden;
  background: var(--color-border);
  line-height: 0;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--color-bg));
  pointer-events: none;
}

.hero-image {
  width: 100%;
  height: 35vh;
  min-height: 220px;
  object-fit: cover;
  object-position: center;
}

/* --- Main Content --- */
main {
  min-height: calc(100vh - var(--nav-height) - 160px);
}

/* --- Page Layout --- */
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing-lg) var(--spacing-md) var(--spacing-lg);
}

.page-header {
  margin-bottom: var(--spacing-lg);
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
}

/* --- Homepage Sections --- */
.mission {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 3.5rem var(--spacing-md) var(--spacing-lg);
}

.mission-statement {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 1.5rem;
}

.mission-detail {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* --- Highlights Grid --- */
.highlights {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem var(--spacing-md) var(--spacing-lg);
  border-top: 1px solid var(--color-border);
}

.highlights-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.highlight-card {
  padding: 0;
  transition: transform 0.2s ease;
  cursor: default;
}

.highlight-card:hover {
  transform: translateY(-2px);
}

.highlight-card h3 {
  margin-bottom: 0.5rem;
}

.highlight-card p {
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.highlight-card .card-link {
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.highlight-card .card-link:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

/* --- Newsletter CTA (homepage) --- */
.newsletter-cta {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem var(--spacing-md) var(--spacing-lg);
  border-top: 1px solid var(--color-border);
}

.newsletter-cta p {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.newsletter-btn {
  display: inline-block;
  background: var(--color-accent);
  color: #ffffff;
  padding: 0.65rem 1.5rem;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease;
}

.newsletter-btn:hover {
  background: var(--color-accent-hover);
  color: #ffffff;
  text-decoration: none;
}

/* --- Events Section (homepage) --- */
.events {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem var(--spacing-md) var(--spacing-lg);
  border-top: 1px solid var(--color-border);
}

.events h2 {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.events-list {
  margin-top: 1.5rem;
}

.event-entry {
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.event-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.event-entry-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.event-entry-meta {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

/* --- People Page --- */
.people-section {
  margin-bottom: var(--spacing-lg);
}

.people-section h2 {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

/* Featured faculty member */
.faculty-featured {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-top: 2rem;
}

.faculty-photo {
  width: 200px;
  min-width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 5px;
  background: var(--color-border);
}

.faculty-info h3 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.faculty-title {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.faculty-dept {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.faculty-bio {
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.faculty-link {
  font-size: 0.95rem;
  font-weight: 600;
}

/* People grid */
.people-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.person-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.2s ease;
}

.person-card:hover {
  transform: translateY(-2px);
}

.person-photo {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 5px;
  background: var(--color-border);
  margin-bottom: 0.75rem;
}

.person-card h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.person-role {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

/* --- Research / Publications --- */
.pub-section {
  margin-bottom: var(--spacing-lg);
}

.pub-section h2 {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.pub-list {
  margin-top: 1.5rem;
}

.pub-entry {
  padding-bottom: 1.75rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--color-border);
}

.pub-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.pub-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.pub-title a {
  color: var(--color-accent);
  text-decoration: none;
}

.pub-title a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

.pub-authors {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.pub-venue {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-style: italic;
}

.pub-links {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pub-link {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  color: var(--color-accent);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.pub-link:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-hover);
  text-decoration: none;
}

/* --- Outreach Page --- */
.outreach-section {
  margin-bottom: var(--spacing-lg);
}

.outreach-section h2 {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.outreach-list {
  margin-top: 1.5rem;
}

.outreach-entry {
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.outreach-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.outreach-entry-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.outreach-entry-meta {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

/* --- Data Page --- */
.data-section {
  margin-bottom: var(--spacing-lg);
}

.data-section h2 {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.dataset-list {
  margin-top: 1.5rem;
}

.dataset-entry {
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.dataset-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.dataset-entry h3 {
  margin-bottom: 0.25rem;
}

.dataset-entry p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- 404 --- */
.page-404 {
  text-align: center;
  padding: var(--spacing-lg) var(--spacing-md);
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-404 h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.page-404 p {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--spacing-lg) var(--spacing-md) var(--spacing-md);
  text-align: center;
}

.footer-inner p {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* --- Utility --- */
.section-intro {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 700px;
}

.placeholder-note {
  color: var(--color-text-secondary);
  font-style: italic;
  padding: 1.5rem 0;
}

/* ==========================================================================
   Responsive — Tablet (768px+)
   ========================================================================== */
@media (min-width: 768px) {
  .hero-image {
    height: 50vh;
    max-height: 560px;
  }

  .highlights-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .people-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   Responsive — Desktop (1024px+)
   ========================================================================== */
@media (min-width: 1024px) {
  .page {
    padding: var(--spacing-lg);
  }

  .mission {
    padding: 3.5rem var(--spacing-lg) var(--spacing-lg);
  }

  .highlights {
    padding: 3rem var(--spacing-lg) var(--spacing-lg);
  }

  .events {
    padding: 3rem var(--spacing-lg) var(--spacing-lg);
  }

  .people-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   Responsive — Mobile (below 768px)
   ========================================================================== */
@media (max-width: 767px) {
  .page {
    padding: 2rem 1.5rem;
  }

  .mission {
    padding: 2.5rem 1.5rem 3rem;
  }

  .highlights {
    padding: 2.5rem 1.5rem 3rem;
  }

  .events {
    padding: 2.5rem 1.5rem 3rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    top: var(--nav-height);
    background: var(--color-bg);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 3rem;
    gap: 2rem;
    z-index: 99;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.2rem;
  }

  body.nav-open {
    overflow: hidden;
  }

  .pub-link {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
  }

  .faculty-featured {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .faculty-photo {
    width: 160px;
    min-width: 160px;
    height: 160px;
  }
}

/* ==========================================================================
   Lazy loading
   ========================================================================== */
img[loading="lazy"] {
  opacity: 1;
  transition: opacity 0.3s ease;
}
