:root {
  color-scheme: dark;
  --bg: #06070a;
  --surface: rgba(15, 18, 24, 0.76);
  --surface-strong: rgba(28, 31, 38, 0.9);
  --text: #f6f4ee;
  --muted: #aaa9a3;
  --line: rgba(255, 255, 255, 0.11);
  --red: #ef3f45;
  --red-soft: rgba(239, 63, 69, 0.16);
  --cream: #e9dfc6;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
  isolation: isolate;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 18%, rgba(185,28,28,.22), transparent 24%),
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.06), transparent 20%),
    radial-gradient(circle at top center, rgba(127,29,29,.18), transparent 34%),
    linear-gradient(180deg, rgba(4,6,10,.06) 0%, rgba(4,6,10,.18) 40%, rgba(4,6,10,.48) 100%),
    url('/assets/capthook-home-desktop-bg.jpg');
  background-position:center top, center top, center top, center top, center center;
  background-repeat:no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
  background-size:auto, auto, auto, auto, cover;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  pointer-events: none;
  opacity: .08;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.16) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 1px, transparent 1px 4px);
  mix-blend-mode: soft-light;
}

.ambient {
  position: fixed;
  z-index: -2;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(110px);
  opacity: .15;
  pointer-events: none;
}

.ambient-one { top: -12rem; right: -10rem; background: var(--red); }
.ambient-two { bottom: -16rem; left: -12rem; background: #60656f; }

.shell {
  width: min(100% - 32px, 680px);
  margin: 0 auto;
  padding: max(54px, env(safe-area-inset-top)) 0 max(42px, env(safe-area-inset-bottom));
}

.profile { text-align: center; }

.avatar-wrap {
  display: inline-grid;
  place-items: center;
  width: 116px;
  height: 116px;
  padding: 6px;
  border: 1px solid rgba(233, 223, 198, 0.28);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.035));
  backdrop-filter: blur(16px) saturate(125%);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(0,0,0,.38);
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  object-fit: cover;
  background: #161816;
}

.eyebrow {
  margin: 24px 0 8px;
  color: var(--red);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .24em;
}

h1 {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(36px, 9vw, 52px);
  font-weight: 850;
  letter-spacing: -.045em;
}

.bio {
  max-width: 520px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(10, 12, 17, .66);
  box-shadow: 0 10px 24px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(14px) saturate(125%);
  -webkit-backdrop-filter: blur(14px) saturate(125%);
  font-size: 13px;
  font-weight: 720;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.social-pill:hover,
.social-pill:focus-visible {
  border-color: rgba(239, 63, 69, .65);
  background: var(--red-soft);
  transform: translateY(-2px);
}

.link-groups { margin-top: 36px; }

.link-group + .link-group { margin-top: 28px; }

.group-title {
  margin: 0 0 10px 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 830;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.link-list { display: grid; gap: 12px; }

.link-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 78px;
  padding: 16px 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 18px 44px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.06);
  text-decoration: none;
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.link-logo-wrap {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-right: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 13px;
  background: rgba(255,255,255,.94);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.46);
}

.link-logo-wrap[hidden] { display: none; }

.link-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.link-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  content: "";
  background: var(--red);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform .18s ease;
}

.link-card:hover,
.link-card:focus-visible {
  border-color: rgba(239, 63, 69, .52);
  background: var(--surface-strong);
  transform: translateY(-2px);
}

.link-card:hover::before,
.link-card:focus-visible::before { transform: scaleY(1); }

.link-card.featured {
  border-color: rgba(239, 63, 69, .42);
  background: linear-gradient(110deg, rgba(127,29,29,.44), rgba(14,17,23,.88) 54%);
}

.link-copy { min-width: 0; }

.link-title-row { display: flex; align-items: center; gap: 9px; }

.link-title {
  overflow: hidden;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  color: #ffe8e8;
  background: var(--red-soft);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.link-description {
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-arrow {
  margin-left: 14px;
  color: var(--cream);
  font-size: 24px;
  line-height: 1;
  transition: transform .18s ease;
}

.link-card:hover .link-arrow { transform: translateX(3px); }

.loading-card,
.empty-card,
.error-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: var(--surface);
  text-align: center;
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}

.error-card { color: #ffc1c3; border-color: rgba(239,63,69,.35); }

.footer {
  margin-top: 38px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: #85857f;
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

.footer p { margin: 7px 0; }
.footer a { color: #bcb8ad; }
.copyright { letter-spacing: .05em; }
.noscript { padding: 20px; color: white; text-align: center; }

:focus-visible { outline: 3px solid rgba(239,63,69,.62); outline-offset: 3px; }

@media (max-width: 520px) {
  .shell {
    width: min(100% - 24px, 680px);
    padding-top: max(34px, env(safe-area-inset-top));
    padding-bottom: max(30px, env(safe-area-inset-bottom));
  }
  .avatar-wrap { width: 102px; height: 102px; border-radius: 25px; }
  .avatar { border-radius: 19px; }
  .link-groups { margin-top: 30px; }
  .link-card { min-height: 74px; padding: 15px 16px; }
  .link-logo-wrap { width: 42px; height: 42px; margin-right: 12px; border-radius: 12px; }
  .link-logo { width: 31px; height: 31px; }
}

@media (max-width: 900px) {
  body::before {
    background:
      radial-gradient(circle at 50% 14%, rgba(185,28,28,.22), transparent 24%),
      radial-gradient(circle at 50% 0%, rgba(255,255,255,.06), transparent 18%),
      radial-gradient(circle at top center, rgba(127,29,29,.18), transparent 34%),
      linear-gradient(180deg, rgba(4,6,10,.05) 0%, rgba(4,6,10,.2) 42%, rgba(4,6,10,.5) 100%),
      url('/assets/capthook-home-mobile-bg.jpg');
    background-position:center top, center top, center top, center top, center top;
    background-repeat:no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
    background-size:auto, auto, auto, auto, cover;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
