:root {
    --bg: #000000;
    --surface: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.2);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.55);
    --accent-red: #ff3b3b;
    --accent-blue: #38bdf8;
    --accent-green: #4ade80;
    --glass-bg: rgba(0, 0, 0, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --year-header-color: rgba(255, 255, 255, 0.06);
    --shadow-subtle: 0 24px 48px -12px rgba(0, 0, 0, 0.8);
}

body.light-mode {
    --bg: #ffffff;
    --surface: rgba(0, 0, 0, 0.02);
    --surface-hover: rgba(0, 0, 0, 0.05);
    --border: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.15);
    --text-primary: #000000;
    --text-secondary: rgba(0, 0, 0, 0.55);
    --accent-red: #e11d48;
    --accent-blue: #0ea5e9;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.06);
    --year-header-color: rgba(0, 0, 0, 0.05);
    --shadow-subtle: 0 24px 48px -12px rgba(0, 0, 0, 0.06);
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    transition: background 0.6s cubic-bezier(0.16, 1, 0.3, 1), color 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    zoom: 0.9;
}

/* Fixed Stats Bar */
.stats-bar {
    position: fixed;
    top: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 6rem);
    max-width: 1200px;
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 1rem 2rem;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-subtle);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    gap: 1.5rem;
}

.stats-brand h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    white-space: nowrap;
}

/* Main Navigation */
.main-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.main-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 2px;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text-primary);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-blue);
}

.stats-grid {
    display: flex;
    gap: 3rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    font-weight: 700;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.stat-value.highlight {
    background: linear-gradient(135deg, var(--accent-blue), #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Theme Toggle */
.theme-toggle {
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--text-primary);
    flex-shrink: 0;
}

.theme-toggle:hover { transform: scale(1.05); background: var(--surface-hover); }
.theme-toggle:active { transform: scale(0.95); }

/* Main Content */
.content-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 12rem 3rem 4rem 3rem;
    scroll-behavior: smooth;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Year & Month Structure */
.year-section { margin-bottom: 8rem; position: relative; }

.year-header {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 16rem;
    font-weight: 800;
    color: var(--year-header-color);
    line-height: 0.7;
    margin-bottom: -1rem;
    pointer-events: none;
    user-select: none;
    letter-spacing: -0.06em;
    transition: color 0.6s ease;
}

.year-divider {
    height: 1px;
    background: linear-gradient(to right, var(--border), transparent);
    margin: 4rem 0;
    width: 100%;
}

.months-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 5rem 4rem;
}

.month-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.02em;
}

.month-title span {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85rem;
    background: var(--surface);
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    border: 1px solid var(--border);
}

/* Day Grid */
.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

.day-cell {
    aspect-ratio: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.day-cell::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, rgba(255,255,255,0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.day-cell:hover::before { opacity: 1; }

.day-cell:hover {
    background: var(--surface-hover);
    border-color: var(--text-primary);
    color: var(--text-primary);
    transform: scale(1.15) translateY(-4px);
    z-index: 10;
    box-shadow: var(--shadow-subtle);
}

.day-cell.crossed {
    background: var(--surface);
    border-color: transparent;
    color: var(--text-secondary);
    opacity: 0.3;
}

.day-cell.crossed::after {
    content: '';
    position: absolute;
    width: 120%;
    height: 1.5px;
    background: var(--accent-red);
    transform: rotate(-45deg);
    opacity: 1;
    box-shadow: 0 0 10px rgba(255, 59, 59, 0.4);
}

.day-cell.today {
    border: 2px solid var(--accent-blue);
    color: var(--text-primary);
    font-weight: 700;
    background: rgba(56, 189, 248, 0.05);
    box-shadow: inset 0 0 12px rgba(56, 189, 248, 0.1), 0 0 16px rgba(56, 189, 248, 0.15);
}

body.light-mode .day-cell.today {
    background: rgba(2, 132, 199, 0.05);
    box-shadow: inset 0 0 12px rgba(2, 132, 199, 0.05), 0 0 16px rgba(2, 132, 199, 0.1);
}

/* Scrollbar */
.content-scroll::-webkit-scrollbar { width: 8px; }
.content-scroll::-webkit-scrollbar-track { background: transparent; }
.content-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
.content-scroll::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* Footer */
.site-footer {
    text-align: center;
    padding: 4rem 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 2.5rem;
    background: linear-gradient(to bottom, transparent, var(--border));
}

.footer-signature {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-weight: 300;
    font-size: 3.5rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1;
    opacity: 0.9;
}

.footer-signature em {
    font-style: italic;
    font-weight: 600;
    background: linear-gradient(135deg, #ffffff 20%, rgba(255,255,255,0.4) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-mode .footer-signature em {
    background: linear-gradient(135deg, #000000 20%, rgba(0,0,0,0.4) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
}

.footer-meta a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-meta a svg { width: 14px; height: 14px; fill: currentColor; flex-shrink: 0; }

.footer-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--border);
    display: inline-block;
}

@media print {
    .stats-bar, .theme-toggle { display: none; }
    .content-scroll { overflow: visible; padding: 0; zoom: 1; }
    body { background: white; color: black; zoom: 1; }
}

/* Mobile */
@media (max-width: 768px) {
    .stats-bar {
        width: calc(100% - 2rem);
        padding: 0.8rem 1rem;
        flex-wrap: wrap;
        top: 0.75rem;
        border-radius: 16px;
        gap: 0.75rem;
    }
    .stats-brand h1 { font-size: 0.85rem; }
    .main-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 1.5rem;
        padding-top: 0.2rem;
        border-top: 1px solid var(--border);
    }
    .stats-grid { gap: 1.5rem; }
    .stat-item { align-items: center; }
    .stat-value { font-size: 1.2rem; }
    .theme-toggle { width: 36px; height: 36px; font-size: 0.9rem; }
    .content-scroll { padding: 12rem 1.8rem 3rem 1.8rem; }
    .year-section { margin-bottom: 5rem; }
    .year-header { font-size: 7rem; margin-bottom: 0.5rem; text-align: center; }
    .months-grid { grid-template-columns: 1fr; gap: 3rem; }
    .days-grid { gap: 6px; }
    .day-cell { font-size: 0.8rem; border-radius: 6px; }
    .site-footer { padding: 3rem 1rem 2rem; gap: 0.8rem; }
    .site-footer::before { height: 1.5rem; }
    .footer-signature { font-size: 2.2rem; }
    .footer-meta { flex-direction: column; gap: 0.6rem; font-size: 0.6rem; }
    .footer-dot { display: none; }
}
