@font-face {
    font-family: "Cellofy";
    src: url("./fonts/cellofy.extblkextexp.otf") format("opentype");
}

@font-face {
    font-family: "JetBrainsMono";
    src: url("./fonts/JetBrainsMono.ttf") format("truetype");
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: black;
    background-image: url("./images/background.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: white;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: scroll;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;

    background-image: url("./images/background.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    -webkit-mask-image: linear-gradient(
        to bottom,
        black 0%,
        transparent 5%,
        transparent 95%,
        black 100%
    );
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-image: linear-gradient(
        to bottom,
        black 0%,
        transparent 5%,
        transparent 95%,
        black 100%
    );
    mask-repeat: no-repeat;
    mask-size: 100% 100%;
}

.container {
    display: flex;
    width: 1350px;
    max-width: 100vw;
}

.left-panel {
    width: 482px;
    height: 100vh;
    padding: 50px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
}

.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

h1 {
    font-family: "Cellofy", "Times New Roman", Times, serif;
    font-size: 45px;
    line-height: 0.8;
    margin-bottom: 15px;
}

p {
    font-family: "JetBrainsMono", "Lucida Grande", "Lucida Sans", Arial,
        sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

a {
    transition: text-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

a:hover {
    text-shadow: 0 0 1px #fff, 0 0 3px #fff, 0 0 6px #fff, 0 0 9px #fff;
}

.tagline {
    opacity: 0.7;
}

.top-content ul {
    margin-top: 50px;
    margin-bottom: 50px;
}

.footer-section-desktop {
    display: flex;
    flex-direction: column;
    opacity: 1;
}

.footer-section-mobile {
    opacity: 0;
}

#portrait {
    display: block;
    margin-bottom: 50px;
    width: 100%;
    max-width: 382px;
    height: auto;
}

ul {
    list-style: none;
}

li p {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 12px 0;
    cursor: pointer;
}

li p a {
    flex: 1;
}

li p a.active {
    text-shadow: 0 0 1px #fff, 0 0 3px #fff, 0 0 6px #fff, 0 0 9px #fff;
}

.project-year {
    opacity: 0.7;
    cursor: text;
}

.right-panel {
    width: 868px;
    min-height: 100vh;
    padding: 50px;
    overflow-y: auto;
}

.project-content {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-content.visible {
    opacity: 1;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 240px);
    gap: 20px;
    margin-bottom: 50px;
}

.image-grid img {
    width: 240px;
    height: 320px;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content img {
    width: calc(100vw - min(5vw, 5vh) * 2);
    height: calc(100vh - min(5vw, 5vh) * 2);
    object-fit: contain;
    display: block;
}

.modal-close {
    position: absolute;
    top: 0;
    left: 0;
    width: 64px;
    height: 64px;
    cursor: pointer;
    background: none;
}

.modal-close::before,
.modal-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 3px;
    background-color: white;
}

.modal-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.modal-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.project-info {
    margin-top: 0;
}

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

@media (max-width: 1350px) {
    body {
        flex-direction: column;
        align-items: stretch;
    }

    .container {
        flex-direction: column;
        width: 100%;
    }

    .left-panel {
        width: 100%;
        min-height: auto;
        padding: 30px;
        position: relative;
        height: auto;
    }

    .content-wrapper {
        display: block;
    }

    .footer-section-desktop {
        opacity: 0;
    }

    .footer-section-mobile {
        opacity: 1;
        margin-bottom: 50px;
    }

    #portrait {
        display: none;
    }

    .top-content ul {
        margin-top: 0;
    }

    .right-panel {
        width: 100%;
        padding: 30px;
    }

    .image-grid {
        justify-content: center;
    }
}
