/* =============Global============= */

*{
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}


body{
   background-color: rgb(0,0,33);
   overflow-x: hidden;
   color: white;
   font-family:"poppins","Times New Roman",sans-serif;
   margin:0;
}

hr{
    height:2.5px;
    background-color:#fff ;
}

.gray{
    color:gray;
    font-size:clamp(12px, 1.5vw, 25px);
}
/* =============Navigation============= */
header{
    margin-block-start:0;
    height:8.5svh;
    background-color: rgb(10 18 62);
    position:sticky;
    width:100%;
    overflow-x:clip;
    top:0;
    z-index:10;
    font-family:Georgia,Helvetica,Monospace;
}

nav{
    display:flex;
    justify-content:space-between;
    flex:1;
    height: 100%;
    width: 100%;
}

nav button.button-pop{
    display:flex;
    justify-content:center;
    align-items:center;
    background-color:rgb(10 18 62);    
    border:none; 
    cursor:pointer;
    font-size:clamp(1rem,4vw,4rem);
    width: 50vw;
    color: white;
    anchor-name:--my-anchor;
}

#popover-div:popover-open {
    margin-inline-start: 1em;
    position-anchor: --my-anchor;
    position-area: left bottom;
    background: #12121a;
    border: none;
    border-radius: 1.5em;
    corner-shape: squircle;
    color: aliceblue;
    inline-size: auto;
    padding-inline: clamp(0.5em, 1.5vw, 0.75em);
    padding-block: clamp(0.5em, 1.5vw, 1em);
}

/* 
#popover-div:popover-open{
margin-inline-start:1em;
position-anchor:--my-anchor;
position-area: left bottom;
background-color: transparent;
border: none;
border-radius: 1.5em;
corner-shape:squircle;
background: #12121a;
list-style-type:none;
color: aliceblue;
width:12.5em;
padding-inline:0.5em;
font-size:1rem;
z-index:3;
}

h1{
font-size:1.5rem;
}
.popover-tech-stack{
color:#2b96ff;
margin-block:0.5em;
}

.popover-tech-stack span{
display:flex;
justify-content:center;
align-items:center;
gap:0.2em;
white-space:nowrap;
 */
h1 {
    font-size: clamp(1.5rem,5vw, 3rem);
    white-space:nowrap;
}

#popover-div p{
    font-size:clamp(0.5rem,5vw, 2.5rem);
}
.popover-tech-stack {
    color: #2b96ff;
    margin-block: clamp(0.5em, 1.5vw, 1em);
}

.popover-tech-stack img{
    display:inline-block;
    margin:0.5em;
    width: clamp(30px,10vw,50px);
    height:clamp(30px,10vw,50px) ;
}

.popover-tech-stack span {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(0.15rem, 0.6vw, 0.3rem);
    white-space: nowrap;
}


nav button img.crimsonVoid-avatar{
    margin-inline-end:0.5em;
    border-radius: 50%;
    border:2px solid white;
    width: max(3rem,5dvh);
    height:max(3rem,5dvh);
}

nav ul.computer-ul{
    width: 50%;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    list-style-type:none;
    padding-inline-start:0.25em;
    padding-inline-end:0.5em;
    gap:clamp(0.25rem,2vw,0.8rem); 
    @media(width<700px){
        display:none;  
    }
}

nav div.Hamburger-Menu-Screen{
    display:flex;
    flex:1;
}

.overlay{
    display:none;
    width: 50%;
    height: 100dvh;
    position:fixed;
    left:0;
    z-index:3;
    backdrop-filter:blur(0.5em);
    @media(width>700px){
        display:none;  
    }
}
nav svg.Hamburger-Menu-Button-open{
    display:flex;
    justify-content:center;
    align-items:center;
    background-color:rgb(10 18 62);    
    border:none; 
    cursor:pointer;
    font-size:2vw;
    width:2.5rem;
    height: 2.5rem;
    color: white;
    margin:auto 1em auto 6rem;
    @media(width>700px){
        display:none;  
    }
}

nav section.Hamburger-Menu-Panel{
    position:fixed;
    display:none;
    align-items:center;
    justify-content:flex-start;
    flex-direction:column;
    margin-block:0;
    width: 50%;
    height:102dvh;
    background-color:rgb(26 26 26 / 1);
    color:white;
    z-index:3;
    
    @media(width>700px){
        display:none;  
    }
}

nav section.Hamburger-Menu-Panel ul{
    display:flex;
    flex-direction:column;
    gap:0.25em;
    justify-content:flex-start;
    align-items:flex-start;
    list-style-type:none;
}
nav section.Hamburger-Menu-Panel ul li a{
    display:flex;
    align-items:center;
    justify-content:center;
    margin-inline-end: 2rem;
    gap:0.5em;
    padding:0.5em;
    margin-block:0;
    font-size: 1em;
}

nav section.Hamburger-Menu-Panel svg.Hamburger-Menu-Button-close{
    display:flex;
    justify-content:center;
    align-items:center;
    margin-inline-end:78.5%;
    margin-block-start:1rem;
    font-size:1rem;
}
nav section.Hamburger-Menu-Panel li:first-child{
    margin-block-start:3rem;
}

nav ul li a{
    font-size:clamp(0.5rem,2.6vw,2rem);
    color: white;
    text-decoration:none;
}

nav section.Hamburger-Menu-Panel div.contact-svgs{
    min-block-size: auto;
    display:flex;
    gap:1em;
    justify-content:space-evenly;
    align-items:flex-end;
    
    /* margin-inline-end: rem; */
    margin-block-start:16rem !important;
    padding-block:1em;
    padding-inline:1em;
    margin-block:1em;
    margin-inline:1em;

}
/* =============First Section============= */

.firstsection{
    display:flex;
    align-items:center;
    justify-content:space-around;
    margin:30px;
    height: 40vh;
    scroll-margin-top:clamp(60px,8vw,100px);
}

.firstsection > div{
    width: 30%;
}

.leftsection{
   font-size: clamp(24px, 4vw, 45px);
}

.rightsection img{
    width: max(90px,80%);
    height: max(90px,70%);
    margin: 0 auto;
    display: block;
}

.purple{
    display:inline;
    color: #9a15ff;
}

/* =============Second Section============= */

.secondsection{
    display:flex;            
    flex-direction:column;
    margin:20px auto;
    width:80vw;
    font-size:clamp(20px, 3vw, 40px);
    scroll-margin-top:clamp(60px,8vw,100px);
}

/* =============Third Section============= */
.thirdsection{
    display:flex;            
    flex-direction:column;
    margin:20px auto;
    width:80vw;
    scroll-margin-top:clamp(60px,8vw,100px);
}
.box-container{
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 40px auto;
    width: 80vw;             
}

.box{
    background-color: rgb(10,18,62);
    width: 100%;            
    padding: 20px;          
    border-radius: 12px;
    font-size:clamp(20px, 3vw, 40px);
    line-height:1.6;
}

.box:hover {
    transform: translateX(-5px);
    transition: 0.3s;
    box-shadow: 0 0 15px rgba(255,255,255,1);
}

.box h3{
    margin: 0 0 10px 0;
    font-size: clamp(25px, 3.5vw, 45px);
    color:white;
}

.box article{
    margin: 0;
    color: gray;
    font-size: clamp(20px, 2vw, 40px);
}

/* =============Project Section============= */
.projects{
    margin:20px auto;
    width: 80vw;
    scroll-margin-top:clamp(60px,8vw,100px);
}

.projects .carousel-wrapper{
    display: flex;
    gap: 1em;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    anchor-name:--carousel;
    scroll-behavior:smooth;
    padding-bottom: 0.5em;
}
.carousel-wrapper::-webkit-scrollbar{
    display:none;
}
.carousel-wrapper::scroll-button(left),
.carousel-wrapper::scroll-button(right){
    width:30px;
    height:30px;
    border-radius: 50%;
    background-color:#1100ff;
    border:none;
    color:aliceblue;
    position:fixed;
    z-index:2;
}

.carousel-wrapper::scroll-button(left):disabled,
.carousel-wrapper::scroll-button(right):disabled{
    opacity:0.5;
    cursor:not-allowed;
}

.carousel-wrapper figure{
    flex: 0 0 70vw;
    scroll-snap-align: start;
    margin: 0;
}
.carousel-wrapper::scroll-button(left){
    content:'❮';
    font-size: 22px;
    font-weight: 800;
    position-anchor:--carousel;
    position-area:left center;
    translate:50%;
}

.carousel-wrapper::scroll-button(right){
    content:'❯'; 
    font-size: 22px;
    font-weight: 800;
    position-anchor:--carousel;
    position-area:right center;
    translate:-50%;
}
.carousel-wrapper figure{
    margin-top:0.5rem;
    flex: 0 0 70vw;
    scroll-snap-align: start;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.carousel-wrapper img{
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.carousel-wrapper img.C{
    aspect-ratio: auto;
    object-fit: contain;
    background: #000;
    padding: 0;
    height: auto;
}

.carousel-wrapper figcaption{
    text-align: center;
    font-size: clamp(14px, 1.5vw, 18px);
    color: gray;
}

.links p{
    font-size:clamp(16px, 1.8vw, 25px);
}
.links a{
   color:#a00;
   font-size:clamp(16px, 1.8vw, 25px);
}

/* =============Contact Section============= */

.contact{
    margin:20px auto;
    display:flex;            
    align-items:flex-start;
    flex-direction:column;
    width:80vw;
    scroll-margin-top:clamp(60px,8vw,100px);
}

.form-group{
    display:flex;            
    align-items:flex-start;
    flex-direction:row;
    margin: 20px auto;
    background-color: rgb(10,18,62);
    font-size:clamp(16px, 1.8vw, 25px);
    width: 100%;            
    padding: 20px;
    border-radius: 12px;
    line-height:1.6;
}

.form-group:hover{
    transform: translateX(-5px);
    transition: 0.3s;
    box-shadow: 0 0 25px rgba(255,255,255,1);
}

.form-group input, 
.form-group textarea{
    font-family: arial,sans-serif;
    background-color: rgba(30,30,100,1);
    height: 3rem;
    width: 100%;
    color:white;
    text-align:center;
    border: none;
    outline: none;
    border-radius: 8px;
    padding: 10px;
}

form button{
    margin: 20px auto;
    background-color:rgba(50,50,150,0.8);
    width: 100%;            
    padding: 20px;
    color:white;         
    border-radius: 12px;
    line-height:1.6;
}

form button:hover {
    background-color: rgb(20,30,70);
    cursor: pointer;
    transition: 0.3s;
}

/* =============Footer Section============= */
footer{            
    display:flex;
    justify-content:space-around;
    align-items:center;
    background-color:#1a1a1a;
    width: 100%;
    height:150px;
}
 
footer h2{
    font-size:clamp(18px, 2.5vw, 75px);
}

footer ul{
    display:flex;
    justify-content:center;
    flex-direction:column;
    gap:clamp(5px, 1vw, 15px);
}

footer ul li{
    list-style:none;
}

footer ul li a{
    text-decoration:none;
    color:white;
    font-size:clamp(12px, 1.5vw, 25px);
}

footer .left{
   font-size:clamp(14px, 3vw, 18px);
}

.footer-ul-parent{
   display:flex;
   justify-content:space-evenly;
   gap:20px;
}

/* =============Media Queries============= */

@media (min-width: 768px) {
    nav div.right ul li a{
       font-size:25px; 
    }
    .form-group{
        align-items:center;
        justify-content:center;
        font-size:2rem;
        width: 80vw;
    }       
    input,textarea{
        width: 45vw;
    }
    footer{
        height:250px;
    }
    
    .carousel-wrapper figure{
        flex: 0 0 calc(75vw / 2);
    }
}

@media(max-width:400px){
    .firstsection{
        flex-direction:column-reverse;
        height:fit-content;
    }
}