/* ========================================
   PBR-INSPIRED DESIGN SYSTEM
   Traduzindo conceitos Three.js → CSS
   - MeshPhysicalMaterial → glassmorphism com clearcoat
   - Normal Maps → parallax depth layers
   - Roughness/Metalness → surface textures
   - InstancedMesh → procedural particles
   - CanvasTexture → procedural backgrounds
   - Shadow Mapping → multi-layer shadows
   - Anisotropy → directional gradients
   ======================================== */

:root {
  /* === PBR Color Pipeline === */
  --bg-primary: #08080c;
  --bg-secondary: #0e0e14;
  --bg-tertiary: #14141c;
  --surface-base: rgba(255, 255, 255, 0.018);
  --surface-hover: rgba(255, 255, 255, 0.04);

  /* === Material Properties === */
  --roughness-low: 0.095;    /* clearcoat surface */
  --roughness-mid: 0.45;     /* brushed metal */
  --roughness-high: 0.86;    /* matte surface */
  --metalness: 0.44;         /* reflective surfaces */
  --clearcoat: 1;            /* glass layer */
  --ior: 1.5;                /* index of refraction */

  /* === Lighting === */
  --light-primary: #f0f0f5;
  --light-secondary: #a0a0b0;
  --light-muted: #5a5a6a;
  --light-accent: #8b5cf6;
  --light-accent-2: #6366f1;
  --light-accent-3: #a78bfa;
  --light-env: rgba(139, 92, 246, 0.08);

  /* === Accent === */
  --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
  --accent-glow: 0 0 60px rgba(139, 92, 246, 0.15), 0 0 120px rgba(99, 102, 241, 0.08);

  /* === Shadow Mapping (multi-layer like shadowMap) === */
  --shadow-near: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-mid: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-far: 0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.12);

  /* === Surface Radius === */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  /* === Transitions === */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 0.2s var(--ease-out);
  --transition: 0.4s var(--ease-out);
  --transition-slow: 0.8s var(--ease-out);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--light-accent) var(--bg-secondary);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--light-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--light-accent), var(--light-accent-2));
  border-radius: 3px;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================
   PBR SURFACE MATERIAL
   Simula MeshStandardMaterial com:
   - baseColor (background)
   - roughness (blur/opacity)
   - metalness (reflectivity via gradients)
   - normalMap (layered shadows for depth)
   - clearcoat (top glass layer)
   ======================================== */
.pbr-surface {
  position: relative;
  background: var(--surface-base);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  transition: var(--transition);
  overflow: hidden;
}

/* Clearcoat layer — simula MeshPhysicalMaterial clearcoat */
.pbr-surface::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.06) 0%,
    transparent 40%,
    transparent 60%,
    rgba(255, 255, 255, 0.02) 100%
  );
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity var(--transition);
}

/* Normal map simulation — depth via inner shadow layers */
.pbr-surface::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    inset 1px 0 0 rgba(255, 255, 255, 0.03),
    inset -1px 0 0 rgba(0, 0, 0, 0.1);
  pointer-events: none;
  z-index: 1;
}

.pbr-surface:hover {
  background: var(--surface-hover);
  border-color: rgba(139, 92, 246, 0.2);
  transform: translateY(-6px);
  box-shadow:
    var(--shadow-far),
    var(--shadow-glow);
}

.pbr-surface:hover::before {
  opacity: 1;
}

/* ========================================
   ENVIRONMENT MAP REFLECTION
   Simula envMapIntensity com gradientes dinâmicos
   ======================================== */
.env-reflect {
  position: relative;
}

.env-reflect::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(
    var(--env-angle, 135deg),
    rgba(139, 92, 246, 0.15),
    transparent 30%,
    transparent 70%,
    rgba(59, 130, 246, 0.1)
  );
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition);
}

.env-reflect:hover::before {
  opacity: 1;
}

/* ========================================
   PROCEDURAL NOISE TEXTURE
   Canvas-generated noise como background
   ======================================== */
.noise-texture {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.025;
  mix-blend-mode: overlay;
}

/* ========================================
   NAVBAR — Physical Glass Material
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
}

.navbar.scrolled {
  /* MeshPhysicalMaterial: glass with clearcoat */
  background: rgba(8, 8, 12, 0.72);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 10px 0;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.03),
    0 8px 32px rgba(0, 0, 0, 0.3);
}

.nav-container {
  width: calc(100% - 48px);
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.nav-logo {
  justify-self: start;
}

.nav-contact {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: var(--light-primary);
  font-size: 0.875rem;
}

.nav-contact:hover {
  border-color: var(--light-accent-3);
}

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

.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--light-primary);
  letter-spacing: -0.5px;
  position: relative;
}

.logo-bracket {
  color: var(--light-accent);
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-link {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--light-secondary);
  transition: var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--light-primary);
  background: rgba(139, 92, 246, 0.08);
}

.nav-link.active {
  color: var(--light-primary);
  background: rgba(139, 92, 246, 0.12);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 1px;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--light-primary);
  border-radius: 2px;
  transition: var(--transition);
  transform-origin: center;
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 24px 80px;
}

/* Foto de fundo e camadas de contraste do hero */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(8, 8, 12, 0.48), transparent 24%, transparent 65%, var(--bg-primary)),
    linear-gradient(90deg, rgba(8, 8, 12, 0.86) 0%, rgba(8, 8, 12, 0.58) 55%, rgba(8, 8, 12, 0.3) 100%),
    url("./assets/portfolio/hero-fundo.webp") 63% center / cover no-repeat,
    var(--bg-primary);
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-content {
  animation: heroFadeIn 1s var(--ease-out) both;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(40px) translateX(-20px); }
  to { opacity: 1; transform: translateY(0) translateX(0); }
}

.hero-availability {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  color: #c6a9fa;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.72rem, 1.4vw, 0.83rem);
  font-weight: 500;
  line-height: 1.5;
  text-align: left;
}

.hero-availability::before {
  content: '';
  flex: 0 0 1.65rem;
  height: 1px;
  background: currentColor;
}

.hero-title {
  margin-bottom: 18px;
}

.title-line {
  display: block;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--light-secondary);
  margin-bottom: 6px;
}

.title-name {
  display: block;
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.3));
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--light-secondary);
  margin-bottom: 14px;
  font-weight: 400;
}

.highlight {
  color: var(--light-accent-3);
  font-weight: 600;
}

.hero-description {
  font-size: 0.95rem;
  color: var(--light-secondary);
  max-width: 480px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 14px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  position: relative;
  overflow: hidden;
}

/* Primary button — emissive mais alto, como material com emissive */
.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow:
    0 4px 20px rgba(139, 92, 246, 0.3),
    0 0 0 1px rgba(139, 92, 246, 0.2) inset;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow:
    0 8px 32px rgba(139, 92, 246, 0.4),
    0 0 0 1px rgba(139, 92, 246, 0.3) inset;
}

.btn-primary:hover::before { opacity: 1; }

.btn-outline {
  background: transparent;
  color: var(--light-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
}

.btn-outline:hover {
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.06);
  transform: translateY(-3px);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.1);
}

.hero-social {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--light-secondary);
  font-size: 1.1rem;
  transition: var(--transition);
  backdrop-filter: blur(8px);
}

.social-link:hover {
  color: var(--light-accent);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.2);
  background: rgba(139, 92, 246, 0.08);
}

/* ========================================
   HERO IMAGE — Physical Material com Clearcoat
   Simula MeshPhysicalMaterial:
   - transmission (transparência)
   - clearcoat (camada brilhante)
   - envMapIntensity (reflexo ambiental)
   - ior (índice de refração)
   ======================================== */
.hero-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: heroImageIn 1s var(--ease-out) 0.3s both;
}

@keyframes heroImageIn {
  from { opacity: 0; transform: translateX(40px) scale(0.9); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.hero-image-container {
  position: relative;
  width: 380px;
  height: 380px;
  perspective: 800px;
}

/* Environment map reflection ring */
.image-env-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: conic-gradient(
    from var(--env-rotation, 0deg),
    rgba(139, 92, 246, 0.4),
    rgba(59, 130, 246, 0.2),
    rgba(139, 92, 246, 0.05),
    rgba(99, 102, 241, 0.3),
    rgba(139, 92, 246, 0.4)
  );
  animation: envRotate 12s linear infinite;
  filter: blur(1px);
}

@keyframes envRotate {
  to { --env-rotation: 360deg; }
}

@property --env-rotation {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* Glow — emissive */
.image-glow {
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.18) 0%, transparent 65%);
  border-radius: 50%;
  animation: glowBreath 5s ease-in-out infinite;
}

@keyframes glowBreath {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

/* Clearcoat layer */
.image-clearcoat {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0%,
    transparent 40%,
    transparent 60%,
    rgba(255, 255, 255, 0.04) 100%
  );
  z-index: 5;
  pointer-events: none;
  transition: var(--transition);
}

.hero-image {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  z-index: 3;
  box-shadow:
    0 0 0 3px rgba(139, 92, 246, 0.2),
    var(--shadow-far);
}

/* Image transition layers — como a transição de clip-path */
.image-transition-layer {
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  border-radius: 50%;
  z-index: 4;
  animation: revealImage 1.8s var(--ease-out) 0.6s forwards;
}

.image-transition-layer.layer-2 {
  background: var(--bg-primary);
  animation: revealImage 1.4s var(--ease-out) 1s forwards;
  z-index: 3;
}

@keyframes revealImage {
  0% { clip-path: circle(100% at 50% 50%); }
  100% { clip-path: circle(0% at 50% 50%); }
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transition: transform 0.6s var(--ease-out);
}

.hero-image:hover .profile-img {
  transform: scale(1.08);
}

/* Floating tech icons — como InstancedMesh com transforms individuais */
.floating-icons {
  position: absolute;
  inset: -40px;
  z-index: 6;
}

.float-icon {
  position: absolute;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 14, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-mid);
  backdrop-filter: blur(12px);
  animation: iconFloat 7s ease-in-out infinite;
  transition: var(--transition);
}

.float-icon:hover {
  transform: scale(1.15) !important;
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: var(--shadow-glow);
}

.float-icon.icon-1 { top: 5%; right: -8%; animation-delay: 0s; }
.float-icon.icon-2 { bottom: 12%; right: -3%; animation-delay: 1.8s; }
.float-icon.icon-3 { top: 18%; left: -8%; animation-delay: 3.5s; }
.float-icon.icon-4 { bottom: 8%; left: -3%; animation-delay: 5.2s; }
.float-icon.icon-5 { top: 0; left: calc(50% - 25px); animation-delay: 2.7s; }
.float-icon.icon-6 { bottom: 0; left: calc(50% - 25px); animation-delay: 6.1s; }

@keyframes iconFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-12px) rotate(2deg); }
  75% { transform: translateY(8px) rotate(-2deg); }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 48px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 1px;
  overflow: hidden;
}

.scroll-line {
  width: 100%;
  height: 40%;
  background: var(--light-accent);
  border-radius: 1px;
  animation: scrollPulse 2.5s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.5);
}

@keyframes scrollPulse {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(300%); }
}

/* ========================================
   SECTIONS
   ======================================== */
.section {
  padding: 110px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--light-primary);
  letter-spacing: -0.5px;
}

/* ========================================
   ABOUT — Apresentação editorial
   ======================================== */
.about {
  background: #161419;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: clamp(2.5rem, 7vw, 6.25rem);
  align-items: center;
}

.about-photo {
  margin: 0;
}

.about-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #201c21;
}

.about-intro h2 {
  color: var(--light-primary);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 650;
  line-height: 1.03;
  letter-spacing: -0.06em;
}

.about-intro h2 em {
  color: #c6a9fa;
  font-family: Georgia, serif;
  font-weight: 400;
}

.about-intro > p,
.about-expertise dd {
  color: #c1bac7;
  line-height: 1.65;
}

.about-intro > p {
  max-width: 45ch;
  margin: 1.5rem 0 1.7rem;
}

.about-expertise {
  display: grid;
  grid-template-columns: minmax(8rem, 0.58fr) minmax(0, 1fr);
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.about-expertise > * {
  margin: 0;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.875rem;
}

.about-expertise dt {
  color: var(--light-primary);
  font-weight: 650;
  padding-right: 1rem;
}

.about-projects {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid currentColor;
  color: var(--light-primary);
  font-size: 0.9rem;
}

.about-projects:hover {
  color: #c6a9fa;
}

/* ========================================
   SKILLS — InstancedMesh-like grid
   ======================================== */
.skills {
  background: var(--bg-secondary);
  position: relative;
}

.skills::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.04) 0%, transparent 60%);
  pointer-events: none;
}

.skills-category {
  margin-bottom: 48px;
  position: relative;
}

.category-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--light-primary);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-title img {
  flex: none;
  object-fit: contain;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Skill cards — como InstancedMesh com transforms individuais */
.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 22px;
  background: var(--surface-base);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: default;
  min-width: 100px;
  position: relative;
  overflow: hidden;
}

/* Normal map depth simulation */
.skill-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.04) 0%,
    transparent 50%,
    rgba(0, 0, 0, 0.08) 100%
  );
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--transition);
}

.skill-card:hover {
  background: var(--surface-hover);
  border-color: rgba(139, 92, 246, 0.25);
  transform: translateY(-6px) scale(1.03);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(139, 92, 246, 0.1);
}

.skill-card:hover::before { opacity: 1; }

.skill-card img {
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.skill-card span {
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--light-secondary);
  position: relative;
  z-index: 1;
}

.hardware-card {
  padding: 16px 22px;
}

.hardware-brand {
  display: grid;
  place-items: center;
  width: 112px;
  height: 48px;
  padding: 0 10px;
  border-radius: 6px;
  background: #fff;
}

.hardware-brand img {
  width: 100%;
  height: 32px;
  object-fit: contain;
  filter: none;
}

.hardware-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* ========================================
   PROJECTS
   ======================================== */
.project-showcase {
  display: grid;
  grid-template-columns: minmax(0, 0.58fr) minmax(0, 1fr);
  gap: clamp(1.6rem, 4vw, 3rem);
  padding: clamp(1.25rem, 4vw, 3rem);
  align-items: center;
  background: radial-gradient(ellipse at 88% 18%, #142848 0%, transparent 64%), #0d121d;
  border: 1px solid #26364d;
  border-radius: var(--radius-lg);
}

.project-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.05rem;
}

.project-brand img {
  display: block;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.project-brand h3 {
  font-size: 1.05rem;
}

.project-status {
  margin-bottom: 0.65rem;
  color: var(--light-accent-3);
  font-size: 0.8rem;
  font-weight: 650;
}

.project-title {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 750;
  line-height: 1.04;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.project-description,
.project-dev > p:not(.project-status):not(.project-stack) {
  color: var(--light-secondary);
  line-height: 1.7;
}

.project-contribution {
  margin: 1.25rem 0 1rem;
  padding-left: 0.8rem;
  border-left: 2px solid #4387f6;
  color: var(--light-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.project-contribution strong {
  display: block;
  color: var(--light-primary);
}

.project-stack,
.project-note {
  color: var(--light-secondary);
  font-size: 0.8rem;
}

.project-demo {
  margin-top: 1.25rem;
  background: #2864d7;
  color: #fff;
}

.project-demo:hover {
  background: #1e53bb;
}

.project-note {
  margin-top: 0.65rem;
}

.project-cover {
  margin: 0;
  border: 1px solid #354a68;
  border-radius: var(--radius-md);
  background: #131d2f;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.project-cover a,
.project-screens a {
  display: block;
}

.project-cover img,
.project-screens img {
  display: block;
  width: 100%;
  height: auto;
}

.project-cover img {
  border-radius: 0 0 calc(var(--radius-md) - 1px) calc(var(--radius-md) - 1px);
}

.project-cover figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.65rem 0.85rem;
  color: #c5d5ed;
  font-size: 0.75rem;
}

.project-screens img {
  border-radius: var(--radius-sm);
  border: 1px solid #354a68;
}

.project-screens a > span {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.6rem;
  color: var(--light-secondary);
  font-size: 0.85rem;
}

.project-screens {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  margin: 0;
  padding: 1.35rem 0 0;
  border-top: 1px solid #26364d;
  list-style: none;
}

.project-screens a:hover img {
  border-color: #75aaff;
}

.project-cover:focus-within,
.project-cover:hover {
  border-color: #75aaff;
}

.project-dev {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.project-dev h3 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 0.5rem;
}

.project-dev p {
  max-width: 65ch;
}

.project-dev .project-stack {
  margin-top: 0.6rem;
}

/* ========================================
   CONTACT
   ======================================== */
.contact {
  background: var(--bg-secondary);
  position: relative;
}

.contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(139, 92, 246, 0.04) 0%, transparent 60%);
  pointer-events: none;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.contact-card {
  padding: 40px 32px;
  text-align: center;
}

.contact-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.4rem;
  color: white;
  transition: var(--transition);
}

.contact-icon.linkedin { background: linear-gradient(135deg, #0077B5, #00a0dc); box-shadow: 0 4px 20px rgba(0, 119, 181, 0.3); }
.contact-icon.instagram { background: linear-gradient(135deg, #e4405f, #f56040, #fcaf45); box-shadow: 0 4px 20px rgba(228, 64, 95, 0.3); }
.contact-icon.github { background: linear-gradient(135deg, #333, #6e5494); box-shadow: 0 4px 20px rgba(110, 84, 148, 0.3); }

.contact-card:hover .contact-icon {
  transform: scale(1.1) rotate(-5deg);
}

.contact-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.contact-card p {
  font-size: 0.88rem;
  color: var(--light-muted);
  margin-bottom: 20px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--light-accent-3);
  transition: var(--transition);
}

.contact-link:hover {
  color: var(--light-accent);
  gap: 14px;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-content { text-align: center; }

.footer-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-text {
  font-size: 0.88rem;
  color: var(--light-secondary);
  margin-bottom: 8px;
}

.footer-year {
  font-size: 0.78rem;
  color: var(--light-muted);
}

/* ========================================
   CURSOR GLOW — Environment map follow
   ======================================== */
.cursor-glow {
  position: fixed;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.05) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  transition: transform 0.15s ease-out;
  will-change: transform;
}

/* ========================================
   SCROLL REVEAL — como animação de entrada
   ======================================== */
.reveal-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

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

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 968px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  .hero-content { order: 2; }
  .hero-image-wrapper { order: 1; }
  .hero-description { margin: 0 auto 36px; }
  .hero-cta { justify-content: center; }
  .hero-social { justify-content: center; }
  .hero-image-container { width: 280px; height: 280px; }
  .project-showcase { grid-template-columns: 1fr; padding: 32px 24px; }
}

@media (max-width: 768px) {
  .nav-container {
    display: flex;
    justify-content: space-between;
  }
  .nav-contact { display: none; }
  .nav-mobile-contact { display: block; }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: rgba(8, 8, 12, 0.96);
    backdrop-filter: blur(24px);
    flex-direction: column;
    padding: 100px 40px;
    transition: right 0.5s var(--ease-out);
    visibility: hidden;
    border-left: 1px solid rgba(255, 255, 255, 0.04);
  }
  .nav-links.active { right: 0; visibility: visible; }
  .nav-toggle { display: flex; }
  .hero { padding: 100px 24px 60px; }
  .hero-bg {
    background:
      linear-gradient(180deg, rgba(8, 8, 12, 0.38), rgba(8, 8, 12, 0.84) 48%, var(--bg-primary)),
      url("./assets/portfolio/hero-fundo.webp") 68% center / cover no-repeat,
      var(--bg-primary);
  }
  .section { padding: 70px 0; }
  .about-layout { grid-template-columns: 1fr; }
  .about-photo img { aspect-ratio: 4 / 3; object-position: center 68%; }
  .skills-grid { justify-content: center; }
  .contact-grid { grid-template-columns: 1fr; }
  .floating-icons { display: none; }
  .cursor-glow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .navbar,
  .nav-links,
  .nav-toggle span {
    transition: none;
  }
}

@media (max-width: 480px) {
  .project-screens { grid-template-columns: 1fr; }
  .hero-image-container { width: 220px; height: 220px; }
  .hero-cta { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
}
