/*
  Portfólio Single-Page — tema escuro minimalista
  - Paleta: fundo quase preto (#0b0d10), texto claro, acento ciano (#00e5ff)
  - Tipografia: Space Grotesk (títulos), Inter (corpo)
  - Layout: espaçamento generoso, curvas suaves, sombras leves
*/
:root {
  --bg: #0b0d10;
  --bg-elev-1: #0f1216;
  --bg-elev-2: #131820;
  --text: #e6e9ef;
  --text-dim: #aab3c0;
  --accent: #00e5ff; /* alterne para #ff2bd1 ou #c8ff00 se preferir */
  --accent-2: #57fff5;
  --border: rgba(255,255,255,0.08);
  --shadow: 0 10px 30px rgba(0,0,0,0.45);
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1150px;
}

/* Tema claro (override de variáveis) */
body[data-theme="light"] {
  /* Fundo e superfícies em CINZA CLARO (sem branco puro) */
  --bg: #f3f4f6;          /* cinza 100 */
  --bg-elev-1: #f7f8fa;   /* cinza 50 */
  --bg-elev-2: #eceff3;   /* cinza 200 */
  --text: #0b0d10;
  --text-dim: #475569;
  --border: rgba(0,0,0,0.08);
  --shadow: 0 10px 30px rgba(0,0,0,0.12);
}
body[data-theme="light"] .site-header {
  background: linear-gradient(to bottom, rgba(255,255,255,0.7), rgba(255,255,255,0.35));
}

/* Link de pulo para conteúdo (acessibilidade) */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  background: #0f1216;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.skip-link:focus-visible {
  top: 12px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica Neue, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1400px 800px at 20% -10%, rgba(0,229,255,0.08), transparent 60%),
              radial-gradient(1000px 600px at 90% 10%, rgba(0,229,255,0.06), transparent 55%),
              var(--bg);
  line-height: 1.6;
}

h1, h2, h3 { font-family: "Space Grotesk", Inter, system-ui; letter-spacing: 0.2px; }
h1 { font-weight: 700; }
h2, h3 { font-weight: 600; }

/* Canvas de partículas ao fundo */
#bg-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.page-wrap { position: relative; z-index: 1; }

/* Header fixo */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 24px;
  backdrop-filter: saturate(140%) blur(12px);
  background: linear-gradient(to bottom, rgba(13,16,20,0.75), rgba(13,16,20,0.35));
  border-bottom: 1px solid var(--border);
}
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elev-1);
  color: var(--text);
  cursor: pointer;
}
.theme-toggle:hover { transform: translateY(-1px); transition: transform 180ms ease; }
.theme-toggle .theme-icon { width: 20px; height: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: clamp(36px, 4.5vw, 44px);
  height: clamp(36px, 4.5vw, 44px);
  font-family: "Space Grotesk", Inter, system-ui;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--bg);
  background: radial-gradient(60% 60% at 50% 40%, var(--accent), var(--accent-2));
  border-radius: 14px;
  border: 1px solid rgba(0,229,255,0.45);
  box-shadow: 0 10px 22px rgba(0,229,255,0.22), inset 0 0 18px rgba(255,255,255,0.08);
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
  transition: transform 180ms ease, box-shadow 200ms ease, background 200ms ease;
}
.brand:hover .brand-mark {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0,229,255,0.28), inset 0 0 20px rgba(255,255,255,0.12);
  background: radial-gradient(60% 60% at 50% 40%, var(--accent-2), var(--accent));
}
.brand-text { display: none; }

.site-nav { display: flex; gap: 14px; align-items: center; }
.site-nav a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}
.site-nav a:hover { border-color: var(--border); background: rgba(255,255,255,0.03); }

/* Snap container */
.snap-container { scroll-snap-type: y proximity; }
.snap { scroll-snap-align: start; }

.section {
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: 90px 24px;
}
.section .section-head { max-width: var(--maxw); margin: 0 auto 26px; padding: 0 8px; }
.section h2 { font-size: clamp(28px, 4.5vw, 40px); margin: 0 0 6px; }
.section .section-desc { color: var(--text-dim); margin: 0; }

/* Hero */
.hero { position: relative; isolation: isolate; }
.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(14px, 2vw, 24px);
  display: grid;
  gap: 16px;
}
.hero-copy { display: grid; gap: 16px; align-content: start; }
.hero-photo { order: -1; display: grid; place-items: center; }
.photo-wrap {
  position: relative;
  width: clamp(180px, 35vw, 320px);
  aspect-ratio: 4/5;
  border-radius: 18px;
  padding: 6px;
  background:
    radial-gradient(120% 140% at 20% 0%, rgba(0,229,255,0.25), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(0,0,0,0.45), 0 0 0 3px rgba(0,229,255,0.12) inset;
}
.photo-wrap::before {
  content: "";
  position: absolute; inset: -2px;
  border-radius: 20px;
  background: conic-gradient(from 0deg, rgba(0,229,255,0.55), rgba(0,229,255,0.05), rgba(0,229,255,0.55));
  filter: blur(16px) saturate(140%);
  opacity: 0.35;
  z-index: -1;
}
.profile-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: 14px;
}
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; font-size: 12px; opacity: 0.9; }
.hero-title { font-size: clamp(38px, 9vw, 80px); margin: 6px 0; line-height: 1.02; }
.hero-subtitle { color: var(--text-dim); font-size: clamp(16px, 2.4vw, 18px); }

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

.btn {
  --btn-bg: var(--bg-elev-1);
  --btn-border: var(--border);
  --btn-color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-color);
  text-decoration: none;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.btn:hover { transform: translateY(-1px); transition: transform 180ms ease; }
.btn-primary { --btn-bg: linear-gradient(180deg, rgba(0,229,255,0.2), rgba(0,229,255,0.08)); --btn-border: rgba(0,229,255,0.35); }
.btn-ghost { --btn-bg: rgba(255,255,255,0.03); }

.hero-bg-gradient {
  position: absolute; inset: 0; z-index: -1; overflow: hidden;
  background: radial-gradient(60% 50% at 70% 30%, rgba(0,229,255,0.12), transparent),
              radial-gradient(40% 35% at 20% 60%, rgba(0,229,255,0.10), transparent);
}
.hero-bg-gradient::after {
  content: "";
  position: absolute; inset: -30% -10% -20% -10%;
  background: conic-gradient(from 0deg at 50% 50%, rgba(0,229,255,0.16), rgba(0,229,255,0.02), rgba(0,229,255,0.16));
  animation: spin 18s linear infinite;
  filter: blur(50px) saturate(120%);
  opacity: 0.25;
}
@keyframes spin { to { transform: rotate(1turn); } }

.hero-meta { color: var(--text-dim); border: 1px dashed rgba(255,255,255,0.12); padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.02); }

/* Projects */
.projects { align-items: start; }
.projects-grid {
  max-width: var(--maxw);
  margin: 6px auto 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
  padding: 0 8px;
  justify-content: center; /* centraliza o conteúdo dentro do grid */
  justify-items: center;   /* centraliza itens quando houver menos colunas */
}
.card {
  grid-column: span 12;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  max-width: 780px; /* limita a largura do card para permitir centralização elegante */
  width: 100%;
}
.card-media {
  aspect-ratio: 16 / 9;
  background: linear-gradient(160deg, rgba(0,229,255,0.10), rgba(255,255,255,0.02));
  border-bottom: 1px solid var(--border);
  position: relative;
}
.placeholder-thumb { display: grid; place-items: center; color: var(--text-dim); }
.thumb-overlay { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text); font-weight: 600; letter-spacing: 0.5px; background: linear-gradient(180deg, rgba(0,229,255,0.08), rgba(0,229,255,0.0)); mix-blend-mode: screen; }

.card-body { padding: 14px; display: grid; gap: 10px; }
.card-title { font-size: clamp(18px, 3.5vw, 22px); margin: 2px 0; }
.card-text { color: var(--text-dim); margin: 0; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 6px 0; }
.tags li {
  font-size: 12px; color: var(--text);
  padding: 6px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}
.card-actions { display: flex; gap: 12px; }
.link { color: var(--accent); text-decoration: none; border-bottom: 1px dashed rgba(0,229,255,0.4); padding-bottom: 2px; }
.link:hover { filter: drop-shadow(0 0 6px rgba(0,229,255,0.5)); }
.link.is-disabled { opacity: 0.5; pointer-events: none; border-bottom-color: transparent; }

/* Acessibilidade/utilitários */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* Skills */
.skills-grid {
  max-width: var(--maxw);
  margin: 12px auto 0;
  padding: 0 8px;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.skill {
  grid-column: span 6;
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.skill-badge {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center; font-weight: 700; letter-spacing: 0.4px;
  color: var(--bg);
  background: linear-gradient(180deg, var(--accent), #00bcd4);
  box-shadow: 0 10px 20px rgba(0,229,255,0.25);
}
.skill-name { color: var(--text); font-weight: 600; }

/* Contact */
.section.contact { padding-top: 70px; }
.contact-grid {
  max-width: var(--maxw);
  margin: 12px auto 0;
  padding: 0 8px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
  justify-content: center;
  justify-items: center;
}
.contact .section-head { margin: 0 auto 10px; }
.contact-actions { grid-column: span 12; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.contact-form { grid-column: span 12; display: grid; gap: 12px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.form-row { display: grid; gap: 6px; }
label { font-size: 14px; color: var(--text); }
input, textarea {
  width: 100%;
  background: rgba(255,255,255,0.02);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  outline: none;
}
input::placeholder, textarea::placeholder { color: #8b93a3; }
input:focus, textarea:focus { border-color: rgba(0,229,255,0.45); box-shadow: 0 0 0 3px rgba(0,229,255,0.16); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  padding: 20px 24px; text-align: center; color: var(--text-dim);
}

/* Toast (feedback pós-envio) */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  color: var(--text);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 10px 14px;
  z-index: 10;
  opacity: 0;
  transition: opacity 260ms ease, transform 260ms ease;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Responsividade */
@media (min-width: 680px) {
  .hero-inner { grid-template-columns: 1.2fr 0.9fr; align-items: center; gap: 26px; }
  .hero-photo { order: unset; justify-self: end; }
  .projects-grid .card { grid-column: span 6; }
  .skills-grid .skill { grid-column: span 3; }
  .contact-actions { grid-column: span 12; justify-content: center; }
  .contact-form { grid-column: span 12; }
}

@media (min-width: 1024px) {
  .projects-grid .card { grid-column: span 4; }
}
