/* 
========================================================================
  RESPONSIVE BREAKPOINTS — COMPREHENSIVE ADAPTIVE SYSTEM
========================================================================
*/

/* ---- Laptop / Small Desktop (≤1024px) ---- */
@media (max-width: 1024px) {
  :root {
    --section-padding: 6rem;
  }

  .hero-container {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
  }

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

  .edu-cert-grid {
    gap: 2.5rem;
  }

  .avatar-glass-frame {
    width: 280px;
    height: 280px;
  }
  /* == HAMBURGER MENU ACTIVATION == */
  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    transition: var(--transition-fast);
  }

  .menu-toggle:hover,
  .menu-toggle:active {
    background: rgba(255, 255, 255, 0.06);
    color: var(--green-highlight);
  }

  /* Hide Desktop Menu */
  .nav-menu {
    display: none !important;
  }

  /* Overlay (Blur Layer) */
  .menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    z-index: 998;
  }

  .menu-overlay.active {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
  }

  /* Navigation Drawer (Sharp Layer) */
  .mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    background: rgba(18, 18, 18, 0.98);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 999;
    display: flex;
    flex-direction: column;
    padding-top: calc(var(--header-height, 80px) + 1rem); /* Space for main header */
    overflow-y: auto;
  }

  .mobile-menu.open {
    transform: translateX(0);
  }

  /* Mobile Menu Internals */
  .mobile-nav-list {
    list-style: none;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
  }

  .mobile-nav-link i {
    color: rgba(255, 255, 255, 0.6);
  }

  .mobile-nav-link:hover,
  .mobile-nav-link:active {
    background: rgba(255, 255, 255, 0.05);
  }

  .mobile-nav-link.active {
    background: rgba(29, 185, 84, 0.08);
    color: var(--green-highlight);
  }

  .mobile-nav-link.active i {
    color: var(--green-highlight);
  }
}

/* ---- Tablet Portrait / Large Phones (≤768px) ---- */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
    --section-padding: 5rem;
    --container-padding: 1.5rem;
  }

  /* == HERO SECTION — RECOMPOSED == */
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }

  .hero-content {
    order: 2;
  }

  .hero-visual {
    order: 1;
  }

  .hero-description {
    margin: 0 auto 2rem auto;
  }

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

  .avatar-glass-frame {
    width: 240px;
    height: 240px;
    border-radius: 24px;
    padding: 10px;
  }

  .avatar-img {
    border-radius: 16px;
  }

  /* Reduce decorative glows on mobile for clarity */
  .bg-glow {
    opacity: 0.3;
  }

  .bg-glow-1 {
    width: 250px;
    height: 250px;
  }

  .bg-glow-2 {
    width: 280px;
    height: 280px;
  }

  /* == ABOUT == */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  /* == SKILLS ORBIT == */
  .skills-orbit-grid-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .skills-info-column {
    text-align: center;
    align-items: center;
  }

  .orbit-back-btn {
    align-self: center !important;
  }

  .skills-orbit-column {
    height: 400px;
  }

  /* == PROJECTS == */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-card {
    border-radius: 14px;
  }

  .project-image-wrap {
    height: 200px;
    border-top-left-radius: 13px;
    border-top-right-radius: 13px;
  }

  .project-info {
    padding: 1.5rem;
  }

  .project-github-link {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    min-height: 44px;
  }

  /* == TIMELINE == */
  .timeline-line {
    left: 16px;
  }

  .timeline-dot {
    left: 7px;
    width: 18px;
    height: 18px;
  }

  .timeline-item {
    padding-left: 45px;
    margin-bottom: 2.5rem;
  }

  .timeline-card {
    padding: 1.75rem;
  }

  .timeline-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .timeline-date {
    font-size: 0.8rem;
  }

  .role-title {
    font-size: 1.1rem;
  }

  .timeline-details li {
    font-size: 0.9rem;
  }

  /* == EDUCATION & ACHIEVEMENTS == */
  .edu-cert-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .education-card {
    padding: 1.75rem;
    height: auto;
  }

  .edu-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .degree-title {
    font-size: 1.1rem;
  }

  .achievement-card {
    padding: 1.25rem;
  }

  /* == CONTACT == */
  .contact-form {
    padding: 1.75rem;
    margin: 0 auto 2.5rem auto;
  }

  .contact-lead {
    font-size: 1rem;
    margin: 0 auto 2.5rem auto;
  }

  /* == BACK TO TOP == */
  .back-to-top-btn {
    bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    right: 1.5rem;
    width: 44px;
    height: 44px;
  }

  /* == VINYL MINI PLAYER == */
  .vinyl-mini-player {
    width: 100%;
    max-width: 340px;
    border-radius: 12px;
    padding: 0.75rem 1rem;
  }
}

/* ---- Standard Phones (≤480px) ---- */
@media (max-width: 480px) {
  :root {
    --section-padding: 4rem;
    --container-padding: 1.25rem;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  /* Hero */
  .hero-ctas {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .hero-ctas .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  .avatar-glass-frame {
    width: 200px;
    height: 200px;
    border-radius: 20px;
    padding: 8px;
  }

  .avatar-img {
    border-radius: 14px;
  }

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

  /* Skills Orbit */
  .skills-orbit-column {
    height: 320px !important;
  }

  /* Stats */
  .about-stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stat-card {
    padding: 1.5rem 1.25rem;
  }

  .stat-num {
    font-size: 2rem;
  }

  /* Projects */
  .project-info {
    padding: 1.25rem;
  }

  .project-title {
    font-size: 1.1rem;
  }

  .project-description {
    font-size: 0.85rem;
  }

  /* Timeline */
  .timeline-card {
    padding: 1.5rem;
  }

  .timeline-details li {
    font-size: 0.85rem;
    padding-left: 1.25rem;
  }

  /* Education */
  .education-card {
    padding: 1.5rem;
  }

  .achievement-card {
    padding: 1rem;
    gap: 1rem;
  }

  .achievement-content h4 {
    font-size: 0.9rem;
  }

  .achievement-content p {
    font-size: 0.8rem;
  }

  /* Contact */
  .contact-form {
    padding: 1.5rem;
  }

  .form-input {
    padding: 0.85rem 0.85rem 0.85rem 2.75rem;
    font-size: 0.95rem;
  }

  .social-circles {
    gap: 1rem;
  }

  .social-icon-wrapper {
    width: 48px;
    height: 48px;
  }

  /* Footer */
  .main-footer .footer-container {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  /* Back to top */
  .back-to-top-btn {
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    right: 1rem;
  }

  /* Vinyl player */
  .vmp-vinyl {
    width: 38px;
    height: 38px;
  }

  .vmp-play-btn {
    width: 36px;
    height: 36px;
    min-width: 44px;
    min-height: 44px;
  }

  .vmp-title {
    font-size: 0.8rem;
  }

  .vmp-now-playing {
    font-size: 0.55rem;
  }

  .vinyl-mini-player {
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
  }
}

/* ---- Small Phones (≤360px) ---- */
@media (max-width: 360px) {
  :root {
    --section-padding: 3.5rem;
    --container-padding: 1rem;
  }

  .avatar-glass-frame {
    width: 180px;
    height: 180px;
    border-radius: 18px;
  }

  .section-header {
    margin-bottom: 2rem;
  }

  .glass-card {
    border-radius: 12px;
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
  }

  .nav-menu {
    width: 85vw;
    padding: calc(var(--header-height) + 1.5rem) 1.5rem 1.5rem;
  }

  .nav-link {
    font-size: 0.95rem;
    padding: 0.75rem 0.85rem;
  }

  .project-image-wrap {
    height: 160px;
  }

  .timeline-item {
    padding-left: 38px;
  }

  .stat-num {
    font-size: 1.75rem;
  }

  .contact-form {
    padding: 1.25rem;
    border-radius: 12px;
  }
}

/* --- Mobile Auto-Hover Effects --- */
@media (max-width: 1024px) {
  .glass-card.mobile-hover {
    background: var(--card-bg-hover);
    border-color: var(--border-glass-hover);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5), 0 0 20px 0 rgba(29, 185, 84, 0.05);
  }
  .avatar-glass-frame.mobile-hover {
    border-color: var(--green-highlight);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px var(--green-glow);
    transform: translateY(-4px) rotate(1deg);
  }
  .avatar-glass-frame.mobile-hover .avatar-img {
    filter: grayscale(0%) contrast(100%);
    transform: scale(1.03);
  }
  .special-stat-card.mobile-hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(29, 185, 84, 0.45);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(29, 185, 84, 0.15);
  }
  .special-stat-card.mobile-hover .stat-num {
    transform: scale(1.1);
    color: var(--green-hover);
    text-shadow: 0 0 15px rgba(30, 215, 96, 0.4);
  }
  .special-stat-card.mobile-hover .stat-sub {
    opacity: 1;
    color: var(--green-highlight);
    transform: translateY(-2px);
  }
  .project-card.mobile-hover {
    transform: translateY(-6px);
    border-color: rgba(29, 185, 84, 0.25);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(29, 185, 84, 0.08);
  }
  .project-card.mobile-hover .project-image {
    transform: scale(1.05);
  }
  .project-card.mobile-hover .project-title {
    color: var(--green-highlight);
  }
  .timeline-item.mobile-hover .timeline-dot {
    border-color: var(--green-highlight);
    background: var(--green-highlight);
    box-shadow: 0 0 12px var(--green-highlight);
  }
  .achievement-card.mobile-hover .achievement-icon-wrap {
    background: var(--green-highlight);
    color: #000000;
    box-shadow: 0 0 12px var(--green-glow-strong);
    transform: rotate(6deg) scale(1.05);
  }
}

