:root {
    --bg: #030308;
    --card: #09090f;
    --blue: #1ad1ff;
    --discord: #5865F2;
    --youtube: #FF0000;
}

body { margin: 0; background: var(--bg); color: white; font-family: 'Inter', sans-serif; overflow-x: hidden; }

/* NAVBAR */
.navbar { position: fixed; top: 0; width: 100%; padding: 12px 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(15px); z-index: 1000; border-bottom: 1px solid rgba(26,209,255,0.2); }
.nav-inner { max-width: 1400px; margin: auto; display: flex; justify-content: space-between; align-items: center; padding: 0 40px; }
.nav { display: flex; gap: 35px; position: absolute; left: 50%; transform: translateX(-50%); }
.nav a { color: #ccc; font-weight: 700; text-decoration: none; font-size: 14px; display: flex; align-items: center; gap: 8px; transition: 0.3s; }
.nav a i { color: var(--blue); }
.nav a.active, .nav a:hover { color: var(--blue); text-shadow: 0 0 15px var(--blue); }
.nav-logo img { height: 35px; }
/* Navbar ke buttons ko center karne ke liye */


/* PFP & SIDE ICONS */
.project-pfp-header{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:60px;
  padding-top:140px;
  margin-bottom:20px;
}

/* wrapper handles hover scale */
.pfp-main-box{
  transition: transform .4s ease;
}
.pfp-main-box:hover{
  transform: scale(1.15);
}

/* image handles animation only */
.wavy-pfp{
  width:350px;
  animation: wave 3s infinite ease-in-out;
  filter: drop-shadow(0 0 40px rgba(26,209,255,.3));
  cursor:pointer;
}


.side-icon { font-size: 40px; transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); text-decoration: none; }
.side-icon.discord { color: var(--discord); }
.side-icon.youtube { color: var(--youtube); }
.side-icon:hover { transform: scale(1.3); }

@keyframes wave { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }

/* TITLE */
.title-container { text-align: center; margin-bottom: 20px; }
.main-title-blue { font-size: 70px; font-weight: 900; color: var(--blue); margin: 0; text-shadow: 0 0 30px rgba(26,209,255,0.4); letter-spacing: 2px; }
.sub-title-white { font-size: 35px; font-weight: 700; color: white; margin: -15px 0 0; letter-spacing: 10px; }
.featured-subtitle { color: #888; text-align: center; max-width: 700px; margin: 0 auto 60px; line-height: 1.6; }

/* GRID */
.section-container { max-width: 1300px; margin: 0 auto 100px; padding: 0 20px; }
.centered-label { text-align: center; display: flex; justify-content: center; align-items: center; gap: 20px; font-size: 28px; color: var(--blue); margin-bottom: 50px; }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }

/* CARDS */
.project-card { background: var(--card); border-radius: 15px; border: 1px solid #1a1a22; position: relative; transition: 0.35s ease; overflow: hidden; }
.project-card:hover { border-color: var(--accent); transform: scale(1.05) translateY(-10px); box-shadow: 0 20px 55px -15px var(--accent); }
.img-container { height: 210px; background: #000; display: flex; justify-content: center; align-items: center; }
.img-container img { max-width: 80%; max-height: 80%; object-fit: contain; }
.card-info { padding: 25px; }

.tag { position: absolute; top: 15px; right: 15px; background: #ff0000; color: white; font-size: 11px; padding: 5px 12px; border-radius: 6px; font-weight: 800; }
.tag-dev { background: #1ad1ff; }
.tag-admin { background: #800080; }

.mini-tags { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.mini-tags span { font-size: 10px; padding: 4px 12px; border-radius: 4px; border: 1px solid rgba(255,255,255,0.1); font-weight: 600; }

/* TAG COLORS */
.t-red { color: #ff4d4d; border-color: #ff4d4d !important; }
.t-purple { color: #a333ff; border-color: #a333ff !important; }
.t-green { color: #32cd32; border-color: #32cd32 !important; }
.t-yellow { color: #ffff00; border-color: #ffff00 !important; }
.t-blue { color: #1ad1ff; border-color: #1ad1ff !important; }
.t-orange { color: #ff4500; border-color: #ff4500 !important; }

.view-btn { width: 100%; background: #12121a; border: 1px solid #222; color: #fff; padding: 13px; border-radius: 8px; cursor: pointer; transition: 0.3s; font-weight: 700; }
.project-card:hover .view-btn { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 20px var(--accent); }

/* --- MODAL FIXES (THE MAIN PART) --- */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 3000; align-items: center; justify-content: center; backdrop-filter: blur(10px); }
.modal-content { background: var(--card); width: 90%; max-width: 850px; border-radius: 20px; border: 1px solid #333; position: relative; animation: zoomIn 0.3s ease; }

.modal-body-layout { display: flex; flex-direction: row; gap: 30px; padding: 40px; }
@media (max-width: 768px) { .modal-body-layout { flex-direction: column; padding: 20px; } }

.modal-slider { flex: 1; position: relative; display: flex; align-items: center; background: #000; border-radius: 15px; min-height: 300px; }
.modal-img-wrapper { width: 100%; display: flex; justify-content: center; }
#modalImg { max-width: 90%; max-height: 250px; object-fit: contain; }

.swipe-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; cursor: pointer; transition: 0.3s; color: white; }
.swipe-btn:hover { background: var(--blue); }
.swipe-btn.left { left: 10px; }
.swipe-btn.right { right: 10px; }

.modal-details { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.role-badge { display: inline-block; width: fit-content; padding: 5px 15px; border-radius: 20px; font-size: 12px; font-weight: 800; background: #ff0000; margin-bottom: 15px; }
#modalTitle { font-size: 32px; margin: 0 0 10px 0; color: var(--blue); }
#modalDesc { color: #ccc; line-height: 1.6; margin-bottom: 20px; }
.modal-tag-container { display: flex; gap: 10px; }
.modal-tag-container span { padding: 5px 15px; border-radius: 5px; border: 1px solid #333; font-size: 12px; }

.close-modal { position: absolute; top: 15px; right: 20px; font-size: 30px; color: #777; cursor: pointer; transition: 0.3s; }
.close-modal:hover { color: white; transform: rotate(90deg); }

@keyframes zoomIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

/* HACKING MODAL */
.h-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.98); z-index: 4000; align-items: center; justify-content: center; }
.h-modal-content { position: relative; max-width: 80%; }
.h-modal-content img { width: 100%; border: 2px solid #ff0000; box-shadow: 0 0 50px #ff0000; }
.h-close { position: absolute; top: -50px; left: 0; font-size: 40px; color: white; cursor: pointer; }

/* ================= FOOTER ================= */
.footer { margin-top: 50px; padding: 20px 90px; border-top: 1px solid rgba(255, 0, 0, 0.2); display: flex; justify-content: space-between; align-items: center; background: #050509; }
.footer-left { display: flex; align-items: center; gap: 12px; }
.footer-pfp { width: 32px; height: 32px; border-radius: 50%; border: 1px solid red; }
.copyright { font-size: 13px; color: #777; }
.copyright b { color: rgb(0, 140, 255); }
.footer-right { display: flex; gap: 15px; }
.footer-right a { color: #777; font-size: 16px; transition: 0.3s; }
.footer-right a:hover { color: rgb(0, 162, 255); text-shadow: 0 0 10px rgb(0, 132, 255); }

/* REVEAL */
.reveal { opacity: 0; transform: translateY(40px); transition: 0.8s; }
.reveal.active { opacity: 1; transform: translateY(0); }
.projects-section { padding-top: 140px; min-height: 100vh; }

/* ================= GLOBAL CARD HOVER FIX ================= */
/* Paste at END of CSS only */

.project-card{
  transition:
    transform .35s ease,
    box-shadow .35s ease,
    border-color .35s ease;
}

.project-card:hover{
  transform: translateY(-12px) scale(1.05);
  border-color: var(--accent);
  box-shadow: 0 25px 60px -15px var(--accent);
}

/* image thoda zoom on hover */
.project-card .img-container img{
  transition: transform .35s ease;
}
.project-card:hover .img-container img{
  transform: scale(1.08);
}

/* button glow on hover */
.project-card .view-btn{
  transition:
    background .3s ease,
    box-shadow .3s ease,
    border-color .3s ease;
}
.project-card:hover .view-btn{
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent);
}

/* mini tags subtle glow */
.project-card:hover .mini-tags span{
  box-shadow: 0 0 10px rgba(255,255,255,.15);
}

/* cursor clarity */
.project-card,
.project-card *{
  cursor: pointer;
}

.footer b {
  color: #0099ff;
}

/* ================= HACKING MODAL IMAGE SIZE BOOST ================= */
/* Paste at END only */

#hackingModal .h-modal-content{
  max-width: 95%;          /* pehle 80% tha */
}

#hackingModal .h-modal-content img{
  width: 100%;
  max-width: 2000px;        /* 👈 image ka actual size yahan control */
  height: auto;
  border: 2px solid #ff0000;
  box-shadow: 0 0 70px rgba(255,0,0,.8);
  transition: transform .35s ease;
}

/* optional: thoda zoom on hover */
#hackingModal .h-modal-content img:hover{
  transform: scale(1.05);
}

/* ================= FINAL MOBILE NAV FIX (PROJECTS PAGE) ================= */

.menu-toggle{
  display:none;
  font-size:24px;
  color:white;
  cursor:pointer;
}

@media (max-width:768px){

  .nav-inner{
    justify-content: space-between !important;
    padding: 0 20px !important;
  }

  .nav{
    position:absolute !important;
    left:0 !important;
    transform:none !important; /* important because currently centered */
    top:65px !important;
    width:100% !important;
    background:#0e0e11 !important;
    flex-direction:column !important;
    display:none !important;
    padding:20px 0 !important;
    text-align:center !important;
    border-top:1px solid rgba(26,209,255,0.3);
  }

  .nav.show{
    display:flex !important;
  }

  .menu-toggle{
    display:block !important;
  }

}

/* ================= PROJECT PAGE FINAL MOBILE FIX ================= */

/* Prevent right swipe */
html, body{
  width:100%;
  overflow-x:hidden !important;
}

*{
  box-sizing:border-box;
}

/* Fix navbar alignment */
@media (max-width:768px){

  .nav-inner{
    justify-content:space-between !important;
    padding:0 20px !important;
  }

  .nav{
    position:absolute !important;
    left:0 !important;
    top:65px !important;
    width:100% !important;
    transform:none !important;   /* remove center translate */
    flex-direction:column !important;
    background:#0e0e11 !important;
    display:none !important;
    padding:20px 0 !important;
    text-align:center !important;
    border-top:1px solid rgba(26,209,255,.3);
  }

  .nav.show{
    display:flex !important;
  }

  .menu-toggle{
    display:block !important;
    font-size:24px;
    color:white;
    cursor:pointer;
  }

  /* Fix large PFP */
  .wavy-pfp{
    width:220px !important;
  }

  /* Fix project cards */
  .projects-grid{
    grid-template-columns:1fr !important;
  }

  /* Modal mobile fix */
  .modal-content{
    width:95% !important;
    max-height:90vh !important;
    overflow-y:auto !important;
  }

  .modal-body-layout{
    flex-direction:column !important;
    padding:20px !important;
  }

  #modalImg{
    max-width:100% !important;
    max-height:250px !important;
  }

}

/* ===== FIX MODAL CLOSE BUTTON MOBILE ===== */

.modal-content{
  position:relative !important;
}

.close-modal{
  position:absolute !important;
  top:10px !important;
  right:15px !important;
  font-size:28px !important;
  z-index:5000 !important;
  color:white !important;
  background:rgba(0,0,0,0.6);
  width:35px;
  height:35px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
}

@media (max-width:768px){

  .modal-content{
    padding-top:50px !important;  /* space for button */
  }

}