:root {
    /* --- Palette: High Voltage (Dark Premium) --- */
    --bg-void: #020202;
    /* Introduction of absolute void */
    --bg-panel: #0a0a0b;
    /* Slightly blue-tinted dark */
    --bg-surface: #141415;

    --primary: #FFD700;
    /* Gold */
    --primary-dim: #b39700;
    --primary-glow: rgba(255, 215, 0, 0.25);

    --accent: #FF8800;
    /* High Voltage Orange */
    --accent-glow: rgba(255, 136, 0, 0.25);

    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --text-dim: #52525b;

    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 215, 0, 0.4);

    --glass: rgba(10, 10, 12, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);

    /* --- Typography --- */
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;

    /* --- Spacing & Radius --- */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --container-width: 1200px;

    /* --- Transitions --- */
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
    --ease-spring: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Footer Global --- */
footer {
    position: relative;
    border-top: 1px solid var(--border);
    background: #000;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.5;
}

/* --- Resets & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@keyframes spaceDrift {
    0% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 100% 100%;
    }

    100% {
        background-position: 0% 0%;
    }
}

body {
    background-color: var(--bg-void);
    background-image:
        radial-gradient(circle at 15% 25%, rgba(255, 215, 0, 0.02) 0%, transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(255, 136, 0, 0.02) 0%, transparent 45%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 60px 60px, 60px 60px;
    background-attachment: fixed;
    animation: spaceDrift 80s ease-in-out infinite alternate;

    min-height: 100vh;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 17px;
    /* Bumped up slightly */
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

main {
    flex: 1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s var(--ease-out);
}

ul {
    list-style: none;
}

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

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    margin-bottom: 1.2rem;
    line-height: 1.2;
}

.text-gradient {
    background: linear-gradient(135deg, #fff 10%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    /* Removed filter: drop-shadow which causes square box on some browsers */
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
    /* Soft fallback */
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
    font-weight: 500;
}

/* --- Layout Utilities --- */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Header & Nav (Floating / Invisible Bar) --- */
/* --- Header & Nav (Floating / Invisible Bar) --- */
/* --- Header & Nav (INVISIBLE CONTAINER) --- */
.main-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    padding: 20px 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    z-index: 1000;
    pointer-events: none;
}

@media (max-width: 768px) {
    .main-header {
        padding: 15px 0;
    }

    .burger-btn {
        width: 50px;
        height: 50px;
    }
}

.main-header:hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Ensure container collapses */
.nav-container {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    pointer-events: none;
}

.logo {
    display: none;
    /* Ensure logo is hidden here too */
}

/* --- Burger Button (Top Right & Large) --- */
/* --- Burger Button (Integrated) --- */
.burger-btn {
    pointer-events: auto !important;
    position: fixed;
    top: 30px;
    right: 30px;
    /* Centered visually in the corner */
    width: 64px;
    height: 64px;
    background: rgba(10, 10, 12, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2000;
    backdrop-filter: blur(10px);
}

.burger-btn span {
    display: block;
    width: 32px;
    height: 3px;
    background: #fff;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.burger-btn:hover {
    border-color: var(--primary);
    box-shadow: 0 0 25px var(--primary-glow);
    transform: scale(1.1);
}

.burger-btn:hover span {
    background: var(--primary);
}

/* Old hack removal */
/* The .burger-btn block above handles all active states now */

/* --- Menu Overlay Premium Animation --- */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 8, 10, 0.98);
    /* Deep, clean dark background */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1500;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center horizontally */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 20px;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* --- Menu Header --- */
.menu-header {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 40px auto;
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
    /* Ensure the header doesn't overlap the fixed burger button which is now the close button */
    pointer-events: none;
}

.menu-brand {
    position: absolute;
    left: 20px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    pointer-events: auto;
}

.menu-overlay.active .menu-header {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

/* Hide internal close button as we are using the morphing burger */
.close-btn {
    display: none !important;
}

/* --- Burger Button Animation (Robust V3) --- */
.burger-btn {
    pointer-events: auto !important;
    position: fixed;
    top: 25px;
    right: 25px;
    width: 60px !important;
    /* Force Size */
    height: 60px !important;
    background: rgba(10, 10, 12, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    /* Gap for the hamburger state */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 9999;
    /* MAX Z-INDEX */
    backdrop-filter: blur(10px);
}

.burger-btn span {
    display: block;
    width: 28px;
    height: 2px;
    background: #fff;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 4px;
    position: relative;
    /* Default relative for flex */
}

.burger-btn:hover {
    border-color: var(--primary);
    box-shadow: 0 0 25px var(--primary-glow);
    transform: scale(1.05);
    /* Slight grow */
}

.burger-btn:hover span {
    background: var(--primary);
}

/* --- Active State: The Perfect X --- */
.burger-btn.active {
    opacity: 1 !important;
    pointer-events: auto !important;
    background: transparent;
    /* No background */
    border-color: transparent;
    /* No border */
    box-shadow: none !important;
    transform: rotate(0deg);
    /* No container rotation, clean lines */
}

.burger-btn.active span {
    position: absolute;
    /* Stack them all in center */
    top: 50%;
    left: 50%;
    width: 32px;
    /* Longer for X */
    background: #fff !important;
    /* Force ensure visibility */
}

.burger-btn.active span:nth-child(1) {
    transform: translate(-50%, -50%) rotate(45deg);
}

.burger-btn.active span:nth-child(2) {
    opacity: 0;
    /* Hide middle */
    transform: translate(-50%, -50%) scale(0);
}

.burger-btn.active span:nth-child(3) {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Hover state on X mode */
.burger-btn.active:hover span {
    background: var(--primary) !important;
    box-shadow: 0 0 10px var(--primary-glow);
}

.burger-btn.active:hover {
    transform: rotate(90deg);
    /* Spin the X on hover */
}

/* Mobile Nav Links Container */
.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 25px;
    width: 100%;
    flex-grow: 1;
    margin-bottom: 40px;
}

/* --- Typography Animation (Neon Bloom) --- */
.mobile-nav-link {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 3px;

    /* Off State */
    color: rgba(255, 255, 255, 0.1);
    text-shadow: none;
    filter: blur(5px);

    position: relative;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition:
        opacity 0.5s ease,
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        filter 0.5s ease,
        color 0.5s ease,
        text-shadow 0.5s ease;
}

.menu-overlay.active .mobile-nav-link {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);

    /* On State (Lit) */
    color: #fff;
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.5),
        0 0 20px rgba(255, 255, 255, 0.2);
}

.mobile-nav-link:hover,
.mobile-nav-link.highlight {
    color: var(--primary);
    text-shadow:
        0 0 15px var(--primary),
        0 0 30px var(--primary-glow),
        0 0 50px var(--primary-glow);
    transform: scale(1.05) translateX(10px);
    letter-spacing: 5px;
    /* Expand on hover */
    transition: all 0.1s ease-out;
    /* Super snappy response */
}

/* Precise Staggering for 'Progressive' feel */
.menu-overlay.active .mobile-nav-link:nth-child(1) {
    transition-delay: 0.1s;
}

.menu-overlay.active .mobile-nav-link:nth-child(2) {
    transition-delay: 0.2s;
}

.menu-overlay.active .mobile-nav-link:nth-child(3) {
    transition-delay: 0.3s;
}

.menu-overlay.active .mobile-nav-link:nth-child(4) {
    transition-delay: 0.4s;
}

.menu-overlay.active .mobile-nav-link:nth-child(5) {
    transition-delay: 0.5s;
}

.menu-overlay.active .mobile-nav-link:nth-child(6) {
    transition-delay: 0.6s;
}

.mobile-nav-link::before {
    display: none;
    /* Remove old fill effect, switching to outline->fill style */
}

/* Close Button Animation */
.close-btn:hover {
    color: var(--primary);
    transform: rotate(180deg) scale(1.1);
    /* Smoother spin */
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

/* Menu Footer (Accessibility) */
.menu-footer {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.accessibility-panel h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    text-align: center;
}

.access-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.access-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-body);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.access-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
}

.mt-2 {
    margin-top: 10px;
}

/* --- High Contrast Mode --- */
body.high-contrast {
    background: #000;
    color: #fff;
}

body.high-contrast .main-header {
    background: transparent !important;
    /* Keep transparent to avoid blocking bg */
    border-bottom: none !important;
    backdrop-filter: none;
}

body.high-contrast a,
body.high-contrast .text-muted,
body.high-contrast h1,
body.high-contrast h2,
body.high-contrast p {
    color: #fff !important;
    text-shadow: none !important;
}

body.high-contrast .btn {
    background: #FFD700;
    color: #000;
    border: 2px solid #fff;
    box-shadow: none !important;
}

body.high-contrast .card,
body.high-contrast .glass-card {
    background: #000;
    border: 2px solid #fff;
}




.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.w-full {
    width: 100%;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

/* --- Components: Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    /* Increased padding for easier touch */
    background: var(--primary);
    color: #000;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--primary), #fff, var(--primary));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s var(--ease-out);
    background-size: 200% 200%;
    animation: shine 2s infinite linear;
}

@keyframes shine {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 35px var(--primary-glow);
    background: #fff;
    /* Fallback */
}

.btn:hover::before {
    opacity: 0.2;
}

.btn:active {
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.05);
}

.btn-outline:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 25px var(--primary-glow);
}

.btn-block {
    width: 100%;
}

.btn-github {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid var(--border);
}

.btn-github:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-primary-glow {
    background: linear-gradient(135deg, var(--primary), #e6c200);
    color: #000;
    /* Black text on gold */
    font-weight: 800;
    letter-spacing: 0.5px;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-primary-glow:hover {
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
    transform: translateY(-2px);
}

/* --- Components: Cards (Glassmorphism) --- */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

/* --- Components: Forms --- */
/* --- Components: Forms Polished --- */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--text-dim);
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-left: 2px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    /* Smooth corners */
    padding: 18px 20px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 16px;
    min-height: 56px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input.with-icon {
    padding-left: 50px;
    /* Space for icon */
}

.input-icon {
    position: absolute;
    left: 20px;
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
    transition: color 0.3s ease;
    z-index: 5;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 215, 0, 0.05);
    /* Subtle gold tint */
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.1);
    transform: translateY(-1px);
}

.form-input:focus+.input-icon {
    color: var(--primary);
}

textarea.form-input {
    min-height: 120px;
    resize: vertical;
}

/* --- FOOTER LINKS TOUCH TARGETS --- */
.footer-links a {
    display: inline-block;
    padding: 12px;
    /* Increase hit area */
    color: var(--text-muted);
    transition: color 0.3s;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
}

.social-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 1.2rem;
    transition: all 0.3s;
    border: 1px solid var(--border);
}

.social-icon:hover {
    background: var(--primary);
    color: #000;
    transform: translateY(-3px);
}

/* --- Sections: Hero --- */
.hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 100px 0;
    background: radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.04), transparent 50%);
}

.hero-title {
    font-size: clamp(3.5rem, 7vw, 5rem);
    line-height: 1.05;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #ddd);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2.5vw, 1.4rem);
    color: var(--text-muted);
    max-width: 650px;
    margin-bottom: 40px;
}

/* --- Components: Feature Grid --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin: 60px 0;
}

/* --- Components: Project Cards --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 40px;
}

.project-card {
    position: relative;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.4s var(--ease-out);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 215, 0, 0.1);
}

.project-visual {
    height: 260px;
    background: var(--bg-panel);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-bg {
    position: absolute;
    inset: 0;
    opacity: 0.6;
    transition: transform 0.6s var(--ease-out);
    background-size: cover;
    background-position: center;
}

.project-card:hover .project-bg {
    transform: scale(1.1);
}

.project-icon {
    position: relative;
    z-index: 2;
    font-size: 4rem;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.7));
    transition: transform 0.4s var(--ease-spring);
}

.project-card:hover .project-icon {
    transform: scale(1.1);
}

.project-content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-description {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 24px;
    flex: 1;
}

.tech-tag {
    font-size: 0.8rem;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-dim);
    transition: all 0.3s;
}

.project-card:hover .tech-tag {
    border-color: rgba(255, 215, 0, 0.3);
    color: var(--text-main);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-reveal {
    animation: fadeInUp 0.8s var(--ease-out) forwards;
    opacity: 0;
    /* Init hidden */
}

.delay-100 {
    animation-delay: 0.15s;
}

.delay-200 {
    animation-delay: 0.3s;
}

/* --- MOBILE UNIVERSAL FIXES --- */
@media (max-width: 768px) {

    /* 1. Layout & Containers */
    .container {
        padding: 0 20px;
        width: 100%;
        max-width: 100%;
    }

    /* 2. Grid Collapsing (Force Single Column) */
    .grid-3,
    .projects-grid,
    .grid {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }

    /* 3. Typography Scaling */
    html {
        font-size: 15px;
    }

    /* Slightly smaller base */
    h1,
    .hero-title {
        font-size: 2.8rem;
    }

    /* FIX: Prevent background elements from blocking clicks */
    .glow-effect,
    .project-bg,
    .glass-card::before,
    .hero-title,
    .hero-subtitle {
        pointer-events: none;
    }

    /* Re-enable for text selection if needed, but for now prioritize clicks below */

    /* FIX: Ensure all buttons are clickable on mobile */
    button,
    .btn,
    a,
    input,
    textarea {
        cursor: pointer;
        pointer-events: auto !important;
    }

    h2 {
        font-size: 1.8rem;
    }

    /* 4. Hero Adjustments */
    .hero {
        padding: 60px 0;
        min-height: auto;
        text-align: center;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin: 0 auto 30px auto;
    }

    /* 5. Auth Pages */
    .auth-wrapper {
        padding: 40px 15px;
        align-items: flex-start;
        /* Prevent centering cut-off on short screens */
    }

    .login-box,
    .glass-card {
        padding: 25px;
    }

    /* 6. Admin Specific Mobile Tweaks */
    aside {
        width: 100%;
        /* Drawer covers full width */
    }

    .card .val {
        font-size: 2.5rem;
    }
}

/* --- Utilities --- */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Auth Pages Specific --- */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 100px);
    /* Adjust for header/footer */
    padding: 20px;
    position: relative;
    z-index: 500;
    /* Significant boost */
}

/* Ensure inputs are touch-friendly and clickable */
.form-input {
    min-height: 52px;
    /* Touch target */
    font-size: 16px;
    /* Prevents iOS zooom */
    position: relative;
    z-index: 10;
}

.btn-block {
    width: 100%;
    display: flex;
    /* Ensure flex behavior */
    justify-content: center;
    align-items: center;
    padding: 16px;
    font-size: 1.1rem;
    min-height: 56px;
    /* Massive hit area */
    position: relative;
    z-index: 100;
    /* Always on top of card elements */
    cursor: pointer !important;
    pointer-events: auto !important;
}

.btn-link {
    padding: 10px;
    /* Add padding to text links for easier tapping */
    display: inline-block;
}

.btn-github {
    background: #24292e;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-github:hover {
    background: #000;
    border-color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.auth-card {
    width: 100%;
    max-width: 480px;
}

/* --- Logo Glow Effect --- */
.logo-glow {
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.4)) drop-shadow(0 0 16px rgba(59, 130, 246, 0.3));
    transition: filter 0.3s var(--ease-out), transform 0.3s var(--ease-spring);
}

.logo-glow:hover {
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.7)) drop-shadow(0 0 24px rgba(59, 130, 246, 0.5));
    transform: scale(1.05);
}

/* --- Components: Icons Upgrade --- */
.project-icon {
    font-size: 4rem;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.3));
    transition: all 0.4s var(--ease-spring);
    /* Ensure emojis or fonts render smoothly */
    -webkit-font-smoothing: antialiased;
}

.project-card:hover .project-icon {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.6));
    text-shadow: 0 0 20px var(--primary);
}

/* --- Page Loader --- */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 2, 2, 0.9);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 2, 2, 0.9);
    backdrop-filter: blur(10px);
    transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-spring);
    z-index: 1500;
    backdrop-filter: blur(15px);
    display: flex;
    margin: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.4s var(--ease-out), visibility 0s linear 0.4s;
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transition-delay: 0s;
}

/* Staggered Menu Links */
.mobile-nav-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s var(--ease-out);
}

.menu-overlay.active .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

.menu-overlay.active .mobile-nav-link:nth-child(1) {
    transition-delay: 0.1s;
}

.menu-overlay.active .mobile-nav-link:nth-child(2) {
    transition-delay: 0.15s;
}

.menu-overlay.active .mobile-nav-link:nth-child(3) {
    transition-delay: 0.2s;
}

.menu-overlay.active .mobile-nav-link:nth-child(4) {
    transition-delay: 0.25s;
}

.menu-overlay.active .mobile-nav-link:nth-child(5) {
    transition-delay: 0.3s;
}

.menu-overlay.active .mobile-nav-link:nth-child(6) {
    transition-delay: 0.35s;
}

/* --- ALERTS --- */
.error-alert,
.success-alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.error-alert {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.success-alert {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.page-loader.active {
    opacity: 1;
    pointer-events: auto;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 215, 0, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    box-shadow: 0 0 20px var(--primary-glow);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- ACCESSIBILITY UTILITIES --- */
body.reduce-motion * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

body.high-contrast {
    /* Remove filter to prevent fixed position bugs */
    background-color: #000 !important;
    color: #fff !important;
}

body.high-contrast * {
    text-shadow: none !important;
    box-shadow: none !important;
}

body.high-contrast .glass-card,
body.high-contrast .menu-overlay {
    background: #000 !important;
    border: 2px solid #fff !important;
    backdrop-filter: none !important;
}

body.high-contrast a,
body.high-contrast .btn-link {
    color: #ffff00 !important;
    /* Yellow for max contrast */
    text-decoration: underline !important;
}

body.high-contrast .btn,
body.high-contrast button {
    background: #000 !important;
    border: 2px solid #fff !important;
    color: #fff !important;
}

body.high-contrast .btn:hover,
body.high-contrast button:hover {
    background: #fff !important;
    color: #000 !important;
}

body.high-contrast .form-input {
    background: #000 !important;
    border: 2px solid #fff !important;
    color: #fff !important;
}

body.high-contrast .text-muted,
body.high-contrast .text-dim {
    color: #eee !important;
}