/* ============================================================
   ULISES RIVERA GUILLÉN — PORTFOLIO CSS
   Aesthetic: Editorial / Dark Tech — Refined & Intentional
   ============================================================ */

/* === VARIABLES === */
:root {
    --bg: #0a0a0f;
    --bg-2: #111118;
    --bg-3: #16161f;
    --surface: #1c1c28;
    --surface-2: #22222f;
    --border: rgba(255,255,255,0.07);
    --border-hover: rgba(255,255,255,0.15);

    --text: #f0f0f8;
    --text-muted: #8888a8;
    --text-faint: #4a4a6a;

    --accent: #6c63ff;
    --accent-2: #a78bfa;
    --accent-glow: rgba(108, 99, 255, 0.25);
    --accent-warm: #f59e0b;

    --font-display: 'Syne', sans-serif;
    --font-body: 'DM Sans', sans-serif;

    --radius: 16px;
    --radius-sm: 8px;
    --radius-lg: 24px;

    --shadow: 0 4px 32px rgba(0,0,0,0.4);
    --shadow-accent: 0 0 40px var(--accent-glow);

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --nav-h: 72px;
}

/* === RESET & BASE === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Grain overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: 0.4;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

em { font-style: italic; color: var(--accent-2); }

/* === HEADER === */
#header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: var(--nav-h);
    transition: var(--transition);
}

#header.scrolled {
    background: rgba(10,10,15,0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

#header nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-h);
}

.logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text);
    letter-spacing: -0.03em;
}

.logo-dot {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 36px;
    align-items: center;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    transition: color var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition);
    border-radius: 2px;
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 24px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-2);
    transform: translateY(-2px);
    box-shadow: 0 0 36px var(--accent-glow);
}

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

.btn-secondary:hover {
    background: var(--surface);
    border-color: var(--accent);
    color: var(--accent-2);
    transform: translateY(-2px);
}

/* === SECTION SHARED === */
section {
    padding: 100px 0;
}

.section-header {
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
    font-family: var(--font-display);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--text);
    font-weight: 800;
}

/* === HERO SECTION === */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: var(--nav-h);
    position: relative;
    overflow: hidden;
}

/* Background gradient mesh */
.hero-section::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(108,99,255,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 10%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(167,139,250,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(120px, 20vw, 220px);
    color: rgba(255,255,255,0.02);
    user-select: none;
    pointer-events: none;
    letter-spacing: -0.05em;
    white-space: nowrap;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 60px;
    position: relative;
    z-index: 1;
    padding-top: 40px;
}

.hero-eyebrow {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    font-weight: 400;
    animation: fadeUp 0.8s ease both;
}

.hero-text h1 {
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 800;
    color: var(--text);
    margin-bottom: 12px;
    animation: fadeUp 0.8s ease 0.1s both;
}

.hero-accent {
    color: var(--accent-2);
    position: relative;
}

.hero-role {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 400;
    color: var(--text-muted);
    font-family: var(--font-body);
    margin-bottom: 28px;
    letter-spacing: 0;
    animation: fadeUp 0.8s ease 0.2s both;
}

.role-dot { color: var(--accent); margin: 0 6px; }

.hero-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 540px;
    line-height: 1.8;
    margin-bottom: 36px;
    animation: fadeUp 0.8s ease 0.3s both;
}

.hero-desc strong { color: var(--text); font-weight: 600; }

.hero-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    animation: fadeUp 0.8s ease 0.4s both;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-top: 48px;
    animation: fadeUp 0.8s ease 0.5s both;
}

.stat { text-align: center; }

.stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-faint);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* Hero Photo */
.hero-photo {
    position: relative;
    width: 320px;
    height: 320px;
    flex-shrink: 0;
    animation: fadeIn 1s ease 0.3s both;
}

.photo-ring {
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 1px solid var(--accent);
    opacity: 0.3;
    animation: spin 12s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.photo-border {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--surface-2);
    box-shadow: var(--shadow-accent);
    background: var(--surface);
}

.photo-border img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.photo-badge {
    position: absolute;
    bottom: 16px;
    right: -20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    box-shadow: var(--shadow);
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34,197,94,0.6);
    animation: pulse 2s ease infinite;
}

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

/* Scroll hint */
.hero-scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 1;
}

.hero-scroll-hint span {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-faint);
    font-family: var(--font-display);
}

.scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollLine 2s ease infinite;
}

@keyframes scrollLine {
    0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); }
    100% { opacity: 0; transform: scaleY(1); transform-origin: bottom; }
}

/* === ABOUT SECTION === */
.about-section {
    background: var(--bg-2);
    position: relative;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 20px;
    line-height: 1.9;
}

.about-text p strong { color: var(--text); font-weight: 600; }

.about-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.info-item i {
    color: var(--accent);
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

/* Highlight Cards */
.highlights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.highlight-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all var(--transition);
}

.highlight-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-accent);
}

.highlight-icon {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.highlight-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    font-family: var(--font-display);
}

.highlight-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* === TOOLS / SKILLS SECTION === */
.tools-section {
    background: var(--bg);
}

.skills-wrapper {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.skills-group-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 20px;
    font-family: var(--font-display);
    display: flex;
    align-items: center;
    gap: 8px;
}

.skills-group-title i {
    color: var(--accent);
    font-size: 0.9rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all var(--transition);
    cursor: default;
}

.skill-pill:hover {
    border-color: var(--accent);
    color: var(--text);
    transform: translateY(-2px);
    background: var(--surface-2);
}

.skill-pill.primary {
    border-color: rgba(108,99,255,0.3);
    color: var(--accent-2);
    background: rgba(108,99,255,0.08);
}

.skill-pill.primary:hover {
    background: rgba(108,99,255,0.15);
    border-color: var(--accent);
}

.skill-pill.secondary {
    color: var(--text-faint);
}

.skill-pill.soft {
    border-style: dashed;
    color: var(--accent-warm);
    border-color: rgba(245,158,11,0.25);
    background: rgba(245,158,11,0.05);
}

.skill-pill.soft:hover {
    background: rgba(245,158,11,0.1);
    border-color: var(--accent-warm);
}

/* === PROJECTS SECTION === */
.projects-section {
    background: var(--bg-2);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color var(--transition), box-shadow var(--transition);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transform: scaleX(0);
    transition: transform var(--transition);
    transform-origin: left;
}

.project-card:hover {
    border-color: rgba(108,99,255,0.4);
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card.featured {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--surface), var(--surface-2));
    border-color: rgba(108,99,255,0.3);
}

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

.project-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.project-date {
    font-size: 0.75rem;
    color: var(--text-faint);
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.05em;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 100px;
}

.project-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.project-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.75;
    flex: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-tags span {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-2);
    background: rgba(108,99,255,0.1);
    border: 1px solid rgba(108,99,255,0.2);
    padding: 3px 10px;
    border-radius: 100px;
}

.project-links {
    display: flex;
    gap: 12px;
}

.project-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-2);
    transition: all var(--transition);
    font-family: var(--font-display);
    letter-spacing: 0.02em;
}

.project-links a:hover {
    color: var(--text);
    gap: 10px;
}

/* === CONTACT SECTION === */
.contact-section {
    background: var(--bg);
}

.contact-card {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 60px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-warm));
}

.contact-left { display: flex; flex-direction: column; gap: 32px; }

.contact-lead {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.contact-socials {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-socials a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: all var(--transition);
}

.contact-socials a i {
    width: 32px;
    height: 32px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--accent);
    transition: all var(--transition);
    flex-shrink: 0;
}

.contact-socials a:hover {
    color: var(--text);
}

.contact-socials a:hover i {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-faint);
    font-family: var(--font-display);
}

.contact-form input,
.contact-form textarea {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all var(--transition);
    resize: vertical;
    outline: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-faint);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent);
    background: var(--bg-2);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* === FOOTER === */
footer {
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    padding: 32px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

footer p {
    font-size: 0.8rem;
    color: var(--text-faint);
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    color: var(--text-faint);
    font-size: 1rem;
    transition: color var(--transition);
}

.footer-links a:hover { color: var(--accent); }

/* === ANIMATIONS === */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: 1fr 1fr;
    }

    .project-card.featured {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    :root { --nav-h: 64px; }

    .nav-links { display: none; }

    .menu-toggle { display: flex; }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 20px;
    }

    .hero-photo {
        width: 240px;
        height: 240px;
        margin: 0 auto;
        order: -1;
    }

    .photo-badge {
        right: 0;
        font-size: 0.65rem;
    }

    .hero-desc { margin: 0 auto 36px; }
    .hero-buttons { justify-content: center; }
    .hero-stats { justify-content: center; }

    .about-grid { grid-template-columns: 1fr; }
    .highlights-grid { grid-template-columns: 1fr; }

    .projects-grid { grid-template-columns: 1fr; }
    .project-card.featured { grid-column: span 1; }

    .contact-card {
        grid-template-columns: 1fr;
        padding: 32px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    section { padding: 72px 0; }
}

@media (max-width: 480px) {
    .hero-stats { gap: 16px; }
    .hero-bg-text { font-size: 80px; }
    .contact-card { padding: 24px; }
}

/* ============================================================
   SKILL CARDS — LENGUAJES CON ICONOS REALES Y ANIMACIONES
   Añadir al final del style.css existente
   ============================================================ */

/* === TRACK SCROLLABLE (scroll infinito en móvil, grid en desktop) === */
.skills-track-wrapper {
    position: relative;
    overflow: hidden;
    padding: 12px 0 20px;
}

/* Fade edges */
.skills-track-wrapper::before,
.skills-track-wrapper::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 60px;
    z-index: 2;
    pointer-events: none;
}

.skills-track-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--bg), transparent);
}

.skills-track-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--bg), transparent);
}

.skills-track {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 4px 8px 8px;
}

/* === SKILL CARD === */
.skill-card {
    flex: 0 0 auto;
    width: 130px;
    cursor: default;
    perspective: 800px;
}

.skill-card-inner {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 16px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

/* Glow de fondo al hover */
.skill-card-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(108,99,255,0.15), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.skill-card:hover .skill-card-inner {
    border-color: rgba(108,99,255,0.5);
    transform: translateY(-8px) rotateX(4deg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(108,99,255,0.2);
}

.skill-card:hover .skill-card-inner::before {
    opacity: 1;
}

/* Icono SVG */
.skill-svg {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.skill-card:hover .skill-svg {
    transform: scale(1.15) translateY(-3px);
}

/* Nombre del skill */
.skill-name {
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.01em;
    line-height: 1;
}

/* Badges de nivel */
.skill-level {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 100px;
    transition: all 0.3s ease;
}

.primary-badge {
    background: rgba(108,99,255,0.15);
    color: var(--accent-2);
    border: 1px solid rgba(108,99,255,0.3);
}

.mid-badge {
    background: rgba(245,158,11,0.1);
    color: var(--accent-warm);
    border: 1px solid rgba(245,158,11,0.25);
}

.warm-badge {
    background: rgba(245,158,11,0.12);
    color: var(--accent-warm);
    border: 1px solid rgba(245,158,11,0.3);
}

.skill-card:hover .primary-badge {
    background: rgba(108,99,255,0.3);
    border-color: var(--accent);
}

.skill-card:hover .mid-badge {
    background: rgba(245,158,11,0.2);
    border-color: var(--accent-warm);
}

.skill-card:hover .warm-badge {
    background: rgba(245,158,11,0.25);
    border-color: var(--accent-warm);
}

/* Tooltip al hover */
.skill-card[data-tip]:hover::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-2);
    border: 1px solid var(--border-hover);
    color: var(--text);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 10;
    font-family: var(--font-display);
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: tooltipIn 0.2s ease both;
}

@keyframes tooltipIn {
    from { opacity: 0; transform: translateX(-50%) translateY(6px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Línea animada en la parte inferior de la card */
.skill-card-inner::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.skill-card:hover .skill-card-inner::after {
    transform: scaleX(1);
}

/* === ANIMACIÓN DE ENTRADA ESCALONADA === */
.skills-track .skill-card {
    opacity: 0;
    transform: translateY(20px);
    animation: cardIn 0.5s ease forwards;
}

.skills-track .skill-card:nth-child(1) { animation-delay: 0.05s; }
.skills-track .skill-card:nth-child(2) { animation-delay: 0.10s; }
.skills-track .skill-card:nth-child(3) { animation-delay: 0.15s; }
.skills-track .skill-card:nth-child(4) { animation-delay: 0.20s; }
.skills-track .skill-card:nth-child(5) { animation-delay: 0.25s; }
.skills-track .skill-card:nth-child(6) { animation-delay: 0.30s; }
.skills-track .skill-card:nth-child(7) { animation-delay: 0.35s; }
.skills-track .skill-card:nth-child(8) { animation-delay: 0.40s; }
.skills-track .skill-card:nth-child(9) { animation-delay: 0.45s; }
.skills-track .skill-card:nth-child(10) { animation-delay: 0.50s; }

@keyframes cardIn {
    to { opacity: 1; transform: translateY(0); }
}

/* Activar animación solo cuando la sección es visible */
.skills-track-wrapper:not(.animated) .skill-card {
    animation-play-state: paused;
}

.skills-track-wrapper.animated .skill-card {
    animation-play-state: running;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .skills-track {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 16px;
    }

    .skills-track::-webkit-scrollbar { display: none; }

    .skill-card {
        width: 110px;
    }
}



