/* ==========================================================================
   INDIE DEV / MINIMALIST TECH THEME
   ========================================================================== */

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

:root {
  --bg-color: #0d1117;
  --bg-card: #161b22;
  --bg-card-hover: #1c2128;
  --border-color: #30363d;
  
  --text-primary: #c9d1d9;
  --text-heading: #f0f6fc;
  --text-muted: #8b949e;
  
  --accent-purple: #a855f7;
  --accent-purple-glow: rgba(168, 85, 247, 0.15);
  --accent-green: #2ea043;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', monospace;
  --wrap-max: 1100px;
  --radius: 6px;
  --transition: all 0.2s ease-in-out;
}

html.light-mode {
  --bg-color: #f6f8fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f3f4f6;
  --border-color: #d0d7de;
  
  --text-primary: #24292f;
  --text-heading: #0f1419;
  --text-muted: #57606a;
  
  --accent-purple: #8b5cf6;
  --accent-purple-glow: rgba(139, 92, 246, 0.1);
  --accent-green: #1a7f37;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  padding-bottom: 20px;
}

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

.wrap {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* TOPBAR */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 40px;
  position: relative;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
}

.logo-mark { color: var(--accent-purple); }
.logo-text { color: var(--text-heading); }

nav {
  display: flex;
  align-items: center;
  gap: 20px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

nav a {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
}

nav a:hover, nav a.active {
  color: var(--accent-purple);
}

nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-purple);
}

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

.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 13px;
}

.lang-switch {
  position: relative;
  display: inline-block;
  width: 54px;
  height: 26px;
}

.lang-switch input { opacity: 0; width: 0; height: 0; }

.lang-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
}

.lang-switch input:checked + .lang-slider .lang-label-en { color: var(--accent-purple); }
.lang-switch input:not(:checked) + .lang-slider .lang-label-pt { color: var(--accent-purple); }

.mobile-menu-btn {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-heading);
  padding: 4px 10px;
  font-size: 16px;
  cursor: pointer;
}

/* LAYOUT DUAS COLUNAS */
.layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
}

.prompt {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: 32px;
  color: var(--text-heading);
  margin-bottom: 8px;
}

.hero .name { color: var(--accent-purple); }

.hero-subtitle {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.lede {
  color: var(--text-primary);
  margin-bottom: 16px;
}

blockquote {
  border-left: 2px solid var(--accent-purple);
  padding: 8px 16px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 20px;
  background: var(--accent-purple-glow);
}

/* BOTÕES ESTILO SITE PRINCIPAL */
.links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.site-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-heading);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

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

/* BOX & TABLES */
.box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
}

.panel-head {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--border-color);
}

.info-row:last-child { border-bottom: none; }
.info-row .k { font-family: var(--font-mono); color: var(--text-muted); }
.info-row .v { color: var(--text-heading); text-align: right; }

/* GRÁFICOS E BARRAS DE PROGRESSO */
.metrics-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 4px;
}

.metric-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.v-percent {
  font-family: var(--font-mono);
  color: var(--accent-purple);
  font-weight: 600;
}

.progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

/* Animação Suave das Barras */
.progress-bar-fill {
  height: 100%;
  background: var(--accent-purple);
  border-radius: 4px;
  width: 0%;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-purple);
  margin: 24px 0 8px 0;
}

.body-text { margin-bottom: 12px; }

.updated {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 24px;
}

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

/* FOTO E CONTADORES */
.profile-photo-wrap {
  text-align: center;
  margin-bottom: 20px;
}

.profile-photo img {
  width: 100%;
  max-width: 280px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  margin-top: 12px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-green);
  border-radius: 50%;
}

.counter-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.counter-card .label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.counter-card .value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-purple);
  margin: 4px 0;
}

.counter-card .sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* FOOTER */
.footer {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

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

.footer-right a {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.footer-right a:hover {
  color: var(--accent-purple);
}

/* ANIMATION */
.fade-up {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeUpAnim 0.5s forwards ease-out;
}

@keyframes fadeUpAnim {
  to { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVIDADE MOBILE COM ORDEM CORRIGIDA */
@media (max-width: 850px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .mobile-menu-btn { display: block; }

  nav {
    display: none;
    position: absolute;
    top: 75px;
    right: 0;
    left: auto;
    transform: none;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    z-index: 100;
  }

  nav.open { display: flex; }
  nav a.active::after { display: none; }

  /* Mover Foto para ficar entre status e progresso no mobile */
  .mobile-photo-slot .profile-photo-wrap {
    margin: 16px 0 24px 0;
  }

  .footer {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
}