/* 
 * Scalable Security Research Lab - Styles
 * Inspired by SeclaBU, BU scarlet red (#CC0000)
 */

:root {
  --bg-white: #ffffff;
  --bg-light: #f8f8f8;
  --text-primary: #222;
  --text-secondary: #444;
  --text-muted: #666;
  --red-primary: #CC0000;
  --red-dark: #a30000;
  --red-pale: #fef2f2;
  --red-border: #fecaca;
  --border: #e5e5e5;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 8px;
  --transition: 0.2s ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--red-primary);
}

a:hover {
  color: var(--red-dark);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #f5f5f5;
  border-bottom: 2px solid var(--red-primary);
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--text-primary);
}

.logo:hover {
  color: var(--text-primary);
}

.logo-img {
  height: 64px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05rem;
  transition: color var(--transition);
  text-transform: uppercase;
}

.nav-link:hover {
  color: var(--red-primary);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
}

/* Main content */
.main-content {
  flex: 1;
}

.section-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Page sections (SeclaBU-style) */
.page-section {
  padding: 3rem 0;
}

.page-section h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 1.25rem;
  color: var(--text-primary);
}

#about {
  padding-bottom: 0;
  margin-bottom: -1.5rem;
}

#about h2 {
  text-align: center;
  font-size: 2.25rem;
}

.section-heading {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1.6rem !important;
}

.section-lead {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin: 0 0 2rem;
}

.section-lead a {
  color: var(--red-primary);
  text-decoration: none;
}

.section-lead a:hover {
  text-decoration: underline;
}

.section-link {
  color: var(--red-primary);
  text-decoration: none;
  font-weight: 500;
}

.section-link:hover {
  text-decoration: underline;
}

/* Team section */
.team-subsection {
  margin-bottom: 1.5rem;
}

.team-subsection h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text-primary);
}

.member-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.member-list li {
  margin-bottom: 0.25rem;
}

.member-list a {
  color: var(--red-primary);
  text-decoration: none;
}

.member-list a:hover {
  text-decoration: underline;
}

.muted {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.muted a {
  color: var(--red-primary);
}

/* News section */
#team {
  scroll-margin-top: 5rem;
}

#news {
  padding-top: 2rem;
  padding-bottom: 1rem;
  margin-top: 0;
  margin-bottom: -2rem;
  scroll-margin-top: 5rem;
}

#news .section-heading {
  margin-top: 0;
}

#collaborators {
  padding-top: 3rem;
  margin-top: 0;
}

.news-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.news-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 1.5rem;
  align-items: baseline;
}

.news-list li:last-child {
  border-bottom: none;
}

.news-date {
  flex-shrink: 0;
  font-size: 0.9rem;
  color: var(--red-primary);
  font-weight: 500;
  min-width: 100px;
}

.news-content {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Collaborators */
.collaborators-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: center;
  align-items: center;
}

.collaborator-item {
  display: flex;
  align-items: center;
  justify-content: center;
}

.collaborator-logo {
  height: 56px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.collaborator-logo-large {
  height: 80px;
  max-width: 280px;
}

.collaborator-logo-osi {
  height: 72px;
  max-width: 220px;
}

/* Key Areas of Research */
.research-areas-inline {
  margin-top: 2rem;
  position: relative;
}

.research-areas-inline .section-heading {
  margin: 0 0 1.25rem;
}

.research-container {
  position: relative;
  min-height: 180px;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 900px) {
  .research-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .research-grid {
    grid-template-columns: 1fr;
  }
}

.research-card {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  border: 2px solid var(--red-primary);
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.research-card:hover {
  background-color: var(--red-primary);
  color: white;
}

.research-card-title {
  display: block;
}

.research-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.research-modal-backdrop.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.research-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 92%;
  max-width: 560px;
  max-height: 85vh;
  border-radius: 10px;
  padding: 0.6rem 1.85rem 1rem;
  overflow-y: auto;
  background: var(--bg-white);
  border: 2px solid #222;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}

.research-modal.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.research-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  border: none;
  background: #333;
  color: white;
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
  z-index: 1;
}

.research-modal-close:hover {
  background: #222;
}

.research-overlay-content {
  position: relative;
  width: 100%;
  text-align: left;
  max-width: none;
}

.research-overlay-icon {
  margin-bottom: 0.65rem;
  color: #222;
}

.research-overlay-icon svg {
  display: block;
  width: 32px;
  height: 32px;
  opacity: 0.9;
}

.research-expanded-title {
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.research-expanded-desc {
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0;
  font-weight: 400;
  color: var(--text-secondary);
  max-width: none;
}

.research-papers-section {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.research-papers-heading {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.research-paper-link {
  display: block;
  margin-top: 0.5rem;
  padding: 0.5rem 0.65rem;
  background: var(--bg-light);
  border-left: 3px solid var(--red-primary);
  border-radius: 0 6px 6px 0;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.research-paper-link:first-of-type {
  margin-top: 0;
}

.research-paper-link:hover {
  background: var(--red-pale);
  border-left-color: var(--red-dark);
}

.research-paper-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.research-paper-venue {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: var(--radius);
  transition: all var(--transition);
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--red-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--red-dark);
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--red-primary);
  border: 1px solid var(--red-border);
}

.btn-secondary:hover {
  background: var(--red-pale);
  border-color: var(--red-primary);
}

/* Page hero (inner pages) */
.page-hero {
  padding: 3rem 2rem 2rem;
  text-align: center;
  background: var(--bg-light);
}

.page-hero h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem;
  color: var(--text-primary);
}

.page-hero p {
  color: var(--text-secondary);
  margin: 0;
}

/* Team page */
.team-section {
  padding: 0 0 1.5rem;
  margin-top: -4rem;
}

.team-section .section-heading {
  margin: 0 0 2rem;
}

.team-circle-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
}

.faculty-grid {
  gap: 2rem;
}

.students-grid {
  gap: 2rem;
}

@media (max-width: 768px) {
  #about {
    margin-bottom: 0;
  }

  .team-section {
    margin-top: 2rem;
  }

  #news {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  #collaborators {
    margin-top: 0;
    padding-top: 3rem;
  }
}

@media (max-width: 600px) {
  .students-grid {
    gap: 1.5rem;
  }
  .team-section {
    margin-top: 2rem;
  }
}

.team-circle-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.team-circle-photo {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-light);
  margin-bottom: 0.75rem;
}

.team-circle-photo img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.team-circle-photo.placeholder img {
  display: none !important;
}

.team-placeholder-initials {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-mono);
  z-index: 0;
}

.team-circle-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
}

a.team-circle-name {
  text-decoration: none;
}

a.team-circle-name:hover {
  color: var(--red-primary);
  text-decoration: underline;
}

.team-circle-title {
  font-size: 0.9rem;
  color: var(--red-primary);
  margin-top: 0.25rem;
}

.join-cta {
  background: #e8f4fc;
  border: 1px solid #b8daf2;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.team-subheading {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--text-primary);
  text-align: center;
}

.team-section .join-cta {
  margin-top: 2rem;
}

.team-section .join-cta p {
  margin: 0;
}

.join-cta h2 {
  font-size: 1.25rem;
  margin: 0 0 1rem;
  color: var(--text-primary);
}

.join-cta p {
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
}

/* Apply page */
.apply-section {
  padding: 2.5rem 0 4rem;
}

.apply-heading {
  font-size: 1.85rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--text-primary);
}

.apply-lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin: 0 0 2rem;
  line-height: 1.6;
}

.apply-guidelines {
  background: #e8f4fc;
  border: 1px solid #b8daf2;
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
}

.apply-guidelines h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--text-primary);
}

.apply-guidelines p {
  margin: 0 0 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.apply-list {
  margin: 0;
  padding-left: 1.5rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.apply-list li {
  margin-bottom: 0.75rem;
}

.apply-list li:last-child {
  margin-bottom: 0;
}

.apply-list a {
  color: var(--red-primary);
}

.apply-list a:hover {
  color: var(--red-dark);
}

.apply-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.apply-cta .btn {
  text-decoration: none;
}

.apply-lsu-notice {
  background: #fef9e7;
  border: 1px solid #f5e6b3;
  border-radius: var(--radius);
  padding: 1.25rem 1.75rem;
  margin-top: 0;
  margin-bottom: 2rem;
}

.apply-lsu-notice h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text-primary);
}

.apply-lsu-notice p {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.apply-lsu-notice ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.apply-lsu-notice li {
  margin-bottom: 0.35rem;
}

.apply-lsu-notice a {
  color: var(--red-primary);
}

.apply-lsu-notice a:hover {
  color: var(--red-dark);
}

/* Publications (SeclaBU-style, tight layout) */
.publications-section {
  padding: 2.5rem 0 4rem;
}

.publications-heading {
  font-size: 1.85rem;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 1.5rem;
  color: var(--text-primary);
}

.publications-note {
  text-align: left;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

.publications-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.publication-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.publication-item:last-child {
  border-bottom: none;
}

.pub-title {
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 0.15rem;
  line-height: 1.35;
  color: #0000e6;
}

.pub-meta {
  font-size: 0.9rem;
  color: #000;
  margin: 0;
  line-height: 1.5;
}


.pub-award {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 0.15rem;
}

.pub-award-icon {
  flex-shrink: 0;
  color: #b8860b;
  width: 16px;
  height: 16px;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.pub-link {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-size: 0.85rem;
  background: var(--bg-light);
  color: #000;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.pub-link:hover {
  background: var(--red-pale);
  border-color: var(--red-border);
}

/* News page */
.news-section {
  padding: 2rem 0 4rem;
}

.news-section .news-list {
  max-width: 100%;
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 2rem;
  border-top: 1px solid var(--border);
  background: var(--bg-light);
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
}

.footer-brand strong {
  color: var(--text-primary);
}

.footer-brand span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-brand span a {
  color: var(--text-muted);
}

.footer-brand span a:hover {
  color: var(--red-primary);
}

.footer-location {
  display: block;
  margin-top: 0.25rem;
}

.footer-institutional {
  display: block;
  margin-top: 0.5rem;
}

.footer-institutional a {
  color: var(--text-muted);
}

.footer-institutional a:hover {
  color: var(--red-primary);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.footer-social {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

.footer-social:hover {
  color: var(--red-primary);
}

.footer-social svg {
  width: 32px;
  height: 32px;
  display: block;
}

.footer-lsu-logo {
  margin-left: 0.5rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border);
}

.footer-lsu-img {
  height: 64px;
  width: auto;
  display: block;
  opacity: 0.85;
}

.footer-lsu-logo:hover .footer-lsu-img {
  opacity: 1;
}

/* Mobile nav */
@media (max-width: 768px) {
  .logo-text {
    font-size: 1rem;
    line-height: 1.2;
  }

  .logo-img {
    height: 48px;
  }

  .nav {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .nav.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-white);
    padding: 1rem;
    border-bottom: 1px solid var(--border);
  }
}
