:root {
    --font-title: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;
    --surface: rgba(255, 255, 255, 0.94);
    --text: #1c1c1f;
    --text-secondary: #6a6a70;
    --muted: rgba(255, 255, 255, 0.55);
    --focus: #ffffff;
    --shadow: 0 12px 40px rgba(12, 8, 20, 0.22);
}

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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-title);
    min-height: 100dvh;
    color: #fff;
    background: #07070a;
    overflow-x: hidden;
}

.bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-code {
    position: absolute;
    left: 50%;
    top: 8%;
    z-index: 2;
    transform: translateX(-50%);
    margin: 0;
    width: min(720px, 92vw);
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: clamp(12px, 1.6vw, 16px);
    line-height: 1.65;
    font-weight: 400;
    color: rgba(230, 230, 235, 0.4);
    white-space: pre;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.65) 62%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.65) 62%, transparent 100%);
}

#bg-code-source {
    display: none;
}

.bg-cursor {
    display: inline-block;
    color: rgba(255, 255, 255, 0.7);
    animation: blink 1.1s steps(1) infinite;
}

.bg-hue {
    position: absolute;
    inset: -28vmax;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 38% 31%, rgba(167, 139, 250, 0.52), transparent 27%),
        radial-gradient(circle at 67% 52%, rgba(180, 168, 245, 0.32), transparent 30%),
        radial-gradient(circle at 61% 70%, rgba(99, 80, 220, 0.34), transparent 34%),
        radial-gradient(circle at 22% 78%, rgba(129, 140, 248, 0.22), transparent 32%),
        radial-gradient(circle at 56% 59%, hsla(0, 0%, 100%, 0.07), transparent 24%);
    filter: blur(24px) hue-rotate(calc((var(--time-hue, 0) - 0.5) * 36deg));
    mix-blend-mode: screen;
    transform:
        translate3d(0, calc(var(--scroll-hue, 0) * -16vh), 0)
        rotate(calc(var(--scroll-hue, 0) * 20deg + var(--time-hue, 0) * 48deg))
        scale(1.12);
    will-change: transform, filter;
}

.bg-grain {
    position: fixed;
    inset: -12%;
    width: 124%;
    height: 124%;
    z-index: 50;
    pointer-events: none;
    opacity: 0.22;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 120px 120px;
    animation: grainShift 0.28s steps(5) infinite;
}

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

@keyframes grainShift {
    0% { transform: translate3d(0, 0, 0); }
    25% { transform: translate3d(-1.4%, 0.8%, 0); }
    50% { transform: translate3d(1.1%, -1.2%, 0); }
    75% { transform: translate3d(-0.6%, 1.4%, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

.page {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: clamp(40px, 8vh, 88px) 24px;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 36px;
}

.hero {
    text-align: center;
}

.hero-photo {
    display: block;
    width: 104px;
    height: 104px;
    object-fit: cover;
    object-position: center 18%;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    background: #000;
}

.hero-label {
    display: block;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.48);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 auto 12px;
    color: #fff;
    font-family: var(--font-title);
    font-size: clamp(36px, 7vw, 52px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.02;
}

.hero h1 strong {
    font-weight: 800;
}

.hero-roles {
    margin-bottom: 12px;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.72);
}

.hero-sub {
    max-width: 420px;
    margin: 0 auto;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.58);
    line-height: 1.6;
}

.links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 88px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 18px;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

a.link-card {
    cursor: pointer;
}

div.link-card {
    cursor: default;
}

a.link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(12, 8, 20, 0.28);
}

.link-card:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.link-logo {
    flex-shrink: 0;
    width: 96px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.03);
}

.link-logo img {
    max-width: 100%;
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.link-logo .generated-icon {
    width: 28px;
    height: 28px;
}

.link-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.link-name {
    font-family: var(--font-title);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}

.link-desc {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.45;
}

.link-action {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(30, 30, 34, 0.08);
    border-radius: 50%;
    color: #6a6a70;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.03);
    transition: color 0.2s ease, background 0.2s ease;
}

a.link-card:hover .link-action {
    color: #fff;
    background: #2b2b2f;
}

.skills h2,
.cursos h2 {
    font-family: var(--font-title);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.55);
}

.skill-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-card {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-card h3 {
    font-family: var(--font-title);
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #fff;
}

.skill-card p {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.62);
}

.cursos {
    padding: 18px 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cursos ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.86);
}

.whatsapp-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    transition: transform 0.25s ease, background 0.25s ease;
}

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

.whatsapp-card:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}

.whatsapp-icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.whatsapp-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.whatsapp-status {
    display: block;
    margin-bottom: 4px;
    font-family: var(--font-mono);
    color: rgba(255, 255, 255, 0.45);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.whatsapp-copy strong {
    font-family: var(--font-title);
    font-size: 16px;
    line-height: 1.2;
    font-weight: 700;
}

.whatsapp-copy small {
    margin-top: 3px;
    font-family: var(--font-mono);
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
}

.whatsapp-arrow {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.whatsapp-card:hover .whatsapp-arrow {
    background: rgba(255, 255, 255, 0.16);
}

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    font-size: 11px;
    color: var(--muted);
}

.footer span {
    color: rgba(255, 255, 255, 0.78);
    font-family: var(--font-title);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.footer p {
    margin: 0;
    font-family: var(--font-mono);
}

@media (max-width: 520px) {
    .page {
        padding: 32px 16px;
        gap: 28px;
        justify-content: flex-start;
    }

    .hero-photo {
        width: 88px;
        height: 88px;
    }

    .hero h1 {
        font-size: clamp(32px, 11vw, 44px);
    }

    .hero-sub,
    .hero-roles {
        font-size: 14px;
    }

    .link-card {
        gap: 12px;
        min-height: 82px;
        padding: 14px;
        border-radius: 16px;
    }

    .link-logo {
        width: 76px;
        height: 44px;
    }

    .link-name {
        font-size: 15px;
    }

    .link-action {
        width: 34px;
        height: 34px;
    }

    .whatsapp-card {
        padding: 14px;
        border-radius: 16px;
    }

    .whatsapp-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .whatsapp-copy strong {
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bg-hue,
    .bg-grain,
    .bg-cursor {
        animation: none;
        filter: blur(24px);
        transform: none;
    }
}
