/* Portfolio */

@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/fonts/rubik-latin.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
}

:root {
  --bg: #121826;
  --bg-top: #1b2233;
  --bg-deep: #0d121c;
  --surface: #222a3c;
  --surface-2: #141a28;
  --term: #0a0e14;
  --border: #2a3347;

  --primary: #3568d4;
  --primary-dark: #234898;
  --blue-soft: #4d8af0;
  --eyebrow: #6e9bf5;

  --text: #ffffff;
  --text-2: #c9d1de;
  --muted: #9ea8b8;
  --muted-2: #6b7689;

  --coin: #f5c518;
  --success: #25b86b;
  --error: #e95858;

  --radius: 12px;
  --shadow-offset: 4px;
  --maxw: 1140px;

  --font: "Rubik", system-ui, -apple-system, Segoe UI, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--bg-deep);
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
  border: 2px solid var(--bg-deep);
}
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

::selection { background: rgba(53, 104, 212, 0.55); color: #fff; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; color: var(--text); }
p { margin: 0; }
code { font-family: var(--mono); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--eyebrow);
  margin-bottom: 16px;
  white-space: nowrap;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue-soft);
}

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

/* ---------- Botões ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 15px;
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  background: transparent;
  color: var(--text);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.btn .btn-face {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius);
  position: relative;
  z-index: 1;
  transition: transform 0.08s ease;
}
.btn .btn-shadow {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--shadow-offset);
  bottom: 0;
  border-radius: var(--radius);
  z-index: 0;
}
.btn-primary .btn-face { background: var(--primary); }
.btn-primary .btn-shadow { background: var(--primary-dark); }
.btn-primary { padding-bottom: var(--shadow-offset); color: #fff; }
.btn-primary:hover .btn-face { transform: translateY(-1px); }
.btn-primary:active .btn-face { transform: translateY(var(--shadow-offset)); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.btn-ghost:hover {
  border-color: var(--blue-soft);
  background: rgba(77, 138, 240, 0.08);
  color: var(--text);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--bg);
}
.site-header.scrolled { border-bottom-color: var(--border); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}
.brand:hover { color: var(--text); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a { font-size: 14px; font-weight: 500; color: var(--muted); }
.nav-links a:hover { color: var(--text); }

.nav-cta { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  color: var(--text);
  cursor: pointer;
  line-height: 0;
}

.mobile-menu {
  display: none;
  position: fixed;
  inset: 64px 0 auto 0;
  z-index: 49;
  padding: 16px 24px 20px;
  background: var(--bg-top);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  gap: 14px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { color: var(--text-2); font-weight: 600; font-size: 16px; }
.mobile-menu .btn { align-self: flex-start; margin-top: 6px; }

/* ---------- Seções ---------- */
.section { padding: 88px 0; position: relative; }
.section-head { margin-bottom: 40px; }
.section-head h2 {
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  max-width: none;
}
.section-head p {
  color: var(--muted);
  font-size: 17px;
  max-width: 62ch;
}

/* ---------- Home ---------- */
.home-hero {
  position: relative;
  padding: 56px 0 64px;
}
.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 48px;
  align-items: center;
}
.home-hero h1 {
  font-size: clamp(40px, 5.5vw, 58px);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 0 0 18px;
}
.home-lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 48ch;
  margin-bottom: 16px;
}
.home-lead-2 { margin-bottom: 28px; font-size: 16.5px; }
.home-lead strong { color: var(--text); font-weight: 600; }
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}
.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.hero-links a:hover { color: var(--blue-soft); }
.hero-links svg,
.btn-ghost svg,
.btn-face svg,
.contato span svg,
.footer-bottom a svg,
.skills-grid h3 svg,
.nav-toggle svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  flex-shrink: 0;
}
.btn-face svg { width: 18px; height: 18px; }
.nav-toggle svg { width: 24px; height: 24px; }

.about-grid {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}
.about-grid li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.about-grid svg {
  width: 22px;
  height: 22px;
  color: var(--blue-soft);
  stroke-width: 2;
  flex-shrink: 0;
  margin-top: 2px;
}
.about-grid strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}
.about-grid span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.home-panel { width: 100%; }
.home-term {
  border-radius: 14px;
  overflow: hidden;
  background: var(--term);
  border: 1px solid var(--border);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.55);
}
.home-term .term-body {
  position: relative;
  min-height: 0;
  padding: 16px 18px 18px;
  font-size: 13.5px;
}
.home-narrow { max-width: 820px; }
.home-copy p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
  margin-bottom: 16px;
  max-width: 68ch;
}
.section-alt {
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 40px;
}
.skills-grid article { margin: 0; }
.skills-grid h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--blue-soft);
}
.skills-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.skills-grid li {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.45;
}

/* ---------- Terminal ---------- */
.term-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--surface);
}
.term-bar i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.term-bar .r { background: var(--error); }
.term-bar .y { background: #f5b942; }
.term-bar .g { background: var(--success); }
.term-bar span { margin-left: 8px; color: var(--muted-2); font-size: 12px; font-weight: 500; }
.term-body {
  font-family: var(--mono);
  line-height: 1.65;
}
.term-line { white-space: pre-wrap; word-break: break-word; color: var(--muted); }
.term-line .p { color: var(--success); }
.term-line .c { color: #e8edf5; }
.term-line .warn { color: var(--coin); }
.term-line .ok { color: var(--success); }

.cursor-blink {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  background: var(--blue-soft);
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* ---------- Experiência ---------- */
.experiencia {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.experiencia > li {
  position: relative;
  padding: 0 0 32px 28px;
  border-left: 1px solid var(--border);
}
.experiencia > li:last-child { padding-bottom: 0; }
.experiencia > li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border);
  box-shadow: 0 0 0 3px var(--bg-deep);
}
.experiencia > li.exp-atual::before {
  background: var(--success);
  box-shadow: 0 0 0 3px var(--bg-deep);
}
.exp-topo {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}
.exp-info { flex: 1 1 180px; min-width: 0; }
.experiencia h3 { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.exp-periodo {
  margin: 0;
  color: var(--muted-2);
  font-size: 13px;
  font-family: var(--mono);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}
.exp-empresa {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.exp-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: contain;
  background: var(--surface-2);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.exp-resumo {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  max-width: 62ch;
}
.exp-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.exp-bullets li { margin: 0 0 6px; }
.exp-bullets li:last-child { margin-bottom: 0; }

.formacao-strip {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}
.formacao {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 32px;
}
.formacao > li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.formacao strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}
.formacao .exp-periodo {
  margin-left: auto;
  align-self: flex-start;
}
.exp-logo-light {
  background: #fff;
}

/* ---------- Projeto destaque ---------- */
.project-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px 56px;
  align-items: center;
}
.project-copy { min-width: 0; }
.project-copy .eyebrow { margin-bottom: 14px; }
.project-copy h2 {
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  max-width: none;
}
.project-copy > p {
  color: var(--muted);
  font-size: 16.5px;
  max-width: 48ch;
  margin-bottom: 14px;
  line-height: 1.6;
}
.project-meta {
  color: var(--muted-2);
  font-size: 13px;
  font-family: var(--mono);
  margin-bottom: 16px !important;
}
.project-shots {
  display: flex;
  gap: 18px;
  align-items: flex-end;
}
.device { width: var(--w); filter: drop-shadow(0 30px 44px rgba(0, 0, 0, 0.55)); }
.device-frame {
  position: relative;
  background: linear-gradient(160deg, #3a4254 0%, #1a1f2b 40%, #0c0f16 100%);
  border-radius: calc(var(--w) * 0.16);
  padding: calc(var(--w) * 0.041);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 1px 0 rgba(0, 0, 0, 0.4);
}
.device-screen {
  border-radius: calc(var(--w) * 0.12);
  overflow: hidden;
  background: var(--term);
}
.device-screen img { width: 100%; height: auto; display: block; }
.device-island {
  position: absolute;
  top: calc(var(--w) * 0.075);
  left: 50%;
  transform: translateX(-50%);
  width: calc(var(--w) * 0.04);
  height: calc(var(--w) * 0.04);
  border-radius: 50%;
  z-index: 3;
  background: radial-gradient(circle at 35% 30%, #2a3a52, #05070c 68%);
}
.project-shots .device {
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.45));
}
.project-shots .device:nth-child(2) {
  transform: translateY(12px) rotate(2deg);
}
.project-shots .device:first-child {
  transform: rotate(-2deg);
}

/* ---------- Contato ---------- */
.contato {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 32px 0 0;
  padding: 0;
  max-width: 420px;
}
.contato li + li {
  border-top: 1px solid var(--border);
}
.contato a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  transition: color 0.15s ease;
}
.contato span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  color: var(--muted-2);
  font-size: 14px;
  font-weight: 500;
}
.contato strong {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  text-align: right;
  word-break: break-word;
}
.contato a:hover strong { color: var(--blue-soft); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 28px;
  background: var(--bg-deep);
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.footer-bottom a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-weight: 600;
}
.footer-bottom a:hover { color: var(--text); }

/* ---------- Motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.06s; }
.reveal[data-delay="2"] { transition-delay: 0.12s; }
.reveal[data-delay="3"] { transition-delay: 0.18s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .section { padding: 64px 0; }
  .home-hero { padding: 36px 0 48px; }
  .home-hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .formacao,
  .project-block,
  .skills-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }
  .project-shots {
    justify-content: center;
    margin-top: 8px;
  }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-cta .btn { display: none; }
  .nav-toggle { display: block; }
}
