:root {
    --ink: #03080f;
    --deep: #060e1c;
    --navy: #0a1628;
    --surface: #0e1e34;
    --surface2: #142540;
    --teal: #1be4c8;
    --teal-dim: rgba(27, 228, 200, 0.1);
    --teal-glow: rgba(27, 228, 200, 0.05);
    --water: #a8d8ea;
    --gold: #d4a853;
    --white: #f0f4f8;
    --mist: #7a90a4;
    --mist2: #3d5166;
    --border: rgba(168, 216, 234, 0.07);
}

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

/* Scroll suave apenas onde suportado sem jank (iOS-safe) */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

::selection {
    background: var(--teal);
    color: var(--ink);
}

body {
    background: var(--ink);
    color: var(--white);
    font-family: "DM Mono", monospace;
    overflow-x: hidden;
    cursor: none;
}

/* No mobile, cursor padrão do sistema (custom cursor não faz sentido em touch) */
@media (max-width: 900px) {
    body {
        cursor: auto;
    }

    .cursor,
    .cursor-ring {
        display: none !important;
    }
}

/* ── IFRAME PLACEHOLDER (click-to-load) ── */
.iframe-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--surface2);
    cursor: pointer;
    transition: background 0.25s;
    gap: 4px;
    user-select: none;
    border: 1px dashed rgba(27, 228, 200, 0.2);
}

.iframe-placeholder:hover {
    background: var(--surface);
    border-color: var(--teal);
}

.iframe-placeholder span {
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    color: var(--mist);
    text-transform: uppercase;
    text-align: center;
}

.figma-placeholder {
    height: 300px;
    border-radius: 4px;
    border: 1px dashed rgba(27, 228, 200, 0.2);
}

/* ── PRELOADER ── */
#global-loader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: var(--ink);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease, transform 0.8s cubic-bezier(0.8, 0, 0.2, 1);
}

#global-loader.hide {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.05);
    /* Slight scale up when hiding */
    pointer-events: none;
}

.gl-hex {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.gl-hex .hex-svg {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: rotateHex 8s linear infinite;
}

.gl-hex .hex-svg polygon {
    fill: none;
    stroke: var(--teal);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 40 100;
    animation: drawHex 2s linear infinite;
}

.gl-core {
    width: 12px;
    height: 12px;
    background: var(--teal);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--teal);
    animation: pulseCore 1s ease-in-out infinite alternate;
}

.gl-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.gl-title {
    font-family: "Bebas Neue", sans-serif;
    font-size: 1.6rem;
    letter-spacing: 0.15em;
    color: var(--white);
    line-height: 1;
}

.gl-subtitle {
    font-family: "DM Mono", monospace;
    font-size: 0.5rem;
    letter-spacing: 0.15em;
    color: var(--mist);
    text-transform: uppercase;
    animation: textFlicker 2s infinite;
}

.gl-progress-bar {
    width: 160px;
    height: 1px;
    background: var(--surface2);
    margin-top: 16px;
    position: relative;
    overflow: hidden;
}

.gl-progress-bar::after {
    content: '';
    position: absolute;
    left: -30%;
    top: 0;
    height: 100%;
    width: 30%;
    background: var(--gold);
    animation: scrollProgress 1.4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
    box-shadow: 0 0 8px var(--gold);
}

@keyframes rotateHex {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes drawHex {
    0% {
        stroke-dashoffset: 0;
    }

    100% {
        stroke-dashoffset: -140;
    }
}

@keyframes pulseCore {
    0% {
        transform: scale(0.5);
        opacity: 0.4;
    }

    100% {
        transform: scale(1.1);
        opacity: 1;
    }
}

@keyframes scrollProgress {
    0% {
        left: -30%;
        width: 30%;
    }

    50% {
        width: 50%;
    }

    100% {
        left: 100%;
        width: 30%;
    }
}

@keyframes textFlicker {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* CURSOR */
.cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--teal);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition:
        transform 0.1s,
        background 0.2s;
}

.cursor-ring {
    position: fixed;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(27, 228, 200, 0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition:
        transform 0.15s ease,
        width 0.2s,
        height 0.2s;
}

/* CANVAS */
#bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.3;
}

/* NAV */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom,
            rgba(3, 8, 15, 0.95),
            transparent);
    backdrop-filter: blur(2px);
}

.nav-logo {
    font-family: "Bebas Neue", sans-serif;
    font-size: 1.4rem;
    letter-spacing: 0.1em;
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo .na {
    color: var(--teal);
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-size: 0.55rem;
    letter-spacing: 0.3em;
    color: var(--mist);
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--teal);
}

/* SECTIONS */
section {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ── HERO ── */
#hero {
    padding: 120px 48px 80px;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

#globe-container {
    position: absolute;
    top: 50%;
    right: 10%;
    width: 650px;
    height: 650px;
    max-width: 60vw;
    z-index: 0;
    transform: translateY(-50%);
    pointer-events: none;
    /* Impede que o globo interfira com elementos de tela */
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    pointer-events: none;
    text-shadow: 0 0 50px rgba(3, 8, 15, 1);
}

.hero-content>* {
    pointer-events: auto;
}

.hero-eyebrow {
    font-size: 0.6rem;
    letter-spacing: 0.5em;
    color: var(--teal);
    text-transform: uppercase;
    margin-bottom: 24px;
    opacity: 0.9;
    animation: fadeUp 0.6s ease both;
}

.hero-name {
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(4.5rem, 13vw, 10rem);
    line-height: 0.88;
    letter-spacing: 0.02em;
    animation: fadeUp 0.7s 0.1s ease both;
    position: relative;
}

.hero-name .first {
    display: block;
    color: var(--white);
}

.hero-name .last {
    display: block;
    color: transparent;
    -webkit-text-stroke: 1px rgba(27, 228, 200, 0.4);
}

.hero-role {
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(1.2rem, 3vw, 2rem);
    letter-spacing: 0.15em;
    color: var(--teal);
    margin-top: 16px;
    animation: fadeUp 0.7s 0.2s ease both;
}

.hero-desc {
    font-family: "Lora", serif;
    font-size: clamp(0.85rem, 1.4vw, 1rem);
    font-style: italic;
    font-weight: 300;
    color: var(--mist);
    line-height: 1.8;
    max-width: 460px;
    margin-top: 24px;
    animation: fadeUp 0.7s 0.3s ease both;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    margin-top: 40px;
    flex-wrap: wrap;
    animation: fadeUp 0.7s 0.4s ease both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.25s;
    font-family: "DM Mono", monospace;
}

.btn-primary {
    background: var(--teal);
    color: var(--ink);
}

.btn-primary:hover {
    background: var(--white);
    transform: translateY(-2px);
}

.btn-ghost {
    border: 1px solid var(--mist2);
    color: var(--mist);
}

.btn-ghost:hover {
    border-color: var(--teal);
    color: var(--teal);
    transform: translateY(-2px);
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 48px;
    font-size: 0.48rem;
    letter-spacing: 0.4em;
    color: var(--mist2);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeUp 0.7s 0.6s ease both;
}

.hero-scroll::before {
    content: "";
    width: 40px;
    height: 1px;
    background: var(--mist2);
}

/* ── SOBRE ── */
#sobre {
    padding: 100px 48px;
    background: var(--deep);
    position: relative;
    overflow: hidden;
    /* Cobre e corta a base da imagem impedindo de vazar para stack */
}

.sobre-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
}

.sobre-right {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-img-wrapper {
    /* Container manterá espaço no grid, mas imagem voa relativa à section */
    width: 100%;
    height: 100%;
    min-height: 480px;
    display: block;
}

.profile-img {
    position: absolute;
    bottom: -150px;
    /* Parallax vai afundar ainda mais se estiver descendo a pagina */
    right: -48px;
    /* Alinhado à direita de forma fluida */
    width: 100%;
    max-width: 700px;
    /* Maior, encorpado */
    height: auto;
    object-fit: contain;
    will-change: transform;
    pointer-events: none;
    background-color: transparent;
    z-index: 0;
}

.sobre-tag {
    font-size: 0.52rem;
    letter-spacing: 0.45em;
    color: var(--teal);
    text-transform: uppercase;
    margin-bottom: 20px;
    opacity: 0.7;
}

.sobre-title {
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: 0.04em;
    line-height: 1;
    color: var(--white);
    margin-bottom: 28px;
}

.sobre-text {
    font-family: "Lora", serif;
    font-size: 0.95rem;
    font-weight: 300;
    font-style: italic;
    color: var(--mist);
    line-height: 1.9;
    margin-bottom: 16px;
}

.sobre-text em {
    color: var(--teal);
    font-style: normal;
}

.sobre-text strong {
    color: var(--white);
    font-style: normal;
    font-weight: 400;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
}

.stat {
    background: var(--surface);
    padding: 28px 24px;
    border-left: 2px solid transparent;
    transition: border-color 0.3s;
}

.stat:hover {
    border-color: var(--teal);
}

.stat-n {
    font-family: "Bebas Neue", sans-serif;
    font-size: 2.5rem;
    letter-spacing: 0.04em;
    color: var(--teal);
    line-height: 1;
}

.stat-label {
    font-size: 0.52rem;
    letter-spacing: 0.2em;
    color: var(--mist);
    text-transform: uppercase;
    margin-top: 6px;
}

.about-loc {
    margin-top: 2px;
    background: var(--surface);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.loc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 4px rgba(27, 228, 200, 0.15);
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 4px rgba(27, 228, 200, 0.15);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(27, 228, 200, 0.05);
    }
}

.loc-text {
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: var(--mist);
    text-transform: uppercase;
}

/* ── STACK ── */
#stack {
    padding: 100px 48px;
}

.stack-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: flex-end;
}

.sec-header {
    margin-bottom: 48px;
}

.sec-tag {
    font-size: 0.52rem;
    letter-spacing: 0.45em;
    color: var(--teal);
    text-transform: uppercase;
    margin-bottom: 12px;
    opacity: 0.7;
}

.sec-title {
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: 0.04em;
    color: var(--white);
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 2px;
}

.tech {
    background: var(--deep);
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: all 0.25s;
    cursor: default;
    position: relative;
    overflow: hidden;
}

.tech::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--teal);
    transform: scaleX(0);
    transition: transform 0.3s;
    transform-origin: left;
}

.tech:hover {
    background: var(--surface);
}

.tech:hover::after {
    transform: scaleX(1);
}

.tech-icon {
    font-size: 1.6rem;
    line-height: 1;
    color: var(--teal);
    transition: color 0.25s, transform 0.25s;
}

.tech:hover .tech-icon {
    color: var(--white);
    transform: scale(1.15);
}

.tech-name {
    font-size: 0.58rem;
    letter-spacing: 0.2em;
    color: var(--mist);
    text-transform: uppercase;
    text-align: center;
}

/* ── PROJETOS ── */
#projetos {
    padding: 100px 48px;
    background: var(--deep);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2px;
    margin-top: 48px;
}

.proj {
    position: relative;
    perspective: 1000px;
    transition: transform 0.3s;
}

.proj:hover {
    transform: translateY(-6px);
}

.proj-flip-inner {
    display: grid;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    height: 100%;
}

.proj:hover .proj-flip-inner {
    transform: rotateY(180deg);
}

.proj-front,
.proj-back {
    grid-area: 1 / 1;
    backface-visibility: hidden;
    background: var(--navy);
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s, background 0.3s;
    border-radius: 4px;
    overflow: hidden;
}

.proj-front {
    padding: 36px 32px;
}

.proj-back {
    transform: rotateY(180deg);
    padding: 0;
}

.proj:hover .proj-front,
.proj:hover .proj-back {
    border-color: var(--teal);
    background: var(--surface);
}

.proj-media-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--surface2);
    position: relative;
}

.proj-type {
    font-size: 0.48rem;
    letter-spacing: 0.35em;
    color: var(--teal);
    text-transform: uppercase;
    margin-bottom: 14px;
    opacity: 0.7;
}

.proj-title {
    font-family: "Bebas Neue", sans-serif;
    font-size: 1.6rem;
    letter-spacing: 0.05em;
    color: var(--white);
    margin-bottom: 10px;
    line-height: 1;
}

.proj-desc {
    font-family: "Lora", serif;
    font-size: 0.82rem;
    font-style: italic;
    font-weight: 300;
    color: var(--mist);
    line-height: 1.7;
    margin-bottom: 20px;
}

.proj-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
}

.proj-tag {
    font-size: 0.48rem;
    letter-spacing: 0.2em;
    color: var(--mist2);
    text-transform: uppercase;
    border: 1px solid var(--mist2);
    padding: 4px 10px;
}

/* Star Alert (Prototipagem) */
.proto-star-alert {
    position: absolute;
    top: 24px;
    right: 24px;
    color: var(--gold);
    font-size: 1.1rem;
    z-index: 10;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), color 0.25s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
}

.proj.is-flipping-front .proto-star-alert {
    animation: starJump 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.proj.is-flipping-back .proto-star-alert {
    animation: starJumpBack 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.proto-star-alert:hover {
    color: var(--white);
    filter: brightness(1.2);
}

@keyframes starJump {
    0% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-30px) scale(1.4);
    }

    100% {
        transform: translateY(0) scale(1.15);
    }
}

@keyframes starJumpBack {
    0% {
        transform: translateY(0) scale(1.15);
    }

    50% {
        transform: translateY(-30px) scale(1.4);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

.proto-star-alert::before {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--gold);
    border-radius: 50%;
    z-index: -1;
    animation: starPing 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes starPing {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    80%,
    100% {
        transform: scale(5);
        opacity: 0;
    }
}

.proto-star-alert::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -40px;
    right: -10px;
    background: var(--surface2);
    color: var(--teal);
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.55rem;
    font-family: "DM Mono", monospace;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: all 0.3s;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.proto-star-alert:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.proj-link {
    font-size: 0.52rem;
    letter-spacing: 0.25em;
    color: var(--teal);
    text-transform: uppercase;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.2s;
}

.proj-link:hover {
    gap: 14px;
}

/* ── CONTATO ── */
#contato {
    padding: 100px 48px 120px;
    position: relative;
}

.contato-inner {
    max-width: 640px;
}

.contato-title {
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(3rem, 7vw, 5.5rem);
    letter-spacing: 0.04em;
    line-height: 0.9;
    color: var(--white);
    margin-bottom: 8px;
}

.contato-title .teal {
    color: var(--teal);
}

.contato-sub {
    font-family: "Lora", serif;
    font-size: 0.95rem;
    font-style: italic;
    font-weight: 300;
    color: var(--mist);
    line-height: 1.75;
    margin-bottom: 48px;
    max-width: 420px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 48px;
}

.contact-item {
    background: var(--deep);
    padding: 20px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    transition: all 0.25s;
    border-left: 2px solid transparent;
}

.contact-item:hover {
    background: var(--surface);
    border-color: var(--teal);
    padding-left: 36px;
}

.ci-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ci-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    color: var(--teal);
    flex-shrink: 0;
}

.ci-label {
    font-size: 0.52rem;
    letter-spacing: 0.25em;
    color: var(--mist2);
    text-transform: uppercase;
    margin-bottom: 3px;
}

.ci-value {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--white);
}

.ci-arrow {
    color: var(--teal);
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 0.8rem;
}

.contact-item:hover .ci-arrow {
    opacity: 1;
}

/* FOOTER */
footer {
    position: relative;
    z-index: 1;
    padding: 32px 48px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.foot-logo {
    font-family: "Bebas Neue", sans-serif;
    font-size: 1.2rem;
    letter-spacing: 0.1em;
}

.foot-logo .na {
    color: var(--teal);
}

.foot-copy {
    font-size: 0.48rem;
    letter-spacing: 0.2em;
    color: var(--mist2);
    text-transform: uppercase;
}

/* ── TIMELINE (EXPERIÊNCIA) ── */
#experiencia {
    padding: 100px 48px;
    display: flex;
    align-items: center;
}

.resilience-block {
    display: flex;
    align-items: center;
    gap: 32px;
    background: var(--surface2);
    padding: 32px;
    border-left: 3px solid var(--teal);
    max-width: 820px;
    margin-top: 16px;
    margin-bottom: 64px;
    border-radius: 4px;
}

.resilience-art {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.resilience-art svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 12px var(--teal-glow));
    animation: floatingArt 4s ease-in-out infinite;
}

@keyframes floatingArt {

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

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

.resilience-text p {
    font-family: "Lora", serif;
    font-size: 0.95rem;
    font-style: italic;
    font-weight: 300;
    line-height: 1.8;
    color: var(--mist);
}

.resilience-text p strong {
    color: var(--teal);
    font-weight: 400;
    font-style: normal;
}

.resilience-text p em {
    color: var(--gold);
    font-style: italic;
}

@media (max-width: 1100px) {
    .profile-img-wrapper {
        display: none;
    }
}

@media (max-width: 768px) {
    .resilience-block {
        flex-direction: column;
        text-align: center;
        padding: 24px;
        gap: 16px;
    }
}

.timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 48px auto 0;
    padding: 20px 0;
    max-width: 1200px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--teal-dim) 5%, var(--surface2) 80%, transparent);
}

.tl-item {
    position: relative;
    width: 50%;
    padding: 0 40px;
    margin-bottom: 60px;
    display: block;
}

.tl-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.tl-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

.tl-marker {
    position: absolute;
    top: 8px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tl-item:nth-child(odd) .tl-marker {
    right: -15px;
}

.tl-item:nth-child(even) .tl-marker {
    left: -15px;
}

.tl-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 4px rgba(27, 228, 200, 0.15);
    flex-shrink: 0;
    transition: box-shadow 0.3s;
}

.tl-item:hover .tl-dot {
    box-shadow: 0 0 0 8px rgba(27, 228, 200, 0.1);
}

.tl-line {
    display: none;
}

.tl-content {
    padding-bottom: 0px;
}

.tl-company {
    font-family: "Bebas Neue", sans-serif;
    font-size: 1.4rem;
    letter-spacing: 0.06em;
    color: var(--white);
    line-height: 1.1;
}

.tl-period {
    font-size: 0.52rem;
    letter-spacing: 0.25em;
    color: var(--teal);
    text-transform: uppercase;
    margin-top: 4px;
    margin-bottom: 20px;
    opacity: 0.8;
}

.tl-role-block {
    background: var(--surface);
    padding: 16px 20px;
    margin-bottom: 10px;
    transition: border-color 0.3s;
}

.tl-item:nth-child(odd) .tl-role-block {
    border-right: 2px solid var(--surface2);
}

.tl-item:nth-child(even) .tl-role-block {
    border-left: 2px solid var(--surface2);
}

.tl-item:nth-child(odd) .tl-role-block:hover {
    border-right-color: var(--teal);
}

.tl-item:nth-child(even) .tl-role-block:hover {
    border-left-color: var(--teal);
}

.tl-role {
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 4px;
}

.tl-role-period {
    font-size: 0.5rem;
    letter-spacing: 0.2em;
    color: var(--teal);
    text-transform: uppercase;
    margin-bottom: 8px;
    opacity: 0.7;
}

.tl-desc {
    font-family: "Lora", serif;
    font-size: 0.82rem;
    font-style: italic;
    font-weight: 300;
    color: var(--mist);
    line-height: 1.75;
}

.tl-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.tl-item:nth-child(odd) .tl-tags {
    justify-content: flex-end;
}

.tl-item:nth-child(even) .tl-tags {
    justify-content: flex-start;
}

.tl-tag {
    font-size: 0.46rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--teal);
    border: 1px solid rgba(27, 228, 200, 0.25);
    padding: 4px 10px;
    background: rgba(27, 228, 200, 0.04);
}

/* ── FORMAÇÃO ACADÊMICA ── */
#formacao {
    padding: 100px 48px;
    background: var(--deep);
}

.edu-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 48px;
    max-width: 820px;
}

.edu-card {
    background: var(--surface);
    padding: 24px 28px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    border-left: 2px solid transparent;
    transition: border-color 0.3s, background 0.3s;
}

.edu-card:hover {
    border-color: var(--teal);
    background: var(--surface2);
}

.edu-card--highlight {
    border-left-color: rgba(27, 228, 200, 0.3);
}

.edu-icon {
    font-size: 1.3rem;
    color: var(--teal);
    flex-shrink: 0;
    margin-top: 2px;
    width: 28px;
    text-align: center;
    opacity: 0.85;
}

.edu-inst {
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    color: var(--white);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.edu-degree {
    font-family: "Lora", serif;
    font-size: 0.82rem;
    font-style: italic;
    font-weight: 300;
    color: var(--mist);
    margin-bottom: 6px;
}

.edu-period {
    font-size: 0.5rem;
    letter-spacing: 0.2em;
    color: var(--teal);
    text-transform: uppercase;
    opacity: 0.75;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.edu-badge {
    font-size: 0.44rem;
    letter-spacing: 0.2em;
    padding: 3px 10px;
}

.edu-badge--active {
    background: rgba(27, 228, 200, 0.12);
    color: var(--teal);
    border: 1px solid rgba(27, 228, 200, 0.3);
    animation: pulse 2s infinite;
}

/* ── CERTIFICAÇÕES ── */
.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2px;
    margin-top: 48px;
}

.cert-item {
    background: var(--surface);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    border-bottom: 2px solid transparent;
    transition: all 0.25s;
}

.cert-item:hover {
    background: var(--surface2);
    border-color: var(--teal);
    transform: translateY(-3px);
}

.cert-icon {
    font-size: 1.6rem;
    color: var(--teal);
    opacity: 0.85;
    transition: transform 0.25s;
}

.cert-item:hover .cert-icon {
    transform: scale(1.15);
}

.cert-name {
    font-size: 0.62rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--white);
    line-height: 1.4;
}

.cert-issuer {
    font-family: "Lora", serif;
    font-size: 0.72rem;
    font-style: italic;
    font-weight: 300;
    color: var(--mist);
}

/* ── PROTOTIPAGEM ── */
#prototipagem {
    padding: 100px 48px;
}

.proto-grid {
    display: grid;
    grid-template-columns: 0.5fr 1fr;
    gap: 60px;
    align-items: center;
    margin-top: 48px;
}

.proto-desc {
    font-family: "Lora", serif;
    font-size: 0.95rem;
    font-style: italic;
    font-weight: 300;
    color: var(--mist);
    line-height: 1.8;
    margin-bottom: 32px;
}

.proto-desc strong {
    color: var(--teal);
    font-weight: 400;
}

.figma-embed-container {
    background: rgba(255, 255, 255, 0.02);
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 16px;
}

.proto-label {
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: var(--teal);
    text-transform: uppercase;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.proto-label i {
    font-size: 1rem;
    color: #F24E1E;
    /* Figma brandish red */
}

.proto-mockups {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 20px 0 40px 0;
}

.mockup-pc {
    position: relative;
    width: 90%;
    aspect-ratio: 16 / 9;
    background: #000;
    border: 12px solid #222;
    border-bottom-width: 20px;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.mockup-pc-bar {
    display: none;
}

.mockup-screen {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #141414;
}

.iframe-pc {
    position: absolute;
    width: 1440px;
    height: 810px;
    top: 0;
    left: 0;
    border: none;
    transform-origin: 0 0;
}

.iframe-mobile {
    position: absolute;
    width: 375px;
    height: 812px;
    top: 0;
    left: 0;
    border: none;
    transform-origin: 0 0;
}

.mockup-pc-stand {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 30px;
    background: linear-gradient(to right, #222, #333, #222);
}

.mockup-pc-base {
    position: absolute;
    bottom: -36px;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 6px;
    background: #444;
    border-radius: 4px;
}

.mockup-mobile {
    position: absolute;
    right: 0;
    bottom: 20px;
    width: 25%;
    min-width: 100px;
    max-width: 200px;
    aspect-ratio: 9 / 19;
    background: #000;
    border: 8px solid #333;
    border-radius: 20px;
    box-shadow: -10px 10px 30px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    z-index: 2;
    overflow: hidden;
}

.mockup-mobile-speaker {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #111;
    border-radius: 2px;
    z-index: 3;
}

/* DIVIDER */
.divider {
    position: relative;
    z-index: 1;
    height: 1px;
    background: linear-gradient(to right,
            transparent,
            var(--teal-dim),
            transparent);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    nav {
        padding: 16px 24px;
    }

    .nav-links {
        display: none;
    }

    #hero,
    #sobre,
    #stack,
    #projetos,
    #prototipagem,
    #contato {
        padding-left: 24px;
        padding-right: 24px;
    }

    .sobre-grid,
    .stack-layout,
    .proto-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .profile-img-wrapper {
        min-height: 380px;
        height: auto;
    }

    .profile-img {
        max-width: 500px;
        right: -30px;
        bottom: -20px;
    }

    .timeline::before {
        left: 20px;
    }

    .tl-item {
        width: 100%;
        padding: 0 0 0 52px;
        margin-bottom: 40px;
    }

    .tl-item:nth-child(odd),
    .tl-item:nth-child(even) {
        left: 0;
        text-align: left;
    }

    .tl-item:nth-child(odd) .tl-marker,
    .tl-item:nth-child(even) .tl-marker {
        left: 5px;
        right: auto;
    }

    .tl-item:nth-child(odd) .tl-role-block,
    .tl-item:nth-child(even) .tl-role-block {
        border-right: none;
        border-left: 2px solid var(--surface2);
    }

    .tl-item:nth-child(odd) .tl-tags,
    .tl-item:nth-child(even) .tl-tags {
        justify-content: flex-start;
    }

    .proto-mockups {
        margin-top: 10px;
        padding-bottom: 20px;
    }

    .mockup-pc {
        width: 100%;
        border-width: 8px;
        border-bottom-width: 14px;
    }

    .mockup-pc-stand {
        bottom: -20px;
        height: 20px;
        width: 40px;
    }

    .mockup-pc-base {
        bottom: -24px;
        width: 100px;
        height: 4px;
    }

    .mockup-mobile {
        width: 25%;
        border-width: 6px;
        bottom: 0px;
        right: -10px;
    }

    footer {
        padding: 24px;
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    #hero {
        padding-top: 100px;
        justify-content: center;
        text-align: center;
    }

    #globe-container {
        width: 120vw;
        height: 120vw;
        right: -10%;
        opacity: 0.3;
        top: 55%;
        transform: translateY(-50%);
        pointer-events: none;
    }

    .hero-content {
        max-width: 100%;
        margin-bottom: 80px;
    }

    .hero-ctas {
        justify-content: center;
    }

    .hero-desc {
        margin-inline: auto;
    }

    /* Cursor personalizado desativado em telas pequenas */
    body {
        cursor: auto;
    }

    .cursor,
    .cursor-ring {
        display: none;
    }
}

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

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

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}