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

:root {
  color-scheme: dark;
  --bg: #07090e;
  --bg-soft: #0c0f1a;
  --surface: rgba(255, 255, 255, 0.02);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --text: #f8fafc;
  --muted: #94a3b8;
  --quiet: #475569;
  --line: rgba(255, 255, 255, 0.05);
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.15);
  --accent-light: rgba(59, 130, 246, 0.08);
  --secondary: #10b981;
  --tertiary: #f59e0b;
  --radius: 12px;
  --max: 1200px;
  --reading: 760px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --card-bg: rgba(15, 23, 42, 0.6);
  --card-border: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f8f9fa;
  --surface: rgba(0, 0, 0, 0.03);
  --surface-strong: rgba(0, 0, 0, 0.06);
  --text: #0f172a;
  --muted: #475569;
  --quiet: #94a3b8;
  --line: rgba(0, 0, 0, 0.06);
  --accent-soft: rgba(59, 130, 246, 0.1);
  --accent-light: rgba(59, 130, 246, 0.05);
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.03);
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-border: rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .brand {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;
  background-color: var(--bg);
  background-image: linear-gradient(135deg, var(--bg) 0%, var(--bg-soft) 100%);
  color: var(--text);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  animation: pageFade 520ms ease both;
  transition: background-color 0.3s ease, background-image 0.3s ease, color 0.3s ease;
  overflow-x: hidden; /* Evita barras de rolagem devido aos glows flutuantes */
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.85;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.04) 0%, transparent 35%),
    /* Textura de grade fina e moderna */
    linear-gradient(rgba(255, 255, 255, 0.007) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.007) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 40px 40px, 40px 40px;
}

[data-theme="light"] body::before {
  opacity: 0.9;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.03) 0%, transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.015) 0%, transparent 35%),
    linear-gradient(rgba(0, 0, 0, 0.007) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.007) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 40px 40px, 40px 40px;
}

@keyframes pageFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes scrollReveal {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

.container {
  width: min(100% - 48px, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 100;
  background: rgba(10, 15, 26, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  margin: 16px auto;
  max-width: var(--max);
  width: calc(100% - 32px);
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.nav {
  min-height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text) !important;
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

.brand:hover {
  opacity: 0.85;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.02);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .nav-menu {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.04);
}

.nav-menu a {
  position: relative;
  padding: 6px 14px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  bottom: 0px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-menu a:hover::after {
  width: 10px;
}

[data-theme="light"] .nav-menu a:hover {
  background: rgba(0, 0, 0, 0.03);
}

.nav-menu a.active {
  color: var(--accent) !important;
  background: rgba(59, 130, 246, 0.06) !important;
  border-color: rgba(59, 130, 246, 0.15) !important;
  box-shadow: none;
}

.nav-menu a.active::after {
  width: 14px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1.5px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.08);
  transition: all 200ms ease;
}

.nav-toggle span {
  display: block;
  width: 17px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, background-color 0.3s ease;
}

.hero {
  padding: clamp(64px, 10vw, 128px) 0 clamp(70px, 11vw, 132px);
}

.page-hero {
  padding: clamp(58px, 9vw, 110px) 0 clamp(42px, 7vw, 86px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(36px, 7vw, 92px);
  align-items: center;
}

.portrait {
  overflow: hidden;
  margin: 0;
  border-radius: 24px;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

.portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
  border-radius: 20px;
  border: 2px solid rgba(59, 130, 246, 0.15);
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.12);
  transition: transform 400ms ease, filter 400ms ease;
  animation: heroFloat 3s ease-in-out infinite;
}

.portrait img:hover {
  transform: scale(1.02);
  filter: saturate(1.15) contrast(1.1);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 920px;
  margin-bottom: 20px;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.page-hero h1 {
  font-family: 'Outfit', sans-serif !important;
  font-size: clamp(1.8rem, 4.2vw, 2.75rem) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  letter-spacing: -0.02em !important;
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  color: transparent !important;
}

h2 {
  margin-bottom: 16px;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.35rem, 3vw, 2.0rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--text);
}

h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.lead {
  max-width: var(--reading);
  color: var(--muted);
  font-size: clamp(1.08rem, 1.5vw, 1.28rem);
  line-height: 1.75;
}

.section {
  padding: clamp(58px, 8vw, 106px) 0;
}

.section-line {
  border-top: 1px solid var(--line);
}

.grid-2,
.grid-3,
.map-grid {
  display: grid;
  gap: clamp(22px, 3vw, 38px);
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.entry-card,
.timeline-card,
.project-card,
.note-panel {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card,
.entry-card,
.timeline-card,
.note-panel {
  padding: 24px;
}

.card {
  display: block;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover,
.entry-card:hover,
.project-card:hover,
.note-panel:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.card p,
.entry-card p,
.timeline-card p,
.project-card p,
.note-panel p {
  color: var(--muted);
}

.note-panel {
  max-width: var(--reading);
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  padding: 10px 24px;
  background: var(--accent);
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 180ms ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
  background: linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%);
}

.text-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  position: relative;
  transition: color 180ms ease;
}

.text-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.text-link:hover {
  color: var(--secondary);
}

.text-link:hover::after {
  transform: scaleX(1);
}

.clean-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.clean-list li {
  padding-left: 0;
  color: var(--muted);
}

.clean-list li::before {
  content: none;
}

.identity-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 34px;
  color: var(--quiet);
}

.identity-strip span {
  position: relative;
  border: 0;
  border-radius: 0;
  padding: 6px 12px;
  background: rgba(59, 130, 246, 0.08);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 180ms ease;
}

.identity-strip span:hover {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent);
}

.identity-strip span + span::before {
  content: none;
  margin-right: 0;
  color: transparent;
}

.editorial {
  max-width: 880px;
  margin-inline: auto;
}

.editorial p {
  color: var(--muted);
  font-size: clamp(1.08rem, 1.55vw, 1.28rem);
  line-height: 1.9;
}

.editorial p:first-of-type {
  color: var(--text);
  font-size: clamp(1.24rem, 2vw, 1.58rem);
}

.editorial-section {
  padding: clamp(36px, 6vw, 74px) 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.editorial-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.collection-list {
  display: grid;
  gap: clamp(42px, 7vw, 84px);
  max-width: 900px;
}

.collection-item {
  padding-bottom: clamp(34px, 5vw, 62px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.collection-item:last-child {
  border-bottom: 0;
}

.collection-item h2 {
  margin-bottom: 18px;
}

.collection-item p {
  max-width: var(--reading);
  color: var(--muted);
  font-size: 1.08rem;
}

.collection-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 22px;
  color: var(--quiet);
  font-size: 0.9rem;
}

.collection-meta span + span::before {
  content: "/";
  margin-right: 18px;
  color: rgba(59, 130, 246, 0.4);
}

.map-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.map-center {
  grid-column: span 3;
  padding-bottom: 30px;
  border-bottom: 2px solid var(--accent);
}

.map-card {
  min-height: auto;
  padding-top: 20px;
  border-top: 1.5px solid rgba(59, 130, 246, 0.2);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 18px;
}

.tag-row span + span::before,
.status {
  border: 0;
  border-radius: 0;
  padding: 0;
  color: var(--quiet);
  font-size: 0.9rem;
  font-weight: 500;
}

.tag-row span + span::before {
  content: "/";
  margin-right: 18px;
  color: rgba(59, 130, 246, 0.4);
}

.status {
  color: var(--accent);
  font-weight: 600;
}

.entry-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  color: var(--quiet);
  font-size: 0.9rem;
}

.entry-card {
  padding: 28px;
  border-top: 1.5px solid rgba(59, 130, 246, 0.2);
}

.timeline-list {
  position: relative;
  max-width: 840px;
  margin: 48px auto;
  padding-left: 40px;
  border-left: 2px dashed rgba(59, 130, 246, 0.25);
}

.timeline-card {
  position: relative;
  margin-bottom: 48px;
  padding: 32px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-card::before {
  content: "";
  position: absolute;
  left: -51px;
  top: 36px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg);
  border: 4px solid var(--accent);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
  z-index: 2;
  transition: all 0.3s ease;
}

.timeline-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  background: var(--surface-strong);
}

.timeline-card:hover::before {
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.timeline-period {
  font-family: 'Outfit', sans-serif;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.timeline-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 12px;
}

.badge-estudos {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-trabalho {
  background: rgba(16, 185, 129, 0.1);
  color: var(--secondary);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.timeline-context {
  color: var(--text) !important;
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0 0 20px;
}

.timeline-lesson-container {
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.015);
  border-left: 3px solid var(--accent);
  border-radius: 4px 12px 12px 4px;
}

[data-theme="light"] .timeline-lesson-container {
  background: rgba(0, 0, 0, 0.01);
}

.timeline-lesson-label {
  display: block;
  font-family: 'Outfit', sans-serif;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.timeline-lesson-text {
  color: var(--muted) !important;
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
}
.projects-list {
  max-width: var(--max);
  margin: 48px auto;
  padding-left: 0;
  border-left: none;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.project-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 42px;
  padding: 32px;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  margin-bottom: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 1041px) {
  .project-card:nth-child(even) img {
    order: 2;
  }
  .project-card:nth-child(even) .project-content {
    order: 1;
  }
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 130, 246, 0.4);
  background: var(--surface-strong);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

.project-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  align-self: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  transition: all 0.4s ease;
}

.project-card:hover img {
  transform: scale(1.02);
  border-color: rgba(59, 130, 246, 0.3);
}

.project-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 16px;
  white-space: pre-line;
}

.project-tech, .project-lessons {
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 6px 0;
}

/* Pílulas de Linguagens do Código */
.project-languages {
  display: flex;
  gap: 8px;
  margin: 14px 0 18px 0;
  flex-wrap: wrap;
}

.project-lang-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  background: var(--bg-color, rgba(255, 255, 255, 0.02));
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.project-lang-badge:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
}

.project-lang-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--dot-color, var(--text));
  display: inline-block;
}

.journey-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 48px;
  align-items: start;
}

.sidebar-aside {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (max-width: 992px) {
  .journey-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .sidebar-aside {
    position: static !important;
  }
}

.game-shell {
  min-height: 420px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.04), rgba(16, 185, 129, 0.04));
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  transition: all 300ms ease;
}

.game-shell:hover {
  border-color: var(--accent);
  box-shadow: 0 16px 40px rgba(59, 130, 246, 0.15);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 32px 0;
  background: rgba(8, 10, 18, 0.6);
  backdrop-filter: blur(20px);
  color: var(--muted);
  font-size: 0.9rem;
}

[data-theme="light"] .site-footer {
  background: rgba(255, 255, 255, 0.7);
}

.footer-top {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-bottom: 24px;
}

.footer-brand-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: opacity 0.3s ease;
}

.footer-logo:hover {
  opacity: 0.85;
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.5;
  margin: 0;
  letter-spacing: 0.02em;
}

.footer-divider {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2) 50%, transparent);
  margin: 16px 0;
}

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

.footer-copy {
  font-size: 0.8rem;
  color: var(--quiet);
  margin: 0;
}

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

.footer-quick-links a {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 550;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-quick-links a:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

.footer-widget-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  margin: 0;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  width: 100%;
}

[data-theme="light"] .footer-widget-bar {
  background: rgba(0, 0, 0, 0.015);
  border-color: rgba(0, 0, 0, 0.04);
}

.footer-widget {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--muted);
}

.widget-label {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--quiet);
  letter-spacing: 0.05em;
}

.widget-value {
  color: var(--text);
  font-weight: 550;
}

.spotify-wave {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  width: 12px;
  height: 12px;
}

.spotify-wave span {
  display: block;
  width: 2px;
  background: #1db954;
  animation: bounceEqualizer 0.8s ease infinite alternate;
}

.spotify-wave span:nth-child(1) { height: 4px; animation-delay: 0.1s; }
.spotify-wave span:nth-child(2) { height: 10px; animation-delay: 0.3s; }
.spotify-wave span:nth-child(3) { height: 6px; animation-delay: 0.5s; }

@keyframes bounceEqualizer {
  10% { transform: scaleY(0.3); }
  100% { transform: scaleY(1.1); }
}

.widget-status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.pulse-green {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseWidgetGreen 1.5s infinite;
}

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

.footer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.15);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--secondary);
  font-weight: 600;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.03);
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--secondary);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--secondary);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.45; }
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 500ms cubic-bezier(0.16, 1, 0.3, 1), transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.card[data-reveal]:nth-child(1) {
  --reveal-delay: 0ms;
}

.card[data-reveal]:nth-child(2) {
  --reveal-delay: 80ms;
}

.card[data-reveal]:nth-child(3) {
  --reveal-delay: 160ms;
}

.card[data-reveal]:nth-child(n+4) {
  --reveal-delay: 240ms;
}

.collection-item {
  padding: 24px;
  border: 1.5px solid rgba(59, 130, 246, 0.15);
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.04);
  transition: all 300ms ease;
}

.collection-item:hover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.15);
}

.collection-note {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 8px 0 16px 0;
}

.collection-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 200ms ease;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.tag:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.games-memorable {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 32px;
  margin-top: 32px;
}

.memorable-game {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: start;
  transition: all 300ms ease;
}

.memorable-game img {
  border-radius: 12px;
  object-fit: cover;
  width: 100%;
  aspect-ratio: 16 / 9;
  filter: brightness(1) contrast(1.08);
  transition: all 300ms ease;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
}

.memorable-game:hover img {
  filter: brightness(1.05) contrast(1.15);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.2);
}

.memorable-content h3 {
  margin: 0 0 4px 0;
  font-size: 1.2rem;
}

.game-year {
  color: var(--muted);
  font-size: 0.85rem;
}

.game-description {
  color: var(--muted);
  margin: 12px 0;
}

.game-insights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.game-insights strong {
  display: block;
  font-size: 0.85rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.game-insights p {
  margin: 0;
  color: var(--quiet);
  font-size: 0.9rem;
  line-height: 1.5;
}

.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.gallery-item {
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 1;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(16, 185, 129, 0.1));
  cursor: pointer;
  transition: all 300ms ease;
  border: 1.5px solid rgba(59, 130, 246, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.gallery-item:hover {
  transform: scale(1.04);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.2);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

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

/* Animação para overlay escurecido */
@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Blur overlay quando o menu lateral está aberto */
body:has(.nav-menu.is-open)::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 18, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 90;
  pointer-events: auto;
  animation: overlayFadeIn 0.3s ease forwards;
}

body:has(.nav-menu.is-open) {
  overflow: hidden;
}

@media (max-width: 1040px) {
  .nav-toggle {
    display: block;
    position: relative;
    z-index: 201; /* Garante que o hambúrguer fique acima do drawer */
    order: 3;
  }

  .nav-controls {
    order: 2;
    margin-left: auto;
    margin-right: 12px;
  }

  /* Transformação das linhas do hambúrguer em X */
  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    max-width: 80vw;
    height: 100vh;
    display: flex; /* Mantém flex para estruturação dos links */
    flex-direction: column;
    align-items: stretch;
    padding: 96px 24px 40px 24px;
    border: none;
    border-left: 1px solid var(--card-border);
    border-radius: 0;
    background: rgba(10, 15, 26, 0.75);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    gap: 8px;
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 200;
  }

  [data-theme="light"] .nav-menu {
    background: rgba(255, 255, 255, 0.85);
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.05);
  }

  .nav-menu.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  /* Transição em cascata (stagger) dos links ao abrir o menu */
  .nav-menu a {
    padding: 13px 16px;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 8px;
  }

  .nav-menu.is-open a {
    opacity: 1;
    transform: translateX(0);
  }

  .nav-menu.is-open a:nth-child(1) { transition-delay: 0.05s; }
  .nav-menu.is-open a:nth-child(2) { transition-delay: 0.1s; }
  .nav-menu.is-open a:nth-child(3) { transition-delay: 0.15s; }
  .nav-menu.is-open a:nth-child(4) { transition-delay: 0.2s; }
  .nav-menu.is-open a:nth-child(5) { transition-delay: 0.25s; }
  .nav-menu.is-open a:nth-child(6) { transition-delay: 0.30s; }
  .nav-menu.is-open a:nth-child(7) { transition-delay: 0.35s; }
  .nav-menu.is-open a:nth-child(8) { transition-delay: 0.40s; }

  .hero-grid,
  .project-card {
    grid-template-columns: 1fr;
  }

  .portrait {
    max-width: 430px;
  }

  .grid-3,
  .map-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-center {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .container {
    width: min(100% - 32px, var(--max));
  }

  .hero,
  .page-hero,
  .section {
    padding: 48px 0;
  }

  .grid-2,
  .grid-3,
  .map-grid,
  .timeline-card {
    grid-template-columns: 1fr;
  }

  .map-center {
    grid-column: span 1;
  }

  .identity-strip {
    display: grid;
    gap: 8px;
  }

  .identity-strip span + span::before,
  .collection-meta span + span::before {
    content: none;
    margin: 0;
  }

  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .timeline-card {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 24px;
  }

  .project-card {
    padding: 24px;
  }

  .memorable-game {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .games-memorable {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 24px, var(--max));
  }

  .site-header {
    min-height: auto;
  }

  .nav {
    min-height: 60px;
    gap: 16px;
  }

  .brand {
    font-size: 0.9rem;
    gap: 8px;
  }

  .brand-mark {
    font-size: 0.95rem;
  }

  .nav-toggle {
    width: 40px;
    height: 40px;
  }

  .nav-toggle span {
    width: 15px;
    height: 1px;
    margin: 4px auto;
  }

  .nav-menu {
    top: 60px;
    left: 12px;
    right: 12px;
    padding: 12px;
  }

  .nav-menu a {
    padding: 12px 8px;
    font-size: 0.85rem;
  }

  .hero {
    padding: clamp(40px, 8vw, 80px) 0;
  }

  .page-hero {
    padding: clamp(40px, 7vw, 70px) 0 clamp(30px, 5vw, 50px);
  }

  .hero-grid {
    gap: clamp(24px, 5vw, 48px);
  }

  .portrait {
    max-width: 100%;
    border-radius: 16px;
  }

  .portrait img {
    border-radius: 12px;
    aspect-ratio: auto;
    max-height: 300px;
  }

  h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    margin-bottom: 16px;
  }

  h2 {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    margin-bottom: 12px;
  }

  h3 {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .lead {
    font-size: clamp(1rem, 2vw, 1.1rem);
    line-height: 1.6;
  }

  .link-row {
    flex-direction: column;
    gap: 12px;
  }

  .button {
    width: 100%;
    min-height: 40px;
    font-size: 0.9rem;
  }

  .section {
    padding: clamp(40px, 6vw, 80px) 0;
  }

  .card,
  .entry-card,
  .timeline-card,
  .note-panel {
    padding: clamp(16px, 4vw, 20px);
  }

  .grid-2 {
    gap: clamp(16px, 2vw, 24px);
  }

  .grid-3 {
    gap: clamp(16px, 2vw, 24px);
  }

  .eyebrow {
    font-size: 0.75rem;
    margin-bottom: 12px;
  }

  .collection-item {
    padding: clamp(16px, 4vw, 20px);
  }

  .collection-item h2 {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    margin-bottom: 12px;
  }

  .tag {
    font-size: 0.8rem;
    padding: 4px 10px;
  }

  .identity-strip {
    gap: 6px;
  }

  .identity-strip span {
    font-size: 0.8rem;
    padding: 4px 8px;
  }

  .editorial p {
    font-size: clamp(1rem, 2vw, 1.08rem);
    line-height: 1.7;
  }

  .editorial p:first-of-type {
    font-size: clamp(1.1rem, 3vw, 1.3rem);
  }

  .timeline-card span {
    font-size: 1.1rem;
  }

  .timeline-card strong {
    font-size: 0.85rem;
  }

  .gallery-container {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }



  .game-insights {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .footer-grid {
    gap: 12px;
    font-size: 0.85rem;
  }
}

/* Redesign Header controls - Theme Switcher & Language Selector */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.theme-toggle-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle-btn:hover {
  background: var(--surface-strong);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.theme-toggle-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Toggle visibility based on data-theme */
[data-theme="light"] .theme-toggle-btn .icon-sun {
  display: none;
}
[data-theme="dark"] .theme-toggle-btn .icon-moon {
  display: none;
}
/* When no data-theme attribute is set, it defaults to dark, so hide moon */
:root:not([data-theme="light"]) .theme-toggle-btn .icon-moon {
  display: none;
}

.lang-selector {
  display: flex;
  gap: 2px;
  border: 1px solid var(--line);
  padding: 2px;
  border-radius: 8px;
  background: var(--surface);
}

.lang-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.active {
  background: var(--accent);
  color: #ffffff;
}

/* Responsiveness for controls */
@media (max-width: 768px) {
  .nav-controls {
    order: 2;
    margin-left: auto;
    margin-right: 8px;
    justify-content: center;
    width: auto;
    padding-top: 0;
    border-top: none;
  }
}

/* Personal Map Dashboard Refactoring */
.map-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: 32px;
}

.map-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.map-col-title {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 4px;
  border-left: 3px solid var(--accent);
  padding-left: 10px;
}

.map-card {
  margin: 0 !important;
}

.map-card.active-card {
  border-color: var(--accent);
  background: var(--accent-light);
}

@media (max-width: 900px) {
  .map-dashboard {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* Card & Button Interactive Animations */
.card.contact-card:hover .card-icon-container {
  transform: translateY(-4px) scale(1.1);
}

.button:hover .button-icon {
  transform: scale(1.1);
}

