/* VS Code Dark+ Design System Tokens */
:root {
  --vscode-bg: #1e1e1e;
  --vscode-editor-bg: #1e1e1e;
  --vscode-panel-bg: #252526;
  --vscode-badge-bg: #2d2d2d;
  --vscode-border: #3c3c3c;
  --vscode-accent: #007acc;
  --vscode-cyan: #4ec9b0;
  --vscode-hover-cyan: #00bcd4;

  /* Syntax Highlighting Colors */
  --syn-keyword: #569cd6;      /* Blue: const, def, return, import */
  --syn-control: #c586c0;      /* Magenta: if, for, while, export */
  --syn-function: #dcdcaa;     /* Light Yellow: function names */
  --syn-variable: #9cdcfe;     /* Light Sky Blue: vars, params */
  --syn-string: #ce9178;       /* Light Orange / Salmon: strings */
  --syn-comment: #6a9955;      /* Olive Green: comments */
  --syn-tag: #569cd6;          /* Blue: HTML tags */
  --syn-attr: #9cdcfe;         /* Light Blue: HTML/CSS attributes */
  --syn-num: #b5cea8;          /* Light Green: numbers */
  --syn-prop: #9cdcfe;         /* Sky blue: properties */
  --syn-type: #4ec9b0;         /* Teal/Cyan: types, classes */
  --syn-punct: #d4d4d4;        /* Off-white brackets */
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--vscode-bg);
  font-family: 'Fira Code', 'JetBrains Mono', Consolas, 'Courier New', monospace;
  color: #d4d4d4;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Grade sutil de fundo do editor */
body::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 1;
}

/* ==========================================================================
   MENU HORIZONTAL & RESPONSIVO COM HAMBÚRGUER
   ========================================================================== */
.top-nav-bar {
  position: fixed;
  top: clamp(40px, 13vh, 120px);
  left: 0;
  width: 100%;
  z-index: 50;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 20px;
}

/* Botão Hambúrguer (Oculto em Desktop) */
.menu-toggle {
  display: none;
  background: rgba(37, 37, 38, 0.9);
  border: 1px solid var(--vscode-border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
  z-index: 60;
}

.menu-toggle:hover {
  border-color: var(--vscode-hover-cyan);
  background: rgba(0, 122, 204, 0.2);
}

.hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animação do botão hambúrguer para "X" quando ativo */
.menu-toggle.active .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background-color: var(--vscode-hover-cyan);
}

.menu-toggle.active .hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-toggle.active .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background-color: var(--vscode-hover-cyan);
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  padding: 6px 18px;
  background: rgba(30, 30, 30, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transition: all 0.3s ease;
}

.nav-item {
  color: #ffffff; /* Texto em branco */
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.22s ease;
  user-select: none;
}

.nav-tag {
  color: var(--syn-keyword); /* Azul VS Code #569cd6 */
  font-weight: 500;
  transition: color 0.22s ease;
}

.nav-item:hover {
  color: var(--vscode-hover-cyan);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.nav-item:hover .nav-tag {
  color: var(--vscode-hover-cyan);
  text-shadow: 0 0 8px rgba(0, 188, 212, 0.6);
}

.nav-separator {
  color: #ffffff; /* Bolinhas separadoras em branco */
  font-size: 0.8rem;
  line-height: 1;
  opacity: 0.85;
}

/* Background Code Container */
.bg-code-container {
  position: absolute;
  inset: -5%;
  width: 110%;
  height: 110%;
  pointer-events: none;
  z-index: 2;
  user-select: none;
  perspective: 1000px;
}

.code-card {
  position: absolute;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre;
  border-radius: 8px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(30, 30, 30, 0.65);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  will-change: transform;
  animation: floatMotion 28s ease-in-out infinite alternate;
}

/* Camadas de profundidade e visibilidade */
.layer-deep {
  opacity: 0.52;
  filter: blur(2px);
  transform: scale(0.95);
  animation-duration: 36s;
}

.layer-mid {
  opacity: 0.68;
  filter: blur(1px);
  transform: scale(0.98);
  animation-duration: 24s;
}

.layer-foreground {
  opacity: 0.85;
  filter: blur(0px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  animation-duration: 20s;
}

/* Posições dos snippets nos 4 quadrantes */
.pos-js-1 {
  top: 6%;
  left: 3%;
  animation-delay: 0s;
}

.pos-py-1 {
  top: 8%;
  right: 4%;
  animation-delay: -5s;
}

.pos-css-1 {
  bottom: 8%;
  left: 5%;
  animation-delay: -10s;
}

.pos-html-1 {
  bottom: 6%;
  right: 5%;
  animation-delay: -15s;
}

.pos-js-2 {
  top: 44%;
  left: -2%;
  animation-delay: -7s;
}

.pos-py-2 {
  top: 48%;
  right: -1%;
  animation-delay: -12s;
}

/* Cores de sintaxe */
.kw { color: var(--syn-keyword); font-weight: 500; }
.ctrl { color: var(--syn-control); font-weight: 500; }
.fn { color: var(--syn-function); }
.var { color: var(--syn-variable); }
.str { color: var(--syn-string); }
.cmt { color: var(--syn-comment); font-style: italic; }
.tag { color: var(--syn-tag); }
.attr { color: var(--syn-attr); }
.num { color: var(--syn-num); }
.prop { color: var(--syn-prop); }
.type { color: var(--syn-type); }
.punct { color: var(--syn-punct); }

/* Máscara radial suave para foco do centro */
.vignette-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(30, 30, 30, 0.8) 0%, rgba(30, 30, 30, 0.48) 50%, rgba(30, 30, 30, 0.15) 100%);
  z-index: 5;
  pointer-events: none;
  backdrop-filter: blur(1px);
}

/* Palco Centralizado */
.center-stage {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

/* Aba do editor / Pill no topo do H1 */
.editor-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px 14px;
  background: #252526;
  border: 1px solid var(--vscode-border);
  border-radius: 6px;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: #9d9d9d;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ec9b0;
  box-shadow: 0 0 8px #4ec9b0;
}

/* H1 Estilizado VS Code */
h1.hero-title {
  font-family: 'Fira Code', 'JetBrains Mono', monospace;
  font-size: clamp(2.2rem, 5.5vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-shadow: 
    0 0 1px rgba(255, 255, 255, 0.8),
    0 0 24px rgba(0, 122, 204, 0.35),
    0 10px 30px rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  user-select: text;
  transition: transform 0.3s ease;
  margin-bottom: 24px;
}

h1.hero-title:hover {
  transform: translateY(-2px);
}

.tag-bracket {
  color: var(--syn-keyword);
  font-weight: 400;
  margin: 0 2px;
}

.domain-ext {
  color: var(--vscode-cyan);
}

/* Cursor piscante de terminal */
.cursor {
  display: inline-block;
  width: 0.52em;
  height: 1.1em;
  background-color: var(--vscode-accent);
  margin-left: 8px;
  vertical-align: middle;
  border-radius: 1px;
  animation: blink 1.1s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Ícones das Redes Sociais integrados com estilo VS Code */
.social-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  max-width: 520px;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(37, 37, 38, 0.9);
  border: 1px solid var(--vscode-border);
  color: #cccccc;
  font-size: 1.15rem;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  position: relative;
}

.social-icons a:hover {
  color: #ffffff;
  border-color: var(--vscode-hover-cyan);
  background: rgba(0, 122, 204, 0.25);
  box-shadow: 0 0 18px rgba(0, 188, 212, 0.5), inset 0 0 8px rgba(0, 188, 212, 0.2);
  transform: translateY(-3px) scale(1.05);
}

.social-icons a svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: fill 0.25s ease;
}

/* Link de E-mail de Contato */
.email-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--vscode-cyan);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 6px 14px;
  background: rgba(30, 30, 30, 0.6);
  border: 1px solid rgba(78, 201, 176, 0.25);
  border-radius: 6px;
  transition: all 0.25s ease;
  margin-bottom: 22px;
}

.email-link:hover {
  background: rgba(78, 201, 176, 0.1);
  border-color: var(--vscode-hover-cyan);
  box-shadow: 0 0 14px rgba(78, 201, 176, 0.3);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Barra de status estilo rodapé do VS Code */
.status-bar-tag {
  font-size: 0.78rem;
  color: #858585;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.status-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-item span.accent {
  color: var(--syn-variable);
}

@keyframes floatMotion {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(12px, -18px, 0) rotate(0.4deg);
  }
  100% {
    transform: translate3d(-10px, 14px, 0) rotate(-0.4deg);
  }
}

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

/* ==========================================================================
   RESPONSIVIDADE E MENU HAMBÚRGUER (MOBILE & TABLET <= 820px)
   ========================================================================== */
@media (max-width: 820px) {
  .top-nav-bar {
    top: 20px;
    justify-content: flex-end;
    padding: 0 24px;
  }

  /* Exibe o botão hambúrguer */
  .menu-toggle {
    display: flex;
  }

  /* Painel dropdown do menu no mobile */
  .top-nav {
    display: none;
    position: absolute;
    top: 50px;
    right: 24px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 18px 20px;
    border-radius: 12px;
    background: rgba(25, 25, 26, 0.95);
    border: 1px solid rgba(0, 188, 212, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 188, 212, 0.2);
    min-width: 200px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.25s ease;
  }

  /* Quando o menu está aberto */
  .top-nav.open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
  }

  .nav-item {
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 6px;
    justify-content: flex-start;
  }

  .nav-item:hover {
    background: rgba(0, 122, 204, 0.25);
  }

  /* Esconde as bolinhas separadoras no formato vertical */
  .nav-separator {
    display: none;
  }

  .code-card {
    font-size: 0.66rem;
    padding: 10px 14px;
  }

  .pos-js-2, .pos-py-2 {
    display: none;
  }

  .social-icons a {
    width: 40px;
    height: 40px;
    font-size: 1.05rem;
  }
}
