/* =========================================================
   Portfólio — Matheus Madureira
   Paleta e variáveis de tema (claro/escuro)
   ========================================================= */
:root {
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;

  --accent: #4f8cff;
  --accent-2: #7c5cff;

  --radius: 14px;
  --shadow: 0 20px 40px -20px rgba(0,0,0,.35);
}

html[data-theme="dark"] {
  --bg: #0b0e14;
  --bg-alt: #10141d;
  --surface: #161b26;
  --surface-hover: #1c2230;
  --text: #eef1f7;
  --text-muted: #9aa4b8;
  --border: #232a3a;
}

html[data-theme="light"] {
  --bg: #f7f8fb;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-hover: #f0f3fa;
  --text: #171a21;
  --text-muted: #565f74;
  --border: #e4e8f1;
  --shadow: 0 20px 40px -24px rgba(20,25,45,.18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  transition: background .3s ease, color .3s ease;
}

h1, h2, h3, h4, .navbar-brand, .btn {
  font-family: var(--font-heading);
}

a { color: var(--accent); text-decoration: none; }

.container { max-width: 1140px; }

::selection { background: var(--accent); color: #fff; }

/* ================= NAVBAR ================= */
#mainNav {
  background: rgba(11,14,20,.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  padding: 1rem 0;
  transition: background .3s ease, border-color .3s ease, padding .3s ease;
}
html[data-theme="light"] #mainNav { background: rgba(255,255,255,.75); }
#mainNav.scrolled {
  padding: .6rem 0;
  border-bottom-color: var(--border);
  background: var(--bg);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text) !important;
}
.navbar-brand span { color: var(--accent); }

.nav-link {
  color: var(--text-muted) !important;
  font-weight: 500;
  margin: 0 .6rem;
  position: relative;
}
.nav-link:hover, .nav-link.active { color: var(--text) !important; }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.navbar-toggler { border: none; box-shadow: none !important; }
html[data-theme="light"] .navbar-toggler-icon {
  filter: invert(1);
}

.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: .75rem;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.theme-toggle:hover { background: var(--surface-hover); transform: rotate(15deg); }

/* ================= HERO ================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 6rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(79,140,255,.18), transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(124,92,255,.16), transparent 45%),
    var(--bg);
}

.eyebrow, .section-eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: .75rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: .5rem;
}

.hero-role {
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.hero-text {
  color: var(--text-muted);
  max-width: 42rem;
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.hero-pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.hero-pills span {
  font-size: .78rem;
  font-weight: 600;
  padding: .35rem .8rem;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  box-shadow: 0 12px 24px -10px rgba(79,140,255,.55);
}
.btn-primary:hover { filter: brightness(1.08); }

.btn-outline-light {
  border-color: var(--border);
  color: var(--text);
}
.btn-outline-light:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--border);
}

.hero-socials { display: flex; gap: .75rem; }
.hero-socials a {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text);
  transition: background .2s ease, transform .2s ease, color .2s ease;
}
.hero-socials a:hover { background: var(--accent); color: #fff; transform: translateY(-3px); border-color: var(--accent); }

.hero-photo-stage {
  position: relative;
  width: min(440px, 90%);
  margin: 0 auto;
  aspect-ratio: 4 / 5;
  /* shared visual center for the glow and the rotating dashed square */
  --stage-cx: 50%;
  --stage-cy: 71.6%;
  /* consistent rounded-corner radius for both squares */
  --frame-radius: clamp(16px, 4vw, 28px);
}

/* soft ambient glow behind everything */
.hero-photo-glow {
  position: absolute;
  left: var(--stage-cx); top: var(--stage-cy);
  transform: translate(-50%, -50%);
  width: 98%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,140,255,.55), rgba(124,92,255,.3) 60%, transparent 75%);
  filter: blur(32px);
  z-index: 1;
}

/* wrapper only centers the dashed square — it never animates, so centering can't drift */
.hero-photo-ring-wrap {
  position: absolute;
  left: var(--stage-cx); top: var(--stage-cy);
  transform: translate(-50%, -50%);
  width: 98%;
  aspect-ratio: 1;
  z-index: 2;
}
/* the dashed square itself only ever rotates in place around its own center */
.hero-photo-ring {
  position: absolute;
  inset: 0;
  border-radius: var(--frame-radius);
  border: 2px dashed var(--border);
  transform-origin: center center;
  animation: spin 67s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* solid square with the page's accent gradient — sits behind the portrait,
   its base pinned to the exact same line where the PNG itself ends, so the
   photo's natural bottom edge reads as an intentional part of the frame */
.hero-photo-disc {
  position: absolute;
  left: 50%; bottom: -6%;
  transform: translateX(-50%);
  width: 86%;
  aspect-ratio: 1;
  border-radius: var(--frame-radius);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 30px 70px -20px rgba(79,140,255,.55);
  z-index: 3;
}

/* portrait — single layer, never clipped by the square. Anchored with the
   same bottom offset as the square above, so both share one baseline;
   the head and shoulders simply render past the square's top edge. */
.hero-photo-img {
  position: absolute;
  left: 50%; bottom: -6%;
  transform: translateX(-50%);
  width: 108%;
  max-width: none;
  z-index: 4;
  filter: drop-shadow(0 30px 30px rgba(0,0,0,.4));
  pointer-events: none;
  user-select: none;
}

.scroll-down {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 1.4rem;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ================= SECTIONS ================= */
.section { padding: 6.5rem 0; }
.section-alt { background: var(--bg-alt); }

.section-title {
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 2.5rem;
}

/* ================= SOBRE ================= */
.about-facts { list-style: none; padding: 0; margin: 0; }
.about-facts li {
  display: flex; align-items: center; gap: .75rem;
  padding: .9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: .75rem;
  color: var(--text-muted);
}
.about-facts li i { color: var(--accent); font-size: 1.1rem; }
.about-facts li em { color: var(--text); font-style: normal; font-weight: 600; }

.cert-badges { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.cert-badges span {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .8rem; font-weight: 600;
  padding: .5rem .9rem;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.cert-badges i { color: var(--accent); }

/* ================= ÁREAS DE ATUAÇÃO ================= */
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  height: 100%;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.feature-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: var(--shadow); }
.feature-card i { font-size: 1.8rem; color: var(--accent); margin-bottom: 1rem; display: block; }
.feature-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .6rem; }
.feature-card p { color: var(--text-muted); font-size: .92rem; margin: 0; }

/* ================= SKILLS ================= */
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1rem;
  text-align: center;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  height: 100%;
}
.skill-card i { font-size: 2rem; color: var(--accent); display: block; margin-bottom: .75rem; }
.skill-card span { font-weight: 600; }
.skill-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: var(--shadow); }

.skills-subtitle {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  height: 100%;
}
.skill-group h4 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.skill-group .tags { display: flex; flex-wrap: wrap; gap: .5rem; }

.pill {
  font-size: .78rem;
  padding: .35rem .7rem;
  border-radius: 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ================= PROJETOS ================= */
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.project-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }

.project-thumb {
  height: 180px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  color: #fff;
}
.project-thumb-1 { background: linear-gradient(135deg, #4f8cff, #6aa8ff); }
.project-thumb-2 { background: linear-gradient(135deg, #7c5cff, #9a7dff); }
.project-thumb-3 { background: linear-gradient(135deg, #22b8a6, #4fd7c4); }

.project-body { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.project-body h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: .5rem; }
.project-body p { color: var(--text-muted); font-size: .95rem; flex-grow: 1; }

.project-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: .75rem 0 1rem; }
.project-tags span {
  font-size: .75rem;
  padding: .3rem .6rem;
  border-radius: 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.project-links { display: flex; gap: 1.25rem; }
.project-links a { font-weight: 600; font-size: .9rem; color: var(--text); }
.project-links a:hover { color: var(--accent); }

.badge-internal {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; font-weight: 600;
  color: var(--text-muted);
  margin-top: .25rem;
}
.badge-internal i { color: var(--accent); }

/* ================= EXPERIÊNCIA ================= */
.timeline-heading {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: .6rem;
}
.timeline-heading i { color: var(--accent); }

.timeline {
  list-style: none;
  padding: 0 0 0 1.5rem;
  margin: 0;
  border-left: 2px solid var(--border);
}
.timeline li { position: relative; padding-bottom: 2rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -1.6rem; top: .3rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg-alt);
}
.timeline-date {
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.timeline h4 { font-size: 1.05rem; font-weight: 700; margin: .35rem 0 .25rem; }
.timeline p { color: var(--text-muted); margin: 0; font-size: .95rem; }

/* ================= METODOLOGIA ================= */
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  height: 100%;
  text-align: center;
  transition: transform .2s ease, border-color .2s ease;
}
.step-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .9rem;
  margin-bottom: .75rem;
}
.step-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.step-card p { color: var(--text-muted); font-size: .85rem; margin: 0; }

/* ================= QUOTE ================= */
.quote-section { padding: 3rem 0; }
.quote-block {
  max-width: 46rem;
  margin: 0 auto;
  text-align: center;
  padding: 2.5rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(79,140,255,.1), rgba(124,92,255,.08));
  border: 1px solid var(--border);
}
.quote-block i { font-size: 2rem; color: var(--accent); }
.quote-block p {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.5;
  margin: 1rem 0;
}
.quote-block cite {
  font-style: normal;
  color: var(--text-muted);
  font-size: .9rem;
}

/* ================= CONTATO ================= */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li {
  display: flex; align-items: center; gap: .75rem;
  padding: .5rem 0;
}
.contact-list li i { color: var(--accent); font-size: 1.1rem; width: 1.4rem; }
.contact-list a { color: var(--text); font-weight: 500; }
.contact-list a:hover { color: var(--accent); }

.contact-form .form-control {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: .7rem 1rem;
}
.contact-form .form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 .2rem rgba(79,140,255,.2);
  background: var(--surface);
  color: var(--text);
}
.contact-form .form-label { color: var(--text-muted); font-weight: 500; margin-bottom: .4rem; }
.form-feedback { margin-left: 1rem; font-size: .9rem; color: var(--accent); font-weight: 600; }

/* ================= FOOTER ================= */
.site-footer {
  padding: 2rem 0;
  text-align: center;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  font-size: .9rem;
}

/* ================= SCROLL REVEAL ================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 991.98px) {
  #navMenu {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: 1rem;
  }
  .nav-item { text-align: center; }
  .theme-toggle { margin: .75rem auto 0; }
}
