/* ==========================================================
   Marcelo de Viveiros — Portfólio
   Paleta: azul-noite + laranja âmbar (cores da logo)
   ========================================================== */
:root {
  --bg: #0d1020;
  --bg-2: #12162b;
  --card: #171c36;
  --card-2: #1d2342;
  --line: rgba(244, 241, 234, 0.09);
  --text: #f4f1ea;
  --muted: #a7abc3;
  --amber: #ffb347;
  --orange: #ff6a3d;
  --grad: linear-gradient(135deg, var(--amber), var(--orange));
  --radius: 18px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --font-head: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }

.container { width: min(1160px, 100% - 32px); margin-inline: auto; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .9em 1.6em;
  border-radius: 999px;
  background: var(--grad);
  color: #1a0f08;
  font-weight: 600;
  font-family: var(--font-head);
  border: 0; cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 10px 30px -10px rgba(255, 106, 61, .6);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -10px rgba(255, 106, 61, .8); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn-ghost:hover { border-color: var(--amber); box-shadow: none; }
.btn-sm { padding: .55em 1.2em; font-size: .9rem; }
.btn-full { width: 100%; }

/* ---------- Navegação ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 16, 32, .72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-head); font-size: 1.02rem; }
.brand-text small { font-size: .68rem; letter-spacing: .2em; color: var(--amber); text-transform: uppercase; font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.btn) { color: var(--muted); font-weight: 500; font-size: .95rem; transition: color .2s; }
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: .3s; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 80px 0 40px; overflow: hidden; }
.hero-glow {
  position: absolute; inset: -20% -10% auto auto; width: 720px; height: 720px;
  background: radial-gradient(circle, rgba(255, 106, 61, .22), transparent 60%);
  filter: blur(20px); pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 179, 71, .08); border: 1px solid rgba(255, 179, 71, .25);
  color: var(--amber); font-size: .85rem; font-weight: 500; margin-bottom: 22px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgba(61, 220, 132, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); font-weight: 800; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 580px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin: 30px 0 40px; }
.hero-stats { list-style: none; padding: 0; margin: 0; display: flex; gap: 36px; flex-wrap: wrap; }
.hero-stats strong { display: block; font-family: var(--font-head); font-size: 2rem; }
.hero-stats span { color: var(--muted); font-size: .85rem; }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 420px; }
.photo-ring {
  width: 280px; height: 280px; border-radius: 50%; padding: 6px;
  background: conic-gradient(from 180deg, var(--amber), var(--orange), #6c5ce7, var(--amber));
  box-shadow: var(--shadow);
  animation: spin-slow 14s linear infinite;
}
.photo-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 6px solid var(--bg); animation: spin-slow 14s linear infinite reverse; }
@keyframes spin-slow { to { transform: rotate(360deg); } }
.float-card {
  position: absolute; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 14px;
  background: rgba(23, 28, 54, .88); backdrop-filter: blur(10px);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  animation: float 6s ease-in-out infinite;
}
.float-card strong { display: block; font-family: var(--font-head); font-size: .9rem; }
.float-card small { color: var(--muted); font-size: .75rem; }
.fc-icon, .float-card code { font-size: 1.3rem; }
.float-card code { color: var(--amber); font-weight: 700; font-family: Consolas, monospace; font-size: 1rem; }
.fc-1 { top: 8%; left: 0; }
.fc-2 { bottom: 10%; left: 6%; animation-delay: -2s; }
.fc-3 { top: 42%; right: 0; animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-10px); } }

.tech-strip {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px;
  margin-top: 60px; padding-top: 30px; border-top: 1px solid var(--line);
  color: var(--muted); font-family: var(--font-head); font-weight: 600; font-size: .9rem;
}
.tech-strip span { opacity: .75; }

/* ---------- Seções ---------- */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-2); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.section-head p { color: var(--muted); }
.kicker { display: inline-block; color: var(--amber); font-family: var(--font-head); font-weight: 600; font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 12px; }

/* ---------- Serviços ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service {
  padding: 30px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
  transition: transform .25s, border-color .25s;
}
.service:hover { transform: translateY(-4px); border-color: rgba(255, 179, 71, .35); }
.service h3 { font-size: 1.2rem; }
.service p { color: var(--muted); margin: 0; font-size: .95rem; }
.s-icon {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 20px;
  background: rgba(255, 179, 71, .1);
}
.s-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--amber); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Projetos ---------- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 40px; }
.filter {
  padding: .55em 1.2em; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--muted); border: 1px solid var(--line);
  font: 500 .92rem var(--font-body); transition: .2s;
}
.filter:hover { color: var(--text); border-color: rgba(255, 179, 71, .4); }
.filter.active { background: var(--grad); color: #1a0f08; border-color: transparent; font-weight: 600; }

.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project {
  display: flex; flex-direction: column;
  border-radius: var(--radius); overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  transition: transform .25s, border-color .25s, opacity .3s;
}
.project:hover { transform: translateY(-5px); border-color: rgba(255, 179, 71, .35); }
.project.hide { display: none; }
.project.featured { grid-column: span 2; }
.project.featured .p-cover { aspect-ratio: 2.1 / 1; }

.p-cover {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  display: grid; place-items: center;
  background: var(--c1, #222);
}
.p-cover img.cover-photo { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.project:hover .p-cover img.cover-photo { transform: scale(1.05); }
.p-cover img.cover-logo { width: 55%; max-height: 60%; object-fit: contain; filter: drop-shadow(0 10px 20px rgba(0,0,0,.3)); }
.p-cover .cover-art { width: 100%; height: 100%; }
.p-badge {
  position: absolute; top: 14px; left: 14px;
  padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600;
  background: rgba(13, 16, 32, .75); backdrop-filter: blur(6px); color: var(--text);
  border: 1px solid rgba(255,255,255,.12);
}
.p-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.p-body h3 { font-size: 1.15rem; margin-bottom: .35em; }
.p-type { color: var(--amber); font-size: .8rem; font-weight: 600; margin-bottom: 10px; display: block; }
.p-body p { color: var(--muted); font-size: .93rem; }
.p-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.p-tags span { font-size: .72rem; padding: 3px 9px; border-radius: 6px; background: rgba(255,255,255,.05); color: #c9cce0; border: 1px solid var(--line); }
.p-links { display: flex; gap: 16px; margin-top: 16px; }
.p-links a { font-size: .88rem; font-weight: 600; color: var(--amber); }
.p-links a:hover { text-decoration: underline; }

/* ---------- Processo ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.step { position: relative; padding: 30px 26px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.step-n { font-family: var(--font-head); font-weight: 800; font-size: 2.4rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; display: block; margin-bottom: 10px; }
.step h3 { font-size: 1.15rem; }
.step p { color: var(--muted); margin: 0; font-size: .94rem; }

/* ---------- Sobre ---------- */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: start; }
.about h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.about p { color: var(--muted); }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.checks li { padding-left: 32px; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; background: var(--grad); color: #1a0f08; }
.timeline { position: relative; padding-left: 8px; }
.tl-item { display: grid; grid-template-columns: 92px 1fr; gap: 18px; padding: 0 0 28px; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 100px; top: 8px; bottom: -8px; width: 2px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-item::after { content: ""; position: absolute; left: 95px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(255, 106, 61, .2); }
.tl-year { font-family: var(--font-head); font-weight: 700; color: var(--amber); font-size: .9rem; }
.tl-item > div { padding-left: 18px; }
.tl-item strong { font-family: var(--font-head); display: block; margin-bottom: 4px; }
.tl-item p { margin: 0; font-size: .92rem; }

/* ---------- Formação ---------- */
.education { margin-top: 64px; }
.edu-title { font-size: 1.4rem; margin-bottom: 22px; }
.edu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.edu {
  padding: 24px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
  transition: transform .25s, border-color .25s;
}
.edu:hover { transform: translateY(-4px); border-color: rgba(255, 179, 71, .35); }
.edu-ic { font-size: 1.6rem; display: block; margin-bottom: 12px; }
.edu-status { display: inline-block; font-size: .72rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(61, 220, 132, .1); color: #6fe3a4; margin-bottom: 12px; }
.edu-status.andamento { background: rgba(255, 179, 71, .12); color: var(--amber); }
.edu h4 { font-family: var(--font-head); font-size: 1.05rem; line-height: 1.3; margin: 0 0 6px; }
.edu p { color: var(--muted); font-size: .88rem; margin: 0; }

/* ---------- Contato ---------- */
.cta-box {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  padding: 56px; border-radius: 28px;
  background: radial-gradient(circle at 0% 0%, rgba(255, 106, 61, .18), transparent 50%), var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.cta-copy h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.cta-copy p { color: var(--muted); }
.contact-links { display: grid; gap: 12px; margin-top: 26px; }
.c-link { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); transition: .2s; word-break: break-all; }
.c-link:hover { border-color: var(--amber); transform: translateX(4px); }
.c-ic { font-size: 1.3rem; }
.c-link small { display: block; color: var(--muted); font-size: .75rem; }
.cta-form { display: grid; gap: 16px; align-content: start; }
.cta-form label { display: grid; gap: 6px; font-size: .88rem; font-weight: 500; color: #d6d8e8; }
.cta-form input, .cta-form select, .cta-form textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  background: var(--bg); color: var(--text); border: 1px solid var(--line);
  font: inherit; font-size: .95rem; transition: border-color .2s;
}
.cta-form textarea { resize: vertical; }
.cta-form input:focus, .cta-form select:focus, .cta-form textarea:focus { outline: none; border-color: var(--amber); }
.form-note { color: var(--muted); text-align: center; font-size: .78rem; }

/* ---------- Rodapé ---------- */
.footer { border-top: 1px solid var(--line); padding: 30px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-logo { height: 48px; width: auto; }
.footer p { margin: 0; color: var(--muted); font-size: .88rem; }
.to-top { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); transition: .2s; }
.to-top:hover { border-color: var(--amber); color: var(--amber); }

/* ---------- Animação de entrada ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .photo-ring, .photo-ring img, .float-card, .dot { animation: none; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1000px) {
  .services, .projects { grid-template-columns: repeat(2, 1fr); }
  .steps, .edu-grid { grid-template-columns: repeat(2, 1fr); }
  .about, .cta-box { grid-template-columns: 1fr; }
  .cta-box { padding: 40px; }
}
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0;
    background: rgba(13, 16, 32, .97); border-bottom: 1px solid var(--line);
    padding: 10px 16px 20px; transform: translateY(-120%); transition: transform .35s; z-index: -1;
  }
  .nav-links.open { transform: none; }
  .nav-links a:not(.btn) { padding: 14px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 16px; width: 100%; }
  .nav.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .hero { padding-top: 48px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; min-height: 300px; }
  .photo-ring { width: 210px; height: 210px; }
  .fc-1 { left: 0; top: 4%; }
  .fc-3 { right: 0; top: auto; bottom: 18%; }
  .fc-2 { display: none; }
}
@media (max-width: 640px) {
  .section { padding: 70px 0; }
  .services, .projects, .steps, .edu-grid { grid-template-columns: 1fr; }
  .project.featured { grid-column: auto; }
  .project.featured .p-cover { aspect-ratio: 16 / 10; }
  .cta-box { padding: 28px 20px; border-radius: 22px; }
  .hero-stats { gap: 22px; }
  .hero-stats strong { font-size: 1.6rem; }
  .brand-text small { display: none; }
  .float-card { padding: 9px 12px; }
  .float-card small { display: none; }
  .tl-item { grid-template-columns: 72px 1fr; }
  .tl-item::before { left: 80px; }
  .tl-item::after { left: 75px; }
}
