:root {
  --bg: #05141a;
  --bg2: #071e27;
  --bg3: #0a2836;
  --text: #f2f0e8;
  --muted: #4a7a8a;
  --acid: #d8f2f0;
  --teal: #004358;
  --teal-mid: #006280;
  --teal-bright: #00a8c8;
  --green-status: #01e607;
  --border: rgba(0, 67, 88, 0.4);
  --border-bright: rgba(0, 168, 200, 0.25);
  --mono: "Space Mono", monospace;
  --display: "Bebas Neue", sans-serif;
  --code: "DM Mono", monospace;
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 1;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3rem;
  height: 56px;
  background: rgba(5, 20, 26, 0.88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}
.nav-logo {
  font-family: var(--display);
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  color: var(--acid);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-link {
  font-family: var(--code);
  font-size: 0.72rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-link:hover {
  color: var(--acid);
}
.nav-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--code);
  font-size: 0.7rem;
  color: var(--muted);
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-status);
  animation: blink 2s step-start infinite;
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

section {
  position: relative;
  z-index: 2;
}

/* HERO */
#hero {
  min-height: 100vh;
  padding-top: 56px;
  display: grid;
  grid-template-rows: 1fr auto;
  border-bottom: 1px solid var(--border);
}
.hero-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
.hero-left {
  padding: 5rem 3rem;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.hero-label {
  font-family: var(--code);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-label::before {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--teal-mid);
}

h1 {
  font-family: var(--display);
  font-size: clamp(4rem, 7.5vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: 0.01em;
  margin-bottom: 2rem;
  perspective: 600px;
}
.t3d {
  display: inline-block;
  transform-style: preserve-3d;
  animation: float3d 6s ease-in-out infinite;
}
.t3d-stroke {
  display: block;
  -webkit-text-stroke: 1.5px var(--acid);
  color: transparent;
  transform: translateZ(0px);
  text-shadow: 0 0 40px rgba(0, 168, 200, 0.15);
}
.t3d-accent {
  display: block;
  color: var(--teal-bright);
  transform: translateZ(0);
  filter: drop-shadow(0 0 16px rgba(0, 168, 200, 0.4));
}
.t3d-solid {
  display: block;
  color: var(--acid);
}
@keyframes float3d {
  0%,
  100% {
    transform: rotateX(0deg) rotateY(0deg);
  }
  25% {
    transform: rotateX(1deg) rotateY(-1.5deg);
  }
  75% {
    transform: rotateX(-1deg) rotateY(1.5deg);
  }
}

.hero-desc {
  font-family: var(--code);
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.9;
  max-width: 420px;
  margin-bottom: 2.5rem;
}
.hero-desc strong {
  color: var(--acid);
  font-weight: 400;
}
.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn {
  font-family: var(--code);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.75rem 1.75rem;
  text-decoration: none;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
  display: inline-block;
}
.btn:active {
  transform: translate(3px, 3px) !important;
  box-shadow: none !important;
}
.btn-fill {
  background: var(--acid);
  color: var(--bg);
  border: 2px solid var(--acid);
  box-shadow: 4px 4px 0 var(--teal-mid);
}
.btn-fill:hover {
  box-shadow: 6px 6px 0 var(--teal-mid);
  transform: translate(-2px, -2px);
}
.btn-outline {
  background: transparent;
  color: var(--acid);
  border: 2px solid var(--border-bright);
  box-shadow: 4px 4px 0 rgba(0, 67, 88, 0.5);
}
.btn-outline:hover {
  border-color: var(--acid);
  box-shadow: 6px 6px 0 var(--teal-mid);
  transform: translate(-2px, -2px);
}

.hero-right {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 67, 88, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 67, 88, 0.2) 1px, transparent 1px);
  background-size: 40px 40px;
}
#sphere-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.85;
}
.hero-photo-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 3rem;
  height: 100%;
}
.hero-photo {
  width: 100%;
  max-width: 24rem;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: grayscale(15%) contrast(1.08);
  mix-blend-mode: luminosity;
  mask-image: linear-gradient(
    to top,
    transparent 0%,
    rgba(0, 0, 0, 0.25) 8%,
    black 28%
  );
  -webkit-mask-image: linear-gradient(
    to top,
    transparent 0%,
    rgba(0, 0, 0, 0.25) 8%,
    black 28%
  );
}
.hero-photo-accent {
  position: absolute;
  top: 2rem;
  right: 2rem;
  z-index: 3;
  border: 1px solid var(--border-bright);
  padding: 0.5rem 1rem;
  font-family: var(--display);
  font-size: 3rem;
  color: var(--teal-bright);
  line-height: 1;
}
.hero-photo-sub {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 3;
  font-family: var(--code);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-left: 2px solid var(--teal-mid);
  padding-left: 0.75rem;
}

.hero-bottom {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.hero-stat {
  padding: 1.5rem;
  border-right: 1px solid var(--border);
}
.hero-stat:last-child {
  border-right: none;
}
.stat-n {
  font-family: var(--display);
  font-size: 2.8rem;
  line-height: 1;
  color: var(--teal-bright);
  margin-bottom: 0.3rem;
}
.stat-l {
  font-family: var(--code);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════
   SOBRE — layout e foto
═══════════════════════════════════════════ */
#sobre {
  display: grid;
  grid-template-columns: 260px 1fr;
  border-bottom: 1px solid var(--border);
}
.sobre-sidebar {
  padding: 4rem 2.5rem;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.sidebar-tag {
  font-family: var(--code);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  align-self: flex-start;
}
.sidebar-num {
  font-family: var(--display);
  font-size: 8rem;
  color: rgba(0, 67, 88, 0.4);
  line-height: 1;
  user-select: none;
}
.sobre-content {
  padding: 4rem 3rem;
}
.sec-title {
  font-family: var(--display);
  font-size: clamp(3rem, 5vw, 5rem);
  line-height: 1;
  letter-spacing: 0.02em;
  margin-bottom: 2.5rem;
}
.sec-title .stroke {
  -webkit-text-stroke: 1.5px var(--acid);
  color: transparent;
}

/* Linha texto + foto lado a lado */
.about-container {
  display: flex;
  align-items: stretch;
  gap: 3rem;
  padding-right: 3rem;

  @media (max-width: 900px) {
    padding-right: 0rem;
  }
}

/* Bloco de texto */
.sobre-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sobre-text p {
  font-family: var(--code);
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.95;
  margin-bottom: 1rem;
  max-width: 540px;
}
.sobre-text p strong {
  color: var(--acid);
  font-weight: 400;
}

/* ── FOTO ────────────────────────────────────── */
.ceo-photo-wrap {
  flex-shrink: 0;
  width: 20rem;
  position: relative;
  align-self: stretch;
}

/* Sombra de borda deslocada — padrão visual do site */
.ceo-photo-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--teal-bright);
  transform: translate(8px, 8px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
  transition:
    opacity 0.3s,
    transform 0.3s;
}

/* Fade no rodapé — integra com o fundo */
.ceo-photo-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 35%;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
  z-index: 2;
}

@keyframes scan-line {
  0% {
    top: 0%;
    opacity: 0;
  }
  5% {
    opacity: 0.7;
  }
  90% {
    opacity: 0.2;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

/* Hover — o offset da sombra cresce */
.ceo-photo-wrap:hover::before {
  opacity: 0.55;
  transform: translate(12px, 12px);
}

/* A imagem em si */
.ceo-photo-wrap img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(18%) contrast(1.06) brightness(0.95);
  border: 1px solid var(--border);
  transition: filter 0.4s;
}

.ceo-photo-wrap:hover img {
  filter: grayscale(0%) contrast(1.08) brightness(1);
}

/* Badge "disponível" na base da foto */
.photo-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 1rem;
  font-family: var(--code);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: rgba(5, 20, 26, 0.7);
  backdrop-filter: blur(4px);
}

.photo-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green-status);
  flex-shrink: 0;
  animation: blink 2s step-start infinite;
}

/* Tags */
.sobre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5rem;
}
.tag {
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border);
  font-family: var(--code);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.tag:hover {
  border-color: var(--teal-bright);
  color: var(--acid);
}

/* PROJETOS */
#projetos {
  border-bottom: 1px solid var(--border);
}
.projetos-header {
  padding: 3rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.projetos-header .sec-title {
  margin-bottom: 0;
}
.proj-count {
  font-family: var(--display);
  font-size: 5rem;
  color: rgba(0, 67, 88, 0.4);
  line-height: 1;
}
.proj-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.proj-card {
  position: relative;
  overflow: hidden;
  padding: 2.5rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transform-style: preserve-3d;
  transform: perspective(800px) rotateX(0deg) rotateY(0deg);
  transition:
    transform 0.08s ease,
    background 0.2s;
  background: var(--bg);
}
.proj-card:nth-child(even) {
  border-right: none;
}
.proj-card:nth-child(3),
.proj-card:nth-child(4) {
  border-bottom: none;
}
.proj-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--mx, 50%) var(--my, 50%),
    rgba(0, 168, 200, 0.06) 0%,
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 0;
}
.proj-card:hover::before {
  opacity: 1;
}
.proj-card:hover {
  background: var(--bg2);
}
.proj-card-inner {
  position: relative;
  z-index: 1;
  transform: translateZ(12px);
}
.proj-num {
  font-family: var(--display);
  font-size: 1.8rem;
  color: rgba(0, 67, 88, 0.5);
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}
.proj-card:hover .proj-num {
  color: var(--teal-bright);
}
.proj-name {
  font-family: var(--display);
  font-size: 2rem;
  letter-spacing: 0.02em;
  line-height: 1;
  margin-bottom: 0.75rem;
}
.proj-desc {
  font-family: var(--code);
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}
.proj-stack {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}
.proj-tech {
  font-family: var(--code);
  font-size: 0.65rem;
  padding: 2px 8px;
  border: 1px solid var(--border);
  color: var(--muted);
}
.proj-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.proj-type {
  font-family: var(--code);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.proj-arrow {
  font-size: 1.1rem;
  color: var(--teal-bright);
  transition: transform 0.25s;
}
.proj-card:hover .proj-arrow {
  transform: translate(3px, -3px);
}
.proj-lock {
  font-family: var(--code);
  font-size: 0.65rem;
  color: rgba(0, 67, 88, 0.6);
  letter-spacing: 0.06em;
}

/* SKILLS */
#skills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
.skills-left {
  padding: 4rem 3rem;
  border-right: 1px solid var(--border);
}
.skills-right {
  padding: 4rem 3rem;
}
.skill-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.skill-row:first-of-type {
  border-top: 1px solid var(--border);
}
.skill-name-col {
  width: 140px;
  font-family: var(--code);
  font-size: 0.75rem;
  color: var(--text);
  letter-spacing: 0.04em;
}
.skill-bar {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.skill-bar-fill {
  height: 100%;
  background: var(--teal-bright);
  width: 0;
  transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.skill-lvl {
  font-family: var(--code);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  min-width: 80px;
  text-align: right;
}
.terminal {
  background: var(--bg2);
  border: 1px solid var(--border);
  font-family: var(--code);
  font-size: 0.72rem;
  margin-top: 2rem;
}
.terminal-bar {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}
.t-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.terminal-body {
  padding: 1.2rem;
  line-height: 2;
}
.t-line {
  color: var(--muted);
}
.t-cmd {
  color: var(--teal-bright);
}
.t-out {
  color: var(--acid);
}
.t-cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: var(--teal-bright);
  vertical-align: middle;
  animation: blink 1s step-start infinite;
}

/* CONTATO */
#contato {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
.contato-left {
  padding: 5rem 3rem;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.contato-right {
  padding: 5rem 3rem;
}
.big-text {
  font-family: var(--display);
  font-size: clamp(4rem, 7vw, 7rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  margin-bottom: 2rem;
}
.big-text .stroke {
  -webkit-text-stroke: 1.5px var(--acid);
  color: transparent;
}
.contato-sub {
  font-family: var(--code);
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.9;
  max-width: 360px;
  margin-bottom: 2.5rem;
}
.social-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--muted);
  font-family: var(--code);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.social-link:first-child {
  border-top: 1px solid var(--border);
}
.social-link:hover {
  color: var(--acid);
}
.sl-arrow {
  color: var(--border);
  transition: color 0.2s;
}
.social-link:hover .sl-arrow {
  color: var(--teal-bright);
}
.form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-label {
  font-family: var(--code);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.form-field input,
.form-field textarea {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--acid);
  font-family: var(--code);
  font-size: 0.8rem;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--teal-bright);
}
.form-field textarea {
  min-height: 100px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.btn-submit {
  background: var(--teal);
  color: var(--acid);
  border: 2px solid var(--teal-bright);
  font-family: var(--code);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.85rem;
  box-shadow: 4px 4px 0 var(--teal-mid);
  transition:
    transform 0.15s,
    box-shadow 0.15s;
  margin-top: 0.5rem;
  cursor: pointer;
}
.btn-submit:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--teal-mid);
}

footer {
  padding: 1.5rem 3rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--code);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.footer-r {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.footer-link {
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.2s;
}
.footer-link:hover {
  color: var(--acid);
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}
.reveal.on {
  opacity: 1;
  transform: none;
}

/* RESPONSIVO */
@media (max-width: 900px) {
  nav {
    padding: 0 1.5rem;
  }
  .nav-right > .nav-link {
    display: none;
  }
  .hero-main {
    grid-template-columns: 1fr;
  }
  .hero-right {
    min-height: 380px;
  }
  .hero-bottom {
    grid-template-columns: 1fr 1fr;
  }
  #sobre {
    grid-template-columns: 1fr;
  }
  .sobre-sidebar {
    display: none;
  }
  .about-container {
    flex-direction: column;
    align-items: center;
  }
  .ceo-photo-wrap {
    width: 100%;
    max-width: 340px;
    height: 380px;
  }
  .proj-grid {
    grid-template-columns: 1fr;
  }
  .proj-card:nth-child(even) {
    border-right: none;
  }
  .proj-card {
    border-right: none !important;
  }
  .proj-card:last-child {
    border-bottom: none;
  }
  #skills,
  #contato {
    grid-template-columns: 1fr;
  }
  .skills-right {
    display: none;
  }
  .contato-left {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .hero-left,
  .sobre-content,
  .projetos-header,
  .skills-left,
  .contato-left,
  .contato-right {
    padding: 3rem 1.5rem;
  }
  footer {
    padding: 1.5rem;
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}

html,
body {
  width: 100%;
  overflow-x: hidden;
}
* {
  max-width: 100%;
}
#bg-canvas,
#sphere-canvas {
  width: 100%;
  max-width: 100%;
  display: block;
}
@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}
h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  word-break: break-word;
}
