:root {
    --primary: #5865F2;
    --dark: #23272A;
    --light: #FFFFFF;
    --gray: #99AAB5;
    --dark-gray: #2C2F33;
}
 
:root {
    --primary: #5865F2;
    --dark: #23272A;
    --light: #FFFFFF;
    --gray: #99AAB5;
    --dark-gray: #2C2F33;
    --accent: #00bbf9;
    --accent-2: #f15bb5;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

:root[data-theme="neon"] {
    --primary: #00E5FF;
    --accent: #7CFFCB;
    --accent-2: #FF00E5;
    --dark: #0B0E1A;
    --dark-gray: rgba(20, 24, 46, 0.7);
}

/* Status-based color themes */
:root[data-status="online"] {
    --primary: #57F287;
    --accent: #3BA55D;
    --accent-2: #2D7D32;
    --status-color: #57F287;
    --spotlight-color: rgba(87, 242, 135, 0.25);
}

:root[data-status="idle"] {
    --primary: #FEE75C;
    --accent: #F9C23C;
    --accent-2: #F57C00;
    --status-color: #FEE75C;
    --spotlight-color: rgba(254, 231, 92, 0.25);
}

:root[data-status="dnd"] {
    --primary: #ED4245;
    --accent: #C62828;
    --accent-2: #B71C1C;
    --status-color: #ED4245;
    --spotlight-color: rgba(237, 66, 69, 0.25);
}

:root[data-status="offline"] {
    --primary: #747F8D;
    --accent: #5C6B7A;
    --accent-2: #4A5568;
    --status-color: #747F8D;
    --spotlight-color: rgba(116, 127, 141, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

/* Cursor Spotlight */
.spotlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(
        circle at var(--spotlight-x) var(--spotlight-y),
        var(--spotlight-color, rgba(88, 101, 242, 0.25)) 0%,
        rgba(10, 10, 26, 0) 25%,
        rgba(10, 10, 26, 0.7) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

body:hover .spotlight {
    opacity: 1;
}

body {
    background-color: #0a0a1a;
    color: var(--light);
    line-height: 1.6;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
.bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(88, 101, 242, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(88, 101, 242, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 120s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: translateY(0) translateX(0);
    }
    100% {
        transform: translateY(25px) translateX(25px);
    }
}

.bg-blur {
    position: absolute;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(80px);
    -webkit-backdrop-filter: blur(80px);
    z-index: 1;
}

.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    animation: float 25s ease-in-out infinite;
}

.bg-blob-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #5865F2 0%, #9b5de5 100%);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.bg-blob-2 {
    width: 700px;
    height: 700px;
    background: linear-gradient(45deg, #00bbf9 0%, #00f5d4 100%);
    bottom: 10%;
    right: 10%;
    animation-delay: 5s;
    animation-direction: reverse;
}

.bg-blob-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(225deg, #f15bb5 0%, #fee440 100%);
    top: 60%;
    left: 30%;
    animation-delay: 10s;
}

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

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

/* Animated particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    animation: float 15s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
    }
}

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

/* Header */
header {
    background: rgba(44, 47, 51, 0.8);
    padding: 2rem 0;
    text-align: center;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, var(--primary) 0%, rgba(88, 101, 242, 0) 100%);
    opacity: 0.1;
    z-index: -1;
}

.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid var(--status-color, var(--primary));
    object-fit: cover;
    box-shadow: 0 0 20px var(--status-color, var(--primary));
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.tag {
    background-color: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
    margin-top: 0.5rem;
}

/* Navigation */
nav {
    background: rgba(44, 47, 51, 0.8);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    border-radius: 20px;
}

.nav-links a::before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

.nav-links a:hover::before,
.nav-links a.active::before {
    width: 80%;
}

/* Sections */
section {
    padding: 6rem 0;
    position: relative;
    z-index: 2;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    opacity: 0;
    transform: translateY(50px) scale(0.98);
    background: rgba(10, 10, 26, 0.5);
    backdrop-filter: blur(10px);
    margin: 2rem 0;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);
}

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

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    color: var(--primary);
}

/* About Section - blue glass effect */
#about {
    background: linear-gradient(
        180deg,
        rgba(88, 101, 242, 0.10) 0%,
        rgba(88, 101, 242, 0.06) 100%
    );
    border: 1px solid rgba(88, 101, 242, 0.20);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

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

.project-card {
    will-change: transform;
    transform-style: preserve-3d;
    background: rgba(44, 47, 51, 0.8);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.1s ease-out, box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.2);
}

/* Compact project card (text-only, reduced height) */
.project-card.compact {
    display: flex;
    align-items: center;
    height: 160px; /* slightly larger again */
    overflow: hidden;
}
.project-card.compact .project-info {
    padding: 1.2rem 1.35rem;
}
.project-card.compact .project-info h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
}
.project-card.compact .project-info p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--gray);
}
.project-card.compact .project-links { margin-top: 0.5rem; }

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-info {
    padding: 1.5rem;
    text-align: left;
}

/* Force 3-in-a-row on large screens for wider cards */
@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.project-links a {
    color: var(--light);
    text-decoration: none;
    transition: color 0.3s;
}

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

/* Contact Section */
#contact {
    background-color: var(--dark-gray);
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.social-links a {
    color: var(--light);
    font-size: 2rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.social-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary), rgba(88, 101, 242, 0.5));
    z-index: -1;
    transform: scale(0);
    transition: transform 0.3s ease;
    border-radius: 50%;
}

.social-links a:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(88, 101, 242, 0.3);
}

.social-links a:hover::before {
    transform: scale(1);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    background-color: var(--dark-gray);
    color: var(--gray);
    font-size: 0.9rem;
}

/* Hero, Buttons, and Marquee */
.hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    align-items: center;
    padding: 2rem 0;
}

.profile-inline {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.gradient-text {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.subtitle {
    margin-top: 0.5rem;
    color: var(--gray);
}

/* Align subtitle with left edge of buttons on desktop */
@media (min-width: 769px) {
    .subtitle { margin-left: -80px; }
}

.cta { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--light);
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(10px);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
    position: relative;
    overflow: hidden;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(88,101,242,.2); }

.btn-primary { background: linear-gradient(90deg, var(--primary), var(--accent)); border: none; }
.btn-ghost { background: rgba(255,255,255,0.06); }
.btn-icon { width: 44px; height: 44px; justify-content: center; padding: 0; }


.hero-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 1.25rem;
    display: grid;
    gap: 0.75rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.stat { color: var(--gray); font-size: 0.95rem; }
.stat span { color: var(--light); font-size: 1.1rem; font-weight: 700; margin-right: .35rem; }

.marquee { 
    overflow: hidden; 
    position: relative; 
    margin-top: 1.25rem; 
    white-space: nowrap; /* keep single line */
    /* fade edges */
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
            mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.marquee-track { 
    display: inline-flex; 
    white-space: nowrap; /* prevent wrapping of children */
    width: max-content; 
    animation: marquee var(--marquee-duration, 25s) linear infinite; 
    will-change: transform;
}
.marquee-content { display: inline-flex; gap: 1rem; white-space: nowrap; flex: 0 0 auto; padding-right: 1rem; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Pause on hover for accessibility */
.marquee:hover .marquee-track { 
    animation-play-state: paused; 
}

.chip {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .45rem .75rem; border-radius: 999px; font-size: .9rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Stack hero into a single column and put the info card under the profile */
    .hero {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .hero-left { order: 1; text-align: center; }
    .hero-right { order: 2; }
    .profile-inline { flex-direction: column; align-items: center; text-align: center; }
    .gradient-text { font-size: 2.2rem; }
    .avatar { width: 120px; height: 120px; }
    .cta { justify-content: center; flex-wrap: wrap; }
    .hero-card { width: 100%; max-width: 520px; margin: 0 auto; }

    /* Navigation */
    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    /* Grids */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
    }
}
