:root {
    color-scheme: dark;
}

::-webkit-scrollbar {
    width: 0;
}

html {
    scrollbar-width: none;
}

* {
    color: white;
    box-sizing: border-box;
    font-family: "Nunito", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

body {
    background-color: rgb(32, 32, 32);
    margin-left: auto;
    margin-right: auto;
    margin-top: 1em;
    margin-bottom: 8px;
    min-width: 350px;
}

*::selection {
    background-color: white;
    color: black;
}

#wrapper {
    padding-left: 16px;
    padding-right: 16px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 1.5em);
    gap: 1em;
}

main {
    flex: 1;
}

#topbar {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: calc(1100px - 32px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: grid;
    grid-template-columns: 52px 1fr;
    background-color: rgba(62, 62, 62, 0.6);
    backdrop-filter: blur(10px);
    padding: 10px;
    border-radius: 12px;
    align-items: center;
    user-select: none;
    z-index: 1000;
}

#topbar.scrolled {
    top: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
    padding: 16px;
}

.toph2 {
    margin-top: 0;
}

footer {
    width: 100%;
    height: 2em;
    border-top: solid white 2px;
    text-align: center;
}

.topHeader {
    width: 300px;
    shape-rendering: crispEdges;
    font-family: "Ultra", serif;
    font-size: 28px;
    cursor: pointer;
}

h2 {
    font-weight: 600;
}

.linkButton {
    transition: background-color 300ms, color 300ms;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

nav {
    grid-column: span 2;
    grid-row: 2;
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-top: 1em;
    width: 100%;
}

nav a {
    font-size: 1.2em;
    text-decoration: none;
    background-color: rgb(32, 32, 32);
    padding: 10px;
    border-radius: 8px;
    text-transform: capitalize;
    width: 100%;
    font-weight: 700;
}

nav:not(#homeNav) a {
    text-align: center;
}

nav a:hover {
    border-color: rgb(255, 255, 255);
}

#homeNav {
    margin-top: 1em;
    flex-direction: column;
    text-align: left;
    gap: 1em;
}

#homeNav a {
    background-color: rgb(62, 62, 62);
    padding: 14px;
    border-radius: 12px;
    font-size: 1.2em;
}

.selected {
    background-color: rgb(255, 255, 255);
    color: black;
}

.back {
    width: 100%;
}

.hero {
    width: 100%;
    height: 50vw;
    max-height: 350px;
    min-height: 150px;
    background-image: url(/photos/_site_images/hero.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: 0% 50%;
    border-radius: 12px;
}

img {
    image-rendering: auto;
}

#logo {
    width: 40px;
    height: 40px;
    background-image: url(/photos/_site_images/pfp.webp);
    background-size: cover;
    margin-top: 0;
    grid-column: 1;
    grid-row: 1;
    border-radius: 8px;
}

.flexcontent {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.contentheader {
    width: 20%;
    text-wrap: nowrap;
}

.content {
    width: auto;
}

#collections {
    margin-top: 122px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.banner {
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    filter: brightness(60%);
    transition: all 0.3s ease;
    height: 350px;
}

.container {
    width: 100%;
    position: relative;
    text-align: center;
}

.banner-text {
    position: absolute;
    width: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999;
    text-align: center;
    font-family: "Roboto Slab", serif;
    font-optical-sizing: auto;
    pointer-events: none;
    font-size: 40px;
}

#ai-protest {
    background-image: url("/ai-protest/photos/banner.avif");
    background-size: cover;
    background-position: 0;
}

#gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1em;
    width: 100%;
    margin-top: 122px;
}

.photoGrid {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 12px;
}

#gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#morePhotos {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1em;
}

.photoLinks {
    background-color: rgb(63, 63, 63);
    border-radius: 12px;
    padding: 12px;
    text-decoration: none;
    display: block;
    text-align: center;
}

.footertext {
    padding-top: 8px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1em;
    width: 100%;
}

input::placeholder,
textarea::placeholder {
    color: white;
    font-size: 16px;
}

input,
textarea {
    width: 100%;
    background-color: rgb(63, 63, 63);
    padding: 16px;
    border-radius: 12px;
    box-sizing: border-box;
    border-width: 0;
    transition: box-shadow 0.2s ease-in-out;
}

input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 8px 2px #ffffff;
    transition: box-shadow 0.2s ease-in-out;
}

#submit {
    font-size: 1em;
    padding: 0.7em;
    box-shadow: 0 0 0 0 #ffffff;
}

textarea {
    height: 300px;
    resize: none;
}

.error {
    color: rgb(255, 68, 68);
    font-style: italic;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background-color: rgb(62, 62, 62);
    border-radius: 12px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgb(83, 83, 83);
}

#Instagram-logo {
    background-image: url(/photos/_site_images/Instagram_Glyph_White.svg);
    width: 25px;
    height: 25px;
    margin-top: 0;
    grid-column: 1;
    grid-row: 1;
    border-radius: 8px;
    transition: filter 300ms;
    background-size: contain;
}

#github-logo {
    background-image: url(/photos/_site_images/GitHub_Invertocat_White.svg);
    width: 25px;
    height: 25px;
    margin-top: 0;
    grid-column: 1;
    grid-row: 1;
    border-radius: 8px;
    transition: filter 300ms;
    background-size: contain;
}

#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

#lightbox.open {
    display: flex;
}

#lb-img {
    max-width: calc(100vw - 120px);
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
}

#lb-close {
    position: fixed;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: white;
    font-size: 2.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 8px 12px;
    opacity: 0.75;
}

#lb-close:hover {
    opacity: 1;
}

#lb-prev,
#lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    padding: 16px 16px;
    border-radius: 8px;
    opacity: 0.7;
    line-height: 1;
    transition: opacity 150ms, background 150ms;
    user-select: none;
}

#lb-prev {
    left: 8px;
}

#lb-next {
    right: 8px;
}

#lb-prev:hover,
#lb-next:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.18);
}

#lb-counter {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    opacity: 0.6;
    font-size: 0.9rem;
    user-select: none;
}

/* Responsive Media Queries */

@media (min-width: 690px) {
    body {
        max-width: 1100px;
        margin-left: auto;
        margin-right: auto;
    }

    header {
        grid-column: 2;
    }

    nav {
        grid-column: 3;
        flex-direction: row;
        border-top: none;
        margin-top: 0;
        padding-top: 0;
        grid-row: 1;
    }

    nav a {
        padding: 7px;
        padding-left: 9px;
        padding-right: 9px;
    }

    #homeNav a:hover {
        background-color: rgb(255, 255, 255);
    }

    #topbar {
        grid-template-rows: 1fr;
    }

    .flexcontent {
        flex-direction: row;
    }

    .content {
        width: auto;
    }

    input,
    textarea {
        width: 1fr;
    }

    form {
        margin-left: auto;
        margin-right: auto;
    }

    #gallery img {
        transition: filter 200ms;
    }

    #gallery img:hover {
        filter: brightness(80%);
    }

    #morePhotos {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1em;
    }

    #gallery {
        grid-template-columns: repeat(3, 1fr);
        margin-top: 60px;
    }

    #collections {
        margin-top: 60px;
    }

    .banner:hover {
        height: 500px;
        filter: brightness(80%);
    }

    .linkButton:hover {
        transition: background-color 300ms, color 300ms;
        background-color: rgb(255, 255, 255);
        color: black;
    }

    #Instagram-button:hover {
        #Instagram-logo {
            transition: filter 300ms;
            filter: invert(100%);
        }
    }

    #github-button:hover {
        #github-logo {
            transition: filter 300ms;
            filter: invert(100%);
        }
    }
}

@media (min-width: 900px) {
    #gallery {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 500px) {
    #gallery {
        grid-template-columns: repeat(1, 1fr);
    }

    .photoGrid {
        aspect-ratio: unset;
    }

    #gallery img {
        height: auto;
    }


}

@media (max-width: 410px) {
    #topbar {
        grid-template-columns: 0px 100%;
    }

    .topHeader {
        grid-column: 1;
        grid-row: 1;
    }

    #logo {
        width: 0px;
    }
}