/* ============================================
   TOKENS
   ============================================ */
:root {
    /* superfícies */
    --ink-900: #0A0F1C;   /* fundo principal */
    --ink-800: #121A2B;   /* cartões / consola */
    --ink-700: #1B2438;   /* hover / superfície elevada */
    --line: rgba(230, 236, 248, 0.09);
    --line-strong: rgba(230, 236, 248, 0.18);

    /* texto */
    --paper: #E7ECF6;
    --muted: #8B95AE;
    --muted-dim: #5C647A;

    /* accent principal: âmbar de sinal */
    --accent: #F2B84B;
    --accent-dim: rgba(242, 184, 75, 0.14);

    /* estados */
    --secure: #45D18C;
    --secure-dim: rgba(69, 209, 140, 0.14);
    --denied: #F0685E;
    --denied-dim: rgba(240, 104, 94, 0.14);

    /* tipografia */
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

    --radius: 14px;
    --radius-sm: 8px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--ink-900);
    color: var(--paper);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* Foco visível para navegação por teclado */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

::selection {
    background: var(--accent-dim);
    color: var(--accent);
}

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

/* Rótulos "eyebrow" em monospace — usados como cabeçalhos técnicos */
.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    color: var(--accent);
    text-transform: lowercase;
    margin-bottom: 14px;
}

.eyebrow.center {
    text-align: center;
    margin-bottom: 8px;
}

/* ============================================
   TIPOGRAFIA
   ============================================ */
h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--paper);
    letter-spacing: -0.01em;
}

h1 {
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 18px;
}

h2.section-title {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 48px;
}

h2.section-title-left {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--paper);
    margin-bottom: 20px;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--paper);
    margin-bottom: 14px;
}

.description {
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 44ch;
    margin-bottom: 36px;
}

/* ============================================
   NAVEGAÇÃO
   ============================================ */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 15, 28, 0.75);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 1rem;
    color: var(--paper);
}

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

.nav-links a {
    font-size: 0.92rem;
    color: var(--muted);
    transition: color 0.2s ease;
}

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

.nav-icon {
    font-size: 1.05rem;
    color: var(--muted);
}

.nav-icon:hover { color: var(--accent); }

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    padding: 96px 0 100px 0;
    overflow: hidden;
}

.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 56px;
    align-items: center;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Botões */
.btn-primary {
    display: inline-block;
    background-color: var(--accent);
    color: var(--ink-900);
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn-primary:hover {
    background-color: #f7c869;
    transform: translateY(-2px);
}

.btn-ghost {
    display: inline-block;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong);
    color: var(--paper);
    font-weight: 500;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

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

/* Consola de estado — elemento assinatura */
.status-console {
    font-family: var(--font-mono);
    background: var(--ink-800);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.console-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.8rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--secure);
    box-shadow: 0 0 0 0 var(--secure-dim);
    animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(69, 209, 140, 0.5); }
    70%  { box-shadow: 0 0 0 8px rgba(69, 209, 140, 0); }
    100% { box-shadow: 0 0 0 0 rgba(69, 209, 140, 0); }
}

.console-body {
    list-style: none;
    padding: 8px 0;
}

.console-body li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 16px;
    padding: 12px 18px;
    font-size: 0.82rem;
    color: var(--muted);
    border-bottom: 1px dashed var(--line);
}

.console-body li:last-child { border-bottom: none; }

.value {
    font-weight: 600;
    letter-spacing: 0.02em;
}

.value.ok { color: var(--secure); }
.value.blocked { color: var(--denied); }
.value.neutral { color: var(--accent); }

/* ============================================
   SECÇÕES GERAIS
   ============================================ */
section {
    padding: 90px 0;
}

/* ============================================
   CARTÕES
   ============================================ */
.card {
    position: relative;
    background-color: var(--ink-800);
    padding: 36px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    transition: border-color 0.25s ease, transform 0.25s ease;
}

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

.card p {
    color: var(--muted);
    font-size: 0.98rem;
}

/* ============================================
   PROJETO
   ============================================ */
.project-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.project-header h3 {
    margin-bottom: 0;
    font-size: 1.4rem;
}

.badge {
    font-family: var(--font-mono);
    background-color: var(--secure-dim);
    color: var(--secure);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-card p {
    color: var(--muted);
    max-width: 60ch;
}

.project-subtitle {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--muted-dim);
    margin-bottom: 14px !important;
}

/* "Ecrã" de demonstração, com cantos tipo viewfinder */
.video-container {
    position: relative;
    background-color: var(--ink-900);
    border-radius: var(--radius-sm);
    height: 360px;
    margin-top: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
}

.video-container::before,
.video-container::after,
.video-placeholder::before,
.video-placeholder::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    border-color: var(--accent);
    border-style: solid;
    opacity: 0.7;
    z-index: 2;
    pointer-events: none;
}

.video-container::before { top: 14px; left: 14px; border-width: 2px 0 0 2px; }
.video-container::after  { top: 14px; right: 14px; border-width: 2px 2px 0 0; }
.video-placeholder::before { bottom: 14px; left: 14px; border-width: 0 0 2px 2px; position: absolute; }
.video-placeholder::after  { bottom: 14px; right: 14px; border-width: 0 2px 2px 0; position: absolute; }

.video-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--muted-dim);
}

.video-placeholder i {
    font-size: 3.4rem;
    margin-bottom: 14px;
    color: var(--accent);
}

.video-placeholder p {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--muted);
}

.video-embed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: var(--radius-sm);
}

/* ============================================
   RODAPÉ
   ============================================ */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 32px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-inner p {
    font-size: 0.85rem;
    color: var(--muted-dim);
}

.footer-icons {
    display: flex;
    gap: 20px;
}

.footer-icons a {
    color: var(--muted);
    font-size: 1.1rem;
    transition: color 0.2s ease;
}

.footer-icons a:hover { color: var(--accent); }

/* ============================================
   SOBRE MIM
   ============================================ */
.about-inner {
    display: grid;
    grid-template-columns: 0.85fr 1.6fr;
    gap: 56px;
    align-items: start;
}

.id-badge {
    background-color: var(--ink-800);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
}

.badge-photo {
    width: 88px;
    height: 88px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    overflow: hidden;
}

.badge-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.id-badge h3 {
    margin-bottom: 4px;
}

.badge-role {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 22px;
}

.badge-meta {
    list-style: none;
    text-align: left;
    border-top: 1px dashed var(--line-strong);
    padding-top: 16px;
}

.badge-meta li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    padding: 6px 0;
    color: var(--muted);
}

.badge-meta li span:last-child {
    color: var(--paper);
    font-weight: 500;
}

.badge-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--line-strong);
}

.badge-contact a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--muted);
    word-break: break-all;
    transition: color 0.2s ease;
}

.badge-contact a:hover {
    color: var(--accent);
}

.badge-contact i {
    flex-shrink: 0;
    width: 16px;
    text-align: center;
    color: var(--accent);
    font-size: 0.9rem;
}

.about-text p {
    color: var(--muted);
    font-size: 1.02rem;
    margin-bottom: 18px;
    max-width: 62ch;
}

.tech-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.tech-strip span {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--paper);
    background: var(--ink-800);
    border: 1px solid var(--line-strong);
    padding: 6px 14px;
    border-radius: 20px;
}

/* ============================================
   EXPERIÊNCIA
   ============================================ */
.timeline {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
    padding-left: 28px;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 5px;
    width: 1px;
    background: var(--line-strong);
}

.timeline-item {
    position: relative;
    padding-bottom: 40px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    top: 6px;
    left: -28px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--ink-900);
    border: 2px solid var(--accent);
}

.timeline-content {
    background-color: var(--ink-800);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 32px;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.timeline-content:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
}

.timeline-top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 4px;
}

.timeline-top h3 {
    margin-bottom: 0;
    font-size: 1.1rem;
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent);
    white-space: nowrap;
}

.timeline-org {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 12px;
}

.timeline-content p:last-child {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ============================================
   TRABALHOS
   ============================================ */
.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.project-header-text {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.project-header-text h3 {
    margin-bottom: 0;
    font-size: 1.4rem;
}

.work-link {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--muted);
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    transition: color 0.2s ease, border-color 0.2s ease;
}

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

.works-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.work-card h3 {
    font-size: 1.1rem;
}

.work-card p {
    color: var(--muted);
    font-size: 0.95rem;
}

.placeholder-work {
    border-style: dashed;
    border-color: var(--line-strong);
}

.placeholder-work:hover {
    border-color: var(--muted-dim);
    transform: none;
}

.badge.muted-badge {
    background: var(--ink-700);
    color: var(--muted);
}

.github-cta {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 24px;
    text-align: left;
}

.github-cta-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid var(--line-strong);
    border-radius: 50%;
}

.github-cta-text {
    flex: 1;
}

.github-cta-text h3 {
    margin-bottom: 6px;
}

.github-cta-text p {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0;
}

.github-cta-arrow {
    flex-shrink: 0;
    color: var(--muted);
    font-size: 1rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.github-cta:hover .github-cta-arrow {
    transform: translateX(4px);
    color: var(--accent);
}

/* ============================================
   CONTACTO / CTA
   ============================================ */
.cta {
    position: relative;
    overflow: hidden;
    text-align: center;
}

.cta-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 100%, #000 40%, transparent 100%);
    mask-image: radial-gradient(ellipse 80% 60% at 50% 100%, #000 40%, transparent 100%);
    pointer-events: none;
}

.cta-inner {
    position: relative;
}

.cta-text {
    color: var(--muted);
    max-width: 56ch;
    margin: 0 auto 32px;
}

.cta-actions {
    justify-content: center;
}

/* ============================================
   RESPONSIVO
   ============================================ */
@media (max-width: 860px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }

    h1 { font-size: 2.4rem; }

    .works-grid {
        grid-template-columns: 1fr;
    }

    .about-inner {
        grid-template-columns: 1fr;
    }

    .id-badge {
        max-width: 320px;
        margin: 0 auto;
    }

    .nav-links { gap: 18px; }

    .timeline-content {
        padding: 22px 20px;
    }
}

@media (max-width: 480px) {
    .nav-links a:not(.nav-icon) { display: none; }
    h1 { font-size: 2rem; }
    .hero { padding: 64px 0 72px 0; }
    section { padding: 64px 0; }

    .github-cta {
        flex-wrap: wrap;
    }

    .github-cta-arrow { display: none; }
}

/* ============================================
   ACESSIBILIDADE — reduz movimento
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
    html { scroll-behavior: auto; }
}