/* ==============================
   VARIÁVEIS E RESET
   ============================== */
:root {
  --bg:        #060b14;
  --bg-2:      #0b1628;
  --primary:   #00d4ff;
  --secondary: #7c3aed;
  --green:     #00ffa3;
  --text:      #e2e8f0;
  --muted:     #64748b;
  --border:    rgba(226,232,240,0.1);
  --glass:     rgba(11,22,40,0.8);
  --radius:    16px;
  --radius-sm: 10px;
  --font:      'Space Grotesk', system-ui, sans-serif;
  --mono:      'Space Mono', 'Courier New', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ==============================
   CURSOR CUSTOMIZADO
   ============================== */
#cursor {
  position: fixed;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: width .22s ease, height .22s ease;
}
#cursor.expanded { width: 56px; height: 56px; }

/* ==============================
   BARRA DE PROGRESSO
   ============================== */
#scroll-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  z-index: 9999;
  transition: width .1s linear;
}

/* ==============================
   CANVAS DE PARTÍCULAS
   ============================== */
#canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ==============================
   LAYOUT
   ============================== */
.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}
.section { padding: 5rem 0; }

/* ==============================
   HEADER
   ============================== */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background .3s, backdrop-filter .3s;
}
header.scrolled {
  background: rgba(6,11,20,.94);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 70px;
}
.brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.1rem;
  font-weight: 600;
}
.brand-icon  { color: var(--primary); font-size: 1.4rem; line-height: 1; }
.brand-text strong { color: var(--primary); }
.nav-links   { display: flex; gap: 2rem; }
.nav-links a { font-size: .88rem; color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.btn-nav {
  font-size: .84rem;
  padding: .5rem 1.2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(0,212,255,.35);
  transition: transform .18s, box-shadow .18s;
}
.btn-nav:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(0,212,255,.55);
}

/* ==============================
   BOTÕES
   ============================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border-radius: 999px;
  padding: .7rem 1.6rem;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform .18s, box-shadow .18s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 0 25px rgba(0,212,255,.45);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(0,212,255,.65);
}
.btn-outline {
  border: 1px solid rgba(0,212,255,.6);
  background: rgba(0,212,255,.05);
  color: var(--primary);
}
.btn-outline:hover {
  background: rgba(0,212,255,.12);
  transform: translateY(-2px);
}
.btn-full { width: 100%; justify-content: center; }

/* ==============================
   HERO
   ============================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 1.5rem 4rem;
  max-width: 1160px;
  margin: 0 auto;
  position: relative;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* badge "disponível" */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  padding: .25rem .8rem;
  border-radius: 999px;
  border: 1px solid rgba(0,255,163,.5);
  background: rgba(0,255,163,.07);
  color: var(--green);
  margin-bottom: 1.1rem;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 8px var(--green); }
  50%      { box-shadow: 0 0 20px var(--green), 0 0 40px rgba(0,255,163,.4); }
}

/* título */
.hero-title {
  font-size: clamp(2.6rem, 4.2vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -.04em;
  margin-bottom: 1.1rem;
}
.typewriter-wrap { display: flex; align-items: center; }
#tw {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  color: transparent;
}
.tw-cursor { color: var(--primary); animation: blink .8s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-desc {
  color: var(--muted);
  font-size: .98rem;
  max-width: 30rem;
  margin-bottom: 1.8rem;
  line-height: 1.65;
}
.hero-btns { display: flex; flex-wrap: wrap; gap: .75rem; }

/* widgets */
.hero-widgets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}
.widget {
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(0,0,0,.6);
  transition: transform .3s, box-shadow .3s;
  transform-style: preserve-3d;
}
.widget:hover { box-shadow: 0 0 30px rgba(0,212,255,.18); }
.widget-1 { grid-column: span 2; }

.widget-label {
  font-size: .72rem;
  color: var(--muted);
  margin-bottom: .5rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.widget-badges { display: flex; flex-wrap: wrap; gap: .35rem; }
.widget-badges span {
  font-size: .74rem;
  padding: .12rem .5rem;
  border-radius: 999px;
  background: rgba(0,212,255,.1);
  border: 1px solid rgba(0,212,255,.4);
  color: var(--primary);
}
.widget-project strong { display: block; font-size: 1.1rem; }
.widget-project small  { color: var(--muted); font-size: .8rem; }
.widget-status {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: var(--green);
  margin-top: .6rem;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}
.big-num {
  display: block;
  font-size: 2.4rem;
  font-weight:
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
.widget-metric small { color: var(--muted); font-size: .8rem; }

/* scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 1.5rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  z-index: 1;
}
.scroll-line {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, var(--primary), transparent);
  animation: scrollAnim 2s ease-in-out infinite;
}
@keyframes scrollAnim {
  0%,100% { width: 40px; opacity: 1; }
  50%      { width: 70px; opacity: .5; }
}

/* ==============================
   COUNTERS
   ============================== */
.counters {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3rem 1.5rem;
  background: rgba(11,22,40,.6);
  backdrop-filter: blur(10px);
}
.counters .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
.counter-item .cnt {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
.counter-item .cnt-plus {
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary);
}
.counter-item p {
  margin-top: .4rem;
  font-size: .82rem;
  color: var(--muted);
}

/* ==============================
   SECTION HEAD
   ============================== */
.section-head {
  margin-bottom: 2.8rem;
  max-width: 600px;
}
.section-num {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--primary);
  letter-spacing: .12em;
  display: block;
  margin-bottom: .5rem;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -.03em;
  margin-bottom: .5rem;
}
.section-head p {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.65;
}

/* ==============================
   SERVIÇOS
   ============================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
.svc-card {
  border-radius: var(--radius);
  padding: 1.4rem 1.2rem 1.1rem;
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
  display: flex;
  flex-direction: column;
  gap: .5rem;
  transition: transform .28s, border-color .2s, box-shadow .2s;
  transform-style: preserve-3d;
  will-change: transform;
}
.svc-card:hover {
  border-color: rgba(0,212,255,.6);
  box-shadow: 0 0 40px rgba(0,212,255,.12);
}
.svc-icon {
  font-size: 1.6rem;
  color: var(--primary);
  line-height: 1;
  margin-bottom: .25rem;
}
.svc-card h3 { font-size: 1rem; }
.svc-card > p { color: var(--muted); font-size: .86rem; line-height: 1.55; }
.svc-card ul {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  margin-top: .3rem;
}
.svc-card ul li {
  font-size: .8rem;
  color: var(--muted);
  padding-left: .8rem;
  position: relative;
}
.svc-card ul li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--primary);
}
.svc-footer {
  margin-top: auto;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}
.svc-footer span {
  font-size: .74rem;
  padding: .12rem .55rem;
  border-radius: 999px;
  border: 1px solid rgba(124,58,237,.6);
  color: #a78bfa;
  background: rgba(124,58,237,.1);
}

/* ==============================
   PROJETOS (scroll horizontal)
   ============================== */
.projects-scroll {
  overflow-x: auto;
  padding: 1rem 1.5rem 2rem;
  cursor: grab;
  position: relative;
  z-index: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}
.projects-scroll:active { cursor: grabbing; }
.projects-scroll::-webkit-scrollbar { height: 4px; }
.projects-scroll::-webkit-scrollbar-track { background: transparent; }
.projects-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 999px;
}
.projects-track {
  display: flex;
  gap: 1.1rem;
  width: max-content;
  padding: .5rem .25rem;
}
.proj-card {
  width: 290px;
  flex-shrink: 0;
  border-radius: var(--radius);
  padding: 1.3rem 1.1rem 1.1rem;
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(0,0,0,.6);
  display: flex;
  flex-direction: column;
  gap: .5rem;
  position: relative;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .28s;
  transform-style: preserve-3d;
  will-change: transform;
}
.proj-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,212,255,.07), transparent 50%, rgba(124,58,237,.07));
  opacity: 0;
  transition: opacity .25s;
}
.proj-card:hover::after { opacity: 1; }
.proj-card:hover {
  border-color: rgba(0,212,255,.6);
  box-shadow: 0 0 40px rgba(0,212,255,.15);
}
.proj-num {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--primary);
  opacity: .5;
  letter-spacing: .1em;
}
.proj-badges { display: flex; flex-wrap: wrap; gap: .3rem; }
.proj-badges span {
  font-size: .7rem;
  padding: .1rem .45rem;
  border-radius: 999px;
  border: 1px solid rgba(0,212,255,.4);
  background: rgba(0,212,255,.07);
  color: var(--primary);
}
.proj-card h3 { font-size: 1.05rem; font-weight: 600; }
.proj-card p  { font-size: .84rem; color: var(--muted); line-height: 1.55; flex: 1; }
.proj-meta {
  font-size: .74rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: .6rem;
  font-family: var(--mono);
  letter-spacing: .04em;
}

/* ==============================
   SOBRE + TERMINAL
   ============================== */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}
.about-left p {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.65;
  margin-bottom: .9rem;
}
.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: 1.2rem;
}
.about-tags span {
  font-size: .78rem;
  padding: .22rem .6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(255,255,255,.03);
  transition: border-color .18s, color .18s;
}
.about-tags span:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* terminal */
.terminal {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 30px 70px rgba(0,0,0,.7);
  background: #0a0f1e;
  font-family: var(--mono);
}
.terminal-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem 1rem;
  background: #111827;
  border-bottom: 1px solid var(--border);
}
.terminal-dots { display: flex; gap: .4rem; }
.terminal-dots span {
  width: 11px; height: 11px;
  border-radius: 50%;
}
.terminal-dots span:nth-child(1) { background: #ef4444; }
.terminal-dots span:nth-child(2) { background: #f59e0b; }
.terminal-dots span:nth-child(3) { background: #22c55e; }
.terminal-title { font-size: .75rem; color: var(--muted); margin-left: auto; }
.terminal-body {
  padding: 1.1rem 1.25rem;
  font-size: .82rem;
  line-height: 1.7;
  min-height: 240px;
  color: #a3e635;
}
.prompt { color: var(--primary); margin-right: .4rem; user-select: none; }
.term-cursor { animation: blink .8s step-end infinite; color: var(--green); }
.term-output { margin-top: .4rem; }
.term-output .line { color: var(--muted); }
.term-output .line.green { color: var(--green); }
.term-output .line.blue  { color: var(--primary); }
.term-output .line.white { color: var(--text); }

/* ==============================
   CONTATO
   ============================== */
.contact-inner .section-head { max-width: 100%; margin-bottom: 2rem; }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
  gap: 2rem;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: .7rem; }
.info-card {
  border-radius: var(--radius-sm);
  padding: .85rem 1rem;
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.info-label { font-size: .74rem; color: var(--primary); text-transform: uppercase; letter-spacing: .06em; }
.info-val   { font-size: .88rem; }

.contact-form {
  border-radius: var(--radius);
  padding: 1.3rem 1.2rem;
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
.field { margin-bottom: .7rem; }
.field label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: .25rem; }
.field input,
.field textarea {
  width: 100%;
  padding: .6rem .8rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(226,232,240,.18);
  background: rgba(6,11,20,.9);
  color: var(--text);
  font-family: var(--font);
  font-size: .86rem;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.field input:focus,
.field textarea:focus {
  border-color: rgba(0,212,255,.7);
  box-shadow: 0 0 0 2px rgba(0,212,255,.15);
}
.field textarea { resize: vertical; min-height: 110px; }

/* ==============================
   FOOTER
   ============================== */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  font-size: .8rem;
  color: var(--muted);
  position: relative;
  z-index: 1;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-copy { font-size: .8rem; }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: var(--muted); transition: color .18s; }
.footer-links a:hover { color: var(--primary); }

/* ==============================
   REVEAL (scroll animation)
   ============================== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==============================
   RESPONSIVO
   ============================== */
@media (max-width: 980px) {
  .hero-inner,
  .about-grid,
  .contact-grid { grid-template-columns: minmax(0,1fr); }
  .hero-widgets { grid-template-columns: repeat(2,1fr); }
  .widget-1 { grid-column: span 2; }
  .services-grid { grid-template-columns: repeat(2,1fr); }
  .counters .wrap { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .services-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 520px) {
  .hero-widgets { grid-template-columns: minmax(0,1fr); }
  .widget-1 { grid-column: span 1; }
  .counters .wrap { grid-template-columns: repeat(2,1fr); gap: 1.2rem; }
  .form-row { grid-template-columns: minmax(0,1fr); }
}
