body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background-color: #1e1e1e;
    color: #f0f0f0;
}

header {
    text-align: center;
    padding: 2rem;
    background-color: #2c2c2c;
}

.subtitle {
    font-style: italic;
    color: #a0a0a0;
}

.image-link {
    display: block;
    margin: 0 auto;
    width: fit-content;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    padding: 2rem;
}

.image-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #444;
    border-radius: 8px;
    cursor: pointer;
}

.image-card img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.image-card:hover img {
    transform: scale(1.05);
}

.image-card:hover .caption {
    opacity: 0;
}

.image-card {
    aspect-ratio: 1 / 1; /* Forces square thumbnails */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills the square without distortion */
    border-radius: 8px;
}

.caption {
    position: absolute;
    bottom: 0;
    background: rgba(30, 30, 30, 0.8);
    color: #f0f0f0;
    width: 100%;
    padding: 0.5rem;
    font-size: 0.9rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);
    text-align: center;
    padding-top: 60px;
}

.modal img {
    max-width: 80%;
    height: auto;
    border: 2px solid #fff;
}

.modal img {
    max-width: 90vw;   /* Limits image width to 90% of viewport */
    max-height: 80vh;  /* Limits image height to 80% of viewport */
    height: auto;
    width: auto;
    border: 2px solid #fff;
    object-fit: contain; /* Ensures full image is visible */
}

.modal .close {
    position: absolute;
    top: 20px; right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
}

#modal-caption {
color: #ccc;
margin-top: 10px;
font-style: italic;
}

a:link {
    color: #80cbc4;
    text-decoration: none;
}

a:visited {
    color: #80cbc4;
}

footer {
    text-align: center;
    padding: 1rem;
    background-color: #2c2c2c;
    font-size: 0.8rem;
    color: #888;
}
