/* ==========================================================================
   Ramon C C Oliveira — Currículo
   Paleta oficial da Conexxio (preto/branco/cinza + azul #2777FC, sem
   gradientes) com referência de contenção e escala tipográfica da Apple:
   um só tipo de letra, muito espaço em branco, superfícies planas.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@400;500;600;700;800&display=swap');

:root {
  --font-body: "Urbanist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Urbanist", system-ui, -apple-system, sans-serif;

  --accent: #2777fc;

  --bg: #ffffff;
  --panel: #ffffff;
  --panel-soft: #f2f7ff;
  --text: #000000;
  --muted: #5f5f5f;
  --border: #e4e4e4;
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.18);
  --shadow-sm: 0 12px 28px -16px rgba(0, 0, 0, 0.14);

  --container: 1160px;
  --topbar-h: 72px;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #000000;
  --panel: #000000;
  --panel-soft: #0a0a0c;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --border: rgba(255, 255, 255, .14);
  --accent: #4c8bff;
  --shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 14px 30px -16px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --panel: #000000;
    --panel-soft: #0a0a0c;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --border: rgba(255, 255, 255, .14);
    --accent: #4c8bff;
    --shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.6);
    --shadow-sm: 0 14px 30px -16px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s ease, color .4s ease;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 .5em;
  color: var(--text);
  letter-spacing: -0.02em;
}
p { line-height: 1.7; color: var(--muted); margin: 0 0 1em; }
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}
.accent-word { color: var(--accent); }
.link-accent { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.link-accent:hover { text-decoration-color: var(--accent); }
.rule { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* reveal-on-scroll (content is visible by default; JS opts into the hidden→visible transition) */
[data-reveal] { transition: opacity .6s ease, transform .6s ease; }
body.reveal-ready [data-reveal] { opacity: 0; transform: translateY(16px); }
body.reveal-ready [data-reveal].is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  body.reveal-ready [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .9rem 1.7rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: .95rem;
  border: 1px solid transparent;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #ffffff;
}
.btn-primary:hover { background: var(--text); color: var(--bg); }
.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--text); }
.btn-sm { padding: .55rem 1.1rem; font-size: .82rem; border-radius: 8px; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
}
.logo em { font-style: normal; color: var(--accent); }

.topbar-nav { display: flex; align-items: center; gap: 2.2rem; margin: 0 auto; }
.topbar-nav a {
  position: relative;
  font-size: .87rem;
  font-weight: 500;
  color: var(--muted);
  transition: color .2s ease;
  padding-bottom: 4px;
}
.topbar-nav a:hover { color: var(--text); }
.topbar-nav a.active { color: var(--text); font-weight: 700; }

.topbar-actions { display: flex; align-items: center; gap: .6rem; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  transition: border-color .2s ease, color .2s ease;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle .bi-sun-fill { display: none; }
:root[data-theme="dark"] .theme-toggle .bi-moon-stars-fill { display: none; }
:root[data-theme="dark"] .theme-toggle .bi-sun-fill { display: inline-block; }

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

@media (max-width: 900px) {
  .topbar-nav { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Mobile menu ---------- */
.mobile-menu {
  position: fixed;
  inset: var(--topbar-h) 0 0 0;
  background: var(--bg);
  transform: translateX(100%);
  transition: transform .35s ease;
  padding: 2rem 2rem;
  overflow-y: auto;
  z-index: 90;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu ul { display: flex; flex-direction: column; }
.mobile-menu li { border-bottom: 1px solid var(--border); }
.mobile-menu a {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  padding: 1.15rem .25rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
}
.mobile-menu a .idx { font-family: var(--font-body); font-weight: 500; font-size: .78rem; color: var(--accent); }
.mobile-menu a.active { color: var(--accent); }

/* ---------- Chapter shell ---------- */
.chapter { padding: 7rem 0; }
.chapter-resume, .chapter-contact, .chapter-differentials { background: var(--panel-soft); }

.chapter-head { max-width: 760px; margin-bottom: 3.5rem; }
.chapter-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.chapter-head.center .chapter-lead { margin-left: auto; margin-right: auto; }
.eyebrow-chapter {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--muted);
  margin-bottom: 1rem;
}
.chapter-title { font-weight: 800; font-size: clamp(2rem, 3.6vw, 2.75rem); }
.chapter-lead { font-size: 1.05rem; max-width: 60ch; }

/* ---------- Hero ---------- */
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3.5rem; align-items: center; }
.hero-headline { font-weight: 800; font-size: clamp(2.5rem, 4.8vw, 4rem); line-height: 1.02; margin-bottom: 1.5rem; }
.hero-lead { font-size: 1.1rem; max-width: 52ch; margin-bottom: 2.25rem; color: var(--muted); }
.cta-buttons { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.5rem; }
.stat-strip { display: flex; gap: clamp(1.5rem, 5vw, 3rem); flex-wrap: wrap; padding-top: 1.75rem; border-top: 1px solid var(--border); }
.stat-strip .n { font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; }
.stat-strip .l { font-size: .78rem; color: var(--muted); margin-top: .2rem; }

.hero-media { border-radius: 20px; overflow: hidden; background: var(--panel-soft); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- About (Hoje) ---------- */
.about-intro { display: grid; grid-template-columns: .5fr 1fr; gap: 2.75rem; align-items: center; margin-bottom: 2.75rem; }
.about-lead { font-size: 1.05rem; margin: 0; }
.duality-photo { border-radius: 20px; overflow: hidden; }
.duality-photo img { width: 100%; height: auto; }

.role-title { font-size: 1.5rem; margin-bottom: .9rem; }
.weave { font-size: 1.02rem; }
.tag-pill {
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent);
  margin-right: .4rem;
}
.tag-pill::after { content: "—"; margin-left: .4rem; color: var(--border); }

.personal-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem 1.5rem;
  margin: 2.75rem 0;
  padding: 1.75rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.info-item { display: flex; flex-direction: column; gap: .3rem; }
.info-item .label { font-size: .74rem; color: var(--muted); }
.info-item .value { font-weight: 700; font-size: .95rem; }
.signature { display: flex; align-items: center; gap: 1.25rem; }
.signature-image img { width: 110px; opacity: .85; }
:root:not([data-theme="dark"]) .signature-image img { filter: none; }
:root[data-theme="dark"] .signature-image img { filter: invert(1) brightness(1.7); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .signature-image img { filter: invert(1) brightness(1.7); }
}
.signature-info h4 { font-weight: 700; margin-bottom: .15rem; font-size: 1rem; }
.signature-info p { margin: 0; font-size: .84rem; }

/* ---------- Competências (diferenciais) ---------- */
.diff-grid { display: grid; grid-template-columns: 1fr .9fr 1fr; gap: 2.5rem; align-items: center; margin-bottom: 4rem; }
.diff-col { display: flex; flex-direction: column; gap: 2.25rem; }
.diff-item { display: flex; gap: 1rem; }
.diff-icon {
  flex: none;
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--bg);
  color: var(--accent);
  font-size: 1.1rem;
}
.diff-item h3 { font-family: var(--font-body); font-weight: 700; font-size: 1rem; margin-bottom: .35rem; }
.diff-item p { font-size: .87rem; margin: 0; }

.diff-media { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 3 / 4; }
.diff-media img { width: 100%; height: 100%; object-fit: cover; }
.diff-media-cta {
  position: absolute;
  left: 1rem; right: 1rem; bottom: 1rem;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  background: #ffffff;
  color: #000000;
  font-weight: 700;
  font-size: .86rem;
  padding: .8rem 1rem;
  border-radius: 10px;
}

.diff-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-bottom: 3rem; }
.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  text-align: center;
}
.stat-card-icon {
  width: 44px; height: 44px;
  margin: 0 auto .9rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--panel-soft);
  color: var(--accent);
  font-size: 1.15rem;
}
.stat-card .n { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; }
.stat-card .l { font-size: .8rem; color: var(--muted); margin-top: .25rem; }

.diff-cta {
  background: var(--text);
  color: var(--bg);
  border-radius: 20px;
  padding: 2.25rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.diff-cta h3 { color: var(--bg); margin-bottom: .35rem; font-size: 1.4rem; }
.diff-cta p { color: color-mix(in srgb, var(--bg) 65%, var(--text)); margin: 0; }
.diff-cta .btn-primary { flex: none; }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-bottom: 4rem; }
.skill-card {
  background: var(--panel-soft);
  border-radius: 18px;
  padding: 1.7rem 1.5rem;
  transition: background-color .25s ease;
}
:root[data-theme="dark"] .skill-card { border: 1px solid var(--border); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .skill-card { border: 1px solid var(--border); } }
.skill-card .icon {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--bg);
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
.skill-card h3 { font-family: var(--font-body); font-weight: 700; font-size: 1rem; margin-bottom: .4rem; }
.skill-card p { font-size: .87rem; margin: 0; }

/* ---------- Resume / Timeline ---------- */
.resume-block { margin-bottom: 4rem; }
.resume-block:last-child { margin-bottom: 0; }
.resume-block > h3.block-title { font-weight: 800; font-size: 1.4rem; }
.resume-block > .lead { margin-bottom: 2.5rem; }

.timeline { position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 6px; bottom: 6px;
  width: 1px;
  background: var(--border);
}
.timeline::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 6px; bottom: 6px;
  width: 1px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
}
body.reveal-ready .timeline::after { transition: transform 1.3s ease; }
body.reveal-ready .timeline:has(.timeline-item.is-visible)::after { transform: scaleY(1); }
.timeline-item { position: relative; padding-left: 42px; padding-bottom: 2.5rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: 4px; top: 4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
body.reveal-ready .timeline-dot { transform: scale(0); transition: transform .45s cubic-bezier(.34, 1.56, .64, 1) .1s; }
body.reveal-ready .timeline-item.is-visible .timeline-dot { transform: scale(1); }
.timeline-left { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; margin-bottom: .35rem; }
.timeline-left .company { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; margin: 0; }
.timeline-left .period {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
}
.timeline-right .position { font-family: var(--font-body); font-weight: 700; font-size: .98rem; margin: .5rem 0 .35rem; color: var(--text); }
.timeline-right .description { margin-bottom: .75rem; }
.timeline-right ul { display: flex; flex-direction: column; gap: .55rem; margin-bottom: 1rem; }
.timeline-right .btn-sm { margin-top: .25rem; }
.timeline-right ul li { position: relative; padding-left: 1.35rem; font-size: .92rem; color: var(--muted); line-height: 1.65; }
.timeline-right ul li::before {
  content: "";
  position: absolute;
  left: 0; top: .58em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--muted);
}

/* ---------- Certifications (Prova) ---------- */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.service-card {
  background: var(--panel-soft);
  border-radius: 18px;
  padding: 1.85rem;
  display: flex;
  gap: 1rem;
  transition: background-color .25s ease;
}
:root[data-theme="dark"] .service-card { border: 1px solid var(--border); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .service-card { border: 1px solid var(--border); } }
.service-card .icon {
  flex: none;
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--bg);
  color: var(--accent);
  font-size: 1.1rem;
}
.service-card h3 { font-family: var(--font-body); font-weight: 700; font-size: 1rem; margin-bottom: .5rem; }
.service-card p { font-size: .87rem; margin: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 3rem; align-items: start; }
.contact-info-list { margin-top: 2rem; display: flex; flex-direction: column; gap: 1.1rem; }
.contact-info-list .info-row { display: flex; align-items: center; gap: 1rem; font-size: 1rem; }
.contact-info-list .info-row i { color: var(--accent); font-size: 1.1rem; }
.contact-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.25rem;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form-grid .full { grid-column: 1 / -1; }
.field {
  width: 100%;
  padding: .85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text);
  font-family: inherit;
  font-size: .95rem;
  transition: border-color .2s ease;
}
.field:focus { outline: none; border-color: var(--accent); }
textarea.field { resize: vertical; min-height: 120px; }
.form-status { font-size: .88rem; min-height: 1.4em; text-align: center; margin-bottom: .75rem; }
.form-status.loading { color: var(--muted); }
.form-status.error { color: #e5484d; }
.form-status.success { color: #1a9e6b; }
.contact-card .btn-primary { width: 100%; justify-content: center; margin-top: .25rem; }

/* ---------- Footer ---------- */
.footer { padding: 2.5rem 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; text-align: center; }
.footer-inner p { margin: 0; font-size: .84rem; color: var(--muted); }
.social-links { display: flex; gap: .75rem; }
.social-links a {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  transition: border-color .2s ease, color .2s ease;
}
.social-links a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Floating buttons ---------- */
.floating-buttons { position: fixed; right: 1.5rem; bottom: 1.5rem; display: flex; flex-direction: column; gap: .75rem; z-index: 90; }
.floating-buttons a, .floating-buttons button {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  font-size: 1.2rem;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, border-color .2s ease, color .2s ease;
}
.floating-buttons a.download { opacity: 1; transform: none; pointer-events: auto; background: var(--accent); color: #fff; border: none; }
.floating-buttons #scroll-top.visible { opacity: 1; transform: none; pointer-events: auto; }
.floating-buttons a:hover, .floating-buttons button:hover { border-color: var(--accent); color: var(--accent); }
.floating-buttons a.download:hover { color: #fff; border-color: transparent; background: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 420px; margin: 0 auto; }
  .about-intro { grid-template-columns: 1fr; }
  .duality-photo { max-width: 320px; margin: 0 auto; }
  .personal-info { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .diff-grid { grid-template-columns: 1fr; }
  .diff-media { order: -1; max-width: 360px; margin: 0 auto 1rem; }
  .diff-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .chapter { padding: 4.5rem 0; }
  .cta-buttons { flex-direction: column; }
  .cta-buttons .btn { width: 100%; justify-content: center; }
  .skills-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .personal-info { grid-template-columns: 1fr; }
  .timeline-left { flex-direction: column; align-items: flex-start; gap: .35rem; }
  .floating-buttons { right: 1rem; bottom: 1rem; }
  .container { padding: 0 20px; }
  .contact-card { padding: 1.75rem 1.5rem; }
  .diff-stats { grid-template-columns: 1fr; }
  .diff-cta { flex-direction: column; align-items: flex-start; text-align: left; padding: 1.75rem; }
  .diff-cta .btn-primary { width: 100%; justify-content: center; }
}
