* {
    box-sizing: border-box;
}

:root {
    --surface: #f8f9ff;
    --background: #f8fbff;
    --primary: #000000;
    --secondary: #4648d4;
    --accent: #acedff;
    --accent-2: #c0c1ff;
    --text: #0b1c30;
    --muted: #45464d;
    --border: #c6c6cd;
    --card-border: #d7e0ef;
    --dark-panel: #131b2e;
    --dark-card: #1b2334;
    --dark-text: #eaf1ff;
    --shadow: 0 20px 50px rgba(19, 27, 46, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(70, 72, 212, 0.08), transparent 28%),
        radial-gradient(circle at 85% 15%, rgba(172, 237, 255, 0.18), transparent 25%),
        linear-gradient(180deg, #fbfcff 0%, #f3f7ff 100%);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(248, 249, 255, 0.82);
    border-bottom: 1px solid rgba(198, 198, 205, 0.65);
    backdrop-filter: blur(14px);
}

.topbar-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--secondary);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(70, 72, 212, 0.28);
}

.brand-kicker {
    margin: 0;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.72rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #6473a8;
}

.brand-block h1 {
    margin: 4px 0 0;
    font-size: 1.08rem;
    line-height: 1.1;
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.86rem;
}

.nav-links a {
    color: #5a5d77;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

.resume-button {
    min-height: 40px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--secondary);
    color: #ffffff;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(70, 72, 212, 0.24);
}

main {
    max-width: 1120px;
    margin: 0 auto;
    padding: 54px 20px 64px;
}

.hero-section,
.content-section {
    scroll-margin-top: 104px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 360px);
    gap: 24px;
    align-items: center;
}

.hero-copy {
    padding: 14px 0;
}

.eyebrow,
.section-index,
.timeline-date {
    margin: 0;
    font-family: "JetBrains Mono", monospace;
    color: var(--secondary);
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy h2 {
    margin: 14px 0 0;
    font-size: clamp(2.4rem, 4.5vw, 4rem);
    line-height: 1.06;
    letter-spacing: -0.03em;
    color: var(--primary);
    max-width: 11ch;
}

.summary {
    margin: 18px 0 0;
    max-width: 58ch;
    font-size: 1rem;
    line-height: 1.8;
    text-align: justify ;
    color: #5b6479;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.action-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 14px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.action-link:hover,
.resume-button:hover {
    transform: translateY(-1px);
}

.action-whatsapp {
    background: #25d366;
    color: #ffffff;
    box-shadow: 0 12px 22px rgba(37, 211, 102, 0.22);
}

.action-linkedin {
    background: #0a66c2;
    color: #ffffff;
    box-shadow: 0 12px 22px rgba(10, 102, 194, 0.2);
}

.material-symbols-outlined {
    font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
    font-size: 18px;
}

.hero-photo-card {
    position: relative;
    display: grid;
    place-items: center;
    animation: photoFloat 7s ease-in-out infinite;
}

.hero-glow {
    position: absolute;
    inset: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(70, 72, 212, 0.18), transparent 62%);
    filter: blur(24px);
    animation: glowPulse 5s ease-in-out infinite;
}

.hero-photo {
    position: relative;
    width: min(100%, 340px);
    aspect-ratio: 1 / 1.05;
    padding: 12px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid var(--card-border);
    transform: rotate(2deg);
    box-shadow: 0 18px 40px rgba(19, 27, 46, 0.1);
    animation: photoCardTilt 7s ease-in-out infinite;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    filter: none;
    transition: transform 0.6s ease, filter 0.6s ease;
}

.hero-photo:hover img {
    transform: scale(1.03);
}

.content-section {
    margin-top: 24px;
}

.section-card,
.project-card,
.tech-card {
    border-radius: 18px;
    border: 1px solid var(--card-border);
}

.section-stack {
    margin-bottom: 16px;
}

.section-lead {
    margin: 8px 0 0;
    max-width: 48ch;
    color: #6b7280;
    line-height: 1.6;
}

.section-card {
    padding: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.profile-card {
    background: linear-gradient(180deg, #ffffff, #f7f9ff);
}

.contact-card {
    background: linear-gradient(180deg, #ffffff, #f7f9ff);
}

.skills-summary-card {
    background: linear-gradient(180deg, #ffffff, #fbfcff);
}

.split-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.section-heading,
.section-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: end;
    margin-bottom: 16px;
}

.section-heading--compact {
    margin-bottom: 12px;
}

.section-heading h3,
.section-header h3 {
    margin: 6px 0 0;
    font-size: 1.5rem;
    line-height: 1.15;
    color: var(--primary);
}

.section-header p {
    margin: 0;
    max-width: 46ch;
    color: #6b7280;
    line-height: 1.6;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 14px;
}

.contact-list li {
    display: grid;
    gap: 4px;
}

.contact-list span {
    font-family: "JetBrains Mono", monospace;
    color: #6473a8;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.contact-list strong {
    color: var(--primary);
    font-size: 0.98rem;
    line-height: 1.55;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.contact-links a,
.chip-cloud span,
.tag-row span,
.hero-tags span {
    border-radius: 999px;
    padding: 10px 14px;
    background: #eef2ff;
    color: #4b5c9b;
    border: 1px solid rgba(70, 72, 212, 0.12);
    font-size: 0.9rem;
    font-weight: 600;
}

.chip-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skills-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.skills-feature-card {
    padding: 30px;
    background: linear-gradient(180deg, #fbfcff 0%, #f4f7ff 100%);
    border: 1px solid #e7ecf8;
    box-shadow: 0 24px 60px rgba(19, 27, 46, 0.08);
}

.skills-header {
    align-items: center;
}

.skills-header .section-lead {
    margin-top: 10px;
}

.skills-ornament {
    width: 84px;
    height: 84px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #f1f5ff, #e7edff);
    color: #3b5bfd;
    box-shadow: inset 0 0 0 1px rgba(59, 91, 253, 0.08);
    flex: 0 0 auto;
}

.skills-ornament .material-symbols-outlined {
    font-size: 38px;
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.skill-feature {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid #e4eaf7;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 26px rgba(19, 27, 46, 0.05);
}

.skill-icon {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: #eff3ff;
    color: #3b5bfd;
    box-shadow: inset 0 0 0 1px rgba(59, 91, 253, 0.1);
}

.skill-icon .material-symbols-outlined {
    font-size: 32px;
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.skill-copy {
    padding-left: 14px;
    border-left: 2px solid #d7e0ff;
    min-width: 0;
}

.skill-copy h4 {
    margin: 0;
    color: #172033;
    font-size: 1rem;
    line-height: 1.25;
}

.skill-copy p {
    margin: 4px 0 0;
    color: #62708a;
    line-height: 1.45;
}

.skills-list {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 12px;
    color: #4f5d74;
    line-height: 1.65;
}

.skills-list li {
    padding-left: 4px;
}

.timeline {
    position: relative;
    margin-top: 14px;
    padding-left: 30px;
    display: grid;
    gap: 22px;
    border-left: 2px solid #dce4f3;
}

.timeline-item {
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: -39px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--secondary);
    box-shadow: 0 0 0 6px rgba(70, 72, 212, 0.12);
}

.timeline-dot.muted {
    background: #c8d0df;
    box-shadow: 0 0 0 6px rgba(200, 208, 223, 0.18);
}

.timeline-item h4 {
    margin: 8px 0 8px;
    font-size: 1.1rem;
    color: var(--primary);
}

.timeline-item p {
    margin: 0;
    color: #6a7386;
    line-height: 1.7;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.project-card {
    overflow: hidden;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.project-visual {
    position: relative;
    height: 210px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 18px;
    overflow: hidden;
}

.project-visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: transform 0.5s ease;
}

.project-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2,6,23,0.10), rgba(2,6,23,0.10));
    z-index: 1;
}

.project-visual span {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    color: #172033;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: none;
    border: 1px solid rgba(23, 32, 51, 0.06);
    box-shadow: 0 8px 20px rgba(19, 27, 46, 0.06);
}

.project-visual:hover img {
    transform: scale(1.06);
}

.project-iot {
    background-image: linear-gradient(135deg, rgba(10, 17, 28, 0.18), rgba(10, 17, 28, 0.26)), linear-gradient(120deg, #7ab56a, #d6ead0 40%, #8dc6de 76%, #265c7a);
}

.project-web {
    background-image: linear-gradient(135deg, rgba(10, 17, 28, 0.2), rgba(10, 17, 28, 0.34)), linear-gradient(120deg, #16263c, #18314d 40%, #243f60 78%, #10141d);
}

.project-mobile {
    background-image: linear-gradient(135deg, rgba(70, 72, 212, 0.1), rgba(70, 72, 212, 0.03)), linear-gradient(120deg, #f3f5fb, #dce9f8 40%, #fef7ea 78%, #e5eef9);
}

.project-data {
    background-image: linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(15, 118, 110, 0.06)), linear-gradient(120deg, #0f172a, #18304a 42%, #12384c 78%, #0f172a);
}

.project-body {
    padding: 18px;
}

.project-body h4 {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 1.05rem;
}

.project-body p {
    margin: 0;
    color: #6a7386;
    line-height: 1.7;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span {
    padding: 7px 10px;
    background: #f5f7ff;
    color: #51609b;
    font-size: 0.78rem;
}

.tech-section {
    background: linear-gradient(180deg, var(--dark-panel), #111827);
    color: var(--dark-text);
    box-shadow: 0 24px 55px rgba(10, 14, 22, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 24px;
}

.light .section-index,
.light h3,
.light p,
.tech-section .section-index,
.tech-section h3,
.tech-section p {
    color: var(--dark-text);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    padding: 4px 0 2px;
}

.tech-card {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 18px 14px;
    background: #1a2230;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.tech-card img {
    width: 42px;
    height: 42px;
    padding: 6px;
    border-radius: 12px;
    background: #ffffff;
    object-fit: contain;
}

.tech-wordmark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #ffffff;
    color: #1f2937;
    font-family: "JetBrains Mono", monospace;
    font-weight: 800;
}

.tech-card span {
    color: #eaf1ff;
    font-size: 0.9rem;
    font-weight: 600;
}

.tech-python { border-top: 3px solid #3776ab; }
.tech-js { border-top: 3px solid #f7df1e; }
.tech-mysql { border-top: 3px solid #4479a1; }
.tech-django { border-top: 3px solid #092e20; }
.tech-flask { border-top: 3px solid #ffffff; }
.tech-mongo { border-top: 3px solid #47a248; }
.tech-github { border-top: 3px solid #8b949e; }
.tech-html { border-top: 3px solid #e34f26; }
.tech-css { border-top: 3px solid #1572b6; }
.tech-bootstrap { border-top: 3px solid #7952b3; }
.tech-flutter { border-top: 3px solid #02569b; }
.tech-arduino { border-top: 3px solid #00979d; }
.tech-aws { border-top: 3px solid #ff9900; }
.tech-unity { border-top: 3px solid #ffffff; }
.tech-android { border-top: 3px solid #3ddc84; }
.tech-ubuntu { border-top: 3px solid #e95420; }
.tech-kali { border-top: 3px solid #557c94; }
.tech-pentaho { border-top: 3px solid #f59e0b; }

.site-footer {
    width: 100%;
    background: #0f1724;
    color: #eaf1ff;
    margin-top: 24px;
    padding: 28px 0;
}

.footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.footer-brand h3 {
    margin: 6px 0 6px;
    font-size: 1.4rem;
    color: #ffffff;
}

.footer-brand p,
.footer-rights p {
    margin: 0;
    color: rgba(234, 241, 255, 0.78);
    line-height: 1.6;
}

.footer-kicker {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.76rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #9fb0ff;
}

.footer-contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.footer-contact a {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transition: transform 0.2s ease, background 0.2s ease;
}

.footer-contact a:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.14);
}

.footer-rights {
    padding: 14px 4px 0;
    text-align: center;
}

@keyframes photoFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes photoCardTilt {
    0%,
    100% {
        transform: rotate(2deg) translateY(0);
    }

    50% {
        transform: rotate(0deg) translateY(-4px);
    }
}

@keyframes glowPulse {
    0%,
    100% {
        opacity: 0.75;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@media (max-width: 1120px) {
    .hero-grid,
    .split-grid,
    .project-grid,
    .tech-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .topbar-inner {
        display: grid;
        justify-items: start;
    }

    .nav-links {
        flex-wrap: wrap;
    }
}

@media (max-width: 760px) {
    .topbar-inner,
    main {
        padding-left: 14px;
        padding-right: 14px;
    }

    .topbar-inner {
        gap: 14px;
    }

    .hero-grid,
    .split-grid,
    .project-grid,
    .tech-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy h2 {
        max-width: none;
        font-size: 2.2rem;
    }

    .section-heading,
    .section-header {
        flex-direction: column;
        align-items: start;
    }

    .tech-section {
        border-radius: 20px;
        padding: 18px;
    }

    .project-visual {
        height: 180px;
    }

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

    .skills-feature-card {
        padding: 20px;
    }

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

    .skill-feature {
        align-items: flex-start;
    }

    .skills-ornament {
        display: none;
    }

    .nav-links {
        gap: 12px;
        overflow-x: auto;
        width: 100%;
        padding-bottom: 2px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-contact {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .topbar-inner {
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .resume-button,
    .action-link {
        width: 100%;
        justify-content: center;
    }

    .hero-actions,
    .contact-links,
    .chip-cloud,
    .tag-row {
        width: 100%;
    }

    .contact-links a,
    .chip-cloud span,
    .tag-row span {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

/* contactos horizontales bajo la foto/perfil */
.contact-list--horizontal {
    display: flex;
    gap: 22px;
    align-items: center;
    flex-wrap: wrap;
}

.contact-list--horizontal li {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 160px;
}

@media (max-width: 760px) {
    .contact-list--horizontal {
        justify-content: flex-start;
    }
    .contact-list--horizontal li {
        min-width: 100%;
    }
}