:root {
  --bg: #050505;
  --card-bg: #0f0f15;
  --purple: #8b5cf6;
  --purple-bright: #a78bfa;
  --text: #ffffff;
  --muted: #888888;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
/* 
body {
  font-family: "Inter", sans-serif;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  
  background-color: #030306;
  background-image: 
    radial-gradient(1.5px 1.5px at 20px 30px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 40px 70px, rgba(167, 139, 250, 0.5), rgba(0,0,0,0)),
    radial-gradient(1px 1px at 90px 110px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 150px 190px, rgba(139, 92, 246, 0.3), rgba(0,0,0,0));
  background-size: 400px 400px, 350px 350px, 280px 280px, 500px 500px;
  background-attachment: fixed;
} */
body {
  font-family: "Inter", sans-serif;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;

  /* Sistema Estelar Avançado (Maior Densidade, Brilho e Contraste) */
  background-color: #030306;
  background-image: 
    /* 1. Estrelas Brancas de Primeiro Plano (Super Nítidas) */
    radial-gradient(1.5px 1.5px at 40px 60px, #ffffff 100%, transparent),
    radial-gradient(2px 2px at 180px 290px, #ffffff 100%, transparent),
    radial-gradient(1.5px 1.5px at 320px 120px, #ffffff 100%, transparent),
    /* 2. Estrelas Roxas e Violetas com Efeito Glow (Pulsação Visual) */
    radial-gradient(
        3.5px 3.5px at 100px 210px,
        #ffffff 10%,
        var(--purple) 40%,
        rgba(139, 92, 246, 0) 100%
      ),
    radial-gradient(
      2.5px 2.5px at 290px 350px,
      var(--purple-bright) 30%,
      rgba(167, 139, 250, 0.2) 80%,
      transparent
    ),
    radial-gradient(
      3px 3px at 220px 150px,
      var(--purple) 20%,
      rgba(139, 92, 246, 0.15) 70%,
      transparent
    ),
    /* 3. Constelações e Micro-Estrelas de Fundo (Profundidade Cósmica) */
    radial-gradient(
        1px 1px at 75px 110px,
        rgba(255, 255, 255, 0.85),
        transparent
      ),
    radial-gradient(
      1.2px 1.2px at 240px 50px,
      rgba(167, 139, 250, 0.7),
      transparent
    ),
    radial-gradient(
      1px 1px at 260px 230px,
      rgba(255, 255, 255, 0.9),
      transparent
    ),
    radial-gradient(
      1.5px 1.5px at 130px 380px,
      rgba(255, 255, 255, 0.6),
      transparent
    );

  /* Tamanhos dessincronizados para quebrar a repetição simétrica no scroll */
  background-size:
    480px 480px,
    420px 420px,
    370px 370px,
    480px 480px,
    420px 420px,
    370px 370px,
    480px 480px,
    420px 420px,
    370px 370px,
    450px 450px;
  background-attachment: fixed;
}
/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: #222;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--purple);
}

/* ==========================================================================
   NOVA LINHA DIVISÓRIA PREMIUM (CORRIGIDA DA IMAGE_ED14E5.PNG)
   ========================================================================== */
.section-divider-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2.5px; /* Ligeiramente mais grossa conforme pedido */
  /* Concentra a opacidade total no centro absoluto (50%) e zera nas extremidades */
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(139, 92, 246, 0.2) 20%,
    var(--purple) 50%,
    rgba(139, 92, 246, 0.2) 80%,
    transparent 100%
  );
  z-index: 10;
}

/* HEADER & NAVBAR */
/* ==========================================================================
   HEADER & NAVBAR - ESTILO PÍLULA VIDRO FUMÊ
   ========================================================================== */
header {
  /* Transforma o menu em uma pílula flutuante centralizada */
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 8vw);
  max-width: 1100px;
  padding: 12px 35px;
  z-index: 1000;

  display: flex;
  justify-content: space-between;
  align-items: center;

  /* Efeito Vidro Fumê Premium */
  background: rgba(10, 10, 14, 0.55); /* Base escura semi-transparente */
  backdrop-filter: blur(16px) saturate(190%); /* Desfoque profundo do fundo */
  -webkit-backdrop-filter: blur(16px) saturate(190%);

  /* Borda sutil reflexiva simulando a lapidação do vidro */
  border: 1px solid #8a5cf686;
  border-radius: 100px; /* Formato pílula perfeito */

  /* Sombra suave para descolar o menu do conteúdo do fundo */
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);

  transition: all 0.4s var(--ease);
}

/* Efeito sutil ao rolar a página (opcional, dá um detalhe extra caso queira) */
header:hover {
  border-color: rgba(139, 92, 246, 0.2);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.7),
    0 0 15px rgba(139, 92, 246, 0.05);
}
.logo {
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: -0.5px;
  color: var(--text);
  text-decoration: none;

  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.logo-icon {
  height: 24px;
  width: auto;
  object-fit: contain;
  display: block;
}

.logo .first-name {
  color: var(--text);
}

.logo .last-name {
  color: var(--purple);
}
/* Links internos organizados como sub-pílulas no hover */
nav {
  display: flex;
  align-items: center;
  gap: 5px;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 50px; /* Sub-pílula */
  transition: all 0.3s var(--ease);
}

nav a:hover {
  color: #ffffff;
  background: rgba(139, 92, 246, 0.15); /* Destaque roxo translúcido interno */
  box-shadow: inset 0 0 8px rgba(139, 92, 246, 0.1);
}
.logo {
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: -0.5px;
}
.logo span {
  color: var(--purple);
}
.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.1;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 25px;
  min-height: 2.2em;

  /* ==========================================
     ADICIONE ESTAS DUAS LINHAS ABAIXO:
     ========================================== */
  color: transparent;
  -webkit-text-stroke: 1.5px var(--purple);
}

.text-outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--purple);
}

nav a {
  margin-left: 30px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s var(--ease);
}

nav a:hover {
  color: var(--purple-bright);
}

/* SECTIONS BASE */
section {
  padding: 140px 10vw;
  position: relative;
}

h2 {
  font-size: 2.8rem;
  margin-bottom: 60px;
  font-weight: 900;
  letter-spacing: -1px;
}
h2 span {
  color: var(--purple);
}

.section-tag {
  color: var(--purple);
  font-family: monospace;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* HERO SECTION */
.hero {
  background-image:
    linear-gradient(rgba(3, 3, 6, 0.75), rgba(5, 5, 5, 0.95)),
    url("ultrawide_onda_roxa.png");
  background-size: cover;
  background-position: center;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10vw;
  gap: 50px;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.1;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 25px;
  min-height: 2.2em;
}

.typewriter-text::after {
  content: "|";
  animation: blink 0.7s infinite;
  color: var(--purple);
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero-subtitle {
  color: var(--muted);
  max-width: 500px;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 35px;
}

/* BOTÕES */
.btn-group {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 14px 30px;
  background: var(--purple);
  color: #000;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 8px;
  transition: all 0.3s var(--ease);
  text-decoration: none;
}

.btn:hover {
  background: var(--purple-bright);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid #222;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: #444;
}

.profile-wrapper {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 25px;
}

.profile-pic {
  display: block;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--purple);
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.3);
}

/* CARD CONTAINER TRIDIMENSIONAL */
.card-container {
  position: relative;
  width: 380px;
  height: 480px;
  perspective: 1000px;
}

.split-card {
  width: 100%;
  height: 100%;
  background: var(--bg);
  border: 1px solid #16161c;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  transition: 0.6s var(--ease);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}

.split-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 100%;
  background: linear-gradient(to right, #000, var(--purple));
  filter: blur(25px);
  z-index: 1;
  pointer-events: none;
  opacity: 0.9;
}

.split-card:hover {
  transform: rotateY(-10deg) rotateX(5deg);
  border-color: var(--purple);
}

.side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 2.3rem;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  position: relative;
  z-index: 2;
}

.side.design {
  background: #000;
  color: var(--purple);
}

.side.coder {
  background: var(--purple);
  color: #000;
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%);
  mask-image: linear-gradient(to right, transparent, black 15%);
}

/* ==========================================================================
   EXPERIÊNCIA SECTION - GRAFO DE DADOS / BACKEND RADIAL
   ========================================================================== */
.experience-section {
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'%3E%3Ccircle cx='200' cy='200' r='140' fill='none' stroke='rgba(139,92,246,0.02)' stroke-width='1' stroke-dasharray='6 6'/%3E%3Ccircle cx='200' cy='200' r='70' fill='none' stroke='rgba(139,92,246,0.025)' stroke-width='1'/%3E%3Ccircle cx='200' cy='200' r='5' fill='rgba(139,92,246,0.1)'/%3E%3Cline x1='200' y1='20' x2='200' y2='380' stroke='rgba(139,92,246,0.015)' stroke-width='1'/%3E%3Cline x1='20' y1='200' x2='380' y2='200' stroke='rgba(139,92,246,0.015)' stroke-width='1'/%3E%3Cpath d='M140 140 L155 140 M140 140 L140 155' stroke='rgba(139,92,246,0.05)' stroke-width='1.5'/%3E%3Cpath d='M260 140 L245 140 M260 140 L260 155' stroke='rgba(139,92,246,0.05)' stroke-width='1.5'/%3E%3Cpath d='M140 260 L155 260 M140 260 L140 245' stroke='rgba(139,92,246,0.05)' stroke-width='1.5'/%3E%3Cpath d='M260 260 L245 260 M260 260 L260 245' stroke='rgba(139,92,246,0.05)' stroke-width='1.5'/%3E%3C/svg%3E");
  background-size: 400px 400px;
  background-position: center;
}

.experience-section h2 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 50px;
}

.experience-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 50px;
  max-width: 1100px;
  margin: 0 auto;
}

.exp-tabs-column {
  position: relative;
  padding-left: 25px;
}

.exp-vertical-accent-line {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.05);
}

.exp-tabs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tab-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #a0a0a5;
  padding: 14px 20px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s var(--ease);
}

.tab-btn:hover {
  border-color: rgba(139, 92, 246, 0.3);
  color: var(--text);
}

.tab-btn.active {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
  box-shadow: 0 5px 15px rgba(139, 92, 246, 0.2);
}

.tab-dot {
  width: 6px;
  height: 6px;
  background-color: #fff;
  border-radius: 50%;
  display: inline-block;
}

.exp-pagination {
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.pag-arrow {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  font-size: 1.2rem;
  cursor: pointer;
}

.pag-arrow:hover {
  color: var(--purple-bright);
}

.pag-text {
  color: #66666a;
  font-size: 0.85rem;
  font-family: monospace;
}

#exp-card-body {
  transition: opacity 0.2s ease-in-out;
}

.exp-display-card {
  background: #07070a;
  border: 1px solid var(--purple);
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 0 35px rgba(139, 92, 246, 0.18);
}

.company-highlight {
  color: var(--purple-bright);
}

.exp-timeline {
  color: #88888e;
  font-size: 0.85rem;
  margin-top: 6px;
}

.card-inner-divider {
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.08) 0%,
    transparent 100%
  );
  margin: 20px 0 25px 0;
}

.exp-bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.exp-bullet-list li {
  position: relative;
  padding-left: 32px;
  color: #c0c0c5;
  font-size: 0.95rem;
}

.exp-bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background: #07070a;
  border: 2px solid var(--purple-bright);
  border-radius: 50%;
  z-index: 2;
}

.exp-bullet-list li::after {
  content: "";
  position: absolute;
  left: -4px;
  top: 11px;
  width: 14px;
  height: 1px;
  background: var(--purple-bright);
  z-index: 1;
}
/* ==========================================================================
   SKILLS SECTION - ROXO NEON COM HOVER COLORIDO NATIVO
   ========================================================================== */
.experience-section {
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'%3E%3Ccircle cx='200' cy='200' r='140' fill='none' stroke='rgba(139,92,246,0.02)' stroke-width='1' stroke-dasharray='6 6'/%3E%3Ccircle cx='200' cy='200' r='70' fill='none' stroke='rgba(139,92,246,0.025)' stroke-width='1'/%3E%3Ccircle cx='200' cy='200' r='5' fill='rgba(139,92,246,0.1)'/%3E%3Cline x1='200' y1='20' x2='200' y2='380' stroke='rgba(139,92,246,0.015)' stroke-width='1'/%3E%3Cline x1='20' y1='200' x2='380' y2='200' stroke='rgba(139,92,246,0.015)' stroke-width='1'/%3E%3Cpath d='M140 140 L155 140 M140 140 L140 155' stroke='rgba(139,92,246,0.05)' stroke-width='1.5'/%3E%3Cpath d='M260 140 L245 140 M260 140 L260 155' stroke='rgba(139,92,246,0.05)' stroke-width='1.5'/%3E%3Cpath d='M140 260 L155 260 M140 260 L140 245' stroke='rgba(139,92,246,0.05)' stroke-width='1.5'/%3E%3Cpath d='M260 260 L245 260 M260 260 L260 245' stroke='rgba(139,92,246,0.05)' stroke-width='1.5'/%3E%3C/svg%3E");
  background-size: 400px 400px;
  background-position: center;
}
/* ==========================================================================
   SKILLS SECTION - ROXO NEON COM HOVER REATIVO
   ========================================================================== */
.skills-section {
  position: relative;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
  gap: 20px;
  margin-top: 50px;
}

.skill-item {
  background: #08080d;
  padding: 20px 10px;
  border-radius: 6px;
  border: 1.5px solid #8b5cf6; /* Sua borda padrão `--purple` */

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;

  aspect-ratio: 1 / 1;
  transition: all 0.3s var(--ease);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* ESTADO PADRÃO: Força qualquer ícone colorido a se transformar 
   exatamente na cor da sua borda (#8b5cf6)
*/
.skill-item img {
  width: 42px;
  height: 42px;
  /* Filtro calibrado especificamente para gerar o tom hexadecimal #8b5cf6 */
  filter: invert(44%) sepia(91%) saturate(3015%) hue-rotate(242deg)
    brightness(97%) contrast(98%);
  transition:
    transform 0.3s var(--ease),
    filter 0.3s var(--ease);
}

.skill-item span {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--purple-bright);
  letter-spacing: -0.2px;
  text-align: center;
  transition: all 0.3s var(--ease);
}

.skill-item.focus-study {
  border-style: dashed;
  border-color: rgba(139, 92, 246, 0.4);
}

/* Interação ao passar o mouse (Hover) */
.skill-item:hover {
  transform: translateY(-4px);
  border-color: var(--purple-bright);
  background: rgba(139, 92, 246, 0.05);
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.3);
}

/* Efeito Premium: Desativa o filtro roxo e traz a cor original 
   da tecnologia de volta instantaneamente ao passar o mouse
*/
.skill-item:hover img {
  filter: none; /* Retorna à cor nativa do logo (Ex: Amarelo/Azul do Python) */
  transform: scale(1.08); /* Leve pulo dinâmico */
}

/* O texto acende em branco puro no hover para contrastar com o ícone colorido */
.skill-item:hover span {
  color: #ffffff;
}
/* ==========================================================================
   PROJECTS SECTION - GRAFOS MATEMÁTICOS E CURVAS DE PREDIÇÃO (LOSS/ML)
   ========================================================================== */
.projects-section {
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300' viewBox='0 0 300 300'%3E%3Cpath d='M 0 150 L 300 150 M 150 0 L 150 300' stroke='rgba(255,255,255,0.01)' stroke-width='1'/%3E%3Cpath d='M 20 20 L 80 80 M 280 20 L 220 80 M 20 280 L 80 220 M 280 280 L 220 220' stroke='rgba(139,92,246,0.02)' stroke-width='1' stroke-dasharray='4 4'/%3E%3Ccircle cx='150' cy='150' r='100' fill='none' stroke='rgba(139,92,246,0.015)' stroke-width='1'/%3E%3Ccircle cx='150' cy='150' r='40' fill='none' stroke='rgba(139,92,246,0.01)' stroke-width='0.5'/%3E%3C/svg%3E");
  background-size: 300px 300px;
  background-position: center;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.project-card {
  background: #08080c;
  padding: 40px;
  border-radius: 20px;
  border: 1px solid #121218;
  display: flex;
  flex-direction: column;
  transition: 0.4s var(--ease);
}

.project-card:hover {
  background: #0d0d14;
  transform: translateY(-6px);
  border-color: rgba(139, 92, 246, 0.4);
}

.project-header {
  margin-bottom: 25px;
  display: flex;
  gap: 8px;
}

.project-card h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
}

.project-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 30px;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(139, 92, 246, 0.08);
  color: var(--purple-bright);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 50px;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.architecture-highlight {
  background: linear-gradient(145deg, #08080c 0%, #0d0c14 100%);
  border-color: rgba(139, 92, 246, 0.2);
}

.project-links {
  display: flex;
  gap: 24px;
  margin-top: auto;
}

.link-arrow {
  color: var(--purple-bright);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.link-arrow span {
  transition: transform 0.3s var(--ease);
}

.link-arrow:hover span {
  transform: translateX(4px);
}

/* ==========================================================================
   ABOUT SECTION - PROPORÇÕES MATEMÁTICAS / FATOR DE ESCALA
   ========================================================================== */
.about-section {
  background-color: #050505;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150' viewBox='0 0 150 150'%3E%3Crect x='10' y='10' width='130' height='130' fill='none' stroke='rgba(255,255,255,0.01)' stroke-width='1'/%3E%3Cpath d='M10 10 L140 140' stroke='rgba(139,92,246,0.02)' stroke-width='0.5'/%3E%3Ccircle cx='75' cy='75' r='55' fill='none' stroke='rgba(139,92,246,0.015)' stroke-width='1'/%3E%3C/svg%3E");
}

.about-container {
  max-width: 760px;
}

.about-text {
  font-size: 1.25rem;
  margin-bottom: 30px;
}

.about-text.text-muted {
  color: var(--muted);
  font-size: 1.1rem;
}

/* ==========================================================================
   CONTACT SECTION - ENGENHARIA DE FLUXO DE COMPUTAÇÃO
   ========================================================================== */ /* ==========================================================================
   CONTACT SECTION - ENGENHARIA DE FLUXO DE COMPUTAÇÃO
   ========================================================================== */
.contact-section {
  background-color: #050505;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cpath d='M 0 100 L 200 100 M 100 0 L 100 200' stroke='rgba(139,92,246,0.015)' stroke-width='1'/%3E%3Ccircle cx='100' cy='100' r='40' fill='none' stroke='rgba(139,92,246,0.02)' stroke-width='1'/%3E%3C/svg%3E");
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  background: #08080c;
  padding: 30px;
  border-radius: 16px;
  border: 1px solid #121218;
  text-decoration: none;
  color: var(--text); /* Força a remoção do azul padrão do navegador */
  transition: 0.4s var(--ease);
}

.contact-item:hover {
  border-color: var(--purple);
  background: #0d0d14;
  transform: translateY(-4px);
}

.contact-item h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text); /* Garante título branco */
  margin-top: 5px;
  margin-bottom: 6px;
  transition: color 0.3s var(--ease);
}

.contact-item p {
  font-size: 0.9rem;
  color: var(--muted); /* Garante subtexto cinza elegante */
  word-break: break-all; /* Evita que o e-mail quebre o layout em telas menores */
  transition: color 0.3s var(--ease);
}

/* Efeito reativo premium ao passar o mouse no card */
.contact-item:hover h3 {
  color: var(--purple-bright);
}

.contact-item:hover p {
  color: rgba(255, 255, 255, 0.9);
}

.icon-box {
  width: 48px;
  height: 48px;
  background: #12121a;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  color: var(--purple);
  border: 1px solid rgba(139, 92, 246, 0.1);
  transition: 0.4s var(--ease);
}

.contact-item:hover .icon-box {
  background: var(--purple);
  color: #000;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}
/* FOOTER */
footer {
  padding: 50px 10vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid #121218;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 25px;
}

.footer-links a:hover {
  color: var(--purple-bright);
}

/* RESPONSIVIDADE */
@media (max-width: 1000px) {
  section {
    padding: 100px 6vw;
  }
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    padding: 140px 6vw 60px;
  }
  .profile-wrapper {
    justify-content: center;
  }
  .hero-subtitle {
    margin: 0 auto 35px;
  }
  .btn-group {
    justify-content: center;
  }
  .card-container {
    width: 290px;
    height: 380px;
  }
  h2 {
    font-size: 2.2rem;
  }
  footer {
    flex-direction: column;
    gap: 20px;
  }
}

@media (max-width: 850px) {
  .experience-grid {
    grid-template-columns: 1fr;
    gap: 35px;
  }
  .exp-vertical-accent-line {
    display: none;
  }
  .exp-tabs-column {
    padding-left: 0;
  }
  .exp-tabs {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 10px;
  }
  .tab-btn {
    white-space: nowrap;
  }
}

/* ==========================================================================
   OTIMIZAÇÃO PREMIUM EXCLUSIVA PARA IPHONE & SMARTPHONES (Até 440px)
   ========================================================================== */
@media (max-width: 440px) {
  /* 1. Suporte a Safe Areas do iOS (Notch, Dynamic Island e Barra de Home) */
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
  }

  /* Redução cirúrgica do padding lateral para ganhar área útil na tela */
  section {
    padding: 80px 5vw;
  }

  /* 2. Ajuste do Menu Pílula Flutuante */
  header {
    width: calc(100% - 24px); /* Margem fina nas laterais */
    padding: 8px 16px;
    top: 12px;
  }

  .logo {
    font-size: 0.8rem; /* Diminui o texto para não colidir com os links */
    gap: 6px;
  }

  .logo-icon {
    height: 18px; /* Lobo sutilmente menor e elegante */
  }

  nav {
    gap: 0px; /* Aproxima os links internos */
  }

  nav a {
    font-size: 0.75rem;
    padding: 6px 10px;
    margin-left: 0; /* Reseta margens antigas se houver */
  }

  /* 3. Ajuste do Hero e Tipografia */
  .hero {
    padding: 120px 5vw 40px 5vw;
    gap: 30px;
  }

  .hero-content h1 {
    font-size: 2.2rem !important; /* Evita quebras de linha gigantescas */
    min-height: auto;
    margin-bottom: 15px;
  }

  h2 {
    font-size: 1.9rem;
    line-height: 1.2;
    margin-bottom: 35px;
  }

  /* 4. Correção Estrutural do Card Tridimensional */
  /* Como o card original tem 380px fixos, ele quebraria no iPhone (que tem de 320px a 393px) */
  .card-container {
    width: 100%;
    max-width: 290px; /* Cabe perfeitamente em qualquer modelo */
    height: 390px; /* Altura proporcional à nova largura */
    margin: 0 auto; /* Centraliza perfeitamente */
  }

  .side {
    font-size: 1.8rem;
  }

  /* 5. Grids Adaptados para Touch */
  .skills-grid {
    /* Em vez de quebrar itens pequenos, exibe em 2 colunas simétricas */
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .skill-item {
    padding: 15px 8px;
    aspect-ratio: 1 / 1;
  }

  .skill-item img {
    width: 32px;
    height: 32px;
  }

  .grid,
  .contact-grid {
    grid-template-columns: 1fr; /* Força uma coluna única e limpa */
    gap: 16px;
  }

  .project-card,
  .contact-item {
    padding: 25px;
  }

  /* Ajuste no rodapé */
  footer {
    padding: 40px 5vw;
    text-align: center;
    gap: 10px;
  }
}

/* ==========================================================================
   LOGO & BRANDING UNIFICADO (CORRIGIDO)
   ========================================================================== */
.logo {
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: -0.5px;
  color: var(--text);

  /* Alinha o lobo perfeitamente no centro vertical com o seu nome */
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap; /* Impede o nome de quebrar em duas linhas */
}

.logo-icon {
  height: 24px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Efeito Premium: Deixa apenas o "De Castro" ou parte do nome estilizado se usar a tag <span> */

@media (max-width: 440px) {
  /* ... mantenha as regras do body e sections anteriores ... */

  /* Menu Pílula Otimizado para Nomes Longos */
  header {
    width: calc(100% - 16px); /* Margem fina para aproveitar o máximo de tela */
    padding: 8px 12px;
    top: 10px;
    gap: 8px; /* Espaço controlado entre a logo e os links */
    justify-content: space-between;
  }

  .logo {
    font-size: 0.82rem; /* Tamanho exato para "Matheus de Castro" caber sem sumir */
    gap: 6px;
  }

  .logo-icon {
    height: 16px; /* Ajuste proporcional para telas Retina */
  }

  nav {
    display: flex;
    gap: 2px; /* Aproxima levemente os botões do menu */
  }

  nav a {
    font-size: 0.72rem;
    padding: 5px 8px;
    margin-left: 0;
  }
}

/* ==========================================================================
   RESPONSIVIDADE EXCLUSIVA PARA A SEÇÃO DE EXPERIÊNCIA
   ========================================================================== */
@media (max-width: 850px) {
  .experience-grid {
    grid-template-columns: 1fr; /* Força uma única coluna vertical */
    gap: 20px;
    width: 100%;
    overflow: hidden; /* Evita vazamentos laterais no grid principal */
  }

  .exp-vertical-accent-line {
    display: none;
  }

  .exp-tabs-column {
    padding-left: 0;
    width: 100%;
    overflow: hidden;
  }

  /* Contêiner de abas horizontal ultra responsivo */
  .exp-tabs {
    flex-direction: row !important;
    display: flex !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch; /* Rolagem suave de toque no iOS */
    padding-bottom: 12px; /* Espaço para não cortar a sombra/borda no scroll */
    gap: 10px;
    width: 100%;
    scroll-snap-type: x mandatory;
  }

  /* Oculta completamente a barra de rolagem horizontal nativa em todos os navegadores */
  .exp-tabs::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  .exp-tabs {
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE/Edge */
  }

  .tab-btn {
    flex: 0 0 auto; /* Impede os botões de esmagarem */
    scroll-snap-align: start;
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  .exp-pagination {
    margin-top: 5px;
    justify-content: center;
  }
}

/* Otimização cirúrgica para iPhones e Smartphones menores */
@media (max-width: 440px) {
  /* --- Modificação do Header Mobile --- */
  header {
    width: calc(100% - 16px);
    padding: 8px 12px;
    top: 10px;
    gap: 4px;
  }

  .logo {
    font-size: 0.9rem;
    gap: 6px;
  }

  .logo-icon {
    height: 18px;
  }

  /* O pulo do gato: Some o "Matheus" e mantém o "De Castro" */
  .logo .first-name {
    display: none !important;
  }

  nav a {
    font-size: 0.72rem;
    padding: 5px 8px;
  }

  /* --- Correção da Área de Experiência no Mobile --- */
  .experience-section {
    padding: 80px 4vw;
  }

  .experience-section h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: left;
  }

  /* Garante que o Card interno se adapte perfeitamente e não quebre paddings */
  .exp-display-card {
    padding: 24px 16px !important;
    border-radius: 12px;
    width: 100%;
    box-sizing: border-box;
  }

  .exp-display-card h3 {
    font-size: 1.1rem;
    line-height: 1.4;
  }

  .exp-timeline {
    font-size: 0.78rem;
  }

  .card-inner-divider {
    margin: 15px 0 !important;
  }

  .exp-bullet-list {
    gap: 12px !important;
  }

  .exp-bullet-list li {
    font-size: 0.85rem;
    line-height: 1.5;
    padding-left: 20px; /* Reduz recuo para ganhar espaço de texto horizontal */
  }

  .exp-bullet-list li::before {
    top: 6px;
    width: 4px;
    height: 4px;
  }

  .exp-bullet-list li::after {
    top: 8px;
    left: -4px;
    width: 8px;
  }
}
@media (max-width: 440px) {
  header {
    width: calc(
      100% - 16px
    ); /* Aproveita o máximo de espaço lateral no celular */
    padding: 8px 12px;
    top: 10px;
    gap: 4px;
  }

  .logo {
    font-size: 0.9rem;
    gap: 6px;
  }

  .logo-icon {
    height: 18px; /* Ajusta o tamanho do lobo para ficar proporcional */
  }

  /* O SEGREDO: Aplica o sumiço imediato do primeiro nome */
  .logo .first-name {
    display: none !important;
  }

  /* Mantém o "De Castro" destacado com a cor do seu tema */
  .logo .last-name {
    color: var(--purple);
  }

  nav a {
    font-size: 0.72rem;
    padding: 5px 8px;
  }
}
