:root {
    --bg-dark: #0a0a0f;
    --bg-card: rgba(10, 10, 15, 0.8);
    --cyan: #00fff2;
    --cyan-dim: rgba(0, 255, 242, 0.3);
    --white: #ffffff;
    --white-dim: rgba(255, 255, 255, 0.7);
}

[data-theme="light"] {
    --bg-dark: #f5f5f7;
    --bg-card: rgba(255, 255, 255, 0.9);
    --cyan: #0066ff;
    --cyan-dim: rgba(0, 102, 255, 0.3);
    --white: #1a1a1a;
    --white-dim: rgba(26, 26, 26, 0.7);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background-color: var(--bg-dark);
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
}

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

main {
    position: relative;
    z-index: 1;
}

section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
}

/* Hero Section */
#hero {
    text-align: center;
}

.glitch {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 8vw, 5rem);
    font-weight: 900;
    color: var(--white);
    text-shadow: 0 0 5px var(--cyan), 0 0 10px var(--cyan);
    animation: glitch 3s infinite;
}

@keyframes glitch {
    0%, 90%, 100% {
        text-shadow: 0 0 5px var(--cyan), 0 0 10px var(--cyan);
    }
    92% {
        text-shadow: -2px 0 var(--cyan), 2px 0 var(--magenta, #ff00ff);
    }
    94% {
        text-shadow: 2px 0 var(--cyan), -2px 0 var(--magenta, #ff00ff);
    }
}

.subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--white-dim);
    margin: 1rem 0 2rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.cta-button {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    padding: 1rem 2.5rem;
    background: transparent;
    border: 2px solid var(--cyan);
    color: var(--cyan);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-button:hover {
    background: var(--cyan);
    color: var(--bg-dark);
    box-shadow: 0 0 30px var(--cyan);
}

/* Services Section */
#services {
    background: linear-gradient(180deg, transparent, rgba(0, 255, 242, 0.02), transparent);
}

#services h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 0.5rem;
}

.section-intro {
    color: var(--white-dim);
    margin-bottom: 3rem;
    font-size: 1.2rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    width: 100%;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--cyan-dim);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(0, 255, 242, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 30px rgba(0, 255, 242, 0.2);
    transform: translateY(-5px);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card i {
    width: 48px;
    height: 48px;
    color: var(--cyan);
    margin-bottom: 1rem;
}

.service-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--cyan);
}

.service-card p {
    color: var(--white-dim);
    font-size: 0.95rem;
}

/* Technologies Section */
#technologies {
    padding: 6rem 2rem;
}

#technologies h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 0.5rem;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    width: 100%;
    margin-top: 2rem;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--cyan-dim);
    transition: all 0.3s ease;
}

.tech-item:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 15px rgba(0, 255, 242, 0.2);
    transform: translateY(-3px);
}

.tech-item i[class^="devicon-"] {
    font-size: 2.5rem;
    color: var(--cyan);
}

.tech-item span:last-child {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    color: var(--white-dim);
    text-transform: uppercase;
}

/* Contact Section */
#contact {
    min-height: auto;
    padding: 6rem 2rem;
}

#contact h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 3rem;
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--cyan-dim);
    color: var(--white);
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.contact-item i {
    width: 20px;
    height: 20px;
}

.contact-item:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 20px rgba(0, 255, 242, 0.3);
}

.contact-item.whatsapp:hover {
    border-color: #25d366;
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.3);
}

.contact-item.whatsapp:hover i {
    color: #25d366;
}

.contact-item.linkedin:hover {
    border-color: #0a66c2;
    box-shadow: 0 0 20px rgba(10, 102, 194, 0.3);
}

.contact-item.linkedin:hover i {
    color: #0a66c2;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--white-dim);
    font-style: italic;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* Responsive */
@media (max-width: 768px) {
    section {
        padding: 3rem 1.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-links {
        flex-direction: column;
        width: 100%;
    }

    .contact-item {
        justify-content: center;
    }
}

/* Theme Toggle Switch */
.theme-switch-wrapper {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 26px;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.toggle-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    z-index: 1;
}

.toggle-icon.moon {
    left: 8px;
}

.toggle-icon.sun {
    right: 8px;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

[data-theme="dark"] .theme-toggle i,
[data-theme="dark"] .theme-toggle svg {
    color: #ff9500;
}

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

[data-theme="light"] .theme-toggle i,
[data-theme="light"] .theme-toggle svg {
    color: #0088ff;
}

[data-theme="light"] .theme-toggle:hover i,
[data-theme="light"] .theme-toggle:hover svg {
    color: var(--cyan);
}

[data-theme="light"] .theme-toggle:hover {
    border-color: #0088ff;
    box-shadow: 0 6px 25px rgba(0, 136, 255, 0.3);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 255, 242, 0.5);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle i {
    width: 26px;
    height: 26px;
    color: #0a0a0f;
    transition: transform 0.3s ease;
}

.theme-toggle:hover i {
    transform: rotate(15deg);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

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

[data-theme="light"] .theme-toggle {
    background: linear-gradient(135deg, #0088ff 0%, #00aaff 100%);
    box-shadow: 0 4px 15px rgba(0, 136, 255, 0.3);
}

[data-theme="light"] .theme-toggle:hover {
    box-shadow: 0 6px 25px rgba(0, 136, 255, 0.5);
}

/* Wave Animation for Light Theme */
#waves-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    display: none;
}

[data-theme="light"] #particles-canvas {
    display: none;
}

[data-theme="light"] #waves-canvas {
    display: block;
}

[data-theme="light"] body {
    background-color: var(--bg-dark);
}

[data-theme="light"] .glitch {
    color: var(--white);
    text-shadow: 0 0 5px var(--cyan), 0 0 10px var(--cyan);
}

[data-theme="light"] .service-card,
[data-theme="light"] .tech-item,
[data-theme="light"] .contact-item {
    background: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .subtitle {
    color: var(--white-dim);
}
