/* ============================================================
   Pedro Arthur Netto — Landing Page
   Tema: dark / tech — cyan + violet
   ============================================================ */

:root {
  --bg: #070a12;
  --bg-alt: #0b0f1a;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(34, 211, 238, 0.45);
  --text: #e6e9f2;
  --text-muted: #94a0b8;
  --text-dim: #6b7690;
  --primary: #22d3ee;
  --primary-2: #8b5cf6;
  --accent: #34d399;
  --gradient: linear-gradient(120deg, #22d3ee 0%, #8b5cf6 60%, #ec4899 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
  --glow: 0 0 40px -10px rgba(34, 211, 238, 0.45);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --nav-h: 72px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  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; }
img, svg { display: inline-block; vertical-align: middle; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; list-style: none; }

.mono { font-family: var(--mono); }
.container { width: min(1140px, 100% - 2rem); margin-inline: auto; }

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Cursor glow ---------- */
.cursor-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(600px circle at var(--mx, -100px) var(--my, -100px),
    rgba(34, 211, 238, 0.07), transparent 45%);
  transition: background 0.1s;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
  cursor: pointer;
  white-space: nowrap;
}
.btn--sm { padding: 0.5rem 1.1rem; font-size: 0.85rem; }
.btn--primary {
  background: var(--gradient);
  color: #05070d;
  box-shadow: var(--glow);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 0 50px -8px rgba(139, 92, 246, 0.6); }
.btn--ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--border-hover); background: var(--surface-hover); transform: translateY(-2px); }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(7, 10, 18, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav__logo { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.nav__logo .mono { color: var(--primary); font-weight: 500; }
.nav__links { display: flex; align-items: center; gap: 1.75rem; font-size: 0.92rem; font-weight: 500; }
.nav__links a:not(.btn) { color: var(--text-muted); position: relative; transition: color 0.2s; }
.nav__links a:not(.btn)::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--gradient); border-radius: 2px; transition: width 0.25s;
}
.nav__links a:not(.btn):hover, .nav__links a.is-active { color: var(--text); }
.nav__links a:not(.btn):hover::after, .nav__links a.is-active::after { width: 100%; }

/* Toggle de idioma PT/EN */
.nav__links .nav__lang {
  display: inline-flex; align-items: center; gap: 0.15rem;
  padding: 0.35rem 0.7rem; border-radius: 8px; font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.04em; color: var(--text-dim) !important;
  border: 1px solid var(--border); background: var(--surface);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.nav__links .nav__lang::after { display: none; }
.nav__links .nav__lang:hover { border-color: var(--border-hover); background: var(--surface-hover); }
.nav__lang-on { color: var(--primary); }
.nav__lang-sep { color: var(--text-dim); margin: 0 0.1rem; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: 0; padding: 8px; cursor: pointer;
}
.nav__toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--nav-h) + 4rem) 0 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero__grid {
  position: absolute; inset: 0; z-index: -3;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.hero__orb {
  position: absolute; border-radius: 50%; filter: blur(90px); z-index: -1; opacity: 0.55;
  animation: float 12s ease-in-out infinite;
}
.hero__orb--1 { width: 520px; height: 520px; background: #22d3ee; top: -160px; left: -140px; }
.hero__orb--2 { width: 480px; height: 480px; background: #8b5cf6; bottom: -160px; right: -120px; animation-delay: -6s; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.08); }
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 3rem;
  align-items: center;
}

.badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.9rem; border-radius: 999px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--accent); font-size: 0.8rem; font-weight: 600;
  margin-bottom: 1.5rem;
}
.badge__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero__title { font-size: clamp(2.4rem, 5.5vw, 4.2rem); font-weight: 800; margin-bottom: 1.25rem; }
.hero__role {
  font-size: clamp(1rem, 2vw, 1.3rem); color: var(--primary); font-weight: 500;
  min-height: 1.8em; margin-bottom: 1.25rem;
}
.hero__prompt { color: var(--primary-2); margin-right: 0.5rem; }
.hero__caret { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero__desc { color: var(--text-muted); font-size: 1.05rem; max-width: 560px; margin-bottom: 2rem; }
.hero__desc strong { color: var(--text); font-weight: 600; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-bottom: 2rem; }
.hero__social { display: flex; align-items: center; gap: 1rem; color: var(--text-muted); }
.hero__social a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.hero__social a:hover { border-color: var(--border-hover); color: var(--primary); transform: translateY(-2px); }
.hero__loc { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; margin-left: 0.5rem; }

/* Code window */
.code-window {
  background: rgba(11, 15, 26, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 0 1px rgba(34,211,238,0.05), var(--glow);
  backdrop-filter: blur(10px);
  overflow: hidden;
  transform: perspective(1200px) rotateY(-6deg) rotateX(2deg);
  transition: transform 0.4s ease;
}
.code-window:hover { transform: perspective(1200px) rotateY(0) rotateX(0); }
.code-window__bar {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1rem; border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot--r { background: #ff5f57; } .dot--y { background: #febc2e; } .dot--g { background: #28c840; }
.code-window__file { margin-left: auto; font-size: 0.75rem; color: var(--text-dim); }
.code-window__body {
  margin: 0; padding: 1.25rem 1.4rem;
  font-size: 0.82rem; line-height: 1.7; color: #c9d1e3;
  overflow-x: auto;
}
.c-kw { color: #c792ea; } .c-var { color: #82aaff; } .c-op { color: #89ddff; }
.c-key { color: #f07178; } .c-str { color: #c3e88d; } .c-num { color: #f78c6c; }
.c-bool { color: #ff9cac; } .c-cm { color: #546e7a; font-style: italic; }

/* Stats */
.stats {
  margin-top: 4rem;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); backdrop-filter: blur(8px);
  overflow: hidden;
}
.stat {
  padding: 1.5rem 1.25rem; text-align: center;
  border-right: 1px solid var(--border);
  cursor: default;
}
.stat:last-child { border-right: 0; }
.stat:hover .stat__num { transform: scale(1.2); }
.stat__num { transition: transform 4s linear; }
.stat__num { display: block; font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat__label { font-size: 0.82rem; color: var(--text-muted); }

/* ---------- Sections ---------- */
.section { padding: 6rem 0; position: relative; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__head { margin-bottom: 3rem; }
.section__tag { display: block; color: var(--primary); font-size: 0.85rem; margin-bottom: 0.75rem; letter-spacing: 0.04em; }
.section__title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: start; }
.about__text { color: var(--text-muted); font-size: 1.05rem; }
.about__text strong { color: var(--text); font-weight: 600; }
.about__highlights { margin-top: 1.5rem; display: grid; gap: 0.75rem; }
.about__highlights li { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.98rem; }
.check {
  flex: none; width: 22px; height: 22px; border-radius: 50%; margin-top: 2px;
  background: rgba(34,211,238,0.12); border: 1px solid rgba(34,211,238,0.4);
  position: relative;
}
.check::after {
  content: ''; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px;
  border: solid var(--primary); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.about__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; position: relative; overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.card::before {
  content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(400px circle at var(--x, 50%) var(--y, 50%), rgba(34,211,238,0.12), transparent 40%);
  pointer-events: none;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-hover); }
.card:hover::before { opacity: 1; }
.card__icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(34,211,238,0.15), rgba(139,92,246,0.15));
  border: 1px solid rgba(34,211,238,0.25); color: var(--primary); margin-bottom: 1rem;
}
.card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; }
.card p { color: var(--text-muted); font-size: 0.92rem; margin: 0; }
.card--row { display: flex; gap: 1.25rem; align-items: flex-start; }
.card--row .card__icon { margin: 0; flex: none; }
.card__sub { margin-bottom: 0.35rem !important; }

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.skill-group {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; transition: border-color 0.25s, transform 0.25s;
}
.skill-group:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.skill-group__title { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.6rem; }
.skill-group__icon { font-size: 1.1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  padding: 0.4rem 0.8rem; border-radius: 8px; font-size: 0.82rem; font-weight: 500;
  font-family: var(--mono);
  background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}
.chip:hover { color: var(--text); border-color: var(--border-hover); background: rgba(34,211,238,0.08); transform: translateY(-2px); }
.chip--hl { color: var(--primary); border-color: rgba(34,211,238,0.35); background: rgba(34,211,238,0.07); }
.chip[data-tip] { cursor: help; }

/* Tooltip das skills */
.tooltip {
  position: fixed; z-index: 200;
  max-width: 280px; padding: 0.7rem 0.9rem;
  background: rgba(11, 15, 26, 0.96);
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow), 0 0 30px -10px rgba(34, 211, 238, 0.5);
  backdrop-filter: blur(10px);
  font-size: 0.82rem; line-height: 1.5; color: var(--text-muted);
  opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.tooltip.is-visible { opacity: 1; transform: translateY(0); }
.tooltip__title { display: block; font-family: var(--mono); font-weight: 600; color: var(--primary); margin-bottom: 0.25rem; font-size: 0.8rem; }
.tooltip::after {
  content: ''; position: absolute; left: var(--arrow-x, 50%); transform: translateX(-50%) rotate(45deg);
  width: 10px; height: 10px; background: rgba(11, 15, 26, 0.96);
  border: 1px solid rgba(34, 211, 238, 0.35); border-top: 0; border-left: 0;
  bottom: -6px;
}
.tooltip--below::after { bottom: auto; top: -6px; border: 1px solid rgba(34, 211, 238, 0.35); border-bottom: 0; border-right: 0; }

.chips--sm { margin-top: 1rem; }
.chips--sm .chip { font-size: 0.72rem; padding: 0.3rem 0.6rem; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 2.5rem; }
.timeline::before {
  content: ''; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--primary-2), transparent);
  opacity: 0.6;
}
.tl-item { position: relative; margin-bottom: 2rem; }
.tl-item__marker {
  position: absolute; left: -2.5rem; top: 1.4rem;
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); border: 2px solid var(--primary);
  box-shadow: 0 0 0 5px rgba(34,211,238,0.12);
}
.tl-item__marker span { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.tl-item:first-child .tl-item__marker span { animation: pulse 2s infinite; box-shadow: 0 0 0 0 rgba(34,211,238,0.6); }
.tl-item__card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem 1.75rem; transition: border-color 0.25s, transform 0.25s;
}
.tl-item__card:hover { border-color: var(--border-hover); transform: translateX(4px); }
.tl-item__head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tl-item__head h3 { font-size: 1.15rem; font-weight: 700; }
.tl-item__company { color: var(--primary); font-size: 0.92rem; font-weight: 500; }
.tl-item__date {
  font-size: 0.78rem; color: var(--text-dim); padding: 0.3rem 0.7rem; border-radius: 6px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border); white-space: nowrap; align-self: flex-start;
}
.tl-item__card p, .tl-item__card li { color: var(--text-muted); font-size: 0.94rem; }
.tl-item__card ul { display: grid; gap: 0.5rem; }
.tl-item__card li { position: relative; padding-left: 1.1rem; }
.tl-item__card li::before { content: '▹'; position: absolute; left: 0; color: var(--primary); }
.tl-item__card strong { color: var(--text); font-weight: 600; }

/* ---------- Education ---------- */
.edu { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.edu .tl-item__date { display: inline-block; margin-top: 0.25rem; }

/* ---------- Contact ---------- */
.contact {
  position: relative; text-align: center; padding: 4rem 2rem;
  border: 1px solid var(--border); border-radius: 24px;
  background: var(--surface); overflow: hidden;
}
.contact__glow {
  position: absolute; inset: -50%; z-index: -1;
  background: conic-gradient(from 0deg, transparent 0 60%, rgba(34,211,238,0.18), rgba(139,92,246,0.18), transparent 100%);
  animation: spin 14s linear infinite; opacity: 0.8;
}
@keyframes spin { to { transform: rotate(360deg); } }
.contact::after {
  content: ''; position: absolute; inset: 1px; border-radius: 23px; background: var(--bg); z-index: -1;
}
.contact p { color: var(--text-muted); max-width: 560px; margin: 1rem auto 2rem; }
.contact__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.85rem; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 2rem 0; font-size: 0.85rem; color: var(--text-dim); }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer .mono { color: var(--primary); }
.footer__top { transition: color 0.2s; }
.footer__top:hover { color: var(--text); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal--delay { transition-delay: 0.2s; }
.reveal.is-visible { opacity: 1; transform: none; }

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

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { max-width: 560px; }
  .code-window { transform: none; }
  .skills { grid-template-columns: 1fr 1fr; }
  .about { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: rgba(7, 10, 18, 0.96); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1rem 1rem;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform 0.25s, opacity 0.25s;
  }
  .nav__links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a:not(.btn):not(.nav__lang) { padding: 0.85rem 0; width: 100%; border-bottom: 1px solid var(--border); }
  .nav__links a:not(.btn)::after { display: none; }
  .nav__links .nav__lang { margin-top: 1rem; align-self: flex-start; }
  .nav__links .btn { margin-top: 1rem; }

  .hero { padding-top: calc(var(--nav-h) + 2.5rem); }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--border); }
  .stat:nth-child(odd) { border-right: 1px solid var(--border); }
  .stat:nth-last-child(-n+2) { border-bottom: 0; }
  .section { padding: 4rem 0; }
  .about__cards, .skills, .edu { grid-template-columns: 1fr; }
  .timeline { padding-left: 2rem; }
  .tl-item__marker { left: -2rem; }
  .tl-item__card { padding: 1.25rem; }
  .contact { padding: 3rem 1.25rem; }
  .contact .btn { width: 100%; justify-content: center; }
  .footer__inner { justify-content: center; text-align: center; }
}

/* ---------- Página 404 ---------- */
.nf { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 2rem 1rem; position: relative; overflow: hidden; isolation: isolate; }
.nf__code { font-family: var(--mono); font-size: clamp(5rem, 18vw, 10rem); font-weight: 800; line-height: 1; letter-spacing: -0.05em; }
.nf__title { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; margin: 1rem 0 0.5rem; }
.nf__text { color: var(--text-muted); max-width: 460px; margin: 0 auto 2rem; }
.nf__actions { display: flex; gap: 0.85rem; justify-content: center; flex-wrap: wrap; }
.nf__path { font-family: var(--mono); font-size: 0.85rem; color: var(--text-dim); margin-top: 2.5rem; }
.nf__path code { color: var(--primary); }
