:root {
    --bg-color: #050505;
    --bg-darker: #000000;
    --text-main: #cccccc;
    --cyber-blue: #00d2ff;
    --cyber-green: #00ff41;
    --alert-red: #ff003c;
    --font-mono: 'Fira Code', monospace;
}

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

html {
    /* Ativa a rolagem suave nativa para links âncora */
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-mono);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

/* Navegação */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 210, 255, 0.15);
}

.logo {
    color: var(--cyber-blue);
    font-weight: 700;
    font-size: 1.2rem;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 18px;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* EFEITO PARALLAX */
.parallax-bg {
    background-image: radial-gradient(circle at center, #1a1a2e 0%, #050505 100%); 
    min-height: 100svh;
    display: grid;

    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

.parallax-bg-secondary {
    background-image: repeating-linear-gradient(45deg, #050505 25%, transparent 25%, transparent 75%, #050505 75%, #050505), 
                      repeating-linear-gradient(45deg, #050505 25%, #0a0a0a 25%, #0a0a0a 75%, #050505 75%, #050505);
    background-position: 0 0, 10px 10px;
    background-size: 20px 20px;

    position: relative;

}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1;
}

/* Hero Section */
.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 130px 20px 70px;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 1px solid var(--cyber-blue);
    margin-bottom: 20px;
    object-fit: cover;
}

.hero-content h1 {
    font-size: clamp(2rem, 7vw, 4rem);
    color: var(--cyber-blue);
    margin-bottom: 10px;
    text-shadow: 0 0 15px rgba(0, 210, 255, 0.4);
}

.terminal-prompt {
    font-size: 1.5rem;
    color: var(--cyber-green);
    margin-bottom: 40px;
    min-height: 3.2em;
    max-width: 100%;
}

/* Animação do cursor piscando */
.blink-cursor {
    animation: blink 1s step-end infinite;
}

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

/* Botões Estilo Cyber */
.btn-cyber {
    padding: 12px 30px;
    border: 1px solid var(--cyber-blue);
    background: rgba(0, 210, 255, 0.05);
    color: var(--cyber-blue);
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-cyber:hover {
    background: var(--cyber-blue);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.6);
}

/* Estruturas Comuns */
.container {
    padding: 100px 10%;
}

.bg-darker {
    background-color: var(--bg-darker);
}

.section-header {
    margin-bottom: 50px;
}

.section-header h2 {
    color: var(--cyber-blue);
    font-size: 2rem;
}

.divider {
    height: 1px;
    width: 80px;
    background: var(--cyber-green);
    margin-top: 10px;
    box-shadow: 0 0 10px var(--cyber-green);
}

/* Grid da sessão Sobre */
.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 50px;
    align-items: start;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.image-placeholder {
    width: 100%;
    height: 300px;
    border: 1px dashed #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    background: #080808;
    font-size: 0.9rem;
}

/* Grid da sessão Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 30px;
}

.skill-card {
    background: rgba(15, 15, 15, 0.8);
    border-left: 2px solid var(--cyber-blue);
    padding: 30px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-left-color: var(--cyber-green);
}

.skill-card h3 {
    margin-bottom: 15px;
    color: #fff;
    font-size: 1.2rem;
}

.skill-card ul {
    list-style: none;
}

.skill-card ul li {
    margin-bottom: 8px;
}

.skill-card ul li::before {
    content: '>';
    color: var(--cyber-green);
    margin-right: 10px;
    font-weight: bold;
}

/* Projetos */
.projects-container {
    position: relative;
    z-index: 2;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 40px;
}

.project-card {
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid #222;
    padding: 30px;
    backdrop-filter: blur(5px);
    transition: border-color 0.3s ease;
}

.project-card:hover {
    border-color: var(--cyber-blue);
}

.project-header {
    flex-wrap: wrap;
    gap: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.status-indicator {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 2px;
    font-weight: bold;
    letter-spacing: 1px;
}

.status-indicator.safe { background: rgba(0, 255, 65, 0.1); color: var(--cyber-green); border: 1px solid var(--cyber-green); }
.status-indicator.warning { background: rgba(255, 215, 0, 0.1); color: #ffd700; border: 1px solid #ffd700; }

.tech-stack {
    flex-wrap: wrap;
    margin-top: 25px;
    display: flex;
    gap: 15px;
}

.tech-stack span {
    font-size: 0.85rem;
    color: var(--cyber-blue);
    border-bottom: 1px solid rgba(0, 210, 255, 0.3);
}

/* Contato */
#contact {
    text-align: center;
    padding-bottom: 60px;
}

.contact-box p {
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.footer-credits {
    margin-top: 80px;
    font-size: 0.85rem;
    color: #555;
}

/* Camadas movidas por transform: também funcionam em telas de toque. */
[hidden] { display: none !important; }
section, footer { scroll-margin-top: 90px; }
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--cyber-green);
    outline-offset: 5px;
}
.parallax-bg, .parallax-bg-secondary { overflow: hidden; isolation: isolate; }
.parallax-layer {
    position: absolute;
    inset: -100px 0;
    pointer-events: none;
    transform: translate3d(0, var(--parallax-y, 0px), 0);
}
.parallax-glow {
    background: radial-gradient(ellipse at 25% 35%, #006d8c 0%, transparent 55%),
                radial-gradient(ellipse at 80% 65%, #124e30 0%, transparent 50%);
}
.parallax-grid {
    background-image: linear-gradient(#00d2ff30 1px, transparent 1px),
                      linear-gradient(90deg, #00d2ff30 1px, transparent 1px);
    background-size: 64px 64px;
}
.overlay { pointer-events: none; background: rgba(0, 0, 0, 0.4); }
.btn-cyber { display: inline-block; max-width: 100%; }
.menu-toggle {
    font: inherit;
    color: var(--cyber-blue);
    background: #080808;
    border: 1px solid var(--cyber-blue);
    padding: 10px 14px;
    min-height: 44px;
    cursor: pointer;
}
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; }
.about-grid > *, .skills-grid > *, .projects-grid > * { min-width: 0; }
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 24px;
}
@media (max-width: 1000px) {
    .navbar { padding: 12px 5%; flex-wrap: wrap; gap: 8px; }
    .nav-links { width: 100%; flex-wrap: wrap; gap: 4px 18px; }
    .navbar.menu-ready .nav-links { display: none; }
    .navbar.menu-ready.menu-open .nav-links { display: flex; }
    .container { padding: 64px 6%; }
    .about-grid { grid-template-columns: 1fr; gap: 24px; }
    .section-header { margin-bottom: 30px; }
    .section-header h2 { font-size: clamp(1.35rem, 5vw, 2rem); }
    .terminal-prompt { font-size: 1.1rem; }
    .skill-card, .project-card { padding: 24px; }
    .image-placeholder { height: 220px; }
    .footer-credits { margin-top: 48px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .parallax-layer { transform: none; }
    .skill-card:hover { transform: none; }
}

/* Formação, projetos e contato profissional. */
.education-card h3, .certificates-grid h3 { margin-top: 20px; }
.education-period { color: var(--cyber-green); margin-top: 8px; }
.project-link, .social-links a {
    color: var(--cyber-blue);
    text-underline-offset: 5px;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}
.project-link { margin-top: 24px; }
.project-link:hover, .social-links a:hover { color: var(--cyber-green); }
.social-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 24px; margin-top: 24px; }
.email-link { text-transform: none; letter-spacing: 0; }

/* Cenário local em planos independentes. */
.hero-scene { height: 190svh; position: relative; background: #050505; }
.scene-viewport { height: 100svh; min-height: 560px; position: sticky; top: 0; overflow: hidden; isolation: isolate; }
.scene-layer { position: absolute; inset: 0; width: 100%; height: 115%; object-fit: cover; pointer-events: none; transform: translate3d(0, var(--parallax-y, 0px), 0) scale(var(--scene-scale, 1)); transform-origin: center 70%; }
.scene-sky { z-index: 0; }
.scene-mountains { z-index: 2; }
.scene-foreground { z-index: 4; }
.scene-title { position: absolute; inset: 0; z-index: 3; height: 70%; padding: 100px 20px 0; justify-content: center; transform: translate3d(0, var(--parallax-y, 0px), 0); opacity: var(--title-opacity, 1); }
.scene-title h1 { font-family: Arial, sans-serif; font-size: clamp(4rem, 10vw, 9rem); line-height: 1; letter-spacing: -0.065em; color: #e9faf7; text-shadow: 0 4px 35px #06142088; margin: 22px 0; }
.title-dot { color: var(--cyber-blue); }
.hero-eyebrow { font-size: 0.75rem; letter-spacing: 0.28em; color: #9fd7db; }
.scene-title .terminal-prompt { font-size: clamp(1rem, 2vw, 1.3rem); margin-bottom: 18px; min-height: 2em; }
.scene-title .btn-cyber { background: #071924c9; font-size: 0.75rem; }
.scene-caption { position: absolute; bottom: 30px; left: 6%; right: 6%; display: flex; justify-content: space-between; gap: 20px; z-index: 5; color: #a0bec4; font-size: 0.7rem; letter-spacing: 0.08em; opacity: var(--title-opacity, 1); }
.hero-scene + #about { position: relative; background: #050505; }
.profile-column { display: grid; gap: 24px; }
.portrait-frame { border: 1px solid #22515c; background: #07121b; padding: 12px; }
.portrait-photo { display: block; width: 100%; height: 400px; aspect-ratio: 3 / 4; object-fit: cover; object-position: center top; }
.portrait-frame figcaption { padding: 16px 4px 4px; color: #fffffe; }
.portrait-frame figcaption span { display: block; font-size: 0.75rem; color: #87a1a7; margin-top: 4px; }
.project-network img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1000px) {
    .hero-scene { height: 165svh; }
    .scene-title { height: 65%; padding-top: 80px; }
    .scene-title h1 { font-size: clamp(3.5rem, 13vw, 6rem); }
    .hero-eyebrow { font-size: 0.6rem; letter-spacing: 0.1em; }
    .scene-layer { width: 160%; max-width: none; left: -30%; }
    .scene-caption { font-size: 0.6rem; }
    .portrait-frame { max-width: 440px; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-scene { height: 100svh; min-height: 560px; }
    .scene-viewport { position: relative; }
    .scene-layer, .scene-title { transform: none; }
    .scene-title, .scene-caption { opacity: 1; }
}

.scene-foreground img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scene-foreground::after { content: ''; position: absolute; top: 99.9%; left: 0; width: 100%; height: 100vh; background: #050505; }

/* Cenário de encerramento em toda a largura, com profundidades negativas. */
.footer-scene {
    position: relative;
    min-height: 200svh;
    background: var(--bg-color);
}
#contact.footer-scene { padding: 0; }
.footer-viewport {
    position: sticky;
    top: 0;
    min-height: 100svh;
    display: grid;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
    background: var(--bg-color);
}
.footer-layer { inset: 0; height: 150%; }
.footer-layer img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.footer-viewport::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(to bottom, #000 0%, #05050566 25%, #05050580 75%, #050505 100%);
}
.footer-content { position: relative; z-index: 2; min-width: 0; }
.footer-scene .footer-credits { color: #a0bec4; }
@media (prefers-reduced-motion: reduce) {
    .footer-scene { min-height: auto; }
    .footer-viewport { position: relative; }
}

/* Apresentação compacta, alinhada ao topo da foto. */
#about .section-header { margin-bottom: 24px; }
#about .about-grid {
    grid-template-columns: minmax(0, 895px) minmax(0, 340px);
    align-items: start;
    gap: 32px;
}
#about .education-card { margin-top: 24px; }
#about .profile-column { width: 100%; max-width: 340px; justify-self: start; }
@media (max-width: 1000px) {
    #about .section-header { margin-bottom: 20px; }
    #about .about-grid { grid-template-columns: 1fr; gap: 24px; }
    #about .profile-column { justify-self: center; }
}
