/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

/* Layout */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: #fff;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #6c757d;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.3rem;
    color: #7f8c8d;
    margin-bottom: 1rem;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.contact-info a {
    color: #3498db;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
}

.contact-info a:hover {
    color: #2980b9;
}

/* Navigation */
nav {
    background: #34495e;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background 0.3s;
}

nav a:hover {
    background: #2c3e50;
}

/* Sections */
section {
    background: white;
    margin: 2rem 0;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #3498db;
    display: inline-block;
}

h2 i {
    font-size: 1rem;
    color: #3498db;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* About */
.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Skills */
#skills {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* Encabezado de sección */
.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2,
.main-skill-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* ya lo tienes */
    gap: 0.5rem;
    text-align: left;
    margin-bottom: 0.5rem; /* aquí está el espacio extra */
}


.main-skill-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: 250px;
    height: 3px;
}

/* Grid de habilidades */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Tarjetas individuales */
.skill-category {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease forwards;
}

.skill-category:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

/* Título de categoría */
.category-title {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    position: relative;
}

.category-title i {
    font-size: 1.3rem;
    margin-right: 0.7rem;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #1e90ff, #007bff);
    color: white;
    box-shadow: 0 2px 8px rgba(30, 144, 255, 0.3);
}

/* Etiquetas */
.compact-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.compact-tag {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #495057;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
    cursor: pointer;
}

.compact-tag:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    color: #2c3e50;
    border-color: #adb5bd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Animaciones */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Delays por tarjeta */
.skill-category:nth-child(1) { animation-delay: 0.1s; }
.skill-category:nth-child(2) { animation-delay: 0.15s; }
.skill-category:nth-child(3) { animation-delay: 0.2s; }
.skill-category:nth-child(4) { animation-delay: 0.25s; }
.skill-category:nth-child(5) { animation-delay: 0.3s; }
.skill-category:nth-child(6) { animation-delay: 0.35s; }


/* Experience */
.experience-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #18d366;
}

.job-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
}

.company {
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.period {
    color: #95a5a6;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.achievements {
    list-style: none;
}

.achievements li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.achievements li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

.project-card {
    background: #f8f9fa;
    padding: 1.5rem;
    padding-bottom: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    min-height: 320px;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

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

.project-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
}

.project-description {
    color: #7f8c8d;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 1rem;
}

.tech-tag {
    background: #e3f2fd;
    color: #1565c0;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}


.project-links {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.project-links a {
    display: inline-block;
    background: #0077b6;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.3s ease;
}

.project-links a:hover {
    background: #023e8a;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container { padding: 0 15px; }
    h1 { font-size: 2rem; }
    .contact-info { gap: 1rem; }
    nav ul { gap: 1rem; }
    section { margin: 1rem 0; padding: 1.5rem; }
    .skills-grid, .projects-grid { grid-template-columns: 1fr; }
    .section-header h2 { font-size: 1.8rem; }
    .skill-category { padding: 1.2rem; }
}

@media (max-width: 480px) {
    #skills { padding: 1rem; }
    .section-header h2 { font-size: 1.6rem; flex-direction: column; gap: 0.3rem; }
    .compact-tags { gap: 0.3rem; }
    .compact-tag { font-size: 0.75rem; padding: 0.25rem 0.6rem; }
}
