/* =========================================================
   PEDRO LÚCIO — PORTFÓLIO
   Tokens: cor, tipografia, espaçamento
   ========================================================= */

:root {
  /* --- Cor (dark mode = padrão) --- */
  --bg: #060B14;
  --bg-panel: #0D1A2B;
  --bg-panel-2: #10233A;
  --line: rgba(243, 246, 249, 0.09);
  --line-strong: rgba(243, 246, 249, 0.18);
  --text: #F3F6F9;
  --text-dim: #97A3B4;
  --text-faint: #5C6779;
  --blue: #4A90C2;
  --blue-deep: #2E6FA3;
  --green: #2F6E4E;
  --green-deep: #1F4D3A;

  /* --- Tipografia --- */
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;

  /* --- Espaçamento --- */
  --gutter: clamp(20px, 5vw, 64px);
  --section-gap: clamp(64px, 10vw, 140px);
  --radius: 10px;
  --radius-sm: 6px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg: #F3F6F9;
  --bg-panel: #FFFFFF;
  --bg-panel-2: #EAEFF4;
  --line: rgba(10, 20, 32, 0.10);
  --line-strong: rgba(10, 20, 32, 0.22);
  --text: #0B1520;
  --text-dim: #465268;
  --text-faint: #7C8898;
  --blue: #2E6FA3;
  --blue-deep: #1F5580;
  --green: #1F4D3A;
  --green-deep: #163A2B;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { padding-block: var(--section-gap); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--blue);
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin-bottom: 12px;
}
.section-lead {
  color: var(--text-dim);
  max-width: 56ch;
  font-size: 1.02rem;
  margin-bottom: 44px;
}

/* Focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   NAVBAR
   ========================================================= */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(6, 11, 20, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}
[data-theme="light"] .navbar { background: rgba(243, 246, 249, 0.72); }

.navbar-inner {
  max-width: 1120px;
  margin-inline: auto;
  padding: 16px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand span { color: var(--blue); }

.nav-links {
  display: flex;
  gap: 34px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-size: 0.92rem;
  color: var(--text-dim);
  position: relative;
  padding-bottom: 3px;
  transition: color 0.25s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--blue);
  transition: width 0.3s var(--ease);
}
.nav-links a:hover::after { width: 100%; }

.nav-controls { display: flex; align-items: center; gap: 18px; }

.theme-toggle {
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  cursor: pointer;
  color: var(--text);
  font-size: 1.05rem;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.theme-toggle:hover { border-color: var(--blue); transform: translateY(-1px); }

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 34px; height: 24px;
  position: relative;
  padding: 0;
}
.hamburger span {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 11px; }
.hamburger span:nth-child(3) { top: 22px; }
.hamburger.is-open span:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 65px; left: 0; right: 0;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--line);
  padding: 14px var(--gutter) 26px;
  flex-direction: column;
  gap: 4px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  z-index: 99;
}
.mobile-menu.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mobile-menu a {
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 0.98rem;
}
.mobile-menu a:last-child { border-bottom: none; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 90px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  width: 100%;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 22px;
  display: block;
}

.hero-name {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-role {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: var(--text-dim);
  margin-top: 14px;
  font-weight: 400;
}

.hero-tagline {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--blue);
  margin-top: 22px;
  letter-spacing: 0.02em;
  min-height: 1.4em;
}
.hero-tagline .cursor { color: var(--green); }

.hero-desc {
  margin-top: 22px;
  max-width: 46ch;
  color: var(--text-dim);
  font-size: 1.02rem;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 38px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue-deep), var(--green-deep));
  color: #F3F6F9;
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--blue); transform: translateY(-2px); }

.hero-socials {
  display: flex;
  gap: 18px;
  margin-top: 46px;
}
.hero-socials a {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--text-dim);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.hero-socials a:hover { color: var(--blue); border-color: var(--blue); transform: translateY(-2px); }
.hero-socials svg { width: 17px; height: 17px; }

/* Signature graphic: linha que nasce como circuito e termina como broto */
.hero-signature {
  position: relative;
  height: clamp(320px, 46vw, 560px);
}
.hero-signature svg { width: 100%; height: 100%; }

.grow-path {
  fill: none;
  stroke: url(#growGradient);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: draw 2.6s var(--ease) forwards 0.3s;
}
.grow-node {
  fill: var(--bg);
  stroke: var(--blue);
  stroke-width: 2;
  opacity: 0;
  animation: nodeIn 0.5s var(--ease) forwards;
}
.grow-leaf {
  fill: var(--green);
  opacity: 0;
  transform-origin: center;
  animation: leafIn 0.6s var(--ease) forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes nodeIn { to { opacity: 1; } }
@keyframes leafIn { to { opacity: 0.85; transform: scale(1); } }

/* Mini versão do grow-path usada como divisor entre seções */
.divider {
  display: flex;
  justify-content: center;
  margin-block: calc(var(--section-gap) * -0.5) 0;
  opacity: 0.5;
}
.divider svg { width: 120px; height: 28px; }
.divider path {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2;
  stroke-linecap: round;
}
.divider path.leaf-part { stroke: var(--green); }

/* =========================================================
   SOBRE
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
  align-items: center;
}
.about-photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 1 / 1;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }

.about-text p {
  color: var(--text-dim);
  font-size: 1.04rem;
  margin: 0 0 18px;
}
.about-text p:last-of-type { margin-bottom: 0; }

.about-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.badge {
  border: 1px solid var(--line);
  background: var(--bg-panel);
  padding: 9px 16px;
  border-radius: 100px;
  font-size: 0.86rem;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* =========================================================
   HABILIDADES
   ========================================================= */
.skills-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.skills-col h3 {
  font-size: 1.05rem;
  color: var(--text-dim);
  font-weight: 500;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  border: 1px solid var(--line);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background: var(--bg-panel);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.chip:hover { border-color: var(--blue); transform: translateY(-2px); }

/* =========================================================
   CERTIFICADOS
   ========================================================= */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.cert-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-panel);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.cert-card:hover { transform: translateY(-6px); border-color: var(--blue); }
.cert-thumb { aspect-ratio: 3 / 2; overflow: hidden; }
.cert-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.cert-card:hover .cert-thumb img { transform: scale(1.05); }
.cert-body { padding: 18px 20px 22px; }
.cert-name { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.cert-meta { font-size: 0.85rem; color: var(--text-faint); margin-bottom: 16px; }
.cert-link {
  font-size: 0.85rem;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cert-link:hover { color: var(--green); }

.cert-hidden { display: none; }
.cert-hidden.is-shown { display: block; }

.cert-more-wrap { text-align: center; margin-top: 34px; }

/* =========================================================
   TRAJETÓRIA
   ========================================================= */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(var(--blue), var(--green));
  opacity: 0.4;
}
.timeline-item {
  position: relative;
  padding-bottom: 34px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -32px; top: 4px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--blue);
}
.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}
.timeline-title { font-size: 1.08rem; margin-top: 4px; font-weight: 600; }

/* =========================================================
   ÁREAS DE INTERESSE
   ========================================================= */
.interest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.interest-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  background: var(--bg-panel);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.interest-card:hover { transform: translateY(-5px); border-color: var(--green); }
.interest-icon {
  width: 34px; height: 34px;
  margin-bottom: 16px;
  color: var(--blue);
}
.interest-card h3 { font-size: 1.02rem; margin-bottom: 8px; }
.interest-card p { font-size: 0.9rem; color: var(--text-dim); margin: 0; }

/* =========================================================
   DIFERENCIAL
   ========================================================= */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.pillar {
  padding: 44px 32px;
  border-right: 1px solid var(--line);
  position: relative;
}
.pillar:last-child { border-right: none; }
.pillar-index {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  display: block;
  margin-bottom: 18px;
}
.pillar h3 {
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}
.pillar.p-tech h3 { color: var(--blue); }
.pillar.p-inova h3 { color: var(--text); }
.pillar.p-agro h3 { color: var(--green); }
.pillar p { color: var(--text-dim); font-size: 0.92rem; margin: 0; }

/* =========================================================
   CONTATO
   ========================================================= */
.contact-inner { text-align: center; }
.contact-inner .section-lead { margin-inline: auto; }
.contact-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}
.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 26px;
  background: var(--bg-panel);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
  justify-content: flex-start;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.contact-card:hover { transform: translateY(-4px); border-color: var(--blue); }
.contact-card svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--blue); }
.contact-card span { font-size: 0.92rem; }

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  border-top: 1px solid var(--line);
  padding-block: 40px;
  text-align: center;
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 8px;
}
.footer-rights { color: var(--text-faint); font-size: 0.85rem; }
.footer-phrase {
  color: var(--text-faint);
  font-size: 0.85rem;
  font-style: italic;
  margin-top: 6px;
}

/* =========================================================
   RESPONSIVO
   ========================================================= */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .mobile-menu { display: flex; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-signature { order: -1; height: 280px; }

  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 280px; margin-inline: auto; }

  .skills-cols { grid-template-columns: 1fr; gap: 30px; }
  .cert-grid { grid-template-columns: 1fr; }
  .interest-grid { grid-template-columns: 1fr 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .pillar { border-right: none; border-bottom: 1px solid var(--line); }
  .pillar:last-child { border-bottom: none; }
}

@media (max-width: 560px) {
  .interest-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .contact-card { width: 100%; }
}
