/* bio.digenaldo.com — preto, vermelho e branco. Mobile primeiro. */

@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #050505;
  --bg-2: #0a0a0a;
  --card: #101010;
  --card-2: #141414;
  --line: #242424;
  --line-2: #2a2a2a;
  --white: #ffffff;
  --white-2: #f5f5f5;
  --muted: #a1a1a1;
  --dim: #737373;
  --red: #e10600;
  --red-2: #ff1f1f;
  --red-3: #8f0808;
  --glow: rgba(225, 6, 0, 0.2);

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;

  --radius: 16px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --fast: 200ms;

  color-scheme: dark;
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--white);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

p,
ul,
h1 {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

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

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Fundo ---------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    /* luz vermelha bem fraca atrás da foto */
    radial-gradient(520px 360px at 50% 0%, rgba(225, 6, 0, 0.09), transparent 70%),
    /* vinheta */
    radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.7) 100%),
    var(--bg);
}

/* Grid quase invisível, que some nas bordas. */
.bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: 50% 0;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 20%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 20%, transparent 80%);
}

/* Scanlines muito discretas. */
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.012) 0,
    rgba(255, 255, 255, 0.012) 1px,
    transparent 1px,
    transparent 3px
  );
}

.bg-net {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1200ms ease;
  /* Rede mais apagada atrás da coluna de conteúdo. */
  -webkit-mask-image: radial-gradient(ellipse 34rem 70% at 50% 45%, rgba(0, 0, 0, 0.55), #000 90%);
  mask-image: radial-gradient(ellipse 34rem 70% at 50% 45%, rgba(0, 0, 0, 0.55), #000 90%);
}

.bg-net.is-ready {
  opacity: 1;
}

/* ---------- Coluna ---------- */

.bio {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  padding:
    max(44px, calc(env(safe-area-inset-top) + 28px))
    max(16px, env(safe-area-inset-right))
    max(28px, calc(env(safe-area-inset-bottom) + 20px))
    max(16px, env(safe-area-inset-left));
}

/* ---------- Perfil ---------- */

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.avatar {
  position: relative;
  width: 112px;
  height: 112px;
  margin-bottom: 20px;
}

.avatar::before {
  /* luz vermelha só atrás da foto */
  content: "";
  position: absolute;
  inset: -40px;
  z-index: -1;
  background: radial-gradient(circle, rgba(225, 6, 0, 0.14), transparent 65%);
}

.avatar img {
  display: block;
  width: 112px;
  height: 112px;
  border-radius: 24px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 0 0 4px var(--bg),
    0 0 0 5px var(--line-2),
    0 18px 40px -12px rgba(0, 0, 0, 0.9);
}

.avatar-status {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px var(--bg);
}

.name {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--white);
}

.tagline {
  margin-top: 10px;
  max-width: 36ch;
  font-size: 0.9375rem;
  text-wrap: balance;
  color: var(--muted);
}

.focus {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}

.focus li {
  padding: 4px 9px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(16, 16, 16, 0.8);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ---------- Rótulos técnicos ---------- */

.label {
  margin: 32px 2px 10px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.label span {
  color: var(--red-2);
}

/* ---------- Card principal: YouTube ---------- */

.primary {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 20px;
  background:
    radial-gradient(420px 220px at 0% 0%, rgba(225, 6, 0, 0.14), transparent 70%),
    linear-gradient(180deg, var(--card-2), var(--card));
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
  transition:
    transform var(--fast) var(--ease),
    border-color var(--fast) var(--ease),
    box-shadow var(--fast) var(--ease);
}

/* Linha vermelha fina no topo do card. */
.primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red) 30%, var(--red-2) 50%, var(--red) 70%, transparent);
  opacity: 0.85;
}

/* Grid técnica dentro do card, só no canto direito. */
.primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(circle at 100% 100%, #000, transparent 60%);
  mask-image: radial-gradient(circle at 100% 100%, #000, transparent 60%);
  pointer-events: none;
}

.primary > * {
  position: relative;
  z-index: 1;
}

.primary-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.primary-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--red);
  color: var(--white);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 6px 20px -6px rgba(225, 6, 0, 0.6);
}

.primary-badge .icon {
  width: 24px;
  height: 24px;
}

.primary-badge .icon path:last-child {
  fill: currentColor;
}

.primary-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.primary-platform {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--white);
}

.primary-handle {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Rodapé do card: texto à esquerda, seta à direita, separados por uma linha. */
.primary-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line-2);
  color: var(--white);
  font-size: 0.9375rem;
  font-weight: 600;
}

.primary-go {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  background: var(--red);
  color: var(--white);
  transition: background-color var(--fast) var(--ease);
}

.primary-go .icon {
  width: 18px;
  height: 18px;
  transition: transform var(--fast) var(--ease);
}

/* ---------- Links secundários ---------- */

.links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 16, 16, 0.86);
  transition:
    transform var(--fast) var(--ease),
    background-color var(--fast) var(--ease),
    border-color var(--fast) var(--ease);
}

.link-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  background: var(--card-2);
  color: var(--white-2);
}

.link-icon .icon {
  width: 19px;
  height: 19px;
}

.link-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  line-height: 1.3;
}

.link-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--white);
}

.link-sub {
  overflow: hidden;
  font-size: 0.8125rem;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.link-arrow {
  width: 18px;
  height: 18px;
  color: var(--dim);
  transition:
    transform var(--fast) var(--ease),
    color var(--fast) var(--ease);
}

@media (min-width: 560px) {
  .links {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Rodapé ---------- */

.foot {
  margin-top: 40px;
  text-align: center;
}

.foot-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--white-2);
}

.foot-tags {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.foot-tags span {
  color: var(--red-2);
}

/* ---------- Interações ---------- */

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

@media (hover: hover) and (pointer: fine) {
  .primary:hover {
    transform: translateY(-2px);
    border-color: var(--red);
    box-shadow:
      0 0 30px rgba(225, 6, 0, 0.1),
      0 24px 60px -30px rgba(0, 0, 0, 0.9);
  }

  .primary:hover .primary-go {
    background: var(--red-2);
  }

  .primary:hover .primary-go .icon {
    transform: translateX(3px);
  }

  .link:hover {
    transform: translateY(-2px);
    border-color: #3a3a3a;
    background: rgba(22, 22, 22, 0.94);
  }

  .link:hover .link-arrow {
    color: var(--white);
    transform: translate(2px, -2px);
  }
}

/* Feedback de toque. */
.primary:active,
.link:active {
  transform: scale(0.985);
  transition-duration: 80ms;
}

.link:active {
  background: rgba(24, 24, 24, 0.95);
}

/* ---------- Entrada ---------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(var(--from, 8px));
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.avatar {
  animation: pop 450ms var(--ease) both;
}

.name {
  animation: rise 400ms var(--ease) 80ms both;
}

.focus,
.tagline {
  animation: fade 400ms ease 160ms both;
}

.label {
  animation: fade 400ms ease 240ms both;
}

.primary {
  --from: 12px;
  animation: rise 450ms var(--ease) 220ms both;
}

.links li {
  animation: rise 380ms var(--ease) both;
}

.links li:nth-child(1) { animation-delay: 360ms; }
.links li:nth-child(2) { animation-delay: 420ms; }
.links li:nth-child(3) { animation-delay: 480ms; }
.links li:nth-child(4) { animation-delay: 540ms; }

.foot {
  animation: fade 400ms ease 560ms both;
}

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

  .primary:hover,
  .link:hover,
  .primary:active,
  .link:active {
    transform: none;
  }
}

/* ---------- Telas pequenas ---------- */

@media (max-width: 374px) {
  .primary {
    padding: 18px;
  }
}

@media (min-width: 768px) {
  .bio {
    padding-top: 72px;
  }

  .avatar,
  .avatar img {
    width: 120px;
    height: 120px;
  }

  .name {
    font-size: 2rem;
  }

  .primary {
    padding: 24px;
  }
}
