/* ---- Astronomy section styles — extends css/style.css palette ----
   bg #242325 · panel #333236 · border #4a4950 · text #e0ddd5 · accent #d4a76a */

body.astro {
    background: #242325;
    color: #e0ddd5;
    font-family: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 40px 20px 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container-wide {
    max-width: 1080px;
    width: 100%;
}

/* ---- page head / nav ---- */
.page-head { text-align: center; margin-bottom: 28px; }
.page-head h1 {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 2rem;
    font-weight: 700;
    color: #e0ddd5;
    margin-bottom: 6px;
}
.page-head h1 em { color: #d4a76a; font-style: normal; }
.page-head .sub { color: #9b968c; font-size: 0.95rem; }

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 22px;
    margin: 18px 0 8px;
    font-size: 1.02rem;
}
.site-nav a { color: #c9c3b8; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #d4a76a; }

.year-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 14px 0 30px;
}
.year-chips a {
    display: inline-block;
    padding: 4px 14px;
    border: 1px solid #4a4950;
    border-radius: 999px;
    color: #c9c3b8;
    text-decoration: none;
    font-size: 0.9rem;
}
.year-chips a:hover { color: #d4a76a; border-color: #d4a76a; }
.year-chips a[aria-current="page"] {
    color: #242325;
    background: #d4a76a;
    border-color: #d4a76a;
    font-weight: 600;
}

/* ---- photo gallery grid ---- */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
    margin-top: 10px;
}
.gallery figure {
    margin: 0;
    background: #333236;
    border: 1px solid #4a4950;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.gallery figure:hover { transform: translateY(-3px); border-color: #d4a76a; }
.gallery a { display: block; }
.gallery img {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: #101012;
}
.gallery figcaption {
    padding: 8px 10px;
    font-size: 0.74rem;
    color: #9b968c;
    word-break: break-word;
    text-align: center;
}
.gallery figcaption a { color: #9b968c; }
.gallery figcaption a:hover { color: #d4a76a; }

/* ---- prose pages (projects, write-ups) ---- */
.prose { max-width: 760px; margin: 0 auto; line-height: 1.65; }
.prose h2 {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1.4rem;
    color: #d4a76a;
    margin: 34px 0 12px;
}
.prose h3 { font-size: 1.12rem; color: #e0ddd5; margin: 24px 0 8px; }
.prose p, .prose ul, .prose ol { margin-bottom: 14px; }
.prose a { color: #d4a76a; }
.prose img, .prose figure {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #4a4950;
}
.prose figure { margin: 18px 0; }
.prose figure img { display: block; width: 100%; }
.prose figcaption {
    font-size: 0.85rem;
    color: #9b968c;
    padding-top: 8px;
    text-align: center;
}
.prose table { border-collapse: collapse; margin: 0 auto 18px; }
.prose td, .prose th { border: 1px solid #4a4950; padding: 6px 12px; text-align: center; }
.prose th { background: #333236; }

/* ---- project area cards ---- */
.project-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin: 22px 0 34px;
}
.pcard {
    display: block;
    background: #333236;
    border: 1px solid #4a4950;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.pcard:hover { transform: translateY(-3px); border-color: #d4a76a; }
.pcard img {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: #101012;
}
.pcard span {
    display: block;
    padding: 10px;
    text-align: center;
    font-size: 0.92rem;
    color: #c9c3b8;
}
.pcard:hover span { color: #d4a76a; }
.pcard[aria-current="page"] { border-color: #d4a76a; }
.pcard[aria-current="page"] span { color: #d4a76a; font-weight: 600; }

/* ---- archive (astronomy/images) extras ---- */
.gallery figure { position: relative; }
.gallery .badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
    background: rgba(16, 16, 18, 0.8);
    color: #d4a76a;
    border: 1px solid #d4a76a;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
}
.gallery a.nophoto, .nophoto {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 150px;
    color: #6b665e;
    font-size: 0.85rem;
    text-decoration: none;
    text-align: center;
    line-height: 1.6;
}
.folder-sub, .vid-note, .back { text-align: center; color: #9b968c; font-size: 0.9rem; }
.folder-sub { margin-bottom: 22px; }
.vid-note { margin-top: 26px; font-size: 0.8rem; }
.back { margin-top: 8px; }
.back a { color: #d4a76a; }

/* ---- footer ---- */
.site-footer {
    margin-top: 48px;
    padding-top: 18px;
    border-top: 1px solid #3a3940;
    color: #7d786f;
    font-size: 0.85rem;
    text-align: center;
}
.site-footer a { color: #9b968c; text-decoration: none; }
.site-footer a:hover { color: #d4a76a; }

@media (max-width: 480px) {
    body.astro { padding: 24px 12px 40px; }
    .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .page-head h1 { font-size: 1.5rem; }
}
