.history-page {
    background: #f4f7fb;
}

.department-header {
    background: linear-gradient(135deg, #004EA0 0%, #002C5B 100%);
    color: white;
    padding: 60px 20px;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.department-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.department-header-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.department-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.15;
}

.department-subtitle {
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 20px;
    opacity: 0.9;
}

.department-code-large {
    font-size: 72px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.2);
    position: absolute;
    right: 40px;
    bottom: 20px;
    z-index: 1;
    pointer-events: none;
    line-height: 1;
}

.history-lead {
    font-size: 18px;
    line-height: 1.5;
    max-width: 760px;
    opacity: 0.9;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #004EA0;
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 30px;
}

.back-button:hover {
    background: #002C5B;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 78, 160, 0.3);
    color: white;
}

.history-page .faculty-info .brand-stack {
    display: grid !important;
}

.history-timeline {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(0, 44, 91, 0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.history-timeline-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.history-chip {
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: transparent;
    color: #fff;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: background 0.2s ease, transform 0.2s ease;
}

.history-chip:hover,
.history-chip.active {
    background: #004EA0;
    border-color: #4bb3e8;
}

.history-wrap {
    max-width: 920px;
    margin: 0 auto;
    padding: 36px 20px 80px;
}

.history-era {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(0, 44, 91, 0.08);
    padding: 28px 28px 24px;
    margin-bottom: 22px;
    opacity: 0;
    transform: translateY(18px);
    animation: history-in 0.55s ease forwards;
}

.history-era:nth-child(2) { animation-delay: 0.05s; }
.history-era:nth-child(3) { animation-delay: 0.1s; }
.history-era:nth-child(4) { animation-delay: 0.15s; }

@keyframes history-in {
    to {
        opacity: 1;
        transform: none;
    }
}

.history-year {
    display: inline-block;
    background: #004EA0;
    color: #fff;
    border-radius: 10px;
    padding: 4px 12px;
    font-size: 14px;
    margin-bottom: 10px;
}

.history-era h2 {
    color: #002C5B;
    font-size: 26px;
    line-height: 1.25;
    margin-bottom: 14px;
}

.history-era p {
    color: #334155;
    font-size: 16px;
    line-height: 1.7;
    text-align: justify;
    margin-bottom: 12px;
}

.history-era p:last-child {
    margin-bottom: 0;
}

.history-photo {
    display: block;
    width: 100%;
    max-width: 640px;
    margin: 8px auto 18px;
    border-radius: 14px;
    overflow: hidden;
    cursor: zoom-in;
    box-shadow: 0 8px 24px rgba(0, 44, 91, 0.12);
}

.history-photo img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.35s ease;
}

.history-photo:hover img {
    transform: scale(1.03);
}

.history-photo figcaption {
    padding: 8px 12px 10px;
    font-size: 13px;
    color: #4a6280;
    background: #f8fbff;
}

.history-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 20, 40, 0.88);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    cursor: zoom-out;
}

.history-lightbox.active {
    display: flex;
}

.history-lightbox img {
    max-width: min(960px, 100%);
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    .department-header {
        padding: 40px 20px;
    }

    .department-title {
        font-size: 36px;
    }

    .department-subtitle {
        font-size: 22px;
    }

    .department-code-large {
        font-size: 48px;
        right: 20px;
        bottom: 10px;
    }

    .history-lead {
        font-size: 16px;
    }

    .back-button {
        font-size: 16px;
        padding: 12px 22px;
    }

    .history-era {
        padding: 22px 18px;
    }

    .history-era h2 {
        font-size: 22px;
    }

    .history-era p {
        text-align: left;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .department-title {
        font-size: 28px;
    }

    .department-subtitle {
        font-size: 18px;
    }

    .history-chip {
        font-size: 13px;
        padding: 7px 12px;
    }
}
