/* --- Base Reset & Typography --- */
html, body {
    background-color: #000000; /* Explicitly lock black background */
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #33ebff;
}

/* --- The Layout Container --- */
.container {
    max-width: 900px;
    margin: 0 auto;    /* Centers the entire site content */
    padding: 40px 80px;
    width: 100%;
    box-sizing: border-box;
}

/* Force titles and navigation to stay in the middle */
h1, nav {
    text-align: center;
    margin-bottom: 30px;
}

nav {
    padding: 20px 0;
    border-bottom: 1px solid #333; /* Darker border to match theme */
}

nav a {
    text-decoration: none;
    color: #007bff;
    font-weight: bold;
    margin: 0 15px;
}

/* --- Homepage Gallery Grid --- */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 320px));
    gap: 30px;
    justify-content: center; /* This is the "Anti-Skew" command */
    margin-top: 40px;
}

.thumb-card {
    background: #1a1a1a; /* Dark gray cards so the whole page doesn't feel white */
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s;
    border: 1px solid #333;
}

.thumb-card:hover {
    transform: translateY(-5px);
}

.thumb-card a {
    text-decoration: none;
    color: inherit;
}

.thumb-card img {
    width: 100%;
    aspect-ratio: 1 / 1; /* Uniform thumbnail sizes */
    object-fit: cover;
    display: block;
}

.thumb-card h3 {
    margin: 15px;
    font-size: 1.1rem;
    color: #33ebff;
}

/* --- Project Page Layout --- */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    justify-content: center;
}

.gallery-item img {
    width: 100%;
    border-radius: 5px;
    border: 1px solid #333;
}

/* --- Mobile Fixes --- */
@media (max-width: 480px) {
    .container {
        padding: 20px 50px;
    }
    .gallery {
        grid-template-columns: 1fr;
    }
}