/* ─── Theme Variables ──────────────────────────────────── */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background: hsl(222, 47%, 6%);
    color: hsl(210, 40%, 98%);
    overflow-x: hidden;
    transition: background 0.35s ease, color 0.35s ease;
}

/* ─── Light Mode ───────────────────────────────────────── */
body.light-mode {
    background: hsl(210, 40%, 97%);
    color: hsl(222, 47%, 11%);
}

body.light-mode nav {
    background: rgba(255, 255, 255, 0.88);
    border-bottom-color: rgba(203, 213, 225, 0.7);
}

body.light-mode .logo { color: hsl(222, 47%, 11%); }

body.light-mode .nav-links a {
    color: hsl(215, 20%, 40%);
}
body.light-mode .nav-links a:hover,
body.light-mode .nav-links a.active {
    color: hsl(222, 47%, 11%);
    background: hsl(210, 40%, 90%);
}

body.light-mode .btn-cv {
    color: hsl(222, 47%, 11%);
    border-color: hsl(215, 20%, 65%);
}
body.light-mode .btn-cv:hover {
    background: hsl(210, 40%, 90%);
}

body.light-mode .skill-card,
body.light-mode .stat-card {
    background: #fff;
    border-color: rgba(203, 213, 225, 0.7);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

body.light-mode .skill-name { color: hsl(222, 47%, 11%); }
body.light-mode .category-title { color: hsl(222, 47%, 11%); }
body.light-mode .stat-value { color: hsl(222, 47%, 11%); }
body.light-mode .section-title { color: hsl(222, 47%, 11%); }
body.light-mode .hero-name { color: hsl(215, 20%, 40%); }
body.light-mode .hero-description { color: hsl(215, 20%, 40%); }
body.light-mode .section-description { color: hsl(215, 20%, 40%); }
body.light-mode .stat-label { color: hsl(215, 20%, 40%); }
body.light-mode .skill-level { color: hsl(215, 20%, 40%); }
body.light-mode .category-description { color: hsl(215, 20%, 40%); }

body.light-mode .scroll-indicator { color: hsl(215, 20%, 40%); }
body.light-mode .social-links a { color: hsl(215, 20%, 40%); }

body.light-mode ::-webkit-scrollbar-track { background: hsl(210, 40%, 93%); }
body.light-mode ::-webkit-scrollbar-thumb { background: hsl(215, 20%, 65%); }

body.light-mode .progress-bar { background: hsl(210, 40%, 88%); }

body.light-mode .btn-primary {
    color: hsl(222, 47%, 11%);
    border-color: hsl(215, 20%, 55%);
}
body.light-mode .btn-primary:hover { background: hsl(210, 40%, 88%); }
body.light-mode .btn-secondary {
    background: hsl(222, 47%, 15%);
    color: #fff;
}

/* Theme toggle button */
nav button[aria-label="Toggle theme"] {
    background: transparent;
    border: none;
    cursor: pointer;
    color: hsl(215, 20%, 65%);
    padding: 0.4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.25s, background 0.25s;
}
nav button[aria-label="Toggle theme"]:hover {
    color: white;
    background: hsl(217, 33%, 17%);
}
body.light-mode nav button[aria-label="Toggle theme"] {
    color: hsl(222, 47%, 30%);
}
body.light-mode nav button[aria-label="Toggle theme"]:hover {
    color: hsl(222, 47%, 11%);
    background: hsl(210, 40%, 90%);
}

/* ── About Section (alta especificidad necesaria) ── */
body.light-mode section.about-section {
    background: hsl(210, 40%, 97%);
}
body.light-mode section.about-section .about-greeting {
    color: hsl(222, 47%, 13%);
}
body.light-mode section.about-section .about-text {
    color: hsl(222, 47%, 28%);
}
body.light-mode section.about-section .stat-number {
    color: hsl(222, 47%, 11%);
}
body.light-mode section.about-section .stat-text {
    color: hsl(215, 20%, 38%);
}
body.light-mode section.about-section .about-stat-item {
    background: hsl(210, 40%, 92%);
    border-color: hsl(213, 27%, 80%);
}
body.light-mode section.about-section .detail-item {
    color: hsl(222, 47%, 22%);
}
body.light-mode section.about-section .detail-icon {
    color: hsl(215, 30%, 40%);
}
body.light-mode section.about-section .hobbies-title {
    color: hsl(222, 47%, 18%);
}
body.light-mode section.about-section .hobby-item {
    background: hsl(210, 40%, 91%);
    border-color: hsl(213, 27%, 78%);
    color: hsl(222, 47%, 22%);
}
body.light-mode section.about-section .about-details {
    border-top-color: hsl(213, 27%, 82%);
    border-bottom-color: hsl(213, 27%, 82%);
}
body.light-mode section.about-section .image-border {
    border-color: hsl(215, 30%, 60%);
}

/* ── Gradient text: títulos de sección ── */
body.light-mode .gradient-text {
    background: linear-gradient(90deg, hsl(222, 47%, 15%) 0%, hsl(215, 50%, 40%) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Typing text en hero ── */
body.light-mode .typing-text {
    background: linear-gradient(90deg, hsl(222, 47%, 15%) 0%, hsl(215, 50%, 40%) 50%, hsl(222, 47%, 30%) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Projects Section ── */
body.light-mode .projects-section { background: hsl(210, 40%, 97%); }
body.light-mode .project-card {
    background: #fff;
    border-color: rgba(203, 213, 225, 0.8);
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}
body.light-mode .project-title { color: hsl(222, 47%, 11%); }
body.light-mode .project-desc { color: hsl(215, 20%, 35%); }
body.light-mode .tag {
    background: hsl(210, 40%, 92%);
    color: hsl(222, 47%, 25%);
    border-color: hsl(213, 27%, 80%);
}
body.light-mode .project-btn {
    background: hsl(222, 47%, 15%);
    color: #fff;
}
body.light-mode .project-placeholder { background: hsl(210, 40%, 93%); color: hsl(215, 20%, 55%); }

/* ── Certificates Section ── */
body.light-mode .certificates-section { background: hsl(210, 40%, 94%); }
body.light-mode .cert-card, body.light-mode .certificate-card {
    background: #fff;
    border-color: rgba(203,213,225,0.8);
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}
body.light-mode .cert-title, body.light-mode .certificate-title { color: hsl(222, 47%, 11%); }
body.light-mode .cert-issuer, body.light-mode .certificate-issuer { color: hsl(215, 20%, 35%); }
body.light-mode .cert-date, body.light-mode .certificate-date { color: hsl(215, 20%, 50%); }
body.light-mode .cert-badge { background: hsl(210, 40%, 92%); color: hsl(222, 47%, 25%); }

/* ── Contact Section ── */
body.light-mode .contact-section { background: hsl(210, 40%, 97%); }
body.light-mode .contact-card, body.light-mode .contact-info {
    background: #fff;
    border-color: rgba(203,213,225,0.8);
}
body.light-mode .contact-label { color: hsl(215, 20%, 40%); }
body.light-mode .contact-value { color: hsl(222, 47%, 15%); }
body.light-mode .contact-form input,
body.light-mode .contact-form textarea,
body.light-mode input[type="text"],
body.light-mode input[type="email"],
body.light-mode textarea {
    background: hsl(210, 40%, 96%);
    color: hsl(222, 47%, 11%);
    border-color: hsl(213, 27%, 80%);
}

/* ── Footer ── */
body.light-mode footer {
    background: hsl(210, 40%, 92%);
    color: hsl(222, 47%, 25%);
    border-top-color: hsl(213, 27%, 82%);
}
body.light-mode footer a { color: hsl(215, 50%, 40%); }

html {
    scroll-behavior: smooth;
}



/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: hsl(222, 47%, 6%);
}

::-webkit-scrollbar-thumb {
    background: hsl(217, 33%, 17%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsl(217, 33%, 25%);
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(14, 20, 30, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.nav-container {
    max-width: 1152px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.nav-links {
    display: none;
    gap: 0.25rem;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-links a {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    color: hsl(215, 20%, 65%);
    text-decoration: none;
    transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
    background: hsl(217, 33%, 17%);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-cv {
    display: none;
    padding: 0.5rem 1rem;
    border: 1px solid hsl(217, 33%, 17%);
    border-radius: 9999px;
    font-size: 0.875rem;
    color: white;
    text-decoration: none;
    transition: background 0.3s;
}

@media (min-width: 768px) {
    .btn-cv {
        display: inline-flex;
    }
}

.btn-cv:hover {
    background: hsl(217, 33%, 17%);
}

/* Translate button */
.btn-translate {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(108, 99, 255, 0.4);
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    background: rgba(108, 99, 255, 0.12);
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s, transform 0.2s;
    letter-spacing: 0.03em;
}

.btn-translate:hover {
    background: rgba(108, 99, 255, 0.28);
    border-color: rgba(108, 99, 255, 0.7);
    transform: scale(1.05);
}

.btn-translate.active {
    background: #6c63ff;
    border-color: #6c63ff;
}


/* Partículas */
#particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(148, 163, 184, 0.8) 0%, rgba(148, 163, 184, 0.2) 70%, transparent 100%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(148, 163, 184, 0.3);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-20px) translateX(10px);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-10px) translateX(-5px);
        opacity: 0.4;
    }
    75% {
        transform: translateY(-30px) translateX(5px);
        opacity: 0.5;
    }
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 1rem 8rem;
    text-align: center;
}

.profile-image {
    position: relative;
    width: 7rem;
    height: 7rem;
    margin: 0 auto 2rem;
}

.profile-image-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(to bottom right, hsl(215, 16%, 47%), hsl(215, 25%, 27%));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid rgba(71, 85, 105, 0.5);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(100, 116, 139, 0.2);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

.hero-name {
    font-size: 1.125rem;
    color: hsl(215, 20%, 65%);
    letter-spacing: 0.05em;
    margin-bottom: 0rem;
    text-transform: uppercase;
}

@media (min-width: 768px) {
    .hero-name {
        font-size: 1.25rem;
    }
}

/* Typing Container */
.typing-container {
    min-height: 4rem;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0rem;
    width: 100%;
    max-width: 90vw;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .typing-container {
        min-height: 5rem;
    }
}

.typing-text {
    font-size: 1.875rem;
    font-weight: bold;
    background: linear-gradient(90deg, #e2e8f0 0%, #0ea5e9 50%, #64748b 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    white-space: nowrap;
    animation: gradientFlow 4s ease infinite;
}

@media (min-width: 768px) {
    .typing-text {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .typing-text {
        white-space: normal !important;
        word-wrap: break-word;
        text-align: center;
        max-width: 90vw;
        line-height: 1.3;
        font-size: 1.6rem !important;
    }
    
    .typing-container {
        max-width: 95vw;
        min-height: 5rem;
        margin-bottom: 0rem;
    }
}

@media (max-width: 480px) {
    .typing-text {
        font-size: 1.3rem !important;
    }
    
    .typing-container {
        min-height: 4.5rem;
        margin-bottom: 0rem;
    }
}

.typing-cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes gradientFlow {
    0% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
    100% {
        background-position: 0% center;
    }
}

.hero-description {
    font-size: 0.875rem;
    color: hsl(215, 20%, 65%);
    max-width: 36rem;
    margin: 0 auto 2rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    line-height: 1.625;
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .hero-description {
        font-size: 1rem;
    }
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
    }
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: transparent;
    border: 1px solid hsl(215, 20%, 45%);
    color: white;
}

.btn-primary:hover {
    background: hsl(215, 25%, 27%);
}

.btn-secondary {
    background: white;
    color: hsl(222, 47%, 11%);
}

.btn-secondary:hover {
    background: hsl(210, 40%, 96%);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-links a {
    padding: 0.5rem;
    color: hsl(215, 20%, 65%);
    transition: all 0.3s ease;
    border-radius: 50%;
}

.social-links a:hover {
    color: white;
    background: rgba(100, 116, 139, 0.2);
    transform: translateY(-3px);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: hsl(215, 20%, 65%);
}

.scroll-indicator span {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.chevron {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-0.5rem);
    }
}

/* Skills Section */
.skills-section {
    padding: 5rem 1rem;
}

.skills-container {
    max-width: 1152px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 1.875rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.25rem;
    }
}

.gradient-text {
    background: linear-gradient(90deg, #ffffff 0%, #64748b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    color: hsl(215, 20%, 65%);
    max-width: 42rem;
    margin: 0 auto;
}

.category {
    margin-bottom: 4rem;
}

.category-header {
    margin-bottom: 1.5rem;
}

.category-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .category-title {
        font-size: 1.5rem;
    }
}

.category-description {
    color: hsl(215, 20%, 65%);
    font-size: 0.875rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .skills-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.skill-card {
    position: relative;
    background: hsl(222, 47%, 8%);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 0.75rem;
    padding: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.skill-card:hover {
    border-color: hsl(215, 20%, 45%);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

.skill-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 10;
}

.skill-icon {
    width: 3rem;
    height: 3rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.skill-icon img {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
}

.skill-name {
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 0.25rem;
    background: hsl(215, 25%, 27%);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    border-radius: 9999px;
    transition: all 0.6s ease-in-out;
}

.level-beginner { background: hsl(215, 20%, 45%); width: 25%; }
.level-intermediate { background: hsl(217, 91%, 60%); width: 50%; }
.level-advanced { background: hsl(160, 84%, 39%); width: 75%; }
.level-expert { background: hsl(43, 96%, 56%); width: 95%; }

.skill-level {
    font-size: 0.75rem;
    color: hsl(215, 20%, 65%);
}

/* Stats */
.stats-grid {
    margin-top: 5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    position: relative;
    background: hsl(222, 47%, 8%);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.stat-card:hover {
    border-color: hsl(215, 20%, 45%);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
}

.stat-value {
    font-size: 1.875rem;
    font-weight: bold;
    color: white;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 10;
}

@media (min-width: 768px) {
    .stat-value {
        font-size: 2.25rem;
    }
}

.stat-label {
    font-size: 0.875rem;
    color: hsl(215, 20%, 65%);
    position: relative;
    z-index: 10;
}

.icon-svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Animaciones de Hover */
.skill-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 0.75rem;
    background: rgba(100, 116, 139, 0.05);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

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

.skill-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 0.75rem;
    border: 2px solid rgba(100, 116, 139, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.skill-card:hover::after {
    opacity: 1;
}

.skill-card:hover .skill-icon {
    transform: scale(1.1);
}

.skill-card:hover .progress-fill {
    animation: progressPulse 1.5s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(100, 116, 139, 0.05);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 2px solid rgba(100, 116, 139, 0.5);
    border-radius: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.stat-card:hover::after {
    opacity: 1;
}

/* Responsive Design */
.hero h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.2;
    word-wrap: break-word;
}

.hero-description {
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    max-width: 100%;
    padding: 0 1rem;
}

@media only screen and (max-width: 768px) {
    .hero {
        padding: 60px 20px;
        min-height: auto;
    }
    
    .hero h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 1rem;
        line-height: 1.6;
        margin: 1.5rem auto;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        padding: 0 20px;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        text-align: center;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media only screen and (max-width: 480px) {
    .hero {
        padding: 40px 15px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
        padding: 0 10px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .skill-card {
        margin: 0 10px;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 10px;
    }
}

img, video {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================ */
/* ABOUT ME SECTION - SELECTORES ESPECÍFICOS */
/* ============================================ */

section.about-section {
    padding: 5rem 1rem;
    background: rgba(29, 41, 61, 0.3);
}

section.about-section .about-container {
    max-width: 1152px;
    margin: 0 auto;
}

section.about-section .about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

@media (min-width: 1024px) {
    section.about-section .about-content {
        grid-template-columns: 400px 1fr;
        gap: 4rem;
    }
}

section.about-section .about-image-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

section.about-section .about-image-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

section.about-section .about-image {
    width: 100%;
    height: 500px;
    border-radius: 1rem;
    display: block;
    position: relative;
    z-index: 10;
    object-fit: cover;
    object-position: center;
}

section.about-section .image-border {
    position: absolute;
    top: 15px;
    left: 15px;
    right: -15px;
    bottom: -15px;
    border: 2px solid hsl(215, 20%, 45%);
    border-radius: 1rem;
    z-index: 1;
}

section.about-section .about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

section.about-section .about-stat-item {
    background: rgba(15, 23, 43, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

section.about-section .about-stat-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

section.about-section .stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: white;
    margin-bottom: 0.5rem;
}

section.about-section .stat-text {
    font-size: 0.875rem;
    color: hsl(215, 20%, 65%);
}

section.about-section .about-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

section.about-section .about-greeting {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    line-height: 1.6;
}

section.about-section .about-text {
    color: hsl(215, 20%, 65%);
    line-height: 1.8;
    font-size: 1rem;
}

section.about-section .about-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

section.about-section .detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: hsl(215, 20%, 65%);
}

section.about-section .detail-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: hsl(215, 20%, 45%);
}

section.about-section .hobbies-title {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
}

section.about-section .hobbies-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

section.about-section .hobby-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(100, 116, 139, 0.1);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 9999px;
    color: hsl(215, 20%, 65%);
    font-size: 0.875rem;
}

section.about-section .hobby-icon {
    width: 1rem;
    height: 1rem;
}

section.about-section .btn-download-cv {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    color: hsl(222, 47%, 11%);
    border: none;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    width: fit-content;
}

section.about-section .btn-download-cv:hover {
    background: hsl(210, 40%, 96%);
    transform: translateY(-2px);
}

section.about-section .download-icon {
    width: 1.25rem;
    height: 1.25rem;
}

@media (max-width: 768px) {
    section.about-section .about-image {
        height: 400px;
    }
    
    section.about-section .about-greeting {
        font-size: 1.1rem;
    }
    
    section.about-section .about-text {
        font-size: 0.95rem;
    }
    
    section.about-section .about-details {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    section.about-section .about-image {
        height: 350px;
    }
}

/* ===========================
   Certificates Section
   =========================== */

.certificates-section {
    padding: 5rem 1rem;
}

.certificates-container {
    max-width: 1152px;
    margin: 0 auto;
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .certificates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .certificates-grid {
        grid-template-columns: 1fr;
    }
}

/* Card */
.cert-card {
    background: #1a1a2e;
    border: 1px solid rgba(108, 99, 255, 0.2);
    border-radius: 0.875rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.25rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.cert-card:hover {
    transform: translateY(-6px);
    border-color: rgba(108, 99, 255, 0.55);
    box-shadow: 0 16px 40px -10px rgba(108, 99, 255, 0.25);
}

.cert-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

/* Title */
.cert-title {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.4;
    margin: 0;
}

/* Badge */
.cert-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #00e676;
    font-size: 0.82rem;
    font-weight: 600;
}

.cert-check-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    color: #00e676;
}

/* Date */
.cert-date {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #00e676;
    font-size: 0.82rem;
}

.cert-cal-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    color: #00e676;
}

/* Download button */
.cert-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #6c63ff;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.65rem 1.1rem;
    border-radius: 0.5rem;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    letter-spacing: 0.01em;
}

.cert-btn:hover {
    background: #7b74ff;
    box-shadow: 0 6px 20px -4px rgba(108, 99, 255, 0.55);
    transform: translateY(-2px);
}

.cert-btn:active {
    transform: translateY(0);
}

.cert-dl-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

/* ===========================
   Certificate Modal Viewer
   =========================== */

.cert-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cert-modal--open {
    pointer-events: all;
    opacity: 1;
}

.cert-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    cursor: pointer;
}

.cert-modal-box {
    position: relative;
    z-index: 1;
    background: #0f0f1a;
    border: 1px solid rgba(108, 99, 255, 0.35);
    border-radius: 1rem;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 80px -10px rgba(0, 0, 0, 0.7);
    transform: translateY(30px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cert-modal--open .cert-modal-box {
    transform: translateY(0) scale(1);
}

.cert-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(108, 99, 255, 0.2);
    flex-shrink: 0;
}

.cert-modal-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 3rem);
}

.cert-modal-close {
    background: rgba(108, 99, 255, 0.15);
    border: 1px solid rgba(108, 99, 255, 0.3);
    border-radius: 0.5rem;
    color: #ffffff;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.2s;
}

.cert-modal-close:hover {
    background: rgba(108, 99, 255, 0.35);
    transform: scale(1.1);
}

.cert-modal-close svg {
    width: 1rem;
    height: 1rem;
}

.cert-modal-content {
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a14;
    min-height: 300px;
}

.cert-modal-iframe {
    width: 100%;
    height: 75vh;
    border: none;
    display: block;
}

.cert-modal-img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    display: block;
}

/* ===========================
   Projects Section
   =========================== */

.projects-section {
    padding: 5rem 1rem;
}

.projects-container {
    max-width: 1152px;
    margin: 0 auto;
}

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

@media (max-width: 1024px) {
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .projects-grid { grid-template-columns: 1fr; }
}

/* Card */
.project-card {
    background: #1a1a2e;
    border: 1px solid rgba(108, 99, 255, 0.2);
    border-radius: 0.875rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(108, 99, 255, 0.55);
    box-shadow: 0 16px 40px -10px rgba(108, 99, 255, 0.25);
}

/* Preview image area */
.project-preview {
    position: relative;
    width: 100%;
    height: 185px;
    background: #0f0f1a;
    overflow: hidden;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.project-card:hover .project-img {
    transform: scale(1.04);
}

/* Placeholder shown when image fails or before screenshot is added */
.project-placeholder {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: rgba(108, 99, 255, 0.4);
    font-size: 0.75rem;
    pointer-events: none;
}

.project-placeholder i {
    font-size: 2.5rem;
    opacity: 0.35;
}

/* Show placeholder when .no-img is set by onerror */
.project-preview.no-img .project-img { display: none; }
.project-preview.no-img .project-placeholder { display: flex; }

/* Hover overlay */
.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(108, 99, 255, 0.82);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay { opacity: 1; }

.project-overlay i { font-size: 1.5rem; }

/* Info block */
.project-info {
    padding: 1.25rem 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    flex: 1;
}

.project-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.35;
}

.project-desc {
    font-size: 0.8rem;
    color: hsl(215, 20%, 65%);
    line-height: 1.55;
    margin: 0;
    flex: 1;
}

/* Tech tags */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    background: rgba(108, 99, 255, 0.15);
    border: 1px solid rgba(108, 99, 255, 0.3);
    color: #a89eff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
}

/* Button */
.project-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #6c63ff;
    color: #fff;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
    width: fit-content;
    margin-top: auto;
}

.project-btn:hover {
    background: #7b74ff;
    box-shadow: 0 6px 20px -4px rgba(108, 99, 255, 0.55);
    transform: translateY(-2px);
}



