:root {
    --page-bg: #363638;
    --menu-bg: #2B2B2B;
    --text: #ffffff;
    --muted: #b3b3b3;
    --hover: #D33C45;
    --tip-bg: rgba(0, 0, 0, 0.75);
    --max: 1100px;
}

/* =========================
   BASE + Footer no fim
========================= */
* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page-bg);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
    color: var(--text);
    cursor: url("./Gray.cur"), auto;

    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

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

/* =========================
   HEADER / MENU (Sticky)
========================= */
.topbar {
    background: var(--menu-bg);
    position: sticky;
    top: 0;
    z-index: 999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar__inner {
    height: 90px;
    width: min(var(--max), calc(100% - 64px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    max-width: 300px;
}

/* ===== NAV LINKS ===== */
.nav {
    display: flex;
    gap: 28px;
    flex: 1;
    justify-content: center;
}

.nav__link {
    text-decoration: none;
    color: var(--muted);
    font-size: 14px;
    padding: 6px 0;
    transition: color 0.2s ease;
    display: none;
}

.nav__link:hover {
    color: var(--hover);
}

/* ===== SOCIAL ICONS ===== */
.social {
    display: flex;
    gap: 18px;
}

.social__link {
    position: relative;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--text);
    text-decoration: none;
    font-size: 20px;

    transition: color 0.2s ease;
}

.social__link:hover {
    color: var(--hover);
}

/* Tooltip (header icons) */
.social__link .tooltip {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);

    background: var(--tip-bg);
    color: #fff;

    font-size: 12px;
    font-weight: 600;

    padding: 8px 10px;
    border-radius: 6px;

    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.social__link .tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--tip-bg);
}

.social__link:hover .tooltip {
    opacity: 1;
}

/* =========================
   HAMBURGER
========================= */
.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
    cursor: pointer;
    padding: 10px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-direction: column;
}

.menu-toggle__line {
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 999px;
    transition: transform .2s ease, opacity .2s ease;
}

.topbar--open .menu-toggle__line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.topbar--open .menu-toggle__line:nth-child(2) {
    opacity: 0;
}

.topbar--open .menu-toggle__line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* menu mobile */
.mobile-menu {
    display: none;
    width: min(var(--max), calc(100% - 64px));
    margin: 0 auto;
    padding: 10px 0 18px;
    border-top: 1px solid rgba(255, 255, 255, .06);
}

/* UL/LI do menu mobile */
.nav--mobile .nav__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.nav--mobile .nav__item {
    margin: 0;
}

/* Desktop: lista existe, mas itens ocultos */
@media (min-width: 721px) {

    .nav--mobile .nav__list,
    .nav--mobile .nav__item {
        display: none;
    }
}

.social--mobile {
    margin-top: 12px;
}

/* =========================
   HERO
========================= */
.hero {
    background: transparent;
}

.hero__inner {
    width: min(var(--max), calc(100% - 64px));
    margin: 0 auto;
    min-height: 420px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 80px;
    padding: 80px 0;
}

.hero__title {
    margin: 0;
    font-size: clamp(42px, 4vw, 64px);
    font-weight: 800;
    color: #ffffff;
}

.hero__text {
    margin-top: 16px;
    max-width: 420px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
    font-size: 14px;
}

/* Tecnologias (tooltip igual ao header) */
.tech {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.tech__item {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;

    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .10);

    color: rgba(255, 255, 255, .85);
    font-size: 22px;

    transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.tech__item:hover {
    color: var(--hover);
    border-color: rgba(211, 60, 69, .45);
    background: rgba(211, 60, 69, .10);
}

/* Tooltip das techs */
.tech__item .tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);

    background: var(--tip-bg);
    color: #fff;

    font-size: 12px;
    font-weight: 600;

    padding: 8px 10px;
    border-radius: 6px;

    white-space: nowrap;
    pointer-events: none;
    opacity: 0;

    transition: opacity 0.15s ease;
}

.tech__item .tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--tip-bg);
}

.tech__item:hover .tooltip {
    opacity: 1;
}

.tech__item--svg .tech__svg {
    width: 26px;
    height: 26px;
    display: block;
    color: currentColor;
}

/* =========================
   PROJECTS (CARROSSEL)
========================= */
.projects {
    background: transparent;
    padding: 60px 0 100px;
}

.projects__inner {
    width: min(var(--max), calc(100% - 64px));
    margin: 0 auto;
}

.projects__header {
    text-align: center;
    margin-bottom: 30px;
}

.projects__kicker {
    font-size: 11px;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
    text-transform: uppercase;
}

.projects__carousel {
    position: relative;
}

.projects__viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
    scrollbar-width: none;
}

.projects__viewport::-webkit-scrollbar {
    height: 0;
}

.projects__track {
    display: flex;
    gap: 24px;
    padding: 2px;
}

.projects__track .project-card {
    scroll-snap-align: start;
    flex: 0 0 calc((100% - 48px) / 3);
}

/* setas (só quando JS liberar) */
.projects__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(0, 0, 0, .25);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
    z-index: 5;
}

.projects__arrow:hover {
    color: var(--hover);
    border-color: rgba(211, 60, 69, .45);
    background: rgba(211, 60, 69, .12);
}

.projects__arrow--left {
    left: -10px;
}

.projects__arrow--right {
    right: -10px;
}

.projects--has-arrows .projects__arrow {
    display: inline-flex;
}

/* Card */
.project-card {
    border-radius: 14px;
    overflow: hidden;
    background: #2B2B2B;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(211, 60, 69, 0.45);
}

.project-card__thumb {
    height: 170px;
    background:
        radial-gradient(900px 260px at 20% 10%, rgba(211, 60, 69, 0.18), transparent 60%),
        radial-gradient(800px 220px at 85% 45%, rgba(0, 0, 0, 0.25), transparent 55%),
        #2B2B2B;
}

.project-card__body {
    padding: 18px;
}

.project-card__title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
}

.project-card__desc {
    margin: 12px 0 14px;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.6);
}

.project-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.pill {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.08);
    padding: 6px 10px;
    border-radius: 999px;
}

.project-card__actions {
    display: flex;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn--ghost {
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
}

.btn--ghost:hover {
    border-color: var(--hover);
    color: var(--hover);
}

.btn--solid {
    background: var(--hover);
    color: #fff;
    border: 1px solid transparent;
}

.btn--solid:hover {
    background: #b52e36;
}

/* =========================
   FOOTER
========================= */
.footer {
    background: var(--menu-bg);
    padding: 28px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer__inner {
    width: min(var(--max), calc(100% - 64px));
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.footer__text {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}

.footer__text:hover {
    color: var(--hover);
}

/* =========================
   RESPONSIVO
========================= */
@media (max-width: 900px) {
    .hero__inner {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
        padding: 60px 0;
    }

    .tech {
        justify-content: center;
    }

    .projects__track .project-card {
        flex: 0 0 calc((100% - 24px) / 2);
    }
}

@media (max-width: 720px) {
    .topbar__inner {
        width: calc(100% - 32px);
        gap: 12px;
    }

    .nav--desktop,
    .social--desktop {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .mobile-menu {
        display: block;
        width: calc(100% - 32px);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        transition: max-height .25s ease, opacity .2s ease;
    }

    .topbar--open .mobile-menu {
        max-height: 260px;
        opacity: 1;
        pointer-events: auto;
    }

    .projects {
        padding: 40px 0 70px;
    }

    .projects__track .project-card {
        flex: 0 0 100%;
    }

    .nav__link {
        display: inline-block;
    }
}