/* =============================================
   1. CSS CUSTOM PROPERTIES
   ============================================= */

:root {
  --bg-base:       #0d0f14;
  --bg-surface:    #161b26;
  --bg-elevated:   #1e2535;
  --bg-terminal:   #0a0c10;

  --text-primary:  #e8eaf0;
  --text-secondary:#8892a4;
  --text-muted:    #4a5568;
  --text-code:     #00ff88;

  --accent:        #00d4ff;
  --accent-alt:    #7c3aed;
  --accent-glow:   rgba(0, 212, 255, 0.15);
  --code-glow:     rgba(0, 255, 136, 0.12);

  --border:        rgba(255, 255, 255, 0.08);
  --border-hover:  rgba(255, 255, 255, 0.18);

  --nav-height:    64px;
  --container-max: 1100px;
  --radius:        10px;
  --transition:    0.25s ease;
}

[data-theme="light"] {
  --bg-base:       #f4f6fb;
  --bg-surface:    #ffffff;
  --bg-elevated:   #eef1f8;
  --bg-terminal:   #1a1f2e;

  --text-primary:  #0d0f14;
  --text-secondary:#4a5568;
  --text-muted:    #94a3b8;
  --text-code:     #00aa5e;

  --accent:        #0099bb;
  --accent-alt:    #6d28d9;
  --accent-glow:   rgba(0, 153, 187, 0.15);
  --code-glow:     rgba(0, 170, 94, 0.1);

  --border:        rgba(0, 0, 0, 0.08);
  --border-hover:  rgba(0, 0, 0, 0.18);
}

/* =============================================
   2. RESET & BASE
   ============================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: none;       /* Firefox */
  -ms-overflow-style: none;    /* IE / Edge */
}

html::-webkit-scrollbar {
  display: none;               /* Chrome / Safari */
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  transition: background-color var(--transition), color var(--transition);
}

img, svg, video { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
input, textarea { font-family: inherit; }

/* =============================================
   3. TYPOGRAPHY
   ============================================= */

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.15;
  font-weight: 700;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 3rem;
}

.accent { color: var(--accent); }

/* =============================================
   4. LAYOUT
   ============================================= */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section {
  padding: 5rem 0;
  position: relative;
}

.section--hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* =============================================
   5. NAVIGATION
   ============================================= */

.nav-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(13, 15, 20, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), box-shadow var(--transition);
}

[data-theme="light"] .nav-header {
  background: rgba(244, 246, 251, 0.75);
}

.nav-header.scrolled {
  background: rgba(13, 15, 20, 0.95);
  box-shadow: 0 1px 24px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .nav-header.scrolled {
  background: rgba(244, 246, 251, 0.97);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: opacity var(--transition);
}

.nav-logo:hover { opacity: 0.75; }

.nav-links {
  display: none;
  gap: 2rem;
}

.nav-links a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 8px;
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition);
}

.theme-toggle:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-radius: 6px;
  transition: background var(--transition);
}

.hamburger:hover { background: var(--bg-elevated); }

.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-links--open {
  display: flex !important;
  flex-direction: column;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 1.25rem 2rem;
  gap: 1.25rem;
}

/* =============================================
   6. BUTTONS
   ============================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition);
  cursor: pointer;
  border: 1.5px solid transparent;
}

.btn--primary {
  background: var(--accent);
  color: #0d0f14;
  border-color: var(--accent);
}

.btn--primary:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn--ghost {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--outline {
  color: var(--accent);
  border-color: var(--accent);
}

.btn--outline:hover {
  background: var(--accent);
  color: #0d0f14;
}

/* =============================================
   7. HERO SECTION
   ============================================= */

.section--hero {
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 32px 32px;
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 65% 40%,
      rgba(0, 212, 255, 0.07) 0%,
      rgba(124, 58, 237, 0.05) 50%,
      transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: var(--nav-height);
}

.hero-eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--text-code);
  margin-bottom: 1rem;
}

.hero-eyebrow::after {
  content: '█';
  margin-left: 2px;
  animation: blink 1.1s step-end infinite;
}

.hero-name {
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.hero-sub {
  max-width: min(500px, 100%);
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* =============================================
   8. SITE INTRO (landing screen)
   ============================================= */

#site-intro {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-base);
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  transition: opacity 0.5s ease;
}

#site-intro::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 50% 40%,
    rgba(0, 212, 255, 0.07) 0%,
    rgba(124, 58, 237, 0.05) 50%,
    transparent 70%);
}

#site-intro.hiding {
  opacity: 0;
  pointer-events: none;
}

.site-intro__inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.intro-logo {
  height: 64px;
  width: auto;
  margin-bottom: 1.5rem;
  /* Garante visibilidade em dark e light mode */
  filter: brightness(0) invert(1);
}

[data-theme="light"] .intro-logo {
  filter: brightness(0);
}

.intro-terminal-line {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.intro-prompt { color: var(--text-code); }
.intro-cmd    { color: var(--text-primary); }

.intro-name {
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.intro-tagline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1rem, 3vw, 1.4rem);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.intro-since {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.intro-stack {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.intro-stack-item {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 0.22rem 0.65rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.intro-stack-sep {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.intro-enter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  padding: 0.75rem 2rem;
  background: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.intro-enter:hover {
  background: var(--accent);
  color: #0d0f14;
  box-shadow: 0 0 24px var(--accent-glow);
}

/* =============================================
   8b. SITE LOCK OVERLAY (single puzzle gate)
   ============================================= */

/* Full-screen overlay */
#site-lock {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-base);
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  transition: opacity 0.5s ease;
}

#site-lock::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 50% 40%,
    rgba(0, 212, 255, 0.07) 0%,
    rgba(124, 58, 237, 0.05) 50%,
    transparent 70%);
}

#site-lock.unlocking {
  opacity: 0;
  pointer-events: none;
}

/* Puzzle card */
.site-lock__box {
  position: relative;
  z-index: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.25rem;
  text-align: center;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.45);
}

.site-lock__chrome {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.site-lock__title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.site-lock__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.site-lock__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Terminal dots — shared by avatar terminal + puzzle chrome */
.terminal-dots { display: flex; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot--red    { background: #ff5f57; }
.dot--yellow { background: #febc2e; }
.dot--green  { background: #28c840; }

/* 3×3 puzzle grid */
.slide-board {
  display: inline-grid;
  grid-template-columns: repeat(3, 74px);
  grid-template-rows: repeat(3, 74px);
  gap: 4px;
  margin-bottom: 1.1rem;
}

.slide-tile {
  width: 74px; height: 74px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem; font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
  transition: background var(--transition), border-color var(--transition), transform 0.1s;
}

.slide-tile:hover:not(.slide-empty) {
  background: var(--bg-base);
  border-color: var(--border-hover);
  transform: scale(1.05);
}

.slide-tile.slide-empty {
  background: rgba(255,255,255,0.015);
  border-color: rgba(255,255,255,0.04);
  cursor: default;
}

.slide-tile.slide-ok {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.slide-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.slide-reset {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.22rem 0.55rem;
  background: none;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}

.slide-reset:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.slide-footer-btns {
  display: flex;
  gap: 0.4rem;
}

.slide-auto {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.22rem 0.55rem;
  background: none;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}

.slide-auto:hover:not(:disabled) {
  color: var(--accent);
  border-color: var(--accent);
}

.slide-auto:disabled,
.slide-reset:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

@keyframes tileMoved {
  0%   { background: rgba(0, 212, 255, 0.25); border-color: var(--accent); }
  100% { background: var(--bg-elevated);       border-color: var(--border); }
}

.slide-tile--moved {
  animation: tileMoved 0.3s ease forwards;
}

/* =============================================
   9. SECTION CONTENT (after unlock)
   ============================================= */

.section-content {
  opacity: 0;
}

@keyframes unlockReveal {
  from {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: none;
  }
}

.section-content.revealed {
  animation: unlockReveal 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.section-content.instant {
  opacity: 1;
  animation: none;
}

/* =============================================
   10. ABOUT SECTION
   ============================================= */

.about-grid {
  display: grid;
  gap: 3rem;
}

/* ── Avatar terminal widget ── */
.about-avatar-wrap {
  display: flex;
  justify-content: center;
}

.avatar-terminal {
  background: var(--bg-terminal);
  border: 1px solid var(--text-code);
  border-radius: var(--radius);
  width: 100%;
  max-width: 280px;
  margin-inline: auto;
  box-shadow:
    0 0 0 1px rgba(0, 255, 136, 0.05),
    0 4px 32px rgba(0, 255, 136, 0.07);
  overflow: hidden;
  flex-shrink: 0;
}

.avatar-terminal__chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.55rem 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(0, 255, 136, 0.1);
}

.avatar-terminal__body {
  padding: 1rem 1.1rem 1.1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.9;
}

.t-ps1  { color: var(--text-code); }
.t-cmd  { color: var(--text-primary); }
.t-out  { color: var(--text-secondary); padding-left: 1ch; }
.t-cursor { color: var(--text-code); }

.blink-cursor {
  animation: blink 1.1s step-end infinite;
}

.about-lead {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.about-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.skill-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  padding: 0.3rem 0.8rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 99px;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.skill-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.about-additional {
  margin-top: 1.5rem;
}

.about-additional__title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.about-additional__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
}

.about-additional__list li {
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding-left: 0.85rem;
  position: relative;
}

.about-additional__list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* =============================================
   11. EXPERIENCE TIMELINE
   ============================================= */

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.4rem;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom,
    var(--accent),
    var(--accent-alt) 60%,
    transparent);
  border-radius: 99px;
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

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

.timeline-marker {
  position: absolute;
  left: -1.7rem;
  top: 0.4rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-base);
  box-shadow: 0 0 0 3px var(--bg-base), 0 0 12px var(--accent-glow);
}

.timeline-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.timeline-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.timeline-date {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.timeline-role {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.timeline-company {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
}

.timeline-desc {
  color: var(--text-secondary);
  font-size: 0.93rem;
  margin-bottom: 1rem;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* =============================================
   12. TECH BADGES
   ============================================= */

.badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0.2em 0.6em;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge--js      { background: rgba(247,223,30,0.15);  color: #f7df1e; }
.badge--ts      { background: rgba(59,130,246,0.15);  color: #60a5fa; }
.badge--php     { background: rgba(155,159,232,0.15); color: #9b9fe8; }
.badge--py      { background: rgba(78,167,212,0.15);  color: #4ea7d4; }
.badge--sql     { background: rgba(0,160,229,0.15);   color: #00a0e5; }
.badge--node    { background: rgba(104,160,99,0.15);  color: #68a063; }
.badge--html    { background: rgba(249,115,22,0.15);  color: #f97316; }
.badge--css     { background: rgba(99,102,241,0.15);  color: #818cf8; }
.badge--git     { background: rgba(240,80,50,0.15);   color: #f05032; }
.badge--private { background: rgba(100,100,120,0.15); color: #94a3b8; }

/* =============================================
   13. PROJECTS GRID
   ============================================= */

.projects-note {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  padding: 0.6rem 1rem;
  border-left: 2px solid var(--border);
}

.projects-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px var(--accent-glow);
  border-color: var(--accent);
}

.project-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.project-card__icon {
  font-size: 1.5rem;
  color: var(--accent);
}

.project-card__name {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.project-card__desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  flex: 1;
  margin-bottom: 1.25rem;
  line-height: 1.65;
}

.project-card__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

/* =============================================
   14. CONTACT SECTION
   ============================================= */

.contact-intro {
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 480px;
}

.contact-grid {
  display: grid;
  gap: 3rem;
}

.contact-social {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all var(--transition);
}

.social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

.social-link--copy {
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 0.95rem;
  position: relative;
}

.discord-copied,
.email-copied {
  position: absolute;
  right: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-code);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.discord-copied.visible,
.email-copied.visible {
  opacity: 1;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}

.form-group input,
.form-group textarea {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}

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

.form-status {
  font-size: 0.88rem;
  border-radius: 6px;
  padding: 0.5rem 0;
  min-height: 1.4em;
}

.form-status--ok  { color: #28c840; }
.form-status--err { color: #ff6b6b; }

/* =============================================
   15. FOOTER
   ============================================= */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-logo {
  height: 28px;
  width: auto;
  opacity: 0.45;
  filter: brightness(0) invert(1);
  margin-right: 0.75rem;
}

[data-theme="light"] .footer-logo {
  filter: brightness(0);
}

.footer-copy {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* =============================================
   16. SCROLL PROGRESS BAR
   ============================================= */

#scrollProgress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-alt));
  transition: width 0.1s linear;
  pointer-events: none;
}

/* =============================================
   16b. SECTION DOTS
   ============================================= */

.section-dots {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: none;
  flex-direction: column;
  gap: 0.9rem;
}

.section-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--text-muted);
  transition: background var(--transition), border-color var(--transition),
              transform var(--transition), box-shadow var(--transition);
}

.section-dot:hover {
  border-color: var(--accent);
  transform: scale(1.3);
}

.section-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.2);
  box-shadow: 0 0 8px var(--accent-glow);
}

@media (min-width: 1024px) {
  .section-dots { display: flex; }
}

/* =============================================
   16c. BACK TO TOP
   ============================================= */

.back-to-top {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 99;
  width: 44px; height: 44px;
  background: var(--accent);
  color: #0d0f14;
  border-radius: 50%;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.back-to-top:hover { filter: brightness(1.15); }

/* =============================================
   17. ANIMATIONS
   ============================================= */

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: none; }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: none; }
}

[data-animate]        { opacity: 0; }
[data-animate="left"] { opacity: 0; }
[data-animate="right"]{ opacity: 0; }

[data-animate].is-visible {
  animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--anim-delay, 0ms);
}

[data-animate="left"].is-visible {
  animation: fadeInLeft 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--anim-delay, 0ms);
}

[data-animate="right"].is-visible {
  animation: fadeInRight 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--anim-delay, 0ms);
}

/* =============================================
   18. MEDIA QUERIES
   ============================================= */

@media (min-width: 640px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .hamburger { display: none; }

  .about-grid {
    grid-template-columns: 280px 1fr;
    align-items: start;
    gap: 3.5rem;
  }

  .about-avatar-wrap { justify-content: flex-start; }

  .contact-grid {
    grid-template-columns: 1fr 1.5fr;
    align-items: start;
  }
}

@media (min-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(3, 1fr); }
  .container { padding-inline: 2rem; }
}

@media (min-width: 1280px) {
  .container { padding-inline: 1.25rem; }
}

/* Mobile fixes (320px – 430px) */
@media (max-width: 430px) {
  /* Hero: texto não transborda */
  .hero-sub { max-width: 100%; }

  /* Hero: botões empilhados */
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }

  /* Social links: mais compactos */
  .social-link {
    padding: 0.6rem 0.75rem;
    gap: 0.75rem;
    font-size: 0.88rem;
  }

  /* Formulário: previne zoom automático no iOS */
  .form-group input,
  .form-group textarea { font-size: 1rem; }

  /* Back-to-top: mais próximo dos cantos */
  .back-to-top { bottom: 1rem; right: 1rem; }

  /* Intro stack: wrap em mobile com 5 itens */
  .intro-stack {
    flex-wrap: wrap;
    gap: 0.35rem 0.6rem;
    justify-content: center;
  }

  /* Skills: pills mais compactos */
  .skill-pill {
    font-size: 0.72rem;
    padding: 0.25rem 0.65rem;
  }

  /* Conhecimentos adicionais: lista em coluna única */
  .about-additional__list {
    flex-direction: column;
    gap: 0.4rem;
  }
}

/* Puzzle: tiles mais pequenos em ecrãs muito estreitos */
@media (max-width: 400px) {
  .slide-board {
    grid-template-columns: repeat(3, 60px);
    grid-template-rows: repeat(3, 60px);
    gap: 3px;
  }
  .slide-tile { width: 60px; height: 60px; font-size: 1.2rem; }
  .site-lock__box { padding: 1rem 1rem 0.875rem; }
}

/* =============================================
   19. REDUCED MOTION
   ============================================= */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .hero-eyebrow::after { animation: none; }
  [data-animate] { opacity: 1 !important; }
}
