*{
    margin:0%;
    padding:0%;
    box-sizing: border-box;
}

html,body{
    height: 100%;
    width: 100%;
    background-color: rgb(227, 233, 234);
}
#main{
    height: 100%;
    width: 100%;
    background-color: rgb(227, 233, 234);
    /* display: flex; */
}

#header{
    width: 100%;
    height: 10vh;
    background-color: rgb(33, 37, 86);
    position: fixed;
    display: flex;
    border: 1px solid black;
    z-index: 100;
}

#fakeheader{ 
     width: 100%;
    height: 10vh;
    background-color: rgb(33, 37, 86);

}

#page1{
    height: 90vh;
    width: 100%;
     background-color: rgb(227, 233, 234);
}


#logo{
    margin-top: 5px;
    margin-left: 10px;
    margin-right: 20px;
    width: 13vw;
    height: 80%;
    border-radius: 50%;
    overflow: hidden;
}
#nav{
    display: flex;
    width: 60vw;
    height: 100%;
    align-items: center;
    justify-content: center;
    margin-left: 25px;
    border-radius: 20px;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}
.nav{
    align-items: center;
    color: rgb(242, 204, 204);
    width: 7vw;
    height: 100%;
    margin-left: 10px;
}

#nvatext{
    display: flex;
    width: 87vw;
    height: 100%;
}
.nav{
    margin-left: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    color: rgb(240, 207, 207);
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}


#midsection{
    width: 100%;
    height: 80%;
    display: flex;
}


.page1mid{
    margin: 10px;
    margin-top: 15px;
   /* display: flex;
    align-items: center;
    justify-content: center;*/
}

#box1{
    /* background-color: aqua; */
    width: 50%;
    height: 90%;
}

#box2{
    
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50%;
    height: 90%;
}

#box1 h1{
    margin-top: 10%;
    margin-left: 20%;
    
}
#box1 p{
    margin-left: 20%;
    margin-top: 30px;
    color: rgb(30, 29, 29);
    font-weight: 500;
    line-height: 25px;
}

#box1 h4{
    color: rgb(54, 31, 76);
    margin-left: 20%;
    font-weight:bold;
}
#btns{
    display: flex;
    width: 100%;
    height: 10%;
    margin-top: 20%;
}
#btn1:hover{
    background-color: rgb(27, 10, 43);
}
#btn2:hover{
     background-color: rgb(27, 10, 43);
}
#btn1{
    width: 30%;
    padding: 10px 20px;
    color: white;
    background-color: rgb(52, 14, 87);
    margin-left: 20%;
    border-radius: 5px;
    border-bottom-width: 10px;
    border-right-width: 10px;
}
#btn2{
    
    width: 35%;
    padding: 10px 20px;
    color: rgb(2, 2, 2);
    border: 2px solid black;
    margin-left: 10%;
    border-radius: 5px;
}



#understrip{
    /* border: 1px solid black;
    margin-left: 10%;
    width: 80%;
    height: 17%;
    color: black;
    border-radius: 20px;
    background-color: rgb(233, 247, 249); */
     color: rgb(31, 32, 61);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}
#understrip:hover{
     border: 1px solid black;
    margin-left: 10%;
    width: 80%;
    height: 17%;
    border-radius: 20px;
    background-color: rgb(233, 247, 249);
    text-decoration: underline;
    text-decoration-color: rgb(243, 100, 4);
}

.profileimg{
   position: absolute;
    /*top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);*/
    width: 230px;
    height: 300px;
    border-radius: 20px;
    border: 1px black solid;
    overflow: hidden;
}
#img1{
    z-index: 4;
}

#img2{
    rotate: -6deg;
    z-index: 3;
}

#img1:hover{
    z-index: 7;
}
#img2:hover{
    z-index: 7;
}

#profileimg img{
    height: 100%;
    width: 100%;
    object-fit: cover;
}

img{
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.nav:hover{
    text-decoration: underline;
    text-decoration-style: wavy;
    text-decoration-color: rgb(242, 98, 3);
}

/* page 2 start here */
#page2{
    /* margin: 20px; */
    height: 90vh;
    width: 100%;
    background-color: rgb(227, 233, 234);
    display: flex;
    flex-wrap: wrap;
}
#page2b1h1{
    height: 10vh;
    width: 100%;
    align-content: center;
    text-align: center;
    color: rgb(61, 6, 72);
    font-family:'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}
#page2img{
     height: 80vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* background-color: blue; */
}
#page2box1{
     height: 90vh;
    width: 45%;
    
}

.cards{
    position: absolute;
    /*top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);*/
    width: 230px;
    height: 300px;
    border-radius: 20px;
    border: 1px black solid;
    overflow: hidden;
}
.cards img{
    height: 100%;
    width: 100%;
    object-fit: cover;
}
#card1{
    z-index: 6;
}
#card2{
    rotate: -7deg;
    z-index: 5;
}
#card3{
    rotate: -14deg;
    z-index: 4;
}
#card4{
    rotate: +7deg;
    z-index: 3;
}
#card5{
    rotate: +14deg;
    z-index: 2;
}
#card1:hover{
    z-index: 10;
}
#card2:hover{
    z-index: 10;
}
#card3:hover{
    z-index: 10;
}
#card4:hover{
    z-index: 10;
}
#card5:hover{
    z-index: 10;
}


#page2box2{
    margin: 10px 10px;
    border: 1px solid black;
    border-radius: 10px 25px 10px 25px;
    border-bottom-width: 5px;
    border-right-width: 5px;
    width: 45%;
    height: 80vh;
    /* background-color: blanchedalmond; */
}

#page2b2h2 {
    color: rgb(30, 1, 54);
    margin-left: 5%;
    margin-top: 7%;
    /* background-color: azure; */
    line-height: 30px;
    font-size: x-large;
    font-family:Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
}
#page2b2p{
    margin-left: 5%;
    margin-right: 5%;
    margin-top: 5%;
    line-height: 25px;
    font-weight: 500;
    font-style: italic;
}
caption{
    color: rgb(213, 81, 10);
    font-size: x-large;
    margin: 5px;
}
#table{
    border-radius: 15px 5px 15px 5px;
    border: 1px black solid;
    /* border-radius: 5px; */
    border-width: 2px 2px 5px 5px;
    margin-right: 20%;
    margin-left: 20%;
    margin-top: 15%;
    border-left-color: rgb(32, 32, 86);
    border-bottom-color: rgb(38, 38, 72);
}
#colum1{
    color: rgb(33, 33, 151);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: larger;
    border-radius: 6px;
    border-width: 2px;
    box-sizing: content-box;
}
#colum2{
    color: rgb(0, 0, 0);
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    font-size: larger;
    border-radius: 6px;
    border-width: 2px;
    box-sizing: content-box;
    border-color: black;
}

/* page 3 start here */
#page3{
    height: 90vh;
    width: 100%;
    /* background-color: aquamarine; */
    display: flex;
    align-items: center;
    justify-content: space-evenly;
}

.page3{
    border-radius: 5px 20px 5px 20px;
    border: 1px black solid;
}

#education{
    height: 80vh;
    width: 46%;
    background-color: rgb(209, 227, 231);
    /* background-color: blanchedalmond; */
    border-bottom-width: 5px;
    border-right-width: 5px;
    border-right-color: rgb(38, 38, 72);
    border-bottom-color: rgb(38, 38, 72);
}
#skills{
     height: 80vh;
    width: 46%;
    background-color: rgb(198, 221, 227);
    border-bottom-width: 5px;
    border-right-width: 5px;
    border-right-color: rgb(38, 38, 72);
    border-bottom-color: rgb(38, 38, 72);
  
}
#page3b1p{
    height: 20%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: xx-large;
    margin-top: 5%;
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    font-weight: 700;
    color: rgb(6, 26, 87);
}
#page3b1t1{
    margin-top: 20%;
    display: flex;
    justify-content: center;
}
#table2{
    border-radius: 15px 5px 15px 5px;
    border: 1px black solid;
    /* border-radius: 5px; */
    border-width: 2px 2px 5px 5px;
}
#tr1{
    background-color: rgb(33, 37, 86);
    color: white;
}
.th{
    border-radius: 5px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: larger;
    padding: 2px;
}
.tdc1{
    border-radius: 5px;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    padding: 2px;
    font-weight: 600;
    border-color: rgb(53, 37, 69);
    color: rgb(17, 17, 71);
}
.tdc23{
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    font-weight: 600;
    border-radius: 5px;
    color: rgb(20, 5, 56);
}
#ongoing{
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    padding: 2px;
    font-weight: 600;
    border-radius: 7px;
    background-color: rgb(31, 31, 161);
    color: white;
}
.tdc4{
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    padding: 2px;
    font-weight: 600;
    border-radius: 7px;
    background-color: rgb(197, 231, 245);

}
#skillsh1{
    width: 100%;
    height: 10%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: xx-large;
    font-weight: 600;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: rgb(44, 8, 77);
}
.skillsinb{
    margin-top: 2.5%;
    margin-left: 5%;
    height: 40%;
    width: 90%;
    display: flex;
    justify-content: space-evenly;
}
.page3b2bh1{
    height: 30%;
    width: 100%;
    font-size: x-large;
    font-weight: 600;
    font-family:'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    margin-top: 5%;
    margin-left: 5%;
    color: chocolate;
}
.page3b2bp{
    height: 60%;
    width: 100%;
    margin-top: 15%;
    margin-left: 3%;
    font-weight: 500;
    color: rgb(10, 10, 64);
    font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

.page3b2{
    border-radius: 5px;
    border: 1px black solid;
    height: 100%;
    width: 46%;
    /* background-color: blue; */
    border-radius: 15px 5px 15px 5px;
    border-bottom-width: 5px;
    border-top-width: 5px;
}

/* page 4 start here */
#page4{ 
    height: 90vh;
    width: 100%;
    /* background-color:beige; */
    display: flex;
    align-items: center;
    justify-content: space-evenly;
     
}
.page4{
    border-radius: 5px 20px 5px 20px;
    border: 1px black solid;
}
#hobbies{
    height: 80vh;
    width: 46%;
    /* background-color: aqua; */
    border-bottom-width: 5px;
    border-right-width: 5px;
    border-right-color: rgb(38, 38, 72);
    border-bottom-color: rgb(38, 38, 72);
}
#iframe{
    height: 80vh;
    width: 46%;
    /* background-color: bisque; */
    border-bottom-width: 5px;
    border-right-width: 5px;
    border-right-color: rgb(38, 38, 72);
    border-bottom-color: rgb(38, 38, 72);
}
#hobbiesb{
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10%;
    margin-left: 10%;
    height: 80%;
    width: 90%;
}
.liheading{
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size:xx-large;
    font-weight: 700;
    line-height: 45px;
    color: #14213d;
}
.abcd{
    margin-left: 20px;
    font-style: italic;
    line-height: 30px;
    font-weight: 500;
    font-size: larger;
}

#iframeh1{
    height: 15%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: large;
    font-weight: 700;
    color: rgb(208, 98, 14);
    /* font-family: 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; */
}

#iframevideo{
    margin-left: 5%;
    margin-bottom: 5%;
    height: 75%;
    width: 90%;
    border-radius: 5px;
}

/* page 5 start here */
#page5{
    height: 90vh;
    width: 100%;
    /* background-color: antiquewhite; */
    background-color:rgb(43, 43, 111) ;
}
#page5upper{
    height: 90%;
    width: 100%;
    /* background-color: aliceblue; */
    display: flex;
    align-items: center;
    justify-content: space-evenly;
}
#page5b1h1{
    width: 100%;
    height: 10%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(241, 215, 215);
    font-size: xx-large;
    font-weight: 700;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
}

#page5iframe{
    width: 70%;
    height: 70%;
    margin-left: 15%;
    margin-top: 4%;
}
#page5b1btn{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 15%;
    width: 100%;
}
#iiitlink{
    padding: 5px;
    text-decoration: none;
    color: whitesmoke;
    font-size: larger;
    font-weight: 600;
    line-height: 20px;
}
#page5btn{
    border-radius: 10px;
    border:2px black solid ;
    background-color: rgb(2, 2, 24);
}
#iiit{
    width: 50%;
    height: 100%;
    background-color:rgb(43, 43, 111) ;
}
#contact{
    width: 50%;
    height: 100%;
    /* background-color: rgb(241, 241, 168); */
}

#contacth1{
    margin-top: 5%;
    height: 20%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(241, 215, 215);
    font-size:xx-large;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    font-weight: 800;

}
#contactp{
    margin-left: 10%;
    height: 40%;
    width: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 25px;
    font-weight: 700;
    font-style: italic;
    font-size: larger;
    /* color: whitesmoke; */
}
#contactlink{
    height: 30%;
    width: 80%;
    margin-left: 10%;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    border-radius: 10px;
}

.contactlink{
    width: 20%;
    height: 60%;

}
#copyright{
    margin-top: 10px;
    font-weight: 500;
    text-align: center;
}





html{
    scroll-behavior: smooth;
    scroll-padding-top: 10vh;      
}
#menu-toggle,
#hamburger{
    display: none;
}


/* animation */
@keyframes slideDown{
    from{ translate: 0 -100%; }
}
@keyframes fadeUp{
    from{ opacity: 0; translate: 0 28px; }
}
@keyframes popIn{
    from{ opacity: 0; scale: 0.7; }
}
@keyframes floaty{
    50%{ translate: 0 -12px; }
}
@keyframes menuIn{
    from{ opacity: 0; translate: 0 -10px; }
}

/* ---- on page load ---- */
#header{
    animation: slideDown 0.6s ease-out backwards;
}
#box1 h1{
    animation: fadeUp 0.7s ease-out 0.2s backwards;
}
#box1 h4{
    animation: fadeUp 0.7s ease-out 0.35s backwards;
}
#box1 p{
    animation: fadeUp 0.7s ease-out 0.5s backwards;
}
#btns{
    animation: fadeUp 0.7s ease-out 0.65s backwards;
}
#img1{
    animation: popIn 0.8s ease-out 0.3s backwards,
               floaty 5s ease-in-out 1.1s infinite;
}
#img2{
    animation: popIn 0.8s ease-out 0.5s backwards,
               floaty 5s ease-in-out -2s infinite;
}
#understrip h1{
    animation: fadeUp 0.8s ease-out 0.8s backwards;
}

@keyframes revealUp{
    from{ opacity: 0; translate: 0 60px; }
}
@keyframes fanOut{
    from{ opacity: 0; rotate: 0deg; }
}
@supports (animation-timeline: view()){
    #page2box2,
    #education,
    #skills,
    #hobbies,
    #iframe,
    #contact,
    #iiit{
        animation: revealUp linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 60%;
    }
    .cards{
        animation: fanOut linear both;
        animation-timeline: view();
        animation-range: entry 10% cover 40%;
    }
}



.nav{
    transition: translate 0.2s;
}
.nav:hover{
    translate: 0 -2px;
}
.nav:active{
    scale: 0.94;
}

#btn1,
#btn2{
    transition: background-color 0.3s, translate 0.25s, box-shadow 0.25s, scale 0.15s;
}
#btn1:hover,
#btn2:hover{
    translate: 0 -4px;
    box-shadow: 0 8px 16px rgba(27, 10, 43, 0.35);
}
#btn1:hover a,
#btn2:hover a{
    color: white;
}
#btn1:active,
#btn2:active{
    scale: 0.95;
    translate: 0 0;
    box-shadow: none;
}

/* profile photos + mentor cards */
.profileimg,
.cards{
    transition: scale 0.3s, box-shadow 0.3s;
    cursor: pointer;
}
.profileimg:hover,
.cards:hover{
    scale: 1.1;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}
.profileimg:active,
.cards:active{
    scale: 1.03;
}
.profileimg img,
.cards img{
    transition: filter 0.3s;
}
.profileimg:hover img,
.cards:hover img{
    filter: brightness(1.08) saturate(1.1);
}

/* big content boxes */
#page2box2,
.page3,
.page4{
    transition: box-shadow 0.3s;
}
#page2box2:hover,
.page3:hover,
.page4:hover{
    box-shadow: 0 10px 24px rgba(33, 37, 86, 0.25);
}

#table tr,
#table2 tr{
    outline: 2px solid transparent;
    outline-offset: -2px;
    transition: outline-color 0.25s;
}
#table tr:hover,
#table2 tr:not(#tr1):hover{
    outline-color: rgb(213, 81, 10);
}

/* skill cards */
.page3b2{
    transition: translate 0.3s, box-shadow 0.3s;
    cursor: default;
}
.page3b2:hover{
    translate: 0 -8px;
    box-shadow: 0 12px 20px rgba(33, 37, 86, 0.3);
}
.page3b2bh1{
    transition: letter-spacing 0.3s;
}
.page3b2:hover .page3b2bh1{
    letter-spacing: 1.5px;
}

/* hobby list */
.abcd{
    transition: translate 0.25s, color 0.25s;
}
.abcd:hover{
    translate: 10px 0;
    color: chocolate;
}

/* video + map frames */
#iframevideo,
#page5iframe{
    transition: box-shadow 0.3s;
}
#iframevideo:hover,
#page5iframe:hover{
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
}

/* contact icons */
.contactlink{
    transition: scale 0.25s, rotate 0.25s, filter 0.25s;
}
.contactlink:hover{
    scale: 1.2;
    rotate: 6deg;
    filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.45));
}
.contactlink:active{
    scale: 0.95;
}

/* college button */
#page5btn{
    cursor: pointer;
    transition: translate 0.25s, box-shadow 0.25s, scale 0.15s;
}
#page5btn:hover{
    translate: 0 -3px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}
#page5btn:active{
    scale: 0.95;
    translate: 0 0;
}



@media (max-width: 1024px){
    #logo{
        width: 10vw;
        min-width: 60px;
        margin-right: 10px;
    }
    #nav{
        width: 75vw;
        margin-left: 10px;
    }
    .nav{
        width: auto;
        margin-left: 12px;
        padding: 0 6px;
        font-size: 14px;
    }

    #box1 h1,
    #box1 h4,
    #box1 p{
        margin-left: 8%;
    }
    #box1 h1{
        font-size: 1.8rem;
    }
    #btns{
        margin-top: 12%;
    }
    #btn1{
        margin-left: 8%;
        padding: 10px 14px;
    }
    #btn2{
        margin-left: 6%;
        padding: 10px 14px;
    }

    .profileimg,
    .cards{
        width: 200px;
        height: 260px;
    }
    #understrip h1{
        font-size: 1.5rem;
        text-align: center;
        padding: 0 10px;
    }

    #table{
        margin-left: 8%;
        margin-right: 8%;
    }
    #table2{
        font-size: 14px;
    }
    .th{
        font-size: medium;
    }
    .page3b2bp{
        font-size: 14px;
    }
    .liheading{
        font-size: x-large;
    }
}

/* ---------- Tablets:  (<= 900px) ---------- */
@media (max-width: 900px){
    html{
        scroll-padding-top: 70px;
    }

    /* page 2 */
    #page2{
        height: auto;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: center;
    }
    #page2box1{
        width: 100%;
        height: auto;
    }
    #page2b1h1{
        height: 60px;
    }
    #page2img{
        height: 400px;
    }
    #page2box2{
        width: 92%;
        height: auto;
        margin: 20px auto;
        padding-bottom: 25px;
    }
    #page2b2h2{
        margin-top: 20px;
    }
    #table{
        margin: 20px auto 0;
    }

    /* page 3 */
    #page3{
        height: auto;
        flex-direction: column;
        gap: 25px;
        padding: 20px 0;
    }
    #education,
    #skills{
        width: 92%;
        height: auto;
        padding-bottom: 30px;
    }
    #page3b1p{
        height: auto;
        margin-top: 0;
        padding: 20px 0 0;
    }
    #page3b1t1{
        display: block;
        margin-top: 20px;
        padding: 0 10px;
        overflow-x: auto;
    }
    #table2{
        margin: 0 auto;
    }
    #skillsh1{
        height: auto;
        padding: 20px 0 10px;
    }
    .skillsinb{
        height: auto;
        margin-top: 15px;
    }
    .page3b2{
        height: auto;
        min-height: 170px;
        padding-bottom: 15px;
    }
    .page3b2bh1{
        height: auto;
    }
    .page3b2bp{
        height: auto;
        margin-top: 10px;
        padding-right: 8px;
    }

    /* page 4 */
    #page4{
        height: auto;
        flex-direction: column;
        gap: 25px;
        padding: 20px 0;
    }
    #hobbies,
    #iframe{
        width: 92%;
        height: auto;
    }
    #hobbiesb{
        margin: 0;
        height: auto;
        width: 100%;
        padding: 25px 10px;
    }
    #iframeh1{
        height: auto;
        padding: 15px 10px;
        text-align: center;
    }
    #iframevideo{
        height: auto;
        aspect-ratio: 16 / 9;
        margin-bottom: 5%;
    }

    /* page 5 */
    #page5{
        height: auto;
        padding-bottom: 10px;
    }
    #page5upper{
        height: auto;
        flex-direction: column;
        padding: 20px 0;
        gap: 25px;
    }
    #contact,
    #iiit{
        width: 92%;
        height: auto;
        padding-bottom: 20px;
    }
    #contacth1{
        height: auto;
        margin-top: 0;
        padding: 15px 0;
    }
    #contactp{
        height: auto;
        padding: 10px 0;
    }
    #contactlink{
        height: auto;
        padding: 20px 0;
        gap: 20px;
    }
    .contactlink{
        width: 64px;
        height: 64px;
    }
    #page5b1h1{
        height: auto;
        padding: 15px 0;
    }
    #page5iframe{
        width: 90%;
        height: 320px;
        margin-left: 5%;
    }
    #page5b1btn{
        height: auto;
        margin-top: 20px;
    }
}

/* ---------- Phones / small tablets (<= 768px) ---------- */
@media (max-width: 768px){
    /* Header */
    #header{
        height: 64px;
        align-items: center;
    }
    #fakeheader{
        height: 64px;
    }
    #logo{
        width: 52px;
        height: 52px;
        min-width: 52px;
        margin: 0 10px;
        flex-shrink: 0;
    }

    /* Hamburger button (right side of header) */
    #hamburger{
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        height: 100%;
        width: 56px;
        flex-shrink: 0;
        margin-left: auto;
        margin-right: 8px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    #hamburger span{
        display: block;
        width: 26px;
        height: 3px;
        border-radius: 3px;
        background-color: blanchedalmond;
        transition: transform 0.3s, opacity 0.3s;
    }
    /* 3 lines -> X when open */
    #menu-toggle:checked ~ #hamburger span:nth-child(1){
        transform: translateY(8px) rotate(45deg);
    }
    #menu-toggle:checked ~ #hamburger span:nth-child(2){
        opacity: 0;
    }
    #menu-toggle:checked ~ #hamburger span:nth-child(3){
        transform: translateY(-8px) rotate(-45deg);
    }

   
    #nav{
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        width: 220px;
        height: auto;
        margin: 0;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        border-radius: 0 0 0 16px;
        background-color: rgb(33, 37, 86);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
        overflow: hidden;
    }
   
    #menu-toggle:checked ~ #nav,
    #hamburger:hover ~ #nav,
    #nav:hover{
        display: flex;
        animation: menuIn 0.25s ease-out;
    }
    .nav{
        width: 100%;
        height: auto;
        margin: 0;
        padding: 0;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        font-size: 15px;
    }
    .nav:hover{
        translate: 0 0;
    }
    .nav nav,
    .nav nav a{
        display: block;
        width: 100%;
    }
    .nav nav a{
        padding: 14px 20px;
        text-align: left;
    }

    
    #header:not(:has(#menu-toggle)) #nav{
        display: flex;
        position: static;
        flex: 1;
        flex-direction: row;
        width: auto;
        margin: 0;
        justify-content: flex-start;
        align-items: center;
        box-shadow: none;
        border-radius: 0;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
        animation: none;
    }
    #header:not(:has(#menu-toggle)) #nav::-webkit-scrollbar{
        display: none;
    }
    #header:not(:has(#menu-toggle)) .nav{
        width: auto;
        flex-shrink: 0;
        margin-left: 6px;
        padding: 0 8px;
        border-bottom: 0;
        font-size: 13px;
    }
    #header:not(:has(#menu-toggle)) .nav nav,
    #header:not(:has(#menu-toggle)) .nav nav a{
        display: inline;
        width: auto;
        padding: 0;
    }

    /* Page 1 */
    #page1{
        height: auto;
        padding-bottom: 20px;
    }
    #midsection{
        flex-direction: column;
        height: auto;
    }
    #box1,
    #box2{
        width: 100%;
        height: auto;
    }
    #box1 h1{
        margin-top: 20px;
        margin-left: 5%;
    }
    #box1 h4,
    #box1 p{
        margin-left: 5%;
        margin-right: 5%;
    }
    #btns{
        height: auto;
        margin-top: 25px;
        gap: 12px;
        flex-wrap: wrap;
    }
    #btn1,
    #btn2{
        width: auto;
        margin-left: 5%;
    }
    #btn2{
        margin-left: 0;
    }
    #box2{
        height: 340px;           
        margin-top: 20px;
    }
    #understrip{
        margin: 20px 5% 0;
        text-align: center;
    }
    #understrip:hover{
        margin-left: 5%;
        width: auto;
        height: auto;
    }
}

/* ---------- Phones (<= 600px) ---------- */
@media (max-width: 600px){
    /* skill cards one per row */
    .skillsinb{
        flex-direction: column;
        gap: 15px;
        width: 90%;
    }
    .page3b2{
        width: 100%;
        min-height: 120px;
    }
    .page3b2bh1{
        margin-top: 12px;
    }

    #page5iframe{
        height: 260px;
    }
    #table,
    #table2{
        font-size: 13px;
    }
    caption{
        font-size: large;
    }
}

/* ---------- Small phones (<= 480px) ---------- */
@media (max-width: 480px){
    html{
        scroll-padding-top: 62px;
    }
    #header{
        height: 56px;
    }
    #fakeheader{
        height: 56px;
    }
    #logo{
        width: 44px;
        height: 44px;
        min-width: 44px;
        margin: 0 8px;
    }

    #box1 h1{
        font-size: 1.5rem;
    }
    #box1 h4{
        font-size: 0.85rem;
    }
    #box1 p{
        font-size: 0.95rem;
        line-height: 22px;
    }
    #btn1,
    #btn2{
        padding: 8px 14px;
    }
    #btn1 h3,
    #btn2 h3{
        font-size: 0.95rem;
    }

    .profileimg,
    .cards{
        width: 170px;
        height: 225px;
        border-radius: 14px;
    }
    #box2{
        height: 290px;
    }
    #page2img{
        height: 330px;
    }

    #understrip h1{
        font-size: 1.2rem;
    }
    #page2b1h1 h2{
        font-size: 1.3rem;
    }
    #page3b1p{
        font-size: x-large;
    }
    #skillsh1{
        font-size: x-large;
    }
    .liheading{
        font-size: larger;
    }
    .abcd{
        font-size: medium;
    }
    #contacth1{
        font-size: x-large;
    }
    #contactp{
        font-size: medium;
        padding: 10px 12px;
    }
    #copyright{
        font-size: 12px;
        padding: 0 10px 10px;
    }
}

/* ---------- Very small phones (<= 360px) ---------- */
@media (max-width: 360px){
    .profileimg,
    .cards{
        width: 150px;
        height: 200px;
    }
    #box2{
        height: 260px;
    }
    #page2img{
        height: 300px;
    }
    #btns{
        flex-direction: column;
        align-items: flex-start;
    }
    #btn2{
        margin-left: 5%;
    }
    .contactlink{
        width: 52px;
        height: 52px;
    }
}

/* ---------- Landscape phones (short screens) ---------- */
@media (max-height: 500px) and (orientation: landscape){
    #header,
    #fakeheader{
        height: 56px;
    }
    #page1{
        height: auto;
    }
}


@media (hover: none){
    .page3b2:active{
        translate: 0 -8px;
        box-shadow: 0 12px 20px rgba(33, 37, 86, 0.3);
    }
    .abcd:active{
        translate: 10px 0;
        color: chocolate;
    }
    .cards:active,
    .profileimg:active{
        scale: 1.1;
        box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
    }
    .contactlink:active{
        scale: 1.2;
        rotate: 6deg;
    }
    #btn1:active,
    #btn2:active{
        scale: 0.95;
    }
    #btn1:active a,
    #btn2:active a{
        color: white;
    }
}


@media (prefers-reduced-motion: reduce){
    #img1,
    #img2{
        animation: popIn 0.8s ease-out backwards;
    }
    html{
        scroll-behavior: auto;
    }
}
