/* --- Page layout (shared look with the rest of the site) --- */
.astro-main {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.astro-hero {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 2.5rem;
}

.astro-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

.astro-hero h1 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.astro-lead {
    max-width: 640px;
    margin: 0 auto;
    color: var(--secondary-color);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* --- Portfolio masonry --- */
.astro-portfolio {
    columns: 3 300px;
    column-gap: 1.25rem;
}

.astro-card {
    break-inside: avoid;
    margin-bottom: 1.25rem;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.astro-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-color);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.astro-card-img {
    display: block;
    width: 100%;
    height: auto;
    transition: opacity 0.3s ease;
}

.astro-card-caption {
    padding: 0.9rem 1rem;
}

.astro-card-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.astro-card-desc {
    font-size: 0.88rem;
    color: var(--secondary-color);
    line-height: 1.5;
}

.astro-card-subject {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-color);
}

/* --- Lightbox (dark overlay in both themes) --- */
.astro-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(4, 6, 12, 0.92);
    padding: 2rem;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.astro-lightbox.open {
    display: flex;
}

.astro-lightbox-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.astro-lightbox-content img {
    max-width: 100%;
    max-height: 72vh;
    border-radius: 8px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
}

.astro-lightbox-content figcaption {
    padding: 1rem 0.5rem;
}

.astro-lightbox-content h2 {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 500;
    color: #f4f6fb;
    margin-bottom: 0.4rem;
}

.astro-lightbox-content .astro-lightbox-desc {
    color: #cfd6e6;
    line-height: 1.6;
    max-width: 680px;
    margin: 0 auto;
}

.astro-lightbox-meta {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #8aa0c8;
    letter-spacing: 0.05em;
}

.astro-lightbox-close {
    position: fixed;
    top: 1.25rem;
    right: 1.75rem;
    background: none;
    border: none;
    color: #e6e9f2;
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.astro-lightbox-close:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .astro-main {
        width: 94%;
        padding: 1.5rem 0 3rem;
    }

    .astro-portfolio {
        columns: 1;
    }

    .astro-lightbox {
        padding: 1rem;
    }
}