:root {
    --bg: #0b0b0f;
    --bg-alt: #0e0e14;
    --surface: #13131a;
    --text: #e7e7ee;
    --muted: #9aa0aa;
    --accent: #ff6b3d;
    --accent-2: #7a5cff;
    --max-w: 1100px;
    --radius: 14px;
    --shadow-strong: 0 10px 40px rgba(0, 0, 0, 0.55);
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(1200px 800px at 70% -10%, rgba(122, 92, 255, 0.12), transparent 60%),
    radial-gradient(900px 600px at 10% 120%, rgba(255, 107, 61, 0.10), transparent 60%),
    var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/*****************
  GLOBAL LAYOUT
*****************/
.container {
    width: 100%;
    max-width: var(--max-w);
    padding: 0 24px;
    margin: 0 auto;
}

.section {
    position: relative;
    padding: 88px 0;
    scroll-margin-top: 84px;
    z-index: 0;
    isolation: isolate;
}

.section:not(.hero)::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    var(--bg);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.section--alt {
    background: none;
}

.section--alt::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    var(--bg-alt);
}

.section__title {
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 1px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 0.95;
    margin: 0 0 16px;
}

.section__kicker {
    color: var(--muted);
    margin: 0 0 28px;
}

.section__text {
    margin: 0;
    padding-bottom: 10px;
    color: #d8d8df;
}

.grid {
    display: grid;
    gap: 28px;
}

.grid--2 {
    grid-template-columns: 1.1fr 0.9fr;
}

@media (max-width: 960px) {
    .grid--2 {
        grid-template-columns: 1fr;
    }
}

/*****************
  HEADER / NAV
*****************/
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background: linear-gradient(180deg, rgba(11, 11, 15, 0.86), rgba(11, 11, 15, 0.6) 60%, rgba(11, 11, 15, 0));
    backdrop-filter: blur(6px);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
    background: linear-gradient(135deg, rgba(122, 92, 255, 0.24), rgba(255, 107, 61, 0.24));
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.05), var(--shadow-strong);
}

.nav__links {
    list-style: none;
    display: flex;
    gap: 18px;
    margin: 0;
    padding: 0;
}

.nav__links a {
    color: var(--text);
    text-decoration: none;
    opacity: 0.85;
    position: relative;
    padding-bottom: 6px;
}

.nav__links a:hover {
    opacity: 1;
    color: white;
}

.nav__links a.active {
    color: white;
    opacity: 1;
}

.nav__links a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.nav__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    cursor: pointer;
    margin-left: auto;
}

.nav__toggle:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 2px;
}

.nav__toggle-bars {
    position: relative;
    width: 20px;
    height: 2px;
    background: currentColor;
}

.nav__toggle-bars::before, .nav__toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: currentColor;
}

.nav__toggle-bars::before {
    top: -6px;
}

.nav__toggle-bars::after {
    top: 6px;
}

.sidebar {
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
}

.sidebar__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 220ms ease;
}

.sidebar__panel {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 82vw;
    max-width: 320px;
    background: var(--surface);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    transform: translateX(-100%);
    transition: transform 260ms ease;
    display: flex;
    flex-direction: column;
    padding: 14px;
}

.sidebar__links {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar__links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    padding: 10px 12px;
    border-radius: 10px;
}

.sidebar__links a:hover {
    background: rgba(255, 255, 255, 0.06);
}

.sidebar__links a.active {
    background: rgba(255, 255, 255, 0.08);
}

.sidebar--open {
    pointer-events: auto;
}

.sidebar--open .sidebar__overlay {
    opacity: 1;
}

.sidebar--open .sidebar__panel {
    transform: translateX(0);
}

.no-scroll {
    overflow: hidden;
}

@media (max-width: 960px) {
    .nav__links {
        display: none;
    }

    .nav__toggle {
        display: inline-flex;
    }
}

@media (max-width: 960px) {
    .grid--2 {
        grid-template-columns: 1fr;
    }
}

/*****************
  HERO
*****************/
.hero {
    min-height: 100vh;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
}

.hero__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    filter: blur(0.2px);
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero__title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(48px, 12vw, 160px);
    margin: 0 0 4px;
    letter-spacing: 2px;
    line-height: 1;
}

.hero__title-line {
    display: block;
}

.hero__title-line + .hero__title-line {
    margin-top: -8px;
}

.hero__title-line.accent {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__subtitle {
    margin: 6px 0 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0.9;
    font-size: clamp(16px, 2.4vw, 24px);
}

.hero__tagline {
    margin: 0 0 24px;
    color: var(--muted);
    font-size: clamp(14px, 2.0vw, 20px);
}

.hero__cta {
    display: flex;
    gap: 14px;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 22px;
    border-radius: 12px;
    border: 1px solid transparent;
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0.5px;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease;
    position: relative;
}

.btn--primary {
    background: linear-gradient(90deg, rgba(255, 107, 61, 0.28), rgba(122, 92, 255, 0.28));
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 10px 32px rgba(255, 107, 61, 0.28), 0 6px 20px rgba(122, 92, 255, 0.18);
    position: relative;
    overflow: hidden;
}

.btn--primary:hover,
.btn--primary:focus-visible {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 14px 40px rgba(255, 107, 61, 0.38), 0 10px 28px rgba(122, 92, 255, 0.24);
    background: linear-gradient(90deg, rgba(255, 107, 61, 0.40), rgba(122, 92, 255, 0.36));
    border-color: rgba(255, 255, 255, 0.28);
}

.btn--primary::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 60%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.btn--primary:hover::after,
.btn--primary:focus-visible::after {
    opacity: 0.35;
}

.btn--ghost {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn--ghost-blocked {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
}

.about__actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
}

.about__actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    font-weight: 800;
}

.about__actions .btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    line-height: 0;
}

.btn--linkedin {
    color: #ffffff;
    background: #0A66C2;
    border: 1px solid #0A66C2;
}

.btn--linkedin:hover {
    background: #0957a6;
    border-color: #0957a6;
}

.btn--github {
    color: #ffffff;
    background: #000000;
    border: 1px solid #000000;
}

.btn--github:hover {
    background: #111111;
    border-color: #111111;
}

/*****************
  ABOUT
*****************/
.about {
    align-items: center;
}

.about__frame {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(122, 92, 255, 0.12), rgba(255, 255, 255, 0.02));
    box-shadow: var(--shadow-strong);
    aspect-ratio: 4 / 5;
}

.about__frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 80% at 80% 10%, rgba(255, 107, 61, 0.18), transparent 60%);
    pointer-events: none;
}

.about__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
}

@media (max-width: 960px) {
    .about__frame {
        aspect-ratio: 16 / 10;
    }

    .about__img {
        object-position: top center;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 18px;
    }

    .section {
        padding: 64px 0;
    }

    .nav {
        height: 60px;
    }

    .nav__links {
        gap: 12px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .hero__cta {
        gap: 10px;
    }

    .project__actions {
        flex-wrap: wrap;
    }

    .project__actions .btn {
        margin-bottom: 8px;
    }

    .letterbox {
        height: 36px;
    }

    .hero__cta-mouse {
        display: none;
    }

    .about__img {
        object-position: top center;
    }

}

@media (max-width: 480px) {
    .container {
        padding: 0 14px;
    }

    .section {
        padding: 56px 0;
    }

    .nav {
        height: 56px;
    }

    .nav__links {
        gap: 10px;
    }

    .project__title {
        font-size: 20px;
    }

    .project__desc, .section__text {
        font-size: 0.95rem;
    }

    .diploma-tip.project-tip {
        position: static;
        transform: none;
        display: inline-block;
        margin: 6px 0 0 0;
    }

    .letterbox {
        height: 28px;
    }
}

/*****************
  SOBRE / LISTS
*****************/
.bullets {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.bullets li {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/*****************
  HABILIDADES
*****************/
.stack {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px 16px;
    list-style: none;
    padding: 0;
    margin: 0 auto;
}

.stack > li {
    margin: 0;
}

.tech {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 16px;
    border-radius: 12px;
    color: var(--text);
    background: rgba(19, 19, 26, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    width: 100%;
    height: auto;
}

@media (max-width: 1100px) {
    .stack {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .stack {
        grid-template-columns: 1fr;
    }
}

.tech__icon {
    color: #cfd2da;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
}

.tech__icon svg {
    width: 48px;
    height: 48px;
}

.tech__name {
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-top: 4px;
}

.tech__desc {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.3;
    max-width: 220px;
}

/*****************
  PROJECTS
*****************/
.project {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.0));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 20px;
    margin: 16px 0;
    box-shadow: var(--shadow-strong);
}

.project__header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    justify-content: space-between;
}

.project__title {
    margin: 0;
    font-size: clamp(20px, 2.6vw, 28px);
    letter-spacing: 0.3px;
}

.project__tag {
    color: var(--muted);
    font-size: 14px;
}

.project__desc {
    margin-top: 6px;
    color: #d8d8df;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 12px 0 6px;
    list-style: none;
}

.chip {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #f0f0f6;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.project__details summary {
    cursor: pointer;
    color: var(--accent);
}

.list {
    margin: 8px 0 0 0;
}

.project__actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    min-height: 40px;
    position: relative;
}

.project__actions .btn {
    height: 40px;
    padding: 0 16px;
    margin-bottom: 6px;
    border-radius: 10px;
}

.project__video {
    display: grid;
    place-items: center;
    margin: 14px 0;
}

.project__video .video-frame {
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-strong);
}

.project__video iframe {
    width: 100%;
    height: 100%;
    display: block;
}

.project__media {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem 0;
}

.project__media .project__img {
    max-width: 800px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/*****************
  MENTALIDADE
*****************/
.mindset__diagram {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 10px;
}

.arch {
    width: 100%;
    height: auto;
}

.arch rect {
    fill: rgba(122, 92, 255, 0.10);
    stroke: rgba(122, 92, 255, 0.5);
}

.arch text {
    fill: #e7e7ee;
    font-size: 14px;
    text-anchor: middle;
    dominant-baseline: middle;
    font-family: 'Inter', sans-serif;
}

.arch__arrow {
    stroke: var(--accent);
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
}

/*****************
  CONTACT
*****************/
.contact {
    display: grid;
    grid-template-columns: repeat( auto-fit, minmax(260px, 1fr) );
    gap: 12px;
}

.contact__item {
    display: grid;
    grid-template-columns: 38px 1fr;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.contact__item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.contact__icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(122, 92, 255, 0.18);
    font-weight: 800;
}

/*****************
  RODAPÉ
*****************/
.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 18px 0;
    background: rgba(0, 0, 0, 0.15);
}

.footer__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.letterbox {
    position: fixed;
    left: 0;
    right: 0;
    height: 50px;
    pointer-events: none;
    z-index: 50;
    opacity: 0.7;
}

.letterbox--top {
    top: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
}

.letterbox--bottom {
    bottom: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
}

/*****************
  UTILITIES
*****************/
.hidden {
    visibility: hidden;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/*****************
  HERO
*****************/
.hero__cta-mouse {
    position: absolute;
    left: 75%;
    transform: translateX(-50%);
    bottom: 4px;
    display: grid;
    place-items: center;
    color: var(--muted);
    z-index: 51;
}

.hero__mouse-icon {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
    animation: heroMouseBounce 1.2s ease-in-out infinite alternate;
}

@keyframes heroMouseBounce {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(40px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero__mouse-icon {
        animation: none;
    }
}

/*****************
  EDUCATION & CERTIFICATES
*****************/
.edu-list,
.cert-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 20px;
    align-items: start;
}

@media (max-width: 900px) {
    .edu-list,
    .cert-list {
        grid-template-columns: 1fr;
    }
}

.edu-item,
.cert-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 14px 16px;
    border-radius: 12px;
}

.edu-item__title,
.cert-item__title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin: 0 0 6px 0;
    font-weight: 700;
    font-size: 18px;
}

.edu-item__year,
.cert-item__year {
    color: var(--muted);
    font-weight: 600;
    font-size: 13px;
}

.edu-item__desc,
.cert-item__desc {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.edu-item__desc a,
.cert-item__desc a {
    color: var(--accent-2);
    text-decoration: none;
    border-bottom: 1px dotted rgba(122, 92, 255, 0.28);
}

.edu-item__desc a:hover,
.cert-item__desc a:hover {
    text-decoration: underline;
}

/*****************
  EDU / DIPLOMA TIP
*****************/
.diploma-tip {
    display: inline-block;
    margin-left: 8px;
    color: #fff;
    background: rgba(255, 59, 48, 0.18);
    border: 1px solid rgba(255, 59, 48, 0.35);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.9em;
    opacity: 0;
    transition: opacity 200ms ease;
}

.diploma-tip.diploma-tip--visible {
    opacity: 0.95;
}

.diploma-tip.project-tip {
    position: absolute;
    left: 0;
    transform: translateX(-100%);
    margin: 0 8px 0 0;
    pointer-events: none;
}

@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }

    .section {
        padding: 72px 0;
    }

    .hero__cta {
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 18px;
    }

    .section {
        padding: 64px 0;
    }

    .nav {
        height: 60px;
    }

    .nav__links {
        gap: 12px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .hero__cta {
        gap: 10px;
    }

    .project__actions {
        flex-wrap: wrap;
    }

    .project__actions .btn {
        margin-bottom: 8px;
    }

    .letterbox {
        height: 36px;
    }

    .hero__cta-mouse {
        display: none;
    }

    .about__img {
        object-position: top center;
    }

}

@media (max-width: 480px) {
    .container {
        padding: 0 14px;
    }

    .section {
        padding: 56px 0;
    }

    .nav {
        height: 56px;
    }

    .nav__links {
        gap: 10px;
    }

    .project__title {
        font-size: 20px;
    }

    .project__desc, .section__text {
        font-size: 0.95rem;
    }

    .diploma-tip.project-tip {
        position: static;
        transform: none;
        display: inline-block;
        margin: 6px 0 0 0;
    }

    .letterbox {
        height: 28px;
    }
}
