/* ===== Variáveis e reset ===== */
:root {
  --bg: #0a0e16;
  --bg-alt: #0f1521;
  --surface: #141b2b;
  --surface-2: #1b2436;
  --border: #243049;
  --text: #e6ecf5;
  --text-dim: #9aa7bd;
  --text-faint: #67748c;
  --accent: #4fd1c5;
  --accent-2: #6366f1;
  --accent-glow: rgba(79, 209, 197, 0.15);
  --radius: 14px;
  --maxw: 1080px;
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: 'JetBrains Mono', 'Courier New', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }

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

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

/* ===== Navegação ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 22, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav__brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 1px;
}
.nav__brand span { color: var(--accent); }
.nav__links {
  display: flex;
  gap: 28px;
}
.nav__links a {
  font-size: 0.9rem;
  color: var(--text-dim);
  font-weight: 500;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--accent); }

/* ===== Botões ===== */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #06121a;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: 10px;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  border: 1px solid transparent;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}
.btn--ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn--ghost:hover { background: var(--accent-glow); box-shadow: none; }
.btn--small { padding: 8px 16px; font-size: 0.85rem; }
.btn--big { padding: 16px 32px; font-size: 1.05rem; margin-top: 32px; }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 80px 0 100px;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(99, 102, 241, 0.12), transparent),
    radial-gradient(700px 400px at 10% 10%, rgba(79, 209, 197, 0.10), transparent);
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero__hello {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 12px;
}
.hero__name {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1.5px;
  background: linear-gradient(120deg, #fff 30%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__role {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--text-dim);
  font-weight: 500;
  margin: 16px 0 18px;
}
.hero__desc {
  color: var(--text-dim);
  max-width: 460px;
  margin-bottom: 28px;
}
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__social {
  display: flex;
  gap: 22px;
  margin-top: 28px;
}
.hero__social a {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-faint);
  position: relative;
  transition: color 0.2s;
}
.hero__social a:hover { color: var(--accent); }

/* Foto */
.hero__photo { display: flex; justify-content: center; }
.photo-frame {
  position: relative;
  width: 280px;
  height: 340px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.photo-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  box-shadow: inset 0 0 0 2px rgba(79, 209, 197, 0.25);
  pointer-events: none;
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-frame__placeholder {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.95rem;
  font-family: var(--mono);
}
.photo-frame--empty .photo-frame__placeholder { display: flex; flex-direction: column; gap: 6px; }
.photo-frame__placeholder small { color: var(--accent); font-size: 0.75rem; }

/* ===== Seções ===== */
.section { padding: 90px 0; }
.section--alt { background: var(--bg-alt); }
.section__title {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 700;
  margin-bottom: 44px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.section__title--center { justify-content: center; text-align: center; }
.section__num {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 500;
}

/* ===== Sobre ===== */
.about {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 48px;
  align-items: start;
}
.about__text p { margin-bottom: 16px; color: var(--text-dim); }
.about__text strong { color: var(--text); }
.about__facts {
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.about__facts li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.95rem;
}
.about__facts li::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}
.about__facts li:last-child { border-bottom: none; }

/* ===== Projetos ===== */
.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}
.card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.card__tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 5px 10px;
  border-radius: 6px;
}
.card__links a {
  color: var(--text-faint);
  font-size: 1.2rem;
  transition: color 0.2s;
}
.card__links a:hover { color: var(--accent); }
.card__title { font-size: 1.2rem; margin-bottom: 10px; }
.card__desc { color: var(--text-dim); font-size: 0.92rem; flex-grow: 1; }
.card__stack {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.card__stack li {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 6px;
}

/* ===== Habilidades ===== */
.skills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.skills__group h3 {
  font-size: 1.05rem;
  margin-bottom: 16px;
  color: var(--text);
}
.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chips li {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s;
}
.chips li:hover { border-color: var(--accent); color: var(--accent); }
.chips--soft li:hover { border-color: var(--accent-2); color: #a5b4fc; }

/* ===== Timeline ===== */
.timeline {
  position: relative;
  max-width: 760px;
  margin-left: 8px;
  padding-left: 28px;
  border-left: 2px solid var(--border);
}
.timeline__item { position: relative; padding-bottom: 38px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute;
  left: -37px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg-alt), 0 0 12px var(--accent-glow);
}
.timeline__date {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
}
.timeline__item h3 { font-size: 1.1rem; margin: 6px 0 4px; }
.timeline__item p { color: var(--text-dim); font-size: 0.92rem; }
.timeline__item em { color: var(--text-faint); font-style: normal; }

/* ===== Contato ===== */
.section--contact { text-align: center; padding: 100px 0; }
.contact__lead {
  color: var(--text-dim);
  max-width: 480px;
  margin: 0 auto 40px;
}
.contact__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.contact__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s, border-color 0.2s;
}
.contact__card:hover { transform: translateY(-4px); border-color: var(--accent); }
.contact__icon { display: flex; color: var(--accent); }
.contact__icon svg { width: 28px; height: 28px; }
.btn__icon { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; }
.contact__label { font-weight: 600; font-size: 0.95rem; }
.contact__value { color: var(--text-faint); font-size: 0.8rem; font-family: var(--mono); word-break: break-all; }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer p { color: var(--text-faint); font-size: 0.85rem; }
.footer__top { color: var(--text-dim); font-size: 0.85rem; transition: color 0.2s; }
.footer__top:hover { color: var(--accent); }

/* ===== Animação reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== Responsivo ===== */
@media (max-width: 880px) {
  .nav__links { display: none; }
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__photo { order: -1; }
  .photo-frame { width: 220px; height: 270px; }
  .about { grid-template-columns: 1fr; gap: 28px; }
  .projects { grid-template-columns: 1fr; }
  .skills { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .contact__grid { grid-template-columns: 1fr; }
  .hero { padding: 50px 0 70px; }
  .section { padding: 64px 0; }
}

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