/* links.felipesimas.com.br — mesma identidade da página de links (tema felipesimas-links) */
:root {
  --ink: #121212;
  --bg: #f6f6f4;
  --dash: rgba(18,18,18,.16);
  --rw: min(560px, calc(100vw - 20px));
  --white: #ffffff;
  --blue: #0066ff;
  --blue-d: #0052cc;
  --text: #5a5a5a;
  --muted: #8c8c8c;
  --line: #e4e4e1;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --r: 18px;
  --hub: #d4ff3a;
  --hub-d: #c3f01c;
  --hub-ink: #111114;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  position: relative; overflow-x: hidden; min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-optical-sizing: auto; font-size: 16px; line-height: 1.5;
  color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap { position: relative; z-index: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 0 28px; }

/* fundo: papel com ruído + guias tracejadas */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.rails { position: fixed; top: 0; bottom: 0; left: 50%; width: var(--rw); transform: translateX(-50%); z-index: 0; pointer-events: none; }
.rails::before, .rails::after { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: repeating-linear-gradient(180deg, var(--dash) 0 4px, transparent 4px 8px); }
.rails::before { left: 0; }
.rails::after { right: 0; }
.hr { position: relative; width: 100vw; left: 50%; margin-left: -50vw; height: 1px; background: repeating-linear-gradient(90deg, var(--dash) 0 4px, transparent 4px 8px); }
.hr::before, .hr::after { content: ""; position: absolute; top: -3px; width: 7px; height: 7px; border-radius: 2px; background: var(--bg); border: 1px solid rgba(18,18,18,.22); }
.hr::before { left: calc(50% - var(--rw) / 2 - 3px); }
.hr::after { left: calc(50% + var(--rw) / 2 - 4px); }

/* topo */
.top { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 22px 0; }
.top .logo img { height: 40px; width: auto; }
.top .me { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; border: 2px solid var(--white); box-shadow: 0 0 0 1px var(--line), 0 6px 16px -8px rgba(18,18,18,.4); }

/* título da página */
.profile { padding: 44px 0 40px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--blue); }
h1 { margin-top: 14px; font-size: clamp(30px, 8.4vw, 40px); line-height: 1.06; letter-spacing: -.05em; font-weight: 600; }
.hl { color: var(--blue); }
.lead { margin-top: 14px; font-size: 17px; line-height: 1.55; letter-spacing: -.01em; color: var(--text); }

/* botão copiar todos */
.copy-all {
  margin-top: 24px; display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 20px 0 16px;
  border-radius: 999px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 500; letter-spacing: -.01em;
  transition: background .3s, transform .4s var(--ease);
}
.copy-all:hover { background: var(--blue); transform: translateY(-2px); }
.copy-all:active { transform: scale(.98); }
.copy-all svg { width: 18px; height: 18px; }

/* lista de repositórios */
.repos { display: grid; gap: 8px; padding: 26px 0 32px; }
.repo {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; align-items: center;
  padding: 16px 14px 16px 18px; border-radius: var(--r); background: var(--white); border: 1px solid var(--line);
  transition: transform .45s var(--ease), border-color .3s, box-shadow .45s var(--ease);
}
.repo { cursor: pointer; }
.repo .stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--r); }
.repo .stretch:focus-visible { outline: none; }
.repo .stretch:focus-visible::after { outline: 2px solid var(--blue); outline-offset: 2px; }
.repo .url, .repo .acts { position: relative; z-index: 2; }
.repo:hover strong { color: var(--blue); }
.repo:hover { transform: translateY(-2px); border-color: #cfcfcb; box-shadow: 0 14px 30px -18px rgba(18,18,18,.35); }
.repo small { display: block; font-size: 11.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.repo strong { display: block; margin-top: 3px; font-size: 19px; line-height: 1.2; letter-spacing: -.03em; font-weight: 600; }
.repo p { margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--text); }
.repo .note { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.repo .url { margin-top: 8px; display: block; font: 500 12.5px/1.3 ui-monospace, "SF Mono", Menlo, monospace; color: var(--muted); overflow-wrap: anywhere; }
.repo .url:hover { color: var(--blue); }
.acts { display: flex; flex-direction: column; gap: 8px; }
.btn {
  width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center;
  transition: transform .45s var(--ease), background .3s, color .3s, border-color .3s;
}
.btn svg { width: 18px; height: 18px; }
.btn--open { background: var(--ink); color: #fff; font-size: 15px; }
.btn--open:hover { transform: rotate(-45deg); background: var(--blue); }
.btn--copy { background: var(--bg); color: var(--ink); border: 1px solid var(--line); }
.btn--copy:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn--copy.ok { background: var(--blue); border-color: var(--blue); color: #fff; }

/* cards de navegação (home) e Design Hub */
.card {
  position: relative; isolation: isolate; display: flex; align-items: center; gap: 16px; padding: 14px 14px 14px 18px;
  border-radius: var(--r); background: var(--white); border: 1px solid var(--line); overflow: hidden;
  transition: transform .45s var(--ease), border-color .3s, background .3s, box-shadow .45s var(--ease);
}
.card:hover { transform: translateY(-2px); border-color: #cfcfcb; box-shadow: 0 14px 30px -18px rgba(18,18,18,.35); }
.card:active { transform: scale(.985); }
.card > * { position: relative; z-index: 1; }
.txt { flex: 1; min-width: 0; }
.txt small { display: block; font-size: 11.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.txt strong { display: block; margin-top: 3px; font-size: 18px; line-height: 1.2; letter-spacing: -.03em; font-weight: 600; }
.txt span { display: block; margin-top: 3px; font-size: 13.5px; color: var(--text); }
.ar { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 15px; transition: transform .45s var(--ease); }
.card:hover .ar { transform: rotate(-45deg); }
.ic { width: 48px; height: 48px; flex: none; border-radius: 12px; display: grid; place-items: center; }

.extra { padding: 28px 0 32px; }
.extra-title { font-size: 11.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.card--hub { background: var(--hub); border-color: var(--hub); color: var(--hub-ink); }
.card--hub::before { content: ""; position: absolute; z-index: 0; left: -20%; bottom: -120%; width: 70%; height: 220%; background: radial-gradient(closest-side, rgba(255,255,255,.55), rgba(255,255,255,0)); pointer-events: none; }
.card--hub::after { content: ""; position: absolute; z-index: 0; top: 0; bottom: 0; left: -45%; width: 30%; pointer-events: none; background: linear-gradient(100deg, transparent, rgba(255,255,255,.6), transparent); transform: skewX(-18deg); }
.card--hub:hover { background: var(--hub-d); border-color: var(--hub-d); box-shadow: 0 18px 34px -18px rgba(150,200,0,.95); }
.card--hub .ic { background: var(--hub-ink); }
.card--hub .ic img { width: 24px; height: 24px; }
.card--hub .txt small { color: rgba(17,17,20,.62); }
.card--hub .txt span { color: rgba(17,17,20,.74); }
.card--hub .ar { background: var(--hub-ink); color: var(--hub); }

/* rodapé */
.foot { position: relative; z-index: 1; padding: 24px 0 calc(28px + env(safe-area-inset-bottom)); }
.foot .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.social { display: flex; gap: 8px; }
.social a { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); display: grid; place-items: center; color: var(--ink); transition: background .3s, color .3s, border-color .3s, transform .4s var(--ease); }
.social a:hover { background: var(--blue); border-color: var(--blue); color: #fff; transform: translateY(-2px); }
.back { font-size: 14px; color: var(--text); }
.back:hover { color: var(--blue); }
.legal { margin-top: 20px; font-size: 12px; color: var(--muted); }

/* aviso de cópia */
.toast {
  position: fixed; z-index: 10; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .45s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* entrada */
@media (prefers-reduced-motion: no-preference) {
  .in { opacity: 0; transform: translateY(18px); animation: up .9s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 70ms + 80ms); }
  @keyframes up { to { opacity: 1; transform: none; } }
  .card--hub::after { animation: hub-shine 4.2s var(--ease) 1.6s infinite; }
  @keyframes hub-shine { 0% { left: -45%; } 45%, 100% { left: 130%; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 360px) {
  .wrap { padding: 0 20px; }
  .repo strong { font-size: 17px; }
}
