/* =====================================================
   DINIS SILVA — PORTFÓLIO PROFISSIONAL
   Design com Tema Dark & Light
   - Linha do Tempo Alternada Central (Zig-Zag)
   - Competências em 4 Colunas (1 só linha)
   - Floating Popups ao redor do Avatar (Icons Monocromáticos)
   - Hero com Animação de Texto (Typing Effect) e Sociais
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ─── DESIGN TOKENS ───────────────────────────────── */
:root {
  /* DARK THEME (Padrão) */
  --bg-body:        #07090e;
  --bg-navbar:      rgba(7, 9, 14, 0.88);
  --bg-card:        #0d111a;
  --bg-card-hover:  #121824;
  --bg-card-inner:  #151c2a;
  --bg-pill:        #161d2b;
  --bg-input:       #111622;
  
  --border-color:   rgba(255, 255, 255, 0.08);
  --border-hover:   rgba(56, 189, 248, 0.35);
  --border-subtle:  rgba(255, 255, 255, 0.05);

  --accent-primary: #2563eb;
  --accent-cyan:    #38bdf8;
  --accent-light:   #38bdf8;
  --accent-glow:    rgba(37, 99, 235, 0.45);
  --accent-glow-cyan: rgba(56, 189, 248, 0.25);
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
  --accent-pill-bg: rgba(37, 99, 235, 0.14);
  --accent-pill-text:#60a5fa;

  --text-main:      #f8fafc;
  --text-muted:     #94a3b8;
  --text-subtle:    #64748b;

  --shadow-card:    0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-glow:    0 0 50px rgba(37, 99, 235, 0.35);
  --shadow-btn:     0 4px 20px rgba(37, 99, 235, 0.4);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── LIGHT THEME ─────────────────────────────────── */
[data-theme="light"] {
  --bg-body:        #f4f6fb;
  --bg-navbar:      rgba(244, 246, 251, 0.92);
  --bg-card:        #ffffff;
  --bg-card-hover:  #f8fafc;
  --bg-card-inner:  #f1f5f9;
  --bg-pill:        #e2e8f0;
  --bg-input:       #ffffff;

  --border-color:   rgba(0, 0, 0, 0.09);
  --border-hover:   rgba(37, 99, 235, 0.4);
  --border-subtle:  rgba(0, 0, 0, 0.05);

  --accent-primary: #1d4ed8;
  --accent-cyan:    #0284c7;
  --accent-light:   #0284c7;
  --accent-glow:    rgba(37, 99, 235, 0.2);
  --accent-glow-cyan: rgba(2, 132, 199, 0.15);
  --accent-gradient: linear-gradient(135deg, #0284c7 0%, #1d4ed8 100%);
  --accent-pill-bg: rgba(37, 99, 235, 0.1);
  --accent-pill-text:#1d4ed8;

  --text-main:      #0f172a;
  --text-muted:     #475569;
  --text-subtle:    #64748b;

  --shadow-card:    0 10px 30px -10px rgba(0, 0, 0, 0.08);
  --shadow-glow:    0 0 50px rgba(37, 99, 235, 0.15);
  --shadow-btn:     0 4px 16px rgba(37, 99, 235, 0.25);
}

/* ─── BASE & RESET ────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 85px;
  font-size: 16px;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(56, 189, 248, 0.05) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

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

h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

p { color: var(--text-muted); }
a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
img, svg { display: block; }

/* ─── LAYOUT CONTAINER ────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  position: relative;
  z-index: 1;
}

section {
  padding: 90px 0;
}

@media (max-width: 768px) {
  section { padding: 60px 0; }
}

/* ─── PILLS & SECTION HEADINGS ────────────────────── */
.section-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-pill-text);
  background: var(--accent-pill-bg);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  width: fit-content;
}

.section-center-heading {
  text-align: center;
  margin-bottom: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
}

.section-title-highlight {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-line-decor {
  width: 48px;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: 3px;
  margin-top: 8px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.6;
  margin-top: 10px;
}

/* ─── NAVBAR ──────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 76px;
  z-index: 100;
  background: transparent;
  transition: all 0.3s ease;
}

#navbar.scrolled {
  background: var(--bg-navbar);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  letter-spacing: -0.03em;
}

.nav-logo-dot {
  color: var(--accent-light);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
  padding: 6px 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-main);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

.nav-right-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme Toggle */
.theme-toggle-btn {
  background: var(--bg-pill);
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  border-color: var(--border-hover);
  transform: scale(1.05);
}

.theme-toggle-btn svg { width: 18px; height: 18px; }
.sun-icon { display: none; }
.moon-icon { display: block; }
[data-theme="light"] .sun-icon { display: block; }
[data-theme="light"] .moon-icon { display: none; }

.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  box-shadow: var(--shadow-btn);
  transition: all 0.25s var(--ease-spring);
}

.nav-cta-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.nav-burger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: 0.3s;
}

@media (max-width: 880px) {
  .nav-links { display: none; }

  /* No mobile, o topo fica apenas com o logo + burger.
     O tema e o contacto passam para dentro do menu. */
  .nav-right-actions > .theme-toggle-btn,
  .nav-right-actions > .nav-cta-btn {
    display: none;
  }

  .nav-burger { display: flex; }
}

#mobile-menu {
  position: fixed;
  top: 76px;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 20px 24px 30px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 99;
  transform: translateY(-130%);
  transition: transform 0.3s var(--ease-spring);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

#mobile-menu.open { transform: translateY(0); }
#mobile-menu a {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
}
#mobile-menu a:hover {
  background: var(--bg-card-inner);
  color: var(--text-main);
}

/* Ações adicionais do menu mobile */
.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-menu-actions {
  display: none;
}

@media (max-width: 880px) {
  .mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
  }

  .mobile-theme-btn {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-pill);
    color: var(--text-main);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .mobile-theme-btn:hover {
    background: var(--bg-card-inner);
    border-color: var(--border-hover);
  }

  .mobile-theme-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .mobile-theme-icon svg {
    width: 18px;
    height: 18px;
  }

  .mobile-contact-btn {
    width: 100%;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px !important;
    background: var(--accent-gradient) !important;
    color: #ffffff !important;
    border-radius: var(--radius-sm);
    font-size: 14px !important;
    font-weight: 700 !important;
    box-shadow: var(--shadow-btn);
    transition: all 0.25s var(--ease-spring);
  }

  .mobile-contact-btn:hover {
    background: var(--accent-gradient) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    filter: brightness(1.08);
  }

  .mobile-contact-btn svg {
    flex-shrink: 0;
  }
}

/* ─── BUTTONS ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.12);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.5);
}

.btn-outline {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-outline:hover {
  background: var(--bg-card-inner);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.btn-ghost {
  background: var(--bg-pill);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-ghost:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* ─── HERO SECTION ────────────────────────────────── */
#hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding-top: 130px;
  padding-bottom: 70px;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 45px;
  align-items: center;
}

.hero-content { display: flex; flex-direction: column; }

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
  width: fit-content;
}

.hero-label::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

.hero-title {
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 900;
  line-height: 1.12;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.hero-title .name {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-desc {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-socials {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.hero-socials a svg { width: 17px; height: 17px; flex-shrink: 0; }

.hero-socials a:hover {
  border-color: var(--border-hover);
  color: var(--text-main);
  background: var(--bg-card-inner);
  transform: translateY(-2px);
}

/* Hero Avatar + Floating Badges Wrapper */
.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-avatar-halo-wrapper {
  position: relative;
  width: clamp(270px, 30vw, 360px);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-avatar-glow {
  position: absolute;
  inset: -15px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  filter: blur(24px);
  z-index: 0;
  pointer-events: none;
}

.hero-avatar-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 8px;
  background: var(--bg-card);
  border: 2px solid var(--accent-primary);
  box-shadow: 0 0 35px var(--accent-glow-cyan);
  position: relative;
  z-index: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transition: transform 0.4s var(--ease-spring);
}

.hero-avatar-circle:hover .hero-avatar-img {
  transform: scale(1.05);
}

/* Avatar de mobile: escondido no desktop, só aparece em ecrãs pequenos (ver media query) */
.hero-mobile-avatar {
  display: none;
}

/* ─── FLOATING POPUP BADGES (ICONS MONOCROMÁTICOS) ─── */
.hero-float-badge {
  position: absolute;
  z-index: 10;
  background: rgba(13, 17, 26, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  transition: all 0.3s var(--ease-spring);
  animation: float-badge 4s ease-in-out infinite alternate;
}

[data-theme="light"] .hero-float-badge {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.hero-float-badge:hover {
  transform: scale(1.08) translateY(-4px) !important;
  border-color: var(--border-hover);
  box-shadow: 0 14px 30px rgba(56, 189, 248, 0.25);
}

.float-badge-right {
  top: 15%;
  right: -25px;
  animation-delay: 0s;
}

.float-badge-left {
  top: 55%;
  left: -35px;
  animation-delay: 1.5s;
}

.float-badge-bottom {
  bottom: 2%;
  right: -10px;
  animation-delay: 0.8s;
}

/* Icon Monocromático em Cor Única (Cyan / Accent) */
.float-badge-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-xs);
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
  flex-shrink: 0;
}

.float-badge-icon svg {
  width: 17px;
  height: 17px;
  stroke: var(--accent-light);
}

.float-badge-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.float-badge-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

@keyframes float-badge {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-8px); }
}

@media (max-width: 600px) {
  .float-badge-right { right: -10px; }
  .float-badge-left { left: -15px; }
  .float-badge-bottom { right: 0; }
  .hero-float-badge { padding: 8px 12px; }
}

@media (max-width: 900px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-content { align-items: center; }
  .hero-actions { justify-content: center; }
  .hero-socials { justify-content: center; }
}

/* ─── ABOUT SECTION ───────────────────────────────── */
.about-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-content h2 {
  font-size: clamp(26px, 3.5vw, 38px);
  margin-bottom: 18px;
  line-height: 1.25;
}

.about-content p {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 14px;
}

.about-content .btn { margin-top: 14px; }

.about-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.25s var(--ease-spring);
  box-shadow: var(--shadow-card);
}

.stat-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
}

.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--bg-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
}

.stat-card-num {
  font-size: 28px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.stat-card-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

@media (max-width: 860px) {
  .about-layout { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 480px) {
  .about-stats-grid { grid-template-columns: 1fr; }
}

/* ─── TIMELINE ALTERNADA (ZIG-ZAG CENTRAL) ────────── */
.timeline-zigzag-container {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 0;
}

.timeline-zigzag-container::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--accent-light) 0%, var(--accent-primary) 50%, var(--border-color) 100%);
  z-index: 0;
}

.timeline-zigzag-item {
  position: relative;
  width: 50%;
  padding: 10px 40px;
  margin-bottom: 30px;
}

.timeline-zigzag-item:last-child {
  margin-bottom: 0;
}

.timeline-zigzag-item.left {
  left: 0;
  text-align: right;
}

.timeline-zigzag-item.right {
  left: 50%;
  text-align: left;
}

.timeline-zigzag-dot {
  position: absolute;
  top: 30px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--accent-light);
  box-shadow: 0 0 16px var(--accent-glow);
  z-index: 2;
}

.timeline-zigzag-item.left .timeline-zigzag-dot {
  right: -10px;
}

.timeline-zigzag-item.right .timeline-zigzag-dot {
  left: -10px;
}

.timeline-zigzag-dot.current {
  border-color: #10b981;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.5);
}

.timeline-zigzag-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px 30px;
  transition: all 0.25s var(--ease-spring);
  box-shadow: var(--shadow-card);
  text-align: left;
}

.timeline-zigzag-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
}

.timeline-zigzag-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.timeline-zigzag-org {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.timeline-zigzag-role {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
}

.timeline-zigzag-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 18px;
}

.timeline-zigzag-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline-zigzag-badge {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-pill);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.timeline-zigzag-badge-highlight {
  background: var(--accent-pill-bg);
  color: var(--accent-pill-text);
  border-color: rgba(56, 189, 248, 0.25);
}

@media (max-width: 768px) {
  .timeline-zigzag-container::before {
    left: 20px;
  }
  .timeline-zigzag-item {
    width: 100%;
    padding-left: 50px;
    padding-right: 0;
  }
  .timeline-zigzag-item.left,
  .timeline-zigzag-item.right {
    left: 0;
    text-align: left;
  }
  .timeline-zigzag-item.left .timeline-zigzag-dot,
  .timeline-zigzag-item.right .timeline-zigzag-dot {
    left: 10px;
    right: auto;
  }
}

/* ─── COMPETÊNCIAS: 1 LINHA DE 4 COLUNAS ──────────── */
.skills-four-cols-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.skill-category-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-card);
  transition: all 0.25s var(--ease-spring);
}

.skill-category-box:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
}

.skill-cat-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.skill-cat-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
  font-size: 18px;
}

.skill-cat-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.skill-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card-inner);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.skill-chip:hover {
  background: var(--bg-pill);
  color: var(--text-main);
  border-color: var(--border-hover);
}

@media (max-width: 1080px) {
  .skills-four-cols-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .skills-four-cols-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── FEATURED PROJECTS ───────────────────────────── */
.projects-header-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 36px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  padding: 5px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover { color: var(--text-main); }
.filter-btn.active {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-btn);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 26px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s var(--ease-spring);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  position: relative;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.15);
}

.project-card.hidden { display: none !important; }

.project-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-card-inner);
  overflow: hidden;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-spring);
}

.project-card:hover .project-thumb img { transform: scale(1.06); }

.project-num-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(7, 9, 14, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  z-index: 2;
}

.project-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-cat-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-light);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.project-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
  line-height: 1.3;
}

.project-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
  flex-grow: 1;
}

.project-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.project-tech {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  background: var(--bg-card-inner);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.project-view-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-light);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s ease;
}

.project-card:hover .project-view-link { gap: 8px; }

/* ─── CONTACT SECTION ─────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
}

@media (max-width: 860px) {
  .contact-layout { grid-template-columns: 1fr; }
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
}

.contact-direct-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-card-inner);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.contact-direct-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.contact-direct-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-direct-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  background: var(--bg-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
}

.contact-direct-label {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-subtle);
}

.contact-direct-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.form-input,
.form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* ─── FOOTER ──────────────────────────────────────── */
#footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  background: var(--bg-body);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-brand {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.footer-text {
  font-size: 13px;
  color: var(--text-subtle);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-links a:hover { color: var(--text-main); }

/* ─── MODAL ───────────────────────────────────────── */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  transform: scale(0.96);
  transition: transform 0.25s var(--ease-spring);
}

#modal-overlay.open .modal { transform: scale(1); }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-card-inner);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  z-index: 10;
}

.modal-gallery {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-card-inner);
  border-bottom: 1px solid var(--border-color);
}

.modal-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-content { padding: 28px; }
.modal-title { font-size: 22px; font-weight: 800; margin-bottom: 14px; }
.modal-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  white-space: pre-line;
  margin-bottom: 24px;
}

.modal-techs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 28px; }
.modal-tech {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: var(--bg-card-inner);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.modal-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Toast */
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-card);
  z-index: 300;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s var(--ease-spring);
  pointer-events: none;
}

#toast.show { transform: translateY(0); opacity: 1; }

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ─── COMING SOON BANNER ──────────────────────── */
#coming-soon-banner {
  position: fixed;
  top: 76px;
  left: 0;
  right: 0;
  z-index: 98;
  background: linear-gradient(90deg, rgba(37,99,235,0.18) 0%, rgba(56,189,248,0.14) 100%);
  border-bottom: 1px solid rgba(56, 189, 248, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.35s var(--ease-spring), opacity 0.35s ease;
}

#coming-soon-banner.hidden {
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
}

.cs-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px clamp(20px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
}

.cs-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  flex-shrink: 0;
  animation: cs-pulse 2s ease-in-out infinite;
}

@keyframes cs-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.cs-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.01em;
}

#cs-close {
  position: absolute;
  right: clamp(20px, 4vw, 40px);
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px 6px;
  border-radius: var(--radius-xs);
  transition: color 0.2s ease, background 0.2s ease;
  line-height: 1;
}

#cs-close:hover {
  color: var(--text-main);
  background: var(--bg-pill);
}

/* Push hero below banner when banner is visible */
body.banner-visible #hero {
  padding-top: 172px;
}

/* ─── SKILL LOGO GRID ───────────────────────── */
.skill-logos-wrap {
  gap: 10px !important;
  justify-content: flex-start;
}

.skill-logo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  background: var(--bg-card-inner);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  min-width: 68px;
  cursor: default;
  transition: all 0.2s ease;
}

.skill-logo-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-pill);
  transform: translateY(-3px);
}

.skill-logo-item img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.skill-logo-item span {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
}

/* ─── RESPONSIVE BREAKPOINTS (COMPLETO) ─────── */

/* Tablet grande: 1024px */
@media (max-width: 1024px) {
  .hero-layout {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 30px;
  }
  .hero-title {
    font-size: clamp(32px, 4.5vw, 52px);
  }
}

/* Tablet: 900px */
@media (max-width: 900px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-content { align-items: center; }
  .hero-actions { justify-content: center; }
  .hero-socials { justify-content: center; }
  .hero-desc { text-align: center; margin: 0 auto 30px; }
  .hero-label { margin-left: auto; margin-right: auto; }
  .hero-visual { margin: 0 auto; }
  .about-layout { grid-template-columns: 1fr; gap: 36px; }
  .hero-avatar-halo-wrapper {
    width: clamp(220px, 55vw, 320px);
  }

  /* Troca de avatares: esconde o avatar grande (com badges) e mostra o pequeno acima do texto "Apaixonado..." */
  .hero-visual { display: none; }
  .hero-mobile-avatar {
    display: flex;
    justify-content: center;
    margin: 6px auto 22px;
  }
  .hero-mobile-avatar .hero-avatar-circle {
    width: clamp(120px, 34vw, 180px);
    aspect-ratio: 1 / 1;
    margin: 0 auto;
  }
}

/* Mobile grande: 768px */
@media (max-width: 768px) {
  section { padding: 60px 0; }

  .hero-title { font-size: clamp(30px, 8vw, 46px); }
  .hero-subtitle { font-size: clamp(16px, 4vw, 20px); }

  /* Timeline mobile — tudo alinhado à esquerda com linha lateral */
  .timeline-zigzag-container::before {
    left: 20px;
  }
  .timeline-zigzag-item {
    width: 100%;
    padding-left: 50px;
    padding-right: 0;
  }
  .timeline-zigzag-item.left,
  .timeline-zigzag-item.right {
    left: 0;
    text-align: left;
  }
  .timeline-zigzag-item.left .timeline-zigzag-dot,
  .timeline-zigzag-item.right .timeline-zigzag-dot {
    left: 10px;
    right: auto;
  }

  /* Skills mobile: 2 colunas */
  .skills-four-cols-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Projects grid: 1 coluna */
  .projects-grid {
    grid-template-columns: 1fr;
  }

  /* Footer empilhado */
  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
  }
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  /* Banner responsive */
  .cs-text { font-size: 12px; }
}

/* Mobile pequeno: 600px */
@media (max-width: 600px) {
  .float-badge-right { right: -10px; }
  .float-badge-left { left: -15px; }
  .float-badge-bottom { right: 0; }
  .hero-float-badge { padding: 8px 12px; font-size: 11px; }
  .float-badge-title { font-size: 12px; }
  .float-badge-sub { font-size: 10px; }
  .float-badge-icon { width: 28px; height: 28px; }
  .float-badge-icon svg { width: 14px; height: 14px; }

  .hero-actions { justify-content: center; gap: 8px; }
  .hero-actions .btn {
    padding: 9px 14px;
    font-size: 12.5px;
    gap: 6px;
  }
  .hero-actions .btn svg { width: 13px; height: 13px; }

  .hero-socials { justify-content: center; gap: 8px; }
  .hero-socials a { width: 36px; height: 36px; }
  .hero-socials a svg { width: 15px; height: 15px; }

  .skills-four-cols-grid {
    grid-template-columns: 1fr;
  }

  .section-title { font-size: clamp(24px, 7vw, 34px); }

  .contact-card { padding: 22px 18px; }

  .timeline-zigzag-card { padding: 20px 18px; }
  .timeline-zigzag-role { font-size: 17px; }

  .stat-card { padding: 18px; }
  .stat-card-num { font-size: 22px; }
}

/* Muito pequeno: 420px */
@media (max-width: 420px) {
  .hero-avatar-halo-wrapper {
    width: clamp(180px, 70vw, 260px);
  }
  .hero-float-badge { display: none; }
  .about-stats-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; gap: 6px; padding: 8px; }
  .filter-btn { width: 100%; text-align: center; }
}

/* Print: CV PDF via Ctrl+P */
@media print {
  #navbar, #coming-soon-banner, #mobile-menu,
  .hero-actions, .hero-socials, .hero-float-badge,
  #projects, #contact, #footer, .theme-toggle-btn {
    display: none !important;
  }
  body { background: #fff !important; color: #000 !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}