/* ============================================================
   RS/GIS PORTFOLIO — RESPONSIVE STYLES
   Mobile-first responsive breakpoints
   ============================================================ */

/* ─── 1200px and below ─────────────────────────────────── */
@media (max-width: 1200px) {
  .hero-name {
    font-size: 3rem;
  }

  .hero-image {
    width: 260px;
    height: 260px;
  }

  .research-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ─── 1024px and below ─────────────────────────────────── */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .about-image-wrapper {
    margin-bottom: 8px;
  }

  .about-social {
    justify-content: center;
    flex-wrap: wrap;
  }

  .about-text {
    overflow-x: hidden;
    word-wrap: break-word;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }

  .hero-text {
    max-width: 100%;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-title {
    justify-content: center;
  }

  .lightbox-nav.prev {
    left: 8px;
  }

  .lightbox-nav.next {
    right: 8px;
  }

  .lightbox-nav {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }
}

/* ─── 768px and below (Tablet) ─────────────────────────── */
@media (max-width: 768px) {
  :root {
    --section-padding: 70px 0;
  }

  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .mobile-nav-overlay {
    display: block;
    pointer-events: none;
  }

  .mobile-nav-overlay.active {
    pointer-events: auto;
  }

  .mobile-nav-panel {
    display: block;
  }

  .mobile-nav-panel a {
    display: block;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    padding: 14px 16px;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: all var(--transition-normal);
    transform: translateX(30px);
    opacity: 0;
  }

  .mobile-nav-panel.active a {
    transform: translateX(0);
    opacity: 1;
  }

  .mobile-nav-panel a:nth-child(1) {
    transition-delay: 0.05s;
  }

  .mobile-nav-panel a:nth-child(2) {
    transition-delay: 0.1s;
  }

  .mobile-nav-panel a:nth-child(3) {
    transition-delay: 0.15s;
  }

  .mobile-nav-panel a:nth-child(4) {
    transition-delay: 0.2s;
  }

  .mobile-nav-panel a:nth-child(5) {
    transition-delay: 0.25s;
  }

  .mobile-nav-panel a:nth-child(6) {
    transition-delay: 0.3s;
  }

  .mobile-nav-panel a:nth-child(7) {
    transition-delay: 0.35s;
  }

  .mobile-nav-panel a:nth-child(8) {
    transition-delay: 0.4s;
  }

  .mobile-nav-panel a:hover,
  .mobile-nav-panel a.active {
    background: var(--tag-bg);
    color: var(--accent);
  }

  .hero-name {
    font-size: 2.5rem;
  }

  .hero-image {
    width: 220px;
    height: 220px;
  }

  .hero-stats {
    gap: 24px;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .research-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .research-card {
    padding: 20px 16px;
  }

  .research-card-icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .pub-tabs,
  .activities-tabs {
    gap: 6px;
  }

  .pub-tab,
  .activities-tab {
    padding: 6px 14px;
    font-size: 0.8rem;
  }

  .timeline {
    padding-left: 30px;
  }

  .timeline-line {
    left: 13px;
  }

  .timeline-dot {
    left: -30px;
    width: 14px;
    height: 14px;
  }

  .timeline-card {
    padding: 20px;
  }

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

  .contact-links {
    flex-direction: column;
    align-items: center;
  }

  .contact-link {
    width: 100%;
    justify-content: center;
  }

  /* Tablet view - About section adjustments */
  .about-social {
    flex-wrap: wrap;
    gap: 10px;
  }

  .about-text {
    overflow-x: hidden;
  }

  .lightbox-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .lightbox-nav.prev,
  .lightbox-nav.next {
    position: static;
    transform: none;
    margin-top: 12px;
  }

  .lightbox-body {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
}

/* ─── 480px and below (Mobile) ─────────────────────────── */
@media (max-width: 480px) {
  :root {
    --section-padding: 60px 0;
  }

  html {
    font-size: 15px;
  }

  body {
    overflow-x: hidden !important;
  }

  .container {
    padding: 0 16px;
  }

  .navbar {
    height: 60px;
  }

  .nav-logo {
    font-size: 1rem;
  }

  .nav-logo .logo-icon {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .hero-name {
    font-size: 2rem;
  }

  .hero-title {
    font-size: 0.95rem;
  }

  .hero-image {
    width: 180px;
    height: 180px;
  }

  /* Hide orbit rings on very small screens to prevent overflow */
  .hero-bg-effects {
    display: none;
  }

  #particles-canvas {
    display: none;
  }

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

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .section-header h2 {
    font-size: 1.7rem;
  }

  .research-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .research-card {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
  }

  .research-card-icon {
    font-size: 2rem;
    margin-bottom: 0;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tag-bg);
    border-radius: var(--border-radius);
  }

  .pub-card {
    padding: 18px;
  }

  .pub-card-header {
    flex-direction: column;
    gap: 8px;
  }

  .pub-card h3 {
    font-size: 0.95rem;
  }

  .skill-category {
    padding: 20px;
  }

  /* About section mobile fix */
  .about-grid {
    overflow-x: hidden;
  }

  .about-text {
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .about-text h3 {
    font-size: 1.3rem;
    word-break: break-word;
  }

  .about-text p {
    font-size: 0.9rem;
    overflow-x: hidden;
    word-break: break-word;
  }

  .about-social {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .social-link {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }

  .timeline-card h3 {
    font-size: 1rem;
  }

  .orbit-ring:nth-child(1) {
    width: 250px;
    height: 250px;
  }

  .orbit-ring:nth-child(2) {
    width: 400px;
    height: 400px;
  }

  .orbit-ring:nth-child(3) {
    width: 550px;
    height: 550px;
  }

  .mobile-nav-panel {
    width: 260px;
  }

  .scroll-top-btn {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }
}

/* ─── Reduced Motion ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .scroll-animate,
  .scroll-animate-left,
  .scroll-animate-right,
  .scroll-animate-scale {
    opacity: 1;
    transform: none;
  }
}