/* =========================================================
   PMAI LAB — PORTABLE MASTER COURSE PAGE
   Premium Academic Design
   Version 2.0

   Designed for:
   - Faculty GitHub Pages
   - Independent course repositories
   - PMAI Lab academic network

   No external CSS dependency
========================================================= */


/* =========================================================
   01. ROOT VARIABLES
========================================================= */

:root {

    --primary: #0f172a;
    --primary-soft: #1e293b;

    --accent: #2563eb;
    --accent-dark: #1d4ed8;
    --accent-light: #eff6ff;

    --text: #334155;
    --text-light: #64748b;

    --white: #ffffff;

    --surface: #f8fafc;
    --surface-soft: #f1f5f9;

    --border: #e2e8f0;
    --border-light: #eef2f7;

    --success: #059669;

    --shadow-sm:
        0 4px 15px rgba(15, 23, 42, 0.05);

    --shadow:
        0 12px 35px rgba(15, 23, 42, 0.08);

    --shadow-lg:
        0 25px 70px rgba(15, 23, 42, 0.12);

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;

    --container: 1180px;

}


/* =========================================================
   02. RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    background: var(--white);

    color: var(--text);

    line-height: 1.7;

    -webkit-font-smoothing: antialiased;

}


a {
    color: inherit;
    text-decoration: none;
}


button,
input,
textarea,
select {
    font: inherit;
}


/* =========================================================
   03. GLOBAL CONTAINER
========================================================= */

.course-container {

    width: min(
        calc(100% - 40px),
        var(--container)
    );

    margin: 0 auto;

}


/* =========================================================
   04. HEADER
========================================================= */

.course-header {

    position: sticky;

    top: 0;

    z-index: 1000;

    background:
        rgba(255, 255, 255, 0.94);

    border-bottom:
        1px solid rgba(226, 232, 240, 0.8);

    backdrop-filter:
        blur(16px);

    -webkit-backdrop-filter:
        blur(16px);

}


/* =========================================================
   NAVBAR
========================================================= */

.course-navbar {
    width: 100%;
}


.course-nav-container {

    width: min(
        calc(100% - 40px),
        1250px
    );

    min-height: 76px;

    margin: 0 auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 30px;

}


/* =========================================================
   BRAND
========================================================= */

.course-brand {

    display: flex;

    align-items: center;

    gap: 12px;

    flex-shrink: 0;

}


.brand-symbol {

    width: 43px;
    height: 43px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            #0f172a,
            #2563eb
        );

    color: white;

    font-size: 0.78rem;

    font-weight: 900;

    letter-spacing: 0.5px;

    box-shadow:
        0 7px 18px
        rgba(37, 99, 235, 0.22);

}


.brand-text {

    display: flex;

    flex-direction: column;

    line-height: 1.1;

}


.brand-text strong {

    color: var(--primary);

    font-size: 0.9rem;

    letter-spacing: 0.5px;

}


.brand-text small {

    margin-top: 5px;

    color: var(--text-light);

    font-size: 0.64rem;

    letter-spacing: 0.4px;

}


/* =========================================================
   NAVIGATION
========================================================= */

.course-nav-menu {

    display: flex;

    align-items: center;

    gap: 4px;

    list-style: none;

}


.course-nav-menu a {

    display: inline-flex;

    align-items: center;

    padding: 9px 13px;

    border-radius: 8px;

    color: var(--text-light);

    font-size: 0.78rem;

    font-weight: 650;

    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;

}


.course-nav-menu a:hover {

    color: var(--accent);

    background: var(--accent-light);

}


.course-nav-menu li:first-child a {

    color: var(--accent);

}


/* =========================================================
   MOBILE MENU
========================================================= */

.course-menu-toggle {

    display: none;

    width: 42px;
    height: 42px;

    border:
        1px solid var(--border);

    border-radius: 9px;

    background: white;

    color: var(--primary);

    cursor: pointer;

    font-size: 1.1rem;

}


/* =========================================================
   05. HERO
========================================================= */

.course-page-hero {

    position: relative;

    overflow: hidden;

    padding:
        105px 0 85px;

    background:

        radial-gradient(
            circle at 85% 15%,
            rgba(37, 99, 235, 0.12),
            transparent 30%
        ),

        radial-gradient(
            circle at 10% 80%,
            rgba(14, 165, 233, 0.08),
            transparent 30%
        ),

        linear-gradient(
            135deg,
            #f8fafc 0%,
            #eff6ff 55%,
            #ffffff 100%
        );

}


.course-page-hero::before {

    content: "";

    position: absolute;

    width: 320px;
    height: 320px;

    right: -130px;
    top: -140px;

    border-radius: 50%;

    border:
        1px solid
        rgba(37, 99, 235, 0.12);

}


.course-page-hero .course-container {

    position: relative;

    z-index: 2;

}


/* =========================================================
   BACK LINK
========================================================= */

.back-link {

    display: inline-flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 32px;

    padding: 8px 13px;

    border:
        1px solid
        rgba(37, 99, 235, 0.15);

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.7);

    color: var(--accent);

    font-size: 0.76rem;

    font-weight: 750;

    transition:
        background 0.2s ease,
        transform 0.2s ease;

}


.back-link:hover {

    background: white;

    transform: translateX(-3px);

}


/* =========================================================
   COURSE LABEL
========================================================= */

.course-label {

    display: inline-flex;

    align-items: center;

    padding: 7px 12px;

    border:
        1px solid
        #bfdbfe;

    border-radius: 999px;

    background:
        #dbeafe;

    color:
        #1d4ed8;

    font-size: 0.67rem;

    font-weight: 850;

    letter-spacing: 1.2px;

}


/* =========================================================
   HERO TITLE
========================================================= */

.course-page-hero h1 {

    max-width: 850px;

    margin-top: 20px;

    color: var(--primary);

    font-size:
        clamp(3rem, 7vw, 5.8rem);

    font-weight: 850;

    letter-spacing: -0.055em;

    line-height: 0.98;

}


.course-code {

    margin-top: 18px;

    color: var(--accent);

    font-size: 0.95rem;

    font-weight: 850;

    letter-spacing: 1.2px;

}


.course-introduction {

    max-width: 760px;

    margin-top: 22px;

    color: var(--text-light);

    font-size: 1.05rem;

    line-height: 1.85;

}


/* =========================================================
   COURSE META
========================================================= */

.course-meta-grid {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 14px;

    margin-top: 40px;

}


.meta-card {

    position: relative;

    padding: 20px;

    border:
        1px solid
        rgba(226, 232, 240, 0.9);

    border-radius: 13px;

    background:
        rgba(255, 255, 255, 0.78);

    box-shadow:
        var(--shadow-sm);

    backdrop-filter:
        blur(8px);

}


.meta-card::before {

    content: "";

    position: absolute;

    left: 0;
    top: 15px;
    bottom: 15px;

    width: 3px;

    border-radius: 5px;

    background:
        var(--accent);

}


.meta-card span {

    display: block;

    margin-bottom: 6px;

    color: var(--text-light);

    font-size: 0.68rem;

    font-weight: 600;

}


.meta-card strong {

    color: var(--primary);

    font-size: 0.9rem;

    font-weight: 800;

}


/* =========================================================
   06. COURSE INFORMATION
========================================================= */

.course-information {

    padding: 95px 0;

    background: white;

}


.course-layout {

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        290px;

    gap: 65px;

    align-items: start;

}


.course-main {

    min-width: 0;

}


/* =========================================================
   SECTION
========================================================= */

.course-section {

    position: relative;

    margin-bottom: 85px;

    scroll-margin-top: 110px;

}


.section-label {

    display: inline-flex;

    align-items: center;

    gap: 8px;

    color: var(--accent);

    font-size: 0.67rem;

    font-weight: 850;

    letter-spacing: 1.5px;

}


.section-label::before {

    content: "";

    width: 22px;
    height: 2px;

    border-radius: 3px;

    background: var(--accent);

}


.course-section h2 {

    margin-top: 9px;

    margin-bottom: 20px;

    color: var(--primary);

    font-size: 2.15rem;

    font-weight: 820;

    letter-spacing: -0.035em;

    line-height: 1.2;

}


.course-section > p {

    max-width: 820px;

    color: var(--text-light);

    font-size: 0.96rem;

    line-height: 1.9;

}


.course-section > p + p {

    margin-top: 15px;

}


/* =========================================================
   07. LEARNING OUTCOMES
========================================================= */

.outcomes-list {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 14px;

    margin-top: 28px;

}


.outcome-card {

    display: flex;

    align-items: flex-start;

    gap: 16px;

    padding: 21px;

    border:
        1px solid
        var(--border);

    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            #ffffff,
            #f8fafc
        );

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;

}


.outcome-card:hover {

    transform: translateY(-4px);

    border-color:
        #bfdbfe;

    box-shadow:
        var(--shadow);

}


.outcome-card > span {

    width: 34px;
    height: 34px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background:
        var(--accent-light);

    color: var(--accent);

    font-size: 0.65rem;

    font-weight: 900;

}


.outcome-card p {

    color: var(--text);

    font-size: 0.82rem;

    line-height: 1.65;

}


/* =========================================================
   08. FACULTY CARD
========================================================= */

.faculty-card {

    display: flex;

    align-items: center;

    gap: 22px;

    margin-top: 28px;

    padding: 25px;

    border:
        1px solid
        var(--border);

    border-radius: 17px;

    background: white;

    box-shadow:
        var(--shadow-sm);

}


.faculty-avatar {

    width: 76px;
    height: 76px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 20px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--accent)
        );

    color: white;

    font-size: 1.15rem;

    font-weight: 900;

    box-shadow:
        0 10px 25px
        rgba(37, 99, 235, 0.18);

}


.faculty-information h3 {

    color: var(--primary);

    font-size: 1.05rem;

}


.faculty-information p {

    margin-top: 3px;

    color: var(--text-light);

    font-size: 0.82rem;

}


.faculty-information > span {

    display: block;

    margin-top: 3px;

    color: var(--accent);

    font-size: 0.72rem;

    font-weight: 750;

}


.faculty-links {

    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    margin-top: 13px;

}


.faculty-links a {

    padding: 6px 10px;

    border:
        1px solid
        var(--border);

    border-radius: 7px;

    color: var(--text);

    font-size: 0.68rem;

    font-weight: 700;

    transition: 0.2s ease;

}


.faculty-links a:hover {

    border-color:
        #bfdbfe;

    background:
        var(--accent-light);

    color:
        var(--accent);

}


/* =========================================================
   09. RESOURCE LIST
========================================================= */

.resource-list {

    display: flex;

    flex-direction: column;

    gap: 12px;

    margin-top: 28px;

}


/* =========================================================
   RESOURCE CARD
========================================================= */

.resource-card {

    position: relative;

    display: flex;

    align-items: center;

    gap: 17px;

    padding: 17px;

    border:
        1px solid
        var(--border);

    border-radius: 13px;

    background: white;

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;

}


.resource-card:hover {

    transform:
        translateY(-2px);

    border-color:
        #bfdbfe;

    box-shadow:
        var(--shadow);

}


/* =========================================================
   RESOURCE ICON
========================================================= */

.resource-icon {

    width: 49px;
    height: 49px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background:
        linear-gradient(
            145deg,
            #eff6ff,
            #dbeafe
        );

    color: var(--accent);

    font-size: 0.67rem;

    font-weight: 900;

    letter-spacing: 0.5px;

}


/* =========================================================
   RESOURCE INFORMATION
========================================================= */

.resource-information {

    flex: 1;

    min-width: 0;

}


.resource-information h3 {

    margin-bottom: 4px;

    color: var(--primary);

    font-size: 0.91rem;

    font-weight: 780;

}


.resource-information p {

    color: var(--text-light);

    font-size: 0.75rem;

    line-height: 1.55;

}


/* =========================================================
   RESOURCE BUTTON
========================================================= */

.resource-button {

    flex-shrink: 0;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-width: 60px;

    padding: 8px 13px;

    border-radius: 8px;

    background:
        var(--primary);

    color: white;

    font-size: 0.67rem;

    font-weight: 800;

    transition:
        background 0.2s ease,
        transform 0.2s ease;

}


.resource-button:hover {

    background:
        var(--accent);

    transform:
        translateY(-1px);

}


/* =========================================================
   10. EXTERNAL LINKS
========================================================= */

.external-links {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 12px;

    margin-top: 28px;

}


.external-links a {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    padding: 17px;

    border:
        1px solid
        var(--border);

    border-radius: 12px;

    background:
        var(--surface);

    color: var(--primary);

    font-size: 0.76rem;

    font-weight: 750;

    transition:
        0.25s ease;

}


.external-links a:hover {

    border-color:
        #bfdbfe;

    background:
        var(--accent-light);

    color:
        var(--accent);

    transform:
        translateY(-3px);

}


.external-links strong {

    color:
        var(--accent);

    font-size: 1rem;

}


/* =========================================================
   11. SIDEBAR
========================================================= */

.course-sidebar {

    position: sticky;

    top: 105px;

}


/* =========================================================
   SIDEBAR CARD
========================================================= */

.sidebar-card {

    margin-bottom: 16px;

    padding: 22px;

    border:
        1px solid
        var(--border);

    border-radius: 15px;

    background: white;

    box-shadow:
        var(--shadow-sm);

}


.sidebar-card h3 {

    margin-bottom: 12px;

    color: var(--primary);

    font-size: 0.9rem;

    font-weight: 800;

}


.sidebar-card > a {

    position: relative;

    display: block;

    padding: 8px 0;

    border-bottom:
        1px solid
        var(--border-light);

    color: var(--text-light);

    font-size: 0.74rem;

    font-weight: 650;

    transition:
        color 0.2s ease,
        padding-left 0.2s ease;

}


.sidebar-card > a:last-child {

    border-bottom: none;

}


.sidebar-card > a:hover {

    padding-left: 5px;

    color:
        var(--accent);

}


/* =========================================================
   SIDEBAR HIGHLIGHT
========================================================= */

.sidebar-highlight {

    position: relative;

    overflow: hidden;

    border: none;

    background:
        linear-gradient(
            145deg,
            #0f172a,
            #172554
        );

    box-shadow:
        0 20px 45px
        rgba(15, 23, 42, 0.18);

}


.sidebar-highlight::after {

    content: "";

    position: absolute;

    width: 150px;
    height: 150px;

    right: -70px;
    bottom: -70px;

    border-radius: 50%;

    border:
        1px solid
        rgba(147, 197, 253, 0.18);

}


.sidebar-highlight > span {

    position: relative;

    z-index: 2;

    color:
        #93c5fd;

    font-size: 0.67rem;

    font-weight: 850;

    letter-spacing: 1px;

}


.sidebar-highlight h3 {

    position: relative;

    z-index: 2;

    margin-top: 7px;

    color: white;

    font-size: 1.25rem;

}


.sidebar-highlight p {

    position: relative;

    z-index: 2;

    margin-top: 4px;

    color:
        #cbd5e1;

    font-size: 0.74rem;

}


.sidebar-highlight > a {

    position: relative;

    z-index: 2;

    margin-top: 16px;

    padding: 0;

    border: none;

    color: white;

    font-size: 0.72rem;

}


.sidebar-highlight > a:hover {

    padding-left: 0;

    color:
        #93c5fd;

}


/* =========================================================
   12. CTA
========================================================= */

.course-cta {

    position: relative;

    overflow: hidden;

    padding: 105px 0;

    text-align: center;

    background:
        linear-gradient(
            135deg,
            #f8fafc,
            #eff6ff
        );

}


.course-cta::before {

    content: "";

    position: absolute;

    width: 300px;
    height: 300px;

    left: -150px;
    top: -150px;

    border-radius: 50%;

    background:
        rgba(37, 99, 235, 0.08);

}


.course-cta .course-container {

    position: relative;

    z-index: 2;

}


.course-cta h2 {

    max-width: 700px;

    margin: 12px auto 15px;

    color: var(--primary);

    font-size:
        clamp(2rem, 4vw, 3rem);

    font-weight: 830;

    letter-spacing: -0.04em;

    line-height: 1.15;

}


.course-cta p {

    max-width: 680px;

    margin: 0 auto 28px;

    color: var(--text-light);

    font-size: 0.92rem;

    line-height: 1.8;

}


/* =========================================================
   CTA BUTTONS
========================================================= */

.cta-actions {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    flex-wrap: wrap;

}


.cta-primary,
.cta-secondary {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 45px;

    padding: 0 19px;

    border-radius: 9px;

    font-size: 0.73rem;

    font-weight: 800;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;

}


.cta-primary {

    background:
        var(--primary);

    color: white;

}


.cta-primary:hover {

    background:
        var(--accent);

    transform:
        translateY(-2px);

    box-shadow:
        0 10px 25px
        rgba(37, 99, 235, 0.2);

}


.cta-secondary {

    border:
        1px solid
        var(--border);

    background: white;

    color: var(--primary);

}


.cta-secondary:hover {

    border-color:
        #bfdbfe;

    color:
        var(--accent);

    transform:
        translateY(-2px);

}


/* =========================================================
   13. FOOTER
========================================================= */

.course-footer {

    padding: 28px 0;

    border-top:
        1px solid
        var(--border);

    background:
        #ffffff;

}


.course-footer .course-container {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

}


.course-footer p {

    color:
        var(--text-light);

    font-size: 0.68rem;

}


.course-footer p:last-child {

    color:
        #94a3b8;

}


/* =========================================================
   14. FOCUS ACCESSIBILITY
========================================================= */

a:focus-visible,
button:focus-visible {

    outline:
        3px solid
        rgba(37, 99, 235, 0.25);

    outline-offset: 3px;

}


/* =========================================================
   15. RESPONSIVE — TABLET
========================================================= */

@media (max-width: 1000px) {


    .course-nav-menu {

        gap: 0;

    }


    .course-nav-menu a {

        padding:
            8px 8px;

        font-size:
            0.7rem;

    }


    .course-meta-grid {

        grid-template-columns:
            repeat(2, 1fr);

    }


    .course-layout {

        grid-template-columns:
            minmax(0, 1fr);

        gap: 40px;

    }


    .course-sidebar {

        position: static;

        order: -1;

    }


    .external-links {

        grid-template-columns:
            repeat(2, 1fr);

    }

}


/* =========================================================
   16. RESPONSIVE — MOBILE NAVIGATION
========================================================= */

@media (max-width: 760px) {


    .course-nav-container {

        min-height: 68px;

    }


    .course-menu-toggle {

        display: flex;

        align-items: center;

        justify-content: center;

    }


    .course-nav-menu {

        position: absolute;

        left: 20px;
        right: 20px;

        top: 76px;

        display: none;

        flex-direction: column;

        align-items: stretch;

        gap: 4px;

        padding: 10px;

        border:
            1px solid
            var(--border);

        border-radius: 14px;

        background:
            rgba(255,255,255,0.98);

        box-shadow:
            var(--shadow-lg);

    }


    .course-nav-menu.is-open {

        display: flex;

    }


    .course-nav-menu a {

        display: block;

        padding: 12px;

        font-size:
            0.78rem;

    }


    .brand-text small {

        display: none;

    }


    .course-page-hero {

        padding:
            80px 0 65px;

    }


    .course-page-hero h1 {

        font-size:
            clamp(2.8rem, 14vw, 4.2rem);

    }


    .course-introduction {

        font-size:
            0.94rem;

    }


    .course-information {

        padding:
            70px 0;

    }


    .course-section {

        margin-bottom:
            65px;

    }


    .course-section h2 {

        font-size:
            1.8rem;

    }


    .outcomes-list {

        grid-template-columns:
            1fr;

    }


    .external-links {

        grid-template-columns:
            1fr;

    }

}


/* =========================================================
   17. RESPONSIVE — SMALL MOBILE
========================================================= */

@media (max-width: 560px) {


    .course-container {

        width:
            min(
                calc(100% - 28px),
                var(--container)
            );

    }


    .course-nav-container {

        width:
            calc(100% - 28px);

    }


    .course-brand {

        gap: 9px;

    }


    .brand-symbol {

        width: 39px;
        height: 39px;

        font-size: 0.7rem;

    }


    .brand-text strong {

        font-size:
            0.78rem;

    }


    .course-meta-grid {

        grid-template-columns:
            1fr;

    }


    .meta-card {

        padding:
            17px;

    }


    .faculty-card {

        align-items:
            flex-start;

        flex-direction:
            column;

    }


    .faculty-avatar {

        width: 62px;
        height: 62px;

        border-radius: 16px;

    }


    .resource-card {

        align-items:
            flex-start;

        flex-wrap:
            wrap;

        padding:
            15px;

    }


    .resource-information {

        width:
            calc(100% - 68px);

    }


    .resource-button {

        width:
            100%;

        margin-top:
            2px;

    }


    .sidebar-card {

        padding:
            18px;

    }


    .course-cta {

        padding:
            75px 0;

    }


    .course-footer .course-container {

        align-items:
            flex-start;

        flex-direction:
            column;

    }

}

.faculty-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
}

.faculty-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================================
   PMAI LAB — NAVBAR LOGO
========================================================= */

.navbar-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    height: 48px;
}

.logo-symbol {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-symbol svg {
    width: 100%;
    height: 100%;
    display: block;
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
}

.logo-main {
    font-size: 20px;
    font-weight: 800;
    white-space: nowrap;
}

.logo-sub {
    margin-top: 3px;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

/* =========================================================
   18. REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {

        transition:
            none !important;

        animation:
            none !important;

    }

}
