/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:        #0d0d12;
    --bg2:       #13131a;
    --bg3:       #1a1a24;
    --border:    rgba(255,255,255,0.07);
    --text:      #e8e8f0;
    --muted:     #7878a0;
    --accent:    #7c6af7;
    --accent2:   #a78bfa;
    --accent-glow: rgba(124,106,247,0.25);
    --green:     #4ade80;
    --red:       #f87171;
    --yellow:    #fbbf24;
    --radius:    12px;
    --shadow:    0 4px 24px rgba(0,0,0,0.4);
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
strong { color: #fff; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ── Navbar ── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    height: 64px;
    background: rgba(13,13,18,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.05rem;
    font-weight: 500;
    color: #fff;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: var(--muted);
    padding: 6px 14px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--text); background: var(--bg3); }

.nav-cta {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent2);
    padding: 7px 18px;
    border: 1px solid rgba(124,106,247,0.4);
    border-radius: 8px;
    transition: background 0.2s, box-shadow 0.2s;
    margin-left: 8px;
}
.nav-cta:hover {
    background: var(--accent-glow);
    box-shadow: 0 0 16px var(--accent-glow);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: 0.3s;
}

/* ── Hero ── */
.hero {
    min-height: 100vh;
    padding: 120px 5% 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Wrapper para centralizar a hero section na tela cheia */
.hero-wrapper {
    display: flex;
    justify-content: center;
}

.hero-content { flex: 1; min-width: 0; }

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--green);
    background: rgba(74,222,128,0.08);
    border: 1px solid rgba(74,222,128,0.2);
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 24px;
    letter-spacing: 0.3px;
}

.dot {
    width: 7px;
    height: 7px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 700;
    line-height: 1.15;
    color: #fff;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

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

.hero-sub {
    font-size: 1rem;
    color: var(--muted);
    margin-bottom: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
}

.divider { margin: 0 4px; opacity: 0.4; }

.hero-desc {
    font-size: 1.05rem;
    color: #b0b0c8;
    max-width: 480px;
    margin-bottom: 36px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 12px 28px;
    border-radius: var(--radius);
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 24px var(--accent-glow);
}
.btn-primary:hover {
    opacity: 0.88;
    transform: translateY(-2px);
    box-shadow: 0 4px 32px var(--accent-glow);
}

.btn-ghost {
    color: var(--text);
    font-weight: 500;
    font-size: 0.92rem;
    padding: 11px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg3);
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.btn-ghost:hover {
    border-color: rgba(124,106,247,0.4);
    background: var(--bg3);
    transform: translateY(-2px);
}

.hero-socials {
    display: flex;
    gap: 12px;
}
.hero-socials a {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 1rem;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.hero-socials a:hover {
    color: var(--accent2);
    border-color: rgba(124,106,247,0.4);
    background: var(--accent-glow);
}

/* ── Code Window ── */
.hero-code {
    flex: 0 0 380px;
    max-width: 380px;
}

.code-window {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow), 0 0 60px rgba(124,106,247,0.08);
}

.code-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 12px 16px;
    background: var(--bg3);
    border-bottom: 1px solid var(--border);
}

.code-bar .dot { animation: none; border-radius: 50%; width: 12px; height: 12px; }
.code-bar .dot.red    { background: var(--red); }
.code-bar .dot.yellow { background: var(--yellow); }
.code-bar .dot.green  { background: var(--green); }

.code-filename {
    margin-left: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--muted);
}

.code-body {
    padding: 20px 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    line-height: 1.9;
    overflow-x: auto;
}

.c-keyword { color: #c792ea; }
.c-var     { color: #82aaff; }
.c-prop    { color: #f07178; }
.c-str     { color: #c3e88d; }
.c-bool    { color: #ff9d57; }

/* ── Sections ── */
.section {
    padding: 80px 5%;
}
.section-alt {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    font-size: 1.7rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}
.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 2px;
    margin-top: 10px;
}

.section-sub {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 6px;
    margin-bottom: 40px;
}

/* ── About ── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-top: 40px;
    align-items: start;
}

.about-text p {
    color: #b0b0c8;
    margin-bottom: 16px;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-content: flex-start;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    transition: border-color 0.2s, color 0.2s;
}
.skill-tag:hover {
    border-color: rgba(124,106,247,0.4);
    color: var(--accent2);
}
.skill-tag i { color: var(--accent); font-size: 0.9rem; }

/* ── Repos Grid ── */
.repos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.repo-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    animation: fadeUp 0.5s both;
}
.repo-card:hover {
    border-color: rgba(124,106,247,0.35);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.repo-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--accent2);
    display: flex;
    align-items: center;
    gap: 8px;
}
.repo-name i { color: var(--muted); font-size: 0.85rem; }

.repo-desc {
    font-size: 0.85rem;
    color: var(--muted);
    flex: 1;
    line-height: 1.5;
}

.repo-meta {
    display: flex;
    gap: 14px;
    font-size: 0.8rem;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
}
.repo-meta span { display: flex; align-items: center; gap: 5px; }

.repo-loading {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--muted);
    padding: 40px;
    font-size: 0.9rem;
}

/* ── Carreira (dinâmica) ── */
.career-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 32px 0;
}

.career-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    border-left: 3px solid var(--accent);
    transition: transform 0.2s, box-shadow 0.2s;
}
.career-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.job-title { color: var(--accent2); font-weight: 600; font-size: 1rem; }
.job-company { color: var(--text); }
.job-dates { color: var(--muted); font-size: 0.83rem; font-family: 'JetBrains Mono', monospace; }

.skills-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 24px 0 32px;
}
.skills-list li {
    color: #b0b0c8;
    padding-left: 16px;
    position: relative;
    font-size: 0.95rem;
}
.skills-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* ── Footer ── */
footer {
    padding: 32px 5%;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.85rem;
}

.footer-socials { display: flex; gap: 12px; }
.footer-socials a {
    color: var(--muted);
    font-size: 1rem;
    transition: color 0.2s;
}
.footer-socials a:hover { color: var(--accent2); }

.accent { color: var(--accent); }
.center { text-align: center; }
.mt-2 { margin-top: 16px; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .hero { flex-direction: column; gap: 40px; padding-top: 100px; }
    .hero-code { flex: none; max-width: 100%; width: 100%; }
    .about-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 640px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 64px; left: 0; right: 0;
        background: var(--bg2);
        border-bottom: 1px solid var(--border);
        padding: 16px 5%;
        gap: 4px;
    }
    .nav-cta { margin-left: 0; }
    footer { flex-direction: column; gap: 12px; text-align: center; }
    .hero-title { font-size: 2rem; }
    .repos-grid { grid-template-columns: 1fr; }
}
