:root {
  --bg: #0b1020;
  --bg-elevated: rgba(14, 22, 43, 0.78);
  --panel: rgba(17, 27, 52, 0.78);
  --panel-strong: #111c35;
  --text: #edf3ff;
  --muted: #a5b3d1;
  --line: rgba(167, 189, 255, 0.14);
  --accent: #63e6be;
  --accent-strong: #2dd4bf;
  --accent-soft: rgba(99, 230, 190, 0.14);
  --shadow: 0 24px 70px rgba(2, 8, 24, 0.38);
  --hero-glow: radial-gradient(circle at top, rgba(59, 130, 246, 0.25), transparent 42%);
  --surface-glow: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
}

body.light {
  --bg: #f3f7ff;
  --bg-elevated: rgba(255, 255, 255, 0.88);
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: #ffffff;
  --text: #12203d;
  --muted: #56657f;
  --line: rgba(18, 32, 61, 0.12);
  --accent: #0f9f8c;
  --accent-strong: #0d9488;
  --accent-soft: rgba(15, 159, 140, 0.1);
  --shadow: 0 24px 60px rgba(88, 107, 149, 0.16);
  --hero-glow: radial-gradient(circle at top, rgba(14, 165, 164, 0.16), transparent 45%);
  --surface-glow: linear-gradient(135deg, rgba(18, 32, 61, 0.03), rgba(18, 32, 61, 0.01));
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", sans-serif;
  background:
    var(--hero-glow),
    linear-gradient(180deg, rgba(10, 15, 31, 0.98), rgba(8, 12, 24, 1));
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.light {
  background:
    var(--hero-glow),
    linear-gradient(180deg, #f6f8fc, #eef3fb);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
  display: block;
}

.site-shell {
  position: relative;
  overflow: clip;
}

.site-shell::before,
.site-shell::after {
  content: "";
  position: fixed;
  inset: auto;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(40px);
  z-index: -1;
}

.site-shell::before {
  width: 19rem;
  height: 19rem;
  top: 6rem;
  left: -4rem;
  background: rgba(45, 212, 191, 0.14);
}

.site-shell::after {
  width: 24rem;
  height: 24rem;
  right: -8rem;
  bottom: 10rem;
  background: rgba(59, 130, 246, 0.15);
}

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(18px);
  background: rgba(7, 12, 24, 0.58);
  border-bottom: 1px solid var(--line);
}

body.light .header {
  background: rgba(243, 247, 255, 0.72);
}

.nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  width: 2.8rem;
  height: 2.8rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--accent-strong), #3b82f6);
  color: #03121e;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text strong,
h1,
h2,
h3 {
  font-family: "Manrope", sans-serif;
}

.brand-text small {
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.nav-links a {
  color: var(--muted);
  font-weight: 500;
  transition: color 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active,
.nav-links a:focus-visible {
  color: var(--text);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.35rem;
  border-radius: 0.9rem;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.btn,
.icon-button {
  border: 0;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  font: inherit;
}

.btn {
  padding: 0.95rem 1.3rem;
  border-radius: 999px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
}

.btn:hover,
.icon-button:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #58a6ff);
  color: #04131f;
  box-shadow: 0 14px 30px rgba(45, 212, 191, 0.18);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.icon-button {
  width: 2.9rem;
  height: 2.9rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--line);
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 1.25rem 5rem;
}

.hero {
  min-height: calc(100vh - 5rem);
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 2rem;
  align-items: center;
  padding: 3.5rem 0 2rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 5.4rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
  max-width: 10.5ch;
}

.hero-text {
  max-width: 60ch;
  color: var(--muted);
  font-size: 1.08rem;
  margin-top: 1.3rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.4rem;
}

.hero-metrics article,
.panel,
.service-card,
.project-card,
.profile-card,
.highlight-item,
.cta-card,
.modal-content {
  background: var(--surface-glow), var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-metrics article {
  border-radius: 1.3rem;
  padding: 1.1rem;
}

.hero-metrics strong {
  display: block;
  font-size: 1.35rem;
  color: var(--text);
}

.hero-metrics span {
  color: var(--muted);
}

.hero-card {
  position: relative;
  display: grid;
  gap: 1rem;
}

.profile-card {
  border-radius: 1.8rem;
  padding: 1.4rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
}

.profile-visual {
  position: relative;
  width: 6.4rem;
  height: 6.4rem;
  border-radius: 1.7rem;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(99, 230, 190, 0.2), rgba(59, 130, 246, 0.18));
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.profile-label {
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.profile-card h2 {
  font-size: 1.6rem;
  margin-bottom: 0.35rem;
}

.profile-card p {
  color: var(--muted);
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 1.5rem;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #63e6be, #3b82f6);
  color: #04131f;
  font-family: "Manrope", sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
}

.avatar-fallback {
  position: absolute;
  inset: 0;
}

.profile-image,
.mobile-frame-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.highlight-grid {
  display: grid;
  gap: 1rem;
}

.highlight-item {
  border-radius: 1.5rem;
  padding: 1.2rem 1.25rem;
}

.highlight-item span,
.service-icon,
.project-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.highlight-item span,
.service-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  background: var(--accent-soft);
  margin-bottom: 0.9rem;
  font-size: 0.9rem;
  font-weight: 800;
}

.highlight-item h3,
.service-card h3,
.project-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.45rem;
}

.highlight-item p,
.service-card p,
.project-card p,
.footer p,
.info-list span,
.modal-content p,
.modal-list li {
  color: var(--muted);
}

.section {
  padding: 4.5rem 0 0;
}

.section-heading {
  max-width: 48rem;
  margin-bottom: 1.75rem;
}

.section-heading h2,
.cta-card h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.2rem;
}

.panel {
  border-radius: 1.8rem;
  padding: 1.5rem;
}

.panel p {
  font-size: 1.05rem;
}

.info-list {
  display: grid;
  gap: 1rem;
}

.info-list div {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.info-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.info-list span {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.info-list strong {
  font-size: 1.03rem;
}

.mobile-showcase {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.2rem;
  align-items: center;
}

.mobile-showcase h3 {
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
}

.mobile-showcase-copy p:last-child {
  color: var(--muted);
}

.mobile-points {
  display: grid;
  gap: 0.9rem;
}

.mobile-point {
  padding: 1rem 1.05rem;
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.mobile-point strong {
  display: block;
  margin-bottom: 0.25rem;
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
}

.mobile-point span {
  color: var(--muted);
  font-size: 0.95rem;
}

.services-grid,
.projects-grid {
  display: grid;
  gap: 1.2rem;
}

.services-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card,
.project-card {
  border-radius: 1.6rem;
  padding: 1.45rem;
}

.projects-grid {
  grid-template-columns: 1.2fr 1fr 1fr;
}

.project-card ul {
  list-style: none;
  margin-top: 1rem;
  display: grid;
  gap: 0.55rem;
}

.project-card li {
  position: relative;
  padding-left: 1rem;
}

.project-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--accent);
}

.project-tag {
  margin-bottom: 0.9rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.featured {
  background:
    linear-gradient(180deg, rgba(99, 230, 190, 0.12), rgba(59, 130, 246, 0.06)),
    var(--surface-glow),
    var(--panel);
}

.cta-section {
  padding-bottom: 0;
}

.cta-card {
  border-radius: 2rem;
  padding: 1.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.cta-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4rem 1.25rem 2.5rem;
}

.footer-top {
  padding: 1.8rem 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.footer-top h2 {
  margin-bottom: 0.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.2rem;
}

.footer-links a {
  color: var(--muted);
  transition: color 0.25s ease;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  color: var(--muted);
  margin-top: 1.5rem;
}

.mobile-dock {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(3, 8, 20, 0.72);
  z-index: 1200;
}

.modal.active {
  display: flex;
}

.modal-content {
  width: min(100%, 34rem);
  border-radius: 1.8rem;
  padding: 1.7rem;
  position: relative;
}

.modal-content h3 {
  font-size: 1.6rem;
  margin-bottom: 0.7rem;
}

.modal-list {
  list-style: none;
  display: grid;
  gap: 0.55rem;
  margin: 1.1rem 0 1.35rem;
}

.modal-list li {
  padding-left: 1rem;
  position: relative;
}

.modal-list li::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  left: 0;
  top: 0.6rem;
}

.fechar {
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 1.4rem;
}

.instagram-float {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 900;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #f9ce34, #ee2a7b, #6228d7);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
}

.instagram-icon {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
}

#preloader {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #08101f;
  z-index: 2000;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: #f3fbff;
  font-family: "Manrope", sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.loader-dot {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #63e6be, #3b82f6);
  animation: pulse-loader 0.9s ease-in-out infinite alternate;
}

@keyframes pulse-loader {
  from {
    transform: scale(0.8);
    opacity: 0.65;
  }
  to {
    transform: scale(1.15);
    opacity: 1;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero,
  .about-grid,
  .projects-grid,
  .services-grid,
  .mobile-showcase,
  .cta-card,
  .footer-top {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 2.4rem;
  }

  .services-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projects-grid {
    display: grid;
  }

  .cta-card,
  .footer-top {
    display: grid;
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: inline-block;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 0.7rem);
    left: 1rem;
    right: 1rem;
    padding: 1rem;
    border-radius: 1.4rem;
    background: var(--panel-strong);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a,
  .nav-links .btn,
  .nav-links .icon-button {
    width: 100%;
    justify-content: center;
  }

  .hero h1 {
    max-width: none;
  }

  .hero-metrics,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .profile-card {
    grid-template-columns: 1fr;
  }

  .profile-visual {
    width: 6rem;
    height: 6rem;
  }

  .brand-text small {
    display: none;
  }
}

@media (max-width: 540px) {
  body {
    padding-bottom: 5.6rem;
  }

  .nav,
  main,
  .footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero {
    padding-top: 1.8rem;
  }

  .hero-card,
  .about-grid,
  .projects-grid {
    gap: 0.9rem;
  }

  .section {
    padding-top: 3.6rem;
  }

  .section-heading h2,
  .cta-card h2 {
    font-size: 1.95rem;
  }

  .btn {
    width: 100%;
  }

  .hero-actions,
  .cta-actions {
    width: 100%;
  }

  .hero-metrics article,
  .panel,
  .service-card,
  .project-card,
  .profile-card,
  .highlight-item,
  .cta-card,
  .modal-content {
    border-radius: 1.4rem;
  }

  .projects-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 88%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.35rem;
  }

  .projects-grid::-webkit-scrollbar {
    height: 0;
  }

  .project-card {
    scroll-snap-align: start;
  }

  .mobile-dock {
    position: fixed;
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.85rem;
    z-index: 950;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.45rem;
    padding: 0.45rem;
    border-radius: 1.2rem;
    background: rgba(12, 18, 34, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.24);
  }

  body.light .mobile-dock {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(18, 32, 61, 0.1);
  }

  .mobile-dock a {
    text-align: center;
    padding: 0.7rem 0.4rem;
    border-radius: 0.95rem;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease;
  }

  .mobile-dock a.active {
    background: var(--accent-soft);
    color: var(--text);
  }

  .instagram-float {
    right: 1rem;
    left: auto;
    bottom: 6.15rem;
  }
}
