/* ==========================================================================
   PROSPERO PENSA
   ========================================================================== */

:root{
    --bg:#dccfb7;
    --text:#171717;
    --muted:rgba(23,23,23,.55);
    --line:rgba(23,23,23,.14);

    --sidebar:360px;
    --content:440px;
    --image:760px;
}

*,*::before,*::after{box-sizing:border-box}

html,body{
    margin:0;
    padding:0;
    height:100%;
}

[hidden]{
    display:none !important;
}

body{
    font-family:"Azeret Mono",monospace;
    background:var(--bg);
    color:var(--text);
    transition:background .25s,color .25s;
    overflow:hidden;
}

button{
    appearance:none;
    background:none;
    border:0;
    color:inherit;
    font:inherit;
    cursor:pointer;
    padding:0;
}

a{
    color:inherit;
    text-decoration:none;
}

/* ---------- LAYOUT ---------- */

.site{
    display:grid;
    grid-template-columns:var(--sidebar) 1fr;
    height:100vh;
}

.sidebar{
    border-right:1px solid var(--line);
    padding:40px 32px;
    display:flex;
    flex-direction:column;
}

main{
    display:grid;
    grid-template-columns:minmax(420px,var(--image)) var(--content);
    justify-content:center;
    align-content:center;
    align-items:center;
    gap:56px;
    padding:48px;
}

/* ---------- SIDEBAR ---------- */

.identity{
    text-align:left;
}

.identity h1{
    margin:0;
    font-size:3.25rem;
    line-height:.88;
    letter-spacing:-.06em;
    font-weight:500;
}

#tagline{
    margin:18px 0 0;
    color:var(--muted);
    font-size:.82rem;
}

.language-switch{
    display:flex;
    gap:6px;
    align-items:center;
    margin-top:10px;
    font-size:.68rem;
    color:var(--muted);
}

.lang-button{
    opacity:.4;
}

.lang-button.active{
    opacity:1;
    text-decoration:underline;
    text-underline-offset:3px;
}

nav{
    margin:auto 0;
    display:flex;
    flex-direction:column;
    gap:18px;
}

.project{
    text-align:left;
    opacity:.35;
}

.project.active{
    opacity:1;
}

footer{
    display:flex;
    gap:18px;
}

/* ---------- IMAGE ---------- */

.visual{
    display:flex;
    justify-content:center;
    align-items:center;
}

#heroImage{
    width:100%;
    aspect-ratio:16/10;
    object-fit:cover;
    display:block;
    background:rgba(0,0,0,.04);
}

body.about-mode #heroImage{
    width:auto;
    max-width:100%;
    max-height:70vh;
    aspect-ratio:auto;
    object-fit:contain;
}

/* ---------- CONTENT ---------- */

.content{
    max-width:var(--content);
}

.content h2{
    margin:0 0 30px;
    font-size:1rem;
    font-weight:400;
}

.content h3{
    margin:22px 0 8px;
    font-size:.68rem;
    letter-spacing:.14em;
    text-transform:uppercase;
    color:var(--muted);
    font-weight:400;
}

.content p,
.content div,
.content li{
    font-size:.88rem;
    line-height:1.75;
}

#links{
    display:flex;
    flex-wrap:wrap;
    gap:18px;
}

#links a{
    text-decoration:underline;
    text-underline-offset:4px;
}

/* ---------- ABOUT ---------- */

#aboutView p{
    margin:0 0 20px;
}

.easterEgg{
    margin-bottom:10px;
}

.easterEgg > div{
    display:none;
    margin:4px 0 14px;
    color:var(--muted);
}

.easterEgg.open > div{
    display:block;
}

.easterEgg a{
    text-decoration:underline;
    text-underline-offset:4px;
}

/* ---------- OTHER STUFF ---------- */

#otherView{
    display:flex;
    flex-direction:column;
}

.other-item{
    padding:12px 0;
    border-top:1px solid var(--line);
}

.other-item:last-child{
    border-bottom:1px solid var(--line);
}

.other-item > button{
    width:100%;
    text-align:left;
}

.other-title{
    font-size:.88rem;
}

.other-copy{
    display:none;
    padding-top:12px;
}

.other-item.open .other-copy{
    display:block;
}

.other-meta{
    color:var(--muted);
    font-size:.72rem !important;
    margin-bottom:10px;
}

.other-description{
    margin-bottom:10px;
}

.other-achievement{
    color:var(--muted);
    font-size:.78rem !important;
}

/* Mobile will be refined in V2. */
@media (max-width:900px){
    body{overflow:auto}
    .site{display:block;height:auto}
    .sidebar{border-right:0;border-bottom:1px solid var(--line)}
    nav{margin:48px 0 32px}
    main{display:block;padding:24px}
    .visual{margin-bottom:32px}
    #heroImage,
    body.about-mode #heroImage{
        max-width:100%;
        max-height:none;
    }
}


/* ---------- BILINGUAL / EASTER EGG REFINEMENTS ---------- */

.project-extra{
    margin-top:18px;
}

.easterEgg button,
#runEasterEgg,
#timotheeEasterEgg{
    transition:color .12s ease;
}

.easter-active{
    color:var(--text) !important;
}


/* ---------- DESKTOP FINAL REFINEMENTS ---------- */

.content{
    max-width:410px;
}

.content p,
.content div,
.content li{
    letter-spacing:.01em;
}

#projectText,
#statusText{
    max-width:40ch;
}

#aboutView p{
    margin-bottom:17px;
}

.easterEgg{
    margin-bottom:8px;
}

footer{
    align-items:center;
}

footer a{
    width:18px;
    height:18px;
    display:grid;
    place-items:center;
    opacity:.62;
    transition:opacity .12s ease;
}

footer a:hover,
footer a:focus-visible{
    opacity:1;
}

footer svg{
    width:15px;
    height:15px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.55;
    stroke-linecap:round;
    stroke-linejoin:round;
}


/* ==========================================================================
   V2 MOBILE REFINEMENTS
   ========================================================================== */

@media (max-width:900px){

    body{
        overflow:auto;
    }

    .site{
        display:block;
        height:auto;
        min-height:100vh;
    }

    .sidebar{
        position:relative;
        padding:28px 24px 24px;
        border-right:0;
        border-bottom:1px solid var(--line);
        min-height:0;
    }

    .identity{
        width:calc(100% - 110px);
    }

    .identity h1{
        font-size:2.75rem;
        line-height:.9;
    }

    #tagline{
        margin-top:14px;
    }

    .language-switch{
        margin-top:8px;
    }

    /* Social icons live beside the name on mobile. */
    footer{
        position:absolute;
        top:30px;
        right:24px;
        margin:0;
        gap:12px;
    }

    footer a{
        width:18px;
        height:18px;
    }

    footer svg{
        width:15px;
        height:15px;
    }

    /* Two balanced columns: left items left-aligned, right items right-aligned. */
    nav{
        display:grid;
        grid-template-columns:1fr 1fr;
        column-gap:18px;
        row-gap:18px;
        margin:42px 0 0;
        width:100%;
    }

    .project{
        width:100%;
        line-height:1.25;
    }

    .project:nth-child(odd){
        text-align:left;
    }

    .project:nth-child(even){
        text-align:right;
    }

    main{
        display:block;
        padding:26px 24px 40px;
    }

    .visual{
        margin-bottom:28px;
    }

    #heroImage{
        width:100%;
        max-width:100%;
        height:auto;
        aspect-ratio:16/10;
        object-fit:cover;
    }

    body.about-mode #heroImage{
        width:auto;
        max-width:100%;
        max-height:none;
        aspect-ratio:auto;
        object-fit:contain;
    }

    .content{
        max-width:none;
    }

    #projectText,
    #statusText{
        max-width:none;
    }
}

@media (max-width:520px){

    .sidebar{
        padding:24px 20px 22px;
    }

    .identity{
        width:calc(100% - 94px);
    }

    .identity h1{
        font-size:2.45rem;
    }

    footer{
        top:26px;
        right:20px;
        gap:10px;
    }

    nav{
        margin-top:34px;
        column-gap:14px;
        row-gap:16px;
    }

    .project{
        font-size:.9rem;
    }

    main{
        padding:22px 20px 36px;
    }
}
