body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

html {
    user-select: none;
    background-color: #f5f7fa;
    /* Match light mode body start gradient */
}

/* Ensure Lenis works well */
html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

* {
    margin: 0;
    padding: 0;
}

.container {
    width: 90%;
    margin: 0 auto;
    position: relative;
}

.container img {
    position: absolute;
    transition: 0.3s;
    border-radius: 8px;
    scale: 1;
    z-index: 1;
}

.container img:hover {
    scale: 1.05;
    box-shadow: 0 0 60px 0 rgba(110, 110, 110, 0.8),
        0 0 40px 10px rgba(164, 164, 164, 0.54);
    z-index: 2;
}

.container img:active {
    scale: 0.9;
    z-index: 2;
}

.title {
    text-align: center;
    padding-top: 20vh;
    margin-bottom: 80px;
    position: relative;
}

#titleh1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 16px;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

#titlep {
    font-size: 1.1rem;
    color: #636e72;
    font-weight: 300;
    letter-spacing: 1px;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

#titleh1 {
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.title p {
    color: #363636;
}

#source-p {
    color: #898989;
    margin-bottom: 5rem;
}

footer {
    margin-top: 100px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #8d8d8d;
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-links {
    position: relative;
    color: #515151;
    transition: 0.3s ease;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 999px;
    background-color: #ffffff00;
    margin-top: 16px;
}

.footer-links:hover {
    color: #767676;
    background-color: #d7d7d7;
}

@media screen and (max-width: 1600px) {
    .container img:hover {
        scale: 1.1;
        box-shadow: 0 0 60px 0 rgba(110, 110, 110, 0.8),
            0 0 40px 10px rgba(164, 164, 164, 0.54);
        z-index: 2;
    }

    .container img:active {
        scale: 0.9;
        z-index: 2;
    }
}

@media screen and (max-width: 1200px) {
    .container img:hover {
        scale: 0.9;
        box-shadow: 0 0 60px 0 rgba(110, 110, 110, 0.8),
            0 0 40px 10px rgba(164, 164, 164, 0.54);
        z-index: 2;
    }

    .container img:active {
        scale: 0.9;
        z-index: 2;
    }
}

@media screen and (max-width: 600px) {
    .container img:hover {
        scale: 0.9;
        box-shadow: 0 0 60px 0 rgba(110, 110, 110, 0.8),
            0 0 40px 10px rgba(164, 164, 164, 0.54);
        z-index: 2;
    }

    .container img:active {
        scale: 0.9;
        z-index: 2;
    }
}


#cursor {
    position: fixed;
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 50%;
    opacity: 1;
    z-index: 10086;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.1s ease-out;
    mix-blend-mode: exclusion;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.4);

    &.hidden {
        opacity: 0;
    }

    &.active {
        transform: scale(0.8);
    }
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    color: #2d3436;
}

#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.95);
}

#back-to-top svg {
    transition: transform 0.3s ease;
}

#back-to-top:hover svg {
    transform: translateY(-3px);
}

@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
    }

    ::-webkit-scrollbar-track {
        background: #1e1e1e;
        /* Match dark mode bg */
    }

    ::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
    }

    ::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.4);
    }

    h1,
    #titleh1 {
        color: #f1f2f6;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    }

    .title p,
    #titlep {
        color: #b2bec3;
    }

    #source-p {
        color: #b2bec3;
    }

    footer {
        background: rgba(30, 30, 30, 0.8);
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }

    .footer-links {
        color: #b2bec3;
    }

    .footer-links:hover {
        color: #ffffff;
        background-color: rgba(255, 255, 255, 0.1);
    }

    /* Back to Top Dark Mode */
    #back-to-top {
        background: rgba(30, 30, 30, 0.8);
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
        color: #f1f2f6;
    }

    #back-to-top:hover {
        background: rgba(30, 30, 30, 0.95);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    }
}