* {
    box-sizing: border-box;
}

*:before,
*:after {
    box-sizing: border-box;
}

@font-face {
    font-family: 'H Regular';
    src: url('assets/fonts/Hellix-Regular.ttf') format('truetype');
    font-style: normal;
}

@font-face {
    font-family: 'H Medium';
    src: url('assets/fonts/Hellix-Medium.ttf') format('truetype');
    font-style: normal;
}

@font-face {
    font-family: 'H Semibold';
    src: url('assets/fonts/Hellix-SemiBold.ttf') format('truetype');
    font-style: normal;
}

html {
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background-color: #000;
}

html::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'H Regular', sans-serif;
    background-color: #F0F0E0;
    color: #fff;
    transition: background-color 0.5s, color 0.5s;
    animation: fadeInAnimation ease 3.5s;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body.popup-active {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

@keyframes fadeInAnimation {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.mobile-popup {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(to bottom left, #363E7F, #101830);
    color: #F0F0E0;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    font-family: 'H Regular', sans-serif;
    font-size: 0.9rem;
    text-align: center;
    max-width: 180px;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

.mobile-popup.slide-in {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.mobile-popup.slide-out {
    transform: translateX(-50%) translateY(100px);
    opacity: 0;
}

.mobile-popup .dismiss-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 30px;
    height: 30px;
    background-color: #F0F0E0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #101830;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (hover: hover) {
    .mobile-popup .dismiss-btn:hover {
        transform: scale(1.1);
    }
}

@media (min-width: 601px) {
    .mobile-popup {
        display: none !important;
    }
}

.dvsho-link {
    position: absolute;
    top: 30px;
    right: 40px;
    z-index: 1000;
    text-align: right;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.dvsho-link a {
    display: inline-block;
    color: #F0F0E0;
    text-decoration: none;
    font-family: 'H Medium', sans-serif;
    font-size: 1.1rem;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.dvsho-link a:hover {
    opacity: 0.7;
}

.essay-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(800px, 90vw);
    height: min(600px, 85vh);
    background: linear-gradient(to bottom left, #F0F0E0, #D0D0C0);
    border-radius: 15px;
    overflow: visible;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease-out;
    padding: 15px 20px 75px 30px;
    color: #101830;
    font-family: 'H Regular', sans-serif;
    text-align: left;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.essay-popup.show {
    opacity: 1;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.essay-content {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 15px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.essay-text {
    height: 100%;
    padding: 25px 10px 20px 0px;
    overflow-y: auto;
    color: #101830;
    font-family: 'H Regular', sans-serif;
    font-size: 1.01rem;
    line-height: 1.6;
    text-align: left;
    white-space: pre-wrap;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.essay-text::first-line {
    font-family: 'H Semibold', sans-serif;
    font-size: 1.1rem;
}

.essay-text::-webkit-scrollbar {
    display: none;
}

.essay-popup .essay-close-btn {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background-color: #101830;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #F0F0E0;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
    font-family: 'H Regular', sans-serif;
    z-index: 1001;
    padding: 8px 16px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

@media (hover: hover) {
    .essay-popup .essay-close-btn:hover {
        transform: scale(1.1);
    }
}

@media (max-width: 600px) {
    .essay-popup {
        width: min(350px, 90vw);
        height: min(550px, 80vh);
        padding: 5px 20px 65px 20px;
        top: 50%;
    }
    
    .essay-text {
        padding: 25px 0px 20px 0px;
        font-family: 'H Medium', sans-serif;
        font-size: 0.9rem;
    }
    
    .essay-popup .essay-close-btn {
        bottom: 15px;
        left: 15px;
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}

.faq-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(560px, 63vw);
    height: min(600px, 85vh);
    background: linear-gradient(to bottom left, #F0F0E0, #D0D0C0);
    border-radius: 15px;
    overflow: visible;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    padding: 15px 20px 75px 30px;
    color: #101830;
    font-family: 'H Regular', sans-serif;
    text-align: left;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.faq-popup.show {
    opacity: 1;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.faq-content {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 15px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    opacity: 0;
    transition: opacity 0s;
}

.faq-popup.show .faq-content {
    opacity: 1;
    transition: opacity 0.4s ease 0.4s;
}

.faq-text {
    height: 100%;
    padding: 25px 10px 20px 0px;
    overflow-y: auto;
    color: #101830;
    font-family: 'H Regular', sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: left;
    white-space: pre-wrap;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.faq-question {
    font-family: 'H Semibold', sans-serif;
    font-size: 1.05rem;
    display: block;
}

.faq-text::-webkit-scrollbar {
    display: none;
}

.faq-popup .faq-close-btn {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background-color: #101830;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #F0F0E0;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, opacity 0s;
    font-family: 'H Regular', sans-serif;
    z-index: 1001;
    padding: 8px 16px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    opacity: 0;
}

.faq-popup.show .faq-close-btn {
    opacity: 1;
    transition: transform 0.2s ease, opacity 0.4s ease 0.4s;
}

@media (hover: hover) {
    .faq-popup .faq-close-btn:hover {
        transform: scale(1.1);
    }
}

@media (max-width: 600px) {
    .faq-popup {
        width: min(350px, 90vw);
        height: min(550px, 80vh);
        padding: 5px 20px 65px 20px;
        top: 50%;
    }
    
    .faq-text {
        padding: 25px 0px 20px 0px;
        font-family: 'H Medium', sans-serif;
    }
    
    .faq-popup .faq-close-btn {
        bottom: 15px;
        left: 15px;
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}

.faq-btn {
    background-color: transparent;
    color: #101830;
    border: 2px solid #101830;
    padding: 6px 18px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 10px;
    transition: background-color 0.3s ease, color 0.3s ease, opacity 0.5s ease;
    font-family: 'H Medium', sans-serif;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

@media (hover: hover) {
    .faq-btn:hover {
        background-color: #101830;
        color: #F0F0E0;
    }
}

.cover-wrapper {
    position: relative;
    border: 0px solid #F0F0E0;
    transition: border-width 0.5s ease;
}

.cover-image {
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.cover-image img {
    width: 100%;
    height: 100vh;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.cover-image img.loaded {
    opacity: 1;
}

.description {
    font-family: 'H Regular', sans-serif;
    padding: 60px 120px;
    padding-bottom: 10px;
    font-size: 1.1rem;
    text-align: left;
    color: #101830;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.description a {
    display: inline-block;
    animation: subtleBob 2s ease-in-out infinite;
}

@keyframes subtleBob {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
    100% {
        transform: translateY(0);
    }
}

.description p:first-child {
    font-family: 'H Medium', sans-serif;
}

.year-header {
    font-family: 'H Regular', sans-serif;
    padding: 0 120px;
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: #101830;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.year-header::before {
    content: attr(data-year);
    font-size: 2rem;
    opacity: 0.8;
}

.year-header::after {
    content: "";
    flex-grow: 1;
    height: 2px;
    background-color: #101830;
    margin-left: 10px;
}

.gallery20, .gallery21, .gallery22, .gallery23, .gallery24, .gallery25 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    padding: 0 120px;
    margin-bottom: 80px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

@media (max-width: 1200px) {
    .description, .year-header {
        padding-left: 60px;
        padding-right: 60px;
    }

    .gallery20, .gallery21, .gallery22, .gallery23, .gallery24, .gallery25 {
        grid-template-columns: repeat(3, 1fr);
        padding-left: 40px;
        padding-right: 40px;
    }
}

@media (max-width: 1000px) {
    .description, .year-header {
        padding-left: 40px;
        padding-right: 40px;
    }
}

@media (max-width: 600px) {
    .gallery20, .gallery21, .gallery22, .gallery23, .gallery24, .gallery25 {
        grid-template-columns: repeat(2, 1fr);
        padding-left: 10px;
        padding-right: 10px;
        gap: 4px;
    }
}

.gallery20 div, .gallery21 div, .gallery22 div, .gallery23 div, .gallery24 div, .gallery25 div {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 125%;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid #101830;
    background-color: transparent;
    transition: border-color 0.3s ease-in-out, transform 0.3s ease;
}

@media (hover: hover) {
    .gallery20 div:hover, .gallery21 div:hover, .gallery22 div:hover, .gallery23 div:hover, .gallery24 div:hover, .gallery25 div:hover {
        transform: scale(1.03);
    }
}

@media (max-width: 600px) {
    .gallery20 div, .gallery21 div, .gallery22 div, .gallery23 div, .gallery24 div, .gallery25 div {
        border: 0.8px solid #101830;
        border-radius: 0px;
    }

    .gallery20 div:hover, .gallery21 div:hover, .gallery22 div:hover, .gallery23 div:hover, .gallery24 div:hover, .gallery25 div:hover {
        transform: scale(1);
    }
}

.gallery20 div.loaded, .gallery21 div.loaded, .gallery22 div.loaded, .gallery23 div.loaded, .gallery24 div.loaded, .gallery25 div.loaded {
    border-color: transparent;
}

.gallery20 img, .gallery21 img, .gallery22 img, .gallery23 img, .gallery24 img, .gallery25 img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 2;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.gallery20 img.loaded, .gallery21 img.loaded, .gallery22 img.loaded, .gallery23 img.loaded, .gallery24 img.loaded, .gallery25 img.loaded {
    opacity: 1;
}

.gallery20 .caption, .gallery21 .caption, .gallery22 .caption, .gallery23 .caption, .gallery24 .caption, .gallery25 .caption {
    opacity: 0;
}

footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 50px 0px;
    background-color: #101830;
    color: #F0F0E0;
    position: relative;
    bottom: 0;
    width: 100%;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.footer-left {
    font-family: 'H Medium', sans-serif;
    flex: 1;
    text-align: left;
    padding: 0px 120px;
}

.footer-right {
    flex: 1;
    text-align: right;
    padding: 0px 120px;
}

@media (max-width: 1000px) {
    footer {
        padding: 50px 20px;
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-left {
        text-align: left;
        padding: 0px 0px;
        width: 100%;
        margin-bottom: 5px;
    }

    .footer-right {
        text-align: left;
        padding: 10px 0px;
        width: 100%;
        margin-bottom: 5px;
    }
}

.back-to-top {
    background-color: #F0F0E0;
    color: #101830;
    border: none;
    padding: 9px 18px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border: 2px solid #F0F0E0;
    border-radius: 10px;
    transition: background-color 0.3s ease;
    font-family: 'H Medium', sans-serif;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    will-change: transform;
}

@media (hover: hover) {
    .back-to-top:hover {
        background-color: #101830;
        color: #F0F0E0;
    }
}

.back-to-top.bob-up {
    animation: buttonBobUp 0.4s forwards;
}

@keyframes buttonBobUp {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.overlay.show {
    opacity: 1;
}

.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(540px, 48vw);
    z-index: 1000;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.popup-card {
    background-color: #101830;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.popup img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
}

.popup .caption-section {
    font-family: 'H Regular', sans-serif;
    background-color: #101830;
    color: #F0F0E0;
    text-align: center;
    padding: 25px;
    height: 100px;
    box-sizing: border-box;
    font-size: 1.1rem;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

@media (max-width: 600px) {
    .popup {
        width: 80vw;
    }
    
    .popup .caption-section {
        font-size: 0.9rem;
    }
}

.popup-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.control-btn {
    background-color: #F0F0E0;
    color: #101830;
    border-radius: 10px;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
    font-family: 'H Regular', sans-serif;
}

@media (hover: hover) {
    .control-btn:hover {
        transform: scale(1.1);
    }
}

.control-btn.close-btn {
    background-color: #B00030;
    color: #F0F0E0;
    font-size: 1.5rem;
}
