html, body {
    overflow: hidden;
}

.projects-wrapper {
    display: flex;
    flex-direction: column;
    width: 95vw;
    height: 95vh;
    height: 95dvh;
    box-sizing: border-box;
}

.project-header {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #faedcb;
    border: 1px solid #c4a882;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    padding: 14px 24px;
    box-shadow: 4px -2px 10px rgba(0,0,0,0.08);
    transition: opacity 280ms ease;
}

.project-header h2 {
    font-family: 'Exo 2', 'DM Mono', monospace;
    font-weight: 500;
    font-size: clamp(20px, 2.2vw, 36px);
    color: #4A3728;
    letter-spacing: 0.04em;
}

.project-body {
    flex: 1;
    display: grid;
    grid-template-columns: 40% 60%;
    grid-template-rows: 1fr;
    border: 1px solid #c4a882;
    box-shadow: 6px 6px 24px rgba(0,0,0,0.18);
    overflow: hidden;
    background-color: #faedcb;
    transition: opacity 280ms ease;
}

.fading {
    opacity: 0;
    transition: opacity 200ms ease !important;
}

.left-column {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #c4a882;
    overflow-y: auto;
    scrollbar-width: none;
}

.left-column::-webkit-scrollbar {
    display: none;
}

.desc-box {
    padding: clamp(1rem, 2vw, 2rem);
    border-bottom: 1px solid #c4a882;
}

.learned-box {
    padding: clamp(1rem, 2vw, 2rem);
}

.section-box {
    border: 1px solid #c4a882;
    border-radius: 4px;
    padding: clamp(0.6rem, 1.2vw, 1.2rem);
}

.image-box {
    grid-column: 2;
    grid-row: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0,0,0,0.04);
}

.image-box iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
}

.image-box iframe.interactive {
    pointer-events: auto;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-gallery {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    gap: 4px;
    padding: 4px;
    box-sizing: border-box;
}

.image-gallery img {
    width: 0;
    height: 100%;
    flex: 1 1 0;
    object-fit: contain;
    display: block;
}


.image-placeholder {
    font-family: 'DM Mono', monospace;
    font-size: clamp(14px, 1.4vw, 20px);
    color: rgba(74, 55, 40, 0.35);
    letter-spacing: 0.08em;
}

.text-box .box-label + .box-body {
    margin-bottom: 1rem;
}

.section-box {
    border: 1px solid #c4a882;
    border-radius: 4px;
    padding: clamp(0.6rem, 1.2vw, 1.2rem);
}

.box-label {
    font-family: 'Exo 2', sans-serif;
    font-weight: 400;
    font-size: clamp(20px, 2.1vw, 28px);
    color: rgba(74, 55, 40, 0.6);
    letter-spacing: 0.02em;
    margin-bottom: 0.6rem;
}

.box-body {
    font-family: 'Outfit', sans-serif;
    font-weight: 200;
    font-size: clamp(16px, 1.7vw, 22px);
    color: #4A3728;
    line-height: 1.7;
}

.box-body a {
    color: #4A3728;
    font-weight: 400;
    text-decoration: underline;
    text-decoration-color: rgba(74, 55, 40, 0.4);
    text-underline-offset: 3px;
    transition: text-decoration-color 200ms, color 200ms;
}

.box-body a:hover {
    text-decoration-color: #4A3728;
}

.project-nav {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
}

.nav-arrow {
    font-family: 'DM Mono', monospace;
    font-size: clamp(20px, 2vw, 32px);
    color: #4A3728;
    background-color: #faedcb;
    border: 1px solid #c4a882;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 12px 28px;
    cursor: pointer;
    width: 18%;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 300ms;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.12);
    user-select: none;
}

.nav-arrow:hover {
    background-color: #E7D7B1;
}

.nav-arrow:disabled {
    opacity: 0.3;
    cursor: default;
}

.nav-arrow:disabled:hover {
    background-color: #faedcb;
}

.nav-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: #e8d0d0;
    border: 1px solid #c4a882;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 10px 28px 14px;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.12);
    text-decoration: none;
    transition: background-color 300ms;
}

.nav-center:hover {
    background-color: #d4b8b8;
}

.nav-home-icon {
    font-size: 2rem;
    font-weight: 900;
    color: #4A3728;
    line-height: 1;
}

.nav-dots {
    display: flex;
    gap: 7px;
    align-items: center;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(74, 55, 40, 0.2);
    border: 1.5px solid rgba(74, 55, 40, 0.35);
    transition: background-color 300ms, transform 200ms;
}

.dot.active {
    background-color: #4A3728;
    border-color: #4A3728;
    transform: scale(1.25);
}

/* ---- Mobile ---- */

@media (max-width: 768px) {
    .projects-wrapper {
        width: 100%;
        height: 100dvh;
    }

    /* Stack the 40/60 split into a single column: image on top, then the
       description/story text below it. */
    .project-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .image-box {
        grid-column: 1;
        grid-row: 1;
        height: 34vh;
        border-bottom: 1px solid #c4a882;
    }

    .left-column {
        grid-column: 1;
        grid-row: 2;
        border-right: none;
    }

    /* Shrink the nav so two arrows + home fit on a narrow screen, and keep it
       pinned so you can flip projects without scrolling. */
    .nav-arrow {
        width: auto;
        min-width: 0;
        flex: 1;
        padding: 10px 0;
    }

    .nav-center {
        padding: 8px 20px 12px;
    }

    .nav-home-icon {
        font-size: 1.5rem;
    }
}

