/* ===== RESET ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a061a;
  --bg-soft: #120a28;
  --purple: #a855f7;
  --purple-deep: #7c3aed;
  --blue: #38bdf8;
  --text: #e8e6f4;
  --text-dim: #9d97b8;
  --border: rgba(168, 85, 247, 0.35);
  --radius: 16px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  background-image:
    radial-gradient(circle at 15% 10%, rgba(124, 58, 237, 0.18), transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(56, 189, 248, 0.12), transparent 35%),
    radial-gradient(circle at 50% 90%, rgba(168, 85, 247, 0.12), transparent 40%);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

img { max-width: 100%; display: block; }

a { text-decoration: none; color: inherit; }

.gradient-text {
  background: linear-gradient(90deg, var(--purple), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  color: var(--purple);
  font-weight: 600;
  letter-spacing: 1px;
  font-size: 0.85rem;
  margin-bottom: 14px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(90deg, var(--purple-deep), var(--purple));
  color: #fff;
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.45);
}
.btn--primary:hover { box-shadow: 0 0 36px rgba(168, 85, 247, 0.7); transform: translateY(-2px); }

.btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--purple); background: rgba(168, 85, 247, 0.08); }

.btn--outline {
  background: rgba(168, 85, 247, 0.06);
  border: 1px solid var(--border);
  color: var(--purple);
}
.btn--outline:hover { background: rgba(168, 85, 247, 0.14); }

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 6, 26, 0.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(168, 85, 247, 0.15);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.logo { display: flex; align-items: center; gap: 14px; }

.logo__hex {
  --s: 54px;
  width: var(--s);
  height: var(--s);
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0% 50%);
  background: linear-gradient(145deg, var(--purple-deep), var(--blue));
  padding: 2px;
  display: flex;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.5);
}
.logo__hex img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0% 50%);
}

.logo__hex--icon {
  background: none;
  padding: 0;
  box-shadow: none;
  clip-path: none;
  --s: 52px;
}
.logo__hex--icon img {
  clip-path: none;
  object-fit: contain;
}

.logo__text {
  font-family: 'Nunito', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 1px;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.logo__text span { color: var(--purple); }
.logo__text small {
  font-family: 'Nunito', sans-serif;
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  font-weight: 500;
}

.nav { display: flex; gap: 36px; }
.nav__link {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-dim);
  position: relative;
  padding-bottom: 6px;
  transition: color 0.2s;
}
.nav__link:hover, .nav__link.active { color: var(--text); }
.nav__link.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--blue));
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav__toggle span {
  width: 26px; height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ===== HERO ===== */
.hero { padding: 90px 0 60px; }
.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
}

.hero__hi { color: var(--purple); font-weight: 600; margin-bottom: 8px; }
.hero__title {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 22px;
}
.hero__role {
  color: var(--text-dim);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero__desc {
  color: var(--text-dim);
  font-size: 1.02rem;
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 32px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 34px; }

.hero__socials { display: flex; gap: 14px; }
.social {
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--purple);
  transition: all 0.25s;
}
.social:hover { background: var(--purple); color: #fff; box-shadow: 0 0 18px rgba(168,85,247,0.6); }

/* Hero visual hexagon */
.hero__visual { display: flex; justify-content: center; }
.hex-frame {
  position: relative;
  width: min(420px, 100%);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hex-frame__glow {
  position: absolute;
  inset: 8%;
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0% 50%);
  background: linear-gradient(150deg, rgba(124,58,237,0.35), rgba(56,189,248,0.15));
  filter: blur(2px);
  animation: pulse 3.5s ease-in-out infinite;
}
.hex-frame__glow::before {
  content: '';
  position: absolute;
  inset: -2px;
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0% 50%);
  padding: 2px;
  background: linear-gradient(150deg, var(--purple), var(--blue));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

@keyframes pulse {
  0%, 100% { filter: drop-shadow(0 0 18px rgba(168,85,247,0.5)); }
  50% { filter: drop-shadow(0 0 34px rgba(56,189,248,0.6)); }
}

.hex-frame__photo {
  position: absolute;
  inset: 14%;
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0% 50%);
  overflow: hidden;
  background: var(--bg-soft);
}
.hex-frame__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

.hex-frame__lines { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.8; }
.node { fill: var(--blue); filter: drop-shadow(0 0 4px var(--blue)); }

/* ===== ABOUT ===== */
.about { padding: 40px 0 80px; }
.about__card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(124, 58, 237, 0.04);
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.about__p { color: var(--text-dim); line-height: 1.8; margin-bottom: 28px; }

.tech__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.tech__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.75rem;
  color: var(--text-dim);
  transition: all 0.25s;
}
.tech__item img { width: 32px; height: 32px; }
.tech__item:hover { transform: translateY(-4px); border-color: var(--purple); box-shadow: 0 8px 20px rgba(168,85,247,0.25); }

/* ===== SECTION TITLE ===== */
.section__title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: 1px;
}
.section__title.with-lines {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.section__title .line {
  height: 1px;
  width: 80px;
  background: linear-gradient(90deg, transparent, var(--purple), transparent);
}

/* ===== SERVICES ===== */
.services { padding: 20px 0 90px; }
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service__card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 26px;
  background: rgba(124, 58, 237, 0.03);
  transition: all 0.25s;
}
.service__card:hover { transform: translateY(-6px); border-color: var(--purple); box-shadow: 0 12px 30px rgba(168,85,247,0.2); }
.service__icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(168,85,247,0.2), rgba(56,189,248,0.15));
  color: var(--purple);
  margin-bottom: 20px;
}
.service__card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.service__card p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.6; }

/* ===== PROJECTS ===== */
.projects { padding: 20px 0 90px; }
.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}
.project__card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  border-bottom: 3px solid var(--purple);
  box-shadow: 0 0 0 rgba(168,85,247,0);
  transition: all 0.25s;
}
.project__card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 34px rgba(168,85,247,0.3), 0 3px 14px rgba(168,85,247,0.6);
}

.project__preview {
  position: relative;
  background: var(--bg-soft);
  aspect-ratio: 16/11;
  overflow: hidden;
}

.project__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.project__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  background: linear-gradient(to top, rgba(6, 3, 18, 0.92) 0%, rgba(6, 3, 18, 0.55) 45%, transparent 80%);
}
.project__overlay h3 { color: #fff; font-size: 1.15rem; margin-bottom: 6px; }
.project__overlay p { color: var(--text-dim); font-size: 0.85rem; line-height: 1.4; }
.project__stack { display: flex; gap: 8px; }
.project__stack img {
  width: 22px; height: 22px;
  padding: 4px;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.projects__more { display: flex; justify-content: center; }

/* ===== CTA / CONTATO ===== */
.cta { padding: 20px 0 90px; }
.cta__card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(124,58,237,0.12), rgba(56,189,248,0.06));
  padding: 44px 48px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.cta__icon {
  width: 64px; height: 64px;
  flex-shrink: 0;
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0% 50%);
  background: linear-gradient(145deg, var(--purple-deep), var(--blue));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.cta__text { flex: 1; min-width: 240px; }
.cta__text h2 { font-family: 'Nunito', sans-serif; font-size: 1.3rem; margin-bottom: 8px; }
.cta__text p { color: var(--text-dim); }

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 28px 0;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid rgba(168,85,247,0.12);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { order: -1; }
  .about__card { grid-template-columns: 1fr; }
  .services__grid, .projects__grid { grid-template-columns: 1fr; }
  .tech__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .nav {
    position: absolute;
    top: 84px; left: 0; right: 0;
    background: rgba(10,6,26,0.97);
    flex-direction: column;
    padding: 20px 24px;
    gap: 18px;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav.open { display: flex; }
  .nav__toggle { display: flex; }
  .cta__card { flex-direction: column; text-align: center; }
}
