:root{
    --bg:#0d1117;
    --panel:#161b22;
    --text:#c9d1d9;
    --muted:#8b949e;
    --border:rgba(240,246,252,0.14);
    --header-h:64px;
    --art-preview-max:2000px;
}

*{
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    margin:0;
    font-family:system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    background:var(--bg);
    color:var(--text);
}

.topbar{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    z-index:100;
    height:var(--header-h);
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 20px;
    background:rgba(22,27,34,0.42);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
    border-bottom:1px solid rgba(240,246,252,0.08);
}

.brand{
    display:flex;
    align-items:center;
    gap:10px;
}

.logo-slot{
    width:auto;
    height:34px;
}

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

.brand-name{
    font-size:14px;
    font-weight:600;
}

.nav{
    display:flex;
    gap:10px;
}

.nav-toggle{
    display:none;
    border:1px solid var(--border);
    border-radius:8px;
    background:rgba(13,17,23,0.7);
    width:42px;
    height:36px;
    padding:0;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    gap:5px;
    cursor:pointer;
}

.nav-toggle-bar{
    display:block;
    width:18px;
    height:2px;
    background:var(--text);
    border-radius:999px;
}

.nav-toggle:focus-visible{
    outline:2px solid var(--text);
    outline-offset:2px;
}

.nav a{
    color:var(--text);
    text-decoration:none;
    padding:8px 10px;
    border-radius:8px;
    font-size:14px;
}

.nav a:hover{
    background:rgba(240,246,252,0.08);
}

.container{
    width:min(1100px, calc(100% - 40px));
    margin:auto;
    position:relative;
    z-index:2;
}

.hero{
    position:relative;
    min-height:10vh;
    overflow:hidden;
    padding:0 0 80px;
}

.hero-bg{
    position:absolute;
    inset:0;
    background:
    linear-gradient(to bottom, rgba(13,17,23,0.08), rgba(13,17,23,0.88)),
    url("space.webp");
    background-size:cover;
    background-position:center;
    will-change:transform, opacity;
    transform:translate3d(0,0,0) scale(1.02);
}

.hero-fade{
    position:absolute;
    inset:0;
    background:linear-gradient(to bottom, rgba(13,17,23,0), rgba(13,17,23,1));
    opacity:.35;
    pointer-events:none;
    will-change:opacity;
}

.hero-content{
    min-height:100vh;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    padding-top:calc(var(--header-h) + 48px);
}

.hero-top-text{
    max-width:950px;
    color:#ffffff;
    margin-top:120px;
    will-change:transform;
}

.hero-top-text h1{
    margin:0 0 12px;
    font-size:clamp(2.7rem, 6vw, 5rem);
    line-height:1;
}

.hero-top-text p{
    margin:0;
    color:rgba(255,255,255,0.82);
    font-size:1.05rem;
    max-width:600px;
}

section{
    padding:70px 0;
}

#artwork{
background:var(--panel);
}

.section-title{
    margin:0 0 20px;
}

.section-sub{
    margin:0 0 24px;
    color:var(--muted);
}

.grid{
    display:grid;
    grid-template-columns:repeat(12,1fr);
    gap:15px;
}

.card{
    grid-column:span 4;
    background:rgba(13,17,23,0.6);
    border:1px solid var(--border);
    border-radius:6px;
    padding:15px;
}

.js #artwork .reveal-card{
    opacity:0;
    transform:translate3d(0, 20px, 0);
    transition:opacity 550ms ease, transform 550ms ease;
}

#artwork .reveal-card.is-visible{
    opacity:1;
    transform:translate3d(0, 0, 0);
}

.art-preview{
    display:block;
    width:min(100%, var(--art-preview-max));
    height:auto;
    object-fit:contain;
    margin-inline:auto;
}

.inkscape-grid .ink-featured{
    grid-column:1 / -1;
}

.inkscape-grid .ink-secondary{
    grid-column:span 6;
}

.large{
    grid-column:span 12;
}

#about a{
    color:#7dd3fc;
    text-decoration:underline;
    text-underline-offset:2px;
}

#about a:visited{
    color:#a5b4fc;
}

#about a:hover,
#about a:focus{
    color:#bae6fd;
}

.art-subsection{
    position:relative;
    min-height:80vh;
    overflow:hidden;
    display:flex;
    align-items:center;
    background:var(--bg);
}

.art-subsection-content{
    position:relative;
    z-index:2;
    padding:80px 0;
}

.pixel-divider{
    width:100vw;
    height:1px;
    background:rgba(240,246,252,0.2);
}

.footer{
    border-top:1px solid rgba(240,246,252,0.08);
    background:var(--bg);
    padding:22px 0 28px;
}

.footer-content{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    color:var(--muted);
    font-size:14px;
}

.footer-links{
    display:flex;
    gap:16px;
    flex-wrap:wrap;
}

.footer-links a{
    color:var(--muted);
    text-decoration:none;
}

.footer-links a:hover{
    color:var(--text);
}

.anchor-offset{
    scroll-margin-top:calc(var(--header-h) + 16px);
}

@media (max-width:800px){
    .topbar{
        padding:0 12px;
    }

    .logo-slot{
        height:30px;
    }

    .nav-toggle{
        display:flex;
    }

    .nav{
        position:absolute;
        top:calc(100% + 8px);
        right:12px;
        min-width:170px;
        flex-direction:column;
        gap:4px;
        padding:8px;
        border:1px solid var(--border);
        border-radius:10px;
        background:rgba(13,17,23,0.96);
        opacity:0;
        transform:translateY(-6px);
        visibility:hidden;
        pointer-events:none;
        transition:opacity 180ms ease, transform 180ms ease;
    }

    .topbar.is-nav-open .nav{
        opacity:1;
        transform:translateY(0);
        visibility:visible;
        pointer-events:auto;
    }

    .nav a{
        display:block;
    }

    .card{
        grid-column:span 12;
    }

    .inkscape-grid .ink-secondary{
        grid-column:1 / -1;
    }

    .hero-top-text h1{
        font-size:clamp(2.2rem, 10vw, 4rem);
    }

    .footer-content{
        flex-direction:column;
        align-items:flex-start;
    }

    .hero-actions{
        flex-direction:column;
        align-items:flex-start;
    }
}

@media (prefers-reduced-motion:reduce){
    .js #artwork .reveal-card{
        opacity:1;
        transform:none;
        transition:none;
    }
}
