/* Variables */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --body-bg: #fff;
    --card-bg: #fff;
    --body-font: 'Roboto', sans-serif;
    --heading-font: 'Montserrat', sans-serif;
    --transition: all 0.3s ease;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Modo oscuro */
.dark-mode {
    --primary-color: #60a5fa;
    --secondary-color: #1e3a5f;
    --accent-color: #f87171;
    --light-color: #1f2937;
    --dark-color: #111827;
    --text-color: #e5e7eb;
    --body-bg: #111827;
    --card-bg: #1f2937;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--body-bg);
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    background-color: var(--primary-color);
}

section {
    padding: 80px 0;
}

/* Animaciones de secciones */
.animated {
    opacity: 1;
    transform: none;
}

.animated.visible {
    opacity: 1;
    transform: none;
}

/* Animación para las barras de habilidades */
.skill-level {
    width: var(--width) !important;
    transition: none;
}

.skills.visible .skill-level {
    width: var(--width) !important;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.9rem;
    border: none;
}

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

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

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

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* Header y Navegación */
header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

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

.nav-links {
    display: flex;
}

.nav-links li {
    margin-left: 30px;
}

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

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

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

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

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

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.2;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.hero h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 400;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 600px;
}

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

.cta-buttons {
    display: flex;
    gap: 15px;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    align-items: center;
}

.about-content-full {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: rgba(236, 240, 241, 0.3);
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.about-text-centered {
    text-align: center;
}

.about-text-centered p {
    margin-bottom: 25px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
}

.about-buttons .btn {
    margin-bottom: 20px;
}

.about-image {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-image img {
    border-radius: 10px;
    transition: var(--transition);
}

.about-image:hover img {
    transform: scale(1.05);
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-color);
    color: var(--dark-color);
    font-size: 1.2rem;
    transition: var(--transition);
}

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

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition), background-color 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.project-image {
    height: 300px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
    color: var(--dark-color);
}

.project-info p {
    margin-bottom: 15px;
    color: #777;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.project-tags span {
    background-color: var(--light-color);
    color: var(--dark-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 15px;
}

.project-links a {
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.project-links a i {
    font-size: 0.8rem;
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
    padding-bottom: 5px;
}

.skill-category h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.skill-item {
    margin-bottom: 15px;
}

.skill-name {
    margin-bottom: 8px;
    font-weight: 500;
}

.skill-bar {
    height: 10px;
    background-color: var(--light-color);
    border-radius: 5px;
    overflow: hidden;
}

.skill-level {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 5px;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
}

.contact-info-centered {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 0 auto;
}

.contact-info {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: 10px;
    transition: background-color 0.3s ease;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
}

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

.contact-item h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.contact-info .social-links {
    margin-top: 30px;
    justify-content: center;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 30px 0;
    text-align: center;
}

/* Media Queries */
@media (max-width: 992px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: white;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .about-content,
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero h2 {
        font-size: 1.3rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .project-card {
        max-width: 400px;
        margin: 0 auto;
    }

    .about-content-full {
        padding: 15px;
    }
}

/* Theme Toggle */
.theme-toggle {
    cursor: pointer;
    margin-right: 20px;
    font-size: 1.2rem;
    color: var(--text-color);
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--primary-color);
    transform: rotate(20deg);
}

.dark-mode .theme-toggle i {
    color: #f1c40f;
}

/* Adjust project card for dark mode */
.project-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition), background-color 0.3s ease;
}

/* Adjust contact section for dark mode */
.contact-info {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: 10px;
    transition: background-color 0.3s ease;
}

/* Ajustes para modo oscuro */
.dark-mode .social-links a {
    background-color: var(--dark-color);
    color: var(--text-color);
}

.dark-mode .social-links a:hover {
    background-color: var(--primary-color);
}

.dark-mode .project-tags span {
    background-color: var(--dark-color);
    color: var(--text-color);
}

.dark-mode .skill-bar {
    background-color: var(--dark-color);
}

.dark-mode header {
    background-color: rgba(17, 24, 39, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.dark-mode .nav-links a {
    color: var(--text-color);
}

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

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

.dark-mode .menu-toggle {
    color: var(--text-color);
}

.dark-mode .section-title {
    color: var(--text-color);
}

.dark-mode .section-title::after {
    background-color: var(--primary-color);
}

.dark-mode .about-text-centered p {
    color: var(--text-color);
}

.dark-mode .project-info h3 {
    color: var(--text-color);
}

.dark-mode .project-info p {
    color: #a0aec0;
}

.dark-mode .skill-category h3 {
    color: var(--text-color);
}

.dark-mode .skill-name {
    color: var(--text-color);
}

/* Ajuste del fondo del about section */
.dark-mode .about-content-full {
    background-color: rgba(31, 41, 55, 0.5);
}

/* Mejorar la visibilidad del texto en general */
.dark-mode p, .dark-mode h1, .dark-mode h2, .dark-mode h3 {
    color: var(--text-color);
} 