:root,
[data-theme="dark"] {
  --bg: oklch(0.16 0.01 260);
  --bg-alt: oklch(0.195 0.012 260);
  --card: oklch(0.215 0.013 260);
  --border: oklch(1 0 0 / 0.09);
  --fg: oklch(0.96 0.01 260);
  --muted: oklch(0.68 0.02 260);
  --muted-faint: oklch(0.5 0.02 260);
  --on-accent: oklch(0.16 0.01 260);
  --code-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.5);
  --code-prop: #9cdcfe;
  --theme-icon-bg: oklch(0.9 0.02 90);
  --theme-icon-shadow: none;
}

[data-theme="light"] {
  --bg: oklch(0.985 0.004 260);
  --bg-alt: oklch(0.965 0.006 260);
  --card: oklch(0.997 0.002 260);
  --border: oklch(0 0 0 / 0.09);
  --fg: oklch(0.2 0.012 260);
  --muted: oklch(0.42 0.02 260);
  --muted-faint: oklch(0.55 0.02 260);
  --on-accent: #fff;
  --code-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.15);
  --code-prop: #0550ae;
  --theme-icon-bg: oklch(0.3 0.01 260);
  --theme-icon-shadow: -4px 0 0 -2px var(--card);
}

:root {
  --accent: #4c8dff;
  --font-body: 'Inter', sans-serif;
  --font-head: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
  transition: background .2s, color .2s;
}

::selection { background: color-mix(in oklch, var(--accent) 35%, transparent); }

a { color: inherit; }

.accent { color: var(--accent); }

/* ---------- Header ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 48px;
  background: color-mix(in oklch, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.wordmark { display: flex; align-items: center; gap: 10px; }

.wordmark-box {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.wordmark-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.wordmark-text--sm { font-size: 16px; }

.nav { display: flex; gap: 32px; flex-wrap: wrap; }

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

.nav a:hover { color: var(--fg); }

.header-controls { display: flex; align-items: center; gap: 16px; }

.lang-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  border: none;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 600;
  background: transparent;
  color: var(--muted);
}

.lang-btn.active { background: var(--accent); color: var(--on-accent); }

.theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--theme-icon-bg);
  box-shadow: var(--theme-icon-shadow);
}

/* ---------- Hero ---------- */

.hero { padding: 96px 48px 80px; max-width: 1280px; margin: 0 auto; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-head);
  font-size: 56px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 24px;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--muted);
  max-width: 520px;
  margin: 0 0 36px;
}

.hero-cta-row { display: flex; gap: 16px; margin-bottom: 48px; flex-wrap: wrap; }

.cta-primary,
.cta-secondary {
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  display: inline-block;
}

.cta-primary { background: var(--accent); color: var(--on-accent); }
.cta-secondary { border: 1px solid var(--border); color: var(--fg); }

.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; }

.stat-num { font-family: var(--font-head); font-size: 28px; font-weight: 700; }
.stat-label { font-size: 13px; color: var(--muted); margin-top: 4px; }

.hero-visual { display: flex; justify-content: center; }

.code-window {
  width: 100%;
  max-width: 420px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--code-shadow);
}

.code-window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.code-window-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.code-window-body {
  background: var(--card);
  padding: 22px 20px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.9;
  overflow-x: auto;
}

.code-indent { padding-left: 20px; }
.code-keyword { color: #c586c0; }
.code-var { color: #4fc1ff; }
.code-prop { color: var(--code-prop); }
.code-string { color: #ce9178; }
.code-number { color: #b5cea8; }

/* ---------- Sections ---------- */

.section { padding: 90px 48px; }
.section-alt { padding: 90px 48px; background: var(--bg-alt); }
.section-inner { max-width: 1280px; margin: 0 auto; }

.section-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-head);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

.section-subtitle { font-size: 16px; color: var(--muted); max-width: 560px; margin: 0 0 40px; }
.body-text { font-size: 16px; color: var(--muted); max-width: 560px; margin: 0 0 16px; }

/* ---------- Sobre ---------- */

.sobre-grid { display: grid; grid-template-columns: 280px 1fr; gap: 56px; align-items: start; }
.sobre-photo { width: 280px; height: 340px; }

.img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 12px;
  background: color-mix(in oklch, currentColor 6%, transparent);
  border: 1.5px dashed color-mix(in oklch, currentColor 35%, transparent);
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Tecnologias ---------- */

.tech-categories { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }

.tech-category {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
}

.tech-category-title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 17px;
  margin: 0 0 16px;
}

.tech-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

.chip {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--fg);
}

.chip-highlight {
  background: color-mix(in oklch, var(--accent) 16%, var(--card));
  border: 1px solid color-mix(in oklch, var(--accent) 55%, transparent);
  color: var(--accent);
}

/* ---------- Experiencia ---------- */

.timeline { display: flex; flex-direction: column; }

.timeline-item { display: grid; grid-template-columns: 24px 1fr; gap: 24px; }

.timeline-dot-col { display: flex; flex-direction: column; align-items: center; }

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 6px;
  flex-shrink: 0;
}

.timeline-item:last-child .timeline-line { visibility: hidden; }
.timeline-line { width: 2px; flex: 1; background: var(--border); margin-top: 4px; }

.timeline-content { padding-bottom: 48px; }

.timeline-header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }

.timeline-company { font-family: var(--font-head); font-weight: 700; font-size: 19px; }
.timeline-duration { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.timeline-role { font-size: 14px; color: var(--muted); margin-top: 4px; margin-bottom: 10px; font-weight: 500; }
.timeline-desc { font-size: 15px; color: var(--muted); max-width: 620px; margin: 0; }

/* ---------- Projetos ---------- */

.projects-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; margin-bottom: 8px; }

.carousel-arrows { display: flex; gap: 10px; }

.arrow-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  cursor: pointer;
  font-size: 18px;
}

.arrow-btn:hover { border-color: var(--accent); color: var(--accent); }

.carousel-viewport { overflow: hidden; margin-top: 24px; }

.carousel-track { display: flex; transition: transform .45s cubic-bezier(.65,0,.35,1); }

.project-card {
  min-width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 4px;
}

.project-image { width: 100%; height: 320px; }

.project-title { font-family: var(--font-head); font-weight: 700; font-size: 26px; margin: 0 0 12px; }
.project-desc { font-size: 15px; color: var(--muted); margin: 0 0 18px; max-width: 440px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

.tag-chip {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--muted);
}

.dots { display: flex; gap: 8px; justify-content: center; margin-top: 32px; }

.dot-btn {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: var(--border);
  transition: all .25s;
  padding: 0;
}

.dot-btn.active { width: 22px; background: var(--accent); }

/* ---------- Contato ---------- */

.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
}

.form-label { display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }

.form-input,
.form-textarea {
  padding: 12px 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  font-size: 15px;
  font-family: var(--font-body);
}

.form-textarea { min-height: 110px; resize: vertical; }

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-submit {
  margin-top: 6px;
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  padding: 14px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.form-submit:disabled { opacity: .7; cursor: default; }

.contact-links { display: flex; flex-direction: column; gap: 14px; }

.channel {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--fg);
  transition: transform .15s, border-color .15s;
}

.channel:hover { transform: translateY(-2px); border-color: var(--accent); }

.channel-badge {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  background: color-mix(in oklch, var(--accent) 14%, var(--bg-alt));
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  text-transform: lowercase;
}

.channel-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.channel-value { font-size: 15px; font-weight: 500; }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--border); padding: 32px 48px; }

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-text { font-size: 13px; color: var(--muted); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .header { padding: 16px 24px; }
  .hero { padding: 56px 24px 56px; }
  .section, .section-alt { padding: 64px 24px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; }
  .hero-title { font-size: 42px; }
  .sobre-grid { grid-template-columns: 1fr; gap: 32px; }
  .sobre-photo { width: 100%; max-width: 280px; }
  .contact-grid { grid-template-columns: 1fr; }
  .project-card { grid-template-columns: 1fr; gap: 24px; }
  .project-image { height: 240px; }
}

@media (max-width: 560px) {
  .nav { gap: 18px; order: 3; width: 100%; justify-content: center; }
  .header { justify-content: center; }
  .hero-title { font-size: 34px; }
  .hero-stats { gap: 24px; }
  .hero-cta-row { flex-direction: column; align-items: stretch; }
  .cta-primary, .cta-secondary { text-align: center; }
}
