/* --- Reseteo Básico y Variables --- */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #1abc9c;
    --light-gray: #ecf0f1;
    --white-color: #ffffff;
    --font-header: 'Montserrat', sans-serif;
    --font-body: 'Lato', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    background: var(--white-color);
    color: var(--secondary-color);
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: var(--font-header);
    color: var(--primary-color);
}

h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
}

section {
    padding: 60px 0;
}

/* --- Header y Navegación --- */
header {
    background: var(--white-color);
    color: var(--primary-color);
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

#logo {
    font-family: var(--font-header);
    font-size: 1.5rem;
    font-weight: 700;
}

header nav ul {
    list-style: none;
    display: flex;
}

header nav ul li {
    margin-left: 20px;
}

header nav ul li a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s;
}

header nav ul li a:hover {
    color: var(--accent-color);
}

/* --- Sección Hero --- */
#hero {
    background: var(--primary-color);
    color: var(--white-color);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#hero h1 {
    font-size: 3.5rem;
    color: var(--white-color);
}

#hero .subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.hero-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 25px;
    border: 5px solid white;
    box-shadow: var(--sombra-caja);
}

.btn {
    display: inline-block;
    background: var(--accent-color);
    color: var(--white-color);
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 700;
    transition: background 0.3s;
}

.btn:hover {
    background: #16a085;
}

/* --- Sección Sobre Mí --- */
#about {
    background: var(--light-gray);
}

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

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
}

/* --- Sección Proyectos --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--white-color);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s;
}

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

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-card h3 {
    padding: 20px 20px 10px 20px;
}

.project-card p {
    padding: 0 20px 20px 20px;
}

.tags {
    padding: 0 20px 20px 20px;
}

.tags span {
    background: var(--light-gray);
    color: var(--secondary-color);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    margin-right: 5px;
}

/* --- Sección Habilidades --- */
#skills {
    background: var(--light-gray);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    text-align: center;
}

.skill-item {
    background: var(--white-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.skill-item i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 10px;
}

/* --- Sección Educación --- */
.education-item {
    background: var(--white-color);
    padding: 20px;
    margin-bottom: 20px;
    border-left: 5px solid var(--accent-color);
    border-radius: 5px;
}

.education-item h3 {
    margin-bottom: 5px;
}

/* --- Sección Contacto --- */
#contact {
    text-align: center;
}

#contact form {
    max-width: 600px;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#contact input, #contact textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-body);
}

#contact button {
    cursor: pointer;
    border: none;
}

.contact-info {
    margin-top: 40px;
}

.contact-info p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.contact-info i {
    color: var(--accent-color);
    margin-right: 10px;
}
.contact-info a {
    color: var(--secondary-color);
    text-decoration: none;
}
.contact-info a:hover {
    text-decoration: underline;
}

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

/* --- Responsividad --- */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    header nav ul {
        padding-top: 10px;
    }
    #hero h1 {
        font-size: 2.5rem;
    }
    .about-content {
        flex-direction: column;
        text-align: center;
    }
}

#contact {
    background: var(--light-gray);
}