/*
 * miotto.dev — hub
 * Mesma identidade visual do portfólio e das notas: dark grafite
 * esverdeado + acento verde-lima (#c6ff3d), Inter (leitura) + JetBrains Mono
 * (labels/código), estética de engenharia.
 */

:root {
  color-scheme: dark;

  --bg: #0e1210;
  --surface: #141a16;
  --border: #26302a;
  --text: #e8ede9;
  --muted: #9aa69d;
  --accent: #c6ff3d;
  --accent-soft: rgba(198, 255, 61, 0.12);

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

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

html {
  -webkit-text-size-adjust: 100%; /* evita zoom automático de fonte no iOS em landscape */
}

body {
  min-height: 100vh;
  min-height: 100svh; /* viewport real no mobile (barra do navegador não corta o centro) */
  font-family: var(--font-sans);
  color: var(--text);
  background-color: var(--bg);
  /* Grid de engenharia sutil, igual ao portfólio e às notas */
  background-image:
    linear-gradient(rgba(198, 255, 61, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(198, 255, 61, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  line-height: 1.6;
}

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

::selection {
  background: var(--accent);
  color: var(--bg);
}

.container {
  width: 100%;
  max-width: 560px;
}

.prompt {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.prompt .symbol {
  color: var(--accent);
}

.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1.1s steps(1) infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .cursor {
    animation: none;
  }
}

h1 {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

h1 span {
  color: var(--accent);
}

.intro {
  color: var(--muted);
  margin-bottom: 2.5rem;
}

.links {
  display: grid;
  gap: 1rem;
}

/* Mobile-first: grid com a pill do domínio no topo, texto embaixo e seta no
   canto. Em telas maiores (breakpoint no fim do arquivo) vira linha flex. */
.link-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.6rem 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.link-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.link-card .domain {
  grid-row: 1;
  grid-column: 1;
  justify-self: start;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}

.link-card .meta {
  grid-row: 2;
  grid-column: 1 / -1;
  flex: 1;
}

.link-card .meta strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
}

.link-card .meta span {
  color: var(--muted);
  font-size: 0.9rem;
}

.link-card .arrow {
  grid-row: 1;
  grid-column: 2;
  font-family: var(--font-mono);
  color: var(--muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.link-card:hover .arrow {
  transform: translateX(4px);
  color: var(--accent);
}

footer {
  margin-top: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Telas maiores: card volta à linha flex clássica — texto · pill · seta */
@media (min-width: 560px) {
  .link-card {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
  }
}
