:root {
    --green-900: #123b35;
    --green-800: #184d44;
    --green-700: #216558;
    --green-100: #e8f1ee;
    --gold: #c69b43;
    --ink: #202825;
    --muted: #64716c;
    --surface: #ffffff;
    --background: #f5f7f6;
    --border: #dce4e1;
    --shadow: 0 12px 35px rgba(18, 59, 53, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family:
        Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--background);
    line-height: 1.5;
}

a {
    color: inherit;
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header {
    background: var(--green-900);
    color: white;
}

.topbar {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.brand-main {
    font-size: 1.12rem;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.brand-sub {
    margin-top: 2px;
    font-size: 0.82rem;
    color: rgba(255,255,255,.68);
}

.course-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 13px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    font-size: .84rem;
    color: rgba(255,255,255,.9);
}

.hero {
    background:
        radial-gradient(circle at 85% 10%, rgba(198,155,67,.16), transparent 30%),
        linear-gradient(135deg, var(--green-900), var(--green-700));
    color: white;
    padding: 72px 0 78px;
}

.hero-kicker {
    margin: 0 0 12px;
    color: #e4d0a6;
    font-weight: 700;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .09em;
}

.hero h1 {
    max-width: 800px;
    margin: 0;
    font-size: clamp(2.25rem, 5vw, 4.35rem);
    line-height: 1.02;
    letter-spacing: -.045em;
}

.hero p {
    max-width: 720px;
    margin: 24px 0 0;
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255,255,255,.78);
}

.main-content {
    padding: 58px 0 80px;
}

.section-heading {
    margin-bottom: 28px;
}

.section-heading span {
    color: var(--green-700);
    font-size: .85rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.section-heading h2 {
    margin: 6px 0 8px;
    font-size: clamp(1.75rem, 3vw, 2.45rem);
    letter-spacing: -.035em;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
    max-width: 720px;
}

.area-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.area-card {
    position: relative;
    display: flex;
    min-height: 190px;
    flex-direction: column;
    justify-content: space-between;
    padding: 25px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(18,59,53,.03);
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease;
}

.area-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: #b9cbc5;
}

.area-code {
    width: max-content;
    padding: 5px 9px;
    background: var(--green-100);
    color: var(--green-700);
    border-radius: 7px;
    font-size: .75rem;
    font-weight: 750;
}

.area-card h3 {
    margin: 28px 0 18px;
    font-size: 1.15rem;
    line-height: 1.25;
    letter-spacing: -.02em;
}

.area-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--green-700);
    font-size: .88rem;
    font-weight: 700;
}

.area-link strong {
    font-size: 1.15rem;
    transition: transform .18s ease;
}

.area-card:hover .area-link strong {
    transform: translateX(4px);
}

.breadcrumb {
    margin: 0 0 24px;
    font-size: .9rem;
    color: var(--muted);
}

.breadcrumb a {
    color: var(--green-700);
    text-decoration: none;
}

.area-title {
    margin-bottom: 34px;
}

.area-title h1 {
    margin: 8px 0;
    font-size: clamp(2rem, 5vw, 3.4rem);
    letter-spacing: -.045em;
    line-height: 1.08;
}

.area-title p {
    margin: 0;
    color: var(--muted);
}

.panel-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
}

.panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px;
}

.panel h2 {
    margin-top: 0;
    letter-spacing: -.025em;
}

.empty-state {
    padding: 32px 0 12px;
    color: var(--muted);
}

.meta-list {
    margin: 0;
}

.meta-row {
    display: grid;
    grid-template-columns: 115px 1fr;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.meta-row:last-child {
    border-bottom: 0;
}

.meta-row dt {
    color: var(--muted);
}

.meta-row dd {
    margin: 0;
    font-weight: 650;
}

.site-footer {
    border-top: 1px solid var(--border);
    padding: 30px 0 42px;
    color: var(--muted);
    font-size: .84rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

@media (max-width: 850px) {
    .area-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .panel-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 28px, 1180px);
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px 0;
        gap: 10px;
    }

    .hero {
        padding: 52px 0 58px;
    }

    .area-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
    }
}

.subject-item {
    padding: 22px 0;
    border-bottom: 1px solid var(--border);
}

.subject-item:first-of-type {
    padding-top: 8px;
}

.subject-item:last-child {
    border-bottom: 0;
}

.subject-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.subject-code {
    color: var(--green-700);
    font-size: .76rem;
    font-weight: 750;
}

.subject-heading h3 {
    margin: 4px 0 0;
    font-size: 1.08rem;
    line-height: 1.32;
    letter-spacing: -.018em;
}

.ects-badge {
    flex: 0 0 auto;
    padding: 6px 9px;
    border-radius: 8px;
    background: var(--green-100);
    color: var(--green-700);
    font-size: .78rem;
    font-weight: 750;
}

.subject-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 16px;
    margin-top: 10px;
    color: var(--muted);
    font-size: .82rem;
}

.subject-degrees {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.subject-degrees span {
    padding: 5px 8px;
    background: #f2f5f4;
    border-radius: 7px;
    color: #52605b;
    font-size: .76rem;
}

.subject-title-link {
    color: inherit;
    text-decoration: none;
}

.subject-title-link:hover {
    color: var(--green-700);
}

.subject-hero-card {
    margin-bottom: 22px;
    padding: 34px;
    color: white;
    border-radius: 22px;
    background:
        radial-gradient(circle at 90% 0%, rgba(198,155,67,.20), transparent 30%),
        linear-gradient(135deg, var(--green-900), var(--green-700));
}

.subject-identity {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
}

.subject-identity h1 {
    max-width: 820px;
    margin: 14px 0 10px;
    font-size: clamp(2rem, 4vw, 3.35rem);
    line-height: 1.08;
    letter-spacing: -.045em;
}

.subject-identity p {
    margin: 0;
    color: rgba(255,255,255,.72);
}

.big-ects {
    min-width: 105px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 15px;
    background: rgba(255,255,255,.08);
}

.big-ects strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
}

.big-ects span {
    display: block;
    margin-top: 5px;
    font-size: .72rem;
    letter-spacing: .08em;
}

.subject-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 20px;
    align-items: start;
}

.subject-section {
    margin-bottom: 20px;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.fact {
    min-height: 88px;
    padding: 15px;
    background: var(--background);
    border-radius: 12px;
}

.fact span {
    display: block;
    color: var(--muted);
    font-size: .76rem;
}

.fact strong {
    display: block;
    margin-top: 6px;
    font-size: .98rem;
}

.degree-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.degree-row:last-child {
    border-bottom: 0;
}

.degree-row > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.degree-code {
    color: var(--green-700);
    font-size: .74rem;
    font-weight: 750;
}

.degree-enrolled {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: .8rem;
}

.public-summary,
.empty-public-summary {
    margin-bottom: 0;
}

.empty-public-summary {
    color: var(--muted);
}

.aside-copy {
    color: var(--muted);
    font-size: .88rem;
}

.guide-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.guide-link {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 12px;
    padding: 12px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    transition: border-color .18s ease, background .18s ease;
}

.guide-link:hover {
    border-color: #b9cbc5;
    background: var(--green-100);
}

.guide-link span {
    font-weight: 700;
}

.guide-link small {
    grid-column: 1;
    color: var(--muted);
}

.guide-link strong {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    color: var(--green-700);
}

.area-mini-link {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 13px;
    border-radius: 11px;
    background: var(--green-100);
    text-decoration: none;
}

.area-mini-link span {
    color: var(--green-700);
    font-size: .74rem;
}

.area-mini-link strong {
    line-height: 1.25;
}

@media (max-width: 900px) {
    .subject-page-grid {
        grid-template-columns: 1fr;
    }

    .facts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .subject-identity {
        flex-direction: column;
    }

    .facts-grid {
        grid-template-columns: 1fr;
    }

    .big-ects {
        width: 100%;
    }
}

.teacher-row {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.teacher-row:last-child {
    border-bottom: 0;
}

.teacher-avatar {
    display: flex;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--green-100);
    color: var(--green-700);
    font-size: .82rem;
    font-weight: 800;
}

.teacher-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.teacher-info strong {
    font-size: .94rem;
}

.teacher-info > span {
    color: var(--muted);
    font-size: .76rem;
}

.teacher-info .coordinator-label {
    width: max-content;
    padding: 2px 7px;
    border-radius: 999px;
    background: #f7efd9;
    color: #85651e;
    font-weight: 700;
}
