:root {
    --bg-dark: #050510;
    --bg-darker: #020205;
    --bg-gradient: #1e1b4b;
    --neon-purple: #9d4edd;
    --neon-indigo: #4361ee;
    --neon-cyan: #4cc9f0;
    --text-main: #f8f9fa;
    --text-dim: #adb5bd;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glow-spread: 15px;
    --transition-slow: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    --transition-fast: 0.2s ease-out;
}

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

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    cursor: none; /* Custom cursor */
}

/* Typography */
.font-mono { font-family: 'JetBrains Mono', monospace; }
.font-ui { font-family: 'Poppins', sans-serif; }

/* Custom Cursor */
#cursor-glow {
    position: fixed;
    top: 0; left: 0;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(76, 201, 240, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 999;
    transition: opacity 0.3s ease;
    mix-blend-mode: screen;
}

/* Background Effects */
.fixed-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle at center, var(--bg-gradient) 0%, var(--bg-dark) 100%);
    z-index: -2;
}

.bg-orbs {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    overflow: hidden;
    z-index: -1;
    filter: blur(100px);
    opacity: 0.5;
}

.orb {
    position: absolute;
    border-radius: 50%;
    animation: float 20s infinite alternate ease-in-out;
}
.orb-1 { width: 40px; height: 40px; background: var(--neon-purple); top: -10%; left: -10%; animation-delay: 0s; transform: scale(10); }
.orb-2 { width: 30px; height: 30px; background: var(--neon-indigo); bottom: 10%; right: -5%; animation-delay: -5s; transform: scale(10); }
.orb-3 { width: 35px; height: 35px; background: var(--neon-cyan); top: 40%; left: 40%; animation-delay: -10s; transform: scale(10); }

@keyframes float {
    0% { transform: translate(0, 0) scale(10); }
    100% { transform: translate(100px, 50px) scale(11); }
}

/* Boot Screen */
#boot-screen {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    transition: opacity 1s ease-out, visibility 1s;
}
#boot-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.scanlines {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.1));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 2;
}
.boot-content {
    color: #4cc9f0; /* Terminal cyan for a cooler look */
    font-size: 0.9rem;
    z-index: 3;
    max-height: 80vh;
    overflow-y: hidden;
    line-height: 1.5;
    text-shadow: 0 0 5px rgba(76, 201, 240, 0.5);
}
.boot-line {
    margin-bottom: 0.2rem;
    opacity: 0;
    animation: typeLine 0.1s forwards;
}
@keyframes typeLine { to { opacity: 1; } }

#system-ready {
    color: var(--neon-cyan);
    margin-top: 2rem;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 0 0 10px var(--neon-cyan);
}
.hidden { display: none !important; }

/* Navigation */
#navbar {
    position: fixed;
    top: 1rem; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 1000px;
    padding: 1rem 2rem;
    border-radius: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: transform var(--transition-slow), opacity var(--transition-slow);
}
#navbar.hidden-nav {
    transform: translate(-50%, -150%);
    opacity: 0;
}
.nav-brand {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-main);
}
.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}
.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
    cursor: none;
}
.nav-links a:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(76, 201, 240, 0.5);
}

/* Reusables */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}
.section {
    min-height: 100vh;
    padding: 6rem 10%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 15px rgba(76, 201, 240, 0.3);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
    display: inline-block;
}

/* Hero Section */
#hero {
    padding-top: 10rem;
    justify-content: center;
}
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-size: 0.8rem;
    color: var(--neon-cyan);
    border: 1px solid rgba(76, 201, 240, 0.3);
    margin-bottom: 2rem;
    background: rgba(76, 201, 240, 0.05);
}
.status-dot {
    width: 8px; height: 8px;
    background-color: var(--neon-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-cyan);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(76, 201, 240, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(76, 201, 240, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(76, 201, 240, 0); }
}
.title-glow {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, var(--text-dim));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(255,255,255,0.1);
}
.subtitle {
    font-size: 1.5rem;
    color: var(--neon-purple);
    margin-bottom: 1.5rem;
    min-height: 2.2rem; /* reserve space for typing */
}
.tagline {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}
.highlight {
    color: var(--neon-cyan);
    font-weight: 600;
}
.desc {
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 3rem;
}
.hero-ctas {
    display: flex;
    gap: 1.5rem;
}
.btn {
    padding: 0.8rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
    cursor: none; /* Let custom cursor handle it */
}
.primary-btn {
    color: #fff;
    border: 1px solid var(--neon-cyan);
    box-shadow: inset 0 0 10px rgba(76, 201, 240, 0.1), 0 0 15px rgba(76, 201, 240, 0.2);
}
.primary-btn:hover {
    background: rgba(76, 201, 240, 0.1);
    box-shadow: inset 0 0 20px rgba(76, 201, 240, 0.2), 0 0 30px rgba(76, 201, 240, 0.4);
    transform: translateY(-2px);
}
.secondary-btn {
    color: var(--text-dim);
    border: 1px solid transparent;
}
.secondary-btn:hover {
    color: #fff;
    border-color: var(--glass-border);
    background: var(--glass-bg);
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.skill-category {
    padding: 2rem;
    transition: transform var(--transition-slow), border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.skill-category:hover {
    border-color: rgba(157, 78, 221, 0.5); /* purple hover */
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(157, 78, 221, 0.2);
}
.category-title {
    color: var(--neon-purple);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
}
.module {
    margin-bottom: 1.5rem;
}
.module-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
.stability {
    color: var(--neon-cyan);
}
.progress-bar {
    height: 4px;
    background: var(--glass-border);
    border-radius: 2px;
    overflow: hidden;
}
.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-cyan));
    border-radius: 2px;
    width: 0; /* Animated in JS */
    transition: width 1.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}
.project-card {
    position: relative;
    padding: 2rem;
    transform-style: preserve-3d;
    transition: transform 0.1s ease, border-color var(--transition-fast), box-shadow var(--transition-fast);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.project-card:hover {
    border-color: rgba(76, 201, 240, 0.3);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(76, 201, 240, 0.1);
}
.card-content {
    transform: translateZ(30px); /* 3D effect internally */
    display: flex;
    flex-direction: column;
    height: 100%;
    pointer-events: none; /* Make hover easier */
}
.project-header h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #fff;
}
.badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.badges span {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background: rgba(157, 78, 221, 0.1);
    color: var(--neon-purple);
    border: 1px solid rgba(157, 78, 221, 0.3);
}
.desc-text {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}
.tech-stack {
    display: flex;
    gap: 0.8rem;
    font-size: 0.8rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.tech-stack span::before {
    content: "▹";
    color: var(--neon-cyan);
    margin-right: 4px;
}
.project-links {
    display: flex;
    gap: 1rem;
    margin-top: auto;
    pointer-events: auto; /* Re-enable pointer events for links */
}
.link-btn {
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color var(--transition-fast);
    cursor: none;
}
.link-btn:hover {
    color: var(--neon-cyan);
}
.link-btn.disabled {
    color: rgba(255,255,255,0.2);
    pointer-events: none;
}

/* Experience Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.timeline::before {
    content: '';
    position: absolute;
    top: 0; left: 24px;
    height: 100%;
    width: 2px;
    background: var(--glass-border);
}
.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding: 2rem;
    margin-left: 60px;
    width: calc(100% - 60px);
    transition: transform var(--transition-slow), border-color var(--transition-fast);
}
.timeline-item:hover {
    transform: translateX(10px);
    border-color: rgba(67, 97, 238, 0.5); /* indigo border */
}
.timeline-dot {
    position: absolute;
    top: 2rem; left: -42px;
    width: 14px; height: 14px;
    background: var(--bg-dark);
    border: 2px solid var(--neon-indigo);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-indigo);
    z-index: 2;
}
.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}
.exp-date {
    font-size: 0.8rem;
    color: var(--neon-cyan);
    background: rgba(76, 201, 240, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    border: 1px solid rgba(76, 201, 240, 0.3);
}
.timeline-content h4 {
    margin-bottom: 1rem;
    font-weight: 400;
}
.timeline-content p {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Contact Terminal */
.terminal-contact {
    max-width: 700px;
    margin: 0 auto;
    overflow: hidden;
    transition: transform var(--transition-slow), box-shadow var(--transition-fast);
}
.terminal-contact:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(76, 201, 240, 0.1);
    transform: translateY(-5px);
}
.terminal-header {
    background: rgba(0,0,0,0.3);
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}
.window-controls {
    display: flex;
    gap: 8px;
    margin-right: 1.5rem;
}
.control {
    width: 12px; height: 12px;
    border-radius: 50%;
}
.close { background: #ff5f56; }
.minimize { background: #ffbd2e; }
.maximize { background: #27c93f; }

.terminal-title {
    font-size: 0.85rem;
    color: var(--text-dim);
}
.terminal-body {
    padding: 2rem;
    background: rgba(0,0,0,0.2);
    min-height: 300px;
    font-size: 0.95rem;
    line-height: 1.6;
}
.prompt {
    color: #27c93f;
    margin-right: 10px;
}
.output {
    color: var(--neon-cyan);
    margin-bottom: 1.5rem;
}
.contact-commands {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1rem;
}
.cmd-line {
    text-decoration: none;
    color: var(--text-main);
    display: block;
    cursor: none;
    transition: opacity var(--transition-fast);
}
.cmd-line:hover .cmd-text {
    color: #fff;
    text-shadow: 0 0 8px rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.05);
}
.blinking-cursor {
    animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.8rem;
    color: var(--text-dim);
    border-top: 1px solid var(--glass-border);
}

/* Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .title-glow { font-size: 3rem; }
    .nav-links { display: none; } /* Simplified for mobile, could add hamburger later */
    .section { padding: 4rem 5%; }
    .timeline::before { left: 0; }
    .timeline-dot { left: -7px; }
    .timeline-item { margin-left: 20px; width: calc(100% - 20px); }
    #cursor-glow { display: none; } /* Disable custom cursor on mobile */
    body { cursor: auto; }
    .cmd-line, .btn, .link-btn, .nav-links a { cursor: pointer; }
    
    .bg-orbs { filter: blur(50px); }
    .orb-1 { width: 15px; height: 15px; left: 0; }
    .orb-2 { width: 10px; height: 10px; right: 0; }
    .orb-3 { width: 12px; height: 12px; }
}
