:root {
    /* Color Palette */
    --bg-dark: #0a0a0c;
    --bg-surface: #131418;
    --bg-surface-hover: #1c1e24;
    
    --primary: #c778dd;
    --primary-hover: #d896eb;
    --secondary: #3b82f6;
    --accent: #10b981;
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    
    --glass-bg: rgba(19, 20, 24, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.12);
    
    /* Typography */
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
    letter-spacing: 0.015em;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-weight: 700;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(199, 120, 221, 0.3);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Scroll Progress */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-dark);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
#preloader.hide {
    opacity: 0;
    visibility: hidden;
}
.pulsing-logo {
    font-size: 4rem;
    color: var(--primary);
    animation: pulseLogo 1.5s infinite alternate;
}
@keyframes pulseLogo {
    0% { transform: scale(1); filter: drop-shadow(0 0 10px var(--primary)); }
    100% { transform: scale(1.2); filter: drop-shadow(0 0 30px var(--primary)); }
}

/* Background Effects */
.background-mesh {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -2;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(199, 120, 221, 0.04), transparent 30%),
        radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.04), transparent 30%);
    pointer-events: none;
}

.bg-gradient-spot {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -2;
    opacity: 0.4;
    pointer-events: none;
}
.spot-1 { top: -10%; left: -10%; width: 40vw; height: 40vw; background: rgba(199, 120, 221, 0.15); animation: float 15s ease-in-out infinite alternate; }
.spot-2 { bottom: -10%; right: -10%; width: 50vw; height: 50vw; background: rgba(59, 130, 246, 0.1); animation: float 20s ease-in-out infinite alternate-reverse; }
.spot-3 { top: 40%; left: 60%; width: 30vw; height: 30vw; background: rgba(16, 185, 129, 0.08); animation: float 18s ease-in-out infinite alternate; }

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

#cursor-glow {
    position: fixed;
    top: -200px; left: -200px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(199, 120, 221, 0.12) 0%, rgba(59, 130, 246, 0.05) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
    will-change: transform;
}

/* Base Styles */
a { color: var(--text-main); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--primary); }

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

/* Typography elements */
.hash { color: var(--primary); font-family: var(--font-mono); margin-right: 4px; }
.gradient-text {
    background: linear-gradient(135deg, #c778dd, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Premium Glassmorphism */
.glass-panel {
    background: rgba(19, 20, 24, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all var(--transition-smooth);
}
.glass-panel:hover {
    background: rgba(19, 20, 24, 0.65);
    border-color: rgba(199, 120, 221, 0.2);
    box-shadow: 0 15px 50px -10px rgba(199, 120, 221, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 100;
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}
.logo-icon {
    display: flex; align-items: center; justify-content: center;
    color: var(--primary);
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    font-family: var(--font-mono);
    position: relative;
}
.nav-links a::after {
    content: ''; position: absolute; left: 0; bottom: -4px; width: 0%; height: 2px;
    background: var(--primary); transition: width var(--transition-fast);
}
.nav-links a:hover { color: var(--text-main); }
.nav-links a:hover::after { width: 100%; }

.mobile-menu-btn {
    display: none;
    background: none; border: none; color: var(--text-main);
    font-size: 1.8rem; cursor: pointer;
}

/* Sections */
section {
    padding: 6rem 0;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3.5rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    white-space: nowrap;
}

.section-header .line {
    height: 1px;
    flex-grow: 1;
    background: linear-gradient(90deg, var(--glass-highlight), transparent);
}

/* Hero Section */
.hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    margin-top: 4rem;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 100px;
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

.pulse-dot {
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-title .highlight { color: var(--text-main); }

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.7;
    max-width: 500px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    box-shadow: 0 4px 15px rgba(199, 120, 221, 0.3);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), #60a5fa);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(199, 120, 221, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-highlight);
}
.btn-secondary:hover {
    background: var(--glass-bg);
    border-color: var(--primary);
}

.quote-box {
    padding: 1.5rem 2rem;
    position: relative;
    border-left: 4px solid var(--primary);
}
.quote-box i { position: absolute; top: 1rem; left: 1rem; color: rgba(199, 120, 221, 0.1); font-size: 4rem; z-index: -1; }
.quote-text { font-style: italic; font-size: 1.1rem; color: var(--text-main); }
.quote-author { margin-top: 0.5rem; color: var(--text-muted); font-size: 0.9rem; font-family: var(--font-mono); }

.hero-visual {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.decorative-card {
    padding: 2rem;
    width: 100%;
    max-width: 450px;
    background: rgba(19, 20, 24, 0.8);
    position: relative;
    z-index: 10;
}

.window-controls {
    display: flex; gap: 8px; margin-bottom: 1.5rem;
}
.window-controls span { width: 12px; height: 12px; border-radius: 50%; }
.close { background: #ff5f56; }
.minimize { background: #ffbd2e; }
.maximize { background: #27c93f; }

.code-snippet {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-main);
}
.code-snippet .keyword { color: #c678dd; }
.code-snippet .variable { color: #e5c07b; }
.code-snippet .string { color: #98c379; }
.code-snippet .operator { color: #56b6c2; }
.code-snippet .property { color: #d19a66; }
.code-snippet .function { color: #61afef; }

/* Tech Marquee */
.tech-marquee-wrapper {
    width: 100%;
    overflow: hidden;
    padding: 2rem 0;
    margin: 2rem 0;
    position: relative;
    /* Gradient masks to fade the edges seamlessly */
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}

.tech-marquee {
    display: flex;
    width: max-content;
    animation: marquee-scroll 30s linear infinite;
}

.tech-marquee:hover {
    animation-play-state: paused;
}

.tech-marquee-content {
    display: flex;
    gap: 3rem;
    padding-right: 3rem; /* Same as gap */
}

.marquee-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    cursor: default;
}

.marquee-item i {
    font-size: 1.5rem;
    color: var(--text-main);
    transition: color var(--transition-fast);
}

.marquee-item:hover {
    background: rgba(199, 120, 221, 0.08);
    border-color: var(--primary);
    color: var(--text-main);
    transform: translateY(-2px);
}

.marquee-item:hover i {
    color: var(--primary);
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.skill-category {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-icon-wrapper {
    width: 56px; height: 56px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
}
.skill-icon-wrapper.backend { background: rgba(59, 130, 246, 0.1); color: var(--secondary); }
.skill-icon-wrapper.frontend { background: rgba(199, 120, 221, 0.1); color: var(--primary); }

.skill-category h3 { font-size: 1.5rem; font-weight: 600; }

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-main);
    transition: all var(--transition-fast);
}
.tag i { color: var(--accent); }
.tag:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--glass-highlight);
    transform: translateY(-2px);
}

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

.project-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: all var(--transition-smooth);
}
.project-card:hover {
    border-color: rgba(199, 120, 221, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(199, 120, 221, 0.1);
}

.project-icon {
    font-size: 2.5rem;
    color: var(--primary);
    background: rgba(199, 120, 221, 0.1);
    width: 64px; height: 64px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}

.project-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.75rem; }
.project-desc { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; margin-bottom: 1.5rem; flex-grow: 1; }

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
.tech-stack li { color: var(--secondary); background: rgba(59, 130, 246, 0.1); padding: 0.25rem 0.75rem; border-radius: 100px; }

/* Contact Section */
.contact-container {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-heading {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.contact-subtext {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.email-card {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-highlight);
    border-radius: 16px;
    text-align: left;
    transition: all var(--transition-smooth);
    width: 100%;
    max-width: 500px;
}

.email-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    transform: translateY(-5px);
}

.email-icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--bg-dark);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
}

.email-details {
    display: flex; flex-direction: column; flex-grow: 1;
}
.email-label { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 0.25rem; }
.email-address { color: var(--text-main); font-size: 1.1rem; font-weight: 600; font-family: var(--font-mono); }

.email-arrow { color: var(--primary); font-size: 1.5rem; transition: transform 0.3s ease; }
.email-card:hover .email-arrow { transform: translate(4px, -4px); }

/* Footer */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.footer-tagline { color: var(--text-muted); margin-top: 0.5rem; }

.social-links { display: flex; gap: 1.5rem; }
.social-link {
    display: flex; align-items: center; gap: 0.5rem;
    color: var(--text-muted);
    font-size: 1rem;
}
.social-link i { font-size: 1.5rem; }
.social-link:hover { color: var(--primary); }

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Typing Cursor */
.cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--primary);
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
    margin-left: 5px;
}
@keyframes blink {
    50% { opacity: 0; }
}

/* GitHub Section */
.github-container {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.github-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.github-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.github-title i {
    font-size: 2rem;
    color: var(--text-main);
}
.github-title h3 {
    font-size: 1.5rem;
}

.github-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}
.github-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.github-graph-wrapper {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    border: 1px solid var(--glass-border);
}
.github-chart {
    min-width: 700px;
    width: 100%;
}

.recent-repos-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.github-repos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.repo-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: all var(--transition-fast);
}
.repo-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    background: rgba(199, 120, 221, 0.05);
}

.repo-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.repo-top i {
    font-size: 1.5rem;
    color: var(--text-main);
}
.repo-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}
.repo-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.repo-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
}
.repo-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.repo-skeleton {
    height: 140px;
    background: linear-gradient(90deg, rgba(255,255,255,0.02) 25%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.02) 75%);
    background-size: 400% 100%;
    animation: loading 1.5s infinite;
    border-radius: 12px;
}
@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Animations */
.fade-in-section {
    transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1), transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: opacity, transform;
}
.fade-in-section.visible { opacity: 1 !important; transform: none !important; }

/* Responsive Design */
@media (max-width: 968px) {
    .hero { flex-direction: column; text-align: center; padding-top: 4rem; }
    .hero-actions { justify-content: center; }
    .quote-box { text-align: left; }
    .hero-title { font-size: 3.2rem; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    .skills-grid { grid-template-columns: 1fr; }
    .footer-container { flex-direction: column; gap: 2rem; text-align: center; }
    .hero-title { font-size: 2.5rem; }
    .contact-container { padding: 2rem 1.5rem; }
    .email-card { flex-direction: column; text-align: center; gap: 1rem; padding: 2rem 1.5rem; }
    .email-arrow { display: none; }
}
