/* Variables CSS */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --text-color: #333;
    --bg-color: #ffffff;
    --card-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --primary-color: #5dade2;
    --secondary-color: #34495e;
    --text-color: #ecf0f1;
    --bg-color: #1a1a1a;
    --card-bg: #2c2c2c;
    --border-color: #444;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Header y Navigation */
.navbar {
    background-color: var(--card-bg);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-color);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Hero Section */
.hero {
    margin-top: 80px;
    padding: 100px 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.highlight {
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

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

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

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

/* Sections */
section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
}

/* About Section */
.about {
    background-color: var(--card-bg);
}

.about-content p {
    font-size: 1.1rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.skills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.skill-item {
    text-align: center;
    padding: 2rem;
    background-color: var(--bg-color);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-10px);
}

.skill-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-item span {
    display: block;
    font-weight: 600;
}

/* Projects Section */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    border: 2px solid var(--primary-color);
    background-color: transparent;
    color: var(--primary-color);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

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

.project-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card.hidden {
    display: none;
}

.project-tag {
    display: inline-block;
    padding: 5px 15px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 15px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-card p {
    margin-bottom: 1rem;
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.project-link:hover {
    text-decoration: underline;
}

/* Contact Section */
.contact {
    background-color: var(--card-bg);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    transition: border-color 0.3s ease;
}

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

.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    display: block;
    margin-top: 0.3rem;
}

.success-message {
    background-color: #2ecc71;
    color: white;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    margin-top: 1rem;
}

/* Footer */
.footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.social-link {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: var(--primary-color);
}

/* Hero Credentials */
.hero-credentials {
    font-size: 1rem;
    margin: 1rem 0;
    opacity: 0.9;
}

/* Skills Title */
.skills-title {
    text-align: center;
    font-size: 1.8rem;
    margin: 2rem 0 1.5rem;
    color: var(--text-color);
}

/* Featured Project Card */
.project-card.featured {
    background: linear-gradient(135deg, var(--primary-color) 0%, #5dade2 100%);
    color: white;
    grid-column: span 2;
    position: relative;
}

.project-card.featured h3,
.project-card.featured p {
    color: white;
}

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: #f39c12;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Tech Stack */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tech-badge {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    border: 1px solid var(--primary-color);
}

.project-card.featured .tech-badge {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: white;
}

/* Project Links */
.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.demo-link {
    color: #2ecc71;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.demo-link:hover {
    text-decoration: underline;
}

.project-card.featured .demo-link {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 5px;
}

.project-card.featured .project-link {
    color: white;
}

/* Contact Methods */
.contact-intro {
    text-align: center;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    padding: 1rem 1.5rem;
    background-color: var(--bg-color);
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.contact-method:hover {
    transform: translateY(-5px);
    color: var(--primary-color);
}

.contact-method i {
    font-size: 1.3rem;
    color: var(--primary-color);
}

/* Footer Location */
.footer-location {
    margin-top: 0.5rem;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

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

    .project-card.featured {
        grid-column: span 1;
    }

    .contact-methods {
        flex-direction: column;
        align-items: center;
    }

    .skills {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}


/* Education Section */
.education {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 2rem auto 3rem;
}

.edu-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background-color: var(--bg-color);
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.edu-item:hover {
    transform: translateY(-5px);
}

.edu-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 0.3rem;
}

.edu-details {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.edu-details strong {
    font-size: 1rem;
    color: var(--text-color);
}

.edu-details span {
    font-size: 0.9rem;
    color: var(--primary-color);
    opacity: 0.8;
}


/* Private Repository Badge */
.private-code {
    color: #95a5a6;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-style: italic;
}

.project-card.featured .private-code {
    color: rgba(255, 255, 255, 0.8);
}

.private-code i {
    font-size: 0.85rem;
}
