/* ============================================================
   MARCIUS® — Portfólio
   Tema: preto puro, JetBrains Mono, maiúsculas, acento branco.
   Mude os tokens abaixo para reestilizar o site inteiro.
   ============================================================ */
:root {
  --bg: #000000;
  --fg: #ffffff;
  --line: rgba(255, 255, 255, .18);
  --hover: rgba(255, 255, 255, .05);
  --accent: #ffffff;          /* troque p/ uma cor (#6a83ff etc.) se quiser destaque */
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;
  --gutter: clamp(20px, 5vw, 80px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--mono);
  background: var(--bg);
  color: var(--fg);
  text-transform: uppercase;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
.tile img, .media img { width: 100%; height: 100%; object-fit: cover; }
h1, h2, p, ul { margin: 0; }
ul { list-style: none; padding: 0; }

.sec { padding-inline: var(--gutter); }
.lbl { font-size: 11px; letter-spacing: .14em; line-height: 1.5; }
.reg { color: var(--accent); }
.sep { opacity: .9; }

.navlink { transition: opacity .2s ease; }
.navlink:hover { text-decoration: underline; }

/* ---------- HEADER ---------- */
.header {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  justify-content: space-between;
  align-items: center;
  padding-top: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.brand { font-size: 13px; font-weight: 800; letter-spacing: .12em; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 2px; font-size: 11px; letter-spacing: .14em; }

/* ---------- HERO ---------- */
.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 40px;
  padding-bottom: 44px;
  background: var(--bg);
}
.hero__top, .hero__bottom { display: flex; justify-content: space-between; align-items: flex-end; }
.hero__name {
  font-weight: 800;
  font-size: clamp(56px, 19vw, 260px);
  line-height: .86;
  letter-spacing: -.03em;
  margin-left: -.04em; /* compensa o respiro lateral da "M" p/ alinhar com o subtítulo */
}
.hero__name .reg { font-size: .26em; vertical-align: super; }
.hero__role { margin-top: 22px; }
.scroll-cue { display: inline-flex; align-items: center; gap: 10px; }

/* ---------- GLITCH do nome: falha horizontal (P&B) ---------- */
.glitch { position: relative; animation: glitch-shake 4.2s steps(1) infinite; }
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  color: var(--fg);
  background: var(--bg);
  pointer-events: none;
}
.glitch::before { animation: glitch-top 4.2s steps(1) infinite; }
.glitch::after  { animation: glitch-bot 4.2s steps(1) infinite; }

@keyframes glitch-shake {
  0%, 82%, 100% { transform: translateX(0); }
  84% { transform: translateX(3px); }
  88% { transform: translateX(-4px); }
  92% { transform: translateX(2px); }
}
@keyframes glitch-top {
  0%, 82%, 100% { opacity: 0; transform: translateX(0); clip-path: inset(0 0 100% 0); }
  83% { opacity: 1; transform: translateX(-20px); clip-path: inset(2% 0 82% 0); }
  86% { opacity: 1; transform: translateX(16px);  clip-path: inset(26% 0 56% 0); }
  89% { opacity: 1; transform: translateX(-26px); clip-path: inset(50% 0 34% 0); }
  92% { opacity: 1; transform: translateX(22px);  clip-path: inset(74% 0 12% 0); }
  94% { opacity: 0; }
}
@keyframes glitch-bot {
  0%, 82%, 100% { opacity: 0; transform: translateX(0); clip-path: inset(0 0 100% 0); }
  84% { opacity: 1; transform: translateX(18px);  clip-path: inset(14% 0 70% 0); }
  87% { opacity: 1; transform: translateX(-22px); clip-path: inset(40% 0 46% 0); }
  90% { opacity: 1; transform: translateX(24px);  clip-path: inset(64% 0 22% 0); }
  93% { opacity: 1; transform: translateX(-16px); clip-path: inset(88% 0 2% 0); }
  94% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .glitch { animation: none; }
  .glitch::before, .glitch::after { display: none; animation: none; }
}

/* ---------- MARQUEE ---------- */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
  overflow: hidden;
  background: var(--bg);
}
.marquee__track {
  display: inline-flex;
  white-space: nowrap;
  width: max-content;
  font-size: clamp(18px, 2.4vw, 30px);
  font-weight: 500;
  letter-spacing: .02em;
  animation: marq 34s linear infinite;
}
.marquee__track span { padding: 0 18px; }
@keyframes marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- ABORDAGEM ---------- */
.approach {
  padding-top: 90px;
  padding-bottom: 90px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
}
.approach__label { padding-top: 5px; }
.approach__text {
  font-size: clamp(14px, 1.5vw, 18px);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: .02em;
  max-width: 720px;
}

/* ---------- SECTION HEADS ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
#vibecoding.section-head { padding-bottom: 28px; }
.tools-intro { margin: 0 0 40px; max-width: 760px; font-size: clamp(14px, 1.5vw, 18px); font-weight: 400; line-height: 1.6; letter-spacing: .02em; }
.section-head--inline { margin-bottom: 40px; }
.h-big { font-size: clamp(28px, 4vw, 56px); font-weight: 800; letter-spacing: -.02em; }

/* ---------- PROJETOS ---------- */
.projects { display: block; }
.proj {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 24px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 30px var(--gutter);
  transition: background .25s ease;
}
.proj--last { border-bottom: 1px solid var(--line); }
.proj:hover { background: var(--hover); }
.proj:hover .proj__name { text-decoration: underline; }
.proj__name { font-size: clamp(24px, 3.2vw, 44px); font-weight: 700; letter-spacing: -.01em; }
.proj__meta { white-space: nowrap; }

/* ---------- GALERIA ---------- */
.gallery-wrap { padding-top: 100px; padding-bottom: 100px; }
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.tile {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
  transition: border-color .25s ease;
}
.tile:hover { border-color: rgba(255, 255, 255, .55); }
.tile img { transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.tile:hover img { transform: scale(1.05); }
.tile__title {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  margin: 0;
  font-size: 12px;
  letter-spacing: .14em;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, 0) 55%);
  opacity: 0;
  transition: opacity .25s ease;
}
.tile:hover .tile__title { opacity: 1; }

/* ---------- SOBRE ---------- */
.about-wrap { border-top: 1px solid var(--line); background: var(--bg); }
.about {
  padding-top: 100px;
  padding-bottom: 100px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 40px;
}
.about__intro { grid-column: span 5; }
.about__title { margin-top: 18px; font-size: clamp(26px, 3vw, 40px); font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.about__text { margin-top: 22px; max-width: 420px; font-size: 14px; font-weight: 400; line-height: 1.8; }
.about__cols { grid-column: span 7; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
.col__head { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.col__list { margin-top: 16px; font-size: 13px; line-height: 2.2; }

/* ---------- CONTATO ---------- */
.contact { padding-top: 100px; padding-bottom: 40px; text-align: center; }
.contact__label { margin-bottom: 24px; }
.contact__big { font-size: clamp(40px, 9vw, 120px); font-weight: 800; line-height: .92; letter-spacing: -.03em; }
.contact__cta { margin-top: 44px; }
.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  font-size: 13px;
  letter-spacing: .08em;
  border: 1px solid rgba(255, 255, 255, .35);
  transition: background .2s ease, color .2s ease;
}
.cta:hover { background: var(--fg); color: var(--bg); }
.contact__social { margin-top: 24px; display: flex; gap: 4px; justify-content: center; }
.footer-bar {
  margin-top: 80px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
}
.footer-bar__brand { font-weight: 700; }

/* ---------- RESPONSIVO ---------- */
@media (max-width: 760px) {
  .hide-sm { display: none !important; }
  .hero { min-height: 84vh; }
  .approach { grid-template-columns: 1fr; gap: 20px; padding-top: 60px; padding-bottom: 60px; }
  .gallery-wrap { padding-top: 60px; padding-bottom: 60px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .about { grid-template-columns: 1fr; gap: 40px; padding-top: 60px; padding-bottom: 60px; }
  .about__intro, .about__cols { grid-column: auto; }
  .proj { grid-template-columns: 40px 1fr auto; gap: 14px; padding: 24px var(--gutter); }
  .contact { padding-top: 70px; }
  .footer-bar { margin-top: 48px; }
}

@media (max-width: 440px) {
  .gallery { grid-template-columns: 1fr; }
  .nav { font-size: 10px; }
}

/* ---------- MOVIMENTO REDUZIDO ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .glitch::before, .glitch::after { display: none; }
  .marquee__track { animation: none; }
}

/* ============================================================
   PÁGINA DE PROJETO (projeto.html)
   ============================================================ */
.back { display: inline-flex; gap: 10px; align-items: center; }
.project-title { padding-top: 64px; padding-bottom: 44px; }
.project-title__h { margin-top: 22px; font-size: clamp(44px, 8vw, 120px); font-weight: 800; letter-spacing: -.03em; line-height: .92; }
.project-meta-wrap { padding-bottom: 52px; }
.project-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
}
.meta-val { margin-top: 8px; }
.media {
  position: relative;
  margin: 0;
  border: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.media--hero { aspect-ratio: 16 / 9; }
.media__cap { position: absolute; left: 18px; top: 16px; margin: 0; }
.project-media { padding-bottom: 24px; }
.project-overview {
  padding-top: 56px;
  padding-bottom: 56px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.overview__p { margin-top: 16px; line-height: 1.9; }
.project-media-2 {
  padding-bottom: 64px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.project-next { display: block; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.project-next__inner { display: flex; justify-content: space-between; align-items: center; padding-top: 44px; padding-bottom: 44px; }
.project-next__name { font-size: clamp(26px, 4vw, 52px); font-weight: 800; letter-spacing: -.02em; }
.project-footer { padding-top: 26px; padding-bottom: 26px; }

@media (max-width: 760px) {
  .project-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .project-overview { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; padding-bottom: 40px; }
  .project-media-2 { grid-template-columns: 1fr; }
}

/* ============================================================
   INTERAÇÕES (HUD, reveal, micro-interações) — monocromático
   ============================================================ */

/* Intro de boot (só com JS ativo; some sozinha) */
.boot { display: none; }
.js .boot {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 9999;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(20px, 5vw, 80px);
  background: #000;
  color: #fff;
}
.boot.is-done { animation: bootOut .6s cubic-bezier(.7, 0, .3, 1) forwards; }
@keyframes bootOut { to { transform: translateY(-101%); } }
.boot__top { display: flex; justify-content: space-between; }
.boot__count { font-size: clamp(90px, 24vw, 340px); font-weight: 800; line-height: .9; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.boot__status { margin-top: 10px; }
.boot__bar { height: 1px; margin-top: 22px; background: rgba(255, 255, 255, .2); }
.boot__bar > span { display: block; height: 100%; width: 0; background: #fff; }
@media (prefers-reduced-motion: reduce) { .js .boot { display: none; } }

/* Relógio no HUD (largura fixa para não "tremer") */
#clock { font-variant-numeric: tabular-nums; }

/* Reveal ao rolar */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
}

/* Marquee pausa ao passar o mouse */
.marquee:hover .marquee__track { animation-play-state: paused; }

/* Micro-interação nas linhas de projeto */
.proj__meta { transition: transform .25s ease; }
.proj:hover .proj__meta { transform: translateX(6px); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .proj__meta, .proj:hover .proj__meta { transition: none; transform: none; }
}
