/* ============================================================
   uoAvox — shared site chrome (medieval dark theme)
   ============================================================ */

:root {
    --bg: #141210;
    --bg-2: #1b1815;
    --surface: #201c18;
    --surface-2: #2a251f;
    --border: #3a332a;
    --border-2: #4d4436;
    --text: #d8d2c4;
    --text-2: #a89e8c;
    --text-3: #6f6858;
    --gold: #c9a34a;
    --gold-2: #a8852f;
    --blood: #8e2a2a;
    --steel: #6f7f8a;
    --font-display: 'Cinzel', 'Times New Roman', serif;
    --font-body: 'EB Garamond', Georgia, serif;
    --font-mono: 'JetBrains Mono', Consolas, monospace;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--gold);
    text-decoration: none;
}

    a:hover {
        color: #e0c170;
    }

img {
    max-width: 100%;
    display: block;
}

/* ---------- Top chrome (logo > divider > nav) ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg, #1a1714 0%, #141210 100%);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.6);
}

.header-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.brand-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}

.brand-name {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--text);
    text-transform: uppercase;
    line-height: 1;
}

    .brand-name em {
        font-style: normal;
        color: var(--gold);
    }

.brand-sub {
    display: block;
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.14em;
    color: var(--gold);
    text-transform: none;
    margin-top: 4px;
    text-shadow: 0 0 10px rgba(201, 163, 74, 0.3);
}

/* ---------- Graphical divider (ornamental) ---------- */

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    max-width: 1120px;
    margin: 28px auto;
    padding: 0 24px;
    user-select: none;
}

    .divider::before,
    .divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: linear-gradient(90deg, transparent 0%, var(--border-2) 50%, transparent 100%);
    }

    .divider .ornament {
        font-size: 22px;
        color: var(--gold);
        line-height: 1;
        text-shadow: 0 0 8px rgba(201, 163, 74, 0.35);
        flex-shrink: 0;
    }

        .divider .ornament::before {
            content: '❖';
        }

/* ---------- Nav ---------- */

.site-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-right: 49px;
}

    .site-nav a {
        font-family: var(--font-display);
        font-size: 14px;
        font-weight: 600;
        letter-spacing: 0.18em;
        text-transform: uppercase;
        color: var(--text-2);
        padding: 8px 8px;
        position: relative;
        transition: color 0.18s ease;
    }

        .site-nav a::after {
            content: '';
            position: absolute;
            left: 8px;
            right: 8px;
            bottom: 2px;
            height: 1px;
            background: var(--gold);
            transform: scaleX(0);
            transform-origin: center;
            transition: transform 0.25s ease;
        }

        .site-nav a:hover {
            color: var(--text);
        }

            .site-nav a:hover::after {
                transform: scaleX(1);
            }

        .site-nav a[aria-current="page"] {
            color: var(--gold);
        }

            .site-nav a[aria-current="page"]::after {
                transform: scaleX(1);
            }

    .site-nav .nav-sep {
        color: var(--text-3);
        font-size: 12px;
        user-select: none;
    }

    .site-nav a:not([href]) {
        cursor: default;
    }

/* ---------- Nav dropdown (Resources) ---------- */

.nav-dropdown {
    position: relative;
}

.site-nav .nav-drop-toggle {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-2);
    background: none;
    border: 0;
    padding: 8px 8px;
    cursor: pointer;
    transition: color 0.18s ease;
}

    .site-nav .nav-drop-toggle::after {
        content: '\25BE';
        margin-left: 8px;
        font-size: 12px;
    }

    .site-nav .nav-drop-toggle:hover,
    .site-nav .nav-drop-toggle:focus-visible,
    .nav-dropdown.is-open .nav-drop-toggle {
        color: var(--text);
    }

.nav-drop-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 170px;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: #141210;
    border: 1px solid var(--border);
    box-shadow: 0 6px 18px rgba(0,0,0,0.6);
    z-index: 110;
}

    .nav-drop-menu li {
        margin: 0;
    }

    .nav-drop-menu a,
    .site-nav .nav-drop-menu a {
        display: block;
        white-space: nowrap;
        font-size: 13px;
    }

        .nav-drop-menu a:not([href]) {
            cursor: default;
        }

    .nav-drop-menu .nav-drop-divider {
        height: 1px;
        margin: 6px 12px;
        background: var(--border-2);
    }

    .nav-drop-menu .nav-sub {
        position: relative;
    }

    .nav-sub-menu {
        display: none;
        position: absolute;
        top: -7px;
        left: 100%;
        min-width: 140px;
        margin: 0;
        padding: 6px 0;
        list-style: none;
        background: #141210;
        border: 1px solid var(--border);
        box-shadow: 0 6px 18px rgba(0,0,0,0.6);
        z-index: 120;
    }

        .nav-sub-menu li {
            margin: 0;
        }

        .nav-sub-menu a {
            display: block;
            white-space: nowrap;
        }

    .site-nav .nav-sub-menu a {
        font-size: 13px;
    }

    .site-nav .nav-sub-toggle::after {
        content: '\25B8';
        position: static;
        display: inline;
        height: auto;
        background: none;
        transform: none;
        margin-left: 8px;
        font-size: 11px;
    }

    .nav-sub.is-open > .nav-sub-menu {
        display: block;
    }

@media (hover: hover) {
    .nav-sub:hover > .nav-sub-menu {
        display: block;
    }
}

.nav-dropdown.is-open .nav-drop-menu {
    display: block;
}

@media (hover: hover) {
    .nav-dropdown:hover .nav-drop-menu {
        display: block;
    }
}

/* ---------- Banner (home) ---------- */

.banner {
    position: relative;
    max-width: 1120px;
    margin: 0 auto;
    padding: 40px 32px 40px;
    text-align: center;
    overflow: hidden;
    border: 1px solid var(--border);
    background: radial-gradient(ellipse at center top, rgba(201,163,74,0.06), transparent 60%), var(--bg-2);
}

    .banner::before,
    .banner::after {
        content: '';
        position: absolute;
        left: 12px;
        right: 12px;
        height: 1px;
        background: linear-gradient(90deg, transparent, var(--border-2), transparent);
    }

    .banner::before {
        top: 8px;
    }

    .banner::after {
        bottom: 8px;
    }

.banner-corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border: 1px solid var(--gold);
    opacity: 0.55;
}

    .banner-corner.tl {
        top: 10px;
        left: 10px;
        border-right: none;
        border-bottom: none;
    }

    .banner-corner.tr {
        top: 10px;
        right: 10px;
        border-left: none;
        border-bottom: none;
    }

    .banner-corner.bl {
        bottom: 10px;
        left: 10px;
        border-right: none;
        border-top: none;
    }

    .banner-corner.br {
        bottom: 10px;
        right: 10px;
        border-left: none;
        border-top: none;
    }

.banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.45;
    pointer-events: none;
}

.banner-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.banner-eyebrow {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 2px 8px rgba(0,0,0,0.7);
}

    .banner-eyebrow a {
        color: var(--gold);
        text-decoration: none;
    }

.banner h1 {
    font-family: var(--font-display);
    font-size: clamp(30px, 5vw, 46px);
    font-weight: 700;
    line-height: 1.08;
    margin: 0;
    color: var(--text);
    letter-spacing: 0.04em;
    text-shadow: 0 1px 4px rgba(0,0,0,0.9), 0 3px 12px rgba(0,0,0,0.75);
}

    .banner h1 em {
        font-style: normal;
        color: var(--gold);
    }

.banner p {
    font-size: 22px;
    color: var(--text);
    max-width: 80ch;
    margin: 0 auto;
    text-shadow: 0 1px 3px rgba(0,0,0,0.85), 0 2px 8px rgba(0,0,0,0.6);
}

.banner-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border: 1px solid var(--border-2);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: all 0.18s ease;
}

    .btn:hover {
        background: var(--surface-2);
        border-color: var(--gold);
        color: var(--gold);
    }

    .btn.primary {
        background: linear-gradient(180deg, #d4b15c 0%, #a8852f 100%);
        color: #1a1510;
        border-color: #d4b15c;
        font-weight: 700;
    }

        .btn.primary:hover {
            background: linear-gradient(180deg, #e0c170 0%, #b89338 100%);
            color: #1a1510;
        }

/* ---------- Blog (thumbnail left, text right) ---------- */

.blog-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 8px 0 80px;
}

.blog-heading {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text);
    margin: 8px 0 28px;
    display: flex;
    align-items: center;
    gap: 14px;
}

    .blog-heading .rule {
        flex: 1;
        height: 1px;
        background: linear-gradient(90deg, var(--border-2), transparent);
    }

.blog-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 21px 22px;
    margin-bottom: 22px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

    .blog-card:hover {
        border-color: var(--gold-2);
        transform: translateY(-2px);
    }

.blog-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 1px solid var(--border-2);
    background: var(--bg-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
    font-family: var(--font-display);
    font-size: 14px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

    .blog-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.blog-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.blog-meta {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 8px;
}

    .blog-meta .meta-sep {
        color: var(--text-2);
        margin: 0 2px;
    }

    .blog-meta .blog-author {
        color: #228B22; /* forest green */
    }

.blog-entry-divider {
    width: 100%;
    height: 1px;
    flex-shrink: 0;
    margin: 0 0 15px;
    border: 0;
    background: var(--border-2);
}

.blog-title {
    font-family: var(--font-display);
    font-size: 25px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
    margin: 0 0 10px;
}

    .blog-title a {
        color: inherit;
    }

        .blog-title a:hover {
            color: var(--gold);
        }

.blog-excerpt {
    font-size: 23px;
    color: var(--text-2);
    margin: 0 0 16px;
    line-height: 1.65;
    white-space: pre-line;
}

.blog-excerpt > p { margin: 0; }
.blog-excerpt > p + p { margin-top: 0.5lh; }

.blog-link {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .blog-link .arrow {
        transition: transform 0.18s ease;
    }

    .blog-link:hover .arrow {
        transform: translateX(4px);
    }

/* ---------- GitHub mirror ---------- */

.gh-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 8px 24px 80px;
}

.gh-intro {
    color: var(--text-2);
    max-width: 72ch;
    margin: 0 0 32px;
    font-size: 22px;
}

    .gh-intro code {
        font-family: var(--font-mono);
        font-size: 15px;
        color: var(--gold);
    }

.gh-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.gh-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.18s ease, transform 0.18s ease;
}

    .gh-card:hover {
        border-color: var(--gold-2);
        transform: translateY(-2px);
    }

.gh-name {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .gh-name .lang-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: var(--gold);
        flex-shrink: 0;
    }

    .gh-name a {
        color: inherit;
    }

        .gh-name a:hover {
            color: var(--gold);
        }

.gh-desc {
    font-size: 17px;
    color: var(--text-2);
    line-height: 1.55;
    min-height: 2.7em;
}

.gh-meta {
    font-family: var(--font-mono);
    font-size: 16px;
    color: var(--text-3);
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: auto;
}

    .gh-meta span {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

.gh-status {
    font-family: var(--font-mono);
    font-size: 15px;
    color: var(--text-2);
    padding: 16px;
    border: 1px dashed var(--border-2);
    background: var(--bg-2);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

    .gh-status .spinner {
        width: 14px;
        height: 14px;
        border: 2px solid var(--border-2);
        border-top-color: var(--gold);
        border-radius: 50%;
        animation: spin 0.9s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- Footer ---------- */

.site-footer {
    border-top: 1px solid var(--border);
    background: #0f0d0b;
    padding: 32px 24px;
    text-align: center;
    color: var(--text-3);
    font-size: 22px;
}

    .site-footer .ornament {
        color: var(--gold);
        opacity: 0.6;
        font-size: 26px;
        display: block;
        margin-bottom: 10px;
    }

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
    .header-inner {
        padding: 10px 16px;
        gap: 12px;
    }

    .brand-logo {
        width: 44px;
        height: 44px;
    }

    .brand-name {
        font-size: 18px;
    }

    .site-nav a {
        padding: 6px 8px;
        font-size: 12px;
        letter-spacing: 0.12em;
    }

    .site-nav .nav-drop-toggle {
        padding: 6px 8px;
        font-size: 12px;
        letter-spacing: 0.12em;
    }

    .nav-drop-menu {
        min-width: 130px;
    }

    .banner {
        padding: 36px 20px;
    }

        .banner p {
            font-size: 17px;
        }

    .blog-card {
        grid-template-columns: 1fr;
    }

    .blog-thumb {
        aspect-ratio: 16 / 9;
    }

    .blog-heading {
        font-size: 20px;
    }

    .blog-title {
        font-size: 19px;
    }
}
