:root {
  color-scheme: light;
  --ink: #171412;
  --muted: #706860;
  --paper: #fff8ef;
  --panel: #ffffff;
  --line: #eadfd2;
  --accent: #c65f71;
  --accent-dark: #7d3040;
  --shadow: 0 14px 34px rgba(49, 34, 24, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 248, 239, 0.94), rgba(246, 235, 222, 0.98)),
    var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.link-page,
.admin-page {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 2rem 1rem 2.5rem;
}

.profile {
  display: grid;
  justify-items: center;
  padding: 1.25rem 0 1rem;
  text-align: center;
}

.avatar {
  width: 6rem;
  height: 6rem;
  margin-bottom: 0.85rem;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: var(--shadow);
  object-fit: cover;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.2rem;
  font-size: 1.85rem;
  line-height: 1.05;
}

.wordmark {
  margin-bottom: 0.22rem;
  font-size: clamp(2rem, 9vw, 2.75rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.95;
}

.wordmark span {
  display: inline-block;
  transform: rotate(-1.2deg);
  text-shadow:
    0.035em 0.035em 0 #ffffff,
    0 0.12em 0 rgba(198, 95, 113, 0.16);
}

.handle {
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.bio {
  max-width: 22rem;
  margin-bottom: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.45;
}

.social-block {
  margin-top: 1.35rem;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.65rem 0 0.1rem;
}

.social-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.95rem;
  height: 2.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}

.social-chip svg {
  width: 1.42rem;
  height: 1.42rem;
  fill: currentColor;
}

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

.group {
  display: grid;
  gap: 0.55rem;
}

.group__title {
  margin: 0;
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.group__description {
  display: none;
}

.link-list {
  display: grid;
  gap: 0.7rem;
}

.link-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
  align-items: center;
  min-height: 4.35rem;
  border: 1px solid rgba(23, 20, 18, 0.1);
  border-radius: 8px;
  padding: 0.9rem 0.95rem;
  background: var(--panel);
  box-shadow: 0 7px 18px rgba(49, 34, 24, 0.07);
  text-decoration: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.link-card:hover,
.link-card:focus-visible {
  border-color: rgba(198, 95, 113, 0.55);
  box-shadow: var(--shadow);
  outline: none;
  transform: translateY(-1px);
}

.link-card--featured {
  border-color: rgba(71, 132, 214, 0.46);
  background: #eef6ff;
  box-shadow:
    inset 4px 0 0 rgba(71, 132, 214, 0.8),
    0 12px 26px rgba(48, 88, 142, 0.14);
}

.link-card__title {
  display: block;
  margin-bottom: 0.22rem;
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.2;
}

.link-card__note {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.3;
}

.affiliate-disclosure {
  max-width: 27rem;
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
  text-align: center;
}

.tag {
  color: var(--accent-dark);
  font-size: 1.25rem;
  line-height: 1;
}

.site-footer {
  display: flex;
  justify-content: center;
  padding-top: 1.4rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.admin-page {
  width: min(100%, 860px);
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-header h1 {
  margin: 0;
}

.small-link {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.65rem 0.8rem;
  background: #fff;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.admin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.button {
  min-height: 2.75rem;
  border: 0;
  border-radius: 6px;
  padding: 0.75rem 0.9rem;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.button--danger {
  background: var(--accent-dark);
}

.insight-grid {
  display: grid;
  gap: 0.65rem;
}

.insight-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.8rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.8rem;
  background: #fff;
}

.insight-title {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 750;
}

.insight-count {
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.insight-date {
  display: none;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (min-width: 680px) {
  .link-page {
    padding-top: 3rem;
  }

  .insight-date {
    display: block;
  }
}
