:root {
  --purple: #6558FE;
  --purple-soft: rgba(101, 88, 254, 0.14);
  --purple-line: rgba(101, 88, 254, 0.35);
  --green: #CDFF4E;
  --green-soft: rgba(205, 255, 78, 0.12);
  --bg: #0A0A0D;
  --bg-alt: #101015;
  --surface: #16161D;
  --surface-2: #1C1C25;
  --border: #272731;
  --text: #F3F3F6;
  --muted: #B0B0BD;   /* contraste ≥ 8:1 sobre o fundo */
  --radius: 18px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }

.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.container.narrow { width: min(820px, 100% - 2.5rem); }

/* ---------- Topo ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 13, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand {
  font-family: var(--display); font-weight: 700; font-size: 1.15rem;
  text-decoration: none; letter-spacing: -0.01em;
}
.brand::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--green); margin-right: 10px; }
.nav { display: flex; gap: 0.35rem; align-items: center; }
.nav a {
  text-decoration: none; color: var(--muted); font-size: 0.95rem; font-weight: 500;
  padding: 0.45rem 0.8rem; border-radius: 999px; transition: color .2s, background .2s;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav a.nav-cta { color: var(--text); border: 1px solid var(--purple-line); }
.nav a.nav-cta:hover { background: var(--purple); border-color: var(--purple); color: #fff; }

/* ---------- Botões (legíveis sem hover) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  font-family: var(--font); font-weight: 600; font-size: 1rem; line-height: 1;
  padding: 0.95rem 1.5rem; border-radius: 999px; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .2s, background .2s, box-shadow .2s;
}
.btn-primary { background: var(--green); color: #0A0A0D; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(205, 255, 78, 0.55); }
.btn-secondary { background: var(--purple); color: #FFFFFF; }
.btn-secondary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(101, 88, 254, 0.7); background: #7468FF; }
.btn-icon { display: inline-flex; }
.btn-icon .icon { width: 18px; height: 18px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(3.5rem, 9vw, 7.5rem) 0 clamp(4rem, 10vw, 8rem);
  background:
    radial-gradient(60% 70% at 85% 10%, rgba(101, 88, 254, 0.30), transparent 70%),
    radial-gradient(40% 50% at 5% 100%, rgba(205, 255, 78, 0.07), transparent 70%),
    var(--bg);
}
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  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: 56px 56px;
  mask-image: radial-gradient(ellipse at 60% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 30%, #000 20%, transparent 75%);
}
.hero-inner {
  position: relative;
  display: grid; grid-template-columns: 1fr auto; gap: 3rem; align-items: start;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  margin: 0 0 1.4rem; padding: .4rem .9rem;
  font-size: .85rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--green); background: var(--green-soft); border: 1px solid rgba(205, 255, 78, .25);
  border-radius: 999px;
}
.eyebrow:empty { display: none; }
.hero-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.6rem, 7.2vw, 5.4rem); line-height: 1.02; letter-spacing: -0.035em;
  margin: 0 0 1.5rem;
}
.hero-title .accent { color: var(--green); display: block; }
.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.3rem); color: #D2D2DC; max-width: 34ch;
  margin: 0 0 2.4rem; line-height: 1.6;
}
.hero-photo-wrap { padding-top: .5rem; }
.hero-photo {
  width: clamp(170px, 22vw, 260px); aspect-ratio: 1; border-radius: 50%;
  padding: 5px;
  background: conic-gradient(from 210deg, var(--purple), var(--green), var(--purple));
  box-shadow: 0 30px 80px -30px rgba(101, 88, 254, 0.8);
}
.hero-photo img, .hero-photo .initials {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--bg); background: var(--surface);
}
.hero-photo .initials {
  display: grid; place-items: center;
  font-family: var(--display); font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 700; color: var(--green);
}

/* ---------- Seções ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid rgba(255, 255, 255, 0.04); }
.section-title {
  position: relative;
  font-family: var(--display); font-weight: 700; letter-spacing: -0.02em;
  font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.2;
  margin: 0 0 2.6rem; padding-left: 1.1rem;
}
.section-title::before {
  content: ""; position: absolute; left: 0; top: .12em; bottom: .12em;
  width: 5px; border-radius: 4px; background: var(--green);
}

.about-text { font-size: clamp(1.08rem, 1.7vw, 1.22rem); color: #D9D9E2; line-height: 1.85; }
.about-text p { margin: 0 0 1.3rem; }
.about-text p:first-child { font-size: 1.15em; color: var(--text); font-weight: 500; }
.about-text strong { color: var(--green); font-weight: 600; }

.grid { display: grid; gap: 1.4rem; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.8rem; transition: border-color .25s, transform .25s, background .25s;
}
.card:hover { border-color: var(--purple-line); transform: translateY(-4px); }
.card-icon {
  width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: 14px; background: var(--purple-soft); color: var(--green); margin-bottom: 1.3rem;
}
.card-icon .icon { width: 26px; height: 26px; }
.card h3 {
  font-family: var(--display); font-size: 1.22rem; font-weight: 600; line-height: 1.3;
  margin: 0 0 .7rem; letter-spacing: -0.01em;
}
.card p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.65; }

/* Serviços */
.service { position: relative; overflow: hidden; padding: 2.2rem; }
.service::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 160px; height: 160px;
  border-radius: 50%; background: radial-gradient(circle, rgba(101, 88, 254, .22), transparent 70%);
  pointer-events: none;
}
.service .card-icon { background: var(--green); color: #0A0A0D; }

/* Projetos */
.project { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.project-media {
  aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.project-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .5s; }
.project:hover .project-media img { transform: scale(1.04); }
.project-media .placeholder {
  height: 100%; display: grid; place-items: center; color: #5b5b6b;
  background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 14px, #1f1f29 14px, #1f1f29 28px);
}
.project-media .placeholder .icon { width: 40px; height: 40px; }
.project-body { padding: 1.6rem; display: flex; flex-direction: column; gap: 1rem; flex: 1; }
.project-body h3 { text-transform: uppercase; letter-spacing: .02em; font-size: 1.1rem; margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; padding: 0; margin: 0; }
.tags li {
  font-size: .82rem; font-weight: 500; color: #DCD9FF;
  background: var(--purple-soft); border: 1px solid var(--purple-line);
  padding: .25rem .65rem; border-radius: 999px;
}
.project-body .btn { margin-top: auto; align-self: flex-start; padding: .8rem 1.3rem; font-size: .95rem; }

/* Contato */
.contact-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.contact {
  display: flex; align-items: center; gap: 1.2rem; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem 1.8rem; transition: border-color .25s, transform .25s;
}
.contact:hover { border-color: var(--green); transform: translateY(-3px); }
.contact .card-icon { margin: 0; flex-shrink: 0; }
.contact-label { display: block; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.contact-value { display: block; font-size: 1.1rem; font-weight: 600; color: var(--text); word-break: break-word; }
.contact-arrow { margin-left: auto; color: var(--green); flex-shrink: 0; }
.contact-arrow .icon { width: 22px; height: 22px; }

/* Rodapé */
.footer { border-top: 1px solid var(--border); padding: 2rem 0; color: var(--muted); font-size: .92rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.back-top { text-decoration: none; color: var(--green); font-weight: 500; }

/* Animação de entrada */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn, .contact, .project-media img { transition: none; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav a:not(.nav-cta) { display: none; }
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-photo-wrap { order: -1; padding-top: 0; justify-self: end; }
  .hero-photo { width: 132px; }
  .hero-title .accent { display: inline; }
  .grid-4, .grid-3, .contact-list { grid-template-columns: 1fr; }
  .card { padding: 1.5rem; }
  .contact { padding: 1.3rem; }
  .btn { width: 100%; }
  .project-body .btn { width: 100%; align-self: stretch; }
}
@media (max-width: 380px) {
  body { font-size: 1rem; }
  .container, .container.narrow { width: calc(100% - 2rem); }
}
