* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    -webkit-text-size-adjust: 100%; 
    text-size-adjust: 100%; 
}

body {
    background-color: #fff;
    color: #000;
    font-family: 'JetBrains Mono', monospace; 
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
}

a, button {
    color: #000;
    text-decoration: none;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
}

header {
    position: fixed; top: 0; left: 0; width: 100%; padding: 2rem;
    display: flex; justify-content: center;
    align-items: flex-start;
    z-index: 100; pointer-events: none;
}

header > * { pointer-events: auto; }

.nav-center { display: flex; gap: 1.5rem; }
.nav-link { opacity: 0.5; transition: opacity 0.3s; }
.nav-link:hover, .nav-link.active { opacity: 1; font-weight: bold; }

.main-container {
    height: 100dvh; width: 100vw;
    overflow-y: scroll; overflow-x: hidden;
    scroll-snap-type: y mandatory; scroll-behavior: smooth;
    transition: opacity 0.5s;
}

section {
    height: 100dvh; width: 100vw;
    scroll-snap-align: start; position: relative; overflow: hidden;
}

#info-view {
    display: flex; flex-direction: column;
    justify-content: center; align-items: center; padding: 0 4rem;
}

.info-layout {
    display: grid; grid-template-columns: 1fr auto 1fr;
    align-items: center; width: 100%; max-width: 1600px; height: 80%;
}

.side-text { font-size: 1.2rem; line-height: 1.4; }
.left-text { text-align: left; padding-right: 2rem; }
.right-text { text-align: left; padding-left: 2rem; font-size: 0.9rem; max-width: 250px; justify-self: end; }

.ascii-container {
    white-space: pre; 
    cursor: default; 
    user-select: none;
    display: flex; 
    justify-content: center; 
    align-items: center; 
    position: relative;
    width: 100%;
}

.scroll-hint {
    position: absolute; bottom: 2rem; width: 100%; text-align: center;
    font-size: 0.9rem; animation: bounce 2s infinite;
}

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

#work-view {
    display: flex; overflow-x: scroll; scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

#work-view::-webkit-scrollbar { display: none; }

.project-slide {
    min-width: 100vw; height: 100%; scroll-snap-align: center;
    display: flex; justify-content: center; align-items: center; position: relative;
}

.project-card { 
    width: 80%; max-width: 600px; 
    cursor: pointer; 
    transition: transform 0.3s ease;
}

.project-card:hover { transform: scale(1.02); }

.image-container {
    width: 100%; height: 450px; margin-bottom: 1.5rem;
    background-color: transparent; border: none;
    border-radius: 12px; overflow: hidden; position: relative;
}

.image-container img { 
    width: 100%; height: 100%; object-fit: cover; 
    display: block; box-shadow: 0 10px 30px rgba(0,0,0,0.15); 
}

.placeholder-box {
    width: 100%; height: 100%; background-color: #f4f4f4;
    display: flex; align-items: center; justify-content: center;
    color: #aaa; border-radius: 12px;
}

.project-info {
    display: flex; justify-content: space-between;
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px;
}

.project-info .right { text-align: right; }

.work-footer {
    position: fixed; bottom: 0; left: 0; width: 100%; padding: 2rem;
    display: flex; justify-content: space-between; align-items: flex-end;
    z-index: 100; pointer-events: none; opacity: 0; transition: opacity 0.5s;
}

.work-footer.visible { opacity: 1; }
.work-footer > * { pointer-events: auto; }

.pagination {
    position: absolute; left: 50%; transform: translateX(-50%);
    display: flex; gap: 1rem;
}

.page-num { opacity: 0.3; }
.page-num.active { opacity: 1; }

#project-detail-view {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: #fff; z-index: 200; overflow-y: scroll;
}

.detail-wrapper {
    display: grid; grid-template-columns: 35% 65%; width: 100%; max-width: 1600px; 
    margin: 0 auto; min-height: 100vh; padding: 8rem 4rem 4rem 4rem;
}

.detail-left { position: sticky; top: 8rem; align-self: start; padding-right: 4rem; }
.back-btn { display: block; margin-bottom: 4rem; font-size: 1rem; }
.project-title { font-size: 4.5rem; margin-bottom: 3rem; font-weight: normal; letter-spacing: 0; }
.meta-grid { display: grid; grid-template-columns: 150px 1fr; gap: 1.5rem 0; margin-bottom: 4rem; font-size: 1.1rem; }
.meta-label { opacity: 1; } 
.project-description { font-size: 1.1rem; line-height: 1.6; max-width: 450px; }

.detail-right { display: flex; flex-direction: column; gap: 2rem; padding-bottom: 4rem; }
.detail-img { width: 100%; }
.detail-img img { width: 100%; height: auto; border-radius: 20px; display: block; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.detail-img .placeholder-box { width: 100%; height: 600px; border-radius: 20px; font-size: 1.2rem; box-shadow: 0 10px 30px rgba(0,0,0,0.1); background-color: #fcfcfc; }

.detail-pdf { position: relative; width: 100%; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); background-color: #fff; border: 1px solid #eee; }
.detail-pdf iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; display: block; }
.detail-pdf .placeholder-box { position: absolute; top: 0; left: 0; width: 100%; height: 100%; font-size: 1.1rem; background-color: #fff; border: 2px dashed #ccc; display: flex; align-items: center; justify-content: center; }

.detail-img-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; width: 100%; }
.detail-img-grid img { width: 100%; height: auto; border-radius: 20px; display: block; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.detail-img-grid .placeholder-box { width: 100%; aspect-ratio: 1 / 1; height: auto; border-radius: 20px; font-size: 1rem; box-shadow: 0 10px 30px rgba(0,0,0,0.1); background-color: #fcfcfc; }

.detail-content-text { font-size: 1.2rem; margin-top: 1rem; margin-bottom: -0.5rem; font-weight: normal; }

@media (max-width: 900px) {
    header { padding: 1.5rem; }
    
    #info-view { 
        padding: 8.5rem 1.5rem 4rem 1.5rem; 
        justify-content: flex-start;
    } 

    .info-layout { 
        display: flex; 
        flex-direction: column; 
        justify-content: flex-start; 
        align-items: flex-start; 
        gap: 2rem; 
        height: auto; 
    } 
    
    .left-text { order: 1; padding: 0; font-size: 1.8rem; }
    .right-text { order: 2; padding: 0; font-size: 1rem; max-width: 100%; align-self: flex-start; }
    
    /* THE FIX: Completely hide the ASCII container on mobile */
    .ascii-container { 
        display: none !important; 
    }
    
    .scroll-hint { bottom: 2.5rem; }
    
    .project-slide { padding-bottom: 9rem; }
    .project-card { width: 85%; }
    .image-container { height: 55vh; max-height: 450px; margin-bottom: 0; }
    .project-info { display: none; } 
    .work-footer { padding: 1.5rem 2rem; align-items: flex-end; }
    .work-footer .pagination { position: absolute; left: 50%; transform: translateX(-50%); bottom: 4.5rem; width: auto; justify-content: center; gap: 0.8rem; font-size: 0.9rem; }
    .detail-wrapper { padding: 6rem 1.5rem 2rem 1.5rem; grid-template-columns: 1fr; }
    .detail-left { position: relative; top: 0; margin-bottom: 3rem; padding-right: 0; }
    .project-title { font-size: 3rem; margin-bottom: 1.5rem; }
    .meta-grid { grid-template-columns: 100px 1fr; margin-bottom: 2.5rem; gap: 1rem 0; font-size: 1rem; }
    .detail-img-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .detail-right { gap: 1.5rem; }
}