/* CSS reset: https://www.joshwcomeau.com/css/custom-css-reset */
*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
}

body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

#root, #__next {
    isolation: isolate;
}

/* Main CSS */

footer {
    padding-top: 1rem;
    font-size: calc(0.5vw + 0.5rem)
}

a {
    color: white;
    text-decoration: none;
    font-weight: 900;
}


iframe {
    aspect-ratio: 16 / 9;
    width: 100% !important;
}

body {
    font-family: Avenir, Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif;
    display: grid;
    grid-template-columns: 15rem 1fr;
    margin: 0;
    min-height: 100vh;
    background-color: black;
    color: white;
}

nav {
    position: sticky;
    top: 0;
    left: 0;
    height: 100svh;
	border-right: 2px solid #00bfff;
    padding: 1rem;
    box-sizing: border-box;
    background-color: black;
    z-index: 500;
}

nav > img {
    display: inline-block;
    height: 6rem;
    margin: 1rem;
}

nav > ul {
    display: grid;
    padding: 0;
    list-style: none;
    gap: 0;
}

nav > ul > li {
    padding: 0.5rem;
}

.sections {
    margin-bottom: 1rem;
    font-size: x-large;
}

.sections > li > a {
    display: block;
    padding: 0.5rem;
    color: #979797;
}
.sections > li > a:hover {
    color: white;
}

.icons {
    padding: 0 0.5rem;
    font-size: x-large;
}

.icons > li a svg {
    fill: #979797;  
    height: 24px;
    display: block;
}

.icons > li a svg:hover {
    fill: white;
}

main {
    padding-inline: 2rem;
    padding-block: 1rem;
}

.wrapper {
    display: flex;
    flex-direction: column;
    gap: 2em;
    max-width: 100%;
}

#intro {
    font-size: min(70px, calc(4vw + 0.25rem));
}

.hide-rotate {
    overflow: hidden;
    display: inline-block;
    height: calc(min(70px, calc(4vw + 0.25rem)) + 1rem);
}

#intro > iframe {
    max-height: 55svh;
}

#intro > h1  {
    margin-bottom: 0.25rem;
    margin-top: 1rem;
}

#intro > h4 {
    margin: 0;
}

#intro > p {
    font-size: calc(2vw + 0.325rem);
}

.rotate {
    animation: change 13s cubic-bezier(.70, 0, .30, 1) infinite;
    padding: 0;
    gap: 15px;
    display: grid;
}

.rotate > li {
    height: 90px;
    padding: 0 0.325rem; /* For glow */
    list-style: none;
}   

.neon-white {
    text-shadow:
    0 0 12px #fff;
}

.neon-blue {
    text-shadow:
    0 0 12px #ffffff;
}

@keyframes change {
    0% { margin-top: 0; }
    5% { margin-top: -105px; }
    15% { margin-top: -105px; }
    20% { margin-top: -210px; }
    30% { margin-top: -210px; }
    35% { margin-top: -315px; }
    45% { margin-top: -315px; }
    50% { margin-top: -420px; }
    60% { margin-top: -420px; }
    65% { margin-top: -525px; }
    75% { margin-top: -525px; }
    90% { margin-top: 0px; }
    100% { margin-top: 0px; }
}

#bio {
    flex: 1 1 40ch;
    background-size: cover;
}

#bio > #quote {
    margin: 1rem;
    border-radius: 2rem;
    padding-top: 2rem;
    font-family: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, serif;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    margin-top: 2rem;
}

#bio > p {
    margin: 1rem;
    border-radius: 2rem;
    max-width: 90ch;
    padding: 2rem;
    backdrop-filter: blur(20px);
    color: white;
    background-color: rgba(0, 0, 0, 0.1);
    font-size: larger;
}

/* Remove sidebar on mobile: video width + padding + nav width */
@media screen and (max-width: calc(35rem + 4rem + 15rem)) {
    body {
        display: block;
    }

    nav {
        display: flex;
        flex-wrap: wrap;

        height: fit-content;
        width: 100%;
        border-right: 0;
        border-bottom: 2px solid #00bfff;
        align-items: center;

        padding-block: 0.325rem;
    }

    nav > .sections {
        grid-auto-flow: column;
        order: 2;
        flex: 1 0 auto;
        flex-basis: 100%;
        padding: 0;
        font-size: calc(3vw + 0.5rem);
    }

    nav > .sections > li {
        padding: 0 0.5rem;
    }

    nav > .logo {
        order: 0;
        max-width: 15%;
        height: auto;
        margin: 0;
        padding: 0.5rem;
    }

    nav > .icons {
        order: 1;
        font-size: calc(5vw + 0.25rem);
        margin-left: auto;
        float: right;
    }

    nav > .icons > li {
        flex: 1 0 auto;
        margin: 0 0.5rem;
    }
}

@media screen and (max-width: calc(35rem + 4rem + 15rem)) {
    /* Save space on mobile landscape */
    #intro > h1 {
        margin-top: 0rem;
    }
}

#project-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 0;
    justify-content: center;
    max-width: 100rem;
}

#project-list > li {
    list-style: none;
    /* Enforce size */
    width: 18rem;
    height: 18rem;
}

.project {
    height: auto;
}

.centered {
    display: flex;
    justify-content: center;
}

.modal {
    display: none;
    position: fixed;
    width: 65%;
    height: 80%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1rem;
    background: rgb(0, 0, 0);
    border: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.modal-content {
    overflow-y: auto;
    padding: 2rem;
    padding-top: 0rem;
    height: calc(100% - 3rem);
    overflow: auto;
    align-content: center;
}

.modal-scroll {
    /* height: 175%; */
}

.close {
    color: #aaa;
    text-align: right;
    width: 100%;
    font-size: 28px;
    font-weight: bold;
    font-size: xx-large;
}


.close:hover,
.close:focus {
    cursor: pointer;
    color: #417cfa;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.video-modal {
    display: grid;
}

@media screen and (max-width: calc(35rem + 4rem + 15rem)) {
    .modal {
        width: 90%;
    }

    .modal-content {
        padding: 0rem;
    }
}

#contact {
    /* max-width: 50rem; */
    margin: auto;
    text-align: center;
}

#contact > form {
    flex-direction: column;
    justify-content: center;
}

#contact > form > div {
    justify-content: center;
    display: flex;
    gap: 5rem;
    text-align: left;
}

#contact > form > .submit-button {
    max-width: 6rem;
    margin: 0;
}

#contact > form > .cf-turnstile {
    margin-top: 1rem;
}

textarea {
    height: 100%;
}



input, textarea {
    width: 100%;
}


.sections > li a {
    background-image: linear-gradient(#00bfff, #00bfff);
    background-size: 0 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.3s linear;
}

.sections > li a:hover {
    background-size: 100% 2px;
}

.poster {
    position: relative;
    display: block;
    overflow: hidden;
}

.poster img {
    transition: transform 0.3s ease, filter 0.3s ease, opacity 0.3s ease;
    display: block;
}

.poster .hover-text {  /* save this incase we decide to re-add the text in the html */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.5rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* makes sure text doesn't block link clicks */
    text-shadow: 0 0 10px rgba(0,0,0,0.7);
}

.poster:hover img {
    filter: brightness(0.5) blur(3px);
    transform: scale(1.05);
}

.poster:hover .hover-text {
    opacity: 1;
}
