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

:root {
  --bg: #0b1018;
  --panel: rgba(18, 27, 40, 0.82);
  --panel-hover: rgba(27, 39, 56, 0.95);
  --border: rgba(255, 255, 255, 0.15);
  --text: #f8faff;
  --muted: #bec7d5;
  --faint: #8e99aa;
  --accent: #8392ff;
  --accent-2: #59e0d2;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

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

.links-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(11, 16, 24, 0.44), rgba(11, 16, 24, 0.94)),
    linear-gradient(90deg, rgba(11, 16, 24, 0.62), rgba(11, 16, 24, 0.12)),
    url("../images/background-contact.webp") 50% center / cover no-repeat;
}

.links-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 14% 18%, rgba(89, 224, 210, 0.12), transparent 26rem),
    radial-gradient(circle at 84% 30%, rgba(131, 146, 255, 0.15), transparent 28rem);
}

.links-page {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 32px), 720px);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 38px 0 26px;
}

.back-link {
  align-self: flex-start;
  color: var(--muted);
  font-size: 0.88rem;
  transition: color 0.2s ease;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--accent-2);
}

.links-profile {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin-top: 62px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--border);
}

.links-logo {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(131, 146, 255, 0.44);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(89, 224, 210, 0.12), rgba(131, 146, 255, 0.16)),
    rgba(18, 27, 40, 0.9);
  color: var(--text);
  font-size: 1.9rem;
  font-weight: 900;
  letter-spacing: -0.09em;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.28);
}

.links-name {
  color: var(--accent-2);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin-top: 5px;
  font-size: clamp(2.6rem, 8vw, 4.3rem);
  line-height: 1;
  letter-spacing: -0.065em;
}

.links-intro {
  max-width: 580px;
  margin-top: 14px;
  color: var(--muted);
}

.links-list {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.link-card {
  min-height: 88px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 32px;
  gap: 17px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(14px);
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease;
}

.link-card:hover,
.link-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(89, 224, 210, 0.45);
  background: var(--panel-hover);
}

.link-card-primary {
  border-color: rgba(131, 146, 255, 0.42);
  background:
    linear-gradient(90deg, rgba(131, 146, 255, 0.12), rgba(18, 27, 40, 0.84)),
    var(--panel);
}

.link-index {
  color: var(--accent-2);
  font: 750 0.75rem Consolas, monospace;
}

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

.link-content strong,
.link-content small {
  display: block;
}

.link-content strong {
  font-size: 1.05rem;
}

.link-content small {
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.8rem;
}

.link-arrow {
  justify-self: end;
  color: var(--accent);
  font-size: 1.16rem;
}

.links-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 38px;
  color: var(--faint);
  font-size: 0.77rem;
}

@media (prefers-reduced-motion: reduce) {
  .link-card {
    transition: none;
  }
}

@media (max-width: 520px) {
  .links-page {
    width: min(calc(100% - 24px), 720px);
    padding-top: 24px;
  }

  .links-profile {
    grid-template-columns: 66px minmax(0, 1fr);
    gap: 17px;
    margin-top: 45px;
  }

  .links-logo {
    width: 66px;
    height: 66px;
    border-radius: 17px;
    font-size: 1.48rem;
  }

  h1 {
    font-size: 2.65rem;
  }

  .links-intro {
    grid-column: 1 / -1;
    font-size: 0.93rem;
  }

  .link-card {
    min-height: 82px;
    grid-template-columns: 32px minmax(0, 1fr) 24px;
    gap: 12px;
    padding: 16px 15px;
  }

  .links-footer {
    flex-direction: column;
    gap: 4px;
  }
}
