﻿:root {
    --bg: #0f1115;
    --card: #181b22;
    --text: #e6e6e6;
    --muted: #9aa0aa;
    --accent: #4da3ff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #222;
}

    header h1 {
        font-size: 6rem;
        font-weight: 300;
        color: var(--accent);
    }

        header h1 a {
            text-decoration: none;
            /*color: #138e13;*/
        }

    header p {
        color: var(--muted);
        margin-top: 0.25rem;
        font-size: 0.9rem;
    }

.gallery {
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(25vw, 1fr));
    gap: 1rem;
}

article {
    background: var(--card);
    border-radius: 12px;
    overflow: hidden;
    /* cursor: pointer; */
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    padding: 1rem;
}

    article:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    }

        article:hover .post-card-excerpt {
            color: #fff;
        }

    article img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        aspect-ratio: 4 / 3;
    }

    article h3 {
        color: var(--accent);
    }

/* Tag styling: small pill-like badge */
.tag {
    display: inline-block;
    background: rgba(77,163,255,0.08);
    color: var(--accent);
    border: 1px solid rgba(77,163,255,0.14);
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    line-height: 1;
    margin-right: 0.5rem;
    vertical-align: middle;
    font-variant-caps: small-caps;
}

    .tag a {
        color: var(--accent);
        text-decoration: none;
        display: inline-block;
        padding: 0;
    }

        .tag a:hover {
            text-decoration: underline;
        }

/* Excerpt styling: muted, limited to ~3 lines with ellipsis */
.post-card-excerpt {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0.5rem 1rem 1rem .25rem;
    line-height: 1.35;
    max-height: calc(1.35rem * 3); /* approx 3 lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

article header {
    padding: 0;
    border-bottom: none;
    margin-bottom: .5rem;
}

article footer {
    padding: 0;
    text-align: left;
}

article header {
    color: var(--muted);
}

article a {
    text-decoration: none;
}

article.featured {
    margin: 0 2rem;
}

article .hero-image {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-color: #888;
    height: 20rem;
    width: 100%;
    border-radius: 1rem;
}

article.featured .hero-image {
    height: 10rem;
    float: left;
    width: 10rem;
    margin-right: 2rem;
}

article.featured h2 {
    font-size: smaller;
    margin-bottom: .5rem;
    color: var(--accent);
}

    article.featured h2 span {
        float: right;
        font-size: small;
        cursor: help;
        color: var(--accent);
    }

.post-card-byline-content {
    display: flex;
    flex-direction: column;
}

footer {
    padding: 1.5rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
}

    footer a {
        color: var(--accent);
    }

/* Mobile media query placeholder */
@media (max-width: 600px) {
    /* Add mobile-specific styles here */
    header h1 {
        font-size: 2rem;
        font-weight: 300;
        text-align: center;
    }

    article {
        margin-bottom: 1rem;
    }

        article .hero-image {
            height: 10rem;
        }

    .gallery {
        padding: 0 .5rem;
        display: flex;
        flex-direction: column;
    }
}

/* Navbar / pagination at top of gallery */
.nav-bar {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 2rem;
    align-items: center;
    justify-content: space-between;
}

    .nav-bar a {
        color: var(--accent);
        background: rgba(77,163,255,0.06);
        border: 1px solid rgba(77,163,255,0.12);
        padding: 0.4rem 0.75rem;
        border-radius: 8px;
        text-decoration: none;
        font-weight: 600;
        font-size: 0.95rem;
    }

    .nav-bar span {
        color: var(--accent);
        background: rgba(77,163,255,0.06);
        border: 1px solid rgba(77,163,255,0.12);
        padding: 0.4rem 0.75rem;
        border-radius: 8px;
        text-decoration: none;
        font-weight: 600;
        font-size: 0.95rem;
    }

    .nav-bar a:hover {
        background: rgba(77,163,255,0.10);
    }

    .nav-bar .disabled {
        opacity: 0.45;
        pointer-events: none;
    }

.gallery.list {
    display: flex;
    flex-direction: column
}

.slim a {
    text-decoration: none;
    font-weight: normal;
    color: var(--accent);
}

.post-feed {
    margin: 0 3rem;
}

    .post-feed li {
        margin-bottom: .25rem;
    }

    .post-feed a {
        color: var(--accent);
    }

.calendar {
    border-collapse: collapse;
    margin: 1.25rem 2rem;
    color: #e6eef8;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

    .calendar th,
    .calendar td {
        padding: 0.5rem 0.6rem;
        border: 1px solid rgba(255, 255, 255, 0.04);
        vertical-align: top;
    }

    .calendar thead th {
        font-weight: 600;
        color: #cfe3ff;
        background: var(--card);
        font-size: 0.9rem;
    }

        .calendar thead th h2 {
            margin: 0;
            font-size: 1.15rem;
            font-weight: 600;
        }

    .calendar a {
        color: var(--accent);
        text-decoration: none;
    }

    .calendar td.day, .calendar td.month {
        height: 6.25rem;
        /*min-width: 9rem;*/
        position: relative;
    }

        .calendar td.day div, .calendar td.month div {
            position: relative;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
        }

    .calendar .date {
        position: absolute;
        top: .1rem;
        left: .1rem;
        /*        display: block;
        font-weight: 700;
        margin-bottom: 0.35rem;
        color: #ffffff;
        font-size: 0.95rem;*/
    }

    .calendar td.day a {
        /*position: absolute;*/
        /*bottom: 0.45rem;*/
        /*right: 0.5rem;*/
        padding: 0.15rem 0.35rem;
        font-size: 0.9rem;
    }

    .calendar td.subdued {
        opacity: 0.55;
        color: #9aa7b2;
        background: transparent;
    }


.gallery.year .calendar {
    width: 33%;
    margin: 0 auto;
}

/* Compact layout for small screens */
@media (max-width: 680px) {
    .calendar thead:first-of-type {
        display: none;
    }

    .calendar thead th {
        font-size: 0.75rem;
    }

    .calendar td.day {
        height: 4.25rem;
        min-width: 0;
    }

        .calendar td.day > a {
            bottom: 0.35rem;
            right: 0.35rem;
            padding: 0.1rem 0.25rem;
        }
}

.top-10 {
    display: flex;
    flex-direction: row;
    margin-bottom: 1rem;
}

    .top-10 > div {
        flex: 1;
    }

    .top-10 a {
        text-decoration: none;
        color: var(--accent);
    }

    .top-10 .top-10-body > div, .top-10 .top-10-header {
        display: flex;
        flex-direction: row;
    }

        .top-10 .top-10-body > div > div, .top-10 .top-10-header > div {
            flex: 1;
            padding: 0.25rem 0.5rem;
        }
