@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Noto+Sans+KR:wght@100..900&display=swap');

/* --- 1. GLOBAL RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

body {
    font-family: "Montserrat", sans-serif;
    font-weight: 300;
    background-color: #1E1E1E;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

:lang(ko) {
    font-family: "Noto Sans KR", sans-serif;
    word-break: keep-all;
    letter-spacing: -0.02em;
}

/* FIX: Keeps links from turning purple after being clicked */
a,
a:visited {
    text-decoration: none;
    color: #fff;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.7;
}

/* --- 2. RESTORED SHARED UI (HEADER & FOOTER) --- */
header,
footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    height: 100px;
    padding: 0 50px;
    background-color: #1E1E1E;
    flex-shrink: 0;
    position: relative;
}

header {
    scroll-snap-align: start;
}

footer {
    scroll-snap-align: end;
    flex-direction: row !important;
}

.logo-container {
    width: 80px;
    flex-shrink: 0;
}

.nav-logo {
    width: 100%;
    height: auto;
}

.hero-nav {
    display: flex;
    gap: 30px;
}

.hero-nav a {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: lowercase;
}

.hero-nav a.active {
    color: #A8C3D0;
    font-weight: 800;
}

.footer-link {
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 1px;
    min-width: 80px;
}

.footer-lang-switch {
    display: flex;
    gap: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.lang-btn {
    cursor: pointer;
    opacity: 0.4;
    transition: 0.3s;
}

.lang-btn.active {
    opacity: 1;
    color: #A8C3D0;
}

/* --- 3. UPDATED PORTFOLIO LAYOUT (VERTICAL STACK) --- */
main.portfolio-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    opacity: 0;
    animation: simpleFadeIn 1.5s ease-out forwards;
}

.project-section {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 100px 50px;
    scroll-snap-align: start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.project-header-info {
    max-width: 800px;
    margin-bottom: 40px;
}

.project-year {
    font-size: 0.8rem;
    opacity: 0.5;
}

.project-title {
    font-size: clamp(1.5rem, 5vw, 3rem);
    font-weight: 800;
    color: #A8C3D0;
    text-transform: uppercase;
    margin: 10px 0;
    line-height: 1.1;
}

.project-artist {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.9;
}

.project-description {
    margin-top: 15px;
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.6;
}

/* --- 4. HORIZONTAL FILMSTRIP GALLERY --- */
.horizontal-gallery {
    width: 100vw;
    margin-left: -50px;
    /* Counteracts section padding to go edge-to-edge */
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.horizontal-gallery::-webkit-scrollbar {
    display: none;
}

.scroll-wrapper {
    display: inline-flex;
    padding: 0 50px;
    gap: 30px;
}

.portfolio-img {
    height: 55vh;
    /* Larger cinematic presence */
    width: auto;
    display: block;
    object-fit: contain;
    opacity: 0.2;
    filter: grayscale(100%) blur(15px);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-img.is-visible {
    opacity: 1;
    filter: grayscale(0%) blur(0);
}

/* --- 5. TIMELINE & ANIMATIONS --- */
@keyframes simpleFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-nav {
    position: fixed;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 200;
}

.timeline-dot {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.4s ease;
}

.timeline-dot.active {
    background-color: #A8C3D0;
    box-shadow: 0 0 10px rgba(168, 195, 208, 0.6);
    transform: scale(1.3);
}

.timeline-jump {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: 0.3s;
}

.timeline-jump:hover {
    color: #A8C3D0;
}

/* --- 6. MOBILE OVERHAUL --- */
@media (max-width: 768px) {
    header {
        flex-direction: column !important;
        height: auto;
        padding: 30px 20px;
        gap: 20px;
    }

    footer {
        padding: 0 20px;
        height: 80px;
    }

    .project-section {
        padding: 60px 20px;
    }

    .horizontal-gallery {
        margin-left: -20px;
    }

    .scroll-wrapper {
        padding: 0 20px;
        gap: 15px;
    }

    .portfolio-img {
        height: 40vh;
    }

    .timeline-nav {
        display: none;
    }
}