* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000;
    color: #ffffcc;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 15px;
    line-height: 22px;
    display: flex;
}

.small {
    width: 100px;
}

p {
    margin-top: 20px;
    margin-bottom: 20px;
}

nav {
    width: 150px;
    background: #000;
    border-right: 1px solid #333;
    padding: 30px 0;
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-home {
    margin-bottom: 20px;
    padding-top: 20px;
    padding-bottom: 40px;
    border-bottom: 1px solid #333;
    width: 100%;
    text-align: center;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
    flex: 1;
    overflow-y: auto;
    padding-top: 10px;
    text-transform: capitalize;
}

.nav-home a {
    color: #ffffcc;
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-home a:hover {
    color: #bc5757;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-item:hover {
    opacity: 0.7;
}

.nav-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
    transition: filter 2s ease;
}

.nav-item:hover img {
    filter: grayscale(100%) sepia(100%) hue-rotate(-50deg) saturate(300%) brightness(0.4);
}

.nav-item span {
    color: #ffffcc;
    letter-spacing: 1px;
}

.container {
    margin-left: 150px;
    flex: 1;
    padding: 40px;
}

h1 {
    color: #ffffcc;
    font-size: 25px;
    font-weight: normal;
    letter-spacing: 2px;
    margin-bottom: 30px;
    text-align: left;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    text-transform: capitalize;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    max-width: 1000px;
    margin: 0 auto;
}

@media (min-width: 1250px) {
    .grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1250px) {
    body {
        flex-direction: column;
    }
    
    nav {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid #333;
        flex-direction: column;
        padding: 20px;
    }
    
    .nav-home {
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 1px solid #333;
        border-right: none;
        padding-right: 0;
        margin-right: 0;
    }
    
    .nav-links {
        flex-direction: row;
        gap: 15px;
        overflow-x: auto;
    }
    
    .nav-item img {
        width: 60px;
        height: 60px;
    }
    
    .container {
        margin-left: 0;
        padding: 20px;
    }
}

.grid-item {
    aspect-ratio: 1;
    background: #0a0a0a;
    border: none;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    display: block;
    position: relative;
}

.grid-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.3) 2px,
        rgba(0, 0, 0, 0.3) 4px
    );
    pointer-events: none;
    opacity: 0.8;
}

.grid-item:hover::after {
    animation: scanlines 0.25s steps(4) forwards;
}

@keyframes scanlines {
    0% { opacity: 0.8; }
    25% { opacity: 0.4; }
    50% { opacity: 0.9; }
    75% { opacity: 0.5; }
    100% { opacity: 0; }
}

.grid-item:hover {
    transform: scale(0.95);
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) brightness(0.4);
    transition: filter 0.1s steps(5);
    image-rendering: pixelated;
}

.grid-item:hover img {
    animation: glitch-color 0.25s steps(4) forwards;
}

@keyframes glitch-color {
    0% { filter: grayscale(100%) brightness(0.4) blur(2px); }
    25% { filter: grayscale(75%) brightness(0.5) blur(0px); }
    50% { filter: grayscale(50%) brightness(0.55) blur(1px); }
    75% { filter: grayscale(25%) brightness(0.6) blur(0px); }
    100% { filter: brightness(0.65); }
}

/* Lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.lightbox:target {
    display: flex;
}

.lightbox-content {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-caption {
    color: #ffffcc;
    padding: 20px 0;
}

.lightbox-caption p {
    margin-bottom: 15px;
}

body:has(.lightbox:target) {
    overflow: hidden;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    width: 24px;
    height: 24px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: inset -1px -1px 0 #000, inset 1px 1px 0 #dfdfdf;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'MS Sans Serif', Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: #000;
    line-height: 1;
}

.lightbox-close:hover {
    background: #c0c0c0;
}

.lightbox-close:active {
    border-color: #808080 #ffffff #ffffff #808080;
    box-shadow: inset 1px 1px 0 #000, inset -1px -1px 0 #dfdfdf;
}