/* Identidade visual */
:root {
    --bg: #f7f8fa;
    --surface: #ffffff;
    --text: #172b3a;
    --muted: #516574;
    --border: #dce4e9;
    --navy: #101f2c;
    --navy-light: #192f3e;
    --accent: #2596be;
    --accent-dark: #126b8d;
    --accent-light: #8bd5eb;
    --radius: 14px;
    --max-width: 1160px;
}

/* Geral */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: var(--bg); color: var(--text); line-height: 1.65; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }
a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #2596be; outline-offset: 4px; }
.shell { width: min(var(--max-width), calc(100% - 64px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 30; top: 8px; left: 8px; transform: translateY(-160%); background: white; color: var(--text); padding: 10px 16px; border-radius: 6px; }
.skip-link:focus { transform: translateY(0); }

/* Navegação */
.navbar-container { position: sticky; top: 0; z-index: 20; background: var(--navy); border-bottom: 1px solid #2a404e; }
.navbar { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 700; letter-spacing: -0.8px; color: #f5f8fa; white-space: nowrap; }
.brand-accent { color: var(--accent-light); }
.logo { width: 42px; height: 42px; object-fit: contain; }
.navbar-items { display: flex; align-items: center; gap: 30px; padding: 0; margin: 0; list-style: none; }
.navbar-items a { font-size: 14px; color: #c7d5de; transition: color .2s; }
.navbar-items a:hover { color: #fff; }
.navbar-items .nav-contact { color: var(--accent-light); border: 1px solid #3b5c6c; padding: 8px 14px; border-radius: 7px; white-space: nowrap; }

/* Apresentação */
.hero { background: radial-gradient(ellipse at 88% 15%, #203e4d 0, transparent 48%), var(--navy); color: #f5f8fa; padding: 100px 0 110px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); align-items: center; gap: 72px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--accent-light); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.7px; margin-bottom: 20px; }
.status-dot { display: inline-block; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #75d6c2; box-shadow: 0 0 0 4px #75d6c218; }
.hero h1 { font-size: clamp(42px, 5.2vw, 70px); line-height: 1.05; letter-spacing: -2.8px; margin-bottom: 20px; }
.accent { color: var(--accent-light); }
.hero-lead { max-width: 620px; font-size: clamp(22px, 2.8vw, 32px); line-height: 1.3; font-weight: 600; letter-spacing: -.6px; color: #e5edf2; margin-bottom: 18px; }
.hero-description { max-width: 580px; color: #b9cbd5; font-size: 16px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 48px; padding: 10px 20px; border: 1px solid transparent; border-radius: 8px; font-size: 14px; font-weight: 700; transition: background .2s, border-color .2s; }
.btn-primary { background: #8bd5eb; color: #112b38; }
.btn-primary:hover { background: #b5e9f7; }
.btn-secondary { border-color: #516a78; color: #e5edf2; }
.btn-secondary:hover { background: #243d4c; }
.hero-meta { margin-top: 26px; font-size: 13px; color: #b0c3ce; }
.hero-meta span { margin: 0 6px; color: var(--accent-light); }

/* Diagrama ilustrativo */
.workflow-panel { min-width: 0; overflow: hidden; border: 1px solid #385362; border-radius: 16px; background: #152632; box-shadow: 0 24px 65px #07131b50; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 18px; border-bottom: 1px solid #334a58; color: #bbccd5; font: 12px/1.4 ui-monospace, Consolas, monospace; }
.panel-header > span:first-child { display: flex; align-items: center; gap: 12px; }
.panel-dots { display: flex; gap: 5px; }
.panel-dots i { width: 7px; height: 7px; border-radius: 50%; background: #628494; }
.panel-dots i:last-child { background: #75d6c2; }
.panel-label { color: var(--accent-light); font-size: 10px; letter-spacing: .8px; }
.workflow-body { padding: 24px; }
.workflow-caption { color: #a4b9c4; font: 12px/1.5 ui-monospace, Consolas, monospace; margin-bottom: 18px; }
.workflow-node { display: flex; align-items: center; gap: 13px; padding: 14px; border: 1px solid #3c5666; border-radius: 9px; background: #1b3342; }
.node-icon { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border-radius: 8px; background: #234a5e; color: #a3def0; font: bold 18px ui-monospace, Consolas, monospace; }
.workflow-node > div { flex: 1; min-width: 0; }
.workflow-node strong { display: block; font-size: 14px; color: #edf5f8; }
.workflow-node small { display: block; color: #aec1cd; font-size: 11px; margin-top: 2px; }
.node-index { font: 11px ui-monospace, Consolas, monospace; color: #9cb1be; }
.workflow-line { width: 1px; height: 20px; margin-left: 35px; background: #6c9eae; }
.workflow-end { display: flex; align-items: center; gap: 10px; margin: 20px 0 0; color: #9edacc; }

/* Seções */
.section { padding: 80px 0; }
.section-kicker { margin-bottom: 10px; color: var(--accent-dark); font: 700 12px/1.5 ui-monospace, Consolas, monospace; text-transform: uppercase; letter-spacing: 1.4px; }
.section h2 { font-size: clamp(28px, 3.5vw, 40px); line-height: 1.2; letter-spacing: -1.3px; margin-bottom: 20px; }
.section-heading { max-width: 740px; margin-bottom: 32px; }
.section-heading > p:last-child, .about-grid > div:first-child > p:not(.section-kicker) { color: var(--muted); font-size: 16px; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: start; }
.about-grid > div:first-child > p + p:not(.section-kicker) { margin-top: 15px; }
.stack-panel { padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.stack-panel h3 { font-size: 20px; margin-bottom: 16px; }
.stack-group + .stack-group { margin-top: 16px; }
.stack-group > p { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; padding: 0; margin: 0; }
.tags li { background: #eef4f7; border: 1px solid #dfebf0; color: #31566c; border-radius: 5px; padding: 4px 9px; font-size: 12px; line-height: 1.5; }
.tags.compact li { font-size: 11px; padding: 3px 8px; }

/* Experiência */
.experience { background: #edf2f5; border-block: 1px solid #e0e7eb; }
.experience-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.experience-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.experience-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px; background: #e5f2f7; border-radius: 8px; color: var(--accent-dark); font: 700 23px ui-monospace, Consolas, monospace; }
.card-number { position: absolute; top: 29px; right: 26px; color: #607b8b; font: 12px ui-monospace, Consolas, monospace; }
.experience-card h3 { font-size: 20px; margin-bottom: 8px; letter-spacing: -.3px; }
.experience-card > p { color: var(--muted); font-size: 15px; margin-bottom: 20px; }
.experience-card .tags { margin-top: auto; }

/* Projetos pessoais */
.projetos-container { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.card-projeto { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.card-projeto:hover { transform: translateY(-4px); box-shadow: 0 12px 28px #172b3a12; }
.project-image { display: block; margin: 12px 12px 0; border-radius: 8px; overflow: hidden; background: var(--accent); aspect-ratio: 1 / 1; }
.project-image:focus-visible { outline-offset: 2px; }
.project-image img { width: 100%; height: 100%; object-fit: contain; }
.card-content { display: flex; flex-direction: column; flex: 1; padding: 18px; }
.project-category { color: var(--accent-dark); font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; margin-bottom: 6px; }
.card-content h3 { font-size: 19px; letter-spacing: -.4px; line-height: 1.3; margin-bottom: 10px; }
.card-content > p:not(.project-category) { color: var(--muted); font-size: 14px; line-height: 1.6; margin-bottom: 18px; }
.card-content .tags { margin-top: auto; }
.project-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--accent-dark); font-size: 14px; font-weight: 700; padding-top: 14px; margin-top: 18px; border-top: 1px solid var(--border); }
.project-link:hover { color: #084761; }

/* Contato — estilo e funcionamento originais preservados */
.contact-container { text-align: center; padding: 5rem 0 2rem; background-color: #44749d; }
.contact-container h2 { color: #fff; font-size: 36px; margin-bottom: 10px; }
.contact-container p { color: #fff; font-size: 20px; margin: 0 16px 40px; }
.contact-container input, .contact-container textarea { width: 200px; padding: 10px 20px; font-size: 16px; border-radius: 5px; border: 1px solid #ccc; margin: 0 10px 20px; }
.contact-container textarea { display: block; margin: 0 auto 20px; width: 470px; max-width: 100%; height: 150px; }
.contact-container input[type='submit'] { display: block; margin: 0 auto; background-color: #363535; color: #fff; cursor: pointer; }
.contact-container input:focus-visible, .contact-container textarea:focus-visible { outline-color: #fff; }
.form-alert { background-color: #036418; color: white; padding: 15px; border-radius: 5px; text-align: center; margin: 15px auto 0; width: min(470px, calc(100% - 32px)); font-weight: bold; transition: opacity .5s ease; }
.hidden { display: none; }

/* Rodapé */
footer { background: var(--navy); color: #c4d2dc; font-size: 13px; }
.footer-content { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 24px; }
.footer-content a { color: var(--accent-light); }

/* Responsividade */
@media (max-width: 1000px) {
    .hero-grid, .about-grid { gap: 36px; }
    .hero { padding: 76px 0 84px; }
    .projetos-container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .project-image { aspect-ratio: 16 / 10; }
}
@media (max-width: 760px) {
    .shell { width: calc(100% - 40px); }
    .navbar { gap: 10px; }
    .navbar-items { gap: 16px; }
    .navbar-items a { font-size: 13px; }
    .brand { font-size: 19px; }
    .hero-grid, .about-grid { grid-template-columns: 1fr; }
    .hero { padding: 64px 0; }
    .hero-grid { gap: 42px; }
    .hero h1 { letter-spacing: -1.9px; }
    .workflow-panel { max-width: 520px; width: 100%; }
    .section { padding: 58px 0; }
    .experience-grid { gap: 12px; }
    .experience-card { padding: 20px; }
}
@media (max-width: 520px) {
    html { scroll-padding-top: 125px; }
    .navbar { flex-direction: column; align-items: flex-start; padding: 10px 0 12px; }
    .brand { gap: 7px; }
    .logo { width: 34px; height: 34px; }
    .navbar-items { width: 100%; justify-content: space-between; gap: 8px; }
    .navbar-items a { font-size: 12px; }
    .navbar-items .nav-contact { padding: 5px 8px; }
    .shell { width: calc(100% - 32px); }
    .hero { padding: 48px 0; }
    .hero h1 { font-size: 42px; }
    .hero-actions { gap: 10px; }
    .btn { flex: 1 1 100%; }
    .hero-meta { font-size: 12px; }
    .hero-meta span { margin: 0 3px; }
    .workflow-body { padding: 16px; }
    .workflow-node { padding: 10px; gap: 9px; }
    .workflow-node strong { font-size: 13px; }
    .workflow-node small { font-size: 10px; }
    .workflow-line { margin-left: 31px; }
    .stack-panel { padding: 20px; }
    .experience-grid, .projetos-container { grid-template-columns: 1fr; }
    .project-image { aspect-ratio: 1 / 1; }
    .contact-container { padding: 3rem 2rem; }
    .contact-container input, .contact-container textarea { width: 100%; margin: 10px 0; }
    .contact-container input[type='submit'] { margin-top: 10px; }
    .contact-container p { font-size: 17px; margin: 0 0 24px; }
    .footer-content { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}