﻿:root {
  color-scheme: dark;
  --bg: #050a15;
  --panel: rgba(9, 17, 32, 0.84);
  --text: #eef3ff;
  --muted: #9bb1d0;
  --accent: #4dd4ff;
  --accent-strong: #7c3aed;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(77, 212, 255, 0.16), transparent 24%),
    radial-gradient(circle at bottom right, rgba(124, 58, 237, 0.16), transparent 28%),
    linear-gradient(180deg, #050a15 0%, #090f1f 100%);
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
}

.cursor-glow {
  position: fixed;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(77, 212, 255, 0.28), transparent 72%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 1;
  filter: blur(22px);
  opacity: 0.8;
}

.matrix-bg,
.topbar,
.hero,
.section,
.footer {
  position: relative;
  z-index: 2;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 5vw;
  position: sticky;
  top: 0;
  backdrop-filter: blur(24px);
  background: rgba(5, 10, 21, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-highlight {
  color: var(--accent);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--text);
}

.top-actions {
  display: flex;
  justify-content: flex-end;
}

.btn,
.theme-toggle,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.85rem 1.3rem;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, filter 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn:hover,
.theme-toggle:hover,
.btn-outline:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 28px rgba(77, 212, 255, 0.16);
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.16), transparent);
  transform: translateX(-100%);
  transition: transform 0.55s ease;
}

.btn:hover::after {
  transform: translateX(100%);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 18px 30px rgba(77, 212, 255, 0.22);
}

.btn-secondary {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 2rem;
  align-items: start;
  padding: 3.5rem 5vw 3.5rem;
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.78rem;
  margin-bottom: 1rem;
}

.hero h1,
.section-heading h2 {
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  line-height: 1.05;
  margin-bottom: 1.25rem;
}

.highlight {
  color: var(--accent);
}

.hero-text,
.card p,
.project-card p,
.contact-card p,
.skill-card li {
  color: var(--muted);
  line-height: 1.75;
  font-size: 1rem;
}

.hero-highlights {
  margin: 1.2rem 0;
  padding-left: 1.1rem;
  list-style: none;
}

.hero-highlights li {
  position: relative;
  margin-bottom: 0.9rem;
  padding-left: 1.2rem;
}

.hero-highlights li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.typing-wrap {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1rem;
  font-size: 1rem;
}

.cursor {
  animation: blink 1s step-start infinite;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin: 1.8rem 0;
  flex-wrap: wrap;
}

.contact-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.contact-buttons .btn svg {
  margin-right: 0.5rem;
  display: inline-block;
  vertical-align: middle;
}

.contact-buttons .btn span {
  vertical-align: middle;
}

.contact-buttons .btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
}

.contact-buttons .btn-secondary {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text);
}

.btn-whatsapp {
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.18), rgba(18, 140, 126, 0.24));
  border: 1px solid rgba(37, 211, 102, 0.35);
  color: #dffef4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 24px rgba(37, 211, 102, 0.16);
  backdrop-filter: blur(10px);
}

.btn-linkedin {
  background: linear-gradient(135deg, rgba(10, 102, 194, 0.18), rgba(77, 212, 255, 0.16));
  border: 1px solid rgba(77, 212, 255, 0.35);
  color: #eaf8ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 24px rgba(77, 212, 255, 0.14);
  backdrop-filter: blur(10px);
}

.btn-whatsapp:hover,
.btn-linkedin:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.hero-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-stats div {
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 160px;
}

.hero-stats strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.45rem;
}

.hero-panel {
  display: grid;
  gap: 1.25rem;
  justify-items: center;
}

.profile-card {
  width: min(100%, 520px);
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 1.4rem;
  background: linear-gradient(180deg, rgba(7, 23, 58, 0.9), rgba(10, 32, 85, 0.92));
  border: 1px solid rgba(77, 212, 255, 0.25);
  box-shadow: 0 24px 60px rgba(77, 212, 255, 0.15);
  text-align: center;
}

.profile-card img {
  width: 52%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(77, 212, 255, 0.18), rgba(124, 58, 237, 0.18));
  box-shadow: 0 0 0 5px rgba(77, 212, 255, 0.16), 0 20px 40px rgba(0, 0, 0, 0.22);
}

.profile-card img {
  width: 52%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(77, 212, 255, 0.18), rgba(124, 58, 237, 0.18));
}

.profile-details p {
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.profile-details h2 {
  margin-bottom: 0.3rem;
  font-size: 1.35rem;
}

.section {
  padding: 4rem 5vw;
}

.section-heading {
  margin-bottom: 2rem;
}

.section-heading h2 {
  max-width: 720px;
}

.section-description {
  margin-top: 0.8rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 720px;
}
.about-copy p {
  margin-bottom: 1.25rem;
}

.about-signature {
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--accent);
  background: rgba(77, 212, 255, 0.08);
}

.about-signature span {
  color: var(--text);
}

.about-cards,
.service-grid,
.project-grid {
  display: grid;
  gap: 1.2rem;
}

.about-cards,
.service-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.card,
.project-card,
.skill-card,
.service-card,
.contact-card,
.cv-card,
.stat-card {
  padding: 1.5rem;
  border-radius: 1.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(15px);
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.service-card,
.stat-card {
  min-height: 190px;
}

.project-card a {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.project-text {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.4rem;
  padding-right: 0; /* remover espaço de botão flutuante para não sobrepor texto */
}

.project-description {
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* limita a 2 linhas */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: max-height 0.35s ease, -webkit-line-clamp 0.2s ease;
}

.project-description.expanded {
  display: block;
  -webkit-line-clamp: unset;
  max-height: none;
  overflow: visible;
}

.project-toggle {
  align-self: flex-end;
  background: transparent;
  border: none;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  padding: 0 0.25rem;
  font-size: 0.95rem;
  margin-top: 0.2rem;
}

.project-toggle:hover {
  filter: brightness(1.15);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.chip-list span {
  font-size: 0.85rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(77, 212, 255, 0.12);
  color: var(--text);
}

.contact-card,
.cv-card {
  max-width: 720px;
  padding: 1rem;
  margin-top: 0.6rem;
  border-radius: 1.4rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.06);
}

.contact-card .hero-actions {
  padding: 0.4rem;
}

.cv-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.cv-card p {
  margin: 0;
}

.footer {
  text-align: center;
  padding: 1.4rem 5vw 2rem;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.matrix-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(circle at top left, rgba(77, 212, 255, 0.14), transparent 18%),
    radial-gradient(circle at bottom right, rgba(124, 58, 237, 0.14), transparent 20%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.96));
}

.matrix-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(77, 212, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 212, 255, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.45;
}

.matrix-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(0deg, rgba(77, 212, 255, 0.06) 0%, transparent 20%),
    linear-gradient(90deg, rgba(77, 212, 255, 0.06) 0%, transparent 20%);
  opacity: 0.35;
  animation: drift 20s linear infinite;
}

@keyframes drift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 200% 200%, 200% -200%;
  }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@media (max-width: 980px) {
  .hero,
  .about-grid,
  .service-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 2.5rem 4vw 2rem;
  }

  .hero-panel {
    order: 1;
  }

  .profile-card {
    width: 100%;
    max-width: 520px;
    aspect-ratio: auto;
    text-align: center;
  }

}

@media (max-width: 620px) {
  .hero {
    padding: 2rem 3vw 1.5rem;
    gap: 1.2rem;
  }

  .hero h1,
  .section-heading h2 {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .hero-text,
  .hero-highlights li,
  .project-card p,
  .contact-card p {
    font-size: 0.95rem;
  }

  .card,
  .project-card,
  .skill-card,
  .service-card,
  .contact-card,
  .cv-card,
  .stat-card {
    padding: 1.2rem;
    overflow: hidden;
  }

  .service-card,
  .stat-card {
    min-height: auto;
  }

  .stat-card strong {
    font-size: 1rem;
    margin-bottom: 0.6rem;
    display: block;
  }

  .stat-card p {
    font-size: 0.85rem !important;
    line-height: 1.5;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .contact-card {
    padding: 0.8rem;
  }

  .contact-buttons {
    flex-direction: column;
  }

  .contact-buttons .btn {
    width: 100%;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-cards,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .hero-stats {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-stats div {
    width: 100%;
  }
}
