/* =======================================
   GLOBAL THEME
======================================= */
:root {
    --bg-dark: oklch(0.1 0.1 297);
    --bg: oklch(0.15 0.1 297);
    --bg-light: oklch(0.2 0.1 297);
    --text: oklch(0.96 0.1 297);
    --text-muted: oklch(0.76 0.1 297);
    --highlight: oklch(0.5 0.2 297);
    --border: oklch(0.4 0.2 297);
    --border-muted: oklch(0.3 0.2 297);
    --primary: oklch(0.76 0.2 297);
    --secondary: oklch(0.76 0.2 117);
    --danger: oklch(0.7 0.2 30);
    --warning: oklch(0.7 0.2 100);
    --success: oklch(0.7 0.2 160);
    --info: oklch(0.7 0.2 260);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    margin: 0;
}

/* =======================================
   HEADER / HERO
======================================= */

header {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-size: cover;
    background-position: center;
    contain: layout style paint;
}

.head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 8rem;
    padding: 0 5rem;
}

.head a img {
    width: 100px;
    cursor: pointer;
    transition: transform 0.3s ease;
    will-change: transform;
}

.head a img:hover {
    transform: scale(1.1);
}

.desktop-nav {
    display: flex;
    gap: 3rem;
}

.desktop-nav a {
    text-decoration: none;
    font-family: "Iceland", sans-serif;
    font-size: 1.5rem;
    color: var(--text);
    transition: color 0.3s ease;
}

.desktop-nav a:hover {
    color: var(--text-muted);
}

.hero-content {
    margin-top: 10rem;
    height: 12rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.hero-content h1 {
    font-family: "Press Start 2P", system-ui;
    font-size: 4rem;
    color: oklch(0.95 0.15 60);
    text-shadow: 0 0 20px oklch(0.7 0.3 330), 0 4px 8px rgba(0,0,0,0.5);
}

.hero-content h2 {
    font-family: "Iceland", sans-serif;
    font-size: 2rem;
    color: oklch(0.98 0.15 330);
    text-shadow:
        0 0 8px rgba(0,0,0,1),
        0 0 16px rgba(0,0,0,0.8),
        2px 2px 4px rgba(0,0,0,0.9),
        0 0 25px oklch(0.7 0.3 330);
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.hero-content a {
    font-family: "Press Start 2P", system-ui;
    color: oklch(0.85 0.25 180);
    text-shadow:
        0 0 10px rgba(0,0,0,1),
        0 0 20px rgba(0,0,0,0.9),
        0 0 30px oklch(0.6 0.3 180);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    will-change: transform;
}

.hero-content a:hover {
    color: oklch(0.95 0.2 60);
    text-shadow: 
        0 0 10px rgba(0, 0, 0, 1),
        0 0 20px rgba(0, 0, 0, 0.9),
        0 0 30px oklch(0.7 0.25 60),
        0 0 50px oklch(0.6 0.2 60),
        0 0 80px oklch(0.5 0.15 60);
    transform: translateY(-2px);
    box-shadow: 
        0 0 30px rgba(255, 220, 100, 0.3),
        0 0 60px rgba(255, 220, 100, 0.15);
}

/* =======================================
   SHARED SECTION BASE
======================================= */

section {
    width: 100%;
    min-height: 20rem;
    padding: 6rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    contain: layout style paint;
}

section h2 {
    font-family: "Press Start 2P", system-ui;
    font-size: 3rem;
    color: var(--text);
    margin-bottom: 4rem;
    text-shadow: 0 0 20px oklch(0.6 0.25 297);
}

#About {
    background: var(--bg);
    padding-bottom: 12rem;
}

#Work {
    background: linear-gradient(180deg, var(--bg-light), var(--bg), var(--bg-light));
}

#Assignments {
    background: var(--bg-dark);
}

/* =======================================
   ABOUT / WORK FLEX LAYOUTS
======================================= */

.about-flex,
.work-flex {
    width: 85vw;
    max-width: 1200px;
    padding: 3rem;
    display: flex;
    gap: 3rem;

    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-light) 100%);
    border: 2px solid var(--border);
    border-radius: 8px;
    box-shadow:
        0 0 30px rgba(147,51,234,0.2),
        inset 0 0 60px rgba(147,51,234,0.05);
}

.work-flex {
    background: linear-gradient(135deg, var(--bg-light), var(--highlight));
    border-color: var(--primary);
    box-shadow:
        0 0 40px rgba(147,51,234,0.4),
        inset 0 0 80px rgba(200,100,255,0.1);
}

.about-flex p,
.work-flex p {
    flex: 1;
    font-family: "Iceland", sans-serif;
    font-size: 1.8rem;
    line-height: 3.5rem;
    text-align: justify;
    color: var(--text);
}

.about-img,
.work-img {
    width: 22rem;
    padding: 2rem;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--bg-dark), var(--bg));
    border: 2px solid var(--border);
    box-shadow:
        0 0 20px rgba(147,51,234,0.3),
        inset 0 1px 0 rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.work-img {
    background: linear-gradient(135deg, var(--bg), var(--bg-light));
    border-color: var(--primary);
    box-shadow:
        0 0 30px rgba(147,51,234,0.5),
        inset 0 1px 0 rgba(255,255,255,0.15);
}

.about-img img,
.work-img img {
    width: 100%;
    border-radius: 4px;
    border: 1px solid var(--border-muted);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.about-img img:hover,
.work-img img:hover {
    transform: scale(1.05);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.7),
        0 0 30px oklch(0.6 0.25 297);
}

/* =======================================
   ASSIGNMENTS GRID
======================================= */

.assignments-grid {
    width: 85vw;
    max-width: 1200px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px,1fr));
    gap: 2rem;
}

.assignment-item {
    padding: 1.5rem;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--bg), var(--bg-light));
    border: 2px solid var(--border);
    box-shadow:
        0 0 20px rgba(147,51,234,0.2),
        inset 0 0 40px rgba(147,51,234,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
    
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.assignment-item:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 0 40px rgba(147, 51, 234, 0.4),
        inset 0 0 60px rgba(147, 51, 234, 0.08);
}

.assignment-item > a > p {
    font-family: "Press Start 2P", system-ui;
    font-size: 1rem;
    color: var(--text);
    text-align: center;
    margin-bottom: 0.5rem;
}

.assignments-img {
    width: 100%;
    border-radius: 4px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-dark), var(--bg));
    border: 2px solid var(--border);
    box-shadow: 
        0 0 15px rgba(147, 51, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    
    display: flex;
    justify-content: center;
    align-items: center;
}

.assignments-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.3s ease;
    will-change: transform;
}

.assignments-img img:hover {
    transform: scale(1.1);
}

.assignment-item a {
    text-decoration: none;
    text-align: center;
}

/* =======================================
   HAMBURGER MENU
======================================= */
.hamburger {
    width: 35px;
    height: 28px;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 2001;
    position: relative;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 4px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    will-change: transform, opacity;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(12px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-12px) rotate(-45deg);
}

/* =======================================
   SLIDE-IN HOLOGRAPHIC SIDE PANEL NAV
======================================= */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -60%;
    width: 60%;
    height: 100vh;
    padding-top: 10rem;

    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;

    background: rgba(30, 0, 60, 0.35);
    backdrop-filter: blur(8px) saturate(150%);
    -webkit-backdrop-filter: blur(8px) saturate(150%);
    border-left: 2px solid oklch(0.6 0.3 330 / 0.5);

    box-shadow: -10px 0 40px rgba(147,51,234,0.35);

    transition: right 0.4s ease-in-out;
    z-index: 2000;
    will-change: right;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav a {
    font-family: "Iceland", sans-serif;
    font-size: 2.2rem;
    letter-spacing: 2px;
    color: oklch(0.95 0.3 300);
    text-shadow:
        0 0 12px oklch(0.75 0.2 300),
        0 0 20px rgba(0,0,0,0.9);
    text-decoration: none;
    transition: transform 0.2s ease, color 0.2s ease;
    will-change: transform;
}

.mobile-nav a:hover {
    transform: scale(1.06);
    color: oklch(1 0.2 330);
}

/* =======================================
   DARK BACKDROP
======================================= */
.menu-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;

    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);

    z-index: 1500;
}

.menu-backdrop.active {
    display: block;
}

/* =======================================
   REDUCED MOTION SUPPORT
======================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =======================================
   RESPONSIVE - TABLET
======================================= */
@media (max-width: 900px) {

    .head {
        padding: 0 2rem;
    }

    .desktop-nav {
        gap: 1.5rem;
    }

    .about-flex,
    .work-flex {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .about-img,
    .work-img {
        width: 100%;
        max-width: 20rem;
    }

    .about-flex p,
    .work-flex p {
        line-height: 2.5rem;
        font-size: 1.6rem;
    }

    .hero-content h1 {
        font-size: 2.6rem;
        text-align: center;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 631px) {
    .desktop-nav {
        display: none;
    }

    .hamburger {
        display: flex;
    }
}

/* =======================================
   RESPONSIVE - SMALL PHONES (300px – 600px)
======================================= */
@media (max-width: 600px) {

    .head {
        padding: 0 1.2rem;
    }

    section {
        padding: 4rem 0;
    }

    .about-flex,
    .work-flex {
        width: 95vw;
        padding: 1.5rem;
        gap: 1.5rem;
        background: var(--bg); /* Solid color on mobile for performance */
    }

    .about-flex p,
    .work-flex p {
        font-size: 1.2rem;
        line-height: 1.9rem;
    }

    .about-img,
    .work-img {
        width: 80%;
        max-width: 14rem;
        padding: 1rem;
        background: var(--bg-dark); /* Solid color on mobile */
    }

    .about-img img,
    .work-img img {
        width: 100%;
    }

    .hero-content h1 {
        font-size: 1.9rem;
        line-height: 2.4rem;
        text-align: center;
        padding: 0 1rem;
        word-break: break-word;
    }

    .hero-content h2 {
        font-size: 1.2rem;
        text-align: center;
    }

    .hero-content a {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }

    .mobile-nav {
        width: 75%;
        padding-top: 8rem;
        backdrop-filter: blur(6px) saturate(130%); /* Reduced blur on mobile */
        -webkit-backdrop-filter: blur(6px) saturate(130%);
    }

    .mobile-nav:not(.active) {
        right: -100% !important;
        opacity: 0;
        pointer-events: none;
    }

    .mobile-nav a {
        font-size: 1.6rem;
    }

    .assignments-grid {
        width: 95vw;
        gap: 1.2rem;
        grid-template-columns: 1fr;
    }

    .assignment-item {
        padding: 1.2rem;
        background: var(--bg); /* Solid color on mobile */
    }

    .assignment-item p {
        font-size: 0.8rem;
    }

    section h2 {
        font-size: 2rem;
    }
}

/* =======================================
   SUPER SMALL – 300px and under
======================================= */
@media (max-width: 360px) {

    .hero-content h1 {
        font-size: 1.4rem;
        line-height: 1.9rem;
    }

    .hero-content h2 {
        font-size: 1rem;
    }

    .about-flex,
    .work-flex {
        padding: 1rem;
        gap: 1rem;
    }

    .about-flex p,
    .work-flex p {
        font-size: 1rem;
        line-height: 1.6rem;
    }

    .about-img,
    .work-img {
        max-width: 11rem;
    }

    .mobile-nav {
        width: 85%;
        backdrop-filter: blur(4px) saturate(120%); /* Further reduced on tiny screens */
        -webkit-backdrop-filter: blur(4px) saturate(120%);
    }

    .mobile-nav:not(.active) {
        right: -100% !important;
        opacity: 0;
        pointer-events: none;
    }

    .mobile-nav a {
        font-size: 1.4rem;
    }

}

