/* ========================================
   PORTFOLIO DEIVIS PEREIRA - ESTILOS
   ======================================== */

/* Variables CSS */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #0f172a;
    --accent-color: #06b6d4;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --text-white: #f8fafc;
    --bg-light: #f1f5f9;
    --bg-white: #ffffff;
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --hero-bg: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --gradient: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    --footer-bg: #0f172a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --font-primary: 'Poppins', sans-serif;
    --font-display: 'Playfair Display', serif;
}

body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dark-theme {
    --primary-color: #60a5fa;
    --primary-dark: #3b82f6;
    --primary-light: #93c5fd;
    --secondary-color: #e2e8f0;
    --accent-color: #38bdf8;
    --text-dark: #f8fafc;
    --text-light: #cbd5e1;
    --text-white: #ffffff;
    --bg-light: #1e293b;
    --bg-white: #0f172a;
    --gradient: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    --shadow-sm: 0 1px 2px rgba(255, 255, 255, 0.08);
    --shadow-md: 0 4px 6px -1px rgba(255, 255, 255, 0.08);
    --shadow-lg: 0 10px 15px -3px rgba(255, 255, 255, 0.08);
    --shadow-xl: 0 20px 25px -5px rgba(255, 255, 255, 0.08);
    --navbar-bg: rgba(15, 23, 42, 0.95);
    --hero-bg: linear-gradient(135deg, #0f172a 0%, #111827 100%);
    --footer-bg: #111827;
}

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

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

/* Tipografía */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    height: 80px;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    font-family: var(--font-display);
}

.logo span {
    color: var(--primary-color);
}

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

.nav-links a {
    font-weight: 500;
    color: var(--text-dark);
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: var(--transition);
}

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

.nav-links a:hover {
    color: var(--primary-color);
}

.btn-contact {
    background: var(--gradient);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
}

.btn-contact::after {
    display: none;
}

.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--bg-white);
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.theme-toggle i {
    font-size: 1rem;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    background: var(--hero-bg);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

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

.hero-subtitle {
    display: inline-block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 4rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.hero-title .highlight {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.hero-stats {
    display: flex;
    gap: 3rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
}

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

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-frame {
    width: 400px;
    height: 400px;
    position: relative;
}

.image-frame::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: 20px;
    bottom: 20px;
    border: 3px solid var(--primary-color);
    border-radius: 30px 0 30px 0;
}

.image-frame::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    border: 3px solid var(--accent-color);
    border-radius: 0 30px 0 30px;
}

.placeholder-avatar {
    width: 100%;
    height: 100%;
    background: var(--gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: white;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.placeholder-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-down a {
    width: 50px;
    height: 50px;
    background: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    animation: bounce 2s infinite;
}

.scroll-down a i {
    color: var(--primary-color);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ========================================
   SECTION HEADERS
   ======================================== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-subtitle {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about {
    padding: 100px 0;
    background: var(--bg-white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

.about-image {
    position: relative;
}

.image-box {
    position: relative;
    padding: 2rem;
    max-width: 320px;
    margin: 0 auto;
}

.image-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    border-radius: 20px;
    opacity: 0.1;
}

.about-photo {
    width: 100%;
    max-height: 320px;
    height: auto;
    display: block;
    border-radius: 20px;
    object-fit: cover;
}

.placeholder-avatar.large {
    width: 100%;
    height: 400px;
    font-size: 6rem;
}

.about-text h3 {
    font-size: 1.75rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.skills-title {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin: 2rem 0 1rem;
    font-family: var(--font-primary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 10px;
    transition: var(--transition);
}

.skill-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.skill-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.skill-item:hover i {
    color: white;
}

.skill-item span {
    font-weight: 500;
}

/* ========================================
   SERVICES SECTION
   ======================================== */
.services {
    padding: 100px 0;
    background: var(--bg-light);
}

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

.service-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.service-icon i {
    font-size: 2rem;
    color: white;
}

.service-card h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-family: var(--font-primary);
}

.service-card p {
    color: var(--text-light);
}

/* ========================================
   PROJECTS SECTION
   ======================================== */
.projects {
    padding: 100px 0;
    background: var(--bg-white);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.project-card {
    background: var(--bg-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.project-image {
    height: 250px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

.project-placeholder i {
    font-size: 4rem;
    color: var(--text-light);
}

.project-info {
    padding: 2rem;
}

.project-info h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
    font-family: var(--font-primary);
}

.project-info p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.project-tags span {
    padding: 0.25rem 0.75rem;
    background: var(--bg-light);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--text-light);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition);
}

.project-link:hover {
    gap: 0.75rem;
}

/* ========================================
   TESTIMONIALS SECTION
   ======================================== */
.testimonials {
    padding: 100px 0;
    background: var(--bg-light);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 1fr));
    gap: 2rem;
    align-items: start;
}

.testimonial-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 25px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.testimonial-card p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.testimonial-author strong {
    color: var(--secondary-color);
    font-size: 1rem;
}

.testimonial-author span {
    color: var(--text-light);
    font-size: 0.95rem;
}

.testimonial-form-card {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(6, 182, 212, 0.08));
}

.testimonial-form-header h3 {
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.testimonial-form-header p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.testimonial-form .form-group {
    margin-bottom: 1rem;
}

.testimonial-form .form-group input,
.testimonial-form .form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--bg-light);
    border-radius: 15px;
    background: var(--bg-white);
    color: var(--text-dark);
}

.testimonial-form .form-group textarea {
    resize: vertical;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact {
    padding: 100px 0;
    background: var(--bg-light);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-white);
    border-radius: 15px;
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.5rem;
    color: white;
}

.contact-details h4 {
    font-size: 1.125rem;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
    font-family: var(--font-primary);
}

.contact-details p {
    color: var(--text-light);
}

.contact-form {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--bg-light);
    border-radius: 10px;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-white);
    color: var(--text-dark);
}

.form-group select option {
    color: var(--text-dark);
    background: var(--bg-white);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-form .btn {
    width: 100%;
    text-align: center;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--footer-bg);
    padding: 60px 0 20px;
    color: var(--text-white);
}

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

.footer-brand .logo {
    color: white;
    margin-bottom: 1rem;
    display: inline-block;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links h4,
.footer-social h4 {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-primary);
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-light);
}

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

.social-links a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.social-links i {
    font-size: 1.25rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-description {
        margin: 0 auto 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-image {
        order: -1;
    }

    .image-frame {
        width: 300px;
        height: 300px;
    }

    .placeholder-avatar {
        font-size: 5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-image {
        max-width: 400px;
        margin: 0 auto;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .contact-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

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

    .section-title {
        font-size: 2rem;
    }

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

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

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-150%);
        transition: var(--transition);
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .menu-toggle {
        display: block;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

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

    .placeholder-avatar.large {
        height: 300px;
    }
}

/* ========================================
   ANIMACIONES
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}