/* === Reset and Base === */
body {
    background-color: #1e1e1e;
    color: #d0d0d0;
    font-family: sans-serif;
    margin: 0;
    padding: 0;
}

nav {
    background-color: #2c2c2c;
    padding: 15px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav a {
    color: #4ecdc4;
    margin: 0 20px;
    text-decoration: none;
    font-weight: bold;
}

nav a:hover {
    text-decoration: underline;
}

/* === Layout === */
main {
    margin: 40px auto;
    padding: 0 20px;
    max-width: 100%; /* Allow the main content to fill out the entire width */
}

h1, h2 {
    color: #ffffff;
    text-align: center;
}

p {
    line-height: 1.6;
}

/* === Universal Image Styling === */
img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.framed {
    background-color: #111;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.75);
}

/* === Grid Thumbnail Layout (Regular Posts) === */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Allow grid items to fill space */
    gap: 20px; /* Slightly reduced gap between items */
    margin: 20px auto 60px; /* top | left/right | bottom */
    padding: 0 20px;
}

.grid-item {
    text-align: center;
}

.grid-item a {
    text-decoration: none;
    color: inherit;
}

.grid-item img {
    transition: transform 0.3s ease;
}

.grid-item img:hover {
    transform: scale(1.05);  /* Slightly increase the image size on hover */
}

.grid-item p {
    margin-top: 10px;
    font-size: 1rem;
    color: #aaa;
}

/* === Pagination Links === */
.pagination {
    text-align: center;
    margin-top: 40px;
}

.pagination a {
    color: #4ecdc4;
    text-decoration: none;
    font-weight: bold;
    padding: 0 10px;
}

.pagination a:hover {
    text-decoration: underline;
}

/* === Footer === */
footer {
    text-align: center;
    color: #666;
    margin: 40px 0;
}

/* === Responsive Tweaks === */
@media (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(2, 1fr); /* 2 items per row on smaller screens */
    }
}

@media (max-width: 600px) {
    .grid {
        grid-template-columns: 1fr; /* 1 item per row on mobile */
    }
}

/* === Featured Projects Section === */
.featured-projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Keeps grid responsive */
    gap: 30px;
    margin: 60px auto 40px;
    max-width: 1200px;
    padding: 0 20px;
}

.featured-item {
    text-align: center;
}

.featured-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 2000 / 1125; /* Set the desired aspect ratio of 2000x1125 */
    object-fit: cover; /* Ensures the image covers the area properly */
    border-radius: 4px;
    transition: transform 0.2s ease;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
}

.featured-item img:hover {
    transform: scale(1.04); /* Slight zoom effect on hover */
}

.featured-item p {
    margin-top: 10px;
    font-size: 1rem;
    color: #ddd;
    font-weight: bold;
}

.section-hint {
    text-align: center;
    max-width: 900px;
    margin: 0.5rem auto 1.5rem;
    color: #999;
    font-size: 0.95rem;
}

/* === Desktop Adjustments === */
@media (min-width: 1024px) {
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); /* Increase the column size for larger images */
        gap: 15px;  /* Smaller gap between images */
    }

    .grid-item img {
        height: auto; /* Allow images to expand to their natural height */
        object-fit: cover;  /* Maintain the aspect ratio and fill the space */
    }
}

/* === Scroll Indicator === */
#scroll-indicator {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.4s ease;
    z-index: 100;
}

#scroll-indicator.hidden {
    opacity: 0;
}

#scroll-indicator svg {
    width: 42px;
    height: 42px;
    color: #4ecdc4;
    opacity: 0.9;
    animation: scroll-bounce 1.6s ease-in-out infinite;
    filter: drop-shadow(0 0 4px rgba(78, 205, 196, 0.4));
}

@keyframes scroll-bounce {
    0%, 100% { transform: translateY(0);   }
    50%       { transform: translateY(6px); }
}