/* ============================================
   FILE: responsive.css (FIXED VERSION)
   PURPOSE: ALL @media queries + overflow 
============================================ */
:root {
  --mobile-nav-active-bg: var(--bg-elevated);
}
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

/* ════════════════════════════════════════════
   LARGE DESKTOP (≥ 1400px)
════════════════════════════════════════════ */
@media (min-width: 1400px) {
  :root { --container-width: 1300px; }

  .home-name { font-size: 3.8rem; }

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

  .about-stats {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* ════════════════════════════════════════════
   TABLET / SMALL LAPTOP (≤ 1024px)
════════════════════════════════════════════ */
@media (max-width: 1024px) {

  :root {
    --section-padding: 80px;
  }

  .home-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 48px;
    padding: 100px 16px 0;
    max-width: 100%;
  }

  .home-content {
    align-items: center;
    order: 2;
    max-width: 100%;
  }

  .home-photo-wrapper {
    order: 1;
  }

  .home-greeting::after { display: none; }

  .home-bio {
    max-width: 100%;
    text-align: center;
  }

  .home-buttons,
  .home-meta {
    justify-content: center;
    flex-wrap: wrap;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-left {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 24px;
  }

  .footer-socials { justify-content: center; }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}
@media (max-width: 768px) {

  .nav-underline {
    display: none;
  }

  .nav-link.active::after {
    display: none;
  }

  .nav-link.active {
  background: var(--mobile-nav-active-bg);
  color: var(--accent-primary);
  box-shadow: var(--glow);
}
}

/* ════════════════════════════════════════════
   MOBILE (≤ 768px)
════════════════════════════════════════════ */
@media (max-width: 768px) {

  :root {
    --section-padding: 70px;
  }

  .nav-links { display: none; }
  .hamburger { display: flex; }

  .home-photo-ring {
    width: 220px;
    height: 220px;
    max-width: 100%;
  }

  .home-photo {
    width: 200px;
    height: 200px;
    max-width: 100%;
  }

  .home-photo-glow {
    width: 230px;
    height: 230px;
    max-width: 100%;
  }

  .home-container,
  .home-content {
    padding-left: 16px;
    padding-right: 16px;
    max-width: 100%;
  }

  .skills-tabs {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .skill-tab {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .skills-grid,
  .projects-grid,
  .certs-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

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

  .social-list {
    grid-template-columns: 1fr;
  }

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

  .resume-preview-box {
    width: 100%;
    max-width: 300px;
  }

  .timeline {
    padding-left: 24px;
  }
}

@media (max-width: 768px) {

  #navbar {
    padding: 10px 16px;
  }

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

  .nav-logo {
    flex: 1;
    text-align: left;
  }

  .hamburger {
    margin-left: auto;
  }
}

/* ════════════════════════════════════════════
   SMALL MOBILE (≤ 480px)
════════════════════════════════════════════ */
@media (max-width: 480px) {

  :root {
    --section-padding: 60px;
  }

  .section {
    padding: 60px 12px;
    max-width: 100%;
  }

  .section-title { font-size: 1.8rem; }
  .home-name { font-size: 2rem; }

  .home-photo-ring {
    width: 180px;
    height: 180px;
  }

  .home-photo {
    width: 160px;
    height: 160px;
  }

  .home-photo-glow {
    width: 190px;
    height: 190px;
  }

  .btn {
    padding: 8px 14px;
    font-size: 0.75rem;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card { padding: 14px 8px; }
  .stat-number { font-size: 1.2rem; }

  .coding-profiles-grid {
    grid-template-columns: 1fr;
  }

  .home-meta {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .contact-form-wrapper { padding: 18px; }

  .project-buttons {
    flex-direction: column;
  }

  .project-buttons a { width: 100%; }

  .modal-content { padding: 16px; }
}

/* ════════════════════════════════════════════
   REDUCED MOTION
════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .home-photo-ring,
  .scanline,
  .status-dot,
  #hacker-logs {
    animation: none !important;
  }
}

@media (max-width: 768px) {
  .custom-select .select-display {
  font-size: 0.8rem;
  padding: 10px;
}
}
/* ==========================================
SKILLS RESPONSIVE (PREMIUM)
========================================== */


/* ==========================
LAPTOP / TABLET
========================== */

@media (max-width:1200px){

.skills-grid{

grid-template-columns:
repeat(2,1fr);

gap:
20px;

}


.skill-category-card{

min-height:
470px;

}


.skills-modal-content{

width:
92%;

padding:
28px;

}


.modal-skill{

grid-template-columns:

160px
1fr
55px
100px;

gap:
12px;

}

}



/* ==========================
TABLET
========================== */

@media (max-width:992px){

.skills-grid{

grid-template-columns:
repeat(2,1fr);

gap:
18px;

}


.skill-category-card{

padding:
20px;

min-height:
450px;

}


.skill-category-card h3{

font-size:
1.6rem;

}


.preview-name{

font-size:
14px;

}


.skills-modal-content{

padding:
24px;

}


.modal-skill{

grid-template-columns:

130px
1fr
45px
85px;

}


}



/* ==========================
MOBILE
========================== */

@media (max-width:768px){

.skills-grid{

grid-template-columns:
1fr;

gap:
16px;

}



/* CARD */

.skill-category-card{

height:
auto;

min-height:
unset;

padding:
20px;

border-radius:
20px;

}



.skill-category-card h3{

font-size:
1.5rem;

margin-bottom:
20px;

}



.preview-item{

padding:
14px 0;

}



.preview-top{

display:flex;

justify-content:
space-between;

align-items:
center;

gap:
8px;

}



.preview-name{

font-size:
14px;

gap:
8px;

}



.preview-meta{

display:flex;

gap:
6px;

}



.skill-level{

font-size:
8px;

padding:
4px 7px;

}



/* BUTTON */

.view-skills-btn{

padding:
12px;

font-size:
14px;

}



/* MODAL */

.skills-modal{

padding:
10px;

}



.skills-modal-content{

width:
100%;

max-height:
92vh;

padding:
20px;

border-radius:
18px;

overflow-y:
auto;

}



.skills-modal-body h2{

font-size:
1.5rem;

margin-bottom:
16px;

}



/* KEEP DESKTOP STYLE */

.modal-skill{

display:grid;

grid-template-columns:

85px
1fr
40px
70px;

gap:
8px;

align-items:
center;

padding:
16px 0;

font-size:
12px;

}



.modal-skill div:first-child{

display:flex;

align-items:
center;

gap:
6px;

}



.modal-bar{

height:
8px;

}



.skill-level{

white-space:
nowrap;

}



.skills-modal-footer{

display:flex;

gap:
12px;

margin-top:
25px;

flex-wrap:
wrap;

}



.modal-btn{

flex:
1;

padding:
10px;

font-size:
13px;

}



#modal-counter{

font-size:
13px;

}



.skills-modal-close{

top:
12px;

right:
12px;

width:
38px;

height:
38px;

font-size:
18px;

}

}



/* ==========================
SMALL PHONES
========================== */

@media (max-width:480px){

.skill-category-card{

padding:
18px;

}



.skill-category-card h3{

font-size:
1.35rem;

}



.preview-name{

font-size:
13px;

}



.skill-percent{

font-size:
11px;

}



.view-skills-btn{

font-size:
13px;

}



/* POPUP */

.skills-modal-content{

padding:
16px;

}



.modal-skill{

grid-template-columns:

65px
1fr
30px
55px;

gap:
5px;

font-size:
11px;

}



.modal-btn{

font-size:
11px;

padding:
8px;

}



.skill-level{

font-size:
7px;

padding:
3px 5px;

}

}



/* ==========================
VERY SMALL DEVICES
========================== */

@media (max-width:360px){

.modal-skill{

grid-template-columns:

55px
1fr
28px
48px;

gap:
4px;

font-size:
10px;

}


.skill-level{

font-size:
6px;

}


.preview-name{

font-size:
12px;

}

}