/* ===================== VARIÁVEIS ===================== */

:root {
  --bg: #0a0706;
  --bg-alt: #120909;
  --bg-card: #150a0a;

  --line: #341414;
  --line-soft: #241010;

  --red: #e0271c;
  --red-bright: #ff3b30;
  --red-dim: #5c1414;

  --text: #f4ede7;
  --text-muted: #b19e98;
  --text-faint: #806b66;

  --font-display: "Bebas Neue", sans-serif;
  --font-body: "Space Grotesk", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --ease: cubic-bezier(.16, .84, .44, 1);
}

/* ===================== RESET ===================== */

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  color: #ffffff;
  background: var(--red);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--red-bright);
  outline-offset: 4px;
}

/* ===================== ACESSIBILIDADE ===================== */

.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 9999;

  padding: 12px 18px;
  border-radius: 6px;

  color: #ffffff;
  background: var(--red);

  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;

  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 20px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===================== ESTRUTURA ===================== */

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

section {
  position: relative;
  padding: 110px 0;
}

.section-title {
  margin-bottom: 50px;

  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 54px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  margin-bottom: 18px;

  color: var(--red);

  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.eyebrow::before {
  content: "//";
  color: var(--text-faint);
}

.eyebrow .cursor {
  display: inline-block;

  width: 7px;
  height: 14px;

  background: var(--red);

  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

/* ===================== REVEAL ===================== */

.reveal {
  opacity: 0;
  transform: translateY(28px);

  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.08s;
}

.reveal-delay-2 {
  transition-delay: 0.16s;
}

.reveal-delay-3 {
  transition-delay: 0.24s;
}

.reveal-delay-4 {
  transition-delay: 0.32s;
}

/* ===================== NAVBAR ===================== */

header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;

  z-index: 100;

  padding: 22px 0;

  border-bottom: 1px solid transparent;

  transition:
    padding 0.35s var(--ease),
    background 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

header.scrolled {
  padding: 12px 0;

  border-bottom-color: var(--line-soft);

  background: rgba(10, 7, 6, 0.88);
  backdrop-filter: blur(14px);
}

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

.logo,
.footer-logo {
  color: var(--text);

  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.logo span,
.footer-logo span {
  color: var(--red);
}

.nav-links {
  display: flex;
  gap: 32px;

  list-style: none;
}

.nav-links a {
  position: relative;

  padding-bottom: 4px;

  color: var(--text-muted);

  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;

  transition: color 0.25s ease;
}

.nav-links a::after {
  content: "";

  position: absolute;
  bottom: 0;
  left: 0;

  width: 0;
  height: 1px;

  background: var(--red);

  transition: width 0.3s var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;

  padding: 8px;

  border: none;

  background: transparent;

  cursor: pointer;
}

.nav-toggle span {
  display: block;

  width: 24px;
  height: 2px;

  background: var(--text);

  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.menu-overlay {
  position: fixed;
  inset: 0;

  z-index: 90;

  visibility: hidden;
  opacity: 0;

  background: rgba(0, 0, 0, 0.65);

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.menu-overlay.show {
  visibility: visible;
  opacity: 1;
}

/* ===================== HERO ===================== */

.hero {
  display: flex;
  align-items: center;

  min-height: 100vh;
  padding: 140px 0 80px;

  overflow: hidden;

  border-bottom: 1px solid var(--line-soft);
}

.hero-noise {
  position: absolute;
  inset: 0;

  z-index: 0;

  opacity: 0.12;

  background-image:
    radial-gradient(
      circle at 1px 1px,
      rgba(224, 39, 28, 0.35) 1px,
      transparent 1px
    );

  background-size: 26px 26px;

  mask-image:
    linear-gradient(
      to right,
      black,
      transparent 75%
    );
}

.glitch-grid {
  position: absolute;
  top: 50%;
  right: -6%;

  z-index: 0;

  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(10, 1fr);

  width: 520px;
  height: 520px;

  opacity: 0.5;

  transform: translateY(-50%);

  mask-image:
    radial-gradient(
      circle,
      black 40%,
      transparent 75%
    );
}

.glitch-grid div {
  background: var(--red-dim);
}

.hero-content {
  position: relative;
  z-index: 2;

  max-width: 680px;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(64px, 10vw, 128px);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.hero-name .first {
  display: block;
  color: var(--text);
}

.hero-name .last {
  position: relative;

  display: block;

  color: var(--red);

  animation:
    glitchIn 1.1s var(--ease) 0.3s both;
}

@keyframes glitchIn {
  0% {
    opacity: 0;
    clip-path: inset(0 0 100% 0);
    transform: translateX(-6px);
  }

  40% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translateX(4px);
  }

  55% {
    transform: translateX(-2px);
  }

  70% {
    transform: translateX(2px);
  }

  100% {
    transform: translateX(0);
  }
}

.badge {
  display: inline-block;

  margin-top: 26px;
  padding: 9px 18px;

  border: 1px solid var(--line);
  border-radius: 100px;

  color: var(--text-muted);
  background: rgba(224, 39, 28, 0.04);

  font-family: var(--font-mono);
  font-size: 12.5px;
}

.hero-desc {
  max-width: 550px;
  margin-top: 22px;

  color: var(--text-muted);

  font-size: 16px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;

  margin-top: 34px;
}

/* ===================== BOTÕES ===================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 14px 26px;

  border: 1px solid transparent;
  border-radius: 6px;

  font-family: var(--font-mono);
  font-size: 14px;
  text-decoration: none;

  cursor: pointer;

  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    background 0.3s ease,
    border-color 0.3s ease;
}

.btn-primary {
  color: #ffffff;
  background: var(--red);
}

.btn-primary:hover {
  background: var(--red-bright);

  box-shadow:
    0 10px 30px -8px rgba(224, 39, 28, 0.6);

  transform: translateY(-3px);
}

.btn-ghost {
  border-color: var(--line);

  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--red);
  transform: translateY(-3px);
}

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

.btn:hover .arrow {
  transform: translate(3px, -3px);
}

/* ===================== SOBRE ===================== */

.about-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  align-items: start;
  gap: 64px;
}

.about-photo {
  position: relative;

  aspect-ratio: 4 / 5;

  overflow: hidden;

  border: 1px solid var(--line);
  border-radius: 12px;

  background: var(--bg-card);

  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.28);
}

.about-photo::before {
  content: "";

  position: absolute;
  inset: 12px;

  z-index: 3;

  pointer-events: none;

  border: 1px solid rgba(244, 237, 231, 0.12);
  border-radius: 7px;
}

.profile-photo {
  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center 36%;

  filter:
    contrast(1.04)
    saturate(0.9)
    brightness(0.92);

  transition:
    transform 0.7s var(--ease),
    filter 0.7s ease;
}

.about-photo:hover .profile-photo {
  transform: scale(1.035);

  filter:
    contrast(1.04)
    saturate(1)
    brightness(0.98);
}

.photo-overlay {
  position: absolute;
  inset: 0;

  z-index: 1;

  pointer-events: none;

  background:
    linear-gradient(
      to top,
      rgba(10, 7, 6, 0.9),
      transparent 48%
    ),
    linear-gradient(
      145deg,
      rgba(224, 39, 28, 0.12),
      transparent 45%
    );
}

.photo-tag {
  position: absolute;
  bottom: 24px;
  left: 26px;

  z-index: 4;

  color: var(--text);

  font-family: var(--font-mono);
  font-size: 12px;
}

.photo-tag::before {
  content: "";

  display: inline-block;

  width: 7px;
  height: 7px;
  margin-right: 8px;

  border-radius: 50%;

  background: var(--red);

  box-shadow:
    0 0 0 5px rgba(224, 39, 28, 0.16);
}

.about-copy .title {
  margin-bottom: 24px;

  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 56px);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
}

.about-copy p {
  max-width: 62ch;
  margin-bottom: 18px;

  color: var(--text-muted);
}

.about-copy strong {
  color: var(--text);
  font-weight: 600;
}

.formation {
  margin-top: 26px;
  padding-top: 22px;

  border-top: 1px solid var(--line-soft);
}

.formation .label {
  display: block;

  margin-bottom: 8px;

  color: var(--text-faint);

  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.formation .value {
  color: var(--red);

  font-size: 15px;
  font-weight: 600;
}

/* ===================== SKILLS ===================== */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.skill-card {
  padding: 28px 16px;

  border: 1px solid var(--line);
  border-radius: 10px;

  background: var(--bg-card);
  text-align: center;

  transition:
    transform 0.35s var(--ease),
    border-color 0.35s ease,
    background 0.35s ease;
}

.skill-card:hover {
  border-color: var(--red-dim);

  background: #1a0c0c;

  transform: translateY(-6px);
}

.skill-name {
  margin-bottom: 18px;

  color: var(--text-muted);

  font-family: var(--font-mono);
  font-size: 13px;
}

.ring {
  position: relative;

  width: 78px;
  height: 78px;
  margin: 0 auto;
}

.ring svg {
  width: 100%;
  height: 100%;

  transform: rotate(-90deg);
}

.ring circle {
  fill: none;
  stroke-width: 5;
}

.ring .track {
  stroke: var(--line);
}

.ring .bar {
  stroke: var(--red);
  stroke-dasharray: 198;
  stroke-dashoffset: 198;
  stroke-linecap: round;

  transition:
    stroke-dashoffset 1.4s var(--ease);
}

.ring .pct {
  position: absolute;
  inset: 0;

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

  color: var(--text);

  font-family: var(--font-mono);
  font-size: 13px;
}

/* ===================== PROJETOS ===================== */

#projetos .wrap {
  max-width: 1180px;
}

.section-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;

  margin-bottom: 64px;
}

.section-head-row .eyebrow {
  margin-bottom: 12px;
}

.section-head-row .section-title {
  margin-bottom: 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 24px;
}

.project-card {
  position: relative;

  display: flex;
  flex-direction: column;

  min-height: 440px;
  height: 100%;
  padding: 34px 28px;

  overflow: hidden;

  border: 1px solid var(--line);
  border-radius: 10px;

  background: var(--bg-card);

  transition:
    transform 0.4s var(--ease),
    border-color 0.4s ease;
}

.project-card::before {
  content: "";

  position: absolute;
  inset: 0;

  opacity: 0;

  background:
    radial-gradient(
      circle at 30% 0%,
      rgba(224, 39, 28, 0.16),
      transparent 60%
    );

  transition: opacity 0.4s ease;
}

.project-card:hover {
  border-color: var(--red);
  transform: translateY(-8px);
}

.project-card:hover::before {
  opacity: 1;
}

.project-body {
  position: relative;
  z-index: 1;

  display: flex;
  flex-direction: column;

  width: 100%;
  height: 100%;
}

.project-body h3 {
  margin: 0 0 12px;

  font-size: 18px;
  font-weight: 600;
}

.project-body p {
  margin-bottom: 22px;

  color: var(--text-muted);

  font-size: 13.5px;
}

.project-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;

  margin-top: auto;
  margin-bottom: 22px;
}

.project-techs span {
  padding: 5px 8px;

  border: 1px solid var(--line);
  border-radius: 4px;

  color: var(--text-faint);

  font-family: var(--font-mono);
  font-size: 10px;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;

  width: fit-content;
  padding: 9px 16px;

  border-radius: 5px;

  color: var(--text);
  background: var(--red-dim);

  font-family: var(--font-mono);
  font-size: 12px;
  text-decoration: none;

  transition:
    background 0.3s ease,
    gap 0.3s ease;
}

.link-btn:hover {
  gap: 9px;
  background: var(--red);
}

/* ===================== PROCESSO ===================== */

.timeline {
  position: relative;
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;

  width: 1px;

  background: var(--line);

  transform: translateX(-50%);
}

.timeline-line .fill {
  position: absolute;
  top: 0;
  left: 0;

  width: 100%;
  height: 0;

  background: var(--red);

  transition: height 0.25s linear;
}

.t-row {
  position: relative;

  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;

  min-height: 160px;
}

.t-row .t-item {
  padding: 0 60px;
}

.t-row.left .t-item {
  grid-column: 1;

  text-align: right;
}

.t-row.right .t-item {
  grid-column: 2;
  grid-row: 1;

  text-align: left;
}

.t-num {
  color: var(--red);

  font-family: var(--font-display);
  font-size: 52px;
  line-height: 1;
}

.t-title {
  margin: 6px 0 8px;

  font-size: 24px;
  font-weight: 600;
}

.t-desc {
  max-width: 340px;

  color: var(--text-muted);

  font-size: 14px;
}

.t-row.left .t-desc {
  margin-left: auto;
}

.t-dot {
  position: absolute;
  top: 50%;
  left: 50%;

  width: 11px;
  height: 11px;

  border: 2px solid var(--red-dim);
  border-radius: 50%;

  background: var(--bg);

  transform: translate(-50%, -50%);

  transition:
    border-color 0.4s ease,
    background 0.4s ease,
    box-shadow 0.4s ease;
}

.t-row.in .t-dot {
  border-color: var(--red);

  background: var(--red);

  box-shadow:
    0 0 0 6px rgba(224, 39, 28, 0.15);
}

/* ===================== CONTATO ===================== */

.cta-section {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;

  border-top: 1px solid var(--line-soft);
}

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 400;
  line-height: 1.05;
  text-transform: uppercase;
}

.cta-title .accent {
  color: var(--red);
}

.cta-sub {
  margin: 20px 0 30px;

  color: var(--text-muted);

  font-size: 15px;
}

.pixel-art {
  width: 100%;
  max-width: 380px;

  justify-self: end;

  filter:
    drop-shadow(
      0 20px 50px rgba(224, 39, 28, 0.15)
    );
}

.pixel-art rect {
  shape-rendering: crispEdges;
}

.pixel-float {
  animation: float 4.5s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-14px);
  }
}

/* ===================== FOOTER ===================== */

footer {
  padding: 70px 0 30px;

  border-top: 1px solid var(--line-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;

  margin-bottom: 60px;
}

.footer-logo {
  font-size: 17px;
}

.footer-sub {
  margin-top: 8px;

  color: var(--text-faint);

  font-size: 13px;
}

.footer-col h2 {
  margin-bottom: 16px;

  color: var(--text-faint);

  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-col a {
  display: block;

  margin-bottom: 10px;

  color: var(--text-muted);

  font-size: 14px;
  text-decoration: none;

  transition:
    color 0.25s ease,
    transform 0.25s ease;
}

.footer-col a:hover {
  color: var(--red);
  transform: translateX(3px);
}

.footer-bottom {
  padding-top: 24px;

  border-top: 1px solid var(--line-soft);

  color: var(--text-faint);

  font-family: var(--font-mono);
  font-size: 12px;
  text-align: center;
}

.footer-bottom span {
  color: var(--red);
}

/* ===================== TABLET ===================== */

@media (max-width: 960px) {
  .about-grid {
    grid-template-columns: 320px 1fr;
    gap: 40px;
  }

  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cta-section {
    grid-template-columns: 1fr;

    text-align: center;
  }

  .pixel-art {
    justify-self: center;
    margin-top: 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===================== MENU MOBILE ===================== */

@media (max-width: 800px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;

    z-index: 110;

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

    width: min(80vw, 340px);
    height: 100vh;
    padding: 40px;

    border-left: 1px solid var(--line);

    background: rgba(10, 7, 6, 0.98);
    backdrop-filter: blur(12px);

    transform: translateX(100%);

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

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 16px;
  }

  .nav-toggle {
    position: relative;
    z-index: 120;

    display: flex;
  }
}

/* ===================== CELULAR ===================== */

@media (max-width: 720px) {
  .wrap {
    padding: 0 22px;
  }

  section {
    padding: 85px 0;
  }

  .hero {
    min-height: 100svh;
    padding: 130px 0 70px;
  }

  .glitch-grid {
    right: -55%;

    width: 430px;
    height: 430px;

    opacity: 0.28;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .about-photo {
    width: min(100%, 420px);
    margin: 0 auto;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-head-row {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 46px;
  }

  .projects-grid {
    grid-template-columns: 1fr;

    width: 100%;
    max-width: 460px;
    margin: 0 auto;
  }

  .project-card {
    min-height: 390px;
  }

  .t-row {
    grid-template-columns: 1fr;

    min-height: 175px;
  }

  .t-row .t-item {
    grid-column: 1 !important;
    grid-row: auto !important;

    padding: 0 0 0 42px;

    text-align: left !important;
  }

  .t-row .t-desc {
    margin-left: 0 !important;
  }

  .timeline-line {
    left: 10px;
  }

  .t-dot {
    left: 10px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* ===================== CELULAR PEQUENO ===================== */

@media (max-width: 480px) {
  .wrap {
    padding: 0 18px;
  }

  section {
    padding: 75px 0;
  }

  .hero-name {
    font-size: clamp(58px, 20vw, 82px);
  }

  .badge {
    padding: 8px 13px;
    font-size: 10.5px;
  }

  .hero-desc {
    font-size: 15px;
  }

  .cta-row {
    flex-direction: column;
  }

  .cta-row .btn {
    width: 100%;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .skill-card {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 20px 26px;
  }

  .skill-name {
    margin-bottom: 0;
    font-size: 14px;
  }

  .ring {
    width: 70px;
    height: 70px;
    margin: 0;
  }

  .section-head-row .btn {
    width: 100%;
  }

  .project-card {
    min-height: auto;
    padding: 28px 22px;
  }

  .cta-section {
    text-align: left;
  }

  .cta-section .btn {
    width: 100%;
  }

  .pixel-art {
    max-width: 280px;
  }
}