:root {
  --bg: #0B0E14;
  --bg-elevated: #11151D;
  --bg-terminal: #0D1117;
  --border: #1F2530;
  --border-soft: #191E27;
  --text: #E6E9EF;
  --text-dim: #8B93A7;
  --text-faint: #545D70;
  --accent-blue: #6FA8FF;
  --accent-green: #8FD19E;
  --accent-amber: #E6B673;

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

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.025) 1px, transparent 0);
  background-size: 22px 22px;
  z-index: 0;
}

/* ---------- Tabbar ---------- */
.tabbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11,14,20,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.tabbar-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(143, 209, 158, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(143, 209, 158, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(143, 209, 158, 0); }
}

.tabs {
  display: flex;
  gap: 4px;
}

.tab {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
}

.tab:hover {
  color: var(--text);
  background: var(--bg-elevated);
}

/* ---------- Hero / Terminal Melhorado ---------- */
.hero {
  max-width: 880px;
  margin: 60px auto 96px;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-green);
  background: rgba(143, 209, 158, 0.08);
  border: 1px solid rgba(143, 209, 158, 0.2);
  padding: 6px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero-badge .badge-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent-green);
  animation: pulse-dot 2s infinite;
}

.terminal {
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.6), 0 0 40px rgba(111, 168, 255, 0.03);
  transition: border-color 0.3s ease;
}

.terminal:hover {
  border-color: rgba(111, 168, 255, 0.3);
}

.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #333B49;
}

.terminal-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}

.terminal-body {
  padding: 36px 28px 40px;
  font-family: var(--font-mono);
}

.line {
  margin: 0;
  white-space: pre-wrap;
}

#typed-line {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
  min-height: 36px;
}

#line-role {
  color: var(--text-dim);
  font-size: 15px;
}

.hero-meta {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 11px 20px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--accent-blue);
  color: #0B0E14;
  font-weight: 600;
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: #82b4ff;
}

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

.btn-ghost:hover { 
  transform: translateY(-2px);
  color: var(--text); 
  border-color: var(--text-faint); 
}

.github-icon {
  opacity: 0.8;
}

/* ---------- Sections ---------- */
.section {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px;
  border-top: 1px solid var(--border-soft);
  position: relative;
  z-index: 1;
}

.section-head {
  margin-bottom: 22px;
}

.file-icon {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent-blue);
}

.prose p {
  color: var(--text-dim);
  max-width: 66ch;
  font-size: 16px;
}

.prose strong { color: var(--text); font-weight: 600; }

/* ---------- Filter Bar ---------- */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  color: var(--text);
  border-color: var(--text-faint);
}

.filter-btn.active {
  background: var(--accent-blue);
  color: #0B0E14;
  border-color: var(--accent-blue);
  font-weight: 600;
}

/* ---------- Projects ---------- */
.project {
  display: flex;
  gap: 16px;
  padding: 24px 16px;
  border-top: 1px solid var(--border-soft);
  border-radius: 8px;
  transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

.project:hover {
  background-color: var(--bg-elevated);
  transform: translateX(4px);
}

.project:first-of-type { border-top: none; }

.project-marker {
  width: 3px;
  border-radius: 2px;
  background: var(--accent-green);
  flex-shrink: 0;
}

.project-top {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.project-top h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-amber);
}

.project-desc {
  color: var(--text-dim);
  max-width: 62ch;
  font-size: 15px;
  margin: 0 0 12px;
}

.project-tech {
  list-style: none;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
}

.project-tech li {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 5px;
}

.more-projects {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-blue);
  transition: opacity 0.2s ease;
}

.more-projects:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ---------- Stack ---------- */
.stack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  overflow: hidden;
}

.stack-item {
  background: var(--bg-elevated);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background 0.2s ease;
}

.stack-item:hover {
  background: #151a24;
}

.stack-key {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}

.stack-val {
  font-size: 14px;
  color: var(--text);
}

/* ---------- Contact ---------- */
.contact-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 26px 24px;
}

.contact-line {
  color: var(--text-dim);
  margin: 0 0 16px;
  font-size: 15px;
}

.contact-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 14px;
}

.contact-links a {
  color: var(--accent-blue);
  transition: opacity 0.2s ease;
}

.contact-links a:hover { opacity: 0.8; text-decoration: underline; }

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 40px 24px 60px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  #typed-line { font-size: 20px; }
  .tabs { gap: 0; }
  .tab { padding: 6px 8px; font-size: 12px; }
  .stack-grid { grid-template-columns: 1fr; }
  .project { flex-direction: column; gap: 8px; transform: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .brand-dot, .hero-badge .badge-dot { animation: none; }
}

a:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
  border-radius: 4px;
}