/* ==========================================================================
   DEFERRED STYLESHEET — styles.css
   HOW TO USE:
   1. Copy critical.css content into a <style> tag in your <head>
   2. Replace your current <link rel="stylesheet" href="styles.css"> with:

   <link rel="preload" as="style" href="assets/css/global/styles.css"
         onload="this.onload=null;this.rel='stylesheet'">
   <noscript><link rel="stylesheet" href="assets/css/global/styles.css"></noscript>

   This alone eliminates ~1,070ms of render-blocking on your critical path.
   ========================================================================== */

/* ==========================================================================
   ROOT VARIABLES
   ========================================================================== */
:root {
    --bg: #0a0e17;
    --editor: rgba(22, 27, 34, 0.92);
    --gutter: #1e2329;
    --line: #2d323a;
    --text: #f0f6fc;
    --keyword: #79c0ff;
    --string: #a5d6ff;
    --comment: #8b949e;
    --purple: #d2a8ff;
    --cyan: #7ee787;
    --glow: #00f0ff;
    --accent: #58a6ff;
    --primary: #4361ee;
    --card: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.15);
    --text-light: #94a3b8;
    --clr-bg: #0f0f23;
    --clr-overlay: rgba(15, 15, 35, 0.85);
    --clr-text-light: #e6edf3;
    --clr-green: #10b981;
    --clr-blue: #3b82f6;
    --clr-purple: #8b5cf6;
    --clr-teal: #06b6d4;
    --glass-start: rgba(67, 97, 238, 0.16);
    --glass-end: rgba(0, 240, 255, 0.06);
    --glass-border: rgba(67, 97, 238, 0.35);
    --glass-shadow-deep: rgba(8, 18, 54, 0.88);
    --glow-cyan-strong: rgba(0, 240, 255, 0.75);
    --glow-blue: rgba(67, 97, 238, 0.65);
    --sparkle-color: #a5f3fc;
    --transition-speed: 0.35s;
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px rgba(0, 240, 255, 0.3);
}

/* ==========================================================================
   BASE & RESET
   ========================================================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html,
body {
    min-height: 100dvh;
    height: 100%;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ==========================================================================
   FONT DISPLAY FIX
   Lighthouse: "Font display" audit — saves ~440ms FCP by showing fallback
   text immediately instead of invisible text (FOIT) while fonts load.
   Add &display=swap to your Google Fonts URL as well (see HTML note below).
   ========================================================================== */
@font-face { font-family: 'Inter';           font-display: swap; src: local('Inter'); }
@font-face { font-family: 'JetBrains Mono'; font-display: swap; src: local('JetBrains Mono'); }
@font-face { font-family: 'Fira Mono';      font-display: swap; src: local('Fira Mono'); }
@font-face { font-family: 'Pacifico';       font-display: swap; src: local('Pacifico'); }
@font-face { font-family: 'Source Code Pro';font-display: swap; src: local('Source Code Pro'); }

/* ==========================================================================
   BACKGROUND EFFECTS
   ========================================================================== */
body::before {
    content: '';
    position: fixed;
    inset: -40%;
    background:
        radial-gradient(circle at 20% 20%, rgba(67, 97, 238, 0.18), transparent 60%),
        radial-gradient(circle at 80% 80%, rgba(0, 240, 255, 0.16), transparent 55%),
        radial-gradient(circle at 50% 50%, rgba(88, 166, 255, 0.10), transparent 65%);
    opacity: 0.7;
    mix-blend-mode: screen;
    /* FIX: Only transform+opacity — GPU composited, no layout cost */
    animation: subtleGlow 8s ease-in-out infinite;
    pointer-events: none;
    z-index: -2;
    will-change: transform, opacity;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 20%, transparent 0%, rgba(0,0,0,0.28) 65%, rgba(0,0,0,0.62) 100%);
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: -1;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    33%       { transform: translateY(-20px) scale(1.03) rotate(0.5deg); }
    66%       { transform: translateY(-35px) scale(1.06) rotate(-0.5deg); }
}

/* FIX: Only transform+opacity — composited */
@keyframes subtleGlow {
    0%   { transform: translate3d(0, 0, 0) scale(1);      opacity: 0.68; }
    50%  { transform: translate3d(10px, -10px, 0) scale(1.03); opacity: 0.80; }
    100% { transform: translate3d(14px, -14px, 0) scale(1.05); opacity: 0.92; }
}

/* ==========================================================================
   PARTICLES
   ========================================================================== */
.particle-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    opacity: 0.8;
}

.particle {
    position: absolute;
    width: 3.5px;
    height: 3.5px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow), rgba(0,240,255,0.28) 60%, transparent 75%);
    opacity: 0;
    filter: blur(0.9px);
    animation: floatParticle linear infinite;
    will-change: transform, opacity;
}

@keyframes floatParticle {
    0%   { transform: translate3d(0, 0, 0) scale(0.35); opacity: 0; }
    8%   { opacity: 0.65; }
    55%  { opacity: 0.92; }
    90%  { opacity: 0.4; }
    100% { transform: translate3d(0, -160px, 0) scale(1.25); opacity: 0; }
}

/* ==========================================================================
   CREATIVE IDEA MACHINE GLASS CARD
   ========================================================================== */
.scene {
    perspective: 1200px;
    width: clamp(320px, 78vw, 400px);
    height: clamp(320px, 78vw, 400px);
    position: relative;
    margin-left: 120px;
    margin-top: 120px;
    margin-right: auto;
    z-index: 2;
}

.glass-card {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 32px;
    background: linear-gradient(135deg, var(--glass-start), var(--glass-end));
    border: 1px solid var(--glass-border);
    box-shadow:
        0 28px 70px var(--glass-shadow-deep),
        0 0 0 1px rgba(67, 97, 238, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    overflow: hidden;
    padding: 24px;
    transform-style: preserve-3d;
    transform: translateZ(0);
    transition: all 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
    cursor: pointer;
    touch-action: manipulation;
    will-change: transform, box-shadow;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3) 50%, transparent);
    opacity: 0;
    transition: opacity 0.45s ease;
}

.glass-card:hover {
    box-shadow:
        0 45px 100px rgba(67, 97, 238, 0.75),
        0 0 60px rgba(0, 240, 255, 0.45),
        0 0 120px rgba(67, 97, 238, 0.3);
    border-color: var(--primary);
    background: linear-gradient(140deg, rgba(67,97,238,0.22), rgba(0,240,255,0.14));
}

.glass-card:hover::before { opacity: 1; }
.glass-card:active { transform: scale(0.982) translateZ(5px); }

.icon-container {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: realisticFloat 5.5s ease-in-out infinite;
    will-change: transform;
}

/* FIX: Only transform — composited */
@keyframes realisticFloat {
    0%, 100% { transform: translate3d(0, 5px, 0) rotateX(5deg) rotateY(-3deg); }
    33%       { transform: translate3d(0, -7px, 14px) rotateX(1deg) rotateY(4deg); }
    66%       { transform: translate3d(0, -13px, 7px) rotateX(6deg) rotateY(-2deg); }
}

/* FIX: Single composited keyframe (no scale inside non-compositor path) */
.light-glow {
    position: absolute;
    top: 48%;
    left: 50%;
    width: 240px;
    height: 240px;
    margin: -120px 0 0 -120px;
    background: radial-gradient(circle closest-side,
        var(--glow-cyan-strong) 0%,
        var(--glow-blue) 28%,
        rgba(0, 100, 200, 0.12) 62%,
        transparent 82%);
    border-radius: 50%;
    animation: glowFade 2.7s ease-in-out infinite;
    mix-blend-mode: screen;
    filter: blur(1.5px);
    z-index: 0;
    will-change: transform, opacity;
}

@keyframes glowFade {
    0%, 100% { opacity: 0.58; transform: scale(1); }
    50%       { opacity: 1;    transform: scale(1.20); }
}

.sparkles {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    height: 280px;
    pointer-events: none;
    z-index: 3;
}

.sparkle {
    position: absolute;
    background: radial-gradient(circle at 30% 30%, #ffffff, var(--sparkle-color) 42%, transparent 72%);
    border-radius: 50%;
    animation: sparkleMagic 3.4s ease-in-out infinite;
    filter: blur(0.7px);
    mix-blend-mode: screen;
    will-change: transform, opacity;
}

/* FIX: Only transform+opacity — composited */
@keyframes sparkleMagic {
    0%, 100% { opacity: 0; transform: scale(0.28) translateY(0) rotate(0deg); }
    50%       { opacity: 1; transform: scale(1.25) translateY(-8px) rotate(180deg); }
}

.title {
    text-align: left;
    margin-bottom: -150px;
    margin-left: 120px;
    margin-top: 30px;
    max-width: clamp(320px, 78vw, 400px);
    z-index: 2;
}

.title .subtitle {
    color: var(--text-light);
    font-size: clamp(1.1rem, 3.5vw, 1.35rem);
    font-weight: 500;
    opacity: 0.92;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: opacity 0.3s ease;
}

.title:hover .subtitle { opacity: 1; }

@media (max-width: 992px) {
    .scene { margin: 6rem auto 4rem !important; }
    .title {
        text-align: center !important;
        margin: 2rem auto 4rem !important;
        margin-left: auto !important;
        margin-right: auto !important;
        margin-bottom: 4rem !important;
    }
}

@media (max-width: 640px) {
    .scene {
        width: clamp(280px, 82vw, 360px) !important;
        height: clamp(280px, 82vw, 360px) !important;
        margin: 3rem auto 3.5rem !important;
    }
    .glass-card { border-radius: 24px !important; padding: 20px !important; }
    .light-glow { width: 190px !important; height: 190px !important; margin: -95px 0 0 -95px !important; }
    .sparkles { width: 230px !important; height: 230px !important; }
}

@media (max-width: 480px) {
    .scene {
        width: clamp(260px, 85vw, 340px) !important;
        height: clamp(260px, 85vw, 340px) !important;
        margin: 2.5rem auto 3rem !important;
    }
    .glass-card { border-radius: 20px !important; padding: 16px !important; }
    .light-glow { width: 170px !important; height: 170px !important; margin: -85px 0 0 -85px !important; }
    .sparkles { width: 210px !important; height: 210px !important; }
    .title { margin: 1.5rem auto 3rem !important; }
}

/* ==========================================================================
   PROJECTS NEXUS
   ========================================================================== */
.projects-nexus-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    margin-right: 85px;
    margin-top: -600px;
    justify-content: space-between;
    gap: 6rem;
    flex-direction: row-reverse;
}

.projects-left {
    flex: 1;
    max-width: 600px;
    text-align: right;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    width: 100%;
    max-width: 520px;
    margin-left: 0;
}

/* FIX: Static gradient — removed background-position animation (non-composited) */
.projects-header h2 {
    font-size: 4.2rem;
    font-weight: 900;
    background: linear-gradient(90deg, #4361ee, #7c3aed, #c84efd, #00f0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    text-shadow: 0 0 40px rgba(67, 97, 238, 0.3);
}

.projects-header p {
    font-size: 1.5rem;
    color: var(--text-light);
    opacity: .9;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.projects-header:hover p { opacity: 1; }

.project-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 32px;
    height: 110px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    border: 1.5px solid rgba(67, 97, 238, 0.3);
    border-radius: 24px;
    text-decoration: none;
    color: var(--text);
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(.23, 1, .32, 1),
                box-shadow 0.6s cubic-bezier(.23, 1, .32, 1),
                border-color 0.3s ease,
                background 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    will-change: transform, box-shadow;
}

.project-btn::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(67, 97, 238, 0.2), transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.project-btn:hover::after { width: 300px; height: 300px; }

.project-btn:hover {
    transform: translateY(-14px) scale(1.07);
    border-color: var(--primary);
    background: rgba(67, 97, 238, 0.18);
    box-shadow:
        0 25px 70px rgba(67, 97, 238, 0.7),
        0 0 60px rgba(0, 255, 255, 0.4),
        0 0 100px rgba(67, 97, 238, 0.2);
}

.btn-main {
    font-size: 1.48rem;
    font-weight: 800;
    background: linear-gradient(90deg, #7c3aed, #4361ee, #00f0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.btn-sub {
    font-size: .98rem;
    color: var(--text-light);
    margin-top: 6px;
    font-weight: 600;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.project-btn:hover .btn-sub { color: var(--text); }

.btn-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(0, 255, 255, 0.25), transparent 60%);
    opacity: 0;
    transition: opacity 0.6s;
    pointer-events: none;
}

.project-btn:hover .btn-glow { opacity: 1; }

@media (min-width: 993px) {
    .projects-nexus-container {
        margin-top: -600px !important;
        margin-right: 85px !important;
        flex-direction: row-reverse !important;
    }
    .projects-left { text-align: right !important; }
}

@media (max-width: 992px) {
    .projects-nexus-container {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 4rem !important;
        margin-top: 2rem !important;
        margin-right: 0 !important;
        margin-bottom: 6rem !important;
    }
    .projects-left { text-align: center !important; max-width: 100% !important; }
    .projects-grid { max-width: 90% !important; grid-template-columns: 1fr !important; gap: 1.8rem !important; }
    .project-btn { height: auto !important; padding: 1.6rem 1.8rem !important; min-height: 110px !important; }
}

@media (max-width: 480px) {
    .projects-header h2 { font-size: 3.2rem !important; }
    .projects-nexus-container { padding: 0 1.2rem !important; margin-bottom: 4rem !important; }
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
header {
    position: fixed;
    top: 0; left: 0; right: 15px;
    z-index: 1000;
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(67, 97, 238, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    height: 90px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 2.1rem;
    letter-spacing: -1.5px;
    text-decoration: none;
    display: flex;
    gap: 6px;
    align-items: center;
    color: var(--text);
    transition: transform 0.3s ease;
}

.logo:hover { transform: scale(1.05); }

.logo span {
    background: linear-gradient(90deg, #4361ee, #7c3aed, #c84efd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
}

.logo .bracket { color: var(--primary); transition: color 0.3s ease; }
.logo:hover .bracket { color: var(--glow); }

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    text-align: center;
    padding: 160px 24px 100px;
    max-width: 1200px;
    margin: 0 auto;
}

.hero .subtitle {
    font-size: 1.65rem;
    font-weight: 500;
    color: var(--text-light);
    opacity: .92;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.6;
    transition: opacity 0.3s ease;
}

.hero:hover .subtitle { opacity: 1; }

/* ==========================================================================
   GRADIENT ANIMATION — composited-safe version
   FIX: The original gradientShift/gradientFlow animated background-position-x
   which Chrome's compositor cannot handle — flagged by Lighthouse as
   "non-composited animations". Static gradients are used instead.
   The visual effect is preserved; only the continuous shift is removed.
   ========================================================================== */
@keyframes gradientShift {
    /* Kept for compatibility; no longer animates non-composited properties */
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.92; }
}

/* ==========================================================================
   COURSE CARDS
   ========================================================================== */
.grid-container {
    max-width: 1400px;
    margin: 0 auto 6rem;
    padding: 0 32px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    /* FIX: content-visibility defers render cost of off-screen cards */
    content-visibility: auto;
    contain-intrinsic-size: 0 600px;
}

@media (max-width: 1024px) { .grid-container { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .grid-container { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (max-width: 480px)  { .grid-container { grid-template-columns: 1fr; gap: 20px; } }

.course-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px 24px;
    height: 115px;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    /* FIX: Separate transition properties — avoids animating 'all' */
    transition: transform 0.5s ease, box-shadow 0.5s ease,
                border-color 0.5s ease, background 0.5s ease;
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(67, 97, 238, 0.1), transparent);
    transition: left 0.5s ease;
}

.course-card:hover::before { left: 100%; }

.course-card:hover {
    transform: translateY(-12px) scale(1.05);
    border-color: var(--primary);
    box-shadow:
        0 20px 60px rgba(67, 97, 238, 0.6),
        0 0 40px rgba(0, 255, 255, 0.3);
    background: rgba(67, 97, 238, 0.12);
}

.course-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 16px;
}

.course-text h3 {
    font-size: 1.32rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #fff;
    transition: color 0.3s ease;
}

.course-card:hover .course-text h3 { color: var(--glow); }

.course-text p {
    font-size: .92rem;
    color: var(--text-light);
    opacity: .95;
    font-weight: 500;
}

.course-icon {
    transition: transform 0.5s ease, filter 0.5s ease;
    filter: drop-shadow(0 0 12px rgba(0, 255, 255, 0.4));
}

.course-card:hover .course-icon {
    transform: scale(1.4) rotate(15deg);
    filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.8));
}

/* ==========================================================================
   SPLIT CONTAINER — Editor & Compilers
   ========================================================================== */
.split-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    max-width: 100%;
    margin: 8rem auto 6rem;
    padding: 0 3rem;
    overflow-x: hidden;
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
}

.editor-side,
.compilers-side {
    flex: 1;
    min-width: 0;
    position: relative;
}

.editor-side { flex: 1.6; }

.editor-card {
    width: 100% !important;
    max-width: 800px;
    margin: 0 auto;
    background: var(--editor);
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.8),
        0 0 100px rgba(0, 255, 255, 0.25);
    border: 1.5px solid var(--border);
    backdrop-filter: blur(18px);
    transition: box-shadow 0.5s ease, border-color 0.5s ease;
}

.editor-card:hover {
    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.9),
        0 0 120px rgba(0, 255, 255, 0.35);
    border-color: var(--primary);
}

.editor-tabs {
    display: flex;
    background: #1a1a1a;
    padding: 10px 14px 0;
    border-bottom: 1px solid var(--line);
    gap: 4px;
}

.tab {
    padding: 11px 18px;
    background: #2a2a2a;
    color: #888;
    font-size: 14px;
    border-radius: 10px 10px 0 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tab.active { background: var(--editor); color: var(--text); font-weight: 600; }
.tab:hover:not(.active) { background: #333; color: #aaa; }

.gutter {
    position: absolute;
    left: 0; top: 0;
    width: 72px;
    height: 100%;
    background: var(--gutter);
    border-right: 1px solid var(--line);
    padding: 60px 0 20px;
    font-size: 16.5px;
    color: var(--comment);
    user-select: none;
    z-index: 3;
    font-family: 'Fira Mono', monospace;
    line-height: 2;
}

.code-area {
    margin-left: 72px;
    padding: 24px 32px;
    min-height: 500px;
    color: var(--text);
    font-size: 18.5px;
    line-height: 2;
    font-family: 'Fira Mono', monospace;
}

.code-line { display: block; transition: all 0.2s ease; }

.code-line.active {
    background: rgba(88, 166, 255, 0.22);
    border-left: 4px solid var(--accent);
    padding-left: 14px;
    margin-left: -18px;
    border-radius: 0 8px 8px 0;
}

.keyword { color: var(--keyword); }
.string  { color: var(--string); }
.comment { color: var(--comment); font-style: italic; }

.cursor {
    display: inline-block;
    width: 14px;
    height: 1.6em;
    background: var(--glow);
    animation: blink 1s steps(2) infinite;
    box-shadow: 0 0 20px var(--glow);
    vertical-align: middle;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.compilers-section { max-width: 520px; }

.compilers-header {
    text-align: right;
    margin-bottom: 2.8rem;
}

.compilers-header h2 {
    font-size: 1.8rem;
    background: linear-gradient(90deg, #fff, var(--primary), #0ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.compilers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    margin-left: auto;
}

.compiler-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card);
    padding: 20px 24px;
    font-weight: 600;
    font-size: 1.12rem;
    color: var(--text);
    border-radius: 18px;
    text-decoration: none;
    border: 1.5px solid transparent;
    backdrop-filter: blur(10px);
    transition: transform 0.7s cubic-bezier(.25, .8, .25, 1),
                box-shadow 0.7s cubic-bezier(.25, .8, .25, 1),
                border-color 0.3s ease,
                background 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.compiler-button::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(67, 97, 238, 0.15), transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.compiler-button:hover::after { width: 250px; height: 250px; }

.compiler-button:hover {
    transform: translateY(-10px) scale(1.06);
    border-color: var(--primary);
    background: rgba(67, 97, 238, 0.15);
    box-shadow:
        0 16px 40px rgba(67, 97, 238, 0.6),
        0 0 50px rgba(67, 97, 238, 0.5);
}

/* ==========================================================================
   STATS SECTION
   ========================================================================== */
.stats-section {
    height: auto;
    min-height: 80dvh;
    position: relative;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 35px;
    padding: 120px 20px;
    content-visibility: auto;
    contain-intrinsic-size: 0 80vh;
}

@media (max-width: 992px) {
    .stats-section {
        min-height: 80dvh !important;
        height: auto !important;
        padding: 140px 20px 160px !important;
        display: block !important;
    }
}

.code-bg {
    position: absolute;
    inset: 0;
    font-family: 'Source Code Pro', monospace;
    font-size: clamp(0.9rem, 2vw, 1.3rem);
    color: rgba(173, 216, 255, 0.12);
    white-space: pre;
    line-height: 2.2;
    text-align: center;
    animation: scrollCode 50s linear infinite;
    user-select: none;
    pointer-events: none;
    will-change: transform;
}

@keyframes scrollCode {
    0%   { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

.stars { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.star {
    position: absolute;
    background: #e0f2fe;
    border-radius: 50%;
    box-shadow: 0 0 10px 4px rgba(174, 227, 255, 0.6);
    animation: twinkle 4s infinite ease-in-out;
    will-change: transform, opacity;
}

.star.small  { width: 2px; height: 2px; }
.star.medium { width: 3px; height: 3px; }
.star.large  { width: 5px; height: 5px; }

/* FIX: Only transform+opacity */
@keyframes twinkle {
    0%, 100% { opacity: .4; transform: scale(1); }
    50%       { opacity: 1;  transform: scale(1.6); }
}

.particles { position: absolute; inset: 0; pointer-events: none; }

/* FIX: logoPulse originally animated text-shadow — non-composited, flagged by Lighthouse.
   Solution: static text-shadow + animate only transform+opacity (both composited). */
.codeverse-logo {
    position: absolute;
    top: 50%;
    left: 35%;
    transform: translate(-50%, -50%);
    font-family: 'Pacifico', cursive;
    font-size: clamp(4.5rem, 12vw, 11rem);
    letter-spacing: 8px;
    color: #fff;
    text-shadow:
        0 0 30px #0ff,
        0 0 60px #0ff,
        0 0 90px #4361ee,
        0 0 120px #4361ee;
    animation: logoPulseComposited 5s ease-in-out infinite;
    pointer-events: none;
    z-index: 5;
    white-space: nowrap;
    will-change: transform, opacity;
}

/* FIX: No text-shadow in keyframes — only transform+opacity */
@keyframes logoPulseComposited {
    0%, 100% { transform: translate(-50%, -50%) scale(1);    opacity: 0.9; }
    50%       { transform: translate(-50%, -50%) scale(1.05); opacity: 1; }
}

.unique-stats-container {
    position: absolute;
    top: 50%;
    right: 5%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: clamp(32px, 6vw, 48px);
    z-index: 10;
    text-align: right;
}

.stat-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 92px;
    line-height: 1.15;
}

/* FIX: Static gradient — removed gradientFlow (background-position animation) */
.stat-item h2 {
    font-size: clamp(2.7rem, 8vw, 4.4rem) !important;
    font-weight: 900;
    background: linear-gradient(90deg, #4361ee, #7c3aed, #c84efd, #00f0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.stat-item p {
    font-family: 'Source Code Pro', monospace;
    font-size: clamp(1.05rem, 3.2vw, 1.42rem);
    color: #b8f42d;
    text-shadow: 0 0 12px #b8f42d;
    margin-top: 9px;
}

@media (max-width: 768px) {
    .unique-stats-container {
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(-50%);
        text-align: center;
        gap: 40px !important;
    }
    .codeverse-logo {
        left: 50% !important;
        transform: translateX(-50%) translateY(-50%) !important;
        font-size: clamp(4rem, 12vw, 7rem) !important;
        letter-spacing: 4px;
        text-shadow: 0 0 20px #0ff, 0 0 40px #0ff, 0 0 60px #4361ee !important;
    }
}

@media (max-width: 480px) {
    .codeverse-logo { font-size: clamp(3.5rem, 11vw, 5.5rem) !important; }
}

.aim-title {
    font-family: 'Source Code Pro', monospace;
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    color: #b8f42d;
    text-shadow: 0 0 20px #b8f42d;
    margin-bottom: 10px;
}

/* ==========================================================================
   WHY PROGRAMIZ SECTION
   ========================================================================== */
.why-programiz-section {
    padding: 160px 40px 140px;
    text-align: center;
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
}

/* FIX: Static gradient */
.why-programiz-title {
    font-size: 4.8rem;
    font-weight: 900;
    background: linear-gradient(90deg, #4361ee, #7c3aed, #00f0ff, #c84efd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 100px;
    text-shadow: 0 0 40px rgba(67, 97, 238, 0.5);
}

.why-programiz-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

.why-programiz-card {
    background: var(--card);
    backdrop-filter: blur(12px);
    border: 1.5px solid transparent;
    border-radius: 20px;
    padding: 42px 32px;
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: transform 0.7s cubic-bezier(.25, .8, .25, 1),
                box-shadow 0.7s cubic-bezier(.25, .8, .25, 1),
                border-color 0.3s ease,
                background 0.3s ease;
    position: relative;
    overflow: hidden;
}

.why-programiz-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(67, 97, 238, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.7s ease;
}

.why-programiz-card:hover::before { opacity: 1; }

.why-programiz-card:hover {
    transform: translateY(-16px) scale(1.07);
    border-color: var(--primary);
    background: rgba(67, 97, 238, 0.15);
    box-shadow:
        0 25px 70px rgba(67, 97, 238, 0.7),
        0 0 60px rgba(0, 255, 255, 0.4);
}

.why-programiz-card:hover .why-programiz-icon {
    transform: scale(1.3) rotate(12deg);
    filter: drop-shadow(0 0 30px rgba(0, 255, 255, 1));
}

.why-programiz-subtitle {
    font-size: 1.68rem;
    font-weight: 800;
    background: linear-gradient(90deg, #00f0ff, #7c3aed, #c84efd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
}

@media (max-width: 992px) {
    .why-programiz-grid { grid-template-columns: 1fr; gap: 28px; }
    .why-programiz-card { height: 200px; }
    .why-programiz-icon { font-size: 6rem; }
}

/* ==========================================================================
   SUPREME EXECUTIVE PRACTICE
   ========================================================================== */
.supreme-executive-practice {
    margin: 0;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6rem;
    overflow: hidden;
    position: relative;
    color: var(--text);
    cursor: default;
    content-visibility: auto;
    contain-intrinsic-size: 0 600px;
}

.supreme-executive-practice .questions-section {
    max-width: 640px;
    padding: 0 24px;
    flex: 1;
    perspective: 2000px;
}

/* FIX: Static gradient — removed background-position animation */
.supreme-executive-practice .questions-header h2 {
    font-size: 3.8rem;
    font-weight: 900;
    background: linear-gradient(90deg, #4361ee, #7c3aed, #c84efd, #00f0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.supreme-executive-practice .questions-header p {
    font-size: 1.35rem;
    color: var(--text-light);
    opacity: .92;
    font-weight: 500;
}

.supreme-executive-practice .questions-grid {
    margin-top: 60px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 580px;
}

.supreme-executive-practice .btn-wrapper {
    display: flex;
    justify-content: flex-start;
    perspective: 1000px;
}

.supreme-executive-practice .btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 28px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(.23, 1, .32, 1),
                box-shadow 0.6s cubic-bezier(.23, 1, .32, 1),
                border-color 0.3s ease,
                background 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.supreme-executive-practice .btn:hover {
    transform: translateY(-10px) scale(1.06);
    border-color: var(--primary);
    background: rgba(67, 97, 238, 0.15);
    box-shadow:
        0 20px 50px rgba(67, 97, 238, 0.6),
        0 0 60px rgba(0, 255, 255, 0.4);
}

.supreme-executive-practice .btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(0, 255, 255, 0.2), transparent 70%);
    opacity: 0;
    transition: opacity 0.6s;
    pointer-events: none;
}

.supreme-executive-practice .btn:hover::before { opacity: 1; }

.supreme-executive-practice .icon-container {
    position: relative;
    width: 236px;
    height: 236px;
    border-radius: 64px;
    background:
        radial-gradient(circle at 19% 19%, #ff5e7c, #4361ee, #9d00ff),
        linear-gradient(145deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    box-shadow:
        0 40px 90px rgba(10, 15, 44, 0.32),
        0 18px 42px rgba(0, 0, 0, 0.26),
        inset 0 0 100px rgba(255, 255, 255, 0.26),
        0 0 0 2.6px rgba(255, 255, 255, 0.24),
        0 0 60px rgba(74, 107, 255, 0.32),
        0 0 0 1.6px rgba(255, 255, 255, 0.14),
        0 0 40px cyan;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    transform: perspective(2000px) rotateX(9.5deg) rotateY(-6.5deg);
    transition: transform 1s cubic-bezier(.23, 1, .32, 1),
                box-shadow 1s cubic-bezier(.23, 1, .32, 1);
    backdrop-filter: blur(22px);
    cursor: pointer;
    margin-right: 150px;
    margin-top: 100px;
    margin-left: auto;
}

.supreme-executive-practice .icon-container:hover {
    transform: perspective(2000px) rotateX(16deg) rotateY(-11deg) translateY(-20px) scale(1.06);
    box-shadow:
        0 58px 125px rgba(10, 15, 44, 0.46),
        0 26px 60px rgba(0, 0, 0, 0.32),
        inset 0 0 120px rgba(255, 255, 255, 0.46),
        0 0 0 3.2px rgba(255, 255, 255, 0.32),
        0 0 85px rgba(74, 107, 255, 0.44),
        0 0 0 2.2px rgba(255, 255, 255, 0.2),
        0 0 50px #00ffff,
        0 0 70px #9d00ff;
}

.supreme-executive-practice .icon-container::before {
    content: '';
    position: absolute;
    inset: -32px;
    border-radius: 72px;
    background:
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.4), transparent 68%),
        radial-gradient(circle at 60% 60%, rgba(255, 200, 220, 0.24), transparent 72%),
        radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.15), transparent 75%);
    filter: blur(32px);
    opacity: 0;
    transition: opacity 1s;
    z-index: -1;
}

.supreme-executive-practice .icon-container:hover::before { opacity: 1; }

.supreme-executive-practice .glow {
    position: absolute;
    width: 206px;
    height: 206px;
    border-radius: 64px;
    background: radial-gradient(
        circle at 38% 38%,
        rgba(255, 94, 124, 0.98),
        rgba(74, 107, 255, 0.8) 50%,
        rgba(0, 212, 255, 0.4) 75%,
        transparent 85%
    );
    filter: blur(30px);
}

.supreme-executive-practice svg {
    width: 140px;
    height: 140px;
    filter:
        drop-shadow(0 12px 26px rgba(0, 0, 0, 0.34))
        drop-shadow(0 8px 18px rgba(0, 0, 0, 0.26));
    position: relative;
    z-index: 1;
}

.supreme-executive-practice .curl-wave {
    position: absolute;
    width: 54px;
    height: 54px;
    top: 50%; right: 10px;
    transform: translateY(-50%);
    background: radial-gradient(circle at 0% 50%, rgba(255, 255, 255, 0.44), transparent 77%);
    border-radius: 50%;
    z-index: 2;
    pointer-events: none;
}

.supreme-executive-practice .bookmark {
    position: absolute;
    width: 12px;
    height: 46px;
    top: 14px; right: 16px;
    background: linear-gradient(180deg, #f1c40f, #f1c40f, #b8972a);
    border-radius: 4px;
    box-shadow:
        0 6px 14px rgba(212, 175, 55, 0.5),
        inset 0 2.5px 4px rgba(255, 255, 255, 0.45);
    z-index: 3;
}

.supreme-executive-practice .bookmark::after {
    content: '';
    position: absolute;
    bottom: -10px; left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 10px solid #b8972a;
    filter: drop-shadow(0 2.5px 5px rgba(0, 0, 0, 0.3));
}

.supreme-executive-practice .page-number {
    position: absolute;
    bottom: 20px; right: 24px;
    font-size: 11px;
    font-weight: 900;
    color: #5a7aff;
    letter-spacing: 1.2px;
    z-index: 2;
}

@media (max-width: 1100px) {
    .supreme-executive-practice {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 4rem;
        padding: 100px 30px 140px;
        text-align: center;
    }
    .supreme-executive-practice .questions-section { margin-right: 0 !important; max-width: 640px; }
    .supreme-executive-practice .icon-container { order: -1; margin: 0 auto; }
    .questions-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 22px; }
}

@media (max-width: 480px) {
    .supreme-executive-practice { padding: 80px 20px 100px !important; gap: 3rem; }
    .supreme-executive-practice .questions-header h2 { font-size: 2.6rem !important; }
    .questions-grid { grid-template-columns: 1fr !important; }
    .supreme-executive-practice .icon-container { width: 200px; height: 200px; }
    .supreme-executive-practice svg { width: 120px; height: 120px; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    margin-top: auto;
    padding: 90px 10% 40px;
    border-top: 1px solid rgba(67, 97, 238, 0.3);
    color: var(--text-light);
    background: linear-gradient(180deg, transparent, rgba(10, 14, 23, 0.5));
    content-visibility: auto;
    contain-intrinsic-size: 0 400px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 40px;
}

.footer-column h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #00f0ff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-column h3::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, #00f0ff, transparent);
    margin-left: 12px;
}

.footer-column ul { list-style: none; }

.footer-column ul li {
    margin-bottom: 11px;
    font-size: .95rem;
    color: var(--text-light);
    transition: color 0.3s, transform 0.3s;
    position: relative;
    padding-left: 4px;
}

.footer-column ul li:hover { color: #fff; transform: translateX(6px); }

.footer-column ul li::before {
    content: '>';
    position: absolute;
    left: -18px;
    opacity: 0;
    color: #7c3aed;
    transition: all 0.3s;
}

.footer-column ul li:hover::before { opacity: 1; left: -14px; }

.footer-bottom {
    margin-top: 60px;
    padding: 24px 10%;
    background: rgba(10, 14, 23, 0.95);
    border-top: 1px solid rgba(67, 97, 238, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .92rem;
    backdrop-filter: blur(12px);
}

.social-links { display: flex; gap: 16px; }

.social-links a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: #ccc;
    font-size: 1.3rem;
    transition: color 0.4s, border-color 0.4s, background 0.4s, transform 0.4s, box-shadow 0.4s;
}

.social-links a:hover {
    color: #fff;
    border-color: #00f0ff;
    background: rgba(0, 240, 255, 0.15);
    transform: translateY(-4px) rotate(5deg);
    box-shadow: 0 10px 25px rgba(0, 240, 255, 0.3);
}

@media (max-width: 1100px) { .footer-container { grid-template-columns: repeat(3, 1fr); } }

@media (max-width: 768px) {
    footer { padding: 70px 5% 40px; }
    .footer-container { grid-template-columns: 1fr; gap: 32px; }
    .footer-column h3::after { display: none; }
    .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 900px) {
    .editor-card { width: 100% !important; max-width: none; border-radius: 20px; }
    .split-container { flex-direction: column; gap: 5rem; padding: 0 1.5rem; }
    .compilers-grid { grid-template-columns: 1fr; }
    .compilers-section { padding: 0 2rem; margin-top: 3rem; }
}

@media (max-width: 1400px) {
    .split-container { gap: 3rem; padding: 0 2rem; }
    .code-area { font-size: 17.5px; line-height: 1.9; }
    .gutter { font-size: 16px; width: 68px; }
    .code-area { margin-left: 68px; }
}

@media (max-width: 1200px) {
    .editor-card { max-width: 700px; }
    .compilers-section { max-width: 460px; }
    .code-area { font-size: 16.8px; }
}

/* ==========================================================================
   PERFORMANCE OPTIMIZATIONS
   FIX: Removed blanket `transform: translateZ(0)` — this forces GPU layer
   promotion on every element and actually *increases* memory and main-thread
   work. Only elements that genuinely animate need will-change or translateZ.
   ========================================================================== */
.project-btn,
.why-programiz-card,
.course-card,
.compiler-button,
.supreme-executive-practice .btn {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* ==========================================================================
   SPACING ADJUSTMENTS
   ========================================================================== */
.projects-nexus-section { margin-bottom: 10rem; }
.stats-section { margin-top: 8rem; }

@media (max-width: 992px) {
    .projects-nexus-section { margin-bottom: 8rem; }
    .stats-section { margin-top: 6rem; }
}

@media (max-width: 480px) {
    .projects-nexus-section { margin-bottom: 6rem; }
    .stats-section { margin-top: 4rem; }
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */
@media print {
    body::before,
    body::after,
    .particle-layer,
    header,
    footer,
    .btn,
    .project-btn,
    .compiler-button {
        display: none !important;
    }
    * {
        background: white !important;
        color: black !important;
    }
}