/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --orange:      #f97316;
  --orange-dark: #ea6a00;
  --orange-light:#fff3e8;
  --navy:        #0a0a0a;   /* preto profundo (substitui azul marinho) */
  --navy-mid:    #111111;   /* preto escuro (substitui azul marinho médio) */
  --navy-light:  #222222;   /* preto claro (substitui azul marinho claro) */
  --gray-50:     #f8fafc;
  --gray-100:    #f1f5f9;
  --gray-200:    #e2e8f0;
  --gray-400:    #94a3b8;
  --gray-600:    #475569;
  --gray-800:    #1e293b;
  --white:       #ffffff;
  --gitlab-orange: #e24329;
  --github-dark:   #161b22;

  --radius-sm:  6px;
  --radius:     12px;
  --radius-lg:  20px;
  --shadow-sm:  0 1px 4px rgba(0,0,0,.4);
  --shadow:     0 4px 20px rgba(0,0,0,.5);
  --shadow-lg:  0 12px 48px rgba(0,0,0,.6);

  --transition: 0.2s cubic-bezier(.4,0,.2,1);

  --font:       'Inter', system-ui, sans-serif;
  --mono:       'JetBrains Mono', 'Fira Code', monospace;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ─────────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 5, 5, 0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--white);
  letter-spacing: -0.5px;
}
.logo-dot { color: var(--orange); }
.nav { display: flex; gap: 8px; }
.nav a {
  color: rgba(255,255,255,.75);
  font-size: .9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav a:hover { color: var(--white); background: rgba(255,255,255,.08); }
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.mobile-menu-btn span {
  display: block;
  width: 24px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px 24px 16px;
  background: var(--navy);
}
.mobile-nav a {
  color: rgba(255,255,255,.8);
  font-size: .95rem;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.mobile-nav a:hover { background: rgba(255,255,255,.06); }
.mobile-nav.open { display: flex; }

/* ── Hero ────────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: linear-gradient(135deg, #0a0a0a 0%, #050505 60%, #0f0f0f 100%);
  overflow: hidden;
  padding: 96px 0 80px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(249,115,22,.15);
  border: 1px solid rgba(249,115,22,.35);
  color: var(--orange);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
.hero-role {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--orange);
  margin-bottom: 16px;
  letter-spacing: .01em;
}
.accent { color: var(--orange); }
.hero-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,.7);
  max-width: 520px;
  margin-bottom: 20px;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
  font-size: .85rem;
  color: rgba(255,255,255,.55);
}
.hero-meta-item { display: flex; align-items: center; gap: 6px; }
.hero-meta-item svg { opacity: .7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--orange);
  color: var(--white);
}
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,.25);
  color: var(--white);
}
.btn-outline:hover { border-color: var(--orange); color: var(--orange); transform: translateY(-1px); }
.btn-outline.dark {
  border-color: var(--gray-200);
  color: var(--gray-800);
}
.btn-outline.dark:hover { border-color: var(--orange); color: var(--orange); }
.gitlab-btn:hover { border-color: var(--gitlab-orange) !important; color: var(--gitlab-orange) !important; }

/* Avatar */
.hero-avatar img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 4px solid var(--orange);
  box-shadow: 0 0 0 8px rgba(249,115,22,.15);
  object-fit: cover;
}

/* Hero bg shapes */
.hero-bg-shapes { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.shape {
  position: absolute;
  border-radius: 50%;
  opacity: .06;
}
.shape-1 {
  width: 500px; height: 500px;
  background: var(--orange);
  top: -200px; right: -100px;
}
.shape-2 {
  width: 300px; height: 300px;
  background: #60a5fa;
  bottom: -100px; left: -50px;
}
.shape-3 {
  width: 200px; height: 200px;
  background: var(--orange);
  bottom: 20px; right: 300px;
}

/* ── Stats ───────────────────────────────────────────────────────────────────── */
.stats-section {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 40px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
}
.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  transition: box-shadow var(--transition), transform var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 4px;
}
.stat-icon.orange { background: var(--orange-light); }
.stat-icon.navy   { background: rgba(255,255,255,.04); }
.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}
.stat-label {
  font-size: .8rem;
  font-weight: 500;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ── Projects Section ────────────────────────────────────────────────────────── */
.projects-section { padding: 72px 0 56px; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}
.section-sub { color: var(--gray-600); font-size: .95rem; }

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}
.filter-group { display: flex; gap: 6px; }
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  background: var(--gray-100);
  border: 1.5px solid var(--gray-200);
  color: var(--gray-600);
  transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--orange); color: var(--orange); }
.filter-btn.active {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}
.github-filter.active { background: #222222; border-color: #444444; color: var(--white); }
.gitlab-filter.active { background: var(--gitlab-orange); border-color: var(--gitlab-orange); color: var(--white); }

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 340px;
}
.search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 8px 12px 8px 38px;
  border: 1.5px solid var(--gray-200);
  border-radius: 999px;
  font-size: .9rem;
  font-family: var(--font);
  background: var(--white);
  color: var(--gray-800);
  transition: border-color var(--transition);
  outline: none;
}
.search-input::placeholder { color: var(--gray-400); }
.search-input:focus { border-color: var(--orange); }

.lang-select {
  padding: 8px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 999px;
  font-size: .85rem;
  font-family: var(--font);
  background: var(--white);
  color: var(--gray-800);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}
.lang-select:focus { border-color: var(--orange); }

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--orange);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--transition);
}
.project-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--gray-300); }
.project-card:hover::before { transform: scaleY(1); }
.project-card.gitlab-card::before { background: var(--gitlab-orange); }

.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  font-family: var(--mono);
  word-break: break-word;
  line-height: 1.4;
}
.card-title a:hover { color: var(--orange); }
.source-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.badge-github { background: none; color: #111; font-weight: bold; }
.badge-gitlab { background: none; color: var(--gitlab-orange); font-weight: bold; }

.card-desc {
  font-size: .875rem;
  color: var(--gray-600);
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.topic-tag {
  font-size: .72rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--orange-light);
  color: var(--orange-dark);
  border: 1px solid rgba(249,115,22,.2);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--gray-100);
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .8rem;
  color: var(--gray-400);
}
.card-meta-item { display: flex; align-items: center; gap: 4px; }
.lang-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--gray-600);
  padding: 5px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.card-link:hover { color: var(--orange); border-color: var(--orange); }

/* ── Languages Bar ───────────────────────────────────────────────────────────── */
.langs-section {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 56px 0;
}
.langs-bar {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lang-row { display: flex; align-items: center; gap: 14px; }
.lang-name {
  width: 120px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
  font-family: var(--mono);
  flex-shrink: 0;
}
.lang-bar-wrap {
  flex: 1;
  background: var(--gray-100);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}
.lang-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), var(--orange-dark));
  transition: width 1s cubic-bezier(.4,0,.2,1);
}
.lang-count {
  font-size: .82rem;
  font-weight: 600;
  color: var(--gray-600);
  min-width: 40px;
  text-align: right;
}

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.7);
  padding: 48px 0 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 32px;
}
.footer-tagline { font-size: .85rem; margin-top: 6px; opacity: .6; }
.footer-links { display: flex; gap: 16px; }
.footer-links a {
  color: rgba(255,255,255,.5);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--orange); }
.footer-copy {
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 16px 24px;
  font-size: .82rem;
  color: rgba(255,255,255,.35);
  text-align: center;
}

/* ── Skeleton ────────────────────────────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}
.skeleton {
  pointer-events: none;
}
.skeleton .skeleton-text {
  height: 14px;
  border-radius: 4px;
  margin: 8px 0;
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 600px 100%;
  animation: shimmer 1.5s infinite linear;
}

.skeleton .skeleton-text.short { width: 60%; }

/* ── Load more ───────────────────────────────────────────────────────────────── */
.load-more-wrap { text-align: center; margin-top: 40px; }
.load-more-wrap .btn-outline {
  border-color: var(--gray-200);
  color: var(--gray-600);
}
.load-more-wrap .btn-outline:hover { border-color: var(--orange); color: var(--orange); }

/* ── Error / Empty ───────────────────────────────────────────────────────────── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 24px;
  color: var(--gray-600);
}
.empty-state svg { margin: 0 auto 16px; opacity: .3; }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-avatar { display: none; }
  .hero-meta { justify-content: center; }
  .hero-actions { justify-content: center; }
  .footer-inner { flex-direction: column; text-align: center; }
  .filters { flex-direction: column; align-items: stretch; }
  .search-wrap { max-width: 100%; }
}
@media (max-width: 480px) {
  .hero { padding: 64px 0 56px; }
  .projects-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
