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

html {
  color-scheme: dark;
  background: var(--accent);
  overflow-x: clip;
  scroll-behavior: smooth;
}

body,
h1,
h2,
p {
  margin: 0;
}

body {
  min-width: 320px;
  min-height: 100dvh;
  overflow-x: clip;
  background:
    radial-gradient(circle at 88% 14%, rgba(255, 255, 255, 0.13), transparent 28rem),
    radial-gradient(circle at 8% 82%, rgba(0, 40, 140, 0.22), transparent 32rem),
    var(--accent);
  color: var(--text-on-accent);
  font-family: var(--font-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.2) 0.7px, transparent 0.7px);
  background-size: 24px 24px;
  content: "";
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 72%);
  pointer-events: none;
}

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

img,
svg {
  display: block;
}

:focus-visible {
  outline: 3px solid #84ffdc;
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  color: var(--accent);
  font-weight: 700;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.links-shell {
  position: relative;
  z-index: 1;
  width: min(100% - 40px, 720px);
  min-height: 100dvh;
  margin-inline: auto;
  padding-block: 34px 28px;
}

.ambient-mark {
  position: absolute;
  z-index: -1;
  top: 54px;
  right: -215px;
  width: min(58vw, 380px);
  filter: drop-shadow(0 26px 36px rgba(0, 40, 130, 0.28));
  opacity: 0.12;
  pointer-events: none;
  transform: rotate(7deg);
}

.ambient-mark img {
  width: 100%;
  height: auto;
}

.profile-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-logo {
  display: inline-flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
}

.profile-logo img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.back-link {
  display: inline-flex;
  min-height: 44px;
  padding: 10px 14px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
}

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

.link-card {
  position: relative;
  display: grid;
  min-height: 94px;
  padding: 18px 20px;
  align-items: center;
  grid-template-columns: 36px minmax(0, 1fr) 34px;
  gap: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 20px;
  background: rgba(0, 53, 164, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 18px 36px rgba(0, 42, 132, 0.14);
  backdrop-filter: blur(18px);
}

.link-card::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.12), transparent 42%);
  content: "";
  opacity: 0;
  pointer-events: none;
}

.link-card--primary {
  min-height: 112px;
  border-color: #fff;
  background: #fff;
  color: var(--accent);
  box-shadow: 0 24px 46px rgba(0, 35, 115, 0.24);
}

.link-index {
  align-self: start;
  padding-top: 4px;
  color: rgba(255, 255, 255, 0.64);
  font-family: var(--font-mono);
  font-size: 0.67rem;
}

.link-card--primary .link-index {
  color: rgba(1, 87, 221, 0.56);
}

.link-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.link-copy strong {
  font-size: clamp(1rem, 3.3vw, 1.2rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.18;
  text-wrap: balance;
}

.link-copy small {
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--font-secondary);
  font-size: 0.81rem;
  line-height: 1.35;
}

.link-card--primary .link-copy small {
  color: rgba(1, 58, 150, 0.7);
}

.link-arrow {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  justify-self: end;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  font-size: 1rem;
}

.link-card--primary .link-arrow {
  border-color: rgba(1, 87, 221, 0.22);
  background: var(--accent-subtle-bg);
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.link-card--compact {
  min-height: 112px;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
}

.link-card--compact .link-index {
  grid-column: 1;
  grid-row: 1;
}

.link-card--compact .link-copy {
  grid-column: 1 / -1;
  grid-row: 2;
}

.link-card--compact .link-arrow {
  grid-column: 2;
  grid-row: 1;
}

.social-section {
  margin-top: 38px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.social-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.social-heading h2 {
  font-size: 1.55rem;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.social-heading p {
  color: rgba(255, 255, 255, 0.66);
  font-family: var(--font-secondary);
  font-size: 0.82rem;
}

.social-links {
  display: grid;
  margin-top: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.social-links a {
  display: grid;
  min-height: 84px;
  padding: 14px;
  align-items: center;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  background: rgba(0, 53, 164, 0.22);
  font-size: 0.84rem;
  font-weight: 600;
}

.social-links svg {
  width: 21px;
  height: 21px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.social-links svg .social-dot {
  fill: currentColor;
  stroke: none;
}

.links-footer {
  display: flex;
  margin-top: 42px;
  padding-top: 20px;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.66);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

@media (hover: hover) and (pointer: fine) {
  .back-link:hover,
  .link-card:hover,
  .social-links a:hover {
    border-color: rgba(255, 255, 255, 0.7);
    background-color: rgba(0, 60, 182, 0.48);
  }

  .link-card--primary:hover {
    border-color: #fff;
    background-color: #f3f7ff;
  }

  .link-card:hover .link-arrow,
  .social-links a:hover > span:last-child,
  .back-link:hover span {
    transform: translate(2px, -2px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .profile-logo,
  .link-card,
  .social-section,
  .links-footer {
    animation: link-enter 700ms var(--ease-enter) both;
  }

  .link-card:nth-child(1) { animation-delay: 60ms; }
  .link-card:nth-child(2) { animation-delay: 110ms; }
  .link-card:nth-child(3) { animation-delay: 160ms; }
  .link-grid { animation-delay: 210ms; }
  .social-section { animation-delay: 260ms; }
  .links-footer { animation-delay: 310ms; }

  .back-link,
  .link-card,
  .link-card::before,
  .link-arrow,
  .social-links a,
  .social-links a > span:last-child {
    transition:
      transform 240ms var(--ease-move),
      background-color 240ms var(--ease-enter),
      border-color 240ms var(--ease-enter),
      opacity 240ms var(--ease-enter);
  }

  .link-card:active,
  .social-links a:active,
  .back-link:active {
    transform: scale(0.985);
  }

  @keyframes link-enter {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 560px) {
  .links-shell {
    width: min(100% - 28px, 720px);
    padding-block: 20px 24px;
  }

  .profile-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .profile-logo img {
    width: 34px;
    height: 34px;
  }

  .back-link {
    min-height: 40px;
    padding-inline: 12px;
    font-size: 0.61rem;
  }

  .ambient-mark {
    top: 48px;
    right: -132px;
    width: 240px;
    opacity: 0.1;
  }

  .link-list {
    margin-top: 42px;
  }

  .link-card {
    min-height: 88px;
    padding: 16px;
    grid-template-columns: 30px minmax(0, 1fr) 32px;
    gap: 10px;
    border-radius: 17px;
  }

  .link-card--primary {
    min-height: 104px;
  }

  .link-grid {
    grid-template-columns: 1fr;
  }

  .link-card--compact {
    min-height: 88px;
    grid-template-columns: 30px minmax(0, 1fr) 32px;
    grid-template-rows: auto;
  }

  .link-card--compact .link-index,
  .link-card--compact .link-copy,
  .link-card--compact .link-arrow {
    grid-column: auto;
    grid-row: auto;
  }

  .social-heading {
    align-items: start;
    flex-direction: column;
    gap: 4px;
  }

  .social-links {
    grid-template-columns: 1fr;
  }

  .social-links a {
    min-height: 62px;
  }

  .links-footer {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }
}
