:root {
    --bg-color: #030305;
    --bg-secondary: #0a0a10;
    --text-primary: #f0f0f0;
    --text-secondary: #8a8f98;
    --accent-primary: #00ffcc;
    --accent-secondary: #b026ff;
    --glass-bg: rgba(10, 10, 15, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

:root.light-theme {
    --bg-color: #f2f4f8;
    --bg-secondary: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a68;
    --accent-primary: #008f73;
    --accent-secondary: #741bcf;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    cursor: none;
}

/* Custom Cursor */
.cursor-dot {
    width: 12px;
    height: 12px;
    background-color: white;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 10000;
    pointer-events: none;
    mix-blend-mode: difference;
    transition: width 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), 
                height 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.cursor-dot.cursor-morph {
    width: 60px;
    height: 60px;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(0, 255, 204, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    transition: width 0.2s, height 0.2s, background-color 0.2s, border-color 0.2s, opacity 0.3s;
}

.cursor-outline.hide {
    opacity: 0;
}

/* Interactive Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -3; /* Behind everything */
    pointer-events: none; /* Let clicks pass through to content */
}

/* Tech Grid Background */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: 50px 50px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    z-index: -2;
    pointer-events: none;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    animation: pan-grid 20s linear infinite;
}

:root.light-theme .bg-grid {
    background-image: 
        linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
}

@keyframes pan-grid {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

/* Background Blobs */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.4;
    animation: float 20s infinite ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-secondary), transparent 70%);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-primary), transparent 70%);
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -50px) scale(1.1); }
    66% { transform: translate(-30px, 40px) scale(0.9); }
}

/* Glassmorphism Utilities */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

/* Typography */
h1, h2, h3, h4, .logo {
    font-family: var(--font-heading);
}

.highlight {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -1px;
    font-family: var(--font-mono);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

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

/* Buttons */
.btn-primary {
    background: transparent;
    color: var(--accent-primary) !important;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem !important;
    border: 1px solid var(--accent-primary);
    cursor: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-family: var(--font-mono);
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.1) inset;
}

.btn-primary:hover {
    background: rgba(0, 255, 204, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.3), 0 0 20px rgba(0, 255, 204, 0.2) inset;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    color: var(--text-primary);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: none;
}

.btn-icon:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

/* Theme Toggle Button */
.theme-btn {
    cursor: none;
}
.theme-btn .sun-icon { display: block; }
.theme-btn .moon-icon { display: none; }

:root.light-theme .theme-btn .sun-icon { display: none; }
:root.light-theme .theme-btn .moon-icon { display: block; }

/* Layout */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

section {
    min-height: 100vh;
    padding: 100px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

/* --- Split Hero Layout --- */
.split-hero {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    min-height: 100vh;
    padding-top: 120px;
    position: relative;
    z-index: 10;
}

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

.hero-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 450px;
    border-radius: 20px;
    overflow: hidden;
    padding: 10px;
}

.hero-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.1);
    transition: filter 0.3s ease;
}

.hero-image:hover {
    filter: grayscale(0%) contrast(1);
}

.hero-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    margin-bottom: 2rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.hero-badge:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 107, 0, 0.4);
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.1);
}

.hero-badge .dot {
    width: 10px;
    height: 10px;
    background: #ff6b00;
    border-radius: 50%;
    box-shadow: 0 0 10px #ff6b00;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 107, 0, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(255, 107, 0, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 107, 0, 0); }
}

.hero-huge-title {
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.greeting-script {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-style: italic;
    font-size: 3rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.name-bold {
    display: block;
    font-size: 4.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--text-primary);
    letter-spacing: -2px;
    background: linear-gradient(90deg, var(--text-primary), var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 450px;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-role {
    display: flex;
    flex-direction: column;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-primary);
}

.company-link {
    color: var(--text-primary);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.company-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    bottom: -2px;
    left: 0;
    background: var(--accent-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.company-link:hover {
    color: var(--accent-primary);
}

.company-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* Responsive */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 150px;
    }
    
    .subtitle {
        margin: 0 auto 2.5rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .nav-links {
        display: none; /* Add mobile menu later */
    }
}

@media (max-width: 576px) {
    .name { font-size: 3rem; }
    .title { font-size: 1.5rem; }
    .image-card { width: 100%; height: 350px; }
}

/* --- Shared Components --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-card:hover {
    /* transform removed for 3D tilt JS compatibility */
    background: rgba(20, 20, 25, 0.6);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 255, 204, 0.1) inset;
    border-color: rgba(0, 255, 204, 0.3);
}

/* --- About & Skills Section --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.about-text {
    font-size: 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.skills-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-category h3 {
    margin-bottom: 1rem;
    color: var(--accent-primary);
    font-size: 1.2rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tag {
    background: rgba(0, 255, 204, 0.05);
    color: var(--accent-primary);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    border: 1px solid rgba(0, 255, 204, 0.2);
    opacity: 0;
    transform: scale(0.8) translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.tag.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.tag:hover {
    background: rgba(0, 255, 204, 0.15);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 255, 204, 0.2);
}

/* --- Epic Experience Timeline --- */
.epic-timeline {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
    position: relative;
}

.timeline-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 4rem;
    position: relative;
    width: 100%;
}

.timeline-row:last-child {
    margin-bottom: 0;
}

/* Left Side: Date and Title */
.timeline-left {
    flex: 1;
    text-align: right;
    padding-right: 3rem;
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.timeline-row.visible .timeline-left {
    opacity: 1;
    transform: translateX(0);
}

.timeline-date {
    font-size: 1rem;
    color: var(--accent-secondary);
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.timeline-left h3 {
    font-size: 1.4rem;
    line-height: 1.4;
}

/* Center Spine */
.timeline-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 24px;
    flex-shrink: 0;
}

.timeline-node {
    width: 16px;
    height: 16px;
    background: var(--bg-color);
    border: 3px solid var(--accent-primary);
    border-radius: 50%;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 15px var(--accent-primary);
    transition: all 0.4s ease;
}

.timeline-row:hover .timeline-node {
    background: var(--accent-primary);
    transform: scale(1.3);
    box-shadow: 0 0 25px var(--accent-primary), 0 0 40px var(--accent-secondary);
}

.timeline-line {
    position: absolute;
    top: 16px;
    bottom: -4rem; /* connects to next node */
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-primary), var(--accent-secondary));
    opacity: 0.4;
    z-index: 1;
}

.timeline-row:last-child .timeline-line {
    display: none;
}

/* Right Side: Description Card */
.timeline-right {
    flex: 1;
    padding-left: 3rem;
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1) 0.2s, transform 0.8s cubic-bezier(0.5, 0, 0, 1) 0.2s;
}

.timeline-row.visible .timeline-right {
    opacity: 1;
    transform: translateX(0);
}

.desc-card {
    padding: 1.5rem 2rem;
    background: rgba(10, 10, 15, 0.6);
    border-left: 2px solid var(--accent-secondary);
}

.desc-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

/* --- Projects Section --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-header i {
    color: var(--accent-secondary);
}

.project-header h3 {
    font-size: 1.5rem;
}

.project-tagline {
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.project-card p:last-child {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* --- Education Section --- */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.ed-card {
    display: flex;
    flex-direction: column;
}

.ed-icon {
    color: var(--accent-primary);
    margin-bottom: 1rem;
    width: 32px;
    height: 32px;
}

.ed-card h3 {
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.ed-card p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.date {
    color: var(--accent-secondary) !important;
    font-weight: 600;
}

.achievement-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.achievement-list li {
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.achievement-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

.achievement-list strong {
    color: var(--text-primary);
}

/* --- Contact Section --- */
.contact-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.contact-card {
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.contact-card i, .contact-card .brand-icon {
    width: 40px;
    height: 40px;
    color: var(--accent-primary);
}

.contact-card h3 {
    font-size: 1.2rem;
}

.contact-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 2rem;
    margin-top: 5rem;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
}

.parallax-footer {
    position: relative;
    padding: 100px 5% 50px;
    margin-top: 100px;
    background: var(--bg-color); /* Need a solid background so it masks the canvas beneath it slightly, or we use a glass effect */
    border-top: 1px solid var(--glass-border);
    overflow: hidden;
}

.parallax-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: inherit;
    z-index: -1;
}

.footer-content {
    /* The parallax translation will be driven by JS */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.huge-footer-text {
    font-family: var(--font-heading);
    font-size: clamp(4rem, 15vw, 12rem);
    font-weight: 800;
    line-height: 0.9;
    color: var(--text-primary);
    margin-bottom: 50px;
    letter-spacing: -0.05em;
    background: linear-gradient(to right, var(--text-primary), var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.footer-socials {
    display: flex;
    gap: 20px;
}

.footer-socials a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

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

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Extended Responsive --- */
@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    .epic-timeline {
        padding-left: 1rem;
    }
    .timeline-row {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 2rem;
    }
    .timeline-left {
        text-align: left;
        padding-right: 0;
        padding-left: 2rem;
        margin-bottom: 1rem;
        transform: translateX(-20px);
    }
    .timeline-center {
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
    }
    .timeline-line {
        bottom: -2rem;
    }
    .timeline-right {
        padding-left: 2rem;
        width: 100%;
        transform: translateX(-20px);
    }
    
    .split-hero {
        flex-direction: column;
        text-align: left;
        gap: 2rem;
        padding-top: 150px;
    }
    .hero-right {
        align-items: flex-start;
    }
    .name-bold {
        font-size: 3rem;
    }
}

/* --- Preloader --- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-color);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.loader-logo {
    font-size: 3rem;
    color: var(--accent-primary);
    font-weight: 700;
}

.blink {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}

.progress-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    width: 0%;
    height: 100%;
    background: var(--accent-primary);
    animation: load 1.5s cubic-bezier(0.7, 0, 0.3, 1) forwards;
    box-shadow: 0 0 10px var(--accent-primary);
}

@keyframes load {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.loader-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
}

/* --- Scroll Indicator --- */
.scroll-indicator-container {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    cursor: none; /* Let custom cursor handle this */
}

.scroll-indicator:hover {
    opacity: 1;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--accent-primary);
    border-radius: 15px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 2px;
    animation: scroll-wheel 1.5s infinite;
}

.arrow {
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--accent-primary);
    border-bottom: 2px solid var(--accent-primary);
    transform: rotate(45deg);
    animation: scroll-arrow 1.5s infinite;
}

@keyframes scroll-wheel {
    0% { top: 6px; opacity: 1; }
    100% { top: 20px; opacity: 0; }
}

@keyframes scroll-arrow {
    0% { transform: rotate(45deg) translate(-5px, -5px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: rotate(45deg) translate(5px, 5px); opacity: 0; }
}

/* Make body hide overflow while loading */
body.loading {
    overflow: hidden;
}

/* --- Dynamic Heading --- */
.dynamic-heading {
    background: linear-gradient(90deg, var(--text-primary) 0%, var(--accent-primary) 50%, var(--accent-secondary) 100%);
    background-size: 200% auto;
    background-position: 0% center;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    transition: background-position 0.1s ease-out;
}

/* --- Curtain Reveal --- */
.curtain-reveal-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    padding: 1px; /* To avoid margin collapse issues */
}
.curtain-panel {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: var(--bg-secondary);
    z-index: 2;
    transition: transform 1.2s cubic-bezier(0.7, 0, 0.3, 1);
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.2);
}

/* Project Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 20000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: all 0.4s ease;
}

.modal-overlay.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal-content {
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 40px;
    transform: translateY(0) scale(1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.hide .modal-content {
    transform: translateY(50px) scale(0.95);
}

.close-modal {
    position: absolute;
    top: 20px; right: 20px;
    z-index: 10;
}

.modal-image-placeholder {
    width: 100%;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(0, 255, 204, 0.3);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    font-family: var(--font-mono);
    color: var(--text-secondary);
}

#modal-desc {
    font-family: var(--font-body);
    line-height: 1.6;
}

#modal-desc h3 {
    font-family: var(--font-heading);
    color: var(--accent-primary);
    margin-bottom: 10px;
}
.curtain-panel.left {
    left: 0;
    transform-origin: left;
    border-right: 2px solid var(--accent-primary);
}
.curtain-panel.right {
    right: 0;
    transform-origin: right;
    border-left: 2px solid var(--accent-primary);
}
.curtain-reveal-container.visible .curtain-panel.left,
.curtain-reveal-container.visible .curtain-panel.right {
    transform: scaleX(0);
}
.reveal-content {
    position: relative;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s 0.6s; /* appear slightly after curtain starts opening */
}
.curtain-reveal-container.visible .reveal-content {
    opacity: 1;
}

/* --- Project Stacking --- */
.projects-stack {
    display: flex;
    flex-direction: column;
    gap: 40vh; /* Distance to scroll before next project stacks */
    padding-bottom: 20vh;
    position: relative;
}

/* --- Click Ripple Effect --- */
.click-ripple {
    position: fixed;
    border-radius: 50%;
    background: rgba(0, 255, 204, 0.4);
    transform: translate(-50%, -50%);
    animation: ripple-anim 0.6s ease-out forwards;
    pointer-events: none;
    z-index: 9999;
}

@keyframes ripple-anim {
    0% {
        width: 0;
        height: 0;
        opacity: 0.8;
    }
    100% {
        width: 150px;
        height: 150px;
        opacity: 0;
    }
}

.sticky-project {
    position: sticky;
    top: 150px;
    transition: transform 0.3s ease, filter 0.3s ease;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 255, 204, 0.1) inset;
}

.sticky-project:nth-child(1) { top: 120px; z-index: 10; }
.sticky-project:nth-child(2) { top: 150px; z-index: 20; }
.sticky-project:nth-child(3) { top: 180px; z-index: 30; }

/* Physics Sandbox */
.skills-key {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.key-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.key-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

/* Color Variables for Categories */
:root {
    --lang-color: rgba(255, 65, 105, 0.8);
    --ml-color: rgba(65, 105, 255, 0.8);
    --web-color: rgba(0, 255, 204, 0.8);
}

.lang-dot { background: var(--lang-color); box-shadow: 0 0 10px var(--lang-color); }
.ml-dot { background: var(--ml-color); box-shadow: 0 0 10px var(--ml-color); }
.web-dot { background: var(--web-color); box-shadow: 0 0 10px var(--web-color); }

/* Terminal Decryption Reveal */
.terminal-window {
    width: 100%;
    min-height: 400px;
    background: rgba(10, 10, 12, 0.85); /* Darker for terminal feel */
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.terminal-header {
    background: rgba(30, 30, 35, 0.9);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.term-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.term-btn.close { background: #ff5f56; }
.term-btn.minimize { background: #ffbd2e; }
.term-btn.expand { background: #27c93f; }

.term-title {
    margin-left: 15px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.terminal-body {
    padding: 25px;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: #00ffcc; /* Hacker green by default */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-shadow: 0 0 5px rgba(0, 255, 204, 0.3);
}

.terminal-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 24px;
}

.cursor-blink {
    display: inline-block;
    width: 10px;
    height: 1.1rem;
    background-color: #00ffcc;
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

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

/* Decrypted Tags inside Terminal */
.decrypted-tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-primary);
    background: rgba(20, 20, 25, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    margin: 4px;
    opacity: 0;
    transform: translateY(10px);
    animation: tag-pop 0.4s ease forwards;
}

@keyframes tag-pop {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.decrypted-tag.lang-tag { border-color: var(--lang-color); box-shadow: 0 0 10px rgba(255, 65, 105, 0.2); }
.decrypted-tag.ml-tag { border-color: var(--ml-color); box-shadow: 0 0 10px rgba(65, 105, 255, 0.2); }
.decrypted-tag.web-tag { border-color: var(--web-color); box-shadow: 0 0 10px rgba(0, 255, 204, 0.2); }

.decrypted-tag:hover {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    background: rgba(40, 40, 45, 0.9);
}

/* Light Theme Terminal Overrides */
:root.light-theme .terminal-window {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--glass-border);
}

:root.light-theme .terminal-header {
    background: rgba(245, 245, 250, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

:root.light-theme .terminal-body {
    color: var(--accent-primary);
    text-shadow: none;
}

:root.light-theme .cursor-blink {
    background-color: var(--accent-primary);
}

:root.light-theme .decrypted-tag {
    background: rgba(240, 240, 245, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

:root.light-theme .decrypted-tag.lang-tag { border-color: var(--lang-color); }
:root.light-theme .decrypted-tag.ml-tag { border-color: var(--ml-color); }
:root.light-theme .decrypted-tag.web-tag { border-color: var(--web-color); }

:root.light-theme .decrypted-tag:hover {
    background: #ffffff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* ==========================================
   EPIC UX FEATURES
========================================== */

/* 1. Enter Button & Preloader Boot Text */
.boot-text {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    font-size: 1.2rem;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.enter-btn {
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 12px 30px;
    font-size: 1rem;
    font-family: var(--font-mono);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.enter-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-color);
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.4);
}

/* 2. Glass Menu & Hamburger */
.menu-toggle {
    position: fixed;
    top: 40px;
    right: 50px;
    width: 30px;
    height: 24px;
    z-index: 9001;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

.glass-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    z-index: 9000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s;
    opacity: 1;
    visibility: visible;
}

.glass-menu.hide {
    opacity: 0;
    visibility: hidden;
}

.menu-links {
    list-style: none;
    text-align: center;
}

.menu-links li { margin: 30px 0; overflow: hidden; }

.menu-link {
    font-size: 4rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-primary);
    text-decoration: none;
    display: inline-block;
    transition: color 0.3s ease;
    /* initial state for animation */
    transform: translateY(100%);
    opacity: 0;
}

.glass-menu.active .menu-link {
    animation: menuFadeUp 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.glass-menu.active li:nth-child(1) .menu-link { animation-delay: 0.1s; }
.glass-menu.active li:nth-child(2) .menu-link { animation-delay: 0.2s; }
.glass-menu.active li:nth-child(3) .menu-link { animation-delay: 0.3s; }
.glass-menu.active li:nth-child(4) .menu-link { animation-delay: 0.4s; }
.glass-menu.active li:nth-child(5) .menu-link { animation-delay: 0.5s; }
.glass-menu.active li:nth-child(6) .menu-link { animation-delay: 0.6s; }

.menu-link:hover { color: var(--accent-primary); }

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

/* 3. Audio Toggle */
.audio-toggle {
    position: fixed;
    bottom: 40px;
    left: 40px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 8000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.audio-toggle:hover {
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.3);
}

/* 4. Horizontal Scroll Experience */
.experience-wrapper {
    height: 300vh; /* 3 screens of scrolling */
    position: relative;
}

.experience-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.experience-track {
    display: flex;
    gap: 50px;
    padding: 0 10vw; /* initial offset */
    will-change: transform;
    /* JS controls transform: translateX */
}

.exp-card {
    min-width: 500px;
    height: auto;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.exp-card:hover {
    transform: translateY(-10px);
}

.exp-card h3 { font-size: 2rem; margin-bottom: 10px; }
.exp-card .accent { color: var(--accent-primary); font-family: var(--font-mono); margin-bottom: 20px; }
.exp-card .role-desc { font-size: 1.1rem; line-height: 1.6; }

.card-hint {
    margin-top: 20px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.role-card:hover .card-hint {
    opacity: 1;
    transform: translateY(0);
}

/* Horizontal Progress Bar */
.roles-progress-container {
    position: absolute;
    bottom: 40px;
    left: 10vw;
    width: 80vw;
    height: 4px;
    background: var(--glass-border);
    border-radius: 4px;
    overflow: hidden;
}

.roles-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 4px;
    box-shadow: 0 0 10px var(--accent-primary);
}

/* 5. Split-Text Animation */
.split-text span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.split-text.in-view span {
    opacity: 1;
    transform: translateY(0);
}

/* 6. Easter Egg Console */
.easter-egg {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: rgba(0,0,0,0.95);
    border-bottom: 2px solid #00ff00;
    z-index: 10000;
    font-family: 'JetBrains Mono', monospace;
    color: #00ff00;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform: translateY(-100%);
}

.easter-egg:not(.hide) { transform: translateY(0); }

.ee-header {
    background: #003300;
    padding: 5px 15px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.ee-body { padding: 15px; display: flex; }
.ee-body input {
    background: transparent;
    border: none;
    color: #00ff00;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    width: 100%;
    outline: none;
    margin-left: 10px;
}

/* The Matrix Mode! */
/* The Matrix Mode! */
body.matrix-mode { background-color: #001100 !important; }
body.matrix-mode * {
    color: #00ff00 !important;
    border-color: #00ff00 !important;
    text-shadow: 0 0 5px #00ff00;
    box-shadow: none !important;
}
body.matrix-mode .glass-card, body.matrix-mode .navbar, body.matrix-mode .glass-menu, body.matrix-mode .tech-modal {
    background-color: rgba(0, 17, 0, 0.8) !important;
}

/* ==========================================
   EASTER EGG EXPANSION
========================================== */

/* Blood Mode (Red) */
body.blood-mode { background-color: #1a0000 !important; }
body.blood-mode * {
    color: #ff3333 !important;
    border-color: #ff3333 !important;
    text-shadow: 0 0 5px #ff0000;
    box-shadow: none !important;
}
body.blood-mode .glass-card, body.blood-mode .navbar, body.blood-mode .glass-menu, body.blood-mode .tech-modal {
    background-color: rgba(26, 0, 0, 0.8) !important;
}

/* Poison Mode (Blue) */
body.poison-mode { background-color: #000a1a !important; }
body.poison-mode * {
    color: #00ccff !important;
    border-color: #00ccff !important;
    text-shadow: 0 0 5px #0088ff;
    box-shadow: none !important;
}
body.poison-mode .glass-card, body.poison-mode .navbar, body.poison-mode .glass-menu, body.poison-mode .tech-modal {
    background-color: rgba(0, 10, 26, 0.8) !important;
}

/* Floating Hearts */
.hearts-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.heart {
    position: absolute;
    bottom: -50px;
    color: #ff3366;
    font-size: 24px;
    animation: floatUp linear forwards;
    text-shadow: 0 0 10px rgba(255, 51, 102, 0.5);
}

@keyframes floatUp {
    0% { transform: translateY(0) scale(1) rotate(0deg); opacity: 1; }
    50% { opacity: 1; }
    100% { transform: translateY(-120vh) scale(1.5) rotate(45deg); opacity: 0; }
}

/* Tech Modal */
.tech-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.tech-modal.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.tech-modal-content {
    width: 80%;
    max-width: 600px;
    height: 400px;
    position: relative;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--accent-primary);
    box-shadow: 0 0 30px rgba(0, 255, 204, 0.2);
    overflow: hidden;
}

.tech-close-btn {
    position: absolute;
    top: 15px; right: 20px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 2;
}

.tech-close-btn:hover {
    color: var(--accent-primary);
}

.tech-title {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    z-index: 2;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
}
/* ==========================================
   ELITE FRONTEND FEATURES
========================================== */

/* 1. Liquid Gradient Typography */
.name-bold {
    /* Extending the original static gradient */
    background: linear-gradient(135deg, var(--text-primary), var(--accent-primary), var(--text-primary), var(--accent-primary));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientFlow 8s ease infinite;
    display: inline-block;
    cursor: default;
}

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

/* 2. Scroll-Driven Circuit SVG */
#scroll-circuit {
    position: fixed;
    top: 0;
    left: 20px;
    width: 40px;
    height: 100vh;
    z-index: 100;
    pointer-events: none;
    opacity: 0.5;
}

#circuit-path {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 4;
    stroke-linecap: square;
    stroke-linejoin: miter;
    filter: drop-shadow(0 0 8px var(--accent-primary));
}

/* 3. Parallax Footer Curtain Reveal */
.content-wrapper {
    position: relative;
    z-index: 10;
    /* Removed opaque background so background orbs are visible */
    background-color: transparent;
}

/* Redefine parallax-footer for curtain effect */
.parallax-footer {
    position: relative; 
    width: 100%;
    z-index: 1;
    padding: 100px 5% 50px;
    background: transparent;
    border-top: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
#neural-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    border-radius: 12px;
}
/* ==========================================
   MARQUEE AND 3D TILT PHYSICS
========================================== */

/* 1. Infinite Stroke Marquee */
.marquee-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    padding: 2rem 0;
    margin: 5rem 0;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    background: transparent;
    position: relative;
    z-index: 5;
    display: flex;
}

.marquee-content {
    display: flex;
    animation: scrollMarquee 20s linear infinite;
}

.marquee-content span {
    font-family: var(--font-heading);
    font-size: clamp(4rem, 10vw, 15rem);
    font-weight: 900;
    text-transform: uppercase;
    color: transparent; /* transparent fill */
    -webkit-text-stroke: 2px var(--text-primary); /* theme compatible stroke */
    opacity: 0.2;
    transition: opacity 0.3s ease, -webkit-text-stroke 0.3s ease;
}

.marquee-container:hover .marquee-content span {
    opacity: 0.8;
    -webkit-text-stroke: 2px var(--accent-primary);
}

@keyframes scrollMarquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); } /* Translate half so the duplicate loop is seamless */
}

/* 2. 3D Tilt Cards */
.tilt-card {
    transform-style: preserve-3d;
    transform: perspective(1000px);
    transition: transform 0.1s; /* smooth tracking */
    /* position removed to prevent overriding position: sticky on project cards */
}

.tilt-card.leave {
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1); /* bounce back */
}

.tilt-glare {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border-radius: inherit;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.2) 0%, transparent 60%);
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.3s;
}

.hide {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

/* ==========================================
   ROLE MODAL
========================================== */
.role-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.role-modal.active {
    opacity: 1;
    pointer-events: all;
}

.role-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0; /* Image goes edge to edge */
    transform: translateY(50px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    opacity: 0;
}

.role-modal.active .role-modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.role-modal-image {
    width: 100%;
    height: 300px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--glass-border);
    overflow: hidden;
}

.role-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.role-modal-body {
    padding: 40px;
}

.role-modal-body h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-family: var(--font-heading);
}

.role-modal-body h4 {
    font-size: 1.2rem;
    color: var(--accent-primary);
    font-family: var(--font-mono);
    margin-bottom: 20px;
}

.role-modal-body p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.role-modal .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.role-modal .close-btn:hover {
    background: var(--accent-primary);
    color: #000;
    transform: rotate(90deg);
}

.tilt-card:hover .tilt-glare {
    opacity: 1;
}

/* 3. Neural Core Brain Section */
.neural-core-section {
    position: relative;
    width: 100%;
    height: 300vh; /* Massive scroll area */
    background: transparent;
    z-index: 10;
}

#brain-canvas-container {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none; /* Let clicks pass through if needed, though it's its own section */
}

/* Optional overlay text while scrubbing the brain */
#brain-canvas-container::after {
    content: 'SCROLL TO INITIATE NEURAL SYNC';
    position: absolute;
    bottom: 50px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-primary);
    letter-spacing: 0.2em;
    opacity: 0.5;
}
