:root {
    --primary-red: #C0392B;
    --dark-red: #922B21;
    --bg-white: #FFFFFF;
    --light-gray: #F4F7F6;
    --border-gray: #E5E8E8;
    --text-main: #2C3E50;
    --text-muted: #7F8C8D;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--light-gray);
    color: var(--text-main);
    line-height: 1.8;
    font-size: 16px;
}

/* ===== HEADER ===== */
header {
    background-color: var(--bg-white);
    padding: 1rem 1.5rem;
    border-bottom: 3px solid var(--primary-red);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    gap: 14px;
}

.header-inner h1 {
    text-align: center;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.maple-logo {
    height: 36px;
    width: auto;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.maple-logo:hover {
    transform: rotate(8deg) scale(1.1);
}

.maple-logo-flip {
    transform: scaleX(-1);
}

.maple-logo-flip:hover {
    transform: scaleX(-1) rotate(8deg) scale(1.1);
}

header h1 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--primary-red);
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
}

/* ===== HEADER WIDGET ===== */
.header-widget {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.3;
}

#header-time {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary-red);
    letter-spacing: 0.5px;
}

#header-weather {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

/* ===== MAIN CONTENT ===== */
main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

h1, h2, h3 {
    color: var(--text-main);
    line-height: 1.2;
    margin-top: 2rem;
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; }

/* ===== POST CARDS ===== */
.post-list {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
}

.post-list li {
    background: var(--bg-white);
    margin-bottom: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid transparent;
}

.post-list li:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
    border-left: 4px solid var(--primary-red);
}

.post-list a {
    font-size: 1.05rem;
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 700;
    display: block;
    margin-bottom: 0.3rem;
}

.post-list .post-date {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== INTRO TEXT ===== */
.intro-text {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-red);
    padding-left: 1.25rem;
}

/* ===== ARTICLE / POST PAGE ===== */
article h1 {
    font-size: 1.6rem;
    color: var(--primary-red);
    margin-bottom: 0.5rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--primary-red);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.back-link:hover {
    color: var(--dark-red);
}

.post-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-gray);
}

.content p {
    margin-bottom: 1.2rem;
}

.content ul, .content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.2rem;
}

.content li {
    margin-bottom: 0.5rem;
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    background: var(--bg-white);
    margin-top: 4rem;
    border-top: 1px solid var(--border-gray);
}

/* ===== LINKS ===== */
a {
    color: var(--primary-red);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--dark-red);
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    header {
        padding: 0.75rem 1rem;
    }

    .maple-logo {
        height: 28px;
    }

    header h1 {
        font-size: 0.85rem;
        letter-spacing: 0.5px;
    }

    .header-inner {
        gap: 8px;
    }

    #header-time { font-size: 0.68rem; }
    #header-weather { font-size: 0.62rem; }

    main {
        margin: 1.5rem auto;
        padding: 0 1rem;
    }

    h1 { font-size: 1.4rem; }
    h2 { font-size: 1.2rem; }

    .post-list li {
        padding: 1rem 1.25rem;
    }

    .post-list a {
        font-size: 0.95rem;
    }

    article h1 {
        font-size: 1.3rem;
    }

    footer {
        padding: 2rem 1rem;
        margin-top: 2.5rem;
    }
}

@media (max-width: 480px) {
    .maple-logo {
        height: 20px;
    }

    header h1 {
        font-size: 0.65rem;
        letter-spacing: 0px;
    }

    .header-inner {
        gap: 5px;
    }

    #header-time {
        font-size: 0.6rem;
    }

    #header-weather {
        font-size: 0.58rem;
        white-space: nowrap;
    }
}

/* ── Category badge ─────────────────────────────────────────────────────────── */
.category-badge {
    display: inline-block;
    background: var(--primary-red);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    margin-left: 8px;
}

/* ===== Category Badges ===== */
.category-badge {
    display: inline-block;
    background: var(--primary-red);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 8px;
    vertical-align: middle;
}

/* ===== Category Filter Buttons ===== */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.filter-btn {
    background: #fff;
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    font-family: inherit;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-red);
    color: #fff;
}

/* ===== Day Group (Nested Sub-Update View) ===== */
.day-group {
    margin-bottom: 1.25rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.day-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 0.85rem 1.5rem;
    background: var(--bg-white);
    border-left: 4px solid var(--primary-red);
    list-style: none;
    user-select: none;
    transition: background 0.2s ease;
}

.day-summary::-webkit-details-marker { display: none; }
.day-summary::marker { display: none; }

.day-summary:hover {
    background: #fdf5f5;
}

.day-date {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
}

.day-date::before {
    content: '▶ ';
    font-size: 0.65rem;
    color: var(--primary-red);
    margin-right: 6px;
    transition: transform 0.2s ease;
    display: inline-block;
}

details[open] .day-date::before {
    content: '▼ ';
}

.day-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--light-gray);
    padding: 2px 10px;
    border-radius: 10px;
}

/* Nested post list inside day group */
.post-list.nested {
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--bg-white);
    border-left: 4px solid var(--border-gray);
}

.post-list.nested li {
    background: var(--bg-white);
    margin: 0;
    padding: 0.9rem 1.5rem;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid var(--border-gray);
    border-left: 4px solid transparent;
    transition: background 0.15s ease, border-left 0.15s ease;
}

.post-list.nested li:last-child {
    border-bottom: none;
}

.post-list.nested li:hover {
    background: #fdf5f5;
    border-left: 4px solid var(--primary-red);
    transform: none;
    box-shadow: none;
}

.post-list.nested a {
    font-size: 0.98rem;
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 600;
    display: block;
    margin-bottom: 0.2rem;
}

.post-list-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.post-list-meta .post-date {
    margin: 0;
}

.post-list-meta .category-badge {
    margin: 0;
    font-size: 0.68rem;
    padding: 2px 8px;
}

/* Mobile adjustments for day groups */
@media (max-width: 768px) {
    .day-summary {
        padding: 0.75rem 1rem;
    }
    .post-list.nested li {
        padding: 0.75rem 1rem;
    }
}

/* ===== Standup Illustration ===== */
.standup-illustration {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, #fff9f9 0%, #fff3e0 100%);
    border-radius: 12px;
    border: 2px dashed var(--primary-red);
}

.standup-img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    display: block;
    margin: 0 auto;
}

.standup-caption {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}
