* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
    cursor: none;
    transition: background 0.4s ease, color 0.4s ease;
}

/* ═══════════════════════════════════════════════════
   PROFESSIONAL MODE — clean resume look
═══════════════════════════════════════════════════ */
body.professional {
    background: #fafafa;
    color: #1a1a1a;
    cursor: auto;
}

/* Hide all animated / decorative elements */
body.professional .custom-cursor,
body.professional .neural-canvas,
body.professional .floating-particles,
body.professional #terminalBlock { display: none !important; }

body.professional .skill-icon { display: none !important; }
body.professional #aboutProse { display: block; }

/* Prevent nav covering section content on desktop */
body.professional section {
    padding-top: 100px;
    scroll-margin-top: 65px;
}

/* ── Nav ── */
body.professional nav {
    background: #fff;
    border-bottom: 1px solid #ddd;
    backdrop-filter: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

body.professional .logo {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: #1a1a1a;
    animation: none;
    filter: none;
    color: #1a1a1a;
    font-weight: 700;
}

body.professional .nav-links a span {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: #555;
    color: #555;
    font-weight: 400;
}

body.professional .nav-links a { transform: none !important; }
body.professional .nav-links a:hover span { -webkit-text-fill-color: #1a1a1a; }
body.professional .nav-links a::after { background: #1a1a1a; }

/* ── Hero ── */
body.professional .hero { background: none; }

body.professional .hero h1 {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: #1a1a1a;
    animation: none;
    filter: none;
    color: #1a1a1a;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
}

body.professional .hero p { color: #555; font-size: 1.1rem; }

body.professional .cta-button {
    background: #1a1a1a;
    color: #fff;
    border-radius: 4px;
    font-size: 0.95rem;
    padding: 12px 28px;
}

body.professional .cta-button:hover {
    transform: none !important;
    box-shadow: none !important;
    background: #333;
}

/* ── Section titles ── */
body.professional .section-title {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: #1a1a1a;
    color: #1a1a1a;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    text-align: left;
    margin-bottom: 40px;
    border-bottom: 2px solid #1a1a1a;
    padding-bottom: 10px;
}

/* ── About prose ── */
body.professional #aboutProse { margin: 0; max-width: 800px; }

body.professional #aboutProse p {
    color: #444;
    line-height: 1.8;
    font-size: 1rem;
    margin-bottom: 16px;
}

/* ── Cards ── */
body.professional .education-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: none;
    backdrop-filter: none;
    padding: 24px 28px;
}

body.professional .education-card::before,
body.professional .education-card::after { display: none; }

body.professional .education-card:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: #ccc;
}

body.professional .education-year {
    color: #888;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

body.professional .education-degree {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: #1a1a1a;
    color: #1a1a1a;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

body.professional .education-school {
    color: #555;
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 12px;
}

body.professional .education-card p {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ── Skill cards ── */
body.professional .skill-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: none;
    backdrop-filter: none;
    padding: 24px 28px;
}

body.professional .skill-card:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: #ccc;
}

body.professional .skill-card h3 {
    color: #1a1a1a;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

body.professional .skill-card p { color: #555; font-size: 0.9rem; line-height: 1.6; }

/* ── Contact icons ── */
body.professional .contact-icon {
    background: #fff;
    border: 1.5px solid #ddd;
    width: 60px; height: 60px;
}

body.professional .contact-icon::before { display: none; }

body.professional .contact-icon:hover {
    transform: none !important;
    box-shadow: none !important;
    background: #f5f5f5;
    border-color: #aaa;
}

body.professional .contact-icon img {
    filter: brightness(0) invert(30%);
    transition: none;
}

body.professional .contact-icon:hover img {
    filter: brightness(0) invert(10%);
    transform: none !important;
}

/* ── No animations ── */
body.professional .rotating-element {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

body.professional .parallax-text { transform: none !important; }

/* ── Toggle (professional state) ── */
body.professional .mode-toggle-switch {
    background: #1a1a1a;
    border-color: #1a1a1a;
}

body.professional .mode-toggle-thumb {
    background: #fff;
    left: 18px;
}

/* ═══════════════════════════════════════════════════
   HACKER MODE (default)
═══════════════════════════════════════════════════ */

#aboutProse { display: none; }

.custom-cursor {
    position: fixed;
    width: 20px; height: 20px;
    background: rgba(0, 255, 100, 0.8);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
    box-shadow: 0 0 20px rgba(0, 255, 100, 0.6);
}

.neural-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    background: radial-gradient(ellipse at center, rgba(0,20,40,0.1) 0%, rgba(0,0,0,1) 100%);
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    background: rgba(0,0,0,0.8);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: background 0.4s ease, border-color 0.4s ease;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(45deg, #00ff64, #00ffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 5px rgba(0,255,100,0.5)); }
    to   { filter: drop-shadow(0 0 20px rgba(0,255,100,0.8)); }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    background: linear-gradient(45deg, #fff, #00ff64);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover { transform: translateY(-2px); }

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0;
    width: 0; height: 2px;
    background: linear-gradient(90deg, #00ff64, #00ffff);
    transition: width 0.3s ease;
}

.nav-links a:hover::after { width: 100%; }

/* ─── Mode Toggle ─── */
.mode-toggle {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    outline: none;
    flex-shrink: 0;
}

.mode-toggle-switch {
    width: 36px; height: 20px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 10px;
    position: relative;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.mode-toggle-switch:hover { border-color: rgba(255,255,255,0.5); }

.mode-toggle-thumb {
    width: 14px; height: 14px;
    background: rgba(255,255,255,0.55);
    border-radius: 50%;
    position: absolute;
    top: 2px; left: 2px;
    transition: left 0.3s ease, background 0.3s ease;
}

section {
    min-height: 100vh;
    padding: 120px 0;
    position: relative;
}

.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: radial-gradient(circle at 50% 50%, rgba(0,255,100,0.05) 0%, transparent 50%);
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #fff, #00ff64, #00ffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShine 3s ease-in-out infinite;
}

@keyframes textShine {
    0%, 100% { filter: brightness(1); }
    50%       { filter: brightness(1.2) drop-shadow(0 0 30px rgba(0,255,100,0.6)); }
}

.hero p {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 50px;
}

.cta-button {
    background: linear-gradient(45deg, #00ff64, #00ffff);
    color: #000;
    padding: 16px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0,255,100,0.3);
}

.section-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 80px;
    background: linear-gradient(45deg, #fff, #00ff64);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.rotating-element { transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1); }

#aboutProse { margin: 40px 0; }

.terminal {
    background: #111;
    border: 1px solid #333;
    border-radius: 15px;
    padding: 30px;
    margin: 50px 0;
    font-family: 'Courier New', monospace;
    position: relative;
    overflow: hidden;
}

.terminal::before {
    content: '● ● ●';
    position: absolute;
    top: 15px; left: 20px;
    color: #666; font-size: 12px;
}

.terminal-content { margin-top: 30px; }
.command { color: #00ff64; margin-bottom: 10px; }
.output  { color: #fff; margin-bottom: 20px; line-height: 1.4; }

.cursor {
    display: inline-block;
    background-color: #00ff64;
    animation: blink 1s infinite;
    width: 2px; height: 1em; margin-left: 2px;
}

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

.prompt { color: #00ffff; display: inline; }
.command-line { margin-bottom: 10px; }
.typing { display: inline; color: #00ff64; }
.command-line.hidden { display: none; }

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.skill-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.skill-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 30px 60px rgba(0,255,100,0.2);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #00ff64, #00ffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-icons {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 60px;
    flex-wrap: wrap;
}

.contact-icon img {
    width: 32px; height: 32px;
    transition: all 0.3s ease;
    filter: brightness(0) saturate(100%) invert(85%) sepia(15%) saturate(1200%) hue-rotate(70deg) brightness(110%) contrast(105%);
}

.contact-icon img.email { width: 36px; height: 28px; object-fit: contain; }

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px; height: 80px;
    background: linear-gradient(45deg, rgba(255,255,255,0.05), rgba(0,255,100,0.05));
    border: 2px solid rgba(0,255,100,0.3);
    border-radius: 50%;
    transition: all 0.4s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.contact-icon::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,255,100,0.2), transparent);
    transition: left 0.5s ease;
}

.contact-icon:hover::before { left: 100%; }

.contact-icon:hover img {
    filter: brightness(0) saturate(100%) invert(100%) sepia(100%) saturate(0%) hue-rotate(0deg) brightness(200%) contrast(100%);
    transform: scale(1.2);
}

.contact-icon:hover {
    transform: translateY(-10px) scale(1.1);
    border-color: #00ff64;
    box-shadow: 0 20px 40px rgba(0,255,100,0.3);
    background: rgba(0,255,100,0.1);
}

.education-timeline {
    column-count: 2;
    column-gap: 40px;
    margin-top: 60px;
}

.education-item {
    position: relative;
    break-inside: avoid;
    margin-bottom: 40px;
    display: inline-block;
    width: 100%;
}

.education-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(0,255,100,0.3);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

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

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

.education-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 30px 60px rgba(0,255,100,0.2);
    border-color: #00ff64;
}

.education-year { font-size: 1.1rem; color: #00ff64; font-weight: 600; margin-bottom: 15px; }

.education-degree {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #fff, #00ff64);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.education-school { font-size: 1.1rem; color: #00ffff; margin-bottom: 20px; font-weight: 500; }
.education-card p { color: rgba(255,255,255,0.8); line-height: 1.6; }
.parallax-text { transform: translateZ(0); will-change: transform; }

.floating-particles {
    position: absolute;
    width: 4px; height: 4px;
    background: rgba(0,255,100,0.6);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50%       { transform: translateY(-20px) rotate(180deg); }
}

@keyframes fall { to { transform: translateY(100vh); opacity: 0; } }

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px,  2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate( 2px,  2px); }
    80% { transform: translate( 2px, -2px); }
}

/* ═══════════════════════════════════════════════════
   MOBILE
═══════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .container { padding: 0 20px; }

    nav {
        position: fixed;
        top: 0; left: 0;
        width: 60px; height: 100vh;
        backdrop-filter: blur(20px);
        background: rgba(0,0,0,0.9);
        border-right: 2px solid rgba(0,255,100,0.3);
        border-bottom: none;
        z-index: 1000;
        transition: all 0.3s ease;
    }

    nav.expanded { width: 250px; }

    /* Professional mode mobile nav — white with dark dots */
    body.professional nav {
        background: #fff !important;
        border-right: 1px solid #ddd !important;
        box-shadow: 2px 0 8px rgba(0,0,0,0.06);
    }

    body.professional .logo {
        -webkit-text-fill-color: #1a1a1a !important;
        color: #1a1a1a !important;
        animation: none !important;
    }

    body.professional .nav-links a::before {
        background: #333 !important;
        box-shadow: none !important;
    }

    body.professional .nav-links a:not(:last-child)::after {
        background: linear-gradient(to bottom, #bbb, #ddd) !important;
    }

    body.professional .nav-links a span {
        background: none !important;
        -webkit-background-clip: unset !important;
        -webkit-text-fill-color: #333 !important;
    }

    /* KEY FIX: keep left padding on mobile professional so content
       doesn't slide under the sidebar nav */
    body.professional { padding-left: 60px; }
    body.professional.nav-expanded { padding-left: 250px; }

    /* Professional section top padding on mobile — no top nav to clear */
    body.professional section {
        padding-top: 60px;
        scroll-margin-top: 0;
    }

    .nav-content {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 20px 10px;
        height: 100%;
    }

    .logo {
        font-size: 18px;
        margin-bottom: 40px;
        writing-mode: vertical-lr;
        text-orientation: mixed;
        transform: rotate(180deg);
        transition: all 0.3s ease;
        cursor: pointer;
    }

    nav.expanded .logo {
        writing-mode: horizontal-tb;
        text-orientation: initial;
        transform: rotate(0deg);
        font-size: 20px;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        gap: 25px;
        font-size: 0.9rem;
        align-items: center;
        width: 100%;
    }

    .nav-links a {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px; height: 40px;
        text-decoration: none;
        font-weight: 600;
        transition: all 0.3s ease;
        color: rgba(255,255,255,0.7);
        overflow: hidden;
    }

    .nav-links a::before {
        content: '';
        position: absolute;
        left: 50%; top: 50%;
        transform: translate(-50%, -50%);
        width: 12px; height: 12px;
        background: linear-gradient(45deg, #00ff64, #00ffff);
        border-radius: 50%;
        transition: all 0.3s ease;
        box-shadow: 0 0 10px rgba(0,255,100,0.5);
    }

    nav.expanded .nav-links a { width: 200px; justify-content: flex-start; padding-left: 30px; }
    nav.expanded .nav-links a::before { left: 15px; transform: translateY(-50%); }

    .nav-links a span {
        opacity: 0;
        transform: translateX(-20px);
        transition: all 0.3s ease;
        font-size: 0.95rem;
        margin-left: 20px;
        background: linear-gradient(45deg, rgba(255,255,255,0.8), rgba(0,255,100,0.6));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        white-space: nowrap;
    }

    nav.expanded .nav-links a span { opacity: 1; transform: translateX(0); }

    .nav-links a:hover::before {
        background: linear-gradient(45deg, #00ffff, #00ff64);
        box-shadow: 0 0 20px rgba(0,255,100,0.8);
        transform: translate(-50%,-50%) scale(1.2);
    }

    nav.expanded .nav-links a:hover::before { transform: translateY(-50%) scale(1.2); }

    .nav-links a:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 100%; left: 50%;
        transform: translateX(-50%);
        width: 1px; height: 25px;
        background: linear-gradient(to bottom, rgba(0,255,100,0.5), rgba(0,255,100,0.2));
        z-index: 0;
    }

    nav.expanded .nav-links a:not(:last-child)::after { left: 21px; transform: translateX(-50%); }

    /* Toggle on mobile: rotate 90deg to fit vertical sidebar.
       Use a wrapper approach — rotate the button, but keep the
       switch itself sized correctly for its rotated context. */
    .nav-links .mode-toggle {
        display: flex;
        transform: rotate(90deg);
        /* Compensate so the rotated switch doesn't overflow the 60px nav */
        width: 20px;
        height: 36px;
        justify-content: center;
        align-items: center;
    }

    /* The switch stays its normal size; rotation of parent handles orientation */
    .nav-links .mode-toggle .mode-toggle-switch {
        width: 36px;
        height: 20px;
        flex-shrink: 0;
    }

    body { padding-left: 60px; }
    body.nav-expanded { padding-left: 250px; }

    .container { padding-left: 20px; }
    .hero h1 { font-size: 3rem; }
    .skills-grid { grid-template-columns: 1fr; }
    .education-timeline { column-count: 1; }
    .contact-icons { gap: 20px; }
    .contact-icon { width: 60px; height: 60px; }
    .contact-icon img { width: 24px; height: 24px; }
    .contact-icon img.email { width: 28px; height: 22px; }
}

/* ═══════════════════════════════════════════════════
   DESKTOP
═══════════════════════════════════════════════════ */
@media (min-width: 769px) {
    body, body.nav-expanded { padding-left: 0; }
    .container { padding: 0 40px; }

    nav {
        position: fixed;
        top: 0; left: 0; right: 0;
        width: auto; height: auto;
        backdrop-filter: blur(20px);
        background: rgba(0,0,0,0.8);
        border-bottom: 1px solid rgba(255,255,255,0.1);
        border-right: none;
    }

    nav.expanded { width: auto; }

    .nav-content {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 20px 40px;
        height: auto;
    }

    .logo {
        font-size: 24px;
        margin-bottom: 0;
        writing-mode: horizontal-tb;
        text-orientation: initial;
        transform: rotate(0deg);
    }

    .nav-links {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 30px;
        font-size: 1rem;
        width: auto;
    }

    .nav-links a {
        width: auto; height: auto;
        border-radius: 0;
        background: none; border: none;
        padding: 0; overflow: visible;
    }

    .nav-links a::before { display: none; }

    .nav-links a::after {
        content: '';
        position: absolute;
        bottom: -5px; left: 0;
        width: 0; height: 2px;
        background: linear-gradient(90deg, #00ff64, #00ffff);
        transition: width 0.3s ease;
    }

    .nav-links a:hover::after { width: 100%; }

    .nav-links a span {
        opacity: 1;
        transform: translateX(0);
        padding-left: 0;
        background: linear-gradient(45deg, #fff, #00ff64);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .nav-links a:hover span { transform: translateY(-2px); }
}
