:root {
    --background: #1e1e2e;
    --surface: #313244;
    --text: #cdd6f4;
    --accent: #f5c2e7;
    --accent-hover: #f8a1f1;
    --shadow: rgba(0, 0, 0, 0.5);
    --darker-bg: #181825;
    --muted: #7f849c;
    --card-hover: #3b3b5a;
    --bottom-bg: #11111b;
}

*, *::before, *::after {
    box-sizing: border-box;
    color: var(--text);
}

* {
    margin: 0;
    padding: 0;
}

/* Focus indicators */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Remove default outline for mouse users */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--darker-bg);
    color: var(--accent);
    padding: 8px 16px;
    text-decoration: none;
    z-index: 3000;
    transition: top 0.3s;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

html {
    scrollbar-gutter: stable both-edges;
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: "Segoe UI", "Fira Code", monospace;
    background-color: var(--background);
    color: var(--text);
    min-height: 100vh;
    padding: 80px 20px 100px 20px;
}

.top-bar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    background-color: var(--darker-bg);
    color: var(--text);
    padding: 12px 24px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    box-shadow: 0 2px 4px #7f849c;
    z-index: 2000;
    transition: background 0.3s;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent);
    transition: ease-in 0.2s;
    text-decoration: none;
    z-index: 2001;
    position: relative;
    margin-right: 20px;
}

.logo:hover {
    transform: scale(1.05);
}

.section-nav {
    display: flex;
    gap: 15px;
}

.nav-button {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s, transform 0.2s;
}

.nav-button:hover {
    color: var(--accent);
    transform: scale(1.05);
}

.logo-large {
    font-size: 32px;
}

.main-content {
    transition: transform 0.3s ease;
}

.header-content {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
}

h1 {
    color: var(--accent);
    font-size: 2.5rem;
    margin-bottom: 10px;
    margin-top: 0;
}

.description {
    color: var(--muted);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.links a {
    color: var(--text);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    background-color: var(--surface);
    transition: background-color 0.2s, color 0.2s;
}

.links a:hover {
    background-color: var(--card-hover);
    color: var(--accent);
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1600px;
    margin: 0 auto 60px auto;
    padding: 20px;
}

.image-card {
    background-color: var(--surface);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow);
}

.image-card:hover .thumbnail {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--accent);
}

.thumbnail {
    width: 250px;
    height: 250px;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background-color: var(--darker-bg);
    /* Optimize GIF rendering */
    will-change: transform;
    image-rendering: auto;
}

/* Speed up GIF playback */
img[src$=".gif"], .thumbnail[data-src$=".gif"] {
    contain: layout style paint;
}

.image-info {
    margin-top: 12px;
    text-align: center;
    width: 100%;
}

.filename {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    word-break: break-word;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filename:hover {
    overflow: visible;
    white-space: normal;
}

.metadata {
    font-size: 0.8rem;
    color: var(--muted);
    font-family: "Fira Code", monospace;
}

.section-title {
    text-align: center;
    color: var(--accent);
    font-size: 2rem;
    margin: 40px 0 20px;
    font-weight: 600;
}
.section-title::before,
.section-title::after {
    content: "-";
    margin: 0 10px;
    color: var(--accent);
}

.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 40px 20px;
    font-style: italic;
    font-size: 1.1rem;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-info {
    margin-top: 16px;
    text-align: center;
    color: var(--text);
}

.lightbox-filename {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.lightbox-metadata {
    font-size: 0.9rem;
    color: var(--muted);
    font-family: "Fira Code", monospace;
}

.close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: var(--text);
    font-size: 2rem;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--accent);
}

.no-images {
    text-align: center;
    color: var(--muted);
    font-size: 1.5rem;
    padding: 60px 20px;
}

/* Bottom Bar */
.bottom-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bottom-bg);
    color: var(--text);
    padding: 12px 12px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    box-shadow: none;
    flex-wrap: wrap;
    gap: 8px 16px;
    z-index: 1001;
    transition: background 0.3s;
    text-align: center;
}

.socials {
    display: flex;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 8px 16px;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.socials a {
    color: var(--muted);
    font-size: 20px;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.15s ease;
}

.socials a[href*="youtube"]:hover   { color: #f38ba8; }
.socials a[href*="github"]:hover    { color: #cdd6f4; }
.socials a[href*="itch"]:hover      { color: #fab387; }
.socials a[href*="mastodon"]:hover  { color: #89b4fa; }
.socials a[href*="bsky"]:hover      { color: #89dceb; }
.socials a[href*="matrix"]:hover    { color: #a6e3a1; }
.socials a[href*="mailto"]:hover    { color: #eba0ac; }
.socials a[href*="discord"]:hover   { color: #74c7ec; }

.socials a:hover {
    color: var(--text);
    transform: translateY(-2px);
    text-decoration-line: underline;
}

/* Mobile responsive */
@media (max-width: 768px) {
    body {
        padding: 80px 10px 120px 10px;
    }

    .gallery {
        grid-template-columns: 1fr;
        padding: 10px;
    }


    h1 {
        font-size: 2rem;
    }
  

    .description {
        font-size: 1rem;
    }


    .links {
        flex-direction: column;
        align-items: center;
    }


    .thumbnail {
        width: 100%;
        max-width: 350px;
        height: auto;
        aspect-ratio: 1;
    }


    .bottom-bar {
        padding: 16px 8px;
    }


    .socials {
        gap: 6px 12px;
    }


    .socials a {
        font-size: 16px;
    }

}

@media (min-width: 769px) and (max-width: 1199px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

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



