/* St. Lawrence University Brand Identity Styles */
:root {
  /* Core Brand Colors */
  --slu-scarlet: #AA182C;
  --slu-brown: #653A2B;
  --slu-tan: #D5BA8C;
  --slu-white: #FFFFFF;
  
  /* Complementary Palette */
  --slu-warm-gray: #827871;
  --slu-lt-warm-gray: #B3ADA6;
  --bg-light: #F8FAFC;
  
  /* Functional Mapping */
  --primary: var(--slu-brown);
  --accent: var(--slu-scarlet);
  --bg: var(--bg-light);
  --card-bg: var(--slu-white);
  --text: #333333;
  --text-dark: var(--slu-brown);
  --border: #E2E8F0;
}

* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

body {
  /* Preferred Fallback Typography per SLU Brand Guide Page 19 */
  font-family: "Avenir", "Verdana", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Headings use Academic Serif Fallback (Requiem Alternate) */
h1, h2, h3 {
  font-family: "Garamond", "Times New Roman", serif;
  color: var(--text-dark);
  font-weight: 700;
}

/* Navigation Bar */
header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--slu-scarlet);
  z-index: 100;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  gap: 1rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--slu-brown);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--slu-scarlet);
  border-bottom-color: var(--slu-scarlet);
}

/* Anti-Bot Action Buttons */
.contact-actions {
  display: flex;
  gap: 0.5rem;
}

.btn {
  padding: 0.5rem 0.9rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--slu-brown);
  background: var(--card-bg);
  color: var(--slu-brown);
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--slu-scarlet);
  color: var(--slu-white);
  border: 1px solid var(--slu-scarlet);
}

.btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* Containers and Content Sections */
main {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.25rem;
}

section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-top: 4px solid var(--slu-brown);
  border-radius: 6px;
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

h2 {
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--slu-tan);
  padding-bottom: 0.5rem;
  color: var(--slu-brown);
}

.item-card {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.item-card:last-child {
  border-bottom: none;
}

.item-title {
  font-family: "Garamond", "Times New Roman", serif;
  font-weight: 700;
  color: var(--slu-brown);
  font-size: 1.15rem;
}

.meta {
  font-size: 0.85rem;
  color: var(--slu-warm-gray);
  margin-top: 0.25rem;
}

.badge {
  display: inline-block;
  background: var(--slu-scarlet);
  color: var(--slu-white);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 0.4rem;
}

.tag {
  display: inline-block;
  background: #F2EFE9;
  color: var(--slu-brown);
  border: 1px solid var(--slu-tan);
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  font-size: 0.75rem;
  margin-right: 0.3rem;
  margin-top: 0.4rem;
}

/* Responsive Rules */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .nav-links {
    justify-content: space-between;
    width: 100%;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
  }

  .contact-actions {
    width: 100%;
  }

  .contact-actions .btn {
    flex: 1;
    text-align: center;
  }
}

/* Personal Interest Cards */
.interest-card {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.interest-card:last-child {
  border-bottom: none;
}

.interest-title {
  font-family: "Garamond", "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--slu-brown);
  margin-bottom: 0.5rem;
}

.interest-description {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
}

/* Personal Interest Gallery Grid */
.personal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.personal-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--slu-tan);
}

@media (max-width: 600px) {
  .personal-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* Header Name Styling */
.header-brand {
  text-decoration: none;
  display: inline-block;
}

.brand-name {
  font-family: "Garamond", "Times New Roman", serif; /* Serif fallback for SLU Requiem font */
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--slu-brown); /* Core SLU Brown #653A2B */
  transition: color 0.2s ease;
  white-space: nowrap;
}

.header-brand:hover .brand-name {
  color: var(--slu-scarlet); /* Core SLU Scarlet #AA182C on hover */
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
  }

  .nav-links {
    justify-content: center;
    gap: 1.25rem;
    width: 100%;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
  }
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */
footer {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  background-color: #FBF9F5;
  padding: 1.5rem 1rem;
  font-size: 0.85rem;
  color: var(--slu-warm-gray);
  text-align: center;
}

.footer-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
  justify-content: center;
}

.footer-container p {
  margin: 0;
  line-height: 1.4;
}

.footer-container .copyright {
  font-weight: 600;
  color: var(--slu-brown);
}

.footer-container .credits {
  font-size: 0.8rem;
  color: #666666;
  font-style: italic;
}

@media (max-width: 600px) {
  footer {
    padding: 1.25rem 0.75rem;
  }
}

/* Compact Markdown Bullet Lists */
#teaching-intro ul,
#research-intro ul,
.project-abstract ul {
  margin: 0.35rem 0 0.5rem 1.25rem;
  padding: 0;
}

#teaching-intro li,
#research-intro li,
.project-abstract li {
  margin-bottom: 0.15rem; /* Reduced vertical gap between items */
  line-height: 1.35;       /* Slightly tighter line height */
  font-size: 0.95rem;
}

/* Eliminate extra browser paragraph margins inside list items */
#teaching-intro li p,
#research-intro li p,
.project-abstract li p {
  margin: 0;
}


/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(3px);
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  z-index: 1001;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: -10px;
  background: transparent;
  border: none;
  color: #FFFFFF;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 10px;
  transition: opacity 0.2s ease;
}

.lightbox-close:hover {
  opacity: 0.8;
  color: var(--slu-tan);
}