:root {
    --primary-color: #00d9ff;
    --secondary-color: #7b2ff7;
    --accent-color: #f72585;
    --pink-color: #ff006e;
    --yellow-color: #ffb700;
    --red-color: #ff4365;
    --bg-color: #0d0221;
    --surface-color: #190840;
    --text-color: #f0e6ff;
    --text-secondary: #a394c2;
    --border-color: #2a1a5e;
}

[data-theme="light"] {
    --primary-color: #0088cc;
    --secondary-color: #cc00cc;
    --accent-color: #00aa00;
    --pink-color: #d1006c;
    --yellow-color: #ccaa00;
    --red-color: #cc0033;
    --bg-color: #ffffff;
    --surface-color: #f5f5f5;
    --text-color: #1a1a1a;
    --text-secondary: #666666;
    --border-color: #e0e0e0;
}

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

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.7;
    font-weight: 400;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Cyberpunk Background Effects */
.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 217, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(123, 47, 247, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    background-attachment: fixed;
    pointer-events: none;
    z-index: 1;
}

[data-theme="light"] .cyber-grid {
    background-image: 
        linear-gradient(rgba(0, 136, 204, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(209, 0, 108, 0.03) 1px, transparent 1px);
}

.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.02;
    z-index: 2;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj48ZmlsdGVyIGlkPSJhIj48ZmVUdXJidWxlbmNlIGJhc2VGcmVxdWVuY3k9Ii43NSIgbnVtT2N0YXZlcz0iMTAiLz48ZmVDb2xvck1hdHJpeCB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDEgMCIvPjwvZmlsdGVyPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbHRlcj0idXJsKCNhKSIgb3BhY2l0eT0iMSIvPjwvc3ZnPg==');
}

[data-theme="light"] .noise {
    opacity: 0.01;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(13, 2, 33, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.9);
}

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

.logo {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

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

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

.nav-link:hover {
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--primary-color), 0 0 10px rgba(255, 255, 0, 0.5);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--pink-color), var(--yellow-color));
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 2px solid var(--text-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.theme-toggle:hover {
    border-color: var(--primary-color);
    transform: rotate(180deg);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: var(--text-color);
    transition: fill 0.3s ease;
}

.theme-toggle:hover svg {
    fill: var(--primary-color);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    position: relative;
    z-index: 10;
    gap: 3rem;
}

.hero-content {
    flex: 1.2;
    max-width: 650px;
}

.glitch {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 900;
    text-transform: uppercase;
    position: relative;
    color: var(--text-color);
    letter-spacing: 0.05em;
    animation: glitch 2s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: var(--pink-color);
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: var(--yellow-color);
    z-index: -2;
}

@keyframes glitch {
    0%, 100% {
        text-shadow: 
            0.05em 0 0 var(--primary-color),
            -0.05em -0.025em 0 var(--pink-color),
            0.025em 0.05em 0 var(--yellow-color);
    }
    15% {
        text-shadow: 
            0.05em 0 0 var(--red-color),
            -0.05em -0.025em 0 var(--secondary-color),
            0.025em 0.05em 0 var(--accent-color);
    }
}

@keyframes glitch-1 {
    0%, 100% {
        clip: rect(42px, 9999px, 44px, 0);
        transform: skew(0.5deg);
    }
    5% {
        clip: rect(12px, 9999px, 59px, 0);
        transform: skew(0.5deg);
    }
}

@keyframes glitch-2 {
    0%, 100% {
        clip: rect(65px, 9999px, 119px, 0);
        transform: skew(0.5deg);
    }
    5% {
        clip: rect(80px, 9999px, 90px, 0);
        transform: skew(0.5deg);
    }
}

.subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 1rem 0;
    font-weight: 300;
}

.hero-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.75;
    letter-spacing: -0.014em;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2.25rem;
    text-decoration: none;
    border: 2px solid transparent;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--bg-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: transparent;
    color: var(--primary-color);
    box-shadow: 0 0 20px var(--primary-color), 0 0 40px rgba(255, 255, 0, 0.3);
    border-color: var(--yellow-color);
}

.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border-color: var(--text-color);
}

.btn-secondary:hover {
    border-color: var(--pink-color);
    color: var(--pink-color);
    box-shadow: 0 0 20px var(--pink-color), 0 0 40px rgba(255, 0, 64, 0.3);
}

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

.avatar-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-container {
    position: relative;
    width: 120px;
    height: 120px;
    z-index: 10;
}

.github-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.5), 0 0 40px rgba(123, 47, 247, 0.3);
    animation: float 6s ease-in-out infinite;
    transition: all 0.3s ease;
}

.github-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.7), 0 0 50px rgba(247, 37, 133, 0.5);
}

.avatar-glow {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(circle, rgba(0, 217, 255, 0.3) 0%, rgba(123, 47, 247, 0.2) 40%, transparent 70%);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
    z-index: -1;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-tag {
    position: absolute;
    font-family: 'Space Grotesk', monospace;
    font-size: 0.75rem;
    color: var(--primary-color);
    opacity: 0.7;
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: rgba(123, 47, 247, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    animation: floatTag var(--duration, 8s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

.floating-tag:nth-child(1) {
    top: 10%;
    left: -50px;
}

.floating-tag:nth-child(2) {
    top: 30%;
    right: -40px;
}

.floating-tag:nth-child(3) {
    bottom: 30%;
    left: -60px;
}

.floating-tag:nth-child(4) {
    bottom: 10%;
    right: -50px;
}

@keyframes floatTag {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-10px) translateX(10px);
    }
    50% {
        transform: translateY(5px) translateX(-5px);
    }
    75% {
        transform: translateY(-5px) translateX(-10px);
    }
}

.tag-bracket {
    color: var(--pink-color);
    font-weight: 700;
}

/* Code Cards */
.code-cards {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.code-card {
    position: absolute;
    background: rgba(25, 8, 64, 0.8);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    backdrop-filter: blur(10px);
    opacity: 0.6;
    animation: floatCode var(--duration, 10s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

[data-theme="light"] .code-card {
    background: rgba(245, 245, 245, 0.9);
}

.code-card:nth-child(1) {
    top: 20%;
    left: -120px;
    transform: rotate(-5deg);
}

.code-card:nth-child(2) {
    bottom: 20%;
    right: -100px;
    transform: rotate(3deg);
}

@keyframes floatCode {
    0%, 100% {
        transform: translateY(0) rotate(var(--rotate, 0deg));
    }
    50% {
        transform: translateY(-15px) rotate(calc(var(--rotate, 0deg) + 2deg));
    }
}

/* Geometric Shapes */
.geometric-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.shape {
    position: absolute;
    opacity: 0.1;
    animation: shapeFloat var(--duration, 15s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

.shape-triangle {
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 35px solid var(--primary-color);
    top: 15%;
    right: 10%;
    transform: rotate(15deg);
}

.shape-square {
    width: 30px;
    height: 30px;
    border: 2px solid var(--pink-color);
    bottom: 25%;
    left: 8%;
    transform: rotate(45deg);
}

.shape-circle {
    width: 25px;
    height: 25px;
    border: 2px solid var(--yellow-color);
    border-radius: 50%;
    top: 60%;
    right: 15%;
}

.shape-hexagon {
    width: 40px;
    height: 22px;
    background: var(--accent-color);
    position: relative;
    bottom: 15%;
    right: 20%;
    opacity: 0.08;
}

.shape-hexagon:before,
.shape-hexagon:after {
    content: "";
    position: absolute;
    width: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
}

.shape-hexagon:before {
    bottom: 100%;
    border-bottom: 11px solid var(--accent-color);
}

.shape-hexagon:after {
    top: 100%;
    border-top: 11px solid var(--accent-color);
}

@keyframes shapeFloat {
    0%, 100% {
        transform: translateY(0) rotate(var(--rotate, 0deg));
    }
    33% {
        transform: translateY(-20px) rotate(calc(var(--rotate, 0deg) + 120deg));
    }
    66% {
        transform: translateY(10px) rotate(calc(var(--rotate, 0deg) + 240deg));
    }
}

/* Particles */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.6;
    animation: particleDrift var(--duration, 20s) linear infinite;
    animation-delay: var(--delay, 0s);
}

.particle:nth-child(odd) {
    background: var(--pink-color);
}

@keyframes particleDrift {
    0% {
        transform: translate(0, 100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translate(var(--drift-x, 100px), -100vh) scale(1);
        opacity: 0;
    }
}

/* Binary Rain Effect */
.binary-rain {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.05;
}

.binary-column {
    position: absolute;
    top: -100%;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--accent-color);
    animation: binaryFall var(--duration, 15s) linear infinite;
    animation-delay: var(--delay, 0s);
}

@keyframes binaryFall {
    to {
        transform: translateY(200vh);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.code-line {
    display: block;
    margin: 0.25rem 0;
    color: var(--text-secondary);
    white-space: nowrap;
}

.string {
    color: var(--accent-color);
}

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

section {
    padding: 5rem 0;
    position: relative;
    z-index: 10;
}

.section-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: var(--text-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--pink-color), var(--yellow-color), var(--primary-color));
}

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

.project-card {
    background: rgba(25, 8, 64, 0.6);
    border: 1px solid var(--border-color);
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .project-card {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(123, 47, 247, 0.1), rgba(247, 37, 133, 0.1), transparent);
    transition: left 0.5s ease;
}

.project-card:hover::before {
    left: 100%;
}

.project-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.3), 0 5px 15px rgba(123, 47, 247, 0.2);
}

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

.project-header h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
}

.project-tech {
    background: rgba(123, 47, 247, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    border: 1px solid var(--primary-color);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.65;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: -0.011em;
}

.project-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

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

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.project-link:hover {
    text-shadow: 0 0 10px var(--primary-color);
}

.project-link::after {
    content: '→';
    margin-left: 0.25rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.project-link:hover::after {
    transform: translateX(3px);
}

/* About */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    line-height: 1.8;
    font-weight: 400;
    letter-spacing: -0.014em;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-item {
    background: rgba(123, 47, 247, 0.1);
    border: 1px solid var(--primary-color);
    padding: 0.625rem 1.25rem;
    border-radius: 20px;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: -0.01em;
    transition: all 0.3s ease;
}

.skill-item:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--bg-color);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(123, 47, 247, 0.4);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-card {
    background: rgba(25, 8, 64, 0.6);
    border: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

[data-theme="light"] .stat-card {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(247, 37, 133, 0.4), 0 0 40px rgba(123, 47, 247, 0.2);
}

.stat-number {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--secondary-color), var(--yellow-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Contact */
.contact {
    text-align: center;
}

.contact-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: -0.017em;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--text-color);
    transition: all 0.3s ease;
}

.contact-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 20px var(--primary-color), 0 0 30px rgba(123, 47, 247, 0.3);
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(247, 37, 133, 0.1));
}

.icon {
    width: 24px;
    height: 24px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .theme-toggle {
        width: 36px;
        height: 36px;
        margin-left: 0.5rem;
    }
    
    .theme-toggle svg {
        width: 18px;
        height: 18px;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 5rem 2rem;
        min-height: auto;
    }
    
    .hero-visual {
        margin-top: 2rem;
    }
    
    .avatar-wrapper {
        width: 250px;
        height: 250px;
    }
    
    .avatar-container {
        width: 100px;
        height: 100px;
    }
    
    .floating-tag {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
    }
    
    .floating-tag:nth-child(1) {
        top: 5%;
        left: -30px;
    }
    
    .floating-tag:nth-child(2) {
        top: 25%;
        right: -30px;
    }
    
    .floating-tag:nth-child(3) {
        bottom: 25%;
        left: -40px;
    }
    
    .floating-tag:nth-child(4) {
        bottom: 5%;
        right: -30px;
    }
    
    .code-card {
        display: none;
    }
    
    .geometric-shapes {
        display: none;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-card {
        padding: 1.5rem;
    }
    
    .contact-links {
        flex-direction: column;
        align-items: center;
    }
}
