/* ===== Reset básico ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Fira Code", "JetBrains Mono", "SF Mono", Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  background-color: #020617;
  color: #e5e7eb;
  line-height: 1.6;
  min-height: 100vh;
  margin: 0;
}

/* Layout geral */
body {
  display: flex;
  justify-content: center;
}

main {
  width: 100%;
}

.page-wrapper {
  max-width: 960px;
  width: 100%;
  margin: 24px auto;
  padding: 0 16px;
}

/* ===== Efeito de scanline leve ===== */
body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(148, 163, 184, 0.04),
    rgba(148, 163, 184, 0.04) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: soft-light;
  opacity: 0.6;
  z-index: -1;
}

/* ===== Links ===== */
a {
  color: #22c55e;
  text-decoration: none;
  transition: color 0.15s ease, text-shadow 0.15s ease, opacity 0.15s ease;
}

a:hover {
  color: #4ade80;
  text-shadow: 0 0 6px rgba(34, 197, 94, 0.8);
  opacity: 0.95;
}

/* ===== Paleta terminal ===== */
:root {
  --bg-main: #020617;
  --bg-panel: #020617;
  --bg-panel-alt: #020617;
  --border-soft: #0f172a;
  --border-strong: #22c55e;
  --text-main: #e5e7eb;
  --text-subtle: #9ca3af;
  --accent: #22c55e;
  --accent-soft: #064e3b;
}

/* ===== Hero / “prompt” principal ===== */
#hero {
  padding: 32px 20px 24px;
  border-radius: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 0 1px #000000, 0 20px 40px rgba(0, 0, 0, 0.9);
  position: relative;
  overflow: hidden;
}

/* barra de título tipo janela */
#hero::before {
  content: "ralph@portfolio: ~";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 26px;
  background: #022c22;
  border-bottom: 1px solid #16a34a;
  color: #bbf7d0;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  padding: 0 10px;
}

/* “lights” da janela */
#hero::after {
  content: "● ● ●";
  position: absolute;
  top: 0;
  right: 10px;
  height: 26px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: #4ade80;
}

/* compensar a barra superior */
#hero > * {
  margin-top: 18px;
}

#hero h1 {
  font-size: clamp(2rem, 3vw, 2.4rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--accent);
}

#hero h2 {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--text-subtle);
  margin-bottom: 10px;
}

#hero p {
  color: var(--text-subtle);
  margin-bottom: 4px;
}

.hero-tags {
  margin: 12px 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hero-tag {
  padding: 2px 8px;
  border-radius: 0;
  font-size: 0.7rem;
  border: 1px solid #14532d;
  color: #bbf7d0;
  background: #022c22;
}

/* “prompt” dos botões */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 0;
  font-size: 0.85rem;
  font-weight: 400;
  border: 1px solid #14532d;
  background: #020617;
  color: #bbf7d0;
  cursor: pointer;
  text-transform: lowercase;
  letter-spacing: 0.06em;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.btn-primary {
  border-color: var(--border-strong);
  background: #022c22;
}

.btn:hover {
  background: #022c22;
  border-color: #22c55e;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.5);
  transform: translateY(-1px);
}

/* ===== Seções ===== */
section {
  margin-top: 26px;
  padding: 20px 20px 18px;
  border-radius: 0;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-soft);
  box-shadow: 0 0 0 1px #000, 0 14px 30px rgba(0, 0, 0, 0.85);
  position: relative;
}

/* “prefixo” tipo linha de comando */
section h3::before {
  content: "$ ";
  color: var(--accent);
  margin-right: 4px;
}

section h3 {
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--accent);
}

section p {
  color: var(--text-main);
  margin-bottom: 8px;
  font-size: 0.9rem;
}

/* ===== Experiência ===== */
#experience article + article {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px dashed #1f2937;
}

#experience h4 {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: #e5e7eb;
}

#experience p {
  font-size: 0.82rem;
  color: var(--text-subtle);
}

#experience ul {
  margin-top: 6px;
  padding-left: 14px;
  list-style: none;
}

#experience li {
  position: relative;
  margin-bottom: 4px;
  font-size: 0.86rem;
}

#experience li::before {
  content: ">";
  position: absolute;
  left: -12px;
  top: 0;
  color: var(--accent);
}

/* ===== Skills ===== */
#skills ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px 16px;
  list-style: none;
}

#skills li {
  font-size: 0.86rem;
  color: var(--text-main);
}

/* ===== Projetos ===== */
#projects article + article {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px dashed #1f2937;
}

#projects h4 {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

#projects p {
  font-size: 0.86rem;
}

/* ===== Contato ===== */
#contact p {
  font-size: 0.86rem;
}

/* ===== Navbar fixa tipo status bar ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #020617;
  border-bottom: 1px solid #16a34a;
  box-shadow: 0 6px 0 #000;
  padding: 6px 0;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.nav a {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  padding: 2px 8px;
  border-radius: 0;
  border: 1px solid transparent;
}

.nav a:hover {
  color: #bbf7d0;
  border-color: #16a34a;
  background: #022c22;
}

/* ===== Responsivo ===== */
@media (max-width: 640px) {
  .page-wrapper {
    margin: 20px 10px 48px;
  }

  section {
    padding: 18px 14px 14px;
  }

  #hero {
    padding: 28px 14px 18px;
  }

  #hero::before,
  #hero::after {
    font-size: 0.68rem;
  }
}
