html, body {
  border: none;
  scroll-behavior: smooth;
  box-sizing: border-box;
  background-color: #000;
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

#res-canvas {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  display: block;

}

.fps-container {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.4rem;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  z-index: 10;
  > p {
    all: unset;
    font-weight: bold;
    font-family: 'Nunito', sans-serif;
  }
}

.bg-container{

  z-index: -1;
  justify-content: center;
  display: flex;

}

nav{
    width: 100%;
    padding: 1rem 5%;
    background: #0d0d0d;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    margin-bottom: 0.5rem;
    height: 10%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 2;
}

.logo{
    font-size: 1.8rem;
    font-weight: 700;
    color: #1723ccff;
    letter-spacing: 1px;
}

.nav-links{
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links li a{
    position: relative;
    font-size: 1.05rem;
    font-weight: 500;
    text-decoration: none;
    color: #1723ccff;
    transition: 0.3s;
}

.nav-links li a:hover{
    color: #380bbfff;
    text-shadow: 0 0 10px #0aa9f3;
}

.btns{
    display: flex;
    gap: 2rem;
}
.btn{
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    background: #1723ccff;
    color: #0f172a;
    box-shadow: 0 0 15px #1723ccff;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

.btn:hover{
    background: #380bbfff;
    transform: scale(1.1);
    box-shadow: 0 0 25px #380bbfff;
}

.btnImage{
    width: 20px;
    height: 20px;
}


.hero-card {
  min-width: fit-content;
  min-height: fit-content;
  width: 36vw;
  height: 254px;
  border-radius: 20px;
  background-image: "#fff700";
  transition: all 0.2s;
}

.hero-card:hover{
  transform: scale(1.05);
  box-shadow: 0px 0px 10px 5px #1723ccff;
}

.hero-card__content {
  background: linear-gradient(90deg, rgba(36, 36, 36, 1), rgba(36, 36, 36, 0.4));
  border-radius: 17px;
  width: 100%;
  height: 100%;
  padding: 10px;
}

.hero-card-container{
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  z-index: 1;
  top: 15%;
}

.hero-card h1{
  color: #1723ccff;
  font-size: 4rem;
  
}

.hero-card h2{
  color: rgb(90, 99, 220);
}

.hero-card p{
  text-decoration: underline;
  margin-top: 10px;
  color: rgb(106, 114, 230);
}
.skills-images-container{
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 20px;
}

.skill-image{
  width: 70px;
  height: 70px;
  background-color: #000000;
  border-radius: 20%;
  transition: 0.2s;
}

.skill-image:hover{
  scale: 1.05;
}



.card {
 width: 50vw;
 height: 45vh;
 background: linear-gradient(90deg, rgba(36, 36, 36, 1), rgba(36, 36, 36, 0.4));
 transition: all .3s;
 border-radius: 10px;
}

.card:hover {
 transform: scale(1.05);
 box-shadow: 0px 0px 20px 5px #1723ccff;
 border-radius: 20px;
}


.about-container{
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  z-index: 1;
  top: 60%;
}


.card-title{
  text-align: center; 
  color: #1723ccff;
  padding-top: 10px;
}

.content-container{
  display: flex;
  justify-content: center;
}

.profile-pic{
  height: 200px;
  width: 200px;
  margin-left: 10%;
  margin-top: 8%;
  margin-right: 10%;
  border-radius: 100px;
}

.bio{
   font-size: 1.5vw;
   color: rgb(90, 99, 220);
   margin-top: 30px;
   margin-left: 5px;
}

.projects-container{
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  position: absolute;
  z-index: 1;
  top: 120%;
}

.projects-grid{
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 25px;
  margin-top: 30px;
}


.projects-container h1{
  color: #1723ccff;
  margin-bottom: 5px;
  font-size: 1.6rem;
}

.projects-container h2{
  color: rgb(90, 99, 220);
  text-align: center;
  font-size: medium;
  margin-bottom: 10px;
  
}

#project-card{
  display: flex;
  align-items: center;
  flex-direction: column;
  width: 20vw;
  height: 45vh;
}

.project-image{
  width: 18vw;
  height: 24vh;
  border-radius: 15px;
  margin-top: 10px;
  margin-bottom: 15px;
}

#project-card p{
  color: rgb(106, 114, 230);
  text-align: center;
  font-size: 1em;
}

#project-card button{
  position: relative;
  
}

#text-card{
  width: fit-content;
  height: fit-content;
}

#text-card h1{
  padding: 20px;
}

.contact-container{
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    position: absolute;
    z-index: 1;
    top: 230%;
}

.contact-container h1{
    color: #1723ccff;
    margin-bottom: 5px;
    font-size: 1.6rem;
}

.contact-container form{
  margin-top: 20px;
}

.contact-container label{
  color: #1723ccff;
  font-family: "Poppins", sans-serif;
}

.contact-container .card{
  width: 36vw;
  padding-left: 10px;
  height: 3rem;
  color: rgb(106, 114, 230);
  border-color: rgba(0, 0, 0, 0);
}



.contact-container #femail{
  font-size: 1.6rem;
}

.contact-container #fsubject{
  font-size: 1.6rem;
}

.contact-container #fmessage{
  height: 10rem;
  resize: none;
  font-size: 1rem;
  padding: 10px;

}
.project-data{
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 85%;
}

.project-footer{
  height: 15%;
}

.resume-container{
  display: flex;
  color:#1723ccff ;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  position: absolute;
  z-index: 1;
  gap: 8vh;
  top: 15%;
}

#resume{
  display: flex;
  height: 1400px;
  width: 65vw;
  justify-content: center;
  align-items: center;
}

.Resume-Frame{
  width: 90%;
  height: 90%;
}

.btn-link{
  text-decoration: none;
  color: #000;
}

.project-container{
  display: flex;
  color:#1723ccff ;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 20%;
}

.trailer-container{
  margin-top: 30px;
  margin-left: 30px;
  display: flex;
  justify-content: left;
  gap: 2rem;
  flex-wrap: wrap;
}

.trailer-container #video-card{
  width: 45vw;
  height: 70vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.video-container{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-direction: column;
  height: 75%;
  width: 100%;
}
.trailer{
  width: 90%;
  height: 90%;
}

.button-container{
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  gap: 20px;
}

#video-card p{
    color: rgb(106, 114, 230);
  text-align: center;
  font-size: 1.2em;
}

.title-container{
  display: flex;
  justify-content: center;
  align-items: center;
  color:#1723ccff ;
  position: absolute;
}

/* Hamburger Button - hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 10;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 3px;
  background-color: #1723ccff;
  border-radius: 3px;
  transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Responsive iframe defaults */
.video-container iframe {
  width: 100%;
  max-width: 700px;
  aspect-ratio: 16/9;
}

 .trailer-container #video-card #project-desc p{
    font-size: 8vh;
}

/* ========== MOBILE (max-width: 768px) ========== */
@media screen and (max-width: 768px) {
  html, body {
    overflow-x: hidden;
  }

  /* Hamburger visible on mobile */
  .hamburger {
    display: flex;
  }

  /* Nav layout: logo + hamburger on one row, rest hidden */
  nav {
    flex-wrap: wrap;
    height: auto;
    padding: 1rem 5%;
    gap: 0;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0.8rem;
    padding: 1rem 0;
    text-align: center;
  }

  .nav-links.nav-open {
    display: flex;
  }

  .btns {
    display: none;
    width: 100%;
    justify-content: center;
    gap: 1rem;
    padding-bottom: 1rem;
  }

  .btns.nav-open {
    display: flex;
  }

  .logo {
    font-size: 1.4rem;
  }

  .bg-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    width: 100%;
    left: 0;
    overflow-x: hidden;
  }

  #res-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
  }

  .hero-card-container,
  .about-container,
  .projects-container,
  .contact-container,
  .resume-container,
  .project-container,
  .title-container {
    position: relative !important;
    top: auto !important;
    z-index: 1;
    width: 100%;
    padding: 20px 5%;
  }

  /* Hero card */
  .hero-card {
    width: 90vw;
    height: auto;
    min-height: auto;
  }

  .hero-card h1 {
    font-size: 2rem;
  }

  .hero-card-container {
    display: flex;
    justify-content: center;
  }

  .skills-images-container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .skill-image {
    width: 45px;
    height: 45px;
  }

  /* Cards - generic */
  .card {
    width: 90vw;
    height: auto;
    min-height: auto;
  }

  .card:hover {
    transform: none;
    box-shadow: none;
  }

  /* About section */
  .about-container {
    display: flex;
    justify-content: center;
  }

  .content-container {
    flex-direction: column;
    align-items: center;
  }

  .profile-pic {
    width: 130px;
    height: 130px;
    margin: 15px auto;
  }

  .bio {
    font-size: 0.95rem;
    padding: 0 15px 15px;
    margin-top: 5px;
  }

  /* Projects section - one card per row */
  .projects-container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .projects-grid {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
  }

  #project-card {
    width: 90vw;
    height: auto;
    min-height: auto;
    padding-bottom: 15px;
  }

  .project-image {
    width: 80vw;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
  }

  #project-card h1 {
    font-size: 1.2rem;
  }

  #project-card h2 {
    font-size: 0.85rem;
  }

  /* Contact section - flows naturally below projects */
  .contact-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 40px;
  }

  .contact-container .card {
    width: 90vw;
    height: 3rem;
    min-height: auto;
  }

  .contact-container #fmessage {
    width: 90vw;
    height: 8rem;
  }

  .contact-container form {
    width: 90vw;
  }

  /* Project detail pages */
  .project-container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .trailer-container {
    margin: 15px 0;
    width: 100%;
  }

  .trailer-container #video-card {
    width: 94vw;
    height: auto;
    min-height: auto;
    padding: 10px;
  }

  .video-container {
    width: 100%;
    padding: 5px;
  }

  .video-container iframe {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 180px;
    aspect-ratio: 16/9;
  }

  .video-container h1 {
    font-size: 1.1rem;
  }

  #video-card p {
    font-size: 0.95rem;
    padding: 10px;
    word-wrap: break-word;
  }

  .title-container {
    display: flex;
    justify-content: center;
  }

  #text-card h1 {
    font-size: 1.4rem;
    padding: 12px;
  }

  .button-container {
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }

  /* Resume page */
  .resume-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3vh;
  }

  #resume {
    width: 90vw;
    height: 70vh;
  }

  /* Button touch targets */
  .btn {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    min-height: 44px;
  }
}

/* ========== TABLET (769px - 1024px) ========== */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .hero-card {
    width: 55vw;
  }

  .card {
    width: 70vw;
  }

  #project-card {
    width: 30vw;
  }

  .project-image {
    width: 28vw;
  }

  .trailer-container #video-card {
    width: 60vw;
  }

  .contact-container .card {
    width: 55vw;
  }

  .video-container iframe {
    max-width: 100%;
  }
}