:root {
    --bg-deep-blue: #0b2a4a;
    --accent-ice: #e0f2fe;
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --hairline: rgba(255, 255, 255, 0.1);
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-deep-blue);
    color: var(--text-main);
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ---------- Header ---------- */
.site-header { padding: 4.5rem 0 3.5rem 0; text-align: center; }
.logo { width: 180px; height: auto; margin-bottom: 1.8rem; }
.tagline {
    font-size: 1.1rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 2px; color: var(--accent-ice); margin: 1rem 0 0 0;
}

/* ---------- Photo feed ---------- */
.feed { width: 100%; display: flex; flex-direction: column; align-items: center; }

.potd-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Scroll reveal is a JS enhancement only — content is always visible without it */
.js .potd-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.js .potd-section.fade-in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    .js .potd-section { opacity: 1; transform: none; transition: none; }
}

.image-link { width: 100%; display: flex; justify-content: center; }
.image-wrapper { width: 100%; display: flex; justify-content: center; padding: 0 5% 3.5rem 5%; margin: 0; }

.daily-image, .image-wrapper picture {
    max-width: 100%;
    display: flex;
    justify-content: center;
}
.daily-image {
    max-height: 80vh; width: auto; height: auto; display: block;
    object-fit: contain;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
    border-radius: 4px;
    transition: transform 0.4s ease;
}
a.image-link:hover .daily-image,
a.image-link:focus-visible .daily-image { transform: scale(1.008); }

.content { width: 90%; max-width: 700px; padding: 2.5rem 0 2rem 0; text-align: left; }

.date-label {
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px;
    color: var(--accent-ice); margin-bottom: 1.2rem; display: block;
}

.photo-title {
    font-size: clamp(1.8rem, 6vw, 3rem);
    margin: 0 0 1.5rem 0; line-height: 1.1; font-weight: 700;
}
.photo-title a { color: inherit; text-decoration: none; }
.photo-title a:hover, .photo-title a:focus-visible { color: var(--accent-ice); }

.description {
    font-size: 1.15rem; line-height: 1.8; font-weight: 300;
    margin-bottom: 2rem; color: rgba(255, 255, 255, 0.9);
}
.description p { margin: 0 0 1em 0; }

.meta-item {
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-muted); border-top: 1px solid var(--hairline);
    padding-top: 1.5rem; display: flex; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap; width: 100%;
}
.meta-item strong { color: var(--text-main); margin-left: 5px; }

.permalink-arrow { color: var(--accent-ice); text-decoration: none; white-space: nowrap; }
.permalink-arrow:hover, .permalink-arrow:focus-visible { text-decoration: underline; }

/* ---------- Pager / load more ---------- */
.pager { width: 90%; max-width: 700px; text-align: center; padding: 2rem 0 1rem 0; }
.load-more {
    display: inline-block;
    padding: 0.9rem 2.4rem;
    border: 1px solid var(--accent-ice);
    border-radius: 999px;
    color: var(--accent-ice);
    text-decoration: none;
    font-size: 0.85rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 2px;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.load-more:hover, .load-more:focus-visible { background-color: var(--accent-ice); color: var(--bg-deep-blue); }
.load-more[aria-busy="true"] { opacity: 0.5; pointer-events: none; }

.pager-links { display: flex; justify-content: space-between; margin-top: 2rem; }
.pager-links a {
    color: var(--text-muted); text-decoration: none;
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px;
}
.pager-links a:hover, .pager-links a:focus-visible { color: var(--accent-ice); }
.js .pager-links { display: none; } /* redundant when load-more works */

/* ---------- Photo page navigation ---------- */
.photo-nav { width: 90%; max-width: 700px; padding-top: 1rem; }
.photo-nav-inner { display: flex; justify-content: space-between; gap: 2rem; border-top: 1px solid var(--hairline); padding-top: 2rem; }
.photo-nav-link { text-decoration: none; max-width: 45%; }
.photo-nav-link.nav-right { text-align: right; }
.nav-hint {
    display: block; font-size: 0.75rem; text-transform: uppercase;
    letter-spacing: 2px; color: var(--text-muted); margin-bottom: 0.5rem;
}
.nav-title { color: var(--accent-ice); font-size: 0.95rem; line-height: 1.5; }
.photo-nav-link:hover .nav-title, .photo-nav-link:focus-visible .nav-title { text-decoration: underline; }

.back-home { text-align: center; margin: 3rem 0 0 0; }
.back-home a {
    color: var(--text-muted); text-decoration: none;
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px;
}
.back-home a:hover, .back-home a:focus-visible { color: var(--accent-ice); }

/* ---------- Tags ---------- */
.tag-cloud {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-wrap: wrap; gap: 0.6rem;
}
.tag-cloud-inline { margin-top: 1.5rem; }
.tag-chip {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    color: var(--accent-ice); text-decoration: none;
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1.5px;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}
.tag-chip:hover, .tag-chip:focus-visible {
    border-color: var(--accent-ice);
    background-color: rgba(224, 242, 254, 0.08);
}
.tag-count { color: var(--text-muted); font-size: 0.7rem; }

.archive-header { width: 90%; max-width: 700px; padding-bottom: 1rem; }
.archive-header .photo-title { margin-bottom: 0.5rem; }
.archive-count { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.archive-count a { color: var(--accent-ice); text-decoration: none; }
.archive-count a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { width: 90%; max-width: 700px; padding: 3.5rem 0 8rem 0; border-top: 1px solid var(--hairline); margin-top: 4rem; }
.footer-note p { font-size: 0.95rem; line-height: 1.8; color: var(--text-muted); font-weight: 300; }
.footer-link { color: var(--accent-ice); }
.alpha-tag { font-size: 0.75rem; color: var(--text-muted); margin-top: 2rem; font-style: italic; }

/* ---------- Focus visibility ---------- */
a:focus-visible { outline: 2px solid var(--accent-ice); outline-offset: 3px; }

@media (min-width: 768px) { .logo { width: 220px; } }

/* ---------- Footer nav (pages) ---------- */
.footer-nav { margin: 1.5rem 0 0 0; font-size: 0.9rem; line-height: 1.8; }
.footer-nav .footer-link { margin: 0 0.15rem; }

/* ---------- Regular pages (About, etc.) ---------- */
.page-content { padding-top: 1rem; }
.page-body img {
    max-width: 100%; height: auto; border-radius: 4px;
    margin: 1.5rem 0; display: block;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35);
}
.page-body h2, .page-body h3 { margin-top: 2rem; color: var(--text-main); }
.page-body a { color: var(--accent-ice); }
.page-body em { font-style: italic; }
