@import url('https://fonts.cdnfonts.com/css/ica-rubrik-black');
@import url('https://fonts.cdnfonts.com/css/poppins');
:root
{
    --primary-color: #25283b;
    --secondary-color: #ffffff;
    --background-color: #D2D2D2;
    --text-color: #000000;
    --gridline-color: #25283b22
}

.darkmode
{
    --primary-color: #ffffff;
    --secondary-color: #25283b;
    --background-color: #25283b;
    --text-color: #ffffff;
    --gridline-color: #ffffff22
}

.theme-switch{
    height: 50px;
    width: 50px;
    padding: 0;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    bottom: 20px;
    right: 280px;
    position: fixed;
    z-index: 999;
}

.theme-switch svg{
    fill: var(--secondary-color);
}

.theme-switch svg:last-child{
    display: none;
}

.darkmode .theme-switch svg:first-child{
    display: none;
}

.darkmode .theme-switch svg:last-child{
    display: block;
}

@media (max-width: 1400px){
    .theme-switch{
        top: auto;
        left: auto;

        bottom: 20px;
        right: 20px;

        transform: none;
    }
}

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

}
body{
    --topbar-height: 100px;
    min-height: 100vh;
    background-color: var(--background-color);
    background-image:
    repeating-linear-gradient(
        to right, transparent 0 100px,
        var(--gridline-color) 100px 101px
    ),
    repeating-linear-gradient(
        to bottom, transparent 0 100px,
        var(--gridline-color) 100px 101px
    );
}
        
body::before{

    position: absolute;
    width: min(1400px, 90vw);
    top: 10%;
    left: 50%;
    height: 90%;
    transform: translateX(-50%);
    content: '';
    background-image: url(images/bg.png);
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: top center;
    pointer-events: none;
}

iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Navigation Bar */

.topbar {
    position: fixed;
    top: 0;
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;

    left: 50%;
    transform: translateX(-50%);

    z-index: 1000;
    transition: transform 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);

    max-width: 200px;
    width: 100%;
}

.logo img {
    height: 40px;   /* adjust size as needed */
    width: auto;
    display: block;
}

.navbar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);

    padding: 10px 20px;
    background: #e5e5e5;
    border-radius: 20px;

    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.topbar--hide {
    transform: translate(-50%, -100%);
    box-shadow: none;
}

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

.navbar-logo{
    font-size: 1.5rem;
    font-weight: 600;
    color:var(--text-color);
    text-decoration: none;
    cursor: pointer;
}

.navbar-menu {
    display: flex;
    gap: 25px; /* spacing between items */
    list-style: none;
}

.navbar-container .navbar-menu li a {
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;

    padding: 8px 16px;
    border-radius: 12px;

    transition: 0.3s ease;
}


.navbar-container .navbar-menu li a:hover,
.navbar-container .navbar-menu li a.active{
    background-color: rgba(0, 0, 0, 0.08);
}

.navbar-toggle{
    display: none;
    background: transparent;
    padding: 10px;
    border: none;
    cursor: pointer;
}

.bar{
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-color);
    transition: all 0.3s ease-in-out;
}

@media (max-width: 880px) {
    .navbar {
        position: static;   /* remove centering */
        transform: none;
        background: none;
        box-shadow: none;
        padding: 0;
    }
    .navbar-container .navbar-menu{
        display: none;
        flex-direction: column; /* show hamburger on small screens */
        align-items: flex-start;
        grid-area: 1.7rem !important;
        position: absolute;
        height: 100vh;
        width: 250px;
        top: 0;
        right: 0;
        padding: 5rem 1.5rem;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.5);
        background-color: var(--background-color);
        z-index: 998;}

    .navbar-container .navbar-menu.active{
        display: flex;
    }
    
    .navbar-toggle{
        display: block;
        z-index: 999;
    }

    .navbar-toggle.active .bar:nth-child(2){
        opacity: 0;
    }

    .navbar-toggle.active .bar:nth-child(1){
        transform: translateY(8px) rotate(45deg);
    }

    .navbar-toggle.active .bar:nth-child(3){
        transform: translateY(-8px) rotate(-45deg);
    }
}

.banner{
    width: 100%;
    height: 100vh;
    text-align: center;
    overflow: hidden;
    position: relative;
}
.banner .slider{
    position: absolute;
    width: 150px;
    height: 180px;
    top: 40%;
    left: calc(50% - 100px);
    transform-style: preserve-3d;
    transform: perspective(1000px);
    animation: autoRun 20s linear infinite;
    z-index: 2;
}

@keyframes autoRun{
    from{
        transform: perspective(1000px) rotateX(-16deg) rotateY(0deg);
    }to{
        transform: perspective(1000px) rotateX(-16deg) rotateY(360deg);
    }
}

.banner .slider .item{
    position: absolute;
    inset: 0 0 0 0;
    transform: 
        rotateY(calc( (var(--position) - 1) * (360 / var(--quantity)) * 1deg))
        translateZ(550px);
}
.banner .slider .item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.banner .content{
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(1400px, 100vw);
    height: max-content;
    padding-bottom: 100px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    z-index: 1;
}

.banner .content h1{
    text-align: center;
    width: 100%;
    text-shadow: 0 10px 20px #000;
    font-size: 10em;
    position: relative; 
    top: -200px;   /* moves BOTH text layers down */
}

.banner .content h1::after{
    position: absolute;
    inset: 0;
    content: attr(data-content);
    z-index: 2;
    -webkit-text-stroke: 2px var(--secondary-color);
    color: transparent;
    color: var(--text-color);
}

.banner .content .model{
    background-image: url(images/model.png);
    width: 100%;
    height: 75vh;
    position: absolute;
    bottom: 0;
    left: 0;
    background-size: auto 130%;
    background-repeat: no-repeat;
    background-position: top center;
    z-index: -1;
}
@media screen and (max-width: 1023px) {
    .banner .slider{
        width: 400px;
        height: 250px;
        left: calc(50% - 80px);
    }
    .banner .slider .item{
        transform: 
            rotateY(calc( (var(--position) - 1) * (360 / var(--quantity)) * 1deg))
            translateZ(300px);
    }
    .banner .content h1{
        text-align: center;
        width: 100%;
        text-shadow: 0 10px 20px #000;
        font-size: 1em;
        top: -250px;
    }
    .banner .content .author{
        color: #fff;
        padding: 20px;
        text-shadow: 0 10px 20px #000;
        z-index: 2;
        max-width: unset;
        width: 100%;
        text-align: center;
        padding: 0 30px;
    }
}
@media screen and (max-width: 767px) {
    .banner .slider{
        width: 100px;
        height: 150px;
        left: calc(50% - 50px);
    }
    .banner .slider .item{
        transform: 
            rotateY(calc( (var(--position) - 1) * (360 / var(--quantity)) * 1deg))
            translateZ(180px);
    }
    .banner .content h1{
        font-size: 5em;
    }
}

/* Projects Page */

.projects {
    max-width: 1200px;
    margin: 120px auto;
    padding: 20px;
}

.projects h1 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 3em;
    color: var(--text-color);
    margin-top: -25px; /* 👈 control vertical position here */
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.project-item {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 20px;
    background: var(--secondary-color);
    padding: 20px;
    border-radius: 10px;
}

/* Image styling */
.project-item img {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
}

/* Text takes remaining space */
.project-text {
    flex: 1;
    color: var(--text-color);
}

@media (max-width: 768px){

    .project-item{
        flex-direction: column;   /* stack vertically */
        align-items: flex-start;  /* keep text left aligned */
    }

    /* Force order */
    .project-text{
        order: 1;
        width: 100%;
    }

    .project-text h2{
        margin-bottom: 10px;
    }

    .project-text p{
        margin-bottom: 15px;
    }

    .project-item img{
        order: 2;       /* image comes LAST */
        width: 100%;
        height: auto;
    }
}

/* About Page */

.about {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    min-height: 100vh;   /* take full screen height */
}

.about-img{
    border-radius: 50%;
}
.about-image img{ 
    display: flex; 
    justify-content: center; 
    width: 20vw; 
    border-radius: 5%; 
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); 
}

.about-content h1{
    font-family: Poppins;
    font-size: 3rem;
    line-height: 1.3;
    color: var(--text-color);
}

.about-content p{
    font-size: 1rem;
    font-family: Poppins;
    line-height: 1.6;
    margin-bottom: 1rem;
    max-width: 600px;
    color: var(--text-color);
}

.about-content .icons a{
    display: inline-block;
    margin-right: 10px;
    color: var(--text-color);
    font-size: 3dvh;
    transition: 0.3s;
}

@media (max-width: 1000px) {
    .about {
        gap: 2rem;
    }
}

@media (max-width:995px) {
    .about {
        flex-direction: column;
        margin: 0rem 2rem;
        align-items: center;
        text-align: center;
    }
    .about-content p{
        font-size: 1rem;
        align-items: center;
    }
    .about-content h1{
        font-size: 2rem;
        align-items: center;
    }
    .about-image img{
        width: 70vw;
        margin-top: 2rem;
    }
}



/* Contact Page */

body{
    font-family: Poppins;
}

.contact-container{
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-evenly   ;
}

.contact-left{
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 20px;
}

.contact-left h2{
    font-weight: 600;
    font-size: 40px;
    margin-bottom: 5px;
    color: #000000;
}

.contact-left-title hr{
    border: none;
    width: 260px;
    height: 5px;
    background-color: var(--text-color);
    border-radius: 10px;
}

.contact-inputs{
    width: 400px;
    height: 50px;
    border: none;
    outline: none;
    padding-left: 25px;
    font-weight: 500;
    color: var(--text-color);
    border-radius: 20px;
}

.contact-inputs:focus{
    border: 2px solid var(--text-color);
}

.contact-inputs::placeholder{
    color: var(--text-color);
}

.contact-left textarea{
    height: 140px;
    padding-top: 15px;
    border-radius: 20px;
}

.contact-left .contact-button{
    display: flex;
    align-items: center;
    padding: 15px 30px;
    font-size: 16px;
    color: var(--secondary-color);
    gap: 10px;
    border: none;
    border-radius: 20px;
    background-color: var(--primary-color);
    cursor: pointer;
}

@media (max-width: 800px) {
    .contact-inputs{
        width: 80vw;
    }
}
