/* ============================
   GUÍA DE ESTILO COMPLETA
============================ */

/*
PALETA DE COLORES:
- Negro principal: #000000
- Gris oscuro (texto): #333333
- Gris medio: #555555
- Gris claro (fondos): #fafafa
- Gris muy claro (bordes): #eeeeee
- Blanco: #ffffff

TIPOGRAFÍA:
- Familia principal: Arial, Helvetica, sans-serif
- Tamaños:
  * h1: 48px (hero)
  * h2: 32px (secciones)
  * h3: 24px (tarjetas)
  * p: 16px
  * Pequeños: 14px

ESPACIADOS:
- Margen entre secciones: 80px
- Padding interno de cajas: 20px
- Gap entre elementos grid: 30px
- Border-radius estándar: 15px
- Border-radius botones: 30px

COMPONENTES REUTILIZABLES:
- Botones: 
  * Primario: fondo negro, texto blanco
  * Outline: borde negro, fondo transparente
- Tarjetas: fondo blanco, borde dashed, sombra sutil
- Formularios: inputs con borde gris claro
*/

/* ============================
   RESET Y ESTILOS BASE
============================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #ffffff;
    color: #000000;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

/* ============================
   HEADER
============================ */
.header {
    border-bottom: 1px solid #eeeeee;
    padding: 20px 0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-list a {
    text-decoration: none;
    color: #333333;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s;
}

.nav-list a:hover {
    color: #000000;
}

.nav-list a[aria-current="page"] {
    color: #000000;
    font-weight: bold;
}

.nav-list a[aria-current="page"]::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #000000;
}

/* ============================
   HERO SECTION
============================ */
.hero {
    padding: 80px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.projects-hero .hero-text,
.about-hero .hero-text {
    grid-column: 1 / -1;
    text-align: center;
}

.hero-text h1 {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-text span {
    font-weight: bold;
}

.hero-text p {
    color: #555555;
    margin-bottom: 25px;
    font-size: 18px;
}

.skills {
    list-style: none;
    margin-bottom: 30px;
}

.skills li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================
   BOTONES
============================ */
.buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
    border: none;
    font-size: 16px;
    text-align: center;
}

.small-btn {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 20px;
}

.primary {
    background: #000000;
    color: #ffffff;
}

.primary:hover {
    background: #333333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.outline {
    border: 1px solid #000000;
    color: #000000;
    background: transparent;
}

.outline:hover {
    background: #000000;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ============================
   AVATAR
============================ */
.hero-img {
    display: flex;
    justify-content: center;
}

.hero-img img {
    width: 100%;
    max-width: 320px;
    border-radius: 20px;
    border: 2px dashed #dddddd;
    padding: 20px;
    transition: transform 0.3s ease;
}

.hero-img img:hover {
    transform: scale(1.02);
}

/* ============================
   SECCIONES GENERALES
============================ */
.section {
    padding: 80px 0;
}

.bg-light {
    background: #fafafa;
}

.section h2 {
    font-size: 32px;
    margin-bottom: 15px;
    text-align: center;
    
}

.section-desc {
    color: #555555;
    margin-bottom: 40px;
    max-width: 600px;
    margin-right: auto;
    margin-left: auto;

}

.text-link {
    color: #000000;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.text-link:hover {
    color: #555555;
    text-decoration: underline;
}

/* ============================
   PROYECTOS
============================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.all-projects {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.project-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 15px;
    border: 2px dashed #dddddd;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card.detailed {
    text-align: left;
    padding: 25px;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: #000000;
}

.project-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.project-card.detailed img {
    height: 200px;
}

.project-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.project-card p {
    color: #555555;
    font-size: 14px;
}

.project-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-category {
    color: #777;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.project-description {
    margin: 15px 0;
    font-size: 15px;
    line-height: 1.5;
    color: #444;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.tech-tag {
    background: #f0f0f0;
    color: #555;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.project-link {
    display: inline-block;
    margin-top: 15px;
    color: #000;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s;
}

.project-link:hover {
    color: #555;
    text-decoration: underline;
}


/* ============================
   FORMULARIO DE CONTACTO
============================ */
.contact-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.contact-form label {
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

/* ============================
   FOoter
============================ */
.footer {
  position: relative;
  display: flex;
  align-items: center;
  padding: 1rem 2rem;
  border-top: 1px solid #eee;
  min-height: 60px;
}

/* Copyright centrado */
.footer p {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 14px;
  color: #555;
  white-space: nowrap;
}

/* Iconos a la derecha */
.footer-icons {
  margin-left: auto;
  display: flex;
  gap: 1rem;
}

.footer-icons a {
  display: flex;
  align-items: center;
}

.footer-icons svg {
  width: 24px;
  height: 24px;
  fill: #000;
  transition: fill 0.3s ease, transform 0.2s ease;
}

.footer-icons a:hover svg {
  fill: #0077b5;
  transform: scale(1.1);
}


/* ============================
   ESTILOS PARA PÁGINA "SOBRE MÍ"
============================ */

/* Timeline (línea de tiempo) */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding: 40px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: #000;
}

.timeline-item {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
    position: relative;
}

.timeline-date {
    width: 45%;
    text-align: right;
    padding-right: 30px;
    font-weight: bold;
    color: #555;
}

.timeline-content {
    width: 45%;
    padding-left: 30px;
    border-left: 2px solid #eee;
}

.timeline-item:nth-child(even) .timeline-date {
    order: 2;
    text-align: left;
    padding-right: 0;
    padding-left: 30px;
}

.timeline-item:nth-child(even) .timeline-content {
    order: 1;
    text-align: right;
    border-left: none;
    border-right: 2px solid #eee;
    padding-left: 0;
    padding-right: 30px;
}

.company {
    color: #777;
    font-style: italic;
    margin: 5px 0 15px;
}

.skills-used {
    margin-top: 15px;
}

.skill-tag {
    display: inline-block;
    background: #f0f0f0;
    color: #555;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    margin-right: 8px;
    margin-bottom: 8px;
}

/* Habilidades */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.skill-category {
    background: white;
    padding: 25px;
    border-radius: 15px;
    border: 2px dashed #ddd;
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: #000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.skill-category h3 {
    color: #000;
    margin-bottom: 15px;
    font-size: 20px;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 25px;
}

.skill-list li:last-child {
    border-bottom: none;
}

.skill-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #000;
    font-weight: bold;
}

/* Introducción */
.about-intro {
    max-width: 800px;
    margin: 0 auto;
}

.about-intro h2 {
    text-align: center;
    margin-bottom: 20px;
}

.intro-text {
    font-size: 18px;
    line-height: 1.8;
    color: #555;
    text-align: center;
    margin-bottom: 30px;
}

.divider {
    height: 2px;
    background: #eee;
    margin: 30px 0;
    width: 100px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================
   RESPONSIVE DESIGN
============================ */
@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-text h1 {
        font-size: 36px;
    }

    .buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .nav {
        flex-direction: column;
        gap: 20px;
    }

    .nav-list {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px 25px;
    }

    .projects-grid,
    .all-projects {
        grid-template-columns: 1fr;
    }

    .hero-img img {
        max-width: 280px;
    }

    .section {
        padding: 60px 0;
    }

    .section h2 {
        font-size: 28px;
        text-align: center;
        
    }

    .section-desc {
        font-size: 16px;
        padding: 0;
        
    }
    .section p{
        margin-left: auto;
        margin-right: auto;
    }

    /* Timeline responsive */
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        flex-direction: column;
    }
    
    .timeline-date,
    .timeline-content,
    .timeline-item:nth-child(even) .timeline-date,
    .timeline-item:nth-child(even) .timeline-content {
        width: 100%;
        text-align: left;
        padding: 0 0 0 50px;
        border: none;
    }
    
    .timeline-content {
        margin-top: 10px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .about-intro h2 {
        font-size: 28px;
    }
    
    .intro-text {
        font-size: 16px;
    }
    
    /* Filtros responsive */
    .filters {
        flex-direction: column;
        gap: 15px;
    }
    
    .project-card.detailed {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .section {
        padding: 50px 0;
    }

    .hero {
        padding: 50px 0;
    }

    .hero-text h1 {
        font-size: 28px;
    }

    .hero-text p {
        font-size: 16px;
    }

    .project-card {
        padding: 15px;
    }

    .contact-form {
        gap: 20px;
    }
    .contact-form button{
          margin-left: auto;
        margin-right: auto;
    }

    .footer {
        padding: 20px;
    }

    .filter-buttons {
        justify-content: center;
        
    }
}

@media (max-width: 768px) {
  .footer {
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem 1rem;
  }

  .footer p {
    position: static;
    transform: none;
    margin-bottom: 1rem;
    text-align: center;
  }

  .footer-icons {
    margin-left: 0;
    justify-content: center;
  }
}



/* Mejoras de accesibilidad: focus states */
.btn:focus,
input:focus,
textarea:focus,
.filter-btn:focus {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

/* Suavizar scroll */
html {
    scroll-behavior: smooth;
}