/*
 * Página de links do fmirandatech.
 *
 * Paleta Dracula, a mesma do site do CV (pessoal/website-cv), com os tons de
 * muted clareados para passar WCAG AA sobre o fundo do cartão. Nenhum hex
 * solto fora de :root — cada rede pega a sua cor pela variável --c.
 *
 * Sem JS: a digitação do prompt e o cursor são animação CSS, desligadas em
 * prefers-reduced-motion.
 */

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2-variations'),
    url('/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --page: #1d1e27;
  --bg: #282a36;
  --bar: #21222c;
  --surface: #2e303e;
  --text: #f8f8f2;
  --muted: #b0b8d1;
  --border: #3c3f52;
  --accent: #bd93f9;

  --red: #ff5555;
  --yellow: #f1fa8c;
  --green: #50fa7b;
  --cyan: #8be9fd;
  --pink: #ff79c6;

  --font: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 8px;
  --t: 160ms ease;

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 6vh, 4rem) 16px;
  font-family: var(--font);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text);
  /* Brilho roxo no topo sobre uma grade de pontos bem discreta. */
  background:
    radial-gradient(56rem 28rem at 50% -8rem, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(color-mix(in srgb, var(--text) 7%, transparent) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--page);
}

a {
  color: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Janela de terminal ───────────────────────────────────────────────── */

.terminal {
  width: 100%;
  max-width: 30rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 24px 60px -24px rgb(0 0 0 / 0.7),
    0 0 0 1px rgb(0 0 0 / 0.2);
}

.bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.9rem;
  background: var(--bar);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c);
}

.dot:nth-child(1) { --c: var(--red); }
.dot:nth-child(2) { --c: var(--yellow); }
.dot:nth-child(3) { --c: var(--green); }

.bar-title {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
  pointer-events: none;
}

.screen {
  padding: 2rem clamp(1rem, 5vw, 1.75rem) 1.5rem;
}

/* ── Cabeçalho ────────────────────────────────────────────────────────── */

.profile {
  text-align: center;
}

.avatar {
  display: block;
  width: 112px;
  height: 112px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 14%, transparent),
    0 0 32px color-mix(in srgb, var(--accent) 30%, transparent);
}

h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.handle {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.prompt {
  margin: 1rem 0 0;
  font-size: 1rem;
  white-space: nowrap;
}

.ps1 {
  color: var(--green);
  font-weight: 700;
}

/* "devops no interior" tem 18 caracteres; em fonte mono cada um mede 1ch. */
.typed {
  display: inline-block;
  vertical-align: bottom;
  width: 18ch;
  overflow: hidden;
  animation: typing 1.4s steps(18) 0.5s both;
}

.cursor {
  display: inline-block;
  vertical-align: bottom;
  color: var(--accent);
  animation: blink 1s steps(1) infinite;
}

@keyframes typing {
  from { width: 0; }
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ── Links ────────────────────────────────────────────────────────────── */

.cmd {
  margin: 2rem 0 0.75rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.links {
  display: grid;
  gap: 0.625rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.link {
  display: grid;
  grid-template-columns: 1ch 1.25rem auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0.75rem 1rem 0.75rem 0.75rem;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--t), background-color var(--t), box-shadow var(--t), transform var(--t);
}

.link::before {
  content: '▸';
  color: var(--c);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--t), transform var(--t);
}

.link svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--c);
}

.label {
  font-weight: 600;
}

.user {
  justify-self: end;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
  color: var(--muted);
}

.link:hover,
.link:focus-visible {
  border-color: var(--c);
  background: color-mix(in srgb, var(--c) 9%, var(--surface));
  box-shadow: 0 0 22px -6px color-mix(in srgb, var(--c) 55%, transparent);
  transform: translateX(3px);
}

.link:hover::before,
.link:focus-visible::before {
  opacity: 1;
  transform: none;
}

.link:focus-visible {
  outline: 2px solid var(--c);
  outline-offset: 3px;
}

.youtube { --c: var(--red); }
.instagram { --c: var(--pink); }
.tiktok { --c: var(--cyan); }
.linkedin { --c: var(--accent); }
.github { --c: var(--green); }
.cv { --c: var(--yellow); }

/* ── Rodapé ───────────────────────────────────────────────────────────── */

.foot {
  margin: 1.75rem 0 0;
  font-size: 0.75rem;
  text-align: center;
  color: var(--muted);
}

.foot a {
  text-decoration: none;
}

.foot a:hover,
.foot a:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

.foot a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── 404 ──────────────────────────────────────────────────────────────── */

.error {
  margin: 0.25rem 0 0;
  color: var(--red);
}

.home {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.6rem 1rem;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color var(--t), background-color var(--t);
}

.home:hover,
.home:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
}

.home:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .link:hover,
  .link:focus-visible {
    transform: none;
  }
}
