:root {
  --blue: #006BFF;
  --cyan: #00D7F5;
  --deep: #082BFF;
  --bg: #030711;
  --navy: #0B1428;
  --muted: #71809B;
  --white: #F4F8FF;
  --grad: linear-gradient(110deg, #00D7F5 0%, #007BFF 55%, #082BFF 100%);
  --btn-grad: linear-gradient(180deg, #1A74FF 0%, #0A52E6 100%);
  --line: rgba(113, 128, 155, 0.22);
  --line-strong: rgba(0, 123, 255, 0.32);
  --cell: 56px;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1180px;
  --header-h: 72px;
  --gutter: clamp(20px, 5vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, .brand-text {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--white);
  color: var(--bg);
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.muted { color: var(--muted); }

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.btn .icon { transition: transform 0.2s ease; }
.btn:hover .icon:last-child { transform: translateX(3px); }

.btn-primary {
  background: var(--btn-grad);
  color: #fff;
  box-shadow: 0 6px 20px -8px rgba(0, 107, 255, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px -8px rgba(0, 123, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  filter: brightness(1.08);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  border-color: var(--line);
  background: rgba(11, 20, 40, 0.6);
  color: var(--white);
}
.btn-ghost:hover {
  border-color: var(--line-strong);
  background: rgba(0, 107, 255, 0.1);
  transform: translateY(-2px);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  background: rgba(3, 7, 17, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  transition: background-color 0.3s, border-color 0.3s;
}
.site-header.is-scrolled {
  background: rgba(3, 7, 17, 0.82);
  border-bottom-color: var(--line);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-text {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.brand-text b { font-weight: 700; color: var(--cyan); }

.nav { display: flex; align-items: center; gap: 32px; }
.nav-list { display: flex; align-items: center; gap: 28px; }
.nav-list a {
  position: relative;
  padding: 8px 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: #AAB6CC;
  transition: color 0.2s;
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-list a:hover,
.nav-list a[aria-current="true"] { color: var(--white); }
.nav-list a:hover::after,
.nav-list a[aria-current="true"]::after { transform: scaleX(1); }
.nav-cta { min-height: 40px; padding: 0 18px; border-radius: 10px; font-size: 0.88rem; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(11, 20, 40, 0.7);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--white);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
@property --l1x { syntax: "<percentage>"; inherits: true; initial-value: 74%; }
@property --l1y { syntax: "<percentage>"; inherits: true; initial-value: 36%; }
@property --l2x { syntax: "<percentage>"; inherits: true; initial-value: 28%; }
@property --l2y { syntax: "<percentage>"; inherits: true; initial-value: 80%; }

.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  padding: clamp(48px, 8vw, 96px) 0;
  overflow: hidden;
}

/* Fundo: grade fixa + camada acesa que segue duas luzes lentas (ver animations.css) */
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle 560px at var(--l1x) var(--l1y), rgba(0, 107, 255, 0.15), transparent 70%),
    radial-gradient(circle 440px at var(--l2x) var(--l2y), rgba(0, 215, 245, 0.08), transparent 70%);
}
.hero-bg::before,
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
}
.hero-bg::before {
  background-image:
    linear-gradient(rgba(113, 128, 155, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(113, 128, 155, 0.07) 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
  -webkit-mask-image: radial-gradient(ellipse 90% 85% at 50% 45%, #000 30%, transparent 88%);
  mask-image: radial-gradient(ellipse 90% 85% at 50% 45%, #000 30%, transparent 88%);
}
.hero-bg::after {
  background-image:
    radial-gradient(circle, rgba(0, 215, 245, 0.55) 0 1.5px, transparent 2px),
    linear-gradient(rgba(0, 170, 255, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 170, 255, 0.2) 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
  background-position: calc(var(--cell) / -2) calc(var(--cell) / -2), 0 0, 0 0;
  -webkit-mask-image:
    radial-gradient(circle 300px at var(--l1x) var(--l1y), #000, transparent),
    radial-gradient(circle 240px at var(--l2x) var(--l2y), #000, transparent);
  mask-image:
    radial-gradient(circle 300px at var(--l1x) var(--l1y), #000, transparent),
    radial-gradient(circle 240px at var(--l2x) var(--l2y), #000, transparent);
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
}

.hero-tag {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8FA0BD;
}
.hero-tag::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--cyan);
}

.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.2rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.hl { color: var(--cyan); }
.hero-lead {
  max-width: 50ch;
  margin-top: 24px;
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  color: #9AA8C2;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

/* Vitrine do projeto em destaque */
.showcase {
  position: relative;
  isolation: isolate;
  margin: 0;
}
.showcase::before {
  content: "";
  position: absolute;
  inset: 12% 6% -4%;
  z-index: -1;
  background: radial-gradient(ellipse at 50% 60%, rgba(0, 107, 255, 0.26), transparent 70%);
  filter: blur(36px);
}
.browser {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--navy);
  box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 7, 17, 0.6);
}
.browser-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(113, 128, 155, 0.3);
}
.browser-url {
  flex: 1;
  max-width: 260px;
  margin-left: 10px;
  padding: 4px 12px;
  border-radius: 7px;
  background: rgba(113, 128, 155, 0.12);
  font-size: 0.74rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.browser-shot {
  display: block;
  aspect-ratio: 16 / 10;
  background: #060d1d;
  overflow: hidden;
}
.browser-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.browser-shot:hover img { transform: scale(1.03); }
.showcase-cap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-inline: 4px;
}
.cap-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
}
.showcase-cap b {
  margin-right: 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}
.cap-sub { font-size: 0.88rem; color: var(--muted); }
.cap-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.2s;
}
.cap-link:hover { color: var(--cyan); }
.cap-link .icon { width: 16px; height: 16px; }

/* Seções */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-alt {
  background: linear-gradient(180deg, rgba(11, 20, 40, 0.55), rgba(11, 20, 40, 0.2));
  border-block: 1px solid var(--line);
}

.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 60px); }
.section h2 {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.08;
  text-wrap: balance;
}
.section-head p { margin-top: 16px; color: #AAB6CC; max-width: 52ch; }

/* Sobre */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(36px, 7vw, 96px);
  align-items: start;
}
.about-copy p { margin-top: 20px; color: #AAB6CC; max-width: 54ch; }
.about-copy h2 + p { margin-top: 24px; }
.focus { border-left: 1px solid var(--line); }
.focus li {
  position: relative;
  padding: 4px 0 4px 28px;
  margin-bottom: 26px;
}
.focus li:last-child { margin-bottom: 0; }
.focus li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 12px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--blue);
  box-shadow: 0 0 12px rgba(0, 123, 255, 0.7);
}
.focus h3 { font-size: 1.15rem; font-weight: 600; }
.focus p { margin-top: 4px; font-size: 0.95rem; color: var(--muted); }

/* Habilidades */
.skill-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
  align-items: start;
}
.skill-group {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(11, 20, 40, 0.75);
  transition: border-color 0.3s;
}
.skill-group:hover { border-color: var(--line-strong); }
.skill-group h3 {
  margin-bottom: 22px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #AAB6CC;
}
.skill-group ul { display: grid; gap: 18px; }
.skill-group li { display: flex; align-items: center; gap: 14px; }
.skill-group b { display: block; font-size: 0.98rem; font-weight: 600; line-height: 1.3; }
.skill-group small { display: block; margin-top: 2px; font-size: 0.83rem; color: var(--muted); line-height: 1.4; }

.tile {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: linear-gradient(150deg, rgba(0, 215, 245, 0.14), rgba(8, 43, 255, 0.14));
  color: var(--cyan);
  transition: box-shadow 0.3s, transform 0.3s;
}
.skill-group li:hover .tile,
.service-list li:hover .tile {
  box-shadow: 0 0 24px -4px rgba(0, 123, 255, 0.8);
  transform: translateY(-2px);
}
.tile-lg { width: 56px; height: 56px; border-radius: 16px; }
.tile-lg .icon { width: 26px; height: 26px; }

/* Projetos */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.project {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--navy);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.project:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: 0 24px 50px -24px rgba(0, 107, 255, 0.55);
}
.project-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #060d1d;
  overflow: hidden;
}
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project:hover .project-media img { transform: scale(1.04); }
.project-badges {
  position: absolute;
  left: 14px;
  top: 14px;
  display: flex;
  gap: 8px;
}
.badge {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(3, 7, 17, 0.82);
  border: 1px solid var(--line-strong);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--white);
}
.badge-placeholder { color: var(--muted); border-style: dashed; border-color: var(--line); }
.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
}
.project h3 { font-size: 1.3rem; font-weight: 600; }
.project-body > p { font-size: 0.93rem; color: #AAB6CC; }
.tech { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.tech li {
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(0, 107, 255, 0.12);
  border: 1px solid rgba(0, 107, 255, 0.3);
  font-size: 0.76rem;
  font-weight: 500;
  color: #9CC3FF;
}
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding-top: 16px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
}
.project-links a,
.project-links span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
}
.project-links a { color: var(--white); transition: color 0.2s; }
.project-links a:hover { color: var(--cyan); }
.project-links .icon { width: 16px; height: 16px; }
.project-links .is-off { color: var(--muted); font-weight: 500; }

/* Serviços */
.services {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(36px, 7vw, 96px);
  align-items: start;
}
.services .section-head { position: sticky; top: calc(var(--header-h) + 40px); margin-bottom: 0; }
.service-list li {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.service-list li:first-child { border-top: 0; padding-top: 0; }
.service-list h3 { font-size: 1.3rem; font-weight: 600; }
.service-list p { margin-top: 6px; color: var(--muted); max-width: 46ch; }

/* Contato */
.contact {
  position: relative;
  padding: clamp(36px, 7vw, 88px) clamp(24px, 6vw, 80px);
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(11, 20, 40, 0.95), rgba(3, 7, 17, 0.95));
  overflow: hidden;
}
.contact-glow {
  position: absolute;
  right: -10%;
  top: -40%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 123, 255, 0.3), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
}
.contact > :not(.contact-glow) { position: relative; }
.contact h2 { max-width: 16ch; }
.contact > p { max-width: 52ch; margin-top: 20px; color: #AAB6CC; }
.contact-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 48px;
}
.contact-links a {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(3, 7, 17, 0.5);
  transition: border-color 0.25s, background-color 0.25s, transform 0.25s;
}
.contact-links a:hover {
  border-color: var(--line-strong);
  background: rgba(0, 107, 255, 0.08);
  transform: translateY(-2px);
}
.contact-links .icon { grid-row: span 2; width: 22px; height: 22px; color: var(--cyan); }
.contact-links span { font-weight: 600; font-size: 0.95rem; }
.contact-links small {
  color: var(--muted);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-top: 64px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
}
.footer-brand p { max-width: 38ch; margin-top: 16px; font-size: 0.93rem; color: var(--muted); }
.footer-title {
  margin-bottom: 16px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0;
  color: #AAB6CC;
}
.site-footer li + li { margin-top: 10px; }
.site-footer li a { font-size: 0.93rem; color: var(--muted); transition: color 0.2s; }
.site-footer li a:hover { color: var(--white); }
.footer-bottom {
  margin-top: 56px;
  padding-block: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}