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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000000;
    position: relative;
}

/* Starfield Background */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

.shooting-star {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, #fff, transparent);
    animation: shoot 3s ease-out;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@keyframes shoot {
    0% {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-500px) translateY(300px);
        opacity: 0;
    }
}

/* Magic Quote Styles */
.magic-quote {
    color: #06b6d4;
    min-height: 200px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    text-shadow: 
        0 0 10px rgba(6, 182, 212, 0.8),
        0 0 20px rgba(6, 182, 212, 0.6),
        0 0 30px rgba(6, 182, 212, 0.4),
        0 0 40px rgba(6, 182, 212, 0.2);
    animation: colorShift 8s ease infinite;
    word-spacing: 0.3em;
    letter-spacing: 0.02em;
}

@keyframes colorShift {
    0%, 100% { 
        color: #06b6d4;
        text-shadow: 
            0 0 10px rgba(6, 182, 212, 0.8),
            0 0 20px rgba(6, 182, 212, 0.6),
            0 0 30px rgba(6, 182, 212, 0.4);
    }
    25% { 
        color: #3b82f6;
        text-shadow: 
            0 0 10px rgba(59, 130, 246, 0.8),
            0 0 20px rgba(59, 130, 246, 0.6),
            0 0 30px rgba(59, 130, 246, 0.4);
    }
    50% { 
        color: #8b5cf6;
        text-shadow: 
            0 0 10px rgba(139, 92, 246, 0.8),
            0 0 20px rgba(139, 92, 246, 0.6),
            0 0 30px rgba(139, 92, 246, 0.4);
    }
    75% { 
        color: #ec4899;
        text-shadow: 
            0 0 10px rgba(236, 72, 153, 0.8),
            0 0 20px rgba(236, 72, 153, 0.6),
            0 0 30px rgba(236, 72, 153, 0.4);
    }
}

.quote-char {
    display: inline-block;
    opacity: 0;
    transform: scale(0) rotate(-180deg);
    filter: blur(5px);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.quote-char.revealed {
    animation: revealChar 0.6s ease-out forwards;
}

@keyframes revealChar {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg) translateY(-50px);
        filter: blur(5px);
    }
    50% {
        transform: scale(1.3) rotate(0deg) translateY(-10px);
        filter: blur(0px);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg) translateY(0);
        filter: blur(0px);
    }
}

.magic-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #06b6d4, transparent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 0 10px #06b6d4;
}

/* Floating Magic Particles */
.floating-magic-particle {
    position: fixed;
    width: 3px;
    height: 3px;
    background: radial-gradient(circle, #06b6d4, transparent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    box-shadow: 0 0 8px #06b6d4, 0 0 15px rgba(6, 182, 212, 0.5);
    opacity: 0.8;
}

.magic-trail {
    position: fixed;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(6, 182, 212, 0.8), 
        rgba(59, 130, 246, 0.6),
        rgba(139, 92, 246, 0.4),
        transparent);
    pointer-events: none;
    z-index: 1;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.6);
}

/* Planets */
.planet {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.7;
    box-shadow: inset -10px -10px 20px rgba(0, 0, 0, 0.5);
}

.planet-ring {
    position: absolute;
    border-radius: 50%;
    border: 3px solid;
    opacity: 0.6;
    transform: rotateX(75deg);
}

.quote-author {
    opacity: 0.8;
    font-style: italic;
    transition: opacity 1s ease;
}


/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #06b6d4;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0891b2;
}

/* Particle Background */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}

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

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(6, 182, 212, 0.8);
    }
}

.hero-title {
    opacity: 1;
    transform: translateY(0);
}

.hero-lastname {
    display: inline-block;
    color: white;
}

.hero-subtitle {
    opacity: 1;
    transform: translateY(0);
}

.hero-buttons {
    opacity: 1;
    transform: translateY(0);
}

.tech-icons {
    opacity: 1;
}

.tech-icon {
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
    filter: grayscale(0.2) brightness(0.9);
    padding: 10px;
    border-radius: 15px;
    background: rgba(6, 182, 212, 0.05);
}

.tech-icon:hover {
    transform: scale(1.3) rotate(10deg);
    filter: grayscale(0) brightness(1.2);
    background: rgba(6, 182, 212, 0.15);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}

.section-title {
    opacity: 1;
    transform: translateY(0);
}

.skill-category {
    opacity: 1;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(6, 182, 212, 0.3);
}

.skill-bar {
    width: 0;
    transition: width 1.5s ease;
}

.stat-card {
    opacity: 1;
    transform: scale(1);
}

.about-content {
    opacity: 1;
    transform: translateX(0);
}

.about-image {
    opacity: 1;
    transform: translateX(0);
}

.contact-info, .contact-form {
    opacity: 1;
    transform: translateY(0);
}

/* Content above starfield */
nav, section, footer {
    position: relative;
    z-index: 1;
}

/* Interactive Elements */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #06b6d4;
    transition: width 0.3s ease;
}

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

/* Cursor Effect */
.cursor-dot {
    width: 8px;
    height: 8px;
    background: #06b6d4;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.2s ease;
}

.cursor-outline {
    width: 30px;
    height: 30px;
    border: 2px solid #06b6d4;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: all 0.15s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

/* Loading Animation */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111827;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.loading-text {
    font-size: 3rem;
    font-weight: bold;
    color: #06b6d4;
}
