@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700;800&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
  --background: 220 20% 4%;
  --foreground: 180 10% 90%;
  --card: 220 18% 8%;
  --card-foreground: 180 10% 90%;
  --primary: 175 80% 50%;
  --primary-foreground: 220 20% 4%;
  --secondary: 220 15% 14%;
  --secondary-foreground: 180 10% 80%;
  --muted: 220 15% 12%;
  --muted-foreground: 220 10% 50%;
  --accent: 280 60% 55%;
  --accent-foreground: 280 100% 95%;
  --border: 220 15% 16%;
  --ring: 175 80% 50%;
  --radius: 0.75rem;
  --neon-glow: 175 80% 50%;
  --neon-pink: 330 80% 60%;
}

* {
  border-color: hsl(var(--border));
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: 'Space Grotesk', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'JetBrains Mono', monospace;
}

::selection {
  background: hsl(175 80% 50% / 0.3);
  color: hsl(180 10% 95%);
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: hsl(220 20% 4%);
}

::-webkit-scrollbar-thumb {
  background: hsl(175 80% 50% / 0.3);
  border-radius: 3px;
}

/* Utilities */
.text-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  background-image: linear-gradient(135deg, hsl(175 80% 50%), hsl(280 60% 55%));
}

.neon-border {
  box-shadow: 0 0 10px hsl(175 80% 50% / 0.3), inset 0 0 10px hsl(175 80% 50% / 0.05);
  border: 1px solid hsl(175 80% 50% / 0.3);
}

.neon-text {
  text-shadow: 0 0 20px hsl(175 80% 50% / 0.5), 0 0 40px hsl(175 80% 50% / 0.2);
}

.glass {
  background: hsl(220 18% 8% / 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid hsl(175 80% 50% / 0.1);
}

.hover-glow {
  transition: all 0.3s;
}

.hover-glow:hover {
  box-shadow: 0 0 20px hsl(175 80% 50% / 0.3), 0 10px 40px hsl(175 80% 50% / 0.1);
}

/* Layout */
.page {
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: all 0.3s;
}

.navbar.scrolled {
  background: hsl(220 18% 8% / 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid hsl(175 80% 50% / 0.1);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
}

.navbar-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--primary));
  text-decoration: none;
  text-shadow: 0 0 20px hsl(175 80% 50% / 0.5), 0 0 40px hsl(175 80% 50% / 0.2);
}

.nav-list {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .nav-list {
    display: flex;
  }
}

.nav-list a {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: color 0.2s;
}

.nav-list a:hover {
  color: hsl(var(--primary));
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: hsl(var(--foreground));
  cursor: pointer;
  padding: 0.5rem;
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
}

.nav-mobile {
  display: block;
  background: hsl(220 18% 8% / 0.6);
  backdrop-filter: blur(20px);
  border-top: 1px solid hsl(var(--border));
}

@media (min-width: 768px) {
  .nav-mobile {
    display: none;
  }
}

.nav-mobile.hidden {
  display: none;
}

.nav-mobile ul {
  list-style: none;
  margin: 0;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.nav-mobile a {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: color 0.2s;
}

.nav-mobile a:hover {
  color: hsl(var(--primary));
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img,
.hero-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg img {
  opacity: 0.3;
}

.hero-bg-video {
  opacity: 0.4;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, hsl(220 20% 4% / 0.5), hsl(220 20% 4% / 0.8), hsl(220 20% 4%));
  transition: mask-size 0.15s ease-out;
}

/* Cursor remove a opacidade do overlay (máscara corta um “buraco” no overlay) */
.hero.hero-cursor-active .hero-bg-overlay {
  mask-image: radial-gradient(
    circle 320px at var(--hero-mouse-x, 50%) var(--hero-mouse-y, 50%),
    transparent 0%,
    black 100%
  );
  -webkit-mask-image: radial-gradient(
    circle 320px at var(--hero-mouse-x, 50%) var(--hero-mouse-y, 50%),
    transparent 0%,
    black 100%
  );
  mask-size: 100% 100%;
  -webkit-mask-size: 100% 100%;
  mask-position: 0 0;
  -webkit-mask-position: 0 0;
}

/* Apenas o brilho (glow) que segue o cursor, sem overlay extra */
.hero-cursor-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero.hero-cursor-active .hero-cursor-glow {
  opacity: 1;
}

.hero-cursor-glow::after {
  content: '';
  position: absolute;
  left: var(--hero-mouse-x, 50%);
  top: var(--hero-mouse-y, 50%);
  width: 360px;
  height: 360px;
  margin-left: -180px;
  margin-top: -180px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    hsl(175 80% 50% / 0.12) 0%,
    hsl(175 80% 50% / 0.05) 35%,
    transparent 70%
  );
  filter: blur(20px);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 1.5rem;
}

.hero-intro {
  font-family: 'JetBrains Mono', monospace;
  color: hsl(var(--primary));
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .hero-intro {
    font-size: 1rem;
  }
}

.hero-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 4.5rem;
  }
}

.hero-subtitle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: 2.25rem;
  }
}

.hero-desc {
  max-width: 36rem;
  margin: 0 auto 2.5rem;
  color: hsl(var(--muted-foreground));
  font-size: 1rem;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .hero-desc {
    font-size: 1.125rem;
  }
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
}

.hero-btn:hover {
  transform: scale(1.05);
}

.hero-btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.hero-btn-primary:hover {
  box-shadow: 0 0 20px hsl(175 80% 50% / 0.3), 0 10px 40px hsl(175 80% 50% / 0.1);
}

.hero-btn-outline {
  background: transparent;
  color: hsl(var(--primary));
  box-shadow: 0 0 10px hsl(175 80% 50% / 0.3), inset 0 0 10px hsl(175 80% 50% / 0.05);
  border: 1px solid hsl(175 80% 50% / 0.3);
}

.hero-btn-outline:hover {
  box-shadow: 0 0 20px hsl(175 80% 50% / 0.3), 0 10px 40px hsl(175 80% 50% / 0.1);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: hsl(var(--primary));
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* Section common */
.section {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.section-card {
  background: hsl(var(--card) / 0.3);
}

.section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-align: center;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.25rem;
  }
}

.section-title .hash {
  color: hsl(var(--primary));
}

.section-line {
  width: 5rem;
  height: 4px;
  background: hsl(var(--primary));
  border-radius: 2px;
  margin: 0 auto 3rem;
}

/* About */
.about-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.about-image-wrap {
  display: flex;
  justify-content: center;
}

.about-image-box {
  position: relative;
  width: 16rem;
  height: 16rem;
}

@media (min-width: 768px) {
  .about-image-box {
    width: 20rem;
    height: 20rem;
  }
}

.about-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: 0 0 10px hsl(175 80% 50% / 0.3), inset 0 0 10px hsl(175 80% 50% / 0.05);
  border: 1px solid hsl(175 80% 50% / 0.3);
}

.about-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .about-title {
    font-size: 2.25rem;
  }
}

.about-title .hash {
  color: hsl(var(--primary));
}

.about-line {
  width: 5rem;
  height: 4px;
  background: hsl(var(--primary));
  border-radius: 2px;
  margin-bottom: 1.5rem;
}

.about-text {
  color: hsl(var(--muted-foreground));
  line-height: 1.75;
  margin-bottom: 1rem;
}

.about-text:last-of-type {
  margin-bottom: 1.5rem;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.about-stat {
  padding: 1rem;
  border-radius: 0.75rem;
  background: hsl(var(--card));
  text-align: center;
  box-shadow: 0 0 10px hsl(175 80% 50% / 0.3), inset 0 0 10px hsl(175 80% 50% / 0.05);
  border: 1px solid hsl(175 80% 50% / 0.3);
}

.about-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: hsl(var(--primary));
  margin-bottom: 0.25rem;
}

.about-stat-label {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

/* Skills */
.skills-bars {
  max-width: 42rem;
  margin: 0 auto 4rem;
}

.skill-item {
  margin-bottom: 1.5rem;
}

.skill-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.skill-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  font-weight: 500;
}

.skill-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  color: hsl(var(--primary));
}

.skill-track {
  width: 100%;
  height: 8px;
  border-radius: 9999px;
  background: hsl(var(--secondary));
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(to right, hsl(var(--primary)), hsl(var(--accent)));
  transition: width 1s ease-out;
}

.skills-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.skill-pill {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-family: 'JetBrains Mono', monospace;
  color: hsl(var(--primary));
  box-shadow: 0 0 10px hsl(175 80% 50% / 0.3), inset 0 0 10px hsl(175 80% 50% / 0.05);
  border: 1px solid hsl(175 80% 50% / 0.3);
  transition: transform 0.2s;
}

.skill-pill:hover {
  transform: scale(1.1) translateY(-2px);
}

/* Projects */
.projects-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.project-card {
  border-radius: 1rem;
  background: hsl(var(--card));
  overflow: hidden;
  box-shadow: 0 0 10px hsl(175 80% 50% / 0.3), inset 0 0 10px hsl(175 80% 50% / 0.05);
  border: 1px solid hsl(175 80% 50% / 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 0 20px hsl(175 80% 50% / 0.3), 0 10px 40px hsl(175 80% 50% / 0.1);
}

.project-image {
  position: relative;
  height: 12rem;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, hsl(var(--card)), transparent);
}

.project-image-links {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: hsl(220 20% 4% / 0.6);
  opacity: 0;
  transition: opacity 0.3s;
}

.project-card:hover .project-image-links {
  opacity: 1;
}

.project-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0.75rem;
  border-radius: 9999px;
  background: hsl(var(--card));
  box-shadow: 0 0 10px hsl(175 80% 50% / 0.3);
  border: 1px solid hsl(175 80% 50% / 0.3);
  color: hsl(var(--primary));
  text-decoration: none;
  transition: transform 0.2s;
}

.project-link-btn:hover {
  transform: scale(1.1);
}

.project-info {
  padding: 1.5rem;
}

.project-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.project-desc {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1rem;
  line-height: 1.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tag {
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  background: hsl(var(--secondary));
  color: hsl(var(--primary));
}

/* Contact */
.contact-intro {
  text-align: center;
  color: hsl(var(--muted-foreground));
  margin-bottom: 3rem;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.contact-grid {
  display: grid;
  gap: 3rem;
  max-width: 56rem;
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr);
}

.contact-grid:not(:has(form)) {
  place-items: center;
  justify-items: center;
}

/* Card de contato */
.contact-card {
  position: relative;
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
  border-radius: 1rem;
  overflow: hidden;
}

.contact-card-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, hsl(175 80% 50% / 0.4), hsl(175 80% 50% / 0.1), hsl(280 60% 55% / 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.contact-card-inner {
  position: relative;
  padding: 2rem 1.75rem;
  background: hsl(var(--card) / 0.6);
  border: 1px solid hsl(175 80% 50% / 0.2);
  border-radius: inherit;
  backdrop-filter: blur(12px);
}

.contact-card-title {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 1.25rem;
  color: hsl(var(--foreground));
  margin: 0 0 0.25rem 0;
}

.contact-card-subtitle {
  color: hsl(var(--muted-foreground));
  font-size: 0.9rem;
  margin: 0 0 1.75rem 0;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid hsl(var(--border) / 0.6);
}

.contact-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.25rem;
  justify-items: stretch;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: color 0.2s, background 0.2s, transform 0.2s;
}

.contact-item:hover {
  color: hsl(var(--primary));
  background: hsl(175 80% 50% / 0.08);
  transform: translateX(4px);
}

.contact-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: hsl(175 80% 50% / 0.12);
  color: hsl(var(--primary));
  flex-shrink: 0;
}

.contact-item:hover .contact-item-icon {
  background: hsl(175 80% 50% / 0.2);
  box-shadow: 0 0 12px hsl(175 80% 50% / 0.2);
}

.contact-item-text {
  font-size: 0.95rem;
  word-break: break-word;
}

@media (min-width: 640px) {
  .contact-card-inner {
    padding: 2.25rem 2rem;
  }
  .contact-card-title {
    font-size: 1.35rem;
  }
}

/* Footer */
.footer {
  padding: 2rem 1.5rem;
  border-top: 1px solid hsl(var(--border));
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
  }
}

.footer-copy {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin: 0;
}

.footer-copy .brand {
  color: hsl(var(--primary));
}

.footer-love {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin: 0;
}

.footer-love .heart {
  color: hsl(var(--primary));
}
