:root {
  --bg: #06090e;
  --bg-soft: #0d121b;
  --panel: #141b26;
  --text: #ffffff;
  --muted: #a3b3c5;
  --brand: #10f195;
  --brand-dark: #00c978;
  --accent: #3fb7ff;
  --line: rgba(255, 255, 255, 0.1);
  --shadow: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] {
  --bg: #f4f7fa;
  --bg-soft: #ffffff;
  --panel: #e2e8f0;
  --text: #1a202c;
  --muted: #4a5568;
  --brand: #059669;
  --brand-dark: #047857;
  --accent: #2563eb;
  --line: rgba(0, 0, 0, 0.1);
  --shadow: rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  background: linear-gradient(180deg, var(--bg), var(--bg) 55%, var(--bg-soft));
  color: var(--text);
  min-height: 100vh;
  transition: background 0.5s ease, color 0.5s ease;
}

[data-theme="light"] body {
  background: linear-gradient(180deg, #f4f7fa, #ffffff 55%, #f4f7fa);
}


/* Stars and Planets Background */
.stars-container {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 1s ease;
}

[data-theme="light"] .stars-container {
  opacity: 1;
}

.stars, .stars2, .stars3 {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 200%;
  height: 200%;
  background: transparent;
}

.stars {
  background-image: 
    radial-gradient(1px 1px at 10% 10%, #fff, transparent),
    radial-gradient(1px 1px at 20% 50%, #fff, transparent),
    radial-gradient(1px 1px at 30% 90%, #fff, transparent),
    radial-gradient(1px 1px at 40% 20%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 50% 70%, #fff, transparent),
    radial-gradient(1px 1px at 60% 10%, #fff, transparent),
    radial-gradient(1px 1px at 70% 40%, #fff, transparent),
    radial-gradient(1px 1px at 80% 80%, #fff, transparent),
    radial-gradient(1px 1px at 90% 30%, #fff, transparent),
    radial-gradient(1px 1px at 95% 60%, #fff, transparent);
  background-size: 300px 300px;
  animation: moveStars 100s linear infinite;
}

.stars2 {
  background-image: 
    radial-gradient(1.5px 1.5px at 15% 15%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 25% 65%, #fff, transparent),
    radial-gradient(2px 2px at 45% 35%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 65% 85%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 85% 25%, #fff, transparent);
  background-size: 450px 450px;
  animation: moveStars 150s linear infinite;
}

.stars3 {
  background-image: 
    radial-gradient(2.5px 2.5px at 5% 45%, #fff, transparent),
    radial-gradient(2px 2px at 35% 75%, #fff, transparent),
    radial-gradient(2.5px 2.5px at 75% 15%, #fff, transparent),
    radial-gradient(2px 2px at 95% 55%, #fff, transparent);
  background-size: 600px 600px;
  animation: moveStars 200s linear infinite;
}

@keyframes moveStars {
  from { transform: translate(0, 0); }
  to { transform: translate(-50%, -50%); }
}

.planet {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  filter: blur(0.5px);
  z-index: -1;
  transition: opacity 1s ease;
}

[data-theme="light"] .planet,
[data-theme="light"] .sun,
[data-theme="light"] .rings {
  opacity: 0.15;
}

/* Mercúrio */
.mercury {
  width: clamp(12px, 3vw, 18px);
  height: clamp(12px, 3vw, 18px);
  background: radial-gradient(circle at 30% 30%, #b4b4b4, #707070);
  box-shadow: 0 0 8px rgba(180, 180, 180, 0.2);
  margin-top: -9px;
  margin-left: -9px;
  animation: orbitMercury 25s linear infinite;
}

/* Vênus */
.venus {
  width: clamp(25px, 6vw, 40px);
  height: clamp(25px, 6vw, 40px);
  background: radial-gradient(circle at 30% 30%, #fff2cc, #d9b85c);
  box-shadow: 0 0 15px rgba(255, 242, 204, 0.3);
  margin-top: -20px;
  margin-left: -20px;
  animation: orbitVenus 45s linear infinite;
}

/* Terra */
.earth {
  width: clamp(26px, 6.5vw, 42px);
  height: clamp(26px, 6.5vw, 42px);
  background: radial-gradient(circle at 30% 30%, #4facfe, #0061ff);
  box-shadow: 0 0 15px rgba(79, 172, 254, 0.3);
  margin-top: -21px;
  margin-left: -21px;
  animation: orbitEarth 70s linear infinite;
}

/* Marte */
.mars {
  width: clamp(20px, 5vw, 32px);
  height: clamp(20px, 5vw, 32px);
  background: radial-gradient(circle at 30% 30%, #ff5733, #8b0000);
  box-shadow: 0 0 12px rgba(255, 87, 51, 0.2);
  margin-top: -16px;
  margin-left: -16px;
  animation: orbitMars 100s linear infinite;
}

/* Júpiter */
.jupiter {
  width: clamp(50px, 12vw, 85px);
  height: clamp(50px, 12vw, 85px);
  background: repeating-linear-gradient(
    180deg,
    #e3bb76 0%,
    #e3bb76 15%,
    #b28a52 20%,
    #b28a52 35%,
    #e3bb76 40%
  );
  box-shadow: 0 0 25px rgba(227, 187, 118, 0.2);
  margin-top: -42px;
  margin-left: -42px;
  animation: orbitJupiter 180s linear infinite;
}

/* Saturno */
.saturn {
  width: clamp(35px, 10vw, 65px);
  height: clamp(35px, 10vw, 65px);
  background: radial-gradient(circle at 30% 30%, #ead6b8, #a5927d);
  box-shadow: 0 0 20px rgba(234, 214, 184, 0.2);
  margin-top: -32px;
  margin-left: -32px;
  animation: orbitSaturn 250s linear infinite;
}

.saturn .rings {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  height: 40%;
  border: 4px solid rgba(234, 214, 184, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotateX(75deg);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* Urano */
.uranus {
  width: clamp(30px, 8vw, 50px);
  height: clamp(30px, 8vw, 50px);
  background: radial-gradient(circle at 30% 30%, #b2fefa, #0ed2f7);
  box-shadow: 0 0 15px rgba(14, 210, 247, 0.2);
  margin-top: -25px;
  margin-left: -25px;
  animation: orbitUranus 350s linear infinite;
}

/* Netuno */
.neptune {
  width: clamp(28px, 7.5vw, 48px);
  height: clamp(28px, 7.5vw, 48px);
  background: radial-gradient(circle at 30% 30%, #2193b0, #6dd5ed);
  box-shadow: 0 0 15px rgba(33, 147, 176, 0.2);
  margin-top: -24px;
  margin-left: -24px;
  animation: orbitNeptune 450s linear infinite;
}

.sun {
  position: absolute;
  width: clamp(80px, 18vw, 160px);
  height: clamp(80px, 18vw, 160px);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #fff700, #ff8c00, transparent 75%);
  box-shadow: 0 0 60px rgba(255, 200, 0, 0.4), 0 0 120px rgba(255, 140, 0, 0.2);
  filter: blur(2px);
  animation: sunPulse 10s ease-in-out infinite alternate;
  z-index: -2;
  transition: opacity 1s ease;
}

[data-theme="light"] .sun {
  opacity: 0.1;
}

@keyframes sunPulse {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.9; }
}

/* Órbitas realistas */
@keyframes orbitMercury {
  from { transform: rotate(0deg) translateX(min(14vw, 140px)) rotate(0deg); }
  to { transform: rotate(360deg) translateX(min(14vw, 140px)) rotate(-360deg); }
}

@keyframes orbitVenus {
  from { transform: rotate(120deg) translateX(min(22vw, 220px)) rotate(-120deg); }
  to { transform: rotate(480deg) translateX(min(22vw, 220px)) rotate(-480deg); }
}

@keyframes orbitEarth {
  from { transform: rotate(240deg) translateX(min(30vw, 300px)) rotate(-240deg); }
  to { transform: rotate(600deg) translateX(min(30vw, 300px)) rotate(-600deg); }
}

@keyframes orbitMars {
  from { transform: rotate(45deg) translateX(min(38vw, 380px)) rotate(-45deg); }
  to { transform: rotate(405deg) translateX(min(38vw, 380px)) rotate(-405deg); }
}

@keyframes orbitJupiter {
  from { transform: rotate(180deg) translateX(min(52vw, 520px)) rotate(-180deg); }
  to { transform: rotate(540deg) translateX(min(52vw, 520px)) rotate(-540deg); }
}

@keyframes orbitSaturn {
  from { transform: rotate(300deg) translateX(min(68vw, 680px)) rotate(-300deg); }
  to { transform: rotate(660deg) translateX(min(68vw, 680px)) rotate(-660deg); }
}

@keyframes orbitUranus {
  from { transform: rotate(60deg) translateX(min(82vw, 820px)) rotate(-60deg); }
  to { transform: rotate(420deg) translateX(min(82vw, 820px)) rotate(-420deg); }
}

@keyframes orbitNeptune {
  from { transform: rotate(210deg) translateX(min(95vw, 950px)) rotate(-210deg); }
  to { transform: rotate(570deg) translateX(min(95vw, 950px)) rotate(-570deg); }
}

.topbar {
  position: sticky;
  top: 0;
  background: rgba(13, 18, 27, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 0 2px 20px var(--shadow);
}

[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.9);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 6vw;
  max-width: 1200px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.brand-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.3s ease;
  min-width: 0;
}

.brand-link:hover {
  transform: scale(1.02);
}

.brand-logo-img {
  height: clamp(32px, 5vw, 40px);
  width: auto;
  display: block;
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 5px rgba(16, 241, 149, 0.2));
  flex-shrink: 0;
}

[data-theme="light"] .brand-logo-img {
  filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.1));
}

.brand-link:hover .brand-logo-img {
  transform: scale(1.05);
  filter: drop-shadow(0 0 10px var(--brand));
}

/* Ajuste específico para o rodapé se necessário */
.footer-brand .brand-logo-img {
  height: 45px;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--bg-soft);
  border: 2px solid var(--brand);
  border-radius: 8px;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--brand);
  text-shadow: 0 0 8px rgba(16, 241, 149, 0.3);
  box-shadow: 0 0 10px rgba(16, 241, 149, 0.2);
  transition: all 0.3s ease;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-link:hover .brand-logo {
  transform: rotate(-5deg) scale(1.1);
  box-shadow: 0 0 15px var(--brand);
  background: var(--brand);
  color: #000;
}

.brand-text {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(0.9rem, 3vw, 1.1rem);
  letter-spacing: 1px;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--text), var(--brand));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text-addon {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(0.75rem, 2.5vw, 0.9rem);
  letter-spacing: 0.5px;
  color: var(--muted);
  text-transform: uppercase;
  margin-left: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="light"] .brand-text-addon {
  color: var(--muted);
}

.footer-brand .brand-text-addon {
  font-size: 1.1rem;
  margin-left: 0.8rem;
}

.nav {
  display: flex;
  gap: 1.2rem;
}

.nav-item {
  position: relative;
}

.nav a, .nav-btn {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  background: none;
  border: none;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 5px rgba(16, 241, 149, 0.1);
}

@media (max-width: 720px) {
  .nav a, .nav-btn {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
  }
}

.nav a:hover, .nav-btn:hover {
  color: #000000;
  background: var(--brand);
  box-shadow: 0 4px 12px rgba(16, 241, 149, 0.4), 0 0 15px rgba(16, 241, 149, 0.2);
  transform: translateY(-2px);
}

[data-theme="light"] .nav a, [data-theme="light"] .nav-btn {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .nav a:hover, [data-theme="light"] .nav-btn:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--line);
  transform: rotate(15deg);
  box-shadow: 0 0 12px var(--brand);
}

.theme-toggle .sun-icon {
  display: none;
}

[data-theme="light"] .theme-toggle .sun-icon {
  display: block;
  color: #f59e0b;
}

[data-theme="light"] .theme-toggle .moon-icon {
  display: none;
}

/* Submenu */
.submenu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 180px;
  padding: 0.8rem;
  display: none;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  z-index: 100;
}

.submenu a {
  display: block;
  padding: 0.6rem 0.8rem;
  white-space: nowrap;
  border-radius: 8px;
}

.submenu a:hover {
  background: var(--brand);
  color: #000000;
  box-shadow: 0 4px 8px rgba(16, 241, 149, 0.3);
  transform: translateY(-1px);
}

[data-theme="light"] .submenu a:hover {
  background: var(--panel);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.nav-item:hover .submenu {
  display: block;
  animation: fadeInDown 0.2s ease-out forwards;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.menu-btn {
  display: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(16, 241, 149, 0.2);
}

.menu-btn:hover {
  background: var(--brand);
  color: #000000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 241, 149, 0.4);
}

[data-theme="light"] .menu-btn {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .menu-btn:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.menu-btn:active {
  transform: translateY(0);
}

main {
  padding: 0.5rem 6vw 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero {
  padding: 2rem 0 2rem;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.hero-text {
  flex: 1;
  background: var(--panel);
  padding: 2rem 2.5rem;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px var(--shadow);
  text-align: left;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  overflow: visible;
}

.hero-text-inner {
  width: 100%;
}

.hero-main-row {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin: 0.5rem 0;
}

.hero-text-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-image {
  flex: 0 0 35%;
  margin: 0;
  display: flex;
  justify-content: center;
  animation: floatImage 6s ease-in-out infinite;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.8rem;
  border-radius: 28px;
  border: 1px solid var(--line);
  position: relative;
  z-index: 2;
}

[data-theme="light"] .hero-image {
  background: rgba(0, 0, 0, 0.03);
}

.hero-image img {
  max-width: 100%;
  height: auto;
  border-radius: 24px;
  box-shadow: 
    0 0 40px rgba(16, 241, 149, 0.2),
    0 0 80px rgba(63, 183, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.5s ease;
}

.hero-image img:hover {
  transform: scale(1.02);
}

@keyframes floatImage {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@media (max-width: 768px) {
  .hero-main-row {
    flex-direction: column;
    gap: 1.5rem;
  }

  .hero-text {
    padding: 1.5rem 1rem;
    border-radius: 16px;
  }

  .hero-text-content {
    gap: 1rem;
  }

  .tag, .subtitle, .hero-actions, .data-note {
    justify-content: center;
    text-align: center;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
  
  .hero-image {
    flex: 0 0 auto;
    width: 100%;
    max-width: 280px;
    order: -1;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
  }
  
  .hero-image img {
    max-width: 100%;
  }

  h1, .typewriter {
    margin: 0 auto;
  }
}

.tag {
  color: var(--brand);
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  margin-bottom: 0.7rem;
}

.subtitle {
  font-size: 1.1rem;
  margin: 0;
  text-align: left;
}

[data-theme="light"] .subtitle {
  color: var(--muted);
}

.hero-actions {
  display: flex;
  justify-content: flex-start;
  gap: 0.8rem;
}

h1,
h2,
h3,
h4 {
  font-family: "Syne", sans-serif;
  margin: 0;
  position: relative;
  max-width: 100%;
  color: var(--text);
  text-shadow: 
    2px 2px 0px rgba(0, 0, 0, 0.8),
    0 0 10px rgba(255, 255, 255, 0.1);
  overflow-wrap: break-word;
  word-wrap: break-word;
  line-height: 1.2;
  text-align: center;
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4 {
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

h2 {
  font-size: clamp(1.2rem, 3.5vw, 2.1rem);
  margin-bottom: 1rem;
  margin-left: auto;
  margin-right: auto;
}

h2.title-sm {
  font-size: clamp(1rem, 3vw, 1.8rem);
}

h3 {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  margin-bottom: 0.6rem;
  margin-left: auto;
  margin-right: auto;
}

h4 {
  font-size: 0.9rem;
}

/* Typewriter effect */
.typewriter {
  overflow: hidden;
  width: 0;
  white-space: nowrap;
}

.visible .typewriter,
.active .typewriter {
  animation: 
    typing 2s steps(40, end) forwards;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

h1, .typewriter {
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 769px) {
  .hero-text .tag, .hero-text .typewriter {
    margin-left: 0;
    margin-right: auto;
    text-align: left;
  }
}

@media (max-width: 600px) {
  h1, .typewriter {
    width: 100%;
    white-space: normal;
    overflow: visible;
  }
  
  .active .typewriter,
  .visible .typewriter {
    animation: none;
  }
}

h1 {
  font-size: clamp(1.6rem, 4.5vw, 2.8rem);
  line-height: 1.1;
  font-weight: 800;
}

.subtitle {
  max-width: 760px;
  font-size: 1.1rem;
  margin: 1rem auto 0;
  text-align: center;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.btn {
  display: inline-block;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn:active {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #000000;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 8px 25px rgba(20, 241, 149, 0.3);
}

.btn-secondary {
  color: var(--text);
  border: 1px solid var(--line);
  background: var(--bg-soft);
}

.btn-secondary:hover {
  background: var(--panel);
  border-color: var(--line);
}

.link-style {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  font-size: inherit;
  font-family: inherit;
  transition: color 0.3s ease;
  display: block;
  margin-bottom: 0.5rem;
  text-align: left;
}

.link-style:hover {
  color: var(--primary);
}

.section {
  padding: 1.5rem 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.cards-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px var(--shadow);
}

.card:hover {
  border-color: var(--brand);
  transform: translateY(-4px);
  background: var(--bg-soft);
  box-shadow: 0 10px 30px rgba(16, 241, 149, 0.2);
}

.card p,
.section p,
.list,
.event p,
.footer p,
.subtitle {
  color: var(--muted);
  line-height: 1.6;
}

#infra .card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

[data-theme="dark"] #infra .card, :root:not([data-theme="light"]) #infra .card {
  background: var(--panel);
  border-color: var(--brand);
}

.split {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 1.2rem;
  align-items: stretch;
}

.list {
  padding-left: 1.2rem;
}

.metric-box {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-soft);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.2rem;
  box-shadow: 0 4px 20px rgba(16, 241, 149, 0.2);
}

[data-theme="dark"] .metric-box, :root:not([data-theme="light"]) .metric-box {
  background: var(--panel);
  border-color: var(--brand);
}

[data-theme="light"] .metric-box {
  background: var(--bg-soft);
  border-color: var(--brand);
}

.metric-label {
  margin: 0;
  color: var(--text);
}

.metric-value {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(2.2rem, 6vw, 4rem);
}

.metric-unit {
  margin: 0;
}

.section-intro {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.timeline {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.event h3 {
  text-align: left;
  margin: 0 0 0.3rem 0;
}

.event {
  border-left: 3px solid var(--brand);
  padding: 0.7rem 1rem;
  background: var(--bg-soft);
  border-radius: 0 12px 12px 0;
  box-shadow: 2px 2px 10px rgba(16, 241, 149, 0.1);
  text-align: left;
}

.record-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.record-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 1rem;
}

.record-item h3 {
  margin-bottom: 0.3rem;
  font-size: 1rem;
  text-align: left;
}

.disclaimer {
  margin-top: 0.9rem;
  font-size: 0.95rem;
}

.data-note {
  color: var(--muted);
  margin-top: 0.2rem;
  text-align: left;
}

.mini-tag {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.timeline-patente {
  border-left-color: var(--accent);
}

.timeline-status {
  border-left-color: #ffd166;
}

.timeline-perfil {
  border-left-color: #ff9f1c;
}

.msg-error {
  color: #ff8f8f;
}

.cta a {
  color: var(--text);
}

.cta {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.4rem;
  background: var(--panel);
  box-shadow: 0 4px 25px var(--shadow);
  text-align: center;
}

.footer {
  padding: 4rem 0;
  border-top: 1px solid var(--line);
  background: rgba(13, 18, 27, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.5s ease;
}

[data-theme="light"] .footer {
  background: rgba(244, 247, 250, 0.9);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 6vw;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer-col h4 {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  text-align: left;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 0.8rem;
}

.footer-col ul li a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--brand);
}

.social-links li a i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
  transition: transform 0.3s ease, color 0.3s ease;
}

.social-links li a .fa-facebook {
  color: #1877F2;
}

.social-links li a .fa-instagram {
  color: #E4405F;
}

.social-links li a .fa-youtube {
  color: #FF0000;
}

.social-links li a:hover i {
  transform: scale(1.2);
  filter: brightness(1.2);
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.footer-about {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: left;
}

.footer-bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding: 1.5rem 6vw 0;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}


@media (max-width: 600px) {
  .typewriter {
    white-space: normal;
    width: 100% !important;
    animation: none !important;
  }
}

@media (max-width: 900px) {
  .cards,
  .cards-2,
  .split {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 600px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }

  .footer-col h4,
  .footer-brand,
  .footer-col {
    text-align: center;
    justify-content: center;
  }

  .footer-col ul li a {
    display: inline-block;
    padding: 0.5rem 0;
  }

  .subnav {
    padding: 0.5rem;
    gap: 0.3rem;
  }
  
  .subnav-btn {
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
    min-width: 80px;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    height: 60px;
  }
  
  .topbar-inner {
    height: 100%;
  }

  .menu-btn {
    display: inline-block;
  }

  .nav {
    position: fixed;
    top: 60px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1.5rem;
    background: var(--bg-soft);
    overflow-y: auto;
    z-index: 999;
    height: calc(100vh - 60px);
    height: calc(100dvh - 60px);
  }

  .nav.open {
    display: flex;
    animation: slideIn 0.3s ease-out;
  }

  @keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .nav-item:hover .submenu {
    display: none;
  }

  .nav-item.open .submenu {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.5rem 0 0.5rem 1rem;
    background: transparent;
    box-shadow: none;
    position: static;
    transform: none;
    animation: none;
    min-width: 0;
  }

  .submenu a {
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem;
    color: var(--muted);
  }

  .submenu a:hover {
    color: #000000;
  }

  .nav-btn {
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .nav-btn::after {
    content: '▾';
    font-size: 0.8rem;
    transition: transform 0.3s ease;
  }

  .nav-item.open .nav-btn::after {
    transform: rotate(180deg);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .btn {
    text-align: center;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .topbar-inner {
    padding: 0.8rem 4vw;
  }
  
  .brand {
    gap: 0.5rem;
    font-size: 0.85rem;
  }

  .brand-text-addon {
    display: none; /* Esconde em telas muito pequenas para dar espaço ao menu */
  }
  
  main {
    padding: 0.5rem 4vw 3rem;
  }

  h1 {
    font-size: 1.6rem;
    overflow-wrap: break-word;
  }

  .metric-value {
    font-size: 2.2rem;
  }

  .btn {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
  }

  .card {
    padding: 1.2rem;
  }

  .footer-inner, .footer-bottom {
    padding-left: 4vw;
    padding-right: 4vw;
  }
}
