/* Core Layout resets */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Aptos Serif", Georgia, serif; /* Updated font family */
}

body {
    background-color: #f4f6f9;
    color: #333;
    line-height: 1.6;
}

/* Common Navbar Component */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1e293b;
    padding: 1rem 2rem;
    color: white;
}

.logo {
    font-weight: bold;
    font-size: 1.25rem;
}

/* Turns navbar links into styled buttons */
.nav-links {
    display: flex;
    gap: 0.75rem;
}

.nav-links a {
    color: #94a3b8;
    text-decoration: none;
    padding: 0.5rem 1.2rem;
    font-size: 0.95rem;
    border-radius: 4px;
    background-color: #334155; /* Button background */
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-links a:hover {
    color: white;
    background-color: #475569;
}

.nav-links a.active {
    color: white;
    background-color: #2563eb; /* Distinct color for active button */
    font-weight: 600;
}

/* Layout Container */
.container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Sub-Navigation Tabs (Turns app/project links into buttons) */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
}

.tabs a {
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    color: #475569;
    background-color: #e2e8f0; /* Default tab button gray */
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.tabs a:hover {
    background-color: #cbd5e1;
    color: #0f172a;
}

.tabs a.active {
    color: white;
    background-color: #2563eb; /* Highlighted sub-page button */
    font-weight: 600;
}

/* Content Area Box */
.content-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.app-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    max-width: 350px;
}

.btn {
    display: inline-block;
    background-color: #2563eb;
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    margin-top: 1rem;
    border-radius: 4px;
    font-weight: 500;
}

.btn:hover {
    background-color: #1d4ed8;
}

/* ===========================================/
            Collage of Images 
/* ===========================================*/

.photo-collage {
    display: grid;
    /* Explicitly locks layout to 3 columns, auto-calculating equal fractional width */
    grid-template-columns: repeat(3, 1fr); 
    gap: 1rem;                             /* Keeps standard spacing */
    margin-top: 1rem;
    width: 100%;                           /* Spans full width of the content card container */
}

.collage-item {
    display: block;
    position: relative;
    width: 100%;
    /* Enforces a sharp 4:3 widescreen aspect ratio box on the link card container */
    aspect-ratio: 4 / 3;                   
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.collage-item img {
    /* Locks the image asset strictly to the parents bounding box dimensions */
    width: 100%;
    height: 100%;
    /* Crops/centers image inside the grid element dynamically without distortion */
    object-fit: cover;                     
    display: block;
}

/* Hover effects for actionable images */
.collage-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mobile Responsiveness: Drops down to a stack on narrow viewport layouts */
@media (max-width: 768px) {
    .photo-collage {
        grid-template-columns: 1fr;        /* Single column mode */
    }
    .collage-item {
        aspect-ratio: 16 / 9;              /* Makes preview bars wider on phone displays */
    }
}

/* ========== Header Text ==========

/* Inline alignment container for titles and primary actions */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

/* Strips baseline heading margins to hand layout control to the flex wrapper */
.header-title {
    margin: 0;
}

/* ========== Action Buttons ==========

/* Standardized configuration for header-aligned buttons */
.action-btn {
    margin-top: 0;        /* Overrides any default top margins inherited from .btn */
    white-space: nowrap;  /* Guarantees button text does not break onto two lines */
}

/* Center-alignment wrapper for main contextual assets */
.featured-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 1.5rem;
}

/* Responsive constraints for a centered media block */
.featured-image {
    max-width: 100%;
    height: auto;
    max-height: 450px;   /* Prevents high-res vertical images from blowing out viewport height */
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Responsive rules for narrow viewports (Mobile stack) */
@media (max-width: 600px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start; /* Drops action button vertically below title text */
    }
    
    .action-btn {
        width: 100%;             /* Optimizes mobile tap-targets by spanning full width */
        text-align: center;
    }
}