/* ============================================================
   Base Reset
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Open Sans", sans-serif;
  color: #333333;
  background: #ffffff;
  padding-top: 72px;
}

/* ============================================================
   Accessibility Utilities
   ============================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 16px;
  z-index: 9999;
  padding: 10px 16px;
  background: #0a2540;
  color: #ffffff;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 6px 6px;
  transform: translateY(-110%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Focus-visible styles — keyboard-only, no mouse outline */
a:focus-visible,
button:focus-visible,
.nav-toggle:focus-visible {
  outline: 3px solid #1a73e8;
  outline-offset: 3px;
  border-radius: 3px;
}

/* ============================================================
   Reusable Section Styles
   ============================================================ */

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
}

.section-title {
  font-family: "Inter", sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #0a2540;
  margin-bottom: 48px;
  text-align: center;
}

/* ============================================================
   About Section
   ============================================================ */

#about {
  background-color: #f8f9fa;
}

.about-content {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.about-image {
  flex: 0 0 280px;
}

.about-image img {
  width: 100%;
  border-radius: 8px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.about-text {
  flex: 1;
}

.about-text p {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 16px;
  color: #4b5563;
}

.about-highlights {
  display: flex;
  gap: 24px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid #e5e7eb;
}

.highlight-item {
  text-align: center;
  flex: 1;
}

.highlight-number {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #1a73e8;
}

.highlight-label {
  display: block;
  font-size: 14px;
  color: #6b7280;
  margin-top: 4px;
}

/* ============================================================
   Scroll Animations
   ============================================================ */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Services Section
   ============================================================ */

#services {
  background-color: #ffffff;
}

.section-subtitle {
  text-align: center;
  max-width: 700px;
  margin: -32px auto 48px;
  font-size: 17px;
  line-height: 1.7;
  color: #4b5563;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.service-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 32px 28px;
  transition: transform 0.2s ease;
}

.service-card:hover {
  border-color: #1a73e8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.service-icon {
  color: #1a73e8;
  margin-bottom: 20px;
}

.service-name {
  font-family: "Inter", sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #0a2540;
  margin-bottom: 12px;
}

.service-description {
  font-size: 15px;
  line-height: 1.6;
  color: #4b5563;
}

/* ============================================================
   Publications Section
   ============================================================ */

#publications {
  background-color: #f8f9fa;
}

.publications-list {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.publication-item {
  display: flex;
  gap: 24px;
  background: #ffffff;
  border-radius: 8px;
  padding: 28px;
  border: 1px solid #e5e7eb;
}

.publication-item:hover {
  border-color: #1a73e8;
}

.publication-year {
  flex: 0 0 60px;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #1a73e8;
  padding-top: 2px;
}

.publication-details {
  flex: 1;
}

.publication-title {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #0a2540;
  margin-bottom: 8px;
  line-height: 1.4;
}

.publication-authors {
  font-size: 14px;
  color: #4b5563;
  margin-bottom: 4px;
}

.publication-journal {
  font-size: 14px;
  color: #6b7280;
  font-style: italic;
}

/* ============================================================
   Contact Section
   ============================================================ */

#contact {
  background-color: #ffffff;
}

.contact-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-detail {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: #4b5563;
  font-size: 16px;
  line-height: 1.6;
}

.contact-detail svg {
  flex-shrink: 0;
  color: #1a73e8;
}

.contact-detail a {
  color: #1a73e8;
  text-decoration: none;
  font-weight: 500;
}

.contact-detail a:hover {
  text-decoration: underline;
}

/* ============================================================
   Footer
   ============================================================ */

footer {
  background-color: #0a2540;
  color: #ffffff;
  padding: 32px 24px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copyright {
  font-size: 14px;
  color: #94a3b8;
}

.footer-links ul {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 14px;
}

.footer-links a:hover {
  color: #ffffff;
}

/* ============================================================
   Navbar
   ============================================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 1000;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar.navbar-scrolled {
  background: #ffffff;
  border-bottom-color: #e5e7eb;
}

/* White text when overlaid on the dark hero */
.navbar:not(.navbar-scrolled) .nav-logo {
  color: #ffffff;
}

.navbar:not(.navbar-scrolled) .logo-highlight {
  color: #4ecdc4;
}

.navbar:not(.navbar-scrolled) .nav-logo:hover {
  color: rgba(255, 255, 255, 0.85);
}

.navbar:not(.navbar-scrolled) .nav-logo:hover .logo-highlight {
  color: rgba(78, 205, 196, 0.75);
}

.navbar:not(.navbar-scrolled) .nav-menu a {
  color: rgba(255, 255, 255, 0.78);
}

.navbar:not(.navbar-scrolled) .nav-menu a:hover,
.navbar:not(.navbar-scrolled) .nav-menu a.active-link {
  color: #ffffff;
}

.navbar:not(.navbar-scrolled) .hamburger-line {
  background-color: #ffffff;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.nav-logo {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: #0a2540;
  text-decoration: none;
}

.logo-highlight {
  color: #1a73e8;
}

.nav-logo:hover {
  color: #0a2540;
}

.nav-logo:hover .logo-highlight {
  color: #1557b0;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: #4b5563;
  text-decoration: none;
}

.nav-menu a:hover {
  color: #1a73e8;
}

.nav-menu a.active-link {
  color: #1a73e8;
  font-weight: 600;
}

.nav-toggle {
  display: none;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #0a2540;
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.navbar-scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
}

/* ============================================================
   Hero Section
   ============================================================ */

#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(145deg, #091a2a 0%, #0f2b3c 55%, #0c2436 100%);
  overflow: hidden;
}

/* Animated EEG waveform background */
.hero-bg-wave {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-wave-svg {
  width: 100%;
  height: 100%;
}

.eeg-track-1 {
  animation: eegFloat 10s ease-in-out infinite;
}

.eeg-track-2 {
  animation: eegFloat2 13s ease-in-out 2s infinite;
}

.eeg-track-3 {
  animation: eegFloat 16s ease-in-out 5s infinite;
}

@keyframes eegFloat {
  0%, 100% { opacity: 0.08; transform: translateY(0); }
  50%       { opacity: 0.14; transform: translateY(-10px); }
}

@keyframes eegFloat2 {
  0%, 100% { opacity: 0.06; transform: translateY(0); }
  50%       { opacity: 0.12; transform: translateY(8px); }
}

/* Hero content layout */
.hero-content-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 148px 24px 88px;
}

.hero-content {
  max-width: 640px;
}

.hero-eyebrow {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4ecdc4;
  margin: 0 0 20px;
}

.hero-title {
  font-family: "Inter", sans-serif;
  font-size: 62px;
  font-weight: 700;
  line-height: 1.06;
  color: #ffffff;
  margin: 0 0 28px;
  letter-spacing: -0.025em;
}

.hero-tagline {
  font-family: "Inter", sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.76);
  margin: 0 0 18px;
  line-height: 1.5;
}

.hero-description {
  font-size: 17px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.56);
  margin: 0 0 44px;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* CTA Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 32px;
  border-radius: 6px;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border: 2px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.btn-primary {
  background: #1a73e8;
  color: #ffffff;
  border-color: #1a73e8;
}

.btn-primary:hover {
  background: #1557b0;
  border-color: #1557b0;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.42);
}

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

/* ============================================================
   Responsive — max-width 768px
   ============================================================ */

@media (max-width: 768px) {

  /* Navigation */
  .nav-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
  }

  .nav-menu {
    display: none;
  }

  .nav-menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px 24px;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  }

  .nav-menu li a {
    padding: 8px 0;
    display: block;
    font-size: 16px;
  }

  /* Hero */
  .hero-content-wrapper {
    padding: 120px 24px 72px;
  }

  .hero-title {
    font-size: 38px;
  }

  .hero-tagline {
    font-size: 18px;
  }

  .hero-description {
    font-size: 16px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }

  /* About */
  .about-content {
    flex-direction: column;
    align-items: center;
  }

  .about-image {
    flex: 0 0 auto;
    max-width: 220px;
  }

  .about-highlights {
    flex-wrap: wrap;
    gap: 16px;
  }

  .highlight-item {
    flex-basis: calc(50% - 8px);
  }

  /* Services */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  /* Publications */
  .publication-item {
    flex-direction: column;
    gap: 8px;
  }

  .publication-year {
    flex: 0 0 auto;
  }

}

/* ============================================================
   Responsive — max-width 480px
   ============================================================ */

@media (max-width: 480px) {

  .section-container {
    padding: 60px 16px;
  }

  .section-title {
    font-size: 26px;
  }

  .hero-content-wrapper {
    padding: 100px 16px 60px;
  }

  .hero-title {
    font-size: 30px;
  }

  .hero-tagline {
    font-size: 16px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .publication-item {
    padding: 20px;
  }

  .about-highlights {
    flex-direction: column;
    gap: 12px;
  }

  .highlight-item {
    flex-basis: 100%;
  }

  .footer-content {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer-links ul {
    justify-content: center;
    flex-wrap: wrap;
  }

}

/* ============================================================
   Print Stylesheet
   ============================================================ */

@media print {

  /* Hide interactive / screen-only elements */
  .navbar,
  footer,
  #contact,
  .skip-link {
    display: none !important;
  }

  /* Remove paddings added to account for fixed navbar */
  body {
    padding-top: 0;
    color: #000000;
    background: #ffffff;
  }

  /* Strip section backgrounds so ink isn't wasted */
  #about,
  #publications,
  .publication-item,
  .service-card {
    background: #ffffff !important;
  }

  /* Flatten layout — services as a single-column list */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Ensure text is fully black for legibility */
  .section-title,
  .service-name,
  .publication-title,
  .about-text p,
  .highlight-number {
    color: #000000;
  }

  /* Remove box shadows and borders that look odd on paper */
  .service-card,
  .publication-item {
    border: 1px solid #cccccc;
    box-shadow: none;
  }

  /* Prevent elements from splitting across page breaks */
  .service-card,
  .publication-item,
  .about-content {
    break-inside: avoid;
  }

  /* Show href for links */
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 12px;
    color: #444444;
  }

  /* But not for anchor links — they're internal and useless on paper */
  a[href^="#"]::after {
    content: "";
  }

  /* Disable animations */
  .animate-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }

}
