/* ============ Terminal retrô — 20 anos de código ============ */
:root {
  --bg: #050805;
  --bg-soft: #0a120b;
  --green: #4af26c;
  --green-soft: #9fdcac;
  --green-dim: #5d8a67;
  --amber: #ffb84d;
  --border: #1b4526;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', 'Fira Code', monospace;
}

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--green-soft);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.75;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 1px dashed var(--amber); outline-offset: 3px; }

.amber { color: var(--amber); }
.dim { color: var(--green-dim); }

/* Fundo animado: chuva de código (Matrix) */
#bg-fx {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* CRT: scanlines + vinheta + leve brilho */
.crt {
  position: fixed; inset: 0; z-index: 10; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.16) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.5) 100%);
}

.screen {
  position: relative; z-index: 1; /* acima do canvas #bg-fx */
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 24px 60px;
  text-shadow: 0 0 8px rgba(74,242,108,0.22);
}

/* ============ Barra de status ============ */
.statusbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(5,8,5,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.statusbar-inner {
  max-width: 880px; margin: 0 auto;
  padding: 10px 24px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}

.host { color: var(--green); font-weight: 700; white-space: nowrap; }
.host:hover { text-decoration: none; }
.path { color: var(--amber); }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.tabs a { color: var(--green-dim); font-size: 0.9rem; }
.tabs a:hover { color: var(--green); text-decoration: none; }

.lang-toggle {
  background: none; border: 1px solid var(--border); border-radius: 4px;
  color: var(--amber); font-family: inherit; font-size: 0.82rem;
  padding: 3px 10px; cursor: pointer;
}
.lang-toggle:hover { border-color: var(--amber); }

/* ============ Blocos / linhas de comando ============ */
.block { padding: 44px 0 8px; }

.cmdline { margin-bottom: 6px; }
.prompt { color: var(--amber); margin-right: 10px; font-weight: 700; }
.cmd { color: var(--green); font-weight: 500; }

.out { margin: 0 0 26px 26px; }
.out p { margin-bottom: 12px; max-width: 68ch; }

.caret {
  display: inline-block; color: var(--green);
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .caret { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============ Hero / boot ============ */
.hero { padding-top: 28px; }

.bootline { color: var(--green-dim); font-size: 0.86rem; }
.bootline .tag { color: var(--green); font-weight: 700; }
.bootline.ok { margin-bottom: 2px; }
.hero .cmdline:first-of-type { margin-top: 22px; }

.name {
  font-size: clamp(1.7rem, 5.5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.04em;
  color: var(--green);
  text-shadow: 0 0 18px rgba(74,242,108,0.45);
  margin: 10px 0 6px;
}

.role { color: var(--green-soft); }

.banner {
  color: var(--amber);
  text-shadow: 0 0 14px rgba(255,184,77,0.35);
  font-size: clamp(0.5rem, 1.9vw, 0.95rem);
  line-height: 1.25;
  margin: 14px 0 6px;
  overflow-x: auto;
}

.banner-caption { font-weight: 700; letter-spacing: 0.12em; }
.uptime-line { color: var(--green-dim); font-size: 0.9rem; }

.skip {
  background: none; border: none; color: var(--green-dim);
  font-family: inherit; font-size: 0.8rem; cursor: pointer;
  padding: 2px 0; margin-left: 26px;
}
.skip:hover { color: var(--amber); }
.skip.hidden { display: none; }

/* ============ Log / trajetória ============ */
.log p { margin-bottom: 4px; }
.log-year { color: var(--amber); font-weight: 700; margin-right: 8px; }

/* ============ Projetos ============ */
.ls { color: var(--green-soft); line-height: 1.6; overflow-x: auto; }

.projects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 36px; }

.project-name { font-size: 1.15rem; color: var(--green); margin-bottom: 8px; }
.badge {
  color: var(--amber); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.08em; vertical-align: middle;
}
.meta { color: var(--green-dim); font-size: 0.85rem; }

/* ============ Skills ============ */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 32px; }
.skill-head { font-size: 0.95rem; color: var(--amber); margin-bottom: 10px; }
.skill-col p { margin-bottom: 4px; font-size: 0.9rem; }

/* ============ Amigos ============ */
.friends { overflow-x: auto; }
.friend-head { font-weight: 700; margin: 14px 0 4px; }
.friend-line { margin-bottom: 6px; font-size: 0.9rem; }
.friend-name { color: var(--green); font-weight: 500; display: inline-block; min-width: 14ch; }
.arrow { color: var(--green-dim); }

/* ============ Contato / footer ============ */
.contact-line { white-space: nowrap; overflow-x: auto; }

.footer { padding-bottom: 20px; }
.footer .out { margin-bottom: 0; }

/* ============ Reveal ao rolar ============ */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============ Responsivo ============ */
@media (max-width: 720px) {
  .projects { grid-template-columns: 1fr; }
  .statusbar-inner { gap: 10px; }
  .tabs { margin-left: 0; }
  .out { margin-left: 12px; }
}
