/* ============================================================
   Joás Souza — Landing Page · Dark Theme
   ============================================================ */
:root {
  --bg: #070b14;
  --bg-alt: #0b1120;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e6eaf2;
  --text-muted: #98a2b3;
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --accent-grad: linear-gradient(135deg, #38bdf8, #818cf8);
  --green: #34d399;
  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --radius: 18px;
}

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

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

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

::selection { background: rgba(56, 189, 248, 0.3); color: #fff; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1c2740; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #2a3a5e; }

img { max-width: 100%; display: block; }

.container { width: min(1140px, 92%); margin: 0 auto; }

/* ---------- Tipografia ---------- */
h1, h2, h3, h4, .logo { font-family: var(--font-head); line-height: 1.2; }

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

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn-primary {
  background: var(--accent-grad);
  color: #06121c;
  box-shadow: 0 8px 30px rgba(56, 189, 248, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(56, 189, 248, 0.4); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }
.btn-lg { padding: 16px 34px; font-size: 1rem; }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(7, 11, 20, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.navbar.scrolled { background: rgba(7, 11, 20, 0.92); border-bottom-color: var(--border); }

.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.logo { font-size: 1.35rem; font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: -0.5px; }
.logo-accent { color: var(--accent); }

.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--accent-grad);
  transition: width 0.25s ease;
  border-radius: 2px;
}
.nav-links a:hover::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 16px; }

.lang-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 7px 13px;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.lang-toggle:hover { border-color: var(--accent); color: var(--accent); }

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

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.4;
  animation: float 12s ease-in-out infinite;
}
.blob-1 { width: 480px; height: 480px; background: #0e3a5c; top: -120px; right: -80px; }
.blob-2 { width: 380px; height: 380px; background: #312e81; bottom: -140px; left: -100px; animation-delay: -5s; }

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -30px) scale(1.08); }
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 60px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
}

.hero-title { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 700; margin-bottom: 12px; }
.hero-title-hello { display: block; font-size: clamp(1.2rem, 2.5vw, 1.7rem); font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }

.hero-role { font-size: clamp(1.05rem, 2vw, 1.3rem); font-weight: 600; color: var(--accent); margin-bottom: 18px; }

.hero-text { color: var(--text-muted); font-size: 1.02rem; max-width: 560px; margin-bottom: 32px; }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 36px; }

.hero-social { display: flex; gap: 14px; }
.hero-social a {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  transition: all 0.25s ease;
}
.hero-social a svg { width: 18px; height: 18px; }
.hero-social a:hover { color: #fff; border-color: var(--accent); transform: translateY(-3px); background: var(--bg-card-hover); }

/* Hero visual */
.hero-visual { position: relative; }

.photo-frame {
  position: relative;
  width: min(340px, 78vw);
  aspect-ratio: 1 / 1.08;
  border-radius: 28px;
  overflow: hidden;
  margin: 0 auto;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, #101a30, #0b1120);
  box-shadow: var(--shadow);
}
.photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, transparent 55%, rgba(56, 189, 248, 0.12));
  pointer-events: none;
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }

.photo-frame::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 30px;
  background: var(--accent-grad);
  opacity: 0.45;
  z-index: -1;
  transform: rotate(-2deg) scale(1.02);
}

.hero-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(13, 20, 36, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: var(--shadow);
  animation: float 7s ease-in-out infinite;
}
.hero-card svg { width: 26px; height: 26px; color: var(--accent); flex-shrink: 0; }
.hero-card strong { display: block; font-family: var(--font-head); font-size: 1rem; }
.hero-card span { font-size: 0.78rem; color: var(--text-muted); }

.card-exp { top: 8%; left: -24px; }
.card-role { bottom: 12%; right: -16px; animation-delay: -3s; }
.card-role .dot-green { width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex-shrink: 0; }

.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}
.hero-scroll a { color: var(--text-muted); display: block; }
.hero-scroll svg { width: 26px; height: 26px; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ---------- Seções ---------- */
.section { padding: 100px 0; position: relative; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-tag::before { content: "// "; opacity: 0.6; }
.section-title { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 700; }

/* ---------- Sobre ---------- */
.sobre-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: start; }

.sobre-text p { color: var(--text-muted); margin-bottom: 18px; font-size: 1.02rem; }

.sobre-highlights { list-style: none; margin-top: 22px; display: grid; gap: 12px; }
.sobre-highlights li { position: relative; padding-left: 30px; color: var(--text); font-size: 0.95rem; }
.sobre-highlights li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 1px;
  width: 20px; height: 20px;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  color: #06121c;
  background: var(--accent-grad);
  border-radius: 7px;
  font-weight: 700;
}

.sobre-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.stat-card:hover { transform: translateY(-4px); border-color: rgba(56, 189, 248, 0.4); }
.stat-card strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.9rem;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}
.stat-card span { font-size: 0.82rem; color: var(--text-muted); }

/* ---------- Habilidades ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.skill-card:hover { transform: translateY(-6px); border-color: rgba(56, 189, 248, 0.45); background: var(--bg-card-hover); }

.skill-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--c);
  border: 1px solid rgba(56, 189, 248, 0.3);
}
@supports (background: color-mix(in srgb, red 14%, transparent)) {
  .skill-icon {
    background: color-mix(in srgb, var(--c) 14%, transparent);
    border-color: color-mix(in srgb, var(--c) 30%, transparent);
  }
}
.skill-icon svg { width: 24px; height: 24px; }
.skill-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.skill-card p { color: var(--text-muted); font-size: 0.92rem; }

/* ---------- Experiência ---------- */
.exp-wrap { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 48px; align-items: start; }

.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 8px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2), transparent);
  opacity: 0.4;
}

.timeline-item { position: relative; margin-bottom: 28px; }
.timeline-dot {
  position: absolute;
  left: -28px; top: 8px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
  transform: translateX(-4.5px);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.timeline-card:hover { transform: translateX(6px); border-color: rgba(56, 189, 248, 0.4); }

.timeline-date {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 12px;
}
.timeline-card h3 { font-size: 1.15rem; }
.timeline-company { color: var(--accent-2); font-weight: 600; font-size: 0.9rem; margin: 4px 0 10px; }
.timeline-card p:last-child { color: var(--text-muted); font-size: 0.92rem; }

.education { position: sticky; top: 96px; }
.edu-title {
  font-size: 1.3rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 14px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.edu-card:hover { border-color: rgba(129, 140, 248, 0.45); transform: translateY(-2px); }
.edu-card h4 { font-size: 1rem; margin-bottom: 4px; }
.edu-card p { color: var(--text-muted); font-size: 0.85rem; }

/* ---------- Publicações ---------- */
.pubs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

.pub-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.pub-card:hover { transform: translateY(-6px); border-color: rgba(129, 140, 248, 0.45); }
.pub-type {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #c7d2fe;
  background: rgba(129, 140, 248, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.3);
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
}
.pub-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.pub-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 22px; }
.pub-card .btn { align-self: flex-start; margin-top: auto; }

/* ---------- Contato ---------- */
.contact-box {
  background: linear-gradient(160deg, rgba(14, 26, 46, 0.6), rgba(10, 16, 32, 0.8));
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 60px;
  text-align: center;
}
.contact-head { margin: 0 auto 40px; }
.contact-sub { color: var(--text-muted); margin-top: 16px; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 900px;
  margin: 0 auto 40px;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.contact-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.contact-card strong { display: block; font-family: var(--font-head); font-size: 0.95rem; }
.contact-card span { color: var(--text-muted); font-size: 0.85rem; }
.contact-icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
}
.contact-icon svg { width: 20px; height: 20px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 44px 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.footer-inner > p { color: var(--text-muted); font-size: 0.9rem; }
.footer-social { display: flex; gap: 14px; }
.footer-social a {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.25s ease;
}
.footer-social a svg { width: 17px; height: 17px; }
.footer-social a:hover { color: #fff; border-color: var(--accent); transform: translateY(-3px); }
.footer-copy { font-size: 0.82rem !important; color: #5a657a !important; }

/* ---------- Animações de entrada ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ---------- Responsivo ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 70px; text-align: center; }
  .hero-text { margin: 0 auto 32px; }
  .hero-ctas, .hero-social { justify-content: center; }
  .hero-visual { max-width: 420px; margin: 0 auto; }
  .sobre-grid, .exp-wrap { grid-template-columns: 1fr; }
  .education { position: static; }
  .skills-grid, .pubs-grid { grid-template-columns: 1fr 1fr; }
  .contact-box { padding: 44px 28px; }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    top: 72px;
    right: 0;
    width: min(320px, 82vw);
    height: calc(100vh - 72px);
    background: rgba(7, 11, 20, 0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 40px 32px;
    gap: 24px;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    border-left: 1px solid var(--border);
    z-index: 99;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 1.1rem; }
  .nav-cta { display: none; }
  .hamburger { display: flex; }

  .section { padding: 72px 0; }
  .skills-grid, .pubs-grid, .contact-grid { grid-template-columns: 1fr; }
  .sobre-stats { grid-template-columns: 1fr 1fr; }
  .card-exp { left: -8px; }
  .card-role { right: -8px; }
  .hero-scroll { display: none; }
}

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