/* =========================================
   DIGITAL YEARBOOK XII TKJ
   PLAYFUL NEO-BRUTALISM
========================================= */

/* ---------- ROOT & RESET ---------- */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --ink: #171717;
    --cream: #fff4e8;

    --pink: #ffb9d4;
    --pink-dark: #f36b9d;

    --cyan: #a8edfa;
    --cyan-dark: #62cce1;

    --yellow: #ffe36d;
    --purple: #c8b7ff;
    --green: #a9e6bd;

    --border: 2px solid var(--ink);
    --shadow: 6px 6px 0 var(--ink);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;

    background-color: var(--cream);
    color: var(--ink);

    font-family: "Space Grotesk", sans-serif;

    background-image:
        radial-gradient(
            ellipse at 12% 12%,
            rgba(255, 190, 215, 0.7),
            transparent 28%
        ),
        radial-gradient(
            ellipse at 88% 35%,
            rgba(180, 242, 255, 0.75),
            transparent 32%
        ),
        radial-gradient(
            ellipse at 40% 88%,
            rgba(255, 230, 135, 0.55),
            transparent 30%
        ),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='.22'/%3E%3C/svg%3E");

    background-attachment: fixed;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

.wrap,
.topbar,
.hero,
.intro-grid,
.classes,
.memories > .wrap,
.message-section,
.footer {
    width: min(1160px, calc(100% - 48px));
    margin-inline: auto;
}

.section-pad {
    padding-block: 105px;
}


/* ---------- GLOBAL GRAIN ---------- */

.grain {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 20;

    opacity: 0.13;

    background-image:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='.3'/%3E%3C/svg%3E");
}


/* ---------- NAVBAR ---------- */

.topbar {
    height: 88px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: var(--border);

    position: relative;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 14px;
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.04em;
}

.brand small {
    display: block;
    margin-top: 5px;

    font-family: "DM Mono", monospace;
    font-size: 9px;
    letter-spacing: 0.04em;
}

.brand-mark {
    font-size: 34px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 30px;

    font-size: 13px;
    font-weight: 600;
}

.nav a:not(.nav-cta):hover,
.text-link:hover {
    text-decoration: underline;
    text-underline-offset: 5px;
}

.nav-cta {
    padding: 12px 18px;

    border: var(--border);
    border-radius: 30px;

    background: var(--yellow);
    box-shadow: 3px 3px 0 var(--ink);
}

.menu-toggle {
    display: none;

    background: none;
    border: none;

    font-size: 24px;
    cursor: pointer;
}


/* ---------- HERO ---------- */

.hero {
    min-height: 680px;

    position: relative;

    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;

    padding-top: 44px;
    padding-bottom: 75px;
}

.hero-copy {
    position: relative;
    z-index: 2;
}

.eyebrow {
    font-family: "DM Mono", monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.09em;
}

.eyebrow-dot {
    display: inline-block;

    width: 8px;
    height: 8px;

    margin-right: 8px;

    background: var(--pink-dark);
    border-radius: 50%;
}

.hero h1 {
    margin-block: 28px 24px;

    font-size: clamp(56px, 8vw, 104px);
    line-height: 0.83;
    letter-spacing: -0.09em;

    font-weight: 700;
}

.hero h1 em,
.message-panel h2 em {
    font-style: normal;
    color: #ee5c98;
}

.hero h1 .year {
    color: #55bfd7;
}

.hero-desc {
    max-width: 410px;

    font-size: 15px;
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 22px;

    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 22px;

    padding: 15px 20px;

    border: var(--border);
    border-radius: 999px;

    font-size: 12px;
    font-weight: 700;

    box-shadow: 4px 4px 0 var(--ink);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.button:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--ink);
}

.button-dark {
    background: var(--ink);
    color: white;
}

.button-light {
    background: var(--yellow);
    color: var(--ink);
}

.text-link {
    font-size: 12px;
    font-weight: 600;
}

.hero-note {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-top: 55px;

    font-family: "DM Mono", monospace;
    font-size: 9px;
    letter-spacing: 0.07em;
}

.note-star {
    font-size: 25px;
}


/* ---------- HERO ART ---------- */

.hero-art {
    height: 510px;

    position: relative;

    display: grid;
    place-items: center;
}

.photo-frame {
    width: min(390px, 85%);

    padding: 12px;

    background: white;
    border: 3px solid var(--ink);

    transform: rotate(3deg);

    box-shadow: 9px 10px 0 var(--ink);

    position: relative;
    z-index: 2;
}

.photo-top,
.photo-caption {
    display: flex;
    justify-content: space-between;

    padding: 5px 2px 10px;

    font-family: "DM Mono", monospace;
    font-size: 9px;
}

.photo-caption {
    padding: 10px 2px 2px;
}


/* ---------- CLASS ILLUSTRATION ---------- */

.class-illustration {
    height: 300px;

    position: relative;
    overflow: hidden;

    background:
        linear-gradient(
            160deg,
            #a9eaf8 0 57%,
            #f9d5e2 57% 75%,
            #ffe36d 75%
        );

    border: 1px solid #222;
}

.ground {
    position: absolute;
    bottom: 0;

    width: 100%;
    height: 35px;

    background: #8bd1a3;
}

.person {
    position: absolute;
    bottom: 25px;

    width: 48px;
    height: 105px;
}

.person i {
    display: block;

    width: 34px;
    height: 34px;

    margin: auto;

    border-radius: 50%;
    border: 2px solid var(--ink);

    background: #a96843;

    position: relative;
    z-index: 1;
}

.person b {
    display: block;

    width: 48px;
    height: 70px;

    border: 2px solid var(--ink);
    border-radius: 15px 15px 5px 5px;

    background: #242b39;
}

.p1 {
    left: 10%;
}

.p2 {
    left: 27%;
    bottom: 32px;
}

.p2 b {
    background: #f3a8c7;
}

.p3 {
    left: 45%;
    bottom: 20px;
}

.p3 b {
    background: #f6d85d;
}

.p4 {
    left: 63%;
    bottom: 34px;
}

.p4 b {
    background: #3e9eb4;
}

.p5 {
    left: 80%;
    bottom: 24px;
}

.p5 b {
    background: #9e8ce2;
}


/* ---------- FUZZY ORNAMENTS ---------- */

.art-sun {
    position: absolute;
    top: 38px;
    right: 42px;

    width: 100px;
    height: 100px;

    background: var(--yellow);

    border: 2px solid var(--ink);
    border-radius: 50%;
}

.fuzzy {
    position: absolute;

    border: 2px solid var(--ink);

    filter: drop-shadow(5px 6px 0 var(--ink));

    z-index: 1;
}

.fuzzy::before {
    content: "";

    position: absolute;
    inset: 0;

    border-radius: inherit;

    background:
        repeating-linear-gradient(
            35deg,
            rgba(255, 255, 255, 0.3) 0 1px,
            transparent 1px 5px
        ),
        repeating-linear-gradient(
            120deg,
            rgba(255, 255, 255, 0.2) 0 1px,
            transparent 1px 7px
        );

    opacity: 0.8;
}

.fuzzy::after {
    content: "";

    position: absolute;
    inset: 7px;

    border: 1px dashed rgba(23, 23, 23, 0.18);
    border-radius: inherit;
}

.fuzzy-pink {
    width: 190px;
    height: 160px;

    left: 0;
    top: 78px;

    background:
        radial-gradient(
            ellipse at 35% 25%,
            #ffe5ef,
            #ff91bd 70%
        );

    border-radius:
        43% 57% 62% 38% /
        46% 38% 62% 54%;

    box-shadow:
        inset 0 0 0 8px rgba(255, 255, 255, 0.18),
        inset 0 0 22px #ed6f9e;
}

.fuzzy-blue {
    width: 170px;
    height: 145px;

    right: 0;
    bottom: 55px;

    background:
        radial-gradient(
            ellipse at 30% 25%,
            #e6fcff,
            #70d7eb 72%
        );

    border-radius:
        56% 44% 36% 64% /
        42% 57% 43% 58%;

    box-shadow:
        inset 0 0 0 8px rgba(255, 255, 255, 0.22),
        inset 0 0 22px #5bbdd2;
}


/* ---------- STICKERS ---------- */

.sticker {
    position: absolute;
    z-index: 3;

    display: grid;
    place-items: center;

    border: 2px solid var(--ink);

    font-weight: 700;

    box-shadow: 4px 4px 0 var(--ink);
}

.sticker-smile {
    width: 58px;
    height: 58px;

    right: 8%;
    top: 80px;

    border-radius: 50%;
    background: var(--yellow);

    font-size: 34px;

    transform: rotate(12deg);
}

.sticker-star {
    width: 58px;
    height: 58px;

    left: 9%;
    bottom: 70px;

    border-radius: 18px;
    background: var(--pink);

    font-size: 37px;

    transform: rotate(-12deg);
}

.sticker-label {
    right: 4%;
    top: 37%;

    padding: 12px 15px;

    background: white;

    font-family: "DM Mono", monospace;
    font-size: 10px;
    line-height: 1.3;

    transform: rotate(8deg);
}

.scribble {
    position: absolute;
    right: 23%;
    bottom: 13px;

    font-size: 19px;
    font-weight: 700;
    font-style: italic;
    line-height: 0.9;

    transform: rotate(-10deg);
}

.hero-bottom {
    position: absolute;
    bottom: 22px;
    left: 0;
    right: 0;

    display: flex;
    justify-content: space-between;

    font-family: "DM Mono", monospace;
    font-size: 9px;
    letter-spacing: 0.08em;
}


/* ---------- INTRO ---------- */

.intro {
    padding-block: 105px;

    background: #171717;
    color: #fff8ed;
}

.intro-grid {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 30px;
}

.intro .eyebrow {
    color: var(--yellow);
}

.intro h2,
.section-heading h2 {
    margin: 0;

    font-size: clamp(38px, 6vw, 70px);
    line-height: 0.9;
    letter-spacing: -0.07em;
}

.intro h2 span {
    color: var(--pink);
}

.intro-text {
    max-width: 510px;

    margin-top: 25px;

    color: #dedbd5;

    font-size: 14px;
    line-height: 1.7;
}


/* ---------- SECTION HEADINGS ---------- */

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;

    margin-bottom: 35px;
}

.section-heading h2 {
    margin-top: 14px;
}

.section-index {
    font-family: "DM Mono", monospace;
    font-size: 10px;
}


/* ---------- CLASS CARDS ---------- */

.class-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.class-card {
    height: 330px;

    padding: 24px;

    display: flex;
    flex-direction: column;

    position: relative;
    overflow: hidden;

    border: 3px solid var(--ink);

    box-shadow: 7px 7px 0 var(--ink);

    transition: transform 0.18s ease;
}

.class-card:hover {
    transform: translateY(-5px) rotate(-0.5deg);
}

.class-a {
    background: var(--cyan);
}

.class-b {
    background: var(--pink);
}

.card-index {
    font-family: "DM Mono", monospace;
    font-size: 10px;
}

.class-big {
    margin: auto 0;

    font-size: clamp(65px, 9vw, 110px);
    font-weight: 700;
    line-height: 0.78;
    letter-spacing: -0.09em;

    position: relative;
    z-index: 1;
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;

    font-size: 12px;
    font-weight: 600;
}

.card-bottom b {
    font-size: 25px;
}

.card-doodle {
    position: absolute;
    top: 55px;
    right: 20px;

    font-size: 150px;
    opacity: 0.22;
}


/* ---------- MEMORIES ---------- */

.memories {
    background: #fff9f0;
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.memory-card {
    min-height: 310px;

    padding: 20px;

    position: relative;

    border: 2px solid var(--ink);

    box-shadow: 5px 5px 0 var(--ink);

    transition: transform 0.15s ease;
}

.memory-card:hover {
    transform: translateY(-4px);
}

.memory-one {
    background: #c7f3fa;
}

.memory-two {
    background: #ffe58a;
}

.memory-three {
    background: #ffc5dc;
}

.memory-number {
    font-family: "DM Mono", monospace;
    font-size: 10px;
}

.memory-art {
    height: 130px;

    display: grid;
    place-items: center;

    font-size: 76px;
}

.art-camera {
    color: #e75b96;
}

.art-ticket {
    color: #1b1b1b;
}

.art-note {
    color: #7a60c8;
}

.memory-card h3 {
    margin: 8px 0;

    font-size: 22px;
    letter-spacing: -0.04em;
}

.memory-card p {
    max-width: 220px;

    font-size: 12px;
    line-height: 1.5;
}

.memory-arrow {
    position: absolute;
    right: 18px;
    bottom: 17px;

    font-size: 23px;
}


/* ---------- MESSAGE PANEL ---------- */

.message-panel {
    padding: clamp(30px, 7vw, 80px);

    position: relative;
    overflow: hidden;

    background: var(--cyan);

    border: 3px solid var(--ink);
    box-shadow: 8px 8px 0 var(--ink);
}

.message-panel h2 {
    margin: 20px 0;

    font-size: clamp(54px, 9vw, 105px);
    line-height: 0.83;
    letter-spacing: -0.09em;
}

.message-panel > p:not(.eyebrow) {
    max-width: 390px;

    margin-bottom: 25px;

    font-size: 14px;
    line-height: 1.6;
}

.message-deco {
    position: absolute;
    top: 5%;
    right: 7%;

    font-size: clamp(100px, 20vw, 240px);

    color: rgba(255, 255, 255, 0.5);

    transform: rotate(14deg);

    pointer-events: none;
}


/* ---------- FOOTER ---------- */

.footer {
    min-height: 110px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    border-top: var(--border);

    font-family: "DM Mono", monospace;
    font-size: 9px;
}

.footer p {
    font-family: "Space Grotesk", sans-serif;
    font-size: 13px;
    font-style: italic;
}


/* =========================================
   RESPONSIVE — TABLET & MOBILE
========================================= */

@media (max-width: 760px) {

    .wrap,
    .topbar,
    .hero,
    .intro-grid,
    .classes,
    .memories > .wrap,
    .message-section,
    .footer {
        width: min(100% - 32px, 560px);
    }

    .topbar {
        height: 72px;
    }

    .menu-toggle {
        display: block;

        position: relative;
        z-index: 12;

        cursor: pointer;
    }

    .nav {
        display: none;

        position: absolute;
        top: 64px;
        left: 0;
        right: 0;

        padding: 20px;

        background: var(--cream);
        border: var(--border);

        flex-direction: column;
        align-items: stretch;
        gap: 18px;
    }

    .nav.open {
        display: flex;
    }

    .nav-cta {
        text-align: center;
    }

    .hero {
        display: block;

        padding-top: 48px;
        padding-bottom: 70px;
    }

    .hero h1 {
        font-size: clamp(57px, 15vw, 88px);
    }

    .hero-art {
        height: 390px;
        margin-top: 20px;
    }

    .photo-frame {
        width: min(330px, 82%);
    }

    .class-illustration {
        height: 230px;
    }

    .fuzzy-pink {
        width: 130px;
        height: 120px;

        left: 0;
        top: 65px;
    }

    .fuzzy-blue {
        width: 125px;
        height: 110px;

        right: 0;
        bottom: 35px;
    }

    .art-sun {
        width: 65px;
        height: 65px;

        right: 25px;
        top: 25px;
    }

    .sticker-label {
        right: 0;
        top: 40%;
    }

    .hero-bottom {
        bottom: 15px;
    }

    .section-pad,
    .intro {
        padding-block: 72px;
    }

    .intro-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .section-heading h2 {
        font-size: 48px;
    }

    .class-grid {
        gap: 14px;
    }

    .class-card {
        height: 250px;
        padding: 16px;
    }

    .class-big {
        font-size: clamp(53px, 12vw, 80px);
    }

    .card-doodle {
        top: 55px;
        right: 8px;

        font-size: 95px;
    }

    .memory-grid {
        grid-template-columns: 1fr;
    }

    .memory-card {
        min-height: 245px;
    }

    .memory-art {
        height: 90px;
    }

    .message-panel {
        padding: 30px 22px;
    }

    .message-deco {
        top: 18%;
        right: -5%;

        font-size: 130px;
        opacity: 0.55;
    }

    .footer {
        padding-block: 22px;
        flex-wrap: wrap;
    }

    .footer p {
        order: 3;
        width: 100%;
        margin: 0;
    }
}


/* ---------- SMALL PHONES ---------- */

@media (max-width: 380px) {

    .hero h1 {
        font-size: 54px;
    }

    .hero-actions {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .hero-art {
        height: 340px;
    }

    .photo-frame {
        width: 82%;
    }

    .class-illustration {
        height: 200px;
    }

    .sticker-smile {
        width: 45px;
        height: 45px;
        font-size: 27px;
    }

    .sticker-star {
        width: 45px;
        height: 45px;
        font-size: 28px;
    }

    .sticker-label {
        padding: 8px;
        font-size: 8px;
    }

    .class-grid {
        grid-template-columns: 1fr;
    }

    .class-card {
        height: 230px;
    }
}


/* =================================
   CLASS PAGE — XII TKJ A & B
================================= */

.class-page {
    --class-accent: var(--cyan);
    --class-secondary: var(--pink);

    /*
       PENTING:
       class-page tidak boleh menerima background
       dari foto siswa.
    */
    position: relative;
    isolation: isolate;

    background-color: var(--cream);
}

.class-b-theme {
    --class-accent: var(--pink);
    --class-secondary: var(--yellow);
}


/* ---------- CLASS HERO ---------- */

.class-hero {
    width: min(1160px, calc(100% - 48px));
    min-height: 560px;
    margin: auto;

    position: relative;
    overflow: hidden;

    display: flex;
    align-items: center;

    padding-block: 75px;
}

.class-hero-inner {
    width: 70%;
    position: relative;
    z-index: 2;
}

.back-link {
    display: inline-block;
    margin-bottom: 42px;

    font-size: 12px;
    font-weight: 700;
}

.back-link:hover {
    text-decoration: underline;
    text-underline-offset: 5px;
}

.class-hero h1 {
    margin-block: 22px;

    font-size: clamp(52px, 7vw, 88px);
    line-height: 0.86;
    letter-spacing: -0.08em;
}

.class-hero h1 span {
    color: #e95d97;
}

.class-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;

    margin-top: 25px;
}

.class-title-row h2 {
    font-size: clamp(35px, 5vw, 58px);
    letter-spacing: -0.07em;
}

.class-sticker {
    padding: 10px 14px;

    background: var(--yellow);
    border: 2px solid var(--ink);

    font-family: "DM Mono", monospace;
    font-size: 10px;
    font-weight: 700;

    transform: rotate(-5deg);

    pointer-events: none;
}

.class-description {
    max-width: 430px;
    margin-top: 15px;

    font-size: 14px;
    line-height: 1.7;
}

.class-stats {
    display: flex;
    gap: 38px;

    margin-top: 35px;
}

.class-stats div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.class-stats strong {
    font-size: 22px;
    font-weight: 700;
}

.class-stats span {
    font-family: "DM Mono", monospace;
    font-size: 9px;
}


/* ---------- CLASS HERO DECORATION ---------- */

.class-hero-decoration {
    position: absolute;
    top: 0;
    right: 0;

    width: 38%;
    height: 100%;

    /*
       Dekorasi tidak boleh menangkap cursor.
       Ini juga mencegah efek hover/flicker.
    */
    pointer-events: none;

    z-index: 1;
}

.class-orb {
    position: absolute;

    border: 2px solid var(--ink);

    filter: drop-shadow(5px 6px 0 var(--ink));

    pointer-events: none;
}

.orb-one {
    width: 240px;
    height: 210px;

    right: 15px;
    top: 90px;

    background:
        radial-gradient(
            ellipse at 30% 20%,
            #fff1f6,
            #ff9fc3 75%
        );

    border-radius: 42% 58% 60% 40% / 45% 40% 60% 55%;
}

.orb-two {
    width: 180px;
    height: 170px;

    right: 100px;
    bottom: 40px;

    background:
        radial-gradient(
            ellipse at 30% 20%,
            #e8fcff,
            #71d7eb 75%
        );

    border-radius: 56% 44% 36% 64% / 42% 57% 43% 58%;
}

.class-hero-sticker {
    position: absolute;
    z-index: 2;

    right: 10px;
    top: 48%;

    padding: 20px 17px;

    background: var(--yellow);
    border: 2px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);

    font-size: 14px;
    font-weight: 700;
    line-height: 1.1;

    transform: rotate(8deg);

    pointer-events: none;
}

.class-hero-symbol {
    position: absolute;
    z-index: 2;

    right: 43%;
    top: 20%;

    font-size: 55px;

    pointer-events: none;
}


/* ---------- STUDENT SECTION ---------- */

.students-section {
    padding: 90px max(24px, calc((100% - 1160px) / 2));

    background: #fff9f0;

    position: relative;
    isolation: isolate;
}

.students-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 30px;

    margin-bottom: 38px;
}

.students-heading h2 {
    margin-top: 15px;

    font-size: clamp(48px, 7vw, 78px);
    line-height: 0.85;
    letter-spacing: -0.08em;
}

.students-heading > p {
    max-width: 300px;

    font-size: 13px;
    line-height: 1.7;
}


/* ---------- STUDENT GRID ---------- */

.student-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;

    position: relative;
    z-index: 1;
}


/*
   PENTING:
   Student card sekarang menjadi parent positioning
   untuk foto absolute.

   Ini yang mencegah foto siswa mengambil posisi
   relatif terhadap halaman.
*/

.student-card {
    position: relative;

    overflow: hidden;

    background: white;
    border: 2px solid var(--ink);
    box-shadow: 5px 5px 0 var(--ink);

    transition: transform 0.15s ease;

    /*
       Membuat layer card stabil.
    */
    isolation: isolate;
}

.student-card:hover {
    transform: translateY(-4px);
}


/*
   PENTING:
   Area foto menjadi parent langsung untuk
   .student-real-photo.
*/

.student-photo {
    width: 100%;
    height: 300px;

    position: relative;

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f3f3f3;

    isolation: isolate;
}


/*
   FOTO SISWA DARI DATABASE

   Foto hanya boleh memenuhi area
   .student-photo.

   Tidak boleh keluar ke halaman.
*/

.student-real-photo {
    display: block;

    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    max-width: 100%;
    max-height: 100%;

    object-fit: cover;
    object-position: center;

    z-index: 1;

    /*
       Mencegah browser memperlakukan gambar
       sebagai elemen yang mengganggu pointer.
    */
    pointer-events: none;

    /*
       Hilangkan kemungkinan image rendering
       membuat flicker.
    */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;

    transform: translateZ(0);
}


/*
   Background warna siswa berada di area foto,
   BUKAN di halaman.
*/

.student-color-0 {
    background: #b8eff8;
}

.student-color-1 {
    background: #ffc5dc;
}

.student-color-2 {
    background: #ffe58a;
}

.student-color-3 {
    background: #d2c4ff;
}

.student-color-4 {
    background: #bcebc9;
}

.student-color-5 {
    background: #ffd8bd;
}


/*
   Kalau student-color dipasang pada parent
   student-card, batasi agar tidak mengubah
   seluruh halaman.
*/

.student-photo.student-color-0,
.student-photo.student-color-1,
.student-photo.student-color-2,
.student-photo.student-color-3,
.student-photo.student-color-4,
.student-photo.student-color-5 {
    background-clip: padding-box;
}


/* ---------- STUDENT NUMBER ---------- */

.student-number {
    position: absolute;
    top: 13px;
    left: 14px;

    z-index: 4;

    font-family: "DM Mono", monospace;
    font-size: 10px;

    pointer-events: none;
}


/* ---------- STUDENT AVATAR ---------- */

.student-avatar {
    width: 115px;
    height: 115px;

    display: grid;
    place-items: center;

    position: relative;
    z-index: 2;

    border: 3px solid var(--ink);
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.75);

    font-size: 55px;
    font-weight: 700;

    box-shadow: 5px 5px 0 var(--ink);

    pointer-events: none;
}

.student-photo-caption {
    position: absolute;
    bottom: 12px;
    right: 12px;

    z-index: 4;

    font-family: "DM Mono", monospace;
    font-size: 8px;

    pointer-events: none;
}

.student-info {
    position: relative;
    z-index: 5;

    padding: 18px;

    background: white;
}

.student-role {
    font-family: "DM Mono", monospace;
    font-size: 9px;
    color: #8a6380;
}

.student-info h3 {
    margin-top: 8px;

    font-size: 21px;
    letter-spacing: -0.04em;
}

.student-info p {
    min-height: 55px;
    margin-top: 8px;

    font-size: 12px;
    line-height: 1.6;
}

.student-more {
    width: 100%;

    margin-top: 18px;
    padding: 11px;

    border: 1px solid var(--ink);
    background: #f4f0e9;

    font-family: "DM Mono", monospace;
    font-size: 9px;
    font-weight: 500;

    cursor: not-allowed;
    opacity: 0.7;
}


/* ---------- CLASS BOTTOM NOTE ---------- */

.class-bottom-note {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;

    margin-top: 65px;

    text-align: center;
}

.class-bottom-note span {
    font-size: 25px;
}

.class-bottom-note p {
    font-size: 13px;
    font-weight: 600;
}


/* ---------- CLASS PAGE MOBILE ---------- */

@media (max-width: 760px) {

    .class-hero {
        width: min(100% - 32px, 560px);
        min-height: auto;

        display: block;

        padding-block: 40px 320px;
    }

    .class-hero-inner {
        width: 100%;
    }

    .class-hero h1 {
        font-size: clamp(45px, 11vw, 68px);
    }

    .class-hero-decoration {
        top: auto;
        bottom: 0;
        right: 0;

        width: 100%;
        height: 300px;

        pointer-events: none;
    }

    .orb-one {
        width: 190px;
        height: 165px;

        top: 15px;
        right: 25px;
    }

    .orb-two {
        width: 140px;
        height: 130px;

        right: 120px;
        bottom: 5px;
    }

    .class-hero-sticker {
        right: 10px;
        top: 45%;
    }

    .class-hero-symbol {
        right: 65%;
        top: 18%;
    }

    .class-stats {
        gap: 20px;
    }

    .class-stats strong {
        font-size: 17px;
    }

    .students-section {
        padding: 65px 16px;
    }

    .students-heading {
        display: block;
    }

    .students-heading > p {
        margin-top: 20px;
    }

    .student-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .student-photo {
        height: 170px;
    }

    .student-avatar {
        width: 85px;
        height: 85px;
        font-size: 40px;
    }

    .student-info {
        padding: 12px;
    }

    .student-info h3 {
        font-size: 17px;
    }

    .student-info p {
        font-size: 11px;
    }

    .class-bottom-note {
        gap: 9px;
    }

    .class-bottom-note p {
        font-size: 11px;
    }
}

@media (max-width: 390px) {

    .student-grid {
        grid-template-columns: 1fr;
    }

    .student-photo {
        height: 230px;
    }

    .student-info {
        padding: 18px;
    }
}


/* =================================
   YEARBOOK PROFILE PAGE
================================= */

.profile-page {
    min-height: 100vh;
    padding: 40px 6%;
    color: #171717;

    background:
        radial-gradient(
            ellipse at 10% 15%,
            rgba(255, 174, 203, 0.38),
            transparent 40%
        ),
        radial-gradient(
            ellipse at 90% 35%,
            rgba(131, 225, 244, 0.35),
            transparent 42%
        ),
        #fffaf1;

    font-family: "Space Grotesk", sans-serif;
}

.profile-container {
    width: min(1100px, 100%);
    margin: auto;
}

.profile-back {
    display: inline-block;
    margin-bottom: 35px;
    color: #171717;
    font-weight: 700;
    text-decoration: none;
}

.profile-back:hover {
    text-decoration: underline;
}

.profile-hero {
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    align-items: center;
    gap: 45px;
    margin-bottom: 55px;
}

.profile-label {
    font-family: "DM Mono", monospace;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.profile-name {
    margin: 15px 0;
    font-size: clamp(48px, 8vw, 95px);
    line-height: 0.95;
    font-weight: 700;
    letter-spacing: -5px;
}

.profile-nickname {
    font-size: 20px;
    font-weight: 600;
}

.profile-photo {
    min-height: 390px;

    display: flex;
    justify-content: center;
    align-items: center;

    position: relative;
    overflow: hidden;

    border: 3px solid #171717;
    border-radius: 8px;

    background: #ffcfdf;

    box-shadow: 9px 9px 0 #171717;

    font-size: 110px;
    font-weight: 700;
}

.profile-section {
    margin: 35px 0;
    padding: 30px;

    border: 3px solid #171717;
    border-radius: 8px;

    background: #fff;

    box-shadow: 6px 6px 0 #171717;
}

.profile-section h2 {
    margin: 12px 0 20px;

    font-size: clamp(25px, 4vw, 42px);
    line-height: 1.05;
    text-transform: uppercase;
}

.profile-section p {
    font-size: 17px;
    line-height: 1.8;
}

.profile-facts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.profile-fact {
    padding: 20px;

    border: 2px solid #171717;
    border-radius: 6px;

    background: #d9f5fa;
}

.profile-fact small {
    display: block;
    margin-bottom: 8px;

    font-family: "DM Mono", monospace;
    font-size: 11px;
    text-transform: uppercase;
}

.profile-fact strong {
    font-size: 17px;
}

.profile-memory {
    background: #fff0a8;
}

.profile-quote {
    margin-top: 25px;

    font-size: 22px;
    font-weight: 700;
}

@media (max-width: 700px) {

    .profile-page {
        padding: 25px 5%;
    }

    .profile-hero {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .profile-name {
        letter-spacing: -3px;
    }

    .profile-photo {
        min-height: 300px;
    }

    .profile-section {
        padding: 22px;
    }

    .profile-facts {
        grid-template-columns: 1fr;
    }
}


/* =========================================
   PROFILE PAGE — CURRENT LAYOUT
========================================= */

.profile-page {
    padding: 0;
    overflow-x: hidden;
}

.profile-page .topbar {
    width: min(1160px, calc(100% - 48px));
}

.profile-page main {
    width: 100%;
}

.profile-page .profile-hero {
    width: min(1160px, calc(100% - 48px));
    min-height: 620px;
    margin: auto;
    padding-block: 65px;

    display: grid;
    grid-template-columns: 1fr 0.9fr;
    align-items: center;
    gap: 50px;
}

.profile-intro {
    position: relative;
    z-index: 2;
}

.profile-intro .back-link {
    display: inline-block;
    margin-bottom: 45px;

    font-size: 12px;
    font-weight: 700;
}

.profile-intro .eyebrow,
.profile-content .eyebrow {
    font-family: "DM Mono", monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 2px;
}

.profile-intro h1 {
    margin-block: 22px;

    font-size: clamp(65px, 9vw, 112px);
    line-height: 0.83;
    letter-spacing: -0.09em;
    font-weight: 700;
}

.profile-intro h1 em {
    color: #ed639c;
    font-style: normal;
}

.profile-class-label {
    display: inline-block;
    margin-top: 25px;
    padding: 11px 15px;

    background: var(--yellow);
    border: 2px solid var(--ink);

    font-family: "DM Mono", monospace;
    font-size: 10px;
    font-weight: 700;
}


/* ---------- PROFILE PHOTO AREA ---------- */

.profile-photo-area {
    min-height: 470px;
    position: relative;

    display: grid;
    place-items: center;
}

.profile-photo-frame {
    width: min(340px, 85%);
    padding: 13px;

    position: relative;
    z-index: 2;

    background: white;
    border: 3px solid var(--ink);
    box-shadow: 9px 9px 0 var(--ink);

    transform: rotate(3deg);
}

.profile-photo-top,
.profile-photo-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;

    font-family: "DM Mono", monospace;
    font-size: 9px;
    font-weight: 700;
}

.profile-photo-top {
    padding: 5px 2px 12px;
}

.profile-photo-bottom {
    justify-content: center;
    padding: 13px 2px 4px;
}

.profile-photo-placeholder {
    min-height: 340px;

    position: relative;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;

    background:
        radial-gradient(
            circle at 50% 30%,
            #fff8fa,
            transparent 55%
        ),
        #ffc3d9;

    border: 2px solid var(--ink);
}

.profile-initial {
    width: 125px;
    height: 125px;

    display: grid;
    place-items: center;

    border: 3px solid var(--ink);
    border-radius: 50%;

    background: white;
    box-shadow: 5px 5px 0 var(--ink);

    font-size: 65px;
    font-weight: 700;
}

.profile-photo-placeholder > span {
    font-family: "DM Mono", monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
}

.profile-orb {
    position: absolute;
    border: 2px solid var(--ink);

    pointer-events: none;
}

.profile-orb-pink {
    width: 180px;
    height: 180px;

    top: 25px;
    right: 5px;

    background: var(--pink);
    border-radius: 50%;
}

.profile-orb-blue {
    width: 150px;
    height: 150px;

    bottom: 15px;
    left: 5px;

    background: var(--cyan);
    border-radius: 50%;
}

.profile-sticker {
    position: absolute;
    z-index: 3;

    right: 0;
    bottom: 65px;

    padding: 15px;

    background: var(--yellow);
    border: 2px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);

    font-size: 13px;
    font-weight: 700;
    line-height: 1.1;

    transform: rotate(8deg);

    pointer-events: none;
}


/* ---------- PROFILE CONTENT ---------- */

.profile-content {
    width: min(1160px, calc(100% - 48px));
    margin: auto;
    padding: 55px 0 100px;
}

.profile-name-block {
    margin-bottom: 45px;
}

.profile-name-block h2 {
    margin-top: 15px;

    font-size: clamp(48px, 8vw, 92px);
    line-height: 0.9;
    letter-spacing: -0.08em;
}

.profile-nickname {
    margin-top: 15px;

    font-size: 17px;
    font-weight: 600;
}

.profile-role {
    display: inline-block;
    margin-top: 18px;
    padding: 9px 13px;

    background: var(--pink);
    border: 2px solid var(--ink);

    font-family: "DM Mono", monospace;
    font-size: 10px;
    font-weight: 700;
}


/* ---------- DETAIL CARDS ---------- */

.profile-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: stretch;
}

.profile-detail {
    min-width: 0;
    padding: 30px;

    border: 2px solid var(--ink);
    box-shadow: 6px 6px 0 var(--ink);
}

.profile-bio {
    background: var(--cyan);
}

.profile-detail .detail-number {
    font-family: "DM Mono", monospace;
    font-size: 10px;
    font-weight: 700;
}

.profile-detail h3,
.profile-memory h3 {
    margin-block: 25px 20px;

    font-size: clamp(30px, 4vw, 48px);
    line-height: 0.9;
    letter-spacing: -0.06em;
}

.profile-detail > p,
.profile-memory > p:not(.eyebrow) {
    font-size: 14px;
    line-height: 1.8;
}


/* ---------- QUICK FACTS ---------- */

.profile-detail-grid .profile-facts {
    display: block;
    padding: 30px;

    background: var(--pink);
}

.fact-row {
    display: flex;
    flex-direction: column;
    gap: 7px;

    padding: 15px 0;

    border-top: 1px solid rgba(23, 23, 23, 0.35);
}

.fact-row span {
    font-family: "DM Mono", monospace;
    font-size: 9px;
    font-weight: 700;
}

.fact-row strong {
    font-size: 15px;
    line-height: 1.5;
}


/* ---------- MEMORY ---------- */

.profile-content .profile-memory {
    position: relative;
    overflow: hidden;

    margin-top: 35px;
    padding: clamp(30px, 7vw, 75px);

    background: var(--yellow);
    border: 3px solid var(--ink);
    box-shadow: 7px 7px 0 var(--ink);
}

.profile-memory h3 {
    max-width: 650px;
    font-size: clamp(40px, 7vw, 75px);
}

.profile-memory > p:not(.eyebrow) {
    max-width: 650px;
}

.memory-decoration {
    position: absolute;
    top: 20px;
    right: 35px;

    font-size: clamp(60px, 12vw, 130px);
    opacity: 0.18;

    pointer-events: none;
}

.profile-motto {
    display: inline-block;
    margin-top: 30px;
    padding: 13px 18px;

    background: white;
    border: 2px solid var(--ink);

    font-size: 17px;
    font-weight: 700;
}


/* ---------- BACK BUTTON ---------- */

.profile-back-bottom {
    display: flex;
    justify-content: center;
    margin-top: 55px;
}

.profile-back-bottom .button {
    display: inline-block;
    padding: 15px 22px;

    border: 2px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);

    font-size: 12px;
    font-weight: 700;
}

.profile-back-bottom .button-dark {
    background: var(--ink);
    color: white;
}


/* ---------- PROFILE MOBILE ---------- */

@media (max-width: 760px) {

    .profile-page .profile-hero {
        width: min(100% - 32px, 560px);
        min-height: auto;

        grid-template-columns: 1fr;
        gap: 15px;

        padding-block: 40px 20px;
    }

    .profile-intro .back-link {
        margin-bottom: 35px;
    }

    .profile-intro h1 {
        font-size: clamp(58px, 13vw, 85px);
    }

    .profile-photo-area {
        min-height: 420px;
    }

    .profile-photo-frame {
        width: min(310px, 78%);
    }

    .profile-photo-placeholder {
        min-height: 290px;
    }

    .profile-sticker {
        right: 5px;
        bottom: 45px;
    }

    .profile-content {
        width: calc(100% - 32px);
        padding-top: 45px;
    }

    .profile-detail-grid {
        grid-template-columns: 1fr;
    }

    .profile-detail {
        padding: 25px;
    }

    .profile-content .profile-memory {
        padding: 30px 24px;
    }

    .profile-page .footer {
        gap: 20px;
    }
}


/* =========================================
   FOTO SISWA DARI DATABASE
   FIXED — TIDAK BOLEH KELUAR DARI CARD
========================================= */

.student-card .student-real-photo {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
    object-position: center;

    z-index: 1;

    max-width: none;

    pointer-events: none;

    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;

    transform: translateZ(0);
}


/*
   Pastikan foto database hanya berada
   di area foto siswa.
*/

.student-photo > .student-real-photo {
    position: absolute;

    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    width: 100%;
    height: 100%;

    z-index: 1;

    object-fit: cover;

    pointer-events: none;
}


/*
   Jika ada elemen dekorasi di dalam foto,
   jangan sampai menutupi gambar.
*/

.student-photo::before,
.student-photo::after {
    pointer-events: none;
}


/* =========================================
   FOTO PROFIL SISWA DARI DATABASE
========================================= */

.profile-real-photo {
    width: 100%;
    height: 100%;

    display: block;

    position: absolute;

    inset: 0;

    object-fit: cover;
    object-position: center;

    pointer-events: none;

    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;

    transform: translateZ(0);
}


/* =========================================
   FINAL CLASS PAGE SAFETY FIX
========================================= */

/*
   Jangan izinkan gambar apa pun di halaman kelas
   menjadi background halaman.
*/

.class-page img {
    background-image: none;
}


/*
   Dekorasi class hero tidak menangkap mouse.
   Ini mencegah flicker ketika cursor melewati
   orb / sticker / symbol.
*/

.class-hero-decoration,
.class-orb,
.class-hero-sticker,
.class-hero-symbol {
    pointer-events: none !important;
}


/*
   Student card harus selalu menjadi containing block
   untuk elemen absolute di dalamnya.
*/

.student-card {
    position: relative !important;
    overflow: hidden !important;
}


/*
   Student photo harus menjadi containing block
   utama untuk foto database.
*/

.student-photo {
    position: relative !important;
    overflow: hidden !important;
}


/*
   Foto tidak boleh pernah melebar keluar
   dari student-photo.
*/

.student-photo .student-real-photo {
    position: absolute !important;

    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;

    width: 100% !important;
    height: 100% !important;

    max-width: 100% !important;
    max-height: 100% !important;

    object-fit: cover !important;

    z-index: 1 !important;

    pointer-events: none !important;
}


/*
   Nomor dan caption tetap berada di atas foto.
*/

.student-photo .student-number,
.student-photo .student-photo-caption {
    z-index: 5;
    pointer-events: none;
}


/*
   Avatar placeholder juga tidak boleh
   menangkap cursor.
*/

.student-photo .student-avatar {
    z-index: 4;
    pointer-events: none;
}


/*
   Matikan animasi yang mungkin menyebabkan
   gambar berkedip.
*/

.class-page .student-real-photo,
.class-page .class-orb,
.class-page .class-hero-sticker,
.class-page .class-hero-symbol {
    animation: none !important;
}


/*
   Stabilkan rendering elemen dekorasi.
*/

.class-page .class-hero-decoration {
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}


/*
   Pastikan background body tetap background umum
   dan tidak berubah karena gambar siswa.
*/

.class-page {
    background-color: var(--cream) !important;
}


/* =========================================
   END OF STYLE.CSS
========================================= */

/* =========================================================
   FIX VIEW PROFILE - SUPAYA BENAR-BENAR MUDAH DIKLIK
   ========================================================= */

.student-card {
    position: relative;
    z-index: 1;
}

.student-card .student-photo {
    position: relative;
    z-index: 1;
}

.student-card .student-real-photo {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.student-card .student-info,
.student-card .student-content,
.student-card .student-footer,
.student-card .view-profile,
.student-card a {
    position: relative;
    z-index: 10;
}

/* Link View Profile */
.student-card a {
    pointer-events: auto;
    cursor: pointer;
}

/* Kalau tombolnya punya class khusus */
.view-profile {
    position: relative;
    z-index: 20;
    pointer-events: auto;
    cursor: pointer;
}
/* =========================================================
   FINAL MOBILE RESPONSIVE FIX
   DIGITAL YEARBOOK XII TKJ
   ========================================================= */

@media (max-width: 760px) {

    /* =========================
       GLOBAL
       ========================= */

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        font-size: 14px;
    }

    img {
        max-width: 100%;
    }

    .wrap,
    .topbar,
    .hero,
    .intro-grid,
    .classes,
    .memories > .wrap,
    .message-section,
    .footer {
        width: calc(100% - 32px);
        max-width: 560px;
    }

    .section-pad {
        padding-block: 65px;
    }


    /* =========================
       NAVBAR
       ========================= */

    .topbar {
        width: calc(100% - 32px);
        height: 68px;
    }

    .brand {
        font-size: 12px;
    }

    .brand-mark {
        font-size: 28px;
    }

    .brand small {
        font-size: 8px;
    }

    .menu-toggle {
        display: block;
        padding: 6px;
        line-height: 1;
    }

    .nav {
        top: 68px;
        left: 0;
        right: 0;

        width: 100%;

        padding: 18px;

        gap: 16px;

        border: 2px solid var(--ink);
        box-shadow: 5px 5px 0 var(--ink);

        z-index: 100;
    }

    .nav a {
        padding: 8px 4px;
    }

    .nav-cta {
        width: 100%;
    }


    /* =========================
       HOMEPAGE HERO
       ========================= */

    .hero {
        display: block;

        min-height: auto;

        padding-top: 42px;
        padding-bottom: 55px;
    }

    .hero-copy {
        width: 100%;
    }

    .hero h1 {
        margin-block: 22px 20px;

        font-size: clamp(52px, 15vw, 78px);

        line-height: 0.86;
    }

    .hero-desc {
        max-width: 100%;

        font-size: 14px;
        line-height: 1.65;
    }

    .hero-actions {
        flex-wrap: wrap;

        gap: 14px;

        margin-top: 24px;
    }

    .button {
        padding: 13px 17px;

        font-size: 11px;

        gap: 12px;
    }

    .hero-note {
        margin-top: 35px;
    }

    .hero-art {
        width: 100%;
        height: 350px;

        margin-top: 25px;
    }

    .photo-frame {
        width: min(310px, 82%);

        padding: 9px;

        box-shadow: 7px 8px 0 var(--ink);
    }

    .class-illustration {
        height: 220px;
    }

    .hero-bottom {
        font-size: 7px;
    }


    /* =========================
       INTRO
       ========================= */

    .intro {
        padding-block: 65px;
    }

    .intro-grid {
        grid-template-columns: 1fr;

        gap: 22px;
    }

    .intro h2,
    .section-heading h2 {
        font-size: clamp(40px, 12vw, 58px);
    }

    .intro-text {
        font-size: 13px;
    }


    /* =========================
       SECTION HEADING
       ========================= */

    .section-heading {
        align-items: flex-start;
        flex-direction: column;

        gap: 12px;

        margin-bottom: 28px;
    }

    .section-heading h2 {
        margin-top: 8px;
    }


    /* =========================
       CLASS CARD HOMEPAGE
       ========================= */

    .class-grid {
        grid-template-columns: 1fr 1fr;

        gap: 12px;
    }

    .class-card {
        width: 100%;
        height: 230px;

        padding: 15px;

        box-shadow: 5px 5px 0 var(--ink);
    }

    .class-big {
        font-size: clamp(48px, 13vw, 72px);
    }

    .card-bottom {
        font-size: 10px;
    }

    .card-bottom b {
        font-size: 20px;
    }

    .card-doodle {
        top: 48px;
        right: 5px;

        font-size: 85px;
    }


    /* =========================
       MEMORIES
       ========================= */

    .memory-grid {
        grid-template-columns: 1fr;

        gap: 15px;
    }

    .memory-card {
        min-height: 230px;

        padding: 17px;
    }

    .memory-art {
        height: 85px;

        font-size: 62px;
    }

    .memory-card h3 {
        font-size: 20px;
    }


    /* =========================
       MESSAGE
       ========================= */

    .message-panel {
        padding: 30px 20px;

        box-shadow: 6px 6px 0 var(--ink);
    }

    .message-panel h2 {
        font-size: clamp(48px, 14vw, 75px);
    }

    .message-panel > p:not(.eyebrow) {
        font-size: 13px;
    }

    .message-deco {
        right: -20px;

        font-size: 110px;
    }


    /* =========================
       FOOTER
       ========================= */

    .footer {
        min-height: auto;

        padding-block: 25px;

        flex-direction: column;
        align-items: flex-start;

        gap: 10px;
    }

    .footer p {
        width: 100%;
    }


    /* =====================================================
       CLASS PAGE — HERO
       ===================================================== */

    .class-hero {
        width: calc(100% - 32px);

        min-height: auto;

        padding: 38px 0 285px;

        overflow: hidden;
    }

    .class-hero-inner {
        width: 100%;
    }

    .back-link {
        margin-bottom: 28px;
    }

    .class-hero h1 {
        margin-block: 18px;

        font-size: clamp(43px, 12vw, 65px);

        line-height: 0.86;
    }

    .class-title-row {
        gap: 12px;

        margin-top: 18px;
    }

    .class-title-row h2 {
        font-size: clamp(30px, 9vw, 46px);
    }

    .class-sticker {
        padding: 8px 10px;

        font-size: 8px;
    }

    .class-description {
        max-width: 100%;

        font-size: 13px;
        line-height: 1.65;
    }

    .class-stats {
        gap: 22px;

        margin-top: 27px;
    }

    .class-stats strong {
        font-size: 17px;
    }

    .class-stats span {
        font-size: 8px;
    }


    /* =========================
       CLASS HERO DECORATION
       ========================= */

    .class-hero-decoration {
        width: 100%;
        height: 265px;

        bottom: 0;
        top: auto;
        right: 0;

        pointer-events: none !important;
    }

    .orb-one {
        width: 175px;
        height: 150px;

        top: 15px;
        right: 20px;
    }

    .orb-two {
        width: 125px;
        height: 115px;

        right: 110px;
        bottom: 0;
    }

    .class-hero-sticker {
        right: 8px;
        top: 45%;

        padding: 14px 12px;

        font-size: 11px;
    }

    .class-hero-symbol {
        right: 65%;
        top: 18%;

        font-size: 40px;
    }


    /* =====================================================
       STUDENT SECTION
       ===================================================== */

    .students-section {
        padding: 60px 16px;
    }

    .students-heading {
        display: block;

        margin-bottom: 30px;
    }

    .students-heading h2 {
        font-size: clamp(44px, 12vw, 65px);
    }

    .students-heading > p {
        max-width: 100%;

        margin-top: 18px;

        font-size: 12px;
        line-height: 1.65;
    }


    /* =========================
       STUDENT GRID
       ========================= */

    .student-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 12px;
    }

    .student-card {
        width: 100%;
        min-width: 0;

        box-shadow: 4px 4px 0 var(--ink);
    }

    .student-photo {
        width: 100%;
        height: 175px;

        min-height: 175px;
    }

    .student-real-photo {
        width: 100% !important;
        height: 100% !important;

        object-fit: cover !important;
    }

    .student-avatar {
        width: 75px;
        height: 75px;

        font-size: 35px;

        box-shadow: 4px 4px 0 var(--ink);
    }

    .student-number {
        top: 9px;
        left: 9px;

        font-size: 8px;
    }

    .student-photo-caption {
        right: 8px;
        bottom: 8px;

        font-size: 7px;
    }

    .student-info {
        padding: 12px;
    }

    .student-role {
        font-size: 7px;
    }

    .student-info h3 {
        margin-top: 6px;

        font-size: 16px;

        line-height: 1.1;

        overflow-wrap: anywhere;
    }

    .student-info p {
        min-height: auto;

        margin-top: 7px;

        font-size: 10px;

        line-height: 1.5;
    }

    /* View Profile */
    .student-card a,
    .student-card .view-profile {
        display: block;

        width: 100%;

        min-height: 42px;

        padding: 11px 8px;

        text-align: center;

        touch-action: manipulation;

        -webkit-tap-highlight-color: transparent;
    }

    .student-more {
        min-height: 40px;

        padding: 10px 6px;

        font-size: 8px;
    }


    /* =========================
       CLASS BOTTOM NOTE
       ========================= */

    .class-bottom-note {
        margin-top: 45px;

        gap: 8px;
    }

    .class-bottom-note span {
        font-size: 20px;
    }

    .class-bottom-note p {
        font-size: 10px;
    }


    /* =====================================================
       PROFILE PAGE
       ===================================================== */

    .profile-page {
        width: 100%;
        padding: 0;

        overflow-x: hidden;
    }

    .profile-page .topbar {
        width: calc(100% - 32px);
    }

    .profile-page .profile-hero {
        width: calc(100% - 32px);

        min-height: auto;

        display: flex;
        flex-direction: column;

        gap: 20px;

        padding-block: 35px 15px;
    }

    .profile-intro {
        width: 100%;
    }

    .profile-intro .back-link {
        margin-bottom: 28px;
    }

    .profile-intro h1 {
        margin-block: 18px;

        font-size: clamp(52px, 14vw, 78px);

        line-height: 0.85;

        letter-spacing: -0.07em;

        overflow-wrap: anywhere;
    }

    .profile-class-label {
        margin-top: 18px;

        padding: 9px 12px;

        font-size: 8px;
    }


    /* =========================
       PROFILE PHOTO
       ========================= */

    .profile-photo-area {
        width: 100%;

        min-height: 390px;

        overflow: hidden;
    }

    .profile-photo-frame {
        width: min(300px, 82%);

        padding: 10px;

        box-shadow: 7px 7px 0 var(--ink);
    }

    .profile-photo-placeholder {
        min-height: 275px;
    }

    .profile-real-photo {
        width: 100% !important;
        height: 100% !important;

        object-fit: cover !important;

        pointer-events: none;
    }

    .profile-initial {
        width: 95px;
        height: 95px;

        font-size: 50px;
    }

    .profile-orb-pink {
        width: 130px;
        height: 130px;

        top: 20px;
        right: -15px;
    }

    .profile-orb-blue {
        width: 110px;
        height: 110px;

        left: -15px;
        bottom: 10px;
    }

    .profile-sticker {
        right: 0;
        bottom: 40px;

        padding: 11px;

        font-size: 10px;
    }


    /* =========================
       PROFILE CONTENT
       ========================= */

    .profile-content {
        width: calc(100% - 32px);

        padding: 40px 0 70px;
    }

    .profile-name-block {
        margin-bottom: 30px;
    }

    .profile-name-block h2 {
        font-size: clamp(44px, 12vw, 65px);

        overflow-wrap: anywhere;
    }

    .profile-nickname {
        font-size: 15px;
    }

    .profile-role {
        padding: 8px 11px;

        font-size: 8px;
    }


    /* =========================
       PROFILE DETAIL
       ========================= */

    .profile-detail-grid {
        grid-template-columns: 1fr;

        gap: 15px;
    }

    .profile-detail {
        width: 100%;

        padding: 22px;

        box-shadow: 5px 5px 0 var(--ink);
    }

    .profile-detail h3,
    .profile-memory h3 {
        font-size: clamp(30px, 9vw, 45px);
    }

    .profile-detail > p,
    .profile-memory > p:not(.eyebrow) {
        font-size: 13px;

        line-height: 1.7;
    }

    .profile-detail-grid .profile-facts {
        padding: 22px;
    }

    .fact-row strong {
        font-size: 14px;

        overflow-wrap: anywhere;
    }


    /* =========================
       PROFILE MEMORY
       ========================= */

    .profile-content .profile-memory {
        margin-top: 25px;

        padding: 28px 20px;

        box-shadow: 5px 5px 0 var(--ink);
    }

    .profile-memory h3 {
        max-width: 100%;
    }

    .memory-decoration {
        right: -15px;

        font-size: 90px;
    }

    .profile-motto {
        max-width: 100%;

        font-size: 14px;

        overflow-wrap: anywhere;
    }


    /* =========================
       PROFILE BACK BUTTON
       ========================= */

    .profile-back-bottom {
        margin-top: 40px;
    }

    .profile-back-bottom .button {
        width: 100%;

        text-align: center;
    }
}


/* =========================================================
   VERY SMALL PHONES — 320px–390px
   ========================================================= */

@media (max-width: 390px) {

    .wrap,
    .topbar,
    .hero,
    .intro-grid,
    .classes,
    .memories > .wrap,
    .message-section,
    .footer {
        width: calc(100% - 24px);
    }

    .topbar {
        height: 64px;
    }

    .brand-mark {
        font-size: 25px;
    }

    .brand {
        font-size: 11px;
    }

    .nav {
        top: 64px;
    }


    /* Homepage */

    .hero {
        padding-top: 35px;
    }

    .hero h1 {
        font-size: 50px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;

        width: 100%;
    }

    .hero-actions .button {
        width: 100%;

        justify-content: center;
    }

    .hero-actions .text-link {
        text-align: center;
    }

    .hero-art {
        height: 320px;
    }

    .photo-frame {
        width: 84%;
    }


    /* Class cards */

    .class-grid {
        grid-template-columns: 1fr;
    }

    .class-card {
        height: 220px;
    }


    /* Class page */

    .class-hero {
        width: calc(100% - 24px);

        padding-bottom: 270px;
    }

    .class-hero h1 {
        font-size: 42px;
    }

    .class-title-row h2 {
        font-size: 32px;
    }

    .class-stats {
        gap: 15px;
    }


    /* Student */

    .students-section {
        padding-inline: 12px;
    }

    .student-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .student-photo {
        height: 230px;
    }

    .student-avatar {
        width: 90px;
        height: 90px;

        font-size: 42px;
    }

    .student-info {
        padding: 16px;
    }

    .student-info h3 {
        font-size: 18px;
    }

    .student-info p {
        font-size: 11px;
    }


    /* Profile */

    .profile-page .profile-hero,
    .profile-content {
        width: calc(100% - 24px);
    }

    .profile-intro h1 {
        font-size: 50px;
    }

    .profile-photo-area {
        min-height: 350px;
    }

    .profile-photo-frame {
        width: 85%;
    }

    .profile-photo-placeholder {
        min-height: 250px;
    }

    .profile-detail {
        padding: 18px;
    }

    .profile-content .profile-memory {
        padding: 24px 18px;
    }
}


/* =========================================================
   TOUCH DEVICE SAFETY
   ========================================================= */

@media (hover: none) and (pointer: coarse) {

    .student-card:hover,
    .class-card:hover,
    .memory-card:hover {
        transform: none;
    }

    .button:hover {
        transform: none;
    }

    .student-card a,
    .student-card .view-profile,
    .button,
    .back-link,
    .profile-back {
        touch-action: manipulation;
    }
}