/* ============================================
   Mohit Jindal — Portfolio v3
   Colorful, animated, professional
   ============================================ */

:root {
    /* Gradient palette — vibrant but professional */
    --bg-dark: #0a0a0f;
    --bg-primary: #0d0d14;
    --bg-secondary: #13131f;
    --bg-card: #181828;
    --bg-card-hover: #1f1f35;

    --text-primary: #e4e4f0;
    --text-secondary: #9898b8;
    --text-muted: #6565820;
    --text-heading: #f0f0ff;

    /* Vibrant multi-color accents */
    --accent-1: #6366f1;      /* Indigo */
    --accent-2: #8b5cf6;      /* Purple */
    --accent-3: #06b6d4;      /* Cyan */
    --accent-4: #10b981;      /* Emerald */
    --accent-5: #f59e0b;      /* Amber */
    --accent-6: #ef4444;      /* Red */
    --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4);
    --gradient-warm: linear-gradient(135deg, #f59e0b, #ef4444, #ec4899);
    --gradient-cool: linear-gradient(135deg, #06b6d4, #10b981);
    --gradient-full: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899, #f59e0b);

    --border: #2a2a42;
    --border-light: #3a3a58;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Layout */
    --container: 1200px;
    --section-gap: 120px;
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* === Reset === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-1); color: #fff; }
a { color: var(--accent-3); text-decoration: none; transition: var(--transition); }
a:hover { opacity: 0.85; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5 { color: var(--text-heading); font-weight: 700; line-height: 1.2; }

/* === Animated Background === */
.bg-gradient-noise {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--bg-primary);
}

.bg-gradient-noise::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(6, 182, 212, 0.05) 0%, transparent 50%);
    animation: bg-drift 20s ease-in-out infinite;
}

@keyframes bg-drift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(2%, -1%) rotate(1deg); }
    66% { transform: translate(-1%, 2%) rotate(-1deg); }
}

/* === Animated Orbs === */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    pointer-events: none;
    z-index: -1;
}

.orb-1 {
    width: 400px; height: 400px;
    background: var(--accent-1);
    top: 10%; left: -5%;
    animation: orb-float 15s ease-in-out infinite;
}

.orb-2 {
    width: 300px; height: 300px;
    background: var(--accent-2);
    top: 60%; right: -8%;
    animation: orb-float 18s ease-in-out infinite reverse;
}

.orb-3 {
    width: 250px; height: 250px;
    background: var(--accent-3);
    bottom: 10%; left: 30%;
    animation: orb-float 22s ease-in-out infinite 3s;
}

@keyframes orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -20px) scale(1.05); }
    50% { transform: translate(-20px, 30px) scale(0.95); }
    75% { transform: translate(20px, 20px) scale(1.02); }
}

/* === Navigation === */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    background: rgba(13, 13, 20, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.7rem 0;
    background: rgba(13, 13, 20, 0.92);
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-heading);
    background: rgba(99, 102, 241, 0.1);
    opacity: 1;
}

.nav-links a.active {
    color: var(--accent-1);
    background: rgba(99, 102, 241, 0.15);
    box-shadow: 0 2px 0 var(--accent-1);
}

.nav-cta {
    padding: 0.5rem 1.2rem !important;
    background: var(--gradient-primary) !important;
    color: #fff !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* === Hero === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 2rem 4rem;
    position: relative;
}

.hero-inner {
    max-width: var(--container);
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-1);
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-badge::before {
    content: '';
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent-4);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.hero h1 {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.hero h1 .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.6s ease 0.5s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.6s both;
}

/* Hero Image */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-image-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--border);
    position: relative;
    z-index: 2;
    transition: var(--transition);
}

.hero-image-wrapper:hover img {
    border-color: var(--accent-1);
    transform: scale(1.02);
}

.hero-image-ring {
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: var(--gradient-primary) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: spin-slow 12s linear infinite;
}

.hero-image-ring-2 {
    position: absolute;
    inset: -24px;
    border-radius: 50%;
    border: 1px dashed rgba(99, 102, 241, 0.3);
    animation: spin-slow 20s linear infinite reverse;
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 2rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: var(--transition-spring);
}

.btn-gradient {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-gradient:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
    color: #fff;
    opacity: 1;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-1);
    transform: translateY(-3px);
    color: var(--text-primary);
    opacity: 1;
}

/* === Sections === */
.section {
    padding: var(--section-gap) 2rem;
    max-width: var(--container);
    margin: 0 auto;
    position: relative;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 3rem;
}

/* === About === */
.about-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    margin-bottom: 1.2rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

.about-text strong {
    color: var(--text-heading);
}

.about-highlight {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.highlight-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition-spring);
}

.highlight-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-1);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.15);
}

.highlight-card .h-value {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: var(--font-mono);
}

.highlight-card .h-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.3rem;
}

/* === Experience === */
.exp-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.exp-card {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 2rem;
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    transition: var(--transition);
}

.exp-card:hover {
    background: var(--bg-card);
    border-color: var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.exp-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    padding-top: 0.4rem;
}

.exp-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.exp-company {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.exp-company a {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.exp-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.exp-desc ul {
    padding-left: 1.2rem;
    list-style: disc;
}

.exp-desc li { margin-bottom: 0.4rem; }
.exp-desc li::marker { color: var(--accent-1); }

/* === Tags === */
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: var(--transition);
}
.tag:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
}
.tag-green { background: rgba(16, 185, 129, 0.1); color: var(--accent-4); border-color: rgba(16, 185, 129, 0.2); }
.tag-cyan { background: rgba(6, 182, 212, 0.1); color: var(--accent-3); border-color: rgba(6, 182, 212, 0.2); }
.tag-amber { background: rgba(245, 158, 11, 0.1); color: var(--accent-5); border-color: rgba(245, 158, 11, 0.2); }
.tag-purple { background: rgba(139, 92, 246, 0.1); color: var(--accent-2); border-color: rgba(139, 92, 246, 0.2); }

/* === Projects === */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-spring);
    display: flex;
    flex-direction: column;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-light);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 30px rgba(99, 102, 241, 0.08);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.project-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.project-link {
    color: var(--text-muted);
    font-size: 1.3rem;
    transition: var(--transition);
}

.project-link:hover { color: var(--accent-1); opacity: 1; transform: translateY(-2px); }

.project-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.project-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex-grow: 1;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

/* === Research === */
.research-list { display: flex; flex-direction: column; gap: 1.5rem; }

.research-card {
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.research-card::after {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}

.research-card:hover {
    border-color: var(--border-light);
    transform: translateX(4px);
}

.research-card:hover::after { opacity: 1; }

.research-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.research-venue {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background: var(--gradient-cool);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.6rem;
}
.research-card p { font-size: 0.9rem; color: var(--text-secondary); }

/* === Skills === */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition-spring);
}

.skill-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-light);
}

.skill-card h3 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.skill-card .skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-card .skill-tags span {
    font-size: 0.85rem;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.skill-card .skill-tags span:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    background: rgba(99, 102, 241, 0.08);
    transform: translateY(-2px);
}

/* === Contact === */
.contact-section {
    text-align: center;
    padding: var(--section-gap) 2rem;
    max-width: 700px;
    margin: 0 auto;
}

.contact-section h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-section > p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.contact-grid {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.6rem;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-spring);
}

.contact-btn:hover {
    border-color: var(--accent-1);
    color: var(--text-heading);
    background: rgba(99, 102, 241, 0.08);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
    opacity: 1;
}

.contact-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* === Footer === */
.footer {
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer a { color: var(--text-secondary); }
.footer a:hover { color: var(--accent-1); }

/* === Scroll Reveal === */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }

.stagger > * {
    opacity: 0; transform: translateY(25px);
    transition: all 0.6s cubic-bezier(0.5, 0, 0, 1);
}
.stagger.visible > *:nth-child(1) { transition-delay: 0.05s; opacity:1; transform:translateY(0); }
.stagger.visible > *:nth-child(2) { transition-delay: 0.1s; opacity:1; transform:translateY(0); }
.stagger.visible > *:nth-child(3) { transition-delay: 0.15s; opacity:1; transform:translateY(0); }
.stagger.visible > *:nth-child(4) { transition-delay: 0.2s; opacity:1; transform:translateY(0); }
.stagger.visible > *:nth-child(5) { transition-delay: 0.25s; opacity:1; transform:translateY(0); }
.stagger.visible > *:nth-child(6) { transition-delay: 0.3s; opacity:1; transform:translateY(0); }
.stagger.visible > *:nth-child(7) { transition-delay: 0.35s; opacity:1; transform:translateY(0); }
.stagger.visible > *:nth-child(8) { transition-delay: 0.4s; opacity:1; transform:translateY(0); }

/* === Animations === */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(25px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Particle dots */
.particles {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

/* === Responsive === */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-text { order: 2; }
    .hero-image { order: 1; }
    .hero-image-wrapper { width: 240px; height: 240px; }
    .hero-desc { margin-left: auto; margin-right: auto; }
    .hero-buttons { justify-content: center; }
    .about-content { grid-template-columns: 1fr; }
    .exp-card { grid-template-columns: 1fr; gap: 0.5rem; }
    .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    :root { --section-gap: 80px; }
    .nav-links { display: none; }
    .nav-links.active {
        display: flex;
        position: fixed;
        top: 0; right: 0;
        width: 75%; max-width: 300px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        border-left: 1px solid var(--border);
        box-shadow: -10px 0 40px rgba(0,0,0,0.5);
    }
    .nav-toggle { display: block; }
}

@media (max-width: 480px) {
    html { font-size: 14px; }
    .hero-image-wrapper { width: 200px; height: 200px; }
}

/* === Typing Cursor === */
.typing-cursor::after {
    content: '|';
    color: var(--accent-1);
    font-weight: 300;
    animation: blink-cursor 0.8s step-end infinite;
}

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

/* === Light Theme === */
[data-theme="light"] {
    --bg-dark: #ffffff;
    --bg-primary: #f8f9fc;
    --bg-secondary: #f0f2f7;
    --bg-card: #ffffff;
    --bg-card-hover: #f5f6fa;

    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #7a7a9a;
    --text-heading: #0d0d1a;

    --accent-1: #4f46e5;
    --accent-2: #7c3aed;
    --accent-3: #0891b2;
    --accent-4: #059669;
    --accent-5: #d97706;

    --border: #e2e4ec;
    --border-light: #d0d3de;
}

[data-theme="light"] .bg-gradient-noise::before {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(79, 70, 229, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(124, 58, 237, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(8, 145, 178, 0.03) 0%, transparent 50%);
}

[data-theme="light"] .orb { opacity: 0.15; }

[data-theme="light"] .navbar {
    background: rgba(248, 249, 252, 0.85);
    border-bottom-color: var(--border);
}

[data-theme="light"] .navbar.scrolled {
    background: rgba(248, 249, 252, 0.95);
}

[data-theme="light"] .project-card,
[data-theme="light"] .skill-card,
[data-theme="light"] .research-card,
[data-theme="light"] .highlight-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .project-card:hover,
[data-theme="light"] .skill-card:hover {
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.1);
}

[data-theme="light"] .btn-glass {
    background: rgba(0, 0, 0, 0.04);
    border-color: var(--border);
    color: var(--text-primary);
}

[data-theme="light"] .hero-image-wrapper img {
    border-color: var(--border);
}

[data-theme="light"] .tag {
    background: rgba(79, 70, 229, 0.08);
    border-color: rgba(79, 70, 229, 0.15);
}

[data-theme="light"] .contact-btn {
    background: #fff;
    border-color: var(--border);
}

/* === Theme Toggle Button === */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
}

.theme-toggle:hover {
    color: var(--accent-1);
    border-color: var(--accent-1);
    background: rgba(99, 102, 241, 0.08);
}

/* Show sun in dark mode, moon in light mode */
.icon-sun { display: block; }
.icon-moon { display: none; }

[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* === Mouse Spotlight === */
.mouse-spotlight {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

.mouse-spotlight.visible {
    opacity: 1;
}

[data-theme="light"] .mouse-spotlight {
    background: radial-gradient(circle, rgba(79, 70, 229, 0.04) 0%, transparent 70%);
}

/* === Command Palette === */
.cmd-palette-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20vh;
}

.cmd-palette-overlay.open {
    display: flex;
}

.cmd-palette {
    width: 90%;
    max-width: 520px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: cmd-enter 0.2s ease;
}

@keyframes cmd-enter {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.cmd-palette-input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-sans);
    outline: none;
}

.cmd-palette-input::placeholder {
    color: var(--text-muted);
}

.cmd-palette-results {
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
}

.cmd-palette-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.cmd-palette-item:hover,
.cmd-palette-item.selected {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-heading);
}

.cmd-palette-item .cmd-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.cmd-palette-item .cmd-shortcut {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.cmd-palette-footer {
    padding: 0.6rem 1.2rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* === Scroll Progress Bar === */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: var(--gradient-primary);
    z-index: 10000;
    transition: width 0.1s linear;
}

/* === Back to Top Button === */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-1);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

/* === Filter Tabs === */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.filter-tab {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s ease;
}

.filter-tab:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
}

.filter-tab.active {
    background: var(--accent-1);
    border-color: var(--accent-1);
    color: #fff;
}

/* Filtered card animation */
.project-card.hidden {
    display: none;
}

.project-card.fade-in {
    animation: filterFadeIn 0.3s ease forwards;
}

@keyframes filterFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
