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

:root {
  --white: #ffffff;
  --ink: #131515;
  --ink-70: rgba(19, 21, 21, 0.7);
  --ink-55: rgba(19, 21, 21, 0.55);
  --ink-40: rgba(19, 21, 21, 0.4);
  --ink-08: rgba(19, 21, 21, 0.08);
  --ink-05: rgba(19, 21, 21, 0.05);
  --line: rgba(19, 21, 21, 0.09);
  --blue: #53ff45;
  --green: #53ff45;

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html,
body {
  min-height: 100%;
  background: var(--white);
  color: var(--ink);
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--ink);
  color: var(--white);
}

/* Layout */
.page {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px 20px calc(32px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 40px;
}

@media (min-width: 400px) {
  .page {
    padding: 44px 24px calc(44px + env(safe-area-inset-bottom));
    gap: 48px;
  }
}

/* Cabeçalho */
.header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.avatar {
  position: relative;
  display: inline-block;
  width: 72px;
  height: 72px;
  border-radius: 50%;
}
.avatar-frame {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--ink-05);
  overflow: hidden;
}
.avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid var(--white);
}

.identity {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-55);
  letter-spacing: -0.01em;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(83, 255, 69, 0.18);
}
.name {
  font-size: clamp(30px, 8vw, 38px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--ink);
  word-break: break-word;
}
.tagline {
  font-size: 15px;
  color: var(--ink-55);
  max-width: 30ch;
  letter-spacing: -0.005em;
}

/* Primeiro botão de ação */
.cta {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 22px;
  background: var(--ink);
  color: var(--white);
  border-radius: 999px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 200ms var(--ease), background 200ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.cta svg {
  width: 16px;
  height: 16px;
  transition: transform 200ms var(--ease);
}
.cta:hover {
  background: var(--blue);
}
.cta:hover svg {
  transform: translateX(3px);
}
.cta:active {
  transform: scale(0.985);
}
.cta:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* Grupos */
.group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 4px;
}
.group-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.group-meta {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--ink-40);
  letter-spacing: 0.05em;
}

.list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Cards dos Links */
.link {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 12px 16px 12px 12px;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 200ms var(--ease), background 200ms var(--ease),
    transform 200ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.link:hover {
  background: var(--ink-05);
  border-color: transparent;
}
.link:active {
  transform: scale(0.99);
}
.link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.link-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: background 200ms var(--ease), color 200ms var(--ease),
    border-color 200ms var(--ease);
}
.link-icon svg {
  width: 20px;
  height: 20px;
}
.link:hover .link-icon {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.link-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.link-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link-handle {
  font-size: 12.5px;
  color: var(--ink-55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-arrow {
  width: 18px;
  height: 18px;
  color: var(--ink-40);
  transition: transform 200ms var(--ease), color 200ms var(--ease);
  flex-shrink: 0;
}
.link:hover .link-arrow {
  color: var(--ink);
  transform: translateX(3px);
}

/* Accent variant — used sparingly (green) */
.link-accent .link-icon {
  background: var(--green);
  color: var(--ink);
  border-color: var(--green);
}
.link-accent:hover .link-icon {
  background: var(--green);
  color: var(--ink);
  border-color: var(--green);
  filter: brightness(0.96);
}

/* Rodapé — centralizado */
.footer {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--line);
}

.footer-text {
  font-size: 12px;
  color: var(--ink-55);
  letter-spacing: -0.005em;
  text-align: center;
}

/* Responsividade */
@media (max-width: 340px) {
  .link {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 14px 10px 10px;
    min-height: 64px;
  }
  .link-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
  .link-name {
    font-size: 14px;
  }
  .link-handle {
    font-size: 12px;
  }
}

/* Preferencia de Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
