/* Base & Variables */
:root {
    /* Color Palette (Sleek Dark Mode with Cyan/Purple accents) */
    --bg-dark: #0a0a0f;
    --bg-card: #15151e;
    --bg-glass: rgba(255, 255, 255, 0.03);
    
    --text-primary: #f0f0f5;
    --text-secondary: #9ba1a6;
    
    --accent-cyan: #00f0ff;
    --accent-blue: #0070f3;
    --accent-purple: #7000ff;
    
    --border-color: rgba(255, 255, 255, 0.08);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    /* Remove static image, rely on canvas */
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

#circuit-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Typography */
h1, h2, h3, h4, .logo {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.02em; margin-bottom: 1rem; }
h2 { font-size: clamp(2rem, 4vw, 2.5rem); margin-bottom: 0.5rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
p { color: var(--text-secondary); margin-bottom: 1rem; }

.text-accent { color: var(--accent-cyan); }

/* Layout Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    background: linear-gradient(90deg, #fff, #9ba1a6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-primary-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
    font-size: 1rem;
}

.btn-primary-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 112, 243, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 112, 243, 0.5);
    background: linear-gradient(135deg, #1080ff, #8010ff);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.w-100 { width: 100%; }

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

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

.logo {
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i { color: var(--accent-cyan); }

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

.nav-links a:not(.btn-primary-small) {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:not(.btn-primary-small):hover {
    color: var(--accent-cyan);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.05) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(112, 0, 255, 0.08) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

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

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

.glow-orb {
    position: absolute;
    width: 300px;
    height: 300px;
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-purple));
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 6s ease-in-out infinite;
}

.main-card {
    position: relative;
    z-index: 1;
    width: 80%;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    animation: float 6s ease-in-out infinite alternate;
}

.icon-large {
    font-size: 4rem;
    margin-bottom: 1rem;
}

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

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

.about-features {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feature-item i {
    font-size: 2rem;
    margin-top: 0.2rem;
}

.feature-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.feature-item p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

.about-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.05), rgba(112, 0, 255, 0.05));
    position: relative;
    overflow: hidden;
}

.about-visual::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: var(--accent-blue);
    filter: blur(100px);
    opacity: 0.2;
    border-radius: 50%;
}

.experience-badge {
    text-align: center;
    position: relative;
    z-index: 1;
}

.experience-badge .years {
    display: block;
    font-size: 8rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(to right, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.experience-badge .text {
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

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

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(0, 240, 255, 0.1), transparent 70%);
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 10px 30px -10px rgba(0, 240, 255, 0.1);
}

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

.service-icon {
    font-size: 2.5rem;
    color: var(--accent-cyan);
    margin-bottom: 1.5rem;
}

/* Portfolio (Trabajos) */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16/9;
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-overlay h4 {
    color: #fff;
    margin-bottom: 0.2rem;
}

.portfolio-overlay p {
    margin-bottom: 0;
    font-size: 0.9rem;
    color: var(--accent-cyan);
}

/* Modal and Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.video-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 10px 30px -10px rgba(0, 240, 255, 0.1);
}

.video-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
}

.video-wrapper video,
.video-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-info {
    padding: 1.5rem;
}

.video-info h4 {
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.video-info p {
    margin-bottom: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    overflow: auto;
    padding: 2rem;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--bg-card);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: var(--text-secondary);
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--accent-cyan);
}

.modal-header {
    margin-bottom: 2rem;
    padding-right: 2rem;
}

/* Tips Section */
.tips-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 3rem;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.05);
}

.tips-card.reversed .tip-content {
    order: -1;
}

.tip-video {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    background: repeating-linear-gradient(
        45deg,
        rgba(0,0,0,0.2),
        rgba(0,0,0,0.2) 10px,
        rgba(0,0,0,0.3) 10px,
        rgba(0,0,0,0.3) 20px
    );
}

.video-placeholder i {
    font-size: 3rem;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
    opacity: 0.7;
}

.tip-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--accent-cyan);
}

.tip-content p {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.tip-list {
    list-style: none;
    padding: 0;
}

.tip-list li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* Contact */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-method-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    margin-top: 2rem;
}

.contact-method-card:hover {
    border-color: #25D366; /* WhatsApp color */
    transform: translateY(-3px);
}

.whatsapp-color {
    font-size: 2.5rem;
    color: #25D366;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.05);
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    background: rgba(0,0,0,0.3);
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    margin-top: 1rem;
    max-width: 300px;
}

.footer-links ul {
    list-style: none;
    margin-top: 1rem;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-cyan);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Brands Carousel */
.brands-carousel {
    width: 100%;
    overflow: hidden;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
    position: relative;
    white-space: nowrap;
}

.brands-carousel::before,
.brands-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
}

.brands-carousel::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-dark) 0%, transparent 100%);
}

.brands-carousel::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-dark) 0%, transparent 100%);
}

.brands-track {
    display: inline-flex;
    gap: 4rem;
    align-items: center;
    animation: scrollBrands 30s linear infinite;
}

.brands-track:hover {
    animation-play-state: paused;
}

.brand-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    transition: var(--transition);
}

.brand-item:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

/* Brand Colors (optimized for Dark Mode visibility) */
.brand-playstation { color: #0070d1; }
.brand-xbox { color: #107C10; }
.brand-apple { color: #ffffff; }
.brand-samsung { color: #2d50e6; letter-spacing: 1px; font-weight: 800; }
.brand-lg { color: #ea005a; }
.brand-sony { color: #ffffff; letter-spacing: 2px; }
.brand-microsoft { color: #00a2ed; }
.brand-hp { color: #0096D6; font-style: italic; font-weight: 800; font-family: sans-serif; }
.brand-dell { color: #007DB8; }
.brand-lenovo { color: #ff3b30; }

@keyframes scrollBrands {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 2rem)); }
}

/* Responsive */
@media (max-width: 900px) {
    .hero-container, .contact-container, .about-container, .tips-card {
        grid-template-columns: 1fr;
    }
    
    .tips-card {
        gap: 2rem;
        padding: 2rem;
    }
    
    .tips-card.reversed .tip-content {
        order: 0;
    }
    
    .hero {
        text-align: center;
        padding-top: 120px;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-visual {
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-dark);
        flex-direction: column;
        justify-content: center;
        transition: 0.4s ease-in-out;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    h1 { font-size: 2.5rem; }
}

/* Tools Carousel */
.tools-carousel-container {
    width: 100%;
    overflow: hidden;
    padding: 2rem 0;
    position: relative;
}

.tools-carousel-container::before,
.tools-carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.tools-carousel-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-dark), transparent);
}

.tools-carousel-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-dark), transparent);
}

.tools-carousel-track {
    display: flex;
    gap: 2rem;
    width: max-content;
    animation: scroll-tools 25s linear infinite;
}

.tools-carousel-track:hover {
    animation-play-state: paused;
}

.tool-card {
    width: 250px;
    height: 250px;
    background: var(--bg-card);
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.tool-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 240, 255, 0.2);
    border-color: var(--accent-cyan);
}

.tool-card img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.tool-card h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    text-align: center;
}

@keyframes scroll-tools {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 1rem)); }
}

@media (max-width: 768px) {
    .tool-card {
        width: 200px;
        height: 200px;
    }
    .tool-card img {
        height: 120px;
    }
}
