/* ===================================
   RESPONSIVE DESIGN
   Mobile-First Approach
   =================================== */

/* Tablet and Below (< 1024px) */
@media (max-width: 1024px) {
  :root {
    --font-size-h1: 2.5rem;
    --font-size-h2: 2rem;
    --font-size-h3: 1.75rem;
    --spacing-section: 4rem;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .hero-text {
    text-align: center;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-image {
    order: -1;
  }

  .research-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .timeline {
    padding-left: 40px;
  }

  .timeline-icon {
    left: -30px;
    width: 35px;
    height: 35px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
  :root {
    --font-size-h1: 2rem;
    --font-size-h2: 1.75rem;
    --font-size-h3: 1.5rem;
    --spacing-section: 3rem;
    --container-padding: 1rem;
  }

  /* Navigation */
  .mobile-menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--color-white);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 2rem 2rem;
    box-shadow: var(--shadow-large);
    transition: right var(--transition-base);
    z-index: 999;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu a {
    display: block;
    width: 100%;
    padding: 1rem 0;
    font-size: 1.125rem;
  }

  .cv-link {
    display: inline-block !important;
    width: auto !important;
  }

  /* Mobile menu overlay */
  body.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
  }

  /* Hero Section */
  .hero {
    min-height: auto;
    padding: 100px 0 var(--spacing-xl);
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.125rem;
  }

  .hero-tagline {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .scroll-indicator {
    display: none;
  }

  /* Cards */
  .research-grid {
    grid-template-columns: 1fr;
  }

  .card-content {
    padding: var(--spacing-md);
  }

  /* Timeline */
  .timeline {
    padding-left: 30px;
  }

  .timeline::before {
    left: 15px;
  }

  .timeline-icon {
    left: -25px;
    width: 30px;
    height: 30px;
  }

  .timeline-content {
    padding: var(--spacing-md);
  }

  /* Contact */
  .contact-info {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  /* Footer */
  #back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

/* Small Mobile (< 480px) */
@media (max-width: 480px) {
  :root {
    --font-size-h1: 1.75rem;
    --font-size-h2: 1.5rem;
    --font-size-h3: 1.25rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  .publication-featured {
    padding: var(--spacing-md);
  }

  .social-links a {
    width: 45px;
    height: 45px;
    font-size: 1.25rem;
  }
}

/* Wide Screens (> 1440px) */
@media (min-width: 1440px) {
  :root {
    --max-width: 1400px;
  }
}

/* Print Styles */
@media print {
  header,
  footer,
  .mobile-menu-toggle,
  #back-to-top,
  .hero-buttons,
  .scroll-indicator,
  .btn {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
  }

  a {
    text-decoration: underline;
    color: #000;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 10pt;
  }

  section {
    page-break-inside: avoid;
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }
}