body, html {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    height: 100%;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

img {
    pointer-events: none;
}

.full-screen {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: Arial, sans-serif;
    scroll-snap-align: start;
    background-size: cover;
    background-position: center;
    box-sizing: border-box;
    overflow: hidden;
}

.fade-in-elements {
    opacity: 0;
    animation: fadeInElements 1s ease-in forwards;
}

@keyframes fadeInElements {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.full-screen > .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-height: 100%;
    overflow: hidden;
}

#home {
    background-image: url('images/desktop-background-1.webp');
    background-size: cover;
    background-position: center;
}

#about {
    background-image: url('images/desktop-background-2.webp');
    background-size: cover;
    background-position: center;
}

#about .about-section-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

#about .about-container, #about-extended .about-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
    height: 100%;
    overflow: hidden;
}

#about .about-text, #about-extended .about-text {
    font-size: 1rem;
    line-height: 1.6;
    overflow-wrap: break-word;
    max-width: 50%;
    max-height: 100%;
    box-sizing: border-box;
    overflow-y: auto;
}

#about .about-section-image, #about-extended .about-section-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: cover;
}

#about-extended {
    background-image: url('images/desktop-background-3.webp');
    background-size: cover;
    background-position: center;
}

#credits {
    background-image: url('images/desktop-background-4.webp');
    background-size: cover;
    background-position: center;
}

#contact {
    background-image: url('images/desktop-background-5.webp');
    background-size: cover;
    background-position: center;
}

@media (min-width: 1600px) {
    #about .about-text, #about-extended .about-text {
        font-size: 1.2rem;
        line-height: 1.8;
    }
}

@media (max-width: 1200px) {
    #about .about-text, #about-extended .about-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 700px) {
    #home {
        background-image: url('images/mobile-background-1.webp');
        background-size: cover;
        background-position: center;
    }

    #about {
        background-image: url('images/mobile-background-2.webp');
        background-size: cover;
        background-position: center;
    }

    #about-extended {
        background-image: url('images/mobile-background-3.webp');
        background-size: cover;
        background-position: center;
    }
    
    #credits {
        background-image: url('images/mobile-background-4.webp');
        background-size: cover;
        background-position: center;
    }
    
    #contact {
        background-image: url('images/mobile-background-5.webp');
        background-size: cover;
        background-position: center;
    }

    .logo {
        max-width: 50%;
        margin-bottom: 10px;
    }

    .social-icons {
        gap: 8px;
        margin-top: 10px;
    }

    .social-icons img {
        width: 30px;
        height: 30px;
    }

    #about .about-section-image, #about-extended .about-section-image {
        display: none;
    }

    #about .about-container, #about-extended .about-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        height: auto;
    }

    #about .about-text, #about-extended .about-text {
        font-size: 0.9rem;
        max-width: 90%;
    }   
}

@media (max-width: 500px) {
    #about .about-text, #about-extended .about-text {
        font-size: 0.8rem;
        padding: 5px;
        overflow-y: auto;
        max-height: 75vh;
    }
}

@media (max-height: 800px) {
    #about .about-text, #about-extended .about-text {
        font-size: 0.9rem;
    }
}

@media (max-height: 600px) {
    #about .about-text, #about-extended .about-text {
        font-size: 0.8rem;
        overflow-y: auto;
    }
}

@media (max-height: 900px) and (min-height: 800px) {
    #about .about-container, #about-extended .about-container {
        flex-direction: row;
        justify-content: space-between;
        gap: 10px;
    }
    #about .about-text, #about-extended .about-text {
        max-width: 45%;
        font-size: 0.9rem;
        overflow-y: auto;
    }
}

@media (max-height: 600px) and (max-width: 700px) {
    .logo {
        max-width: 20%;
    }
}

@media (max-height: 600px) and (min-width: 701px) {
    .logo {
        max-width: 30% !important;
        height: auto;
    }

    .header {
        justify-content: center;
    }
}

@media (max-width: 500px) {
    #about .about-text {
        font-size: 0.8rem;
        padding: 5px;
        overflow-y: auto;
        max-height: 75vh;
    }
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.content {
    position: relative;
    z-index: 2;
    color: #fff;
    max-width: 800px;
    padding: 10px 20px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 80px;
}

.logo {
    max-width: 60%;
    height: auto;
    margin-bottom: 10px;
    filter: drop-shadow(5px 5px 5px #222);
}

.social-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    filter: drop-shadow(5px 5px 5px #222);
    margin-top: 20px;
}

.social-icons a {
    margin: 0 10px;
}

.social-icons img {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease;
}

.social-icons img:hover {
    transform: scale(1.1);
}

.scroll-hint {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    animation: bounce 2s infinite, fadeOutHint 3s forwards;
    pointer-events: none;
}

.scroll-hint svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes fadeOutHint {
    0%, 90% {
        opacity: 1;
        visibility: visible;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

body.scrolled .scroll-hint {
    animation: fadeOutHint 0.5s forwards;
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    position: relative;
    z-index: 2;
}

.about-image, .about-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    box-sizing: border-box;
    padding: 20px;
}

.about-image {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.about-image img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
}

.about-text {
    text-align: left;
    font-family: "Oswald", serif;
    font-size: 1.1rem;
    font-weight: 500;
    font-style: normal;
    line-height: 2.0;
    word-break: break-word;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    overflow: hidden;
}

.about-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    color: white;
    font-family: 'Oswald', serif;
    overflow: hidden;
}

.about-section .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

#about-extended .about-container {
    grid-template-columns: 1fr 1fr;
}

.credits-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 40px;
    color: white;
}

.credits-container {
    display: grid;
    grid-template-rows: 40% 60%;
    grid-template-columns: 50% 50%;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    height: 100%;
    position: relative;
    z-index: 2;
}

.credits-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    color: white;
    font-family: "Oswald", serif;
    font-size: 1rem;
    line-height: 1.8;
}

.credits-box h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 500;
    text-transform: uppercase;
    color: white;
}

.credits-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.credits-box ul li {
    margin-bottom: 8px;
    font-size: 1rem;
    font-weight: 400;
}

.project-name {
    font-size: 1.3rem;
    font-weight: bold;
}

.project-remark {
    font-size: 1.1rem;
    margin-left: 20px;
    margin-bottom: 7.5px;
}

.project-description {
    font-size: 1rem;
    margin-left: 30px;
    margin-bottom: 7.5px;
    font-weight: 300;
}

.project-detail {
    margin-top: 7.5px;
    margin-left: 30px;
    font-style: italic;
    font-size: 1.0rem;
    line-height: 1.5;
    font-weight: 300;
}

.credits-box.large {
    text-align: left;
}

.credits-box.large.credits-top-aligned {
    justify-content: flex-start;
}

iframe {
    border: none;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
}

.contact-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 40px;
    color: white;
    background: #333;
}

.contact-container {
    display: grid;
    grid-template-columns: 50% 50%;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.contact-left {
    width: 100%;
    height: 100%;
}

.contact-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    padding: 20px;
    color: rgb(255, 255, 255);
    font-family: "Oswald", serif;
    font-size: 1rem;
    line-height: 1.8;
}

.contact-right h3 {
    font-size: 2rem;
    font-style: normal;
    font-weight: 700;
    margin-bottom: 10px;
}

.contact-right p {
    font-size: 1.8rem;
    font-style: Italic;
    font-weight: 300;
    margin: 0;
}

.contact-section .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* Scroll Container */
body {
    scroll-snap-type: y mandatory;
    overflow-y: auto;
}