:root {
    color-scheme: dark;
    --bg: #101820;
    --surface: #17232e;
    --surface-raised: #1c2a36;
    --surface-soft: #202f3c;
    --ink: #e6edf3;
    --muted: #a2b0be;
    --line: #354655;
    --line-strong: #526575;
    --accent: #00c2d1;
    --accent-hover: #67e8f0;
    --accent-ink: #101820;
    --radius: 18px;
    --max: 1080px;
    --shadow: 0 16px 40px rgb(0 0 0 / 18%);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img,
svg {
    max-width: 100%;
}

a {
    color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--accent-hover);
    outline-offset: 4px;
}

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

.container,
header,
main,
footer {
    width: min(var(--max), calc(100% - 40px));
    margin-inline: auto;
}

section {
    padding-block: 76px;
    border-bottom: 1px solid var(--line);
}

h1,
h2,
h3 {
    color: var(--ink);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 850px;
    margin-bottom: 24px;
    font-size: clamp(2.7rem, 7vw, 5.5rem);
    font-weight: 760;
}

h2 {
    margin-bottom: 18px;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 720;
}

h3 {
    margin-bottom: 12px;
    font-size: 1.2rem;
    font-weight: 680;
}

p {
    color: var(--muted);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.eyebrow::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    content: "";
}

.section-intro {
    max-width: 700px;
    margin-bottom: 30px;
}

.muted,
small {
    color: var(--muted);
}

/* Cabeçalho e navegação */
header,
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-block: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
}

.brand span {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--accent);
    transform: rotate(45deg);
}

nav,
.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 22px;
}

nav a,
.nav-links a {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 550;
    text-decoration: none;
}

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

/* Apresentação */
.hero {
    padding-top: clamp(64px, 11vw, 130px);
    padding-bottom: clamp(76px, 12vw, 140px);
    border-bottom: 1px solid var(--line);
}

.hero p {
    max-width: 690px;
    margin-bottom: 30px;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.highlight {
    padding: 0.02em 0.15em 0.08em;
    background: var(--accent);
    color: var(--accent-ink);
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.hero-actions,
.button-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* Botões com contraste definido */
.button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease,
        border-color 0.2s ease, transform 0.2s ease;
}

.button:hover {
    border-color: var(--accent);
    background: var(--surface-raised);
    color: #ffffff;
    transform: translateY(-1px);
}

.button.primary {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--accent-ink);
}

.button.primary:hover {
    border-color: var(--accent-hover);
    background: var(--accent-hover);
    color: var(--accent-ink);
}

.button.secondary {
    border-color: var(--line-strong);
    background: var(--surface);
    color: var(--ink);
}

.button.secondary:hover {
    border-color: var(--accent);
    background: var(--surface-raised);
    color: #ffffff;
}

/* Sobre */
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
    gap: 24px;
    align-items: start;
}

.panel {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.panel p:last-child {
    margin-bottom: 0;
}

/* Ferramentas e tecnologias */
.skills {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-raised);
}

.skills h3 {
    margin-bottom: 16px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 11px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--ink);
    font-size: 0.85rem;
    font-weight: 560;
    line-height: 1.35;
}

/* Projetos */
.projects {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.project-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

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

.project-art {
    display: flex;
    min-height: 210px;
    align-items: center;
    justify-content: center;
    padding: 28px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-raised);
}

.art-green {
    background: #183b43;
}

.art-blue {
    background: #1b2836;
}

.art-pink {
    background: #302738;
}

.art-yellow {
    background: #203d49;
}

.project-body {
    padding: 24px;
}

.project-body p {
    margin-bottom: 18px;
}

.project-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: #253541;
    color: #d6e2eb;
    font-size: 0.75rem;
    font-weight: 650;
    line-height: 1.2;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.project-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Terminal e diagramas ilustrativos */
.terminal {
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #0b1117;
    color: #c8f7fa;
    box-shadow: 0 12px 30px rgb(0 0 0 / 24%);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8rem;
}

.terminal-header {
    display: flex;
    gap: 6px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
}

.terminal-header span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--line-strong);
}

.terminal-content {
    padding: 18px;
}

.terminal p,
.terminal .muted {
    margin-bottom: 7px;
    color: #a6cbd0;
    font-family: inherit;
    font-size: inherit;
}

.terminal .prompt {
    color: var(--accent-hover);
}

.diagram {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.node {
    display: inline-flex;
    min-width: 85px;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border: 1px solid #52717f;
    border-radius: 9px;
    background: #172b36;
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 650;
    text-align: center;
}

.diagram-arrow {
    color: var(--accent-hover);
    font-weight: 800;
}

/* Experiência profissional */

.experience-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.experience-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    min-width: 0;
}

.experience-card h3 {
    margin-bottom: 6px;
    overflow-wrap: anywhere;
}

.experience-card p {
    margin-bottom: 10px;
    overflow-wrap: anywhere;
}

.experience-card p:last-child {
    margin-bottom: 0;
}

.experience-date,
.experience-card .period {
    color: var(--muted);
    font-size: 0.88rem;
}

@media (max-width: 600px) {
    .experience-card {
        padding: 18px;
    }

    .experience-card .experience-header {
        flex-direction: column;
        gap: 4px;
    }
}

/* Formação */
.education-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.education-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.education-card h3 {
    margin-bottom: 10px;
}

.education-card p {
    margin-bottom: 10px;
}

.education-card p:last-child {
    margin-bottom: 0;
}

/* Cursos e certificações */
.cert-panel {
    margin-top: 22px;
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.cert-panel h3 {
    margin-bottom: 14px;
}

.cert-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cert-list li {
    position: relative;
    padding-left: 22px;
    color: var(--muted);
}

.cert-list li::before {
    position: absolute;
    top: 0.58em;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--accent);
    content: "";
}

/* Contato */
.contact-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-raised);
}

.contact-panel p:last-child {
    margin-bottom: 0;
}

/* Rodapé */
footer,
.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    padding-block: 28px;
}

footer p,
.footer p {
    margin: 0;
    font-size: 0.88rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.footer-links a {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 650;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Responsividade */
@media (max-width: 760px) {

    header,
    .site-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    nav,
    .nav-links {
        justify-content: flex-start;
        gap: 14px 18px;
    }

    section {
        padding-block: 58px;
    }

    .about-grid,
    .projects,
    .education-grid {
        grid-template-columns: 1fr;
    }

    .experience-card {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .cert-list {
        grid-template-columns: 1fr;
    }

    .contact-panel {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 480px) {

    .container,
    header,
    main,
    footer {
        width: min(var(--max), calc(100% - 28px));
    }

    h1 {
        font-size: clamp(2.4rem, 13vw, 3.7rem);
    }

    .panel,
    .skills,
    .project-body,
    .education-card,
    .cert-panel {
        padding: 20px;
    }

    .project-art {
        min-height: 175px;
        padding: 20px;
    }

    .button {
        width: 100%;
    }

    .hero-actions,
    .button-row {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Respeita a preferência por menos animações */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}