/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg:         #f7f5f0;
    --surface:    #ffffff;
    --border:     #d8d3c8;
    --text-dark:  #1a1814;
    --text-mid:   #4a4540;
    --text-light: #8c877e;
    --accent:     #b84a2e;
    --accent-dim: #e8d5d0;
    --done-bg:    #f0f0f0;
    --done-text:  #9a9590;

    --font-main: Arial, 'Helvetica Neue', Helvetica, sans-serif;

    --card-radius: 4px;
    --gap: clamp(14px, 2vw, 24px);
    --page-pad: clamp(16px, 5vw, 80px);
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg);
    color: var(--text-dark);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Header ───────────────────────────────────────────────── */
header {
    border-bottom: 2px solid var(--text-dark);
    padding: clamp(20px, 4vw, 44px) var(--page-pad) 18px;
}

.header-inner {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 6px;
}

.header-label {
    font-family: var(--font-main);
    font-size: clamp(2rem, 5vw, 3.8rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--text-dark);
}

.header-year {
    font-family: var(--font-main);
    font-size: clamp(2rem, 5vw, 3.8rem);
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.header-sub {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-light);
}

/* ── Main ─────────────────────────────────────────────────── */
main {
    flex: 1;
    padding: var(--gap) var(--page-pad);
}

/* ── Grid: 1 col mobile, 2 col desktop ───────────────────── */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap);
    padding-top: 8px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 700px) {
    .grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ── Card ─────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: clamp(20px, 3vw, 36px) clamp(20px, 3vw, 40px) clamp(18px, 2.5vw, 30px);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s;
    animation: fadeUp 0.5s ease both;
}

.card:hover {
    border-color: var(--text-mid);
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}

/* staggered entrance */
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.10s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.20s; }
.card:nth-child(5) { animation-delay: 0.25s; }
.card:nth-child(6) { animation-delay: 0.30s; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* accent stripe on left */
.card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 18%;
    bottom: 18%;
    width: 3px;
    background: var(--accent);
    border-radius: 0 2px 2px 0;
    opacity: 0;
    transition: opacity 0.2s;
}
.card:hover::before { opacity: 1; }

/* done state */
.card.done {
    background: var(--done-bg);
    border-color: var(--border);
}
.card.done::before { display: none; }
.card.done .card-date,
.card.done .card-subjects,
.card.done .value,
.card.done .label {
    color: var(--done-text);
}

/* ── Card content ─────────────────────────────────────────── */
.card-date {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.01em;
    line-height: 1.1;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.card-subjects {
    font-size: clamp(0.85rem, 1.3vw, 1rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-mid);
    line-height: 1.5;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: clamp(16px, 2vw, 24px) 0;
}

/* ── Countdown ────────────────────────────────────────────── */
.countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    text-align: center;
}

.unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: clamp(10px, 1.5vw, 18px) 4px;
    border-radius: 3px;
    background: var(--bg);
    transition: background 0.15s;
}

.card:not(.done) .unit:hover {
    background: var(--accent-dim);
}

.value {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
    min-width: 2ch;
    letter-spacing: -0.02em;
    display: inline-block;
}

.value.tick {
    animation: tick 0.18s ease;
}

@keyframes tick {
    0%   { transform: scaleY(1); }
    40%  { transform: scaleY(0.85); opacity: 0.6; }
    100% { transform: scaleY(1); opacity: 1; }
}

.label {
    font-size: clamp(0.6rem, 0.9vw, 0.72rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
}

/* ── Status badge ─────────────────────────────────────────── */
.card-status {
    margin-top: 14px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: transparent;
    min-height: 1em;
    transition: color 0.3s;
}

.card.done .card-status {
    color: var(--done-text);
}

.card.upcoming .card-status {
    color: var(--accent);
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
    border-top: 1px solid var(--border);
    padding: 14px var(--page-pad);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

footer span {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-light);
}

.footer-author {
    color: var(--text-mid) !important;
}