/* =====================================================
   SHARED SITE STYLES
   Used on: index.html, max.html, blog/index.html,
            and all blog post pages (via post.njk)
   ===================================================== */

/* ---- CSS Variables ---- */
:root {
    --bg-color: #5be9c9;
    --container-bg: #dad8d9;
    --border-color: #000;
    --text-main: #000;
    --text-muted: #333;
    --hot-color: #e0fe16;
    --medium-color: #cb9afa;
    --cold-color: #fff;
    --accent: #5be9c9;
}

.dark-mode {
    --bg-color: #2c3e50;
    --container-bg: #34495e;
    --border-color: #000;
    --text-main: #ecf0f1;
    --text-muted: #bdc3c7;
    --cold-color: #7f8c8d;
}

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

body {
    font-family: 'Patrick Hand', cursive;
    background: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ---- Shared Site Header ---- */
.site-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 1rem 0 1rem;
    position: relative;
    min-height: 130px;
    /* locks the header height on every page */
    justify-content: flex-end;
    /* h1 + nav stick to bottom of header */
    margin-bottom: 1.5rem;
}

/* Language / Theme controls – top-right corner */
.site-header .top-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    z-index: 100;
}

/* Page title */
.site-header h1 {
    font-size: 2.2rem;
    font-weight: bold;
    margin: 0 0 0.3rem 0;
    text-align: center;
    color: var(--text-main);
    text-shadow: 3px 3px 0px var(--container-bg);
    line-height: 1.1;
}

/* Nav tabs row */
.site-header .nav-tabs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0;
}

/* ---- Nav Tab Style ---- */
.nav-tab {
    font-family: 'Patrick Hand', cursive;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 0.4rem 1.2rem;
    border: 4px solid var(--border-color);
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-main);
    background: var(--container-bg);
    box-shadow: 4px -2px 0px var(--border-color);
    transition: all 0.15s;
    display: inline-block;
    line-height: 1.2;
}

.nav-tab:hover {
    transform: translateY(-3px);
    background: var(--medium-color);
}

.nav-tab.active {
    background: var(--hot-color);
    color: #000;
    transform: translateY(-3px);
    box-shadow: 4px -4px 0px var(--border-color);
    pointer-events: none;
}

/* ---- Top Controls Buttons/Selects ---- */
.top-controls select,
.top-controls button {
    font-family: 'Patrick Hand', cursive;
    font-size: 1.1rem;
    padding: 0.3rem 0.6rem;
    background: var(--container-bg);
    border: 3px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-main);
    font-weight: bold;
}

.top-controls button:hover,
.top-controls select:hover {
    opacity: 0.9;
}

/* ---- Screen reader only ---- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---- Mobile: stack controls below title ---- */
@media (max-width: 768px) {
    .site-header {
        min-height: unset;
        justify-content: flex-start;
        padding-top: 3.5rem;
        /* leave space for top-controls */
    }

    .site-header .top-controls {
        top: 0.5rem;
        right: 0.5rem;
    }

    .nav-tab {
        font-size: 1rem !important;
        padding: 0.3rem 0.8rem !important;
    }
}