:root {
  /* Tema Noturno */
  color-scheme: dark;
  --background: #141413;
  --foreground: #f0eee8;
  --secondary: #1d1d1b;
  --muted-foreground: #9c9a92;
  --accent: #b8e34a;
  --accent-hover: #c9ee66;
  --on-accent: #173404;
  --border: #2e2e2b;
  --code-background: #1a1a18;
  --code-muted: #7a786f;
  --code-text: #e4e2da;
  --code-highlight: #b8e34a;

  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.muted { color: var(--muted-foreground); }
.mt-4 { margin-top: 16px; }

.icon {
  width: 16px; height: 16px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon-sm { width: 13px; height: 13px; }
.inline-icon { display: inline-flex; align-items: center; gap: 6px; }

.page-width { width: calc(100% - 112px); max-width: 1320px; margin-inline: auto; }

/* Header */
.site-header {
  display: flex; justify-content: space-between; align-items: center;
  height: 104px; border-bottom: 1px solid var(--border);
}
.wordmark { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 17px; font-weight: 500; }
.brand-symbol { font-weight: 700; }
.nav-links { display: flex; align-items: center; gap: 32px; font-size: 13px; }
.nav-link { color: var(--muted-foreground); transition: color .2s; }
.nav-link:hover { color: var(--accent); }
.nav-contact {
  display: flex; align-items: center; gap: 10px;
  padding-block: 7px; border-bottom: 1px solid var(--foreground);
}
.nav-contact .icon { width: 14px; height: 14px; transition: transform .2s; }
.nav-contact:hover .icon { transform: translate(2px, -2px); }

/* Hero */
.hero { position: relative; padding-top: 77px; padding-bottom: 46px; animation: enter .6s both; }
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 500; letter-spacing: 1.7px; text-transform: uppercase;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px rgb(184 227 74 / .18);
  animation: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;
}
.hero-heading { margin-top: 28px; font-size: 90px; line-height: 1.05; letter-spacing: -.01em; }
.hero-heading .outline-word { color: var(--muted-foreground); }
.hero-baseline { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-top: 34px; }
.hero-description { max-width: 455px; color: var(--muted-foreground); font-size: 16px; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 25px; }
.hero-note { color: var(--muted-foreground); text-align: right; font-size: 11px; line-height: 1.7; }
.hero-note strong { display: block; color: var(--foreground); font-weight: 500; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding-inline: 22px; border-radius: 3px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn .icon { width: 14px; height: 14px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { padding-inline: 20px; border: 1px solid var(--border); background: var(--background); }
.btn-secondary:hover { background: var(--secondary); border-color: var(--accent); color: var(--accent); }

/* Stack */
.tech-strip {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.tech-intro { color: var(--muted-foreground); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; }
.tech-item { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.tech-item .icon { width: 18px; height: 18px; }

/* Seções */
.section { padding-block: 58px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.section-title { font-size: 28px; }
.section-index {
  display: flex; align-items: center; gap: 16px;
  color: var(--muted-foreground); font-size: 11px; text-transform: uppercase; white-space: nowrap;
}
.section-index::before { content: ""; width: 30px; height: 1px; background: var(--border); }
.section-description { max-width: 350px; margin-top: 18px; color: var(--muted-foreground); font-size: 14px; line-height: 1.8; }

/* Atuação */
/* subgrid: as ilustrações dos dois cards ficam com a mesma altura, sem cortar o código */
.project-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto; column-gap: 25px; }
.focus-card { min-width: 0; display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start; }
.project-art {
  border: 1px solid var(--border);
  position: relative; overflow: hidden; aspect-ratio: 1.65; align-self: stretch; width: 100%;
  border-radius: 4px; background: var(--secondary);
}
.art-label {
  position: absolute; top: 18px; left: 18px;
  padding: 6px 9px; border-radius: 2px; background: var(--background);
  font-size: 9px; letter-spacing: 1px; text-transform: uppercase;
}

.nodes-art { background: #18201a; }
.nodes-art svg { width: 100%; height: 100%; display: block; transition: transform .5s; }
.focus-card:hover .nodes-art svg { transform: scale(1.035); }
.nodes-art .links path { fill: none; stroke: oklch(55% .08 140 / .55); stroke-width: 1.2; }
.nodes-art .flow path {
  fill: none; stroke: var(--code-highlight); stroke-width: 1.6;
  stroke-dasharray: 6 10; animation: flow 3s linear infinite;
}
.nodes-art .nodes > * { fill: oklch(33% .02 150); stroke: oklch(70% .06 140); stroke-width: 1.2; }
.nodes-art .hot > * { fill: var(--code-highlight); stroke: none; }

.code-art {
  display: flex; flex-direction: column; padding: 25px 28px; aspect-ratio: auto;
  background: var(--code-background); color: var(--code-text);
}
.code-titlebar { display: flex; align-items: center; gap: 5px; margin-bottom: 25px; color: var(--code-muted); font-size: 10px; }
.code-dot { width: 6px; height: 6px; border: 1px solid var(--code-muted); border-radius: 50%; }
.code-titlebar span:last-child { margin-left: 12px; }
.code-art pre { font-family: var(--font-mono); font-size: 12px; line-height: 1.9; white-space: pre-wrap; }
.code-green { color: var(--code-highlight); }
.code-comment { color: var(--code-muted); }
.code-footer {
  display: flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 15px;
  color: var(--code-highlight); font-family: var(--font-mono); font-size: 10px;
}
.caret { width: 6px; height: 11px; background: var(--code-highlight); animation: blink 1s steps(1) infinite; }

.project-tags { align-self: start; }
.project-text { display: flex; justify-content: space-between; align-items: start; gap: 15px; margin-top: 20px; }
.project-text h3 { font-size: 20px; }
.project-text p { margin-top: 7px; color: var(--muted-foreground); font-size: 12px; line-height: 1.7; }
.focus-open {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 50%;
  transition: background-color .2s, border-color .2s;
}
.focus-open .icon { width: 14px; height: 14px; }
.focus-open:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.project-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.project-tag { padding: 4px 8px; border: 1px solid var(--border); border-radius: 3px; color: var(--muted-foreground); font-size: 10px; }

/* Experiência */
.experience-section { border-top: 1px solid var(--border); }
.experience-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; }
.experience-row {
  display: grid; grid-template-columns: 1fr auto; gap: 18px;
  padding: 24px 0; border-bottom: 1px solid var(--border);
}
.experience-row:first-child { padding-top: 4px; }
.experience-row h3 { font-size: 18px; }
.experience-row p { margin-top: 8px; color: var(--muted-foreground); font-size: 12px; line-height: 1.8; }
.experience-list { margin-top: 12px; list-style: none; }
.experience-list li {
  position: relative; padding-left: 16px; margin-top: 6px;
  color: var(--muted-foreground); font-size: 12px; line-height: 1.7;
}
.experience-list li::before {
  content: ""; position: absolute; left: 0; top: .85em;
  width: 7px; height: 1px; background: var(--foreground);
}
.experience-date { padding-top: 4px; color: var(--muted-foreground); text-align: right; font-size: 10px; text-transform: uppercase; }
.date-place { display: inline-block; margin-top: 8px; text-transform: none; }

/* Sobre */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 90px; }
.about-text { font-family: var(--font-display); font-size: 21px; line-height: 1.65; }
.education-row { padding: 19px 0; border-top: 1px solid var(--border); }
.education-row h3 { font-size: 15px; }
.education-row p { margin-top: 5px; color: var(--muted-foreground); font-size: 12px; }

/* Contato */
.contact-section { padding-block: 55px 65px; border-top: 1px solid var(--border); }
.contact-top { display: flex; justify-content: space-between; align-items: center; gap: 25px; margin-top: 20px; }
.contact-heading { font-size: 52px; line-height: 1.2; }
.contact-mail {
  display: inline-flex; align-items: center; gap: 13px; margin-top: 22px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border); font-size: 15px; overflow-wrap: anywhere;
  transition: border-color .2s;
}
.contact-mail:hover { border-color: var(--accent); color: var(--accent); }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 28px; color: var(--muted-foreground); font-size: 12px; }
.contact-links a:hover { color: var(--foreground); }

/* Rodapé */
.site-footer {
  display: flex; justify-content: space-between;
  padding: 24px 0 48px; border-top: 1px solid var(--border);
  color: var(--muted-foreground); font-size: 10px;
}

/* Animações */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@keyframes enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes flow { to { stroke-dashoffset: -32; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* Responsivo */
@media (min-width: 1450px) {
  .hero-heading { font-size: 108px; }
  .hero { padding-top: 86px; padding-bottom: 57px; }
}

@media (max-width: 900px) {
  .page-width { width: calc(100% - 56px); }
  .nav-links { gap: 20px; }
  .hero-heading { font-size: 68px; }
  .tech-strip { flex-wrap: wrap; justify-content: start; gap: 20px 30px; }
  .tech-intro { width: 100%; }
  .experience-grid, .about-grid { gap: 35px; }
  .code-art { padding: 18px; }
  .code-art pre { font-size: 10px; }
  .contact-heading { font-size: 42px; }
}

@media (max-width: 600px) {
  .page-width { width: calc(100% - 40px); }
  .site-header { height: 80px; }
  .nav-links { gap: 0; }
  .nav-link { display: none; }
  .nav-contact { font-size: 11px; }
  .hero { padding-top: 51px; padding-bottom: 34px; }
  .hero-heading { margin-top: 23px; font-size: 48px; line-height: 1.1; }
  .eyebrow { font-size: 9px; letter-spacing: 1px; }
  .hero-baseline { display: block; margin-top: 23px; }
  .hero-description { font-size: 14px; }
  .hero-note { display: none; }
  .hero-actions { gap: 9px; }
  .btn { padding-inline: 16px; }
  .tech-strip { gap: 18px 23px; padding-block: 20px; }
  .tech-item { font-size: 11px; }
  .tech-item .icon { width: 15px; }
  .section { padding-block: 36px; }
  .section-title { font-size: 24px; }
  .section-index { gap: 8px; font-size: 9px; }
  .section-index::before { width: 15px; }
  .project-grid { grid-template-columns: 1fr; }
  .focus-card + .focus-card { margin-top: 30px; }
  .nodes-art { aspect-ratio: 1.5; }
  .code-art { padding: 25px; }
  .code-art pre { font-size: 11px; }
  .experience-grid, .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .experience-row { gap: 10px; }
  .experience-date { max-width: 96px; font-size: 9px; }
  .about-text { font-size: 19px; }
  .contact-top { display: block; }
  .contact-top > .btn { margin-top: 22px; }
  .contact-heading { font-size: 39px; }
  .contact-mail { gap: 7px; font-size: 12px; }
  .site-footer { gap: 15px; font-size: 9px; }
}

/* Botão só com ícone (GitHub, LinkedIn) */
.btn-icon { width: 46px; padding-inline: 0; }
.btn-icon .icon { width: 17px; height: 17px; }

/* Projetos */
.projects-section { border-top: 1px solid var(--border); }
.projects-intro { max-width: 520px; margin: -8px 0 28px; }
.projects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.project-card {
  display: flex; flex-direction: column;
  padding: 24px; border: 1px solid var(--border); border-radius: 4px;
  transition: border-color .2s, background-color .2s;
}
.project-card:hover { border-color: var(--accent); background: var(--secondary); }
.project-card-top { display: flex; align-items: center; gap: 12px; color: var(--muted-foreground); font-size: 11px; }
.project-num { font-family: var(--font-display); color: var(--accent); }
.project-repo { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); }
.project-arrow { margin-left: auto; width: 15px; height: 15px; color: var(--foreground); transition: transform .2s; }
.project-card:hover .project-arrow { transform: translate(2px, -2px); }
.project-card h3 { margin-top: 22px; font-size: 20px; }
.project-card > p { margin-top: 8px; color: var(--muted-foreground); font-size: 13px; line-height: 1.7; }
.project-highlights { margin: 14px 0 18px; list-style: none; }
.project-highlights li {
  position: relative; padding-left: 16px; margin-top: 6px;
  color: var(--muted-foreground); font-size: 12px; line-height: 1.7;
}
.project-highlights li::before {
  content: ""; position: absolute; left: 0; top: .85em;
  width: 7px; height: 1px; background: var(--foreground);
}
.project-highlights code { font-family: var(--font-mono); font-size: 11px; color: var(--foreground); }
.project-card .project-tags { margin-top: auto; }
.projects-more { margin-top: 30px; }

@media (max-width: 900px) {
  .projects-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .project-card { padding: 20px; }
  .project-card h3 { font-size: 18px; }
}

/* Destaques do tema Noturno */
.hero-heading .accent-word { color: var(--accent); }
.section-index { color: var(--muted-foreground); }
.section-index::before { background: var(--accent); }
.experience-list li::before, .project-highlights li::before { background: var(--accent); }
.tech-item .icon { color: var(--accent); }
.project-card:hover .project-arrow { color: var(--accent); }
.project-tag { transition: border-color .2s, color .2s; }
.focus-card:hover .project-tag, .project-card:hover .project-tag { border-color: #3a3a36; color: var(--foreground); }
