:root {
  --bg: #f6f8fb;
  --bg-alt: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --heading: #0f172a;
  --primary: #1d4ed8;
  --primary-dark: #1e40af;
  --border: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

body.dark {
  --bg: #020617;
  --bg-alt: #0f172a;
  --text: #d1d5db;
  --muted: #94a3b8;
  --heading: #f8fafc;
  --primary: #60a5fa;
  --primary-dark: #3b82f6;
  --border: #1e293b;
  --card: #111827;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

/* HEADER */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 248, 251, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

body.dark .site-header {
  background: rgba(2, 6, 23, 0.88);
}

.nav {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo a {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -0.04em;
}

#menu {
  display: flex;
  gap: 28px;
  align-items: center;
}

#menu a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  transition: 0.2s;
}

#menu a:hover {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
}

/* THEME SWITCH */

.theme-switch {
  position: relative;
  width: 48px;
  height: 26px;
  display: inline-block;
}

.theme-switch input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e1;
  border-radius: 99px;
  transition: 0.3s;
}

.slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

.theme-switch input:checked + .slider {
  background: var(--primary);
}

.theme-switch input:checked + .slider::before {
  transform: translateX(22px);
}

/* HERO */

.hero {
  padding: 95px 0 80px;
  background:
    radial-gradient(circle at top left, rgba(29, 78, 216, 0.14), transparent 35%),
    linear-gradient(180deg, var(--bg), var(--bg-alt));
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 70px;
  align-items: center;
}

.eyebrow,
.section-label {
  display: inline-block;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  line-height: 1.02;
  letter-spacing: -0.07em;
  color: var(--heading);
  margin-bottom: 26px;
}

.hero-text {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 720px;
  margin-bottom: 34px;
}

.hero-buttons,
.contact-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 700;
  transition: 0.25s;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 14px 30px rgba(29, 78, 216, 0.25);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  border: 1px solid var(--border);
  color: var(--heading);
  background: var(--card);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 680px;
}

.hero-metrics div {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.hero-metrics strong {
  display: block;
  font-size: 1.45rem;
  color: var(--heading);
}

.hero-metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.hero-image {
  position: relative;
}

.hero-image::before {
  content: "";
  position: absolute;
  inset: 28px -18px -18px 28px;
  background: var(--primary);
  border-radius: 34px;
  opacity: 0.16;
}

.hero-image img {
  position: relative;
  width: 100%;
  max-width: 390px;
  border-radius: 34px;
  display: block;
  margin-left: auto;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* SECTIONS */

.section {
  padding: 90px 0;
  background: var(--bg-alt);
}

.section.alt {
  background: var(--bg);
}

.section-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 70px;
  align-items: start;
}

.section h2 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.055em;
  color: var(--heading);
}

.section p {
  color: var(--muted);
  margin-bottom: 18px;
  font-size: 1.02rem;
}

.section-header {
  text-align: center;
  max-width: 740px;
  margin: 0 auto 48px;
}

.section-header p {
  margin-top: 14px;
}

/* CARDS */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.cards-grid.small {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: 0.25s;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(29, 78, 216, 0.35);
}

.card h3,
.card h4 {
  color: var(--heading);
  font-size: 1.18rem;
  margin-bottom: 12px;
}

.card p {
  font-size: 0.96rem;
  margin-bottom: 0;
}

.text-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--primary);
  font-weight: 700;
}

/* RESULTS */

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.result-item {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.result-item strong {
  display: block;
  color: var(--heading);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.result-item span {
  color: var(--muted);
}

/* TIMELINE */

.timeline {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 26px;
  padding: 26px 26px 26px 62px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 32px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  border: 4px solid var(--bg-alt);
}

.timeline-item.destaque {
  border-color: rgba(29, 78, 216, 0.4);
}

.timeline-item h3 {
  color: var(--heading);
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.timeline-item span {
  display: block;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 12px;
}

.timeline-item p {
  margin-bottom: 0;
}

/* PROJECTS */

.project-groups {
  display: grid;
  gap: 44px;
}

.project-group h3 {
  color: var(--heading);
  font-size: 1.45rem;
  margin-bottom: 20px;
}

/* TOPICS */

.topics-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.topics-list span {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--heading);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: var(--shadow);
}

/* CONTACT */

.contact {
  background:
    radial-gradient(circle at top right, rgba(29, 78, 216, 0.12), transparent 35%),
    var(--bg-alt);
}

.contact-box {
  max-width: 820px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 58px 42px;
  box-shadow: var(--shadow);
}

.contact-box .contact-actions {
  justify-content: center;
  margin-bottom: 0;
}

.contact-box p {
  margin: 20px auto 30px;
  max-width: 650px;
}

/* FOOTER */

.footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* BACK TO TOP */

#backToTop {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  display: none;
  background: var(--primary);
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 14px 35px rgba(29, 78, 216, 0.35);
}

/* HAMBURGER */

.hamburger {
  display: none;
  width: 28px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--heading);
  margin: 6px 0;
  transition: 0.3s;
}

/* MOBILE */

@media (max-width: 900px) {
  .hero-grid,
  .section-grid {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .hero {
    padding-top: 65px;
  }

  .hero-image img {
    margin: 0 auto;
    max-width: 320px;
  }

  .hero-metrics,
  .cards-grid,
  .cards-grid.small,
  .results-grid {
    grid-template-columns: 1fr;
  }

  #menu {
    position: fixed;
    top: 78px;
    right: -100%;
    width: 82%;
    max-width: 320px;
    height: calc(100vh - 78px);
    background: var(--card);
    border-left: 1px solid var(--border);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 36px;
    transition: 0.3s;
    box-shadow: var(--shadow);
  }

  #menu.active {
    right: 0;
  }

  #menu a {
    font-size: 1.05rem;
  }

  .hamburger {
    display: block;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 560px) {
  .nav {
    height: 72px;
  }

  #menu {
    top: 72px;
    height: calc(100vh - 72px);
  }

  .hero h1 {
    font-size: 2.35rem;
  }

  .hero-text {
    font-size: 1rem;
  }

  .hero-buttons,
  .contact-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  .section {
    padding: 65px 0;
  }

  .contact-box {
    padding: 38px 24px;
  }

  .timeline::before {
    left: 14px;
  }

  .timeline-item {
    padding-left: 48px;
  }

  .timeline-item::before {
    left: 6px;
  }
}