/*
 * UNDAR Modern Campus — visual refresh layer.
 * Additive stylesheet loaded after main.css. No content or database changes.
 * Uses the existing local UNDAR building watermark (small WebP, cached by browser).
 */

:root {
    --undar-accent-soft: #e9f5f2;
    --undar-soft: #f3f8f7;
    --undar-line: #dce9e6;
    --undar-shadow-sm: 0 7px 22px rgba(4, 73, 66, .055);
    --undar-shadow: 0 16px 42px rgba(4, 73, 66, .095);
    --undar-radius-sm: 12px;
    --undar-radius: 18px;
    --undar-radius-lg: 26px;
}

body.undar-campus-theme {
    color: var(--undar-ink);
    background: #fff;
    font-size: 15px;
    line-height: 1.68;
    overflow-x: hidden;
}

body.undar-campus-theme h1,
body.undar-campus-theme h2,
body.undar-campus-theme h3,
body.undar-campus-theme h4 {
    letter-spacing: -.035em;
    line-height: 1.16;
}

body.undar-campus-theme .undar-container {
    width: min(calc(100% - 40px), 1180px);
}

body.undar-campus-theme .section {
    padding-block: clamp(42px, 5.5vw, 72px);
}

/* Header: preserve existing navigation and mobile menu behavior. */
body.undar-campus-theme .utility-bar {
    background: var(--undar-primary-deep);
}

body.undar-campus-theme .main-header {
    background: rgba(255,255,255,.97);
    border-bottom: 1px solid rgba(7, 83, 75, .09);
    box-shadow: 0 5px 18px rgba(5, 57, 52, .045);
}

body.undar-campus-theme .main-header__inner {
    min-height: 70px;
}

body.undar-campus-theme .primary-menu > li > a {
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
}

body.undar-campus-theme .primary-menu .sub-menu {
    border: 1px solid var(--undar-line);
    border-radius: 14px;
    box-shadow: 0 16px 36px rgba(3, 55, 50, .12);
}

body.undar-campus-theme .header-search-toggle {
    border-color: var(--undar-line);
}

/* Shared teal hero language. */
body.undar-campus-theme .sprint3-hero,
body.undar-campus-theme .page-hero,
body.undar-campus-theme .academic-archive-hero,
body.undar-campus-theme .academic-detail-hero,
body.undar-campus-theme .pmb-center-hero,
body.undar-campus-theme .contact-hero,
body.undar-campus-theme .related-links-hero,
body.undar-campus-theme .undar-search-hero,
body.undar-campus-theme .v12-detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background-color: var(--undar-primary-deep);
    background-image:
        radial-gradient(circle at 86% 8%, rgba(255,255,255,.10) 0 130px, transparent 132px),
        linear-gradient(90deg, rgba(4, 76, 69, .985) 0%, rgba(5, 100, 89, .94) 52%, rgba(8, 127, 112, .76) 100%),
        url('../images/undar-hero-building.webp');
    background-repeat: no-repeat;
    background-position: right -45px top -80px, center, right 4vw center;
    background-size: 430px 430px, cover, min(62vw, 790px) auto;
    border-bottom-color: rgba(255,255,255,.12);
}

body.undar-campus-theme .sprint3-hero::before,
body.undar-campus-theme .page-hero::after,
body.undar-campus-theme .academic-archive-hero::after,
body.undar-campus-theme .academic-detail-hero::after {
    border-color: rgba(255,255,255,.12);
    box-shadow: 0 0 0 42px rgba(255,255,255,.025), 0 0 0 84px rgba(255,255,255,.015);
}

body.undar-campus-theme .sprint3-hero__grid {
    position: relative;
    z-index: 1;
    min-height: clamp(470px, 66vh, 620px);
    padding-block: clamp(54px, 7vw, 84px);
}

body.undar-campus-theme .sprint3-hero .eyebrow,
body.undar-campus-theme .page-hero .eyebrow,
body.undar-campus-theme .academic-archive-hero .eyebrow,
body.undar-campus-theme .academic-detail-hero .eyebrow,
body.undar-campus-theme .related-links-hero .section-kicker,
body.undar-campus-theme .related-links-hero .eyebrow,
body.undar-campus-theme .pmb-center-hero .section-kicker,
body.undar-campus-theme .contact-hero .section-kicker,
body.undar-campus-theme .undar-search-hero .section-kicker {
    color: #bfe9e1;
}

body.undar-campus-theme .sprint3-hero h1,
body.undar-campus-theme .page-hero h1,
body.undar-campus-theme .academic-archive-hero h1,
body.undar-campus-theme .academic-detail-hero h1,
body.undar-campus-theme .related-links-hero h1,
body.undar-campus-theme .pmb-center-hero h1,
body.undar-campus-theme .contact-hero h1,
body.undar-campus-theme .undar-search-hero h1,
body.undar-campus-theme .v12-detail-hero h1 {
    color: #fff;
    font-size: clamp(34px, 4.5vw, 54px);
    line-height: 1.08;
    text-wrap: balance;
}

body.undar-campus-theme .sprint3-hero__lead,
body.undar-campus-theme .academic-archive-hero p:not(.eyebrow),
body.undar-campus-theme .academic-detail-hero__lead,
body.undar-campus-theme .related-links-hero p,
body.undar-campus-theme .pmb-center-hero p,
body.undar-campus-theme .contact-hero p,
body.undar-campus-theme .undar-search-hero p {
    color: rgba(255,255,255,.88);
}

body.undar-campus-theme .sprint3-hero__lead {
    max-width: 610px;
    font-size: clamp(16px, 1.55vw, 19px);
    line-height: 1.72;
}

body.undar-campus-theme .hero-trustline {
    color: rgba(255,255,255,.82);
}

body.undar-campus-theme .campus-orbit {
    border-color: rgba(255,255,255,.13);
}

body.undar-campus-theme .campus-card {
    transform: none;
    border-color: rgba(255,255,255,.24);
    background: rgba(255,255,255,.12);
    box-shadow: 0 18px 48px rgba(0,35,31,.18);
    backdrop-filter: blur(12px);
}

body.undar-campus-theme .campus-card strong,
body.undar-campus-theme .campus-card > span:last-child {
    color: #fff;
}

body.undar-campus-theme .campus-card > span:last-child {
    opacity: .78;
}

body.undar-campus-theme .academic-archive-hero__grid,
body.undar-campus-theme .academic-detail-hero__grid {
    min-height: 360px;
    padding-block: clamp(48px, 6vw, 76px);
}

body.undar-campus-theme .academic-archive-hero__stat {
    min-height: 174px;
    max-width: 240px;
    justify-self: end;
    border-color: rgba(255,255,255,.28);
    border-radius: 22px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 16px 38px rgba(0,38,34,.18);
}

body.undar-campus-theme .academic-archive-hero__stat strong {
    font-size: clamp(48px, 6vw, 68px);
}

body.undar-campus-theme .academic-detail-hero__visual,
body.undar-campus-theme .academic-detail-hero__logo-wrap {
    border-color: rgba(255,255,255,.24);
}

/* Soft section backgrounds: teal-tinted white, never yellow-beige. */
body.undar-campus-theme .section--soft,
body.undar-campus-theme .academic-listing,
body.undar-campus-theme .academic-detail-content,
body.undar-campus-theme .faculty-section,
body.undar-campus-theme .programs-section {
    background: #fff;
}

body.undar-campus-theme .academic-program-section,
body.undar-campus-theme .related-programs,
body.undar-campus-theme .portal-hub-section,
body.undar-campus-theme .contact-main-section {
    background: linear-gradient(180deg, #f5faf8 0%, #fff 100%);
}

/* Home page: restrained cards and compact section hierarchy. */
body.undar-campus-theme .quick-access__panel {
    gap: 20px;
    padding: clamp(18px, 2.8vw, 28px);
    border-radius: 22px;
    box-shadow: 0 14px 36px rgba(4,73,66,.085);
}

body.undar-campus-theme .quick-access__grid {
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.undar-campus-theme .quick-card {
    min-height: 76px;
    padding: 12px 14px;
    border-radius: 14px;
    box-shadow: none;
}

body.undar-campus-theme .quick-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 9px 22px rgba(4,73,66,.08);
}

body.undar-campus-theme .quick-card__icon {
    border-radius: 50%;
    background: #edf6f3;
}

body.undar-campus-theme .section-heading {
    margin-bottom: 26px;
}

body.undar-campus-theme .section-heading h2,
body.undar-campus-theme .about-undar__content h2,
body.undar-campus-theme .pmb-cta h2 {
    font-size: clamp(25px, 3.1vw, 36px);
}

body.undar-campus-theme .section-heading p,
body.undar-campus-theme .section-lead {
    font-size: 14px;
    line-height: 1.7;
}

body.undar-campus-theme .campus-stats {
    padding-block: 14px 34px;
}

body.undar-campus-theme .stat-card {
    min-height: 92px;
}

body.undar-campus-theme .stat-card--accent {
    background: linear-gradient(145deg, var(--undar-primary-deep), var(--undar-primary));
}

body.undar-campus-theme .stat-card--accent strong,
body.undar-campus-theme .stat-card--accent span {
    color: #fff;
}

/* Faculty and Program Studi cards: small headings, white surfaces, teal accents. */
body.undar-campus-theme .faculty-grid,
body.undar-campus-theme .faculty-directory-grid,
body.undar-campus-theme .program-grid,
body.undar-campus-theme .program-directory-grid,
body.undar-campus-theme .academic-program-grid {
    gap: 16px;
}

body.undar-campus-theme .faculty-directory-grid,
body.undar-campus-theme .program-directory-grid,
body.undar-campus-theme .academic-program-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.undar-campus-theme .faculty-directory-card,
body.undar-campus-theme .program-directory-card,
body.undar-campus-theme .academic-program-card,
body.undar-campus-theme .faculty-card,
body.undar-campus-theme .program-card,
body.undar-campus-theme .news-card {
    border-radius: 17px;
    box-shadow: 0 7px 22px rgba(4,73,66,.055);
}

body.undar-campus-theme .faculty-directory-card__visual {
    min-height: 170px;
    background: linear-gradient(145deg, #edf7f4, #f9fcfb);
}

body.undar-campus-theme .faculty-directory-card__visual > img:not(.faculty-directory-card__logo) {
    height: 180px;
    padding: 10px;
    object-fit: contain;
}

body.undar-campus-theme .faculty-directory-card__body,
body.undar-campus-theme .program-directory-card {
    padding: 18px;
}

body.undar-campus-theme .faculty-directory-card__body h2,
body.undar-campus-theme .program-directory-card h3,
body.undar-campus-theme .academic-program-card h3,
body.undar-campus-theme .faculty-card h3,
body.undar-campus-theme .program-card h3,
body.undar-campus-theme .news-card h3 {
    margin: 8px 0 9px;
    font-size: clamp(16px, 1.45vw, 19px);
    line-height: 1.32;
    letter-spacing: -.02em;
}

body.undar-campus-theme .faculty-directory-card__meta {
    margin: 12px 0;
}

body.undar-campus-theme .faculty-directory-card__meta span {
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 11px;
}

body.undar-campus-theme .faculty-directory-card__leader {
    margin-bottom: 12px;
    padding-top: 11px;
}

body.undar-campus-theme .faculty-directory-card__leader strong {
    font-size: 12px;
    line-height: 1.5;
}

body.undar-campus-theme .program-directory-card,
body.undar-campus-theme .academic-program-card {
    min-height: 245px;
    padding-top: 18px;
}

body.undar-campus-theme .program-directory-card::before,
body.undar-campus-theme .academic-program-card::before,
body.undar-campus-theme .program-card::before {
    height: 4px;
}

body.undar-campus-theme .program-directory-card__head,
body.undar-campus-theme .academic-program-card__top {
    margin-bottom: 12px;
    padding-top: 3px;
}

body.undar-campus-theme .program-level-badge,
body.undar-campus-theme .academic-program-card__top > span,
body.undar-campus-theme .academic-badges span,
body.undar-campus-theme .program-identity-card__level {
    min-height: 25px;
    padding: 4px 9px;
    font-size: 10px;
}

body.undar-campus-theme .program-faculty-group__heading h2 {
    margin-bottom: 12px;
    font-size: clamp(19px, 2vw, 24px);
}

body.undar-campus-theme .program-faculty-group {
    margin-bottom: 34px;
}

body.undar-campus-theme .program-directory-card > p,
body.undar-campus-theme .faculty-directory-card__body > p {
    font-size: 12px;
    line-height: 1.55;
}

body.undar-campus-theme .program-directory-card__footer {
    padding-top: 12px;
}

body.undar-campus-theme .faculty-leadership-section .section-heading h2 {
    font-size: clamp(24px, 3vw, 34px);
}

body.undar-campus-theme .faculty-leadership-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 13px;
}

body.undar-campus-theme .faculty-leadership-card {
    padding: 17px 18px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 16px;
    background: linear-gradient(145deg, var(--undar-primary-deep), var(--undar-primary));
    box-shadow: 0 9px 22px rgba(4,73,66,.10);
}

body.undar-campus-theme .faculty-leadership-card span {
    color: rgba(255,255,255,.76);
    font-size: 10px;
    letter-spacing: .07em;
}

body.undar-campus-theme .faculty-leadership-card strong {
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
}

/* Detail pages and long descriptions. */
body.undar-campus-theme .academic-detail-content__grid {
    gap: clamp(26px, 4vw, 48px);
}

body.undar-campus-theme .academic-rich-content > .section-heading h2,
body.undar-campus-theme .academic-contact-card h2 {
    font-size: clamp(22px, 2.7vw, 30px);
}

body.undar-campus-theme .faculty-profile-block,
body.undar-campus-theme .prodi-structured-panel,
body.undar-campus-theme .career-panel,
body.undar-campus-theme .academic-contact-card {
    border-radius: 17px;
}

body.undar-campus-theme .program-summary-toggle,
body.undar-campus-theme .faculty-summary-toggle {
    border-radius: 999px;
    font-size: 13px;
}

/* News, announcements, agenda, related links and service cards. */
body.undar-campus-theme .news-card,
body.undar-campus-theme .updates-panel,
body.undar-campus-theme .related-link-card,
body.undar-campus-theme .v12-home-card,
body.undar-campus-theme .content-card {
    border-color: var(--undar-line);
    border-radius: 17px;
    box-shadow: 0 7px 22px rgba(4,73,66,.055);
}

body.undar-campus-theme .related-link-card {
    min-height: 108px;
    padding: 18px;
}

body.undar-campus-theme .related-link-card__icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #edf6f3;
}

body.undar-campus-theme .related-link-card h2 {
    font-size: 17px;
}

body.undar-campus-theme .updates-panel__header {
    background: linear-gradient(145deg, var(--undar-primary-deep), var(--undar-primary));
}

body.undar-campus-theme .pmb-cta__card {
    background: linear-gradient(145deg, var(--undar-primary-deep), var(--undar-primary));
}

body.undar-campus-theme .site-footer {
    background: linear-gradient(145deg, #064b44, var(--undar-primary-deep));
}

body.undar-campus-theme .site-footer__grid {
    gap: clamp(22px, 3vw, 42px);
}

body.undar-campus-theme .site-footer__bottom {
    border-top-color: rgba(255,255,255,.13);
}

/* Consistent focus and restrained motion. */
body.undar-campus-theme a,
body.undar-campus-theme button {
    -webkit-tap-highlight-color: transparent;
}

body.undar-campus-theme :focus-visible {
    outline: 3px solid rgba(8,127,112,.38);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
    body.undar-campus-theme .faculty-directory-card,
    body.undar-campus-theme .program-directory-card,
    body.undar-campus-theme .academic-program-card,
    body.undar-campus-theme .faculty-card,
    body.undar-campus-theme .program-card,
    body.undar-campus-theme .quick-card,
    body.undar-campus-theme .news-card,
    body.undar-campus-theme .related-link-card {
        transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    }

    body.undar-campus-theme .faculty-directory-card:hover,
    body.undar-campus-theme .program-directory-card:hover,
    body.undar-campus-theme .academic-program-card:hover,
    body.undar-campus-theme .faculty-card:hover,
    body.undar-campus-theme .program-card:hover,
    body.undar-campus-theme .news-card:hover,
    body.undar-campus-theme .related-link-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 13px 30px rgba(4,73,66,.10);
    }

    @supports (animation-timeline: view()) {
        @media (min-width: 641px) {
            body.undar-campus-theme .faculty-directory-card,
            body.undar-campus-theme .program-directory-card,
            body.undar-campus-theme .academic-program-card,
            body.undar-campus-theme .news-card {
                animation: undar-modern-card-reveal auto linear both;
                animation-timeline: view();
                animation-range: entry 0% entry 24%;
            }
        }
    }
}

@keyframes undar-modern-card-reveal {
    from { opacity: .72; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 960px) {
    body.undar-campus-theme .undar-container {
        width: min(calc(100% - 32px), 1180px);
    }

    body.undar-campus-theme .faculty-directory-grid,
    body.undar-campus-theme .program-directory-grid,
    body.undar-campus-theme .academic-program-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.undar-campus-theme .sprint3-hero__grid {
        gap: 28px;
        grid-template-columns: minmax(0, 1fr) minmax(240px, .8fr);
    }
}

@media (max-width: 640px) {
    body.undar-campus-theme .undar-container {
        width: min(calc(100% - 28px), 1180px);
    }

    body.undar-campus-theme .section {
        padding-block: 38px;
    }

    body.undar-campus-theme .sprint3-hero,
    body.undar-campus-theme .page-hero,
    body.undar-campus-theme .academic-archive-hero,
    body.undar-campus-theme .academic-detail-hero,
    body.undar-campus-theme .pmb-center-hero,
    body.undar-campus-theme .contact-hero,
    body.undar-campus-theme .related-links-hero,
    body.undar-campus-theme .undar-search-hero,
    body.undar-campus-theme .v12-detail-hero {
        background-image:
            linear-gradient(90deg, rgba(4,76,69,.985), rgba(5,100,89,.90)),
            url('../images/undar-hero-building.webp');
        background-position: center, right -130px center;
        background-size: cover, 440px auto;
    }

    body.undar-campus-theme .sprint3-hero__grid {
        min-height: auto;
        padding-block: 46px 40px;
        grid-template-columns: minmax(0, 1fr);
    }

    body.undar-campus-theme .sprint3-hero h1,
    body.undar-campus-theme .page-hero h1,
    body.undar-campus-theme .academic-archive-hero h1,
    body.undar-campus-theme .academic-detail-hero h1,
    body.undar-campus-theme .related-links-hero h1,
    body.undar-campus-theme .pmb-center-hero h1,
    body.undar-campus-theme .contact-hero h1,
    body.undar-campus-theme .undar-search-hero h1 {
        font-size: clamp(30px, 8vw, 40px);
    }

    body.undar-campus-theme .sprint3-hero__lead {
        font-size: 15px;
        margin-bottom: 22px;
    }

    body.undar-campus-theme .sprint3-hero__visual {
        min-height: 190px;
    }

    body.undar-campus-theme .campus-card {
        width: min(100%, 240px);
        min-height: 170px;
        padding: 20px;
        border-radius: 20px;
    }

    body.undar-campus-theme .campus-card__mark {
        width: 58px;
        height: 58px;
        margin-bottom: 10px;
        border-radius: 18px;
        font-size: 30px;
    }

    body.undar-campus-theme .campus-card strong {
        font-size: 19px;
    }

    body.undar-campus-theme .campus-orbit--one {
        width: 220px;
        height: 220px;
    }

    body.undar-campus-theme .campus-orbit--two {
        width: 270px;
        height: 150px;
    }

    body.undar-campus-theme .quick-access {
        margin-top: -22px;
    }

    body.undar-campus-theme .quick-access__grid {
        grid-template-columns: 1fr;
    }

    body.undar-campus-theme .quick-access__heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    body.undar-campus-theme .section-heading--split {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    body.undar-campus-theme .academic-archive-hero__grid,
    body.undar-campus-theme .academic-detail-hero__grid {
        min-height: auto;
        padding-block: 42px 48px;
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    body.undar-campus-theme .academic-archive-hero__stat {
        min-height: 108px;
        max-width: 160px;
        justify-self: start;
        padding: 18px;
        border-radius: 17px;
    }

    body.undar-campus-theme .academic-archive-hero__stat strong {
        font-size: 44px;
    }

    body.undar-campus-theme .faculty-directory-grid,
    body.undar-campus-theme .program-directory-grid,
    body.undar-campus-theme .academic-program-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    body.undar-campus-theme .faculty-directory-card {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
    }

    body.undar-campus-theme .faculty-directory-card__visual {
        min-height: 100%;
        align-self: stretch;
    }

    body.undar-campus-theme .faculty-directory-card__visual > img:not(.faculty-directory-card__logo) {
        height: 100%;
        min-height: 190px;
        padding: 7px;
    }

    body.undar-campus-theme .faculty-directory-card__short {
        right: 6px;
        bottom: 7px;
        padding: 4px 6px;
        font-size: 9px;
    }

    body.undar-campus-theme .faculty-directory-card__body {
        padding: 14px 13px;
    }

    body.undar-campus-theme .faculty-directory-card__body h2 {
        font-size: 15px;
    }

    body.undar-campus-theme .faculty-directory-card__leader {
        display: grid;
        gap: 1px;
        margin: 7px 0 0;
        padding-top: 7px;
    }

    body.undar-campus-theme .faculty-directory-card__leader span {
        font-size: 9px;
    }

    body.undar-campus-theme .faculty-directory-card__leader strong {
        font-size: 10px;
        line-height: 1.35;
    }

    body.undar-campus-theme .program-directory-card,
    body.undar-campus-theme .academic-program-card {
        min-height: 220px;
    }

    body.undar-campus-theme .academic-detail-content__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    body.undar-campus-theme .faculty-leadership-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    body.undar-campus-theme .related-link-card {
        grid-template-columns: 42px minmax(0, 1fr) auto;
        min-height: 88px;
        padding: 14px;
    }

    body.undar-campus-theme .related-link-card__icon {
        width: 40px;
        height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.undar-campus-theme *,
    body.undar-campus-theme *::before,
    body.undar-campus-theme *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
