/* 4bitts.com.br — estilos da página principal (sem framework) */

:root {
    --accent: #ff6a33;
    --accent-2: #ffb020;
    --accent-soft: rgba(255, 106, 51, 0.14);
    --accent-glow: rgba(255, 106, 51, 0.35);
    --cyan: #5eead4;
    --bg: #0b0d12;
    --bg-grid: rgba(255, 255, 255, 0.035);
    --surface: rgba(255, 255, 255, 0.03);
    --surface-solid: #12151c;
    --surface-hover: rgba(255, 255, 255, 0.06);
    --text: #e8eaf0;
    --muted: #9198a8;
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.16);
    --topbar-bg: rgba(11, 13, 18, 0.72);
    --terminal-bg: #0f1218;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    --radius: 14px;
    --max: 72rem;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-heading: "Space Grotesk", var(--font-body);
    --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
    color-scheme: dark;
}

@media (prefers-color-scheme: light) {
    :root {
        --accent: #e8500f;
        --accent-2: #d98a00;
        --accent-soft: rgba(232, 80, 15, 0.1);
        --accent-glow: rgba(232, 80, 15, 0.22);
        --cyan: #0f766e;
        --bg: #f6f7f9;
        --bg-grid: rgba(15, 23, 42, 0.05);
        --surface: rgba(255, 255, 255, 0.75);
        --surface-solid: #ffffff;
        --surface-hover: #ffffff;
        --text: #12151c;
        --muted: #586074;
        --border: rgba(15, 23, 42, 0.1);
        --border-strong: rgba(15, 23, 42, 0.2);
        --topbar-bg: rgba(246, 247, 249, 0.8);
        --terminal-bg: #12151c;
        --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
        color-scheme: light;
    }
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 4.5rem;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

body {
    margin: 0;
    background-color: var(--bg);
    background-image:
        radial-gradient(60rem 30rem at 85% -10%, var(--accent-soft), transparent 70%),
        linear-gradient(var(--bg-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
    background-size: auto, 40px 40px, 40px 40px;
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    line-height: 1.15;
    margin: 0;
}

a {
    color: var(--accent);
    text-decoration: none;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

ul,
ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -3rem;
    z-index: 100;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
}

.skip-link:focus {
    top: 1rem;
}

/* ---------- Barra superior ---------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--topbar-bg);
    border-bottom: 1px solid transparent;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    transition: border-color 0.2s;
}

.topbar.is-scrolled {
    border-bottom-color: var(--border);
}

.topbar-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0.75rem 1rem;
}

.logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
}

.logo-bracket {
    color: var(--accent);
}

.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
}

.menu {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 0.75rem 0 0.25rem;
}

.menu.is-open {
    display: flex;
}

.menu a {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
}

.menu-num {
    color: var(--accent);
    font-size: 0.75rem;
}

.menu a:hover,
.menu a.active {
    color: var(--text);
    background: var(--surface-hover);
}

@media (min-width: 992px) {
    .topbar-inner {
        flex-wrap: nowrap;
        padding: 0.9rem 2rem;
    }

    .menu-toggle {
        display: none;
    }

    .menu {
        display: flex;
        flex-direction: row;
        width: auto;
        padding: 0;
        gap: 0.25rem;
    }

    .menu a {
        padding: 0.45rem 0.75rem;
    }

    .menu a.active {
        box-shadow: inset 0 -2px 0 var(--accent);
    }

    html {
        scroll-padding-top: 5rem;
    }
}

/* ---------- Seções ---------- */

.section {
    max-width: var(--max);
    margin: 0 auto;
    padding: 4.5rem 1.25rem;
}

@media (min-width: 992px) {
    .section {
        padding: 6.5rem 2rem;
    }
}

.section-head {
    margin-bottom: 2.5rem;
}

.section-tag {
    margin: 0 0 0.6rem;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.section h2 {
    font-size: clamp(2rem, 4.5vw, 3rem);
    letter-spacing: -0.02em;
}

.subheading {
    margin: 0.75rem 0 0;
    color: var(--muted);
}

/* ---------- Hero ---------- */

.hero {
    display: grid;
    gap: 3rem;
    align-items: center;
    padding-top: 3.5rem;
}

@media (min-width: 992px) {
    .hero {
        grid-template-columns: 1.15fr 1fr;
        min-height: calc(100vh - 4.5rem);
        padding-top: 4rem;
    }
}

.hero-id {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.avatar {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 18px;
    object-fit: cover;
    border: 2px solid var(--accent);
    box-shadow: 0 0 0 6px var(--accent-soft), 0 0 30px var(--accent-glow);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.35rem 0.85rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.pill i {
    color: var(--accent);
}

.hero h1 {
    font-size: clamp(2.75rem, 7.5vw, 5rem);
    letter-spacing: -0.035em;
}

.gradient {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lead {
    margin: 1.25rem 0 2.25rem;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.prompt {
    margin-right: 0.5rem;
    color: var(--accent);
}

.caret {
    display: inline-block;
    width: 0.55em;
    height: 1.1em;
    margin-left: 0.2em;
    vertical-align: text-bottom;
    background: var(--accent);
    animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.2rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    word-break: break-all;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #111;
    box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-primary:hover {
    color: #111;
    transform: translateY(-2px);
    box-shadow: 0 12px 32px var(--accent-glow);
}

.btn-ghost {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--text);
}

.btn-ghost i {
    color: var(--accent);
}

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

.social {
    display: flex;
    gap: 0.6rem;
}

.social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--muted);
    transition: color 0.2s, border-color 0.2s, transform 0.2s;
}

.social a:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* Terminal decorativo */

.terminal {
    min-width: 0;
    background: var(--terminal-bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #ff5f57;
}

.dot:nth-child(2) {
    background: #febc2e;
}

.dot:nth-child(3) {
    background: #28c840;
}

.terminal-title {
    margin-left: auto;
    margin-right: auto;
    padding-right: 2.5rem;
    color: #8b93a5;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.terminal-body {
    margin: 0;
    padding: 1.25rem 1.25rem 1.5rem;
    color: #c9cfdb;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.9;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.t-prompt {
    color: #ff6a33;
}

.t-out {
    color: #e8eaf0;
}

.t-dir {
    color: #5eead4;
}

.terminal-body .caret {
    background: #ff6a33;
}

/* ---------- Educação ---------- */

.timeline {
    position: relative;
    display: grid;
    gap: 1rem;
    padding-left: 1.75rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: linear-gradient(var(--accent), var(--border));
}

.timeline li {
    position: relative;
    padding: 1.25rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.timeline li::before {
    content: "";
    position: absolute;
    left: calc(-1.75rem + 0px);
    top: 1.6rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.period {
    display: inline-block;
    margin-bottom: 0.4rem;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.timeline h3 {
    font-size: 1.25rem;
}

.meta {
    margin: 0.35rem 0 0;
    color: var(--muted);
}

.meta strong {
    color: var(--text);
    font-weight: 600;
}

/* ---------- Sistemas ---------- */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 1rem;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    overflow: hidden;
    transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    opacity: 0;
    transition: opacity 0.25s;
}

.card:hover {
    color: var(--text);
    border-color: var(--border-strong);
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: 0.75rem;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.1rem;
}

.card h3 {
    font-size: 1.3rem;
}

.card p {
    margin: 0;
    flex: 1;
    color: var(--muted);
}

.card-link {
    margin-top: 1rem;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    word-break: break-all;
    transition: color 0.25s;
}

.card-link i {
    margin-left: 0.35rem;
    font-size: 0.75rem;
    transition: transform 0.25s;
}

.card:hover .card-link {
    color: var(--accent);
}

.card:hover .card-link i {
    transform: translateX(4px);
}

/* ---------- Habilidades ---------- */

.skills {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
    gap: 0.75rem;
}

.skills li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    padding: 1.4rem 0.5rem 1.2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    transition: border-color 0.2s, transform 0.2s;
}

.skills i {
    font-size: 2.2rem;
    color: var(--muted);
    transition: color 0.2s;
}

.skills li:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.skills li:hover i {
    color: var(--accent);
}

/* ---------- Interesses ---------- */

.prose {
    max-width: 46rem;
    padding: 1.75rem 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
}

.prose p {
    margin: 0 0 1.1rem;
    color: var(--muted);
    font-size: 1.1rem;
}

.prose p:last-child {
    margin-bottom: 0;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 1rem;
}

.prose p:last-child::before {
    content: "> ";
    color: var(--accent);
}

/* ---------- Livros ---------- */

.books {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
    gap: 0.75rem;
    counter-reset: livro;
}

.books li {
    position: relative;
    padding: 1rem 1.15rem 1rem 3.4rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    counter-increment: livro;
    transition: border-color 0.2s;
}

.books li::before {
    content: counter(livro, decimal-leading-zero);
    position: absolute;
    left: 1.15rem;
    top: 1.05rem;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.books li:hover {
    border-color: var(--border-strong);
}

.books strong {
    display: block;
    font-weight: 600;
    line-height: 1.4;
}

.books span {
    display: block;
    margin-top: 0.3rem;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

/* ---------- Rodapé ---------- */

.footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    max-width: var(--max);
    margin: 0 auto;
    padding: 2rem 1.25rem 2.5rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.875rem;
}

@media (min-width: 992px) {
    .footer {
        padding: 2rem 2rem 3rem;
    }
}

.footer p {
    margin: 0;
}

.footer-code {
    font-family: var(--font-mono);
    font-size: 0.8rem;
}
