/* ========================================
   Responsive Stylesheet
   ======================================== */

/* Large Desktop (1440px and up) */
@media (min-width: 1440px) {
  .container {
    max-width: 1320px;
  }
  
  .hero-title {
    font-size: 5.5rem;
  }
  
  .section-title {
    font-size: 3.5rem;
  }
}

/* Desktop (1024px to 1439px) */
@media (max-width: 1439px) and (min-width: 1024px) {
  .container {
    max-width: 1140px;
  }
}

/* Tablet Landscape (768px to 1023px) */
@media (max-width: 1023px) {
  /* Hero Adjustments */
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-text {
    order: 2;
  }
  
  .hero-profile {
    order: 1;
    margin-bottom: 2rem;
  }
  
  .profile-image-container {
    max-width: 400px;
  }
  
  .hero-description {
    max-width: 100%;
  }
  
  .hero-cta {
    justify-content: center;
  }
  
  /* Section Spacing */
  .expertise-section,
  .impact-section,
  .projects-preview,
  .cta-section {
    padding: 3rem 0;
  }
  
  /* Grid Adjustments */
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .project-cards {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  
  .footer-about {
    grid-column: span 2;
  }
  
  /* Timeline */
  .timeline-content {
    margin-left: 0;
  }
  
  .timeline-metrics {
    justify-content: center;
  }
  
  .timeline-metrics .metric {
    font-size: 0.75rem;
    padding: 3px 6px;
  }
}

/* Mobile Landscape & Tablet Portrait (576px to 767px) */
@media (max-width: 767px) {
  /* Typography */
  html {
    font-size: 15px;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
  
  /* Container */
  .container {
    padding: 0 1.5rem;
  }
  
  /* Navigation */
  .main-nav .container {
    padding: 1rem 1.5rem;
  }
  
  .nav-logo {
    font-size: 1.125rem;
  }
  
  .logo-icon {
    width: 35px;
    height: 35px;
  }
  
  /* Hero Section */
  .hero-section {
    min-height: auto;
    padding: 6rem 0 4rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
  }
  
  .hero-description {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  
  .profile-accent {
    display: none;
  }
  
  /* Cards */
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .expertise-card {
    padding: 1.5rem;
  }
  
  /* Stats */
  .stats-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
  
  /* Projects */
  .project-image {
    height: 200px;
  }
  
  .project-content {
    padding: 1.25rem;
  }
  
  /* Footer */
  .main-footer {
    padding: 2.5rem 0 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .footer-about {
    margin-bottom: 0.5rem;
  }

  .footer-about p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
  }

  .footer-logo {
    justify-content: center;
    margin-bottom: 0.75rem;
  }

  .footer-logo span {
    font-size: 1.2rem;
  }

  .footer-social {
    justify-content: center;
    gap: 0.75rem;
  }

  .footer-social a {
    width: 52px;
    height: 52px;
  }

  .footer-social a span {
    font-size: 22px;
  }

  .footer-links,
  .footer-contact {
    text-align: center;
  }

  .footer-links h4,
  .footer-contact h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }

  .footer-links ul {
    margin-bottom: 0;
  }

  .footer-links li {
    margin-bottom: 0.5rem;
  }

  .footer-contact p {
    justify-content: center;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }

  .footer-contact i {
    margin-right: 0.5rem;
  }

  .footer-links a:hover {
    padding-left: 0;
    transform: translateX(0);
  }

  .footer-links a::before {
    display: none;
  }

  .footer-bottom {
    padding-top: 1.5rem;
    margin-top: 1.5rem;
  }

  .footer-bottom p {
    font-size: 0.85rem;
  }
  
  /* Page Headers */
  .page-header {
    padding: 6rem 0 3rem;
  }
  
  .page-title {
    font-size: 2.5rem;
  }
  
  .page-subtitle {
    font-size: 1.125rem;
  }
  
  /* Media Page */
  .featured-media-content {
    flex-direction: column;
  }
  
  .featured-video {
    margin-bottom: 1.5rem;
  }
  
  .media-grid {
    grid-template-columns: 1fr;
  }
  
  /* Publications */
  .publications-list {
    padding: 0;
  }
  
  .publication-item {
    padding: 1.5rem;
  }
  
  .pub-content h3 {
    font-size: 1.125rem;
  }
  
  .pub-metrics {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .pub-actions {
    flex-wrap: wrap;
  }
  
  /* Projects Page */
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .featured-content {
    flex-direction: column;
  }
  
  .featured-image {
    margin-bottom: 2rem;
  }
  
  /* About Page */
  .bio-content {
    flex-direction: column;
  }
  
  .bio-image {
    margin-bottom: 2rem;
  }
  
  .education-grid {
    grid-template-columns: 1fr;
  }
  
  .expertise-grid {
    grid-template-columns: 1fr;
  }
  
  /* Contact Page */
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .quick-contact {
    flex-direction: column;
    gap: 1rem;
  }
  
  .form-row {
    flex-direction: column;
  }
  
  .form-group {
    width: 100%;
  }
  
  /* Timeline */
  .timeline-item {
    padding-left: 2rem;
  }
  
  .timeline-marker {
    width: 30px;
    height: 30px;
    font-size: 0.875rem;
  }
  
  /* Filter Buttons */
  .filter-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .filter-container::-webkit-scrollbar {
    height: 4px;
  }
  
  .filter-container::-webkit-scrollbar-track {
    background: var(--light-gray);
  }
  
  .filter-container::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 2px;
  }
}

/* Mobile Portrait (320px to 575px) */
@media (max-width: 575px) {
  /* Typography */
  html {
    font-size: 14px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  /* Container */
  .container {
    padding: 0 1rem;
  }
  
  /* Buttons */
  .btn {
    font-size: 0.875rem;
    padding: 0.625rem 1rem;
  }
  
  .btn-large {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
  }
  
  /* Hero */
  .hero-section {
    padding: 5rem 0 3rem;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }
  
  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Cards */
  .expertise-card {
    padding: 1.25rem;
  }
  
  .card-icon {
    width: 60px;
    height: 60px;
  }
  
  /* Stats */
  .stats-container {
    grid-template-columns: 1fr;
  }
  
  .stat-item {
    padding: 1rem;
  }
  
  /* Page Sections */
  .expertise-section,
  .impact-section,
  .projects-preview,
  .cta-section {
    padding: 2.5rem 0;
  }
  
  .section-header {
    margin-bottom: 2rem;
  }
  
  /* Media Elements */
  .media-card {
    margin-bottom: 1rem;
  }
  
  .media-content {
    padding: 1rem;
  }
  
  .media-content h3 {
    font-size: 1.125rem;
  }
  
  /* Publications */
  .pub-stats {
    flex-direction: column;
    gap: 1rem;
  }
  
  .search-container {
    flex-direction: column;
  }
  
  .search-input {
    width: 100%;
  }
  
  /* Timeline */
  .timeline-content {
    padding: 1rem;
  }
  
  .timeline-content h3 {
    font-size: 1.125rem;
  }
  
  /* Forms */
  input[type="text"],
  input[type="email"],
  select,
  textarea {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  /* Footer */
  .main-footer {
    padding: 2rem 0 1.25rem;
  }

  .footer-grid {
    gap: 1.25rem;
  }

  .footer-about p {
    font-size: 0.85rem;
  }

  .footer-logo span {
    font-size: 1.1rem;
  }

  .footer-social {
    gap: 0.5rem;
  }

  .footer-social a {
    width: 48px;
    height: 48px;
  }

  .footer-social a span {
    font-size: 20px;
  }

  .footer-links h4,
  .footer-contact h4 {
    font-size: 0.95rem;
    margin-bottom: 0.625rem;
  }

  .footer-links li {
    margin-bottom: 0.4rem;
  }

  .footer-contact p {
    font-size: 0.85rem;
  }

  .footer-bottom {
    padding-top: 1.25rem;
    margin-top: 1.25rem;
    font-size: 0.8rem;
  }
  
  /* Modals */
  .modal-content {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  /* Impact Cards */
  .impact-metric-card {
    padding: 1.5rem;
  }
  
  .metric-value {
    font-size: 1.75rem;
  }
  
  /* Research Areas */
  .research-areas-grid {
    gap: 1.5rem;
  }
  
  .research-area {
    padding: 1.5rem;
  }
  
  /* Value Cards */
  .values-grid {
    gap: 1.5rem;
  }
  
  .value-card {
    padding: 1.5rem;
  }
  
  .value-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
}

/* Extra Small Devices (below 320px) */
@media (max-width: 319px) {
  html {
    font-size: 13px;
  }
  
  .container {
    padding: 0 0.75rem;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .btn {
    font-size: 0.813rem;
    padding: 0.5rem 0.875rem;
  }
}

/* Landscape Orientation Adjustments */
@media (orientation: landscape) and (max-height: 600px) {
  .hero-section {
    min-height: 100vh;
    padding: 4rem 0;
  }
  
  .hero-content {
    padding: 2rem 0;
  }
  
  .page-header {
    padding: 5rem 0 2rem;
  }
}

/* High Resolution Displays */
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
  /* Sharper borders and shadows for retina displays */
  .card,
  .expertise-card,
  .project-card {
    box-shadow: 0 2px 20px rgba(27, 67, 50, 0.12);
  }
  
  .btn {
    box-shadow: 0 4px 20px rgba(82, 121, 111, 0.25);
  }
}

/* Print Styles */
@media print {
  /* Hide non-essential elements */
  .main-nav,
  .hero-video-container,
  .forest-elements,
  .wave-separator,
  .cta-section,
  .footer-social,
  .nav-toggle,
  .btn,
  .filter-container {
    display: none !important;
  }
  
  /* Adjust colors for print */
  body {
    color: #000;
    background: #fff;
  }
  
  .section-title,
  h1, h2, h3, h4, h5, h6 {
    color: #000;
  }
  
  /* Ensure content fits on page */
  .container {
    max-width: 100%;
    padding: 0;
  }
  
  /* Page breaks */
  .expertise-section,
  .projects-section,
  .publications-section {
    page-break-before: always;
  }
  
  .card,
  .project-card,
  .publication-item {
    page-break-inside: avoid;
  }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .animated-leaf,
  .animated-bird,
  .forest-particles {
    display: none;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  /* Add dark mode styles if needed */
  /* This is optional - only implement if dark mode is desired */
}/* Hide footer animations on mobile for performance */
@media (max-width: 767px) {
  .footer-animations {
    display: none;
  }
}
