/* Font Loading */
@font-face {
    font-family: Classroom;
    src: url(fonts/Classroom.ttf);  }
@font-face {
    font-family: DoubleTrouble;
    src: url(fonts/DoubleTrouble.ttf);
}
@font-face {
    font-family: ChickenSandwich;
    src: url(fonts/ChickenSandwich.ttf);
}
@font-face {
    font-family: SetiaHati;
    src: url(fonts/SetiaHati.ttf);
}


/*Loader*/
.loader-wrapper{
    width: 100vw;
    height: 110vh;
    position: fixed;
    z-index: 999;
    background-color: #2c2c2c;
}

#loader{
    width: 100%;
    height: 100%;
}

/* General Styles */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    margin: 0;
    background-image: url('/img/bg3.webp');
    background-position: center;
    background-size: 70vw;
    background-repeat: repeat;
}

canvas {
    z-index: 0;
}

h1 {
    font-family: Classroom;
    font-size: 8em;
    margin: 0;
}

h2 {
    font-family: DoubleTrouble;
    font-size: 6em;
}

h3 {
    font-family: Classroom;
    font-size: 4em;
    color: darkred;
}

.projectcategory{
    padding-top: 15vh;
    margin-bottom: 20vh;
}

h4 {
    margin-bottom: 5%;
    font-family: DoubleTrouble;
    font-size: 3.5em;
}

p, li {
    font-family: SetiaHati;
    font-size: 2.5em;
}


#navpoints li, a, button {
    font-family: Classroom;
    font-size: 1.5em;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: black;
    max-width: 50%;
    gap: 1%;
    padding: 2%;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 99;
}

.dropdown:hover .dropdown-content{
    display: flex;
    flex-direction: column;
}

/* Sticky Header */
header {
    top: 0;
    z-index: 99;
    position: sticky;
    background: #000;
}

/* Navigation */
nav {
    padding: 1rem 10%;
    margin-bottom: 15%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

img#logo {
    max-height: 5%;
}

#navpoints {
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
    list-style: none;
}

#navpoints a {
    text-decoration: none;
    color: #fff;
}

#navpoints a:hover {
    color: darkred;
}

/* Main Layout */
main {
    padding: 0 10%;
    display: flex;
    flex-direction: column;
    gap: 5vh;
}

article, section {
    display: flex;
    flex-direction: column;
}

article{
    min-height: 80vh;
}

article.right {
    align-items: end;
    text-align: end;
}

article.left {
    align-items: start;
}

article.middle {
    align-items: center;
    text-align: center;
}


img:not(.square, #loader, #logo), video:not(.square) {
    width: 40%;
    margin-bottom: 3%;
    transition: all 0.3s ease;
    cursor: pointer;
    border: solid black 0.5em;
}

iframe{
    width: 50vw;
    height: 60vh;
    border: solid black 0.5em;
}

#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

img.square {
    max-height: 40vh;
    margin-bottom: 3%;
    transition: all 0.3s ease;
    cursor: pointer;
    border: solid black 0.5em;

}

video.square {
    max-height: 50vh;
    margin-bottom: 3%;
    transition: all 0.3s ease;
    cursor: pointer;
    border: solid black 0.5em;

}

img, video{
    filter: contrast(65%);
}

img:hover{
    filter: contrast(100%);
    transform: scale(1.1);
}

#overlay img:not(.square) {
    width: 80vw;
    box-shadow: 0 0 50px gray;
    border-radius: 8px;
}

#overlay img.square {
    max-height: unset;
    width: 40vw;
    box-shadow: 0 0 50px gray;
    border-radius: 8px;
}

#overlay img{
        filter: contrast(100%) !important;
}

#overlay img:hover {
    transform: none !important;
}


/* Responsive Layout */
.rows {
    min-width: 60vw;
    display: flex;
    justify-content: space-around;
}


.projectscontainer {
    margin-bottom: 40vh;
}

#topBtn {
    right: 5%;
    bottom: 5%;
    padding: 0.5rem 1rem;
    position: fixed;
    text-decoration: none;
    color: darkred
}

#topBtn:hover{
    color: #fff;
}

    /* Global Reset */
* {
    box-sizing: border-box;
    max-width: 100%;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    body {
        background-size: 100vw; /* More responsive background on smaller screens */
    }

    main {
        padding: 0 5%;
    }

    h1 {
        font-size: 4em;
    }

    h2 {
        font-size: 3.5em;
    }

    h3 {
        font-size: 2.5em;
    }

    li {
        font-size: 1.5em;
        width: 80%;
    }

    img:not(.square), video:not(.square) {
        width: 60%;
    }
}
