:root {
    --ink: #17212b;
    --muted: #60707d;
    --brand: #0f4f5f;
    --brand-dark: #0a3742;
    --gold: #d2a54d;
    --red: #b93f35;
    --green: #6cad72;
    --cream: #fffaf0;
    --soft: #f3f6f4;
    --line: #dce4e1;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(15, 79, 95, 0.13);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: Inter, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    background: var(--white);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
}

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

.skip-link,
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.skip-link:focus {
    z-index: 50;
    width: auto;
    height: auto;
    padding: 10px 14px;
    clip: auto;
    color: var(--white);
    background: var(--brand);
}

.topbar {
    color: var(--white);
    background: var(--brand-dark);
    font-size: 14px;
}

.topbar__inner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 0;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 260px;
    text-decoration: none;
}

.brand strong {
    display: block;
    max-width: 390px;
    color: var(--brand-dark);
    font-size: 18px;
    line-height: 1.2;
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-menu a {
    display: block;
    padding: 10px 11px;
    border-radius: 8px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--white);
    background: var(--brand);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.nav-toggle span:not(.sr-only) {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--brand-dark);
}

.hero {
    position: relative;
    min-height: 680px;
    display: grid;
    align-items: end;
    overflow: hidden;
    color: var(--white);
    background: var(--brand-dark);
}

.hero__media {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(10, 55, 66, 0.92), rgba(10, 55, 66, 0.48), rgba(10, 55, 66, 0.2)),
        url("../images/campus-assembly.svg") center right / min(880px, 70vw) auto no-repeat,
        linear-gradient(135deg, #0f4f5f, #6cad72);
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 1140px;
    padding: 120px 0 84px;
}

.hero h1,
.page-hero h1,
.section h2,
.cta-band h2 {
    margin: 0;
    font-family: Merriweather, Georgia, serif;
    line-height: 1.12;
}

.hero h1 {
    max-width: 790px;
    font-size: clamp(42px, 6vw, 78px);
}

.hero p {
    max-width: 650px;
    font-size: 19px;
}

.hero__actions,
.cta-band__inner {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.button--primary {
    color: var(--brand-dark);
    background: var(--gold);
}

.button--light {
    color: var(--brand-dark);
    background: var(--white);
}

.button--outline {
    color: var(--brand);
    border-color: var(--brand);
    background: transparent;
}

.button--danger {
    color: var(--white);
    background: var(--red);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--red);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: var(--gold);
}

.section {
    padding: 82px 0;
}

.section--soft,
.stats-band {
    background: var(--soft);
}

.stats-band {
    padding: 28px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.stats-grid div {
    padding: 18px;
    border-left: 4px solid var(--gold);
    background: var(--white);
}

.stats-grid strong {
    display: block;
    color: var(--brand);
    font-family: Merriweather, Georgia, serif;
    font-size: 30px;
    line-height: 1.1;
}

.stats-grid span,
.profile-list dt {
    color: var(--muted);
    font-weight: 700;
}

.split,
.form-layout,
.notice-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 48px;
    align-items: start;
}

.section h2,
.page-hero h1,
.cta-band h2 {
    font-size: clamp(30px, 4vw, 48px);
}

.section p,
.page-hero p {
    color: var(--muted);
}

.feature-list {
    display: grid;
    gap: 16px;
}

.feature-list article,
.panel,
.mini-card,
.form-card,
.notice-item {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.feature-list article,
.panel,
.mini-card,
.notice-item {
    padding: 24px;
}

.feature-list h3,
.mini-card h3,
.mini-card h2,
.card h3,
.card h2,
.notice-item h2,
.notice-item h3,
.form-card h2,
.panel h3 {
    margin: 0 0 8px;
    line-height: 1.25;
}

.text-link {
    color: var(--brand);
    font-weight: 900;
    text-decoration-thickness: 2px;
}

.section-heading {
    max-width: 720px;
    margin-bottom: 30px;
}

.cards {
    display: grid;
    gap: 22px;
}

.cards--three {
    grid-template-columns: repeat(3, 1fr);
}

.cards--four {
    grid-template-columns: repeat(4, 1fr);
}

.card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.card h2,
.card h3,
.card p {
    padding-inline: 22px;
}

.card h2,
.card h3 {
    padding-top: 20px;
}

.card p {
    padding-bottom: 24px;
}

.notice-list {
    display: grid;
    gap: 16px;
}

.notice-list--full {
    max-width: 880px;
}

.notice-item time {
    color: var(--red);
    font-size: 13px;
    font-weight: 900;
}

.cta-band {
    padding: 52px 0;
    color: var(--white);
    background: var(--brand);
}

.cta-band p {
    max-width: 700px;
    color: rgba(255, 255, 255, 0.82);
}

.cta-band__inner {
    justify-content: space-between;
}

.page-hero {
    padding: 86px 0;
    color: var(--white);
    background:
        linear-gradient(90deg, rgba(10, 55, 66, 0.96), rgba(15, 79, 95, 0.86)),
        url("../images/campus-assembly.svg") right center / 620px auto no-repeat;
}

.page-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.82);
}

.profile-list {
    display: grid;
    gap: 14px;
    margin: 0;
}

.profile-list div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.profile-list dd {
    margin: 0;
    font-weight: 900;
    text-align: right;
}

.timeline {
    display: grid;
    gap: 22px;
}

.timeline article {
    display: grid;
    grid-template-columns: 84px 0.8fr 1.2fr;
    gap: 24px;
    align-items: start;
    padding: 28px 0;
    border-bottom: 1px solid var(--line);
}

.timeline span {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    color: var(--white);
    background: var(--brand);
    font-weight: 900;
}

.steps,
.check-list {
    padding-left: 22px;
}

.steps li,
.check-list li {
    margin-bottom: 10px;
}

.form-card {
    display: grid;
    gap: 16px;
    padding: 28px;
}

.form-card label {
    display: grid;
    gap: 6px;
    color: var(--ink);
    font-weight: 800;
}

.form-card input,
.form-card textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 13px;
    color: var(--ink);
    font: inherit;
    background: var(--white);
}

.form-card input:focus,
.form-card textarea:focus {
    outline: 3px solid rgba(210, 165, 77, 0.34);
    border-color: var(--gold);
}

.alert {
    border-radius: 8px;
    padding: 12px 14px;
    font-weight: 800;
}

.alert--success {
    color: #135a38;
    background: #dff3e8;
}

.alert--error {
    color: #8b241f;
    background: #f8dddd;
}

.dashboard-grid,
.profile-grid {
    display: grid;
    gap: 24px;
}

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

.split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.card-feature {
    padding: 24px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 22px 12px;
}

.search-field {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
}

.selected-student-card dl,
.card dl {
    display: grid;
    gap: 12px;
}

.selected-student-card dt,
.card dt {
    color: var(--muted);
    font-weight: 700;
}

.selected-student-card dd,
.card dd {
    margin: 0;
    font-weight: 900;
}

.mark-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 12px;
}

.mark-row input {
    width: 100%;
}

.card.featured,
.selected-student-card,
.notice-item,
.card-feature {
    padding: 24px;
}

.selected-student-card {
    border: 1px solid var(--line);
}

.select-student {
    cursor: pointer;
    transition: background 0.2s ease;
}

.select-student:hover,
.select-student.selected {
    background: rgba(15, 79, 95, 0.05);
}

.grade-card-layout {
    display: grid;
    justify-items: center;
}

.grade-card-print {
    max-width: 840px;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.grade-card-header {
    text-align: center;
    margin-bottom: 24px;
}

.grade-card-header h2 {
    margin-bottom: 8px;
    font-size: 24px;
}

.grade-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.grade-card-note {
    margin-top: 18px;
    color: var(--muted);
}

.grade-card-table th,
.grade-card-table td {
    padding: 14px 16px;
}

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.table th,
.table td {
    padding: 14px 16px;
    border: 1px solid var(--line);
}

.table th {
    background: var(--soft);
    text-align: left;
}

.card dl {
    display: grid;
    gap: 12px;
}

.card dt {
    color: var(--muted);
    font-weight: 700;
}

.card dd {
    margin: 0;
    font-weight: 900;
}

.contact-stack {
    display: grid;
    gap: 12px;
}

.map-placeholder {
    display: grid;
    place-items: center;
    min-height: 230px;
    margin-top: 24px;
    padding: 24px;
    border: 1px dashed var(--brand);
    border-radius: 8px;
    text-align: center;
    background: var(--soft);
}

.map-placeholder span {
    color: var(--brand);
    font-family: Merriweather, Georgia, serif;
    font-size: 30px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.gallery-grid figure {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.gallery-grid figcaption {
    padding: 16px 18px;
    font-weight: 900;
}

.site-footer {
    color: rgba(255, 255, 255, 0.82);
    background: var(--brand-dark);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1fr;
    gap: 36px;
    padding: 54px 0;
}

.footer-logo {
    margin-bottom: 14px;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 12px;
    color: var(--white);
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--gold);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-bottom p {
    margin: 0;
    padding: 16px 0;
    font-size: 14px;
}

@media (max-width: 980px) {
    .topbar__inner,
    .navbar__inner,
    .split,
    .form-layout,
    .notice-layout,
    .timeline article,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .navbar__inner {
        display: grid;
    }

    .nav-toggle {
        display: block;
        position: absolute;
        right: 20px;
        top: 20px;
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 0 0 18px;
    }

    .nav-menu.is-open {
        display: flex;
    }

    .cards--three,
    .cards--four,
    .stats-grid,
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero {
        min-height: 600px;
    }

    .hero__media {
        background:
            linear-gradient(180deg, rgba(10, 55, 66, 0.88), rgba(10, 55, 66, 0.88)),
            url("../images/campus-assembly.svg") center 70px / 680px auto no-repeat;
    }
}

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

    .topbar__inner {
        display: grid;
        gap: 4px;
    }

    .brand {
        padding-right: 58px;
        min-width: 0;
    }

    .brand strong {
        font-size: 15px;
    }

    .brand small {
        display: none;
    }

    .hero {
        min-height: 570px;
    }

    .hero__content {
        padding: 90px 0 54px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .hero p {
        font-size: 17px;
    }

    .section,
    .page-hero {
        padding: 56px 0;
    }

    .cards--three,
    .cards--four,
    .stats-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .profile-list div {
        display: grid;
    }

    .profile-list dd {
        text-align: left;
    }

    .cta-band__inner {
        align-items: flex-start;
    }
}
