/* =============================================
   Course Evolution Pages — Stylesheet
   Loaded after base.css on course pages
   ============================================= */

:root {
    /* Evolution-specific additions */
    --color-future: #1b6b4a;
    --color-future-bg: #eef7f2;
    --color-future-border: #b8dfc9;
    --timeline-line: #d0d4db;
    --timeline-dot: var(--color-accent);
    --timeline-dot-size: 14px;
}

/* Override section padding for tighter course layout */
section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2rem;
}

.section-intro {
    font-size: 1.05rem;
}

/* ---- Page Header ---- */
.page-header {
    background: var(--color-primary);
    color: #fff;
    padding: 8rem 2rem 3rem;
}

.page-header .container {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
}

.page-header h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.25rem;
}

.page-header .course-code-hero {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
}

.page-header .page-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.65);
    max-width: 600px;
    margin-top: 0.5rem;
}

.header-meta {
    text-align: right;
    flex-shrink: 0;
}

.header-meta .semesters-taught {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
}

.header-meta .semesters-label {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.25rem;
}

/* ---- Future Ideas Section ---- */
.future-section {
    background: var(--color-future-bg);
    border: 2px solid var(--color-future-border);
    border-radius: 12px;
    padding: 2.5rem;
    margin-bottom: 0.5rem;
}

.future-section .section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-future);
    margin-bottom: 1rem;
}

.future-section .section-label .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-future);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.future-section h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 1.25rem;
}

.future-item {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--color-future-border);
}

.future-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.future-item h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.4rem;
}

.future-item p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.future-tag {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-right: 0.4rem;
    margin-bottom: 0.4rem;
}

.future-tag.considering { background: #fef3cd; color: #856404; }
.future-tag.planned { background: #d1ecf1; color: #0c5460; }
.future-tag.experimenting { background: #d4edda; color: #155724; }

/* ---- Vertical Timeline ---- */
.timeline {
    position: relative;
    padding: 2rem 0;
}

/* The vertical line */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 30px;
    width: 3px;
    background: var(--timeline-line);
    border-radius: 2px;
}

/* Timeline entry */
.timeline-entry {
    position: relative;
    padding-left: 70px;
    margin-bottom: 3rem;
}

.timeline-entry:last-child {
    margin-bottom: 0;
}

/* The dot on the line */
.timeline-entry::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 6px;
    width: var(--timeline-dot-size);
    height: var(--timeline-dot-size);
    border-radius: 50%;
    background: var(--timeline-dot);
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px var(--timeline-line);
    z-index: 2;
}

/* Semester label */
.timeline-semester {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

/* The card */
.timeline-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.75rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border-left: 4px solid var(--color-accent);
    transition: transform 0.2s, box-shadow 0.2s;
}

.timeline-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.timeline-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.timeline-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.timeline-card p:last-child {
    margin-bottom: 0;
}

/* Commentary callout within a card */
.commentary {
    background: var(--color-bg-alt);
    border-radius: 8px;
    padding: 1.25rem;
    margin-top: 1rem;
    border-left: 3px solid var(--color-primary);
}

.commentary-label {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    margin-bottom: 0.4rem;
}

.commentary p {
    font-style: italic;
    color: var(--color-text);
    font-size: 0.92rem;
}

/* Changes list within a card */
.changes-list {
    list-style: none;
    margin: 0.5rem 0 0;
}

.changes-list li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.4rem;
    color: var(--color-text-light);
    font-size: 0.92rem;
}

.changes-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent);
}

/* Syllabus download link */
.syllabus-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-accent);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.75rem;
    transition: color 0.2s;
}

.syllabus-link:hover {
    color: var(--color-accent-hover);
}

.syllabus-link svg {
    width: 16px;
    height: 16px;
}

/* ---- Tag pills ---- */
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.tag {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.tag.structure { background: #e8eaf6; color: #283593; }
.tag.content { background: #fce4ec; color: #c62828; }
.tag.pedagogy { background: #e8f5e9; color: #2e7d32; }
.tag.assessment { background: #fff3e0; color: #e65100; }
.tag.technology { background: #e0f7fa; color: #00695c; }
.tag.readings { background: #f3e5f5; color: #6a1b9a; }

/* ---- Course Index Page ---- */
.course-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.course-index-card {
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    overflow: hidden;
}

.course-index-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.course-index-card .card-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--color-accent);
}

.course-index-card .course-code {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.course-index-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.course-index-card p {
    color: var(--color-text-light);
    font-size: 0.92rem;
    margin-bottom: 1rem;
}

.course-meta {
    display: flex;
    gap: 1.5rem;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .page-header {
        padding: 6rem 1.5rem 2rem;
    }

    .page-header .container {
        flex-direction: column;
    }

    .page-header h1 {
        font-size: 2.2rem;
    }

    .header-meta {
        text-align: left;
    }

    /* Timeline shifts to left-aligned on mobile */
    .timeline::before {
        left: 16px;
    }

    .timeline-entry {
        padding-left: 46px;
    }

    .timeline-entry::before {
        left: 10px;
    }

    .course-index-grid {
        grid-template-columns: 1fr;
    }

    .timeline-card {
        padding: 1.25rem;
    }
}
