html {
    background: #000;
    overscroll-behavior: none;
}
body {
    margin: 0;
    padding: 0;
    background: url('media/og/bg1.jpg') no-repeat center bottom fixed;
    background-size: cover;
    color: #fff;
    font-family: monospace; /* fallback */
    overflow-x: hidden;
    scroll-behavior: smooth;
    overscroll-behavior: none;
}

#hero {
    width: 100vw;
    height: 100vh;
    position: relative;
}

#menu {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    cursor: pointer;
}

.menu-lines {
    display: none;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}
.menu-lines .line {
    width: 30px;
    height: 4px;
    background: #fff;
    image-rendering: pixelated;
}

.menu-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.menu-items a {
    text-decoration: none;
    cursor: pointer;
    color: #fff; /* Menu items remain white */
}
.menu-items a:hover pixel-text {
    filter: invert(1);
}

#content-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 100px 20px;
    box-sizing: border-box;
}

#pixel-grid-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    image-rendering: pixelated;
    pointer-events: none;
}

a {
    color: #fff;
    text-decoration: underline; /* fallback */
}
a pixel-text {
    /* underlining is handled by renderer.js */
}

.content {
    width: 100%;
    max-width: 800px;
    z-index: 1;
    position: relative;
}

section {
    margin-bottom: 100px;
}

#about {
    background: #000;
    padding: 40px;
    box-sizing: border-box;
}

#about p {
    margin: 0 0 20px 0;
    line-height: 1.5;
}
#about .author {
    text-align: right;
    margin-top: 40px;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.sq {
    position: relative;
    aspect-ratio: 1;
    cursor: pointer;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    box-sizing: border-box;
    border: 1px solid #fff;
}

.sq::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #000;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1;
}

.sq-0 { grid-column: 1 / span 2; }
.sq-1 { grid-column: 3 / span 2; }
.sq-2 { grid-column: 5 / span 2; }
.sq-3 { grid-column: 2 / span 2; }
.sq-4 { grid-column: 4 / span 2; }

.sq:hover::before {
    opacity: 1;
}

.sq .title {
    position: absolute;
    top: 10px;
    left: 10px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 2;
}

.sq:hover .title {
    opacity: 1;
}

.expanded-content {
    grid-column: 1 / -1;
    background: #000;
    padding: 20px;
    display: none;
    box-sizing: border-box;
}

.expanded-content.active {
    display: block;
}

.expanded-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.expanded-inner img, .expanded-inner video, .expanded-inner iframe {
    width: 100%;
    margin-bottom: 20px;
    display: block;
}

#contact a {
    text-decoration: none;
    color: #fff;
}
.contact-btn {
    background: #000;
    padding: 10px 20px;
    display: inline-block;
    transition: background 0.3s;
}
.contact-btn:hover {
    background: #fff;
}
.contact-btn:hover pixel-text {
    filter: invert(1);
}
.contact-links {
    display: flex;
    gap: 40px;
}

@media (max-width: 768px) {
    body {
        background-position: right bottom !important;
    }
    #about {
        width: auto;
        margin-left: -20px;
        margin-right: -20px;
        padding: 20px;
    }
    #pixel-grid-canvas {
        display: none;
    }
    .menu-lines {
        display: flex;
    }
    .menu-items {
        display: none;
    }
    .menu-items.open {
        display: flex;
    }
    .work-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .sq-0 { grid-column: 1 / span 2; }
    .sq-1 { grid-column: 3 / span 2; }
    .sq-2 { grid-column: 1 / span 2; }
    .sq-3 { grid-column: 3 / span 2; }
    .sq-4 { grid-column: 2 / span 2; }
}
