:root,
:root[data-theme="dark"] {
  --bg: #0e0f11;
  --surface: #17191c;
  --border: #2a2d32;
  --text: #ecedee;
  --muted: #9a9fa6;
  --accent: #c6f24e;
  --accent-ink: #0e0f11;
}
:root[data-theme="light"] {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --border: #dedcd4;
  --text: #16171a;
  --muted: #5d6168;
  --accent: #4a7a00;
  --accent-ink: #ffffff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 "Space Grotesk", system-ui, sans-serif;
  transition: background .2s, color .2s;
}
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; }

/* Navegação */
.nav {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 24px;
  padding: 14px max(16px, calc((100% - 1040px) / 2));
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.logo { font-family: "JetBrains Mono", monospace; font-weight: 600; color: var(--accent); text-decoration: none; }
.nav nav { display: flex; gap: 20px; margin-left: auto; }
.nav nav a { text-decoration: none; color: var(--muted); font-size: 15px; }
.nav nav a:hover { color: var(--text); }
.toggles { display: flex; gap: 8px; }
.chip {
  font: 600 13px "JetBrains Mono", monospace;
  min-width: 40px; height: 34px; padding: 0 10px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
}
.chip:hover { border-color: var(--accent); }

/* Seções */
main { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
section { padding: 96px 0 24px; }
h2 { font-size: clamp(26px, 4vw, 36px); margin-bottom: 32px; }

.hero { min-height: calc(100vh - 70px); display: flex; flex-direction: column; justify-content: center; padding-top: 48px; }
.hero h1 { font-size: clamp(40px, 8vw, 80px); letter-spacing: -.02em; }
.hero-role { font-size: clamp(20px, 3vw, 28px); margin: 0 0 16px; }
#rotator { display: inline-block; min-width: 9ch; }
#rotator::before { content: "/ "; color: var(--muted); }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 640px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn {
  display: inline-block; padding: 11px 20px;
  border: 1px solid var(--border); border-radius: 10px;
  text-decoration: none; font-weight: 500;
  transition: border-color .15s, transform .15s;
}
.btn:hover { border-color: var(--accent); transform: translateY(-2px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px; }
.card h3.mono { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 20px; }
.card h3.mono:first-child { margin-top: 0; }

.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.about-grid p { margin: 0 0 1em; }

.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  font: 12px "JetBrains Mono", monospace;
  padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted);
}
.plain { list-style: none; padding: 0; margin: 0; font-size: 15px; }
.plain li { margin-bottom: 6px; }

/* Linha do tempo */
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--border); }
.timeline > li { position: relative; padding: 0 0 36px 28px; }
.timeline > li::before {
  content: ""; position: absolute; left: -7px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.timeline > li:first-child::before { background: var(--accent); }
.timeline p { margin: 0 0 4px; max-width: 720px; }
.timeline p.mono { font-size: 13px; }
.timeline h3 { font-size: 20px; margin: 4px 0 8px; }
.highlights { margin: 12px 0 0; padding-left: 18px; max-width: 720px; color: var(--muted); font-size: 15px; }
.highlights li { margin-bottom: 6px; }
.highlights li::marker { color: var(--accent); }

/* Projetos */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.project { display: flex; flex-direction: column; gap: 12px; transition: border-color .15s, transform .15s; }
.project:hover { border-color: var(--accent); transform: translateY(-3px); }
.project h3 { font-size: 20px; margin: 0; }
.project p { margin: 0; color: var(--muted); font-size: 15px; flex: 1; }
.project footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0; border: 0; }
.project .link { font: 600 13px "JetBrains Mono", monospace; color: var(--accent); text-decoration: none; }
.project .link:hover { text-decoration: underline; }
.badge { font: 12px "JetBrains Mono", monospace; color: var(--muted); }

.contact { text-align: center; padding-bottom: 96px; }
.contact .lead { margin: 0 auto; }
.contact .actions { justify-content: center; }

body > footer {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
  max-width: 1040px; margin: 0 auto; padding: 24px 16px;
  border-top: 1px solid var(--border); font-size: 14px;
}
body > footer a { color: var(--accent); text-decoration: none; }
body > footer p { margin: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (max-width: 760px) {
  .nav { gap: 12px; flex-wrap: wrap; }
  .nav nav { order: 3; width: 100%; margin: 0; gap: 16px; overflow-x: auto; }
  .toggles { margin-left: auto; }
  .about-grid { grid-template-columns: 1fr; }
  section { padding-top: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
