/* ============================================================
   Portfólio Vanilla - Welton Moura
   Estilo base: new_styles.css (single source of truth)
   Adições/overrides específicos do portfólio: abaixo.
   ============================================================ */
@import url("../new_styles.css");

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

::selection {
  background: rgba(124, 58, 237, 0.45);
  color: #fff;
}

/* ── Top Nav ── */
.top-nav {
  padding: 0.75rem 1.25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.top-nav .nav-link {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.nav-link.active {
  color: #e4e4e7;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #71717a;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 8px 10px;
  transition: color 0.2s;
}

.nav-toggle:hover {
  color: #e4e4e7;
}

/* ── Hero ── */
.generator {
  padding-top: 6rem;
}

.avatar {
  width: 170px;
  height: 170px;
  margin: 0 auto 1.5rem;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  box-shadow: 0 0 45px rgba(124, 58, 237, 0.35);
}

.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #0a0a0f;
  filter: grayscale(40%);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.avatar:hover img {
  filter: grayscale(0%);
  transform: scale(1.04);
}

.intro-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 820px;
  width: 100%;
}

.intro-card {
  max-width: none;
}

.intro-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #d4d4d8;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.intro-card p {
  color: #71717a;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ── Logos ── */
.logos-section {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: 0 2rem;
}

.logos-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
  max-width: 820px;
  padding: 1.25rem 1.5rem;
}

.back-logo {
  line-height: 0;
}

.back-logo img {
  height: 42px;
  width: auto;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.3s ease-in-out;
}

.back-logo img:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.1);
}

/* ── About / Sections ── */
.about-hero h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #e4e4e7;
}

.about-card {
  max-width: none;
}

.about-card p {
  color: #71717a;
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.about-card p:last-child {
  margin-bottom: 0;
}

/* ── Stats ── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.stat {
  max-width: none;
  text-align: center;
  padding: 1.5rem 1rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.stat:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 58, 237, 0.3);
}

.stat h3 {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.stat p {
  color: #71717a;
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

/* ── Projetos (Flip Cards) ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.flip-card {
  height: 400px;
  width: 100%;
  background-color: transparent;
  perspective: 1000px;
  cursor: default;
  transition: transform 0.3s ease;
}

.projects-grid .flip-card:hover {
  transform: translateY(-5px) scale(1.02);
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
}

.flip-card-inner.flipped {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.flip-card-front img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  filter: grayscale(20%);
  transition: filter 0.4s ease, transform 0.4s ease;
}

.projects-grid .flip-card:hover .flip-card-front img {
  filter: grayscale(0%);
  transform: scale(1.03);
}

.flip-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #a78bfa;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.flip-action:hover {
  background: rgba(124, 58, 237, 0.25);
  color: #c4b5fd;
  transform: translateY(-1px);
}

.flip-card-front .flip-action {
  margin: 0 1.25rem 1.25rem auto;
}

.back-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  flex-shrink: 0;
}

.back-footer .flip-action {
  margin: 0;
}

.flip-front-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.25rem 1.5rem;
}

.flip-front-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #e4e4e7;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.flip-front-body p {
  color: #71717a;
  font-size: 0.9rem;
  line-height: 1.5;
}

.flip-card-back {
  transform: rotateY(180deg);
  padding: 1.75rem 1.5rem;
  align-items: center;
  background: rgba(16, 16, 24, 0.92);
}

.flip-card-back h3 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.flip-back-text {
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  color: #a1a1aa;
  font-size: 0.85rem;
  line-height: 1.65;
  text-align: left;
  margin-bottom: 1.25rem;
}

.flip-back-text strong {
  color: #c4b5fd;
  font-weight: 600;
}

.flip-back-text br {
  display: block;
  content: "";
  margin: 0.5rem 0;
}

.flip-card-back .btn {
  flex-shrink: 0;
}

/* ── Serviços ── */
.feature-icon {
  font-size: 1.5rem;
  color: #a78bfa;
  display: block;
  margin-bottom: 0.6rem;
}

/* ── Footer ── */
.site-footer {
  position: relative;
  z-index: 2;
  margin-top: 2rem;
  padding: 3rem 2rem 2rem;
}

.site-footer h3 {
  color: #e4e4e7;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.social-icons a {
  color: #71717a;
  font-size: 1.5rem;
  transition: color 0.25s ease, transform 0.25s ease;
}

.social-icons a::after {
  display: none;
}

.social-icons a:hover {
  color: #a78bfa;
  transform: translateY(-3px);
}

/* ── Scroll Reveal ── */
.glass-card.reveal {
  animation: none;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0s);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .top-nav {
    justify-content: space-between;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100%);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.6rem 1rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links .nav-link {
    padding: 0.65rem 0.5rem;
    font-size: 0.95rem;
    text-align: center;
  }

  .intro-cards {
    grid-template-columns: 1fr;
  }

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

  .logos-section {
    padding: 0 1.25rem;
  }

  .generator {
    padding: 5.5rem 1.25rem 3rem;
  }
}