/* Variables de color - Nuevo esquema */
:root {
    --primary-color: #4A6572; /* Gris azulado oscuro */
    --secondary-color: #F9AA33; /* Amarillo mostaza */
    --background-color: #ECEFF1; /* Gris claro */
    --text-color: #37474F; /* Gris oscuro */
    --light-text-color: #546E7A; /* Gris más claro */
    --white-color: #FFFFFF;
    --border-color: #CFD8DC; /* Gris muy claro */
    --card-background: #FFFFFF;
}

/* Reset básico y tipografía */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Optimización de imágenes */
img {
    max-width: 100%;
    height: auto;
}

/* Reducir motion para usuarios sensibles */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--background-color);
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Animaciones base */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.fade-in {
    animation: fadeIn 1s ease-out;
}

.slide-up {
    animation: slideUp 0.8s ease-out 0.3s both;
}

.slide-up:nth-child(2) { animation-delay: 0.5s; }
.slide-up:nth-child(3) { animation-delay: 0.7s; }
.slide-up:nth-child(4) { animation-delay: 0.9s; }

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

/* Header y Navbar */
.header {
    background-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 20px;
    position: relative;
}

.navbar .logo {
    font-weight: bold;
    font-size: 2em;
    color: var(--white-color);
    text-decoration: none;
}

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

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

.nav-links a {
    text-decoration: none;
    color: var(--white-color);
    font-weight: 400;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Menu hamburguesa */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--white-color);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Secciones generales */
section {
    padding: 70px 0;
    text-align: center;
    position: relative;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

h2 {
    font-size: 2.8em;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    border-radius: 2px;
}

.section-description {
    font-size: 1.2em;
    color: var(--light-text-color);
    margin-bottom: 50px;
    font-style: italic;
}

/* Hero Section (Inicio) */
.hero-section {
    background-color: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 75vh;
    padding: 0 20px;
    text-align: center;
}

.hero-content {
    max-width: 900px;
}

.profile-pic-container {
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

.profile-pic {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--secondary-color);
    box-shadow: 0 8px 25px rgba(74, 101, 114, 0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.profile-pic:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(74, 101, 114, 0.4);
}

.profile-pic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.profile-pic-container:hover .profile-pic-overlay {
    opacity: 0.1;
}

.hero-content h1 {
    font-size: 3.8em;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.3;
}

.hero-content .highlight {
    color: var(--secondary-color);
    position: relative;
    display: inline-block;
}

.hero-content .highlight::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    animation: typewriter 2s ease-in-out 1s both;
}

.hero-content .subtitle {
    font-size: 1.6em;
    color: var(--light-text-color);
    margin-bottom: 35px;
}

.social-links {
    margin-top: 30px;
    margin-bottom: 25px;
}

.social-links a {
    color: var(--primary-color);
    font-size: 2.2em;
    margin: 0 18px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--secondary-color);
    transform: scale(1.1); /* Ligero aumento de tamaño */
}

.location {
    font-size: 1.2em;
    color: var(--light-text-color);
}

.location i {
    margin-right: 10px;
    color: var(--secondary-color);
}

/* Skills Section */
.skills-section {
    background-color: var(--white-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Columnas más estrechas */
    gap: 25px;
    margin-top: 40px;
}

.skill-category {
    background-color: var(--background-color);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(74, 101, 114, 0.1);
    text-align: left;
    transition: all 0.3s ease;
    border-left: 5px solid var(--secondary-color);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}

.skill-category.animate {
    opacity: 1;
    transform: translateY(0);
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(249, 170, 51, 0.1), transparent);
    transition: left 0.6s ease;
}

.skill-category:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 10px 25px rgba(74, 101, 114, 0.2);
    border-left-color: var(--primary-color);
}

.skill-category:hover::before {
    left: 100%;
}

.skill-category h3 {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border-color); /* Borde punteado */
}

.skill-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
}

.skill-icons img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    background-color: var(--white-color);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 3px 10px rgba(74, 101, 114, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.skill-icons img:hover {
    transform: translateY(-5px) rotate(5deg) scale(1.1);
    box-shadow: 0 8px 20px rgba(74, 101, 114, 0.2);
}

/* Projects Section */
.projects-section {
    background-color: var(--background-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 45px;
}

.project-card {
    background-color: var(--card-background);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(74, 101, 114, 0.1);
    overflow: hidden;
    text-align: left;
    transition: all 0.4s ease;
    border: 1px solid var(--border-color);
    position: relative;
    opacity: 0;
    transform: translateY(50px);
}

.project-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(249, 170, 51, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none; /* Esto permite que los clics pasen a través del overlay */
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(74, 101, 114, 0.2);
    border-color: var(--secondary-color);
}

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

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

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

.project-card h3 {
    font-size: 1.7em;
    color: var(--primary-color);
    margin: 20px 20px 10px 20px;
    position: relative;
    z-index: 2;
}

.project-card p {
    font-size: 1.05em;
    color: var(--light-text-color);
    margin: 0 20px 20px 20px;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

.project-tech-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 20px 15px 20px;
    position: relative;
    z-index: 2;
}

.project-tech-icons img {
    width: 35px;
    height: 35px;
    object-fit: contain;
    background-color: var(--white-color);
    border-radius: 4px;
    padding: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.project-links {
    display: flex;
    gap: 10px;
    padding: 0 20px 25px 20px;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
    z-index: 3; /* Z-index más alto para los enlaces */
}

.project-status {
    color: var(--light-text-color);
    font-style: italic;
    font-size: 0.9em;
    margin: 0;
    padding: 8px 12px;
    background-color: var(--background-color);
    border-radius: 5px;
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 3;
}

.btn {
    display: inline-block;
    padding: 10px 20px; 
    background-color: var(--secondary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 0.9em;
    border: 2px solid var(--secondary-color);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 4; /* Z-index muy alto para asegurar clickeabilidad */
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(74, 101, 114, 0.3);
}

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

.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(249, 170, 51, 0.3);
}

/* About Section */
.about-section {
    background-color: var(--white-color);
    padding-bottom: 0;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 50px;
}

.about-content .text-content {
    flex: 1;
    min-width: 300px;
    text-align: left;
}

.about-content .text-content h2 {
    text-align: left;
}

.about-content .text-content .section-description {
    text-align: left;
    margin-bottom: 25px;
}

.about-content .text-content p {
    margin-bottom: 20px;
    line-height: 1.9;
    font-size: 1.1em;
    color: var(--light-text-color);
}

.about-content .image-content {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center; /* Centrar verticalmente la imagen */
    padding-top: 30px;
}

.about-content .image-content img {
    max-width: 80%; /* Imagen un poco más pequeña */
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* Contact Section */
.contact-section {
    background-color: var(--background-color);
    padding-top: 50px;
}

.contact-details {
    margin-top: 35px;
    font-size: 1.15em;
    line-height: 2.2;
    text-align: center;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    color: var(--light-text-color);
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-2px);
}

.contact-item i {
    color: var(--secondary-color);
    margin-right: 12px;
    font-size: 1.2em;
    min-width: 20px;
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--secondary-color);
}

.contact-item span {
    color: var(--light-text-color);
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: var(--white-color);
    text-align: center;
    padding: 35px 20px;
    font-size: 0.95em;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 40px 20px;
    }

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

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .navbar {
        padding: 15px 20px;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        flex-direction: column;
        padding: 20px 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links li {
        margin: 10px 0;
        text-align: center;
        width: 100%;
    }

    .nav-links a {
        padding: 10px 20px;
        display: block;
        border-radius: 5px;
        margin: 0 20px;
        transition: all 0.3s ease;
    }

    .nav-links a:hover {
        background-color: rgba(249, 170, 51, 0.2);
        transform: translateX(10px);
    }

    .hero-content h1 {
        font-size: 2.8em;
    }

    .hero-content .subtitle {
        font-size: 1.3em;
    }

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

    .skill-category,
    .project-card {
        margin: 0 auto;
        max-width: 500px;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    /* GitHub CTA responsive */
    .github-cta {
        margin-top: 40px;
        padding: 35px 25px;
    }

    .github-text {
        font-size: 1.3em;
        margin-bottom: 20px;
    }

    .github-link {
        padding: 15px 25px;
        font-size: 1em;
        gap: 12px;
        flex-direction: column;
        text-align: center;
    }

    .github-link i {
        font-size: 1.6em;
        margin-bottom: 5px;
    }

    .about-content .text-content h2 {
        text-align: center;
    }

    .about-content .image-content {
        justify-content: center;
    }

    .about-content .image-content img {
        max-width: 70%;
    }

    .github-cta {
        margin-top: 30px;
        padding: 25px 15px;
    }

    .github-text {
        font-size: 1.2em;
    }

    .github-link {
        padding: 10px 20px;
        font-size: 1em;
    }

    .contact-item {
        flex-direction: row;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 30px 15px;
    }

    .hero-content h1 {
        font-size: 2.2em;
        line-height: 1.2;
    }

    .hero-content .subtitle {
        font-size: 1.1em;
        line-height: 1.4;
    }

    .social-links a {
        font-size: 1.8em;
        margin: 0 10px;
    }

    .profile-pic {
        width: 140px;
        height: 140px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.85em;
        flex: 1;
        text-align: center;
        min-width: 120px;
    }

    /* GitHub CTA para móviles pequeños */
    .github-cta {
        padding: 30px 20px;
        margin-top: 30px;
    }

    .github-text {
        font-size: 1.1em;
        line-height: 1.3;
    }

    .github-link {
        padding: 12px 20px;
        font-size: 0.9em;
        border-radius: 40px;
    }

    .github-link i {
        font-size: 1.4em;
    }

    .project-links {
        flex-direction: column;
        gap: 8px;
    }

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

    .skill-icons img,
    .project-tech-icons img {
        width: 35px;
        height: 35px;
    }

    .github-cta {
        margin-top: 25px;
        padding: 20px 10px;
    }

    .github-text {
        font-size: 1.1em;
        margin-bottom: 12px;
    }

    .github-link {
        padding: 8px 16px;
        font-size: 0.9em;
        gap: 8px;
    }

    .project-card h3 {
        font-size: 1.4em;
    }

    .project-card p {
        font-size: 0.95em;
    }

    h2 {
        font-size: 2.2em;
    }

    .section-description {
        font-size: 1.1em;
    }
}

/* GitHub Call-to-Action */
.github-cta {
    text-align: center;
    margin-top: 60px;
    padding: 50px 40px;
    background: linear-gradient(135deg, var(--card-background) 0%, rgba(249, 170, 51, 0.05) 100%);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(74, 101, 114, 0.1);
    position: relative;
    overflow: hidden;
}

.github-text {
    color: var(--text-color);
    font-size: 1.6em;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #5a7a8a 100%);
    color: var(--white-color);
    text-decoration: none;
    padding: 18px 35px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.15em;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    box-shadow: 
        0 8px 25px rgba(74, 101, 114, 0.3),
        0 3px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    background-clip: padding-box;
    overflow: hidden;
}

.github-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #f7b955 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 48px;
}

.github-link:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 15px 35px rgba(74, 101, 114, 0.4),
        0 8px 20px rgba(249, 170, 51, 0.3);
}

.github-link:hover::before {
    opacity: 1;
}

.github-link i {
    font-size: 1.4em;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.github-link:hover i {
    transform: scale(1.2) rotate(360deg);
}

.github-link span {
    position: relative;
    z-index: 1;
}

/* Botón de menú hamburguesa (JS lo manejará)  */
.menu-toggle {
    display: none; 
    font-size: 2em;
    cursor: pointer;
    color: var(--white-color);
}
