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

body {
    background: #0f0f0f;
    color: #e6e6e6;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
    padding-bottom: 50px;
}

/* GLOBAL LINK STYLING */
a {
    color: #ff75d9;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #ff9ae6;
    text-decoration: underline;
}

a:visited {
    color: #ff75d9;
}

/* HEADER */
header {
    text-align: center;
    padding: 40px 20px 10px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: 1px;
}

/* NAVIGATION */
nav {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: #bfbfbf;
    font-size: 1.1rem;
    padding-bottom: 5px;
    transition: color 0.2s ease;
}

nav a:hover,
nav a.active {
    color: #ffffff;
    border-bottom: 2px solid #ffffff;
}

/* GRID LAYOUT */
.grid {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;

    /* Responsive, centered, tiles grow when space allows */
    grid-template-columns: repeat(auto-fit, minmax(320px, 500px));

    gap: 30px;
    justify-content: center;   /* centers the whole grid */
    justify-items: center;     /* centers each tile */
}

/* TILE */
.tile {
    background: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;

    width: 100%;               /* tile fills its grid cell */
    text-decoration: none;
    color: white;

    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tile:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

/* TILE IMAGE */
.tile-image {
    width: 100%;
    height: 280px;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.tile:hover .tile-image {
    transform: scale(1.08);
}

/* TILE TITLE */
.tile-title {
    padding: 15px;
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
}

/* MOBILE IMPROVEMENTS */
@media (max-width: 600px) {
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(90%, 1fr));
    }

    .tile-image {
        height: 240px; /* taller images on mobile */
    }
}