:root {
    --bg-page: #0f172a;
    --bg-card: #111827;
    --bg-card-2: #1f2937;
    --text: #f3f4f6;
    --text-muted: #9ca3af;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --border: #374151;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --radius: 16px;
}

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

body {
    font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: radial-gradient(1200px 600px at 10% -10%, #1e293b 0%, transparent 60%),
                radial-gradient(1000px 500px at 90% 10%, #0b1220 0%, transparent 60%),
                var(--bg-page);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.wrapper {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 2rem;
}

.header-text {
    flex: 1;
    min-width: 220px;
}

.name {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.role {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.location {
    font-size: 0.95rem;
    opacity: 0.85;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.1rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
    font-size: 0.95rem;
    white-space: nowrap;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(6px);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 1.1rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.6rem;
    margin-bottom: 1.25rem;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.section-title::before {
    content: "";
    width: 5px;
    height: 22px;
    background: var(--primary);
    border-radius: 3px;
    display: inline-block;
}

/* Contacto */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    background: var(--bg-card-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-item:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.18);
}

.contact-icon {
    font-size: 1.4rem;
    display: grid;
    place-items: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.contact-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.contact-value {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Texto y listas */
.text {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.7;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.timeline-item {
    background: var(--bg-card-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.1rem 1.1rem;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.4rem;
}

.timeline-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}

.timeline-period {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
    white-space: nowrap;
}

.timeline-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
}

.timeline-list {
    list-style: none;
    padding-left: 0;
    margin-top: 0.5rem;
}

.timeline-list li {
    position: relative;
    padding-left: 1.35rem;
    margin-bottom: 0.45rem;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.6;
}

.timeline-list li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

/* Habilidades */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.9rem;
}

.skill-card {
    background: var(--bg-card-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
}

.skill-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.6rem;
}

.skill-list {
    list-style: none;
    padding-left: 0;
}

.skill-list li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.35rem;
    color: var(--text);
    font-size: 0.93rem;
}

.skill-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

/* Tags (competencias) */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    background: var(--bg-card-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

/* Idiomas */
.languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.9rem;
}

.language-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 1.1rem 1rem;
    background: var(--bg-card-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-align: center;
}

.language-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
}

.language-level {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.95rem;
}

/* Info adicional */
.info-list {
    list-style: none;
    padding-left: 0;
}

.info-list li {
    position: relative;
    padding-left: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-size: 0.95rem;
}

.info-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

/* Footer */
.footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1.5rem;
}

/* Responsive */
@media (max-width: 640px) {
    .name {
        font-size: 1.6rem;
    }

    .header-inner {
        padding: 1.4rem;
    }

    .header-actions {
        width: 100%;
    }

    .btn {
        flex: 1;
        justify-content: center;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .timeline-header {
        flex-direction: column;
        gap: 0.25rem;
    }

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

    .languages-grid {
        grid-template-columns: 1fr;
    }
}
