:root {
  --bg: #0b1020;
  --bg-alt: #0f1629;
  --surface: #141c33;
  --surface-2: #1a2440;
  --border: rgba(148, 163, 184, 0.14);
  --text: #e6ebf5;
  --muted: #94a3b8;
  --primary: #3b82f6;
  --primary-2: #2563eb;
  --accent: #22d3ee;
  --radius: 16px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

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

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .6em; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); font-size: .9em; }
code { background: rgba(59, 130, 246, .12); color: #93c5fd; padding: .1em .4em; border-radius: 6px; }

.container { width: min(1140px, 92%); margin: 0 auto; }
.center { text-align: center; margin-top: 2.5rem; }

.grad {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform .2s, box-shadow .2s, background .2s;
  box-shadow: 0 10px 30px -10px rgba(59, 130, 246, .7);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -10px rgba(59, 130, 246, .9); }
.btn--ghost {
  background: transparent;
  border-color: var(--border);
  box-shadow: none;
}
.btn--ghost:hover { background: var(--surface); box-shadow: none; }
.btn--small { padding: .5rem 1.1rem; font-size: .9rem; }

/* ---------- Navegação ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(11, 16, 32, .82);
  backdrop-filter: blur(12px);
  border-color: var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav__logo { display: flex; align-items: center; gap: .65rem; font-weight: 700; }
.nav__badge {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-size: .85rem; color: #fff;
}
.nav__links { display: flex; align-items: center; gap: 1.75rem; }
.nav__links a:not(.btn) { color: var(--muted); font-weight: 500; font-size: .95rem; transition: color .2s; }
.nav__links a:not(.btn):hover,
.nav__links a.is-active { color: var(--text); }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: .3s; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 140px 0 80px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(59, 130, 246, .25), transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto auto -30% -15%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(34, 211, 238, .12), transparent 65%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 4rem;
  align-items: center;
}
.tag {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem .9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(20, 28, 51, .6);
  font-size: .85rem; color: var(--muted);
  margin-bottom: 1.5rem;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .2); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } }

.hero h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 800; }
.hero__role { font-size: 1.25rem; font-weight: 600; color: #cbd5e1; margin-bottom: 1rem; }
.hero__role span { color: var(--primary); margin: 0 .35rem; }
.hero__desc { color: var(--muted); font-size: 1.08rem; max-width: 560px; }
.hero__desc strong { color: var(--text); font-weight: 600; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; margin: 2rem 0; }

.socials { display: flex; gap: .75rem; }
.socials a {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform .2s, border-color .2s, background .2s;
}
.socials a:hover { transform: translateY(-3px); border-color: var(--primary); background: var(--surface-2); }
.socials svg { width: 20px; height: 20px; fill: var(--text); }

.hero__photo { position: relative; justify-self: center; }
.photo-frame {
  position: relative;
  width: min(380px, 80vw);
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  padding: 6px;
  background: linear-gradient(145deg, var(--primary), var(--accent) 60%, transparent);
  box-shadow: var(--shadow);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; border-radius: 22px; }
.floating {
  position: absolute;
  padding: .6rem 1rem;
  border-radius: 12px;
  background: rgba(20, 28, 51, .9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  font-size: .85rem; font-weight: 600;
  box-shadow: var(--shadow);
  animation: float 5s ease-in-out infinite;
}
.floating .mono { color: var(--accent); margin-right: .35rem; }
.floating--1 { top: 12%; left: -18%; }
.floating--2 { bottom: 10%; right: -14%; animation-delay: -2.5s; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* ---------- Números ---------- */
.stats { padding: 0 0 40px; }
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-alt));
}
.stat { text-align: center; }
.stat strong { display: block; font-size: 2rem; font-weight: 800; color: #fff; }
.stat span { color: var(--muted); font-size: .9rem; }

/* ---------- Seções ---------- */
.section { padding: 100px 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 3.5rem; }
.section h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); font-weight: 800; }
.section__sub { color: var(--muted); }
.eyebrow {
  font-family: var(--mono);
  color: var(--accent);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  margin-bottom: .75rem;
}

/* ---------- Sobre ---------- */
.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: 4rem; align-items: center; }
.about__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.about__text p { color: var(--muted); font-size: 1.05rem; }
.about__text strong { color: var(--text); }
.about__list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .75rem; }
.about__list li { position: relative; padding-left: 1.9rem; }
.about__list li::before {
  content: "✓";
  position: absolute; left: 0; top: .1rem;
  width: 1.3rem; height: 1.3rem;
  display: grid; place-items: center;
  font-size: .75rem; font-weight: 700;
  border-radius: 50%;
  background: rgba(59, 130, 246, .18);
  color: var(--primary);
}

/* ---------- Timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 220px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--primary), transparent);
}
.timeline__item { display: grid; grid-template-columns: 220px 1fr; gap: 3rem; position: relative; padding-bottom: 2.5rem; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: 214px; top: 10px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 3px solid var(--primary);
}
.timeline__meta { text-align: right; padding-top: .2rem; padding-right: 2rem; white-space: nowrap; }
.timeline__date { display: block; font-family: var(--mono); font-size: .9rem; color: var(--accent); }
.timeline__company { color: var(--muted); font-size: .95rem; }
.timeline__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color .25s, transform .25s;
}
.timeline__card:hover { border-color: rgba(59, 130, 246, .45); transform: translateX(4px); }
.timeline__card h3 { font-size: 1.3rem; }
.timeline__note { margin: -.4rem 0 1rem; font-family: var(--mono); font-size: .82rem; color: var(--accent); }
.timeline__card ul { margin: 0 0 1.25rem; padding-left: 1.1rem; color: var(--muted); }
.timeline__card li { margin-bottom: .35rem; }
.timeline__card li::marker { color: var(--primary); }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips span {
  font-size: .78rem;
  font-weight: 500;
  padding: .3rem .7rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, .1);
  border: 1px solid rgba(59, 130, 246, .25);
  color: #bfdbfe;
}
.chips--lg span { font-size: .9rem; padding: .45rem .95rem; }

/* ---------- Projetos ---------- */
.filters { display: flex; justify-content: center; gap: .5rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.filter {
  font: inherit; font-size: .9rem; font-weight: 500;
  padding: .5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: .2s;
}
.filter:hover { color: var(--text); }
.filter.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }

.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.project {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.9rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform .25s, border-color .25s, box-shadow .25s;
  overflow: hidden;
}
.project::before {
  content: "";
  position: absolute; inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity .25s;
}
.project:hover { transform: translateY(-6px); border-color: rgba(59, 130, 246, .4); box-shadow: var(--shadow); }
.project:hover::before { opacity: 1; }
.project--featured { grid-column: 1 / -1; background: linear-gradient(135deg, var(--surface-2), var(--surface)); }
.project.is-hidden { display: none; }
.project__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.project__icon {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  font-size: 1.4rem;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.project__lang { font-family: var(--mono); font-size: .8rem; display: flex; align-items: center; gap: .4rem; color: var(--muted); }
.project__lang::before { content: ""; width: 10px; height: 10px; border-radius: 50%; }
.lang--php::before { background: #777bb4; }
.lang--py::before { background: #3572a5; }
.project h3 { font-size: 1.3rem; }
.project > p { color: var(--muted); }
.project__features { padding-left: 1.1rem; color: #cbd5e1; font-size: .95rem; margin: 0 0 1.25rem; }
.project__features li { margin-bottom: .3rem; }
.project__features li::marker { color: var(--accent); }
.project .chips { margin-bottom: 1.5rem; }
.project__link { margin-top: auto; font-weight: 600; color: var(--primary); transition: color .2s, letter-spacing .2s; }
.project__link:hover { color: var(--accent); letter-spacing: .02em; }

/* ---------- Habilidades ---------- */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.skill-card {
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.skill-card--wide { grid-column: 1 / -1; }
.skill-card h3 { font-size: 1.15rem; display: flex; align-items: center; gap: .6rem; margin-bottom: 1.1rem; }

/* ---------- Formação ---------- */
.edu {
  display: flex; align-items: center; gap: 1.5rem;
  max-width: 720px; margin: 0 auto;
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.edu__icon {
  flex-shrink: 0;
  display: grid; place-items: center;
  width: 64px; height: 64px;
  font-size: 1.8rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(59, 130, 246, .25), rgba(34, 211, 238, .15));
}
.edu h3 { font-size: 1.25rem; margin-bottom: .3rem; }
.edu p { color: var(--muted); margin: 0; font-family: var(--mono); font-size: .9rem; }

/* ---------- Contato ---------- */
.contact { display: grid; grid-template-columns: 1.2fr .8fr; gap: 4rem; align-items: center; }
.contact__text > p { color: var(--muted); font-size: 1.05rem; }
.contact__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 2rem; }
.contact__item {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color .2s, transform .2s;
  word-break: break-word;
}
.contact__item:hover { border-color: var(--primary); transform: translateY(-3px); }
.contact__item small { display: block; color: var(--muted); font-size: .78rem; }
.contact__item > span:last-child { font-weight: 600; font-size: .92rem; }
.contact__ico {
  flex-shrink: 0;
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 10px;
  background: rgba(59, 130, 246, .15);
  font-weight: 700; color: var(--primary);
}
.contact__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ---------- Rodapé ---------- */
.footer { padding: 2rem 0; border-top: 1px solid var(--border); }
.footer__inner { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .9rem; }
.footer p { margin: 0; }
.footer a:hover { color: var(--text); }

/* ---------- Animações ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

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

/* ---------- Responsivo ---------- */
@media (max-width: 960px) {
  .hero__inner, .about, .contact { grid-template-columns: 1fr; gap: 3rem; }
  .hero { padding-top: 120px; text-align: center; }
  .hero__desc { margin-inline: auto; }
  .hero__cta, .socials { justify-content: center; }
  .hero__photo { order: -1; }
  .photo-frame { width: min(300px, 70vw); }
  .floating--1 { left: -8%; }
  .floating--2 { right: -8%; }
  .about__photo, .contact__photo { max-width: 380px; margin: 0 auto; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); row-gap: 1.75rem; }

  .timeline::before { left: 6px; }
  .timeline__item { grid-template-columns: 1fr; gap: .75rem; padding-left: 2rem; }
  .timeline__item::before { left: 0; }
  .timeline__meta { text-align: left; padding-right: 0; }
}

@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    gap: 1.25rem;
    padding: 2rem;
    background: rgba(11, 16, 32, .97);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    transition: transform .3s;
  }
  .nav.is-open .nav__links { transform: none; }
  .nav.is-open { background: rgba(11, 16, 32, .97); }
  .nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .projects, .skills, .contact__list { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
}

@media (max-width: 480px) {
  .floating { display: none; }
  .edu { flex-direction: column; text-align: center; }
  .footer__inner { flex-direction: column; gap: .5rem; }
}
