:root {
  --ink: #192432;
  --muted: #68707a;
  --paper: #f6f0e4;
  --paper-deep: #e9dfcf;
  --mint: #8ddcc4;
  --orange: #ff805e;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #0a101b;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: #0a101b;
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.page-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  padding: 42px 18px 38px;
}

.background-art,
.background-wash {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.background-art {
  z-index: -3;
  background-image: url("assets/background.webp");
  background-position: center;
  background-size: cover;
  filter: saturate(0.72) contrast(0.94);
  transform: scale(1.025);
  animation: background-enter 900ms ease-out both;
}

.background-wash {
  z-index: -2;
  background:
    radial-gradient(circle at 16% 12%, rgba(141, 220, 196, 0.16), transparent 28%),
    radial-gradient(circle at 88% 88%, rgba(255, 128, 94, 0.15), transparent 30%),
    rgba(8, 14, 24, 0.42);
}

.link-panel {
  position: relative;
  width: min(100%, 520px);
  padding: 34px 27px 24px;
  border: 2px solid var(--ink);
  border-radius: 26px 20px 29px 23px / 22px 29px 21px 28px;
  background:
    repeating-linear-gradient(0deg, transparent 0, transparent 27px, rgba(25, 36, 50, 0.025) 28px),
    var(--paper);
  box-shadow:
    8px 9px 0 rgba(9, 15, 24, 0.88),
    0 28px 70px rgba(0, 0, 0, 0.32);
  transform: rotate(0.12deg);
  animation: panel-enter 520ms ease-out both;
}

.link-panel::before,
.link-panel::after {
  position: absolute;
  z-index: 3;
  top: -15px;
  width: 76px;
  height: 29px;
  border: 1px solid rgba(94, 70, 43, 0.18);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0, rgba(255, 255, 255, 0.1) 4px, transparent 4px, transparent 8px),
    rgba(232, 196, 133, 0.88);
  box-shadow: 0 3px 7px rgba(23, 29, 37, 0.16);
  content: "";
}

.link-panel::before {
  left: 34px;
  transform: rotate(-7deg);
}

.link-panel::after {
  right: 34px;
  transform: rotate(6deg);
}

.profile-header {
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

.avatar-frame {
  position: relative;
  width: 116px;
  height: 116px;
  padding: 4px;
  border: 3px solid var(--ink);
  border-radius: 48% 52% 47% 53% / 53% 46% 54% 47%;
  background: #fffdf8;
  box-shadow: 5px 5px 0 var(--orange);
  transform: rotate(-2deg);
}

.avatar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 48% 52% 47% 53% / 53% 46% 54% 47%;
  object-fit: cover;
}

.status-dot {
  position: absolute;
  right: -2px;
  bottom: 7px;
  width: 18px;
  height: 18px;
  border: 3px solid var(--ink);
  border-radius: 46% 54% 48% 52%;
  background: var(--mint);
}

h1 {
  margin: 20px 0 0;
  color: var(--ink);
  font-family: "Marker Felt", "Bradley Hand", "Comic Sans MS", Arial, sans-serif;
  font-size: clamp(2.1rem, 9vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}

.title-flourish {
  display: flex;
  align-items: center;
  width: 126px;
  gap: 9px;
  margin: 14px 0 24px;
  color: var(--orange);
  transform: rotate(-1deg);
}

.title-flourish span {
  width: 100%;
  border-top: 2px dashed rgba(25, 36, 50, 0.42);
}

.title-flourish span:last-child {
  transform: rotate(-2deg);
}

.title-flourish b {
  font-size: 0.85rem;
}

.social-links {
  display: grid;
  gap: 12px;
}

.social-card {
  --accent: #fff;
  --delay: 0ms;
  --tilt: 0deg;
  display: grid;
  grid-template-columns: 52px 1fr 40px;
  align-items: center;
  min-height: 76px;
  gap: 15px;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 17px 13px 16px 12px / 13px 17px 12px 16px;
  outline: none;
  background: #fffdfa;
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(var(--tilt));
  animation: card-enter 480ms ease-out var(--delay) both;
  transition: transform 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.icon-box,
.arrow-box {
  display: grid;
  place-items: center;
}

.icon-box {
  width: 52px;
  height: 52px;
  border: 2px solid var(--ink);
  border-radius: 14px 10px 13px 11px;
  color: var(--ink);
  background: var(--accent);
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 1.42rem;
  transform: rotate(-1.5deg);
}

.icon-box svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.card-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.platform {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.link-label {
  overflow: hidden;
  color: var(--ink);
  font-size: clamp(0.98rem, 4vw, 1.08rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arrow-box {
  width: 38px;
  height: 38px;
  border: 2px solid var(--ink);
  border-radius: 50% 46% 52% 48%;
  color: var(--ink);
  background: var(--paper-deep);
  font-size: 1.05rem;
  transition: background-color 150ms ease, transform 150ms ease;
}

.arrow-box svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-card:hover {
  background: color-mix(in srgb, var(--accent) 13%, #fffdfa);
  box-shadow: 2px 2px 0 var(--ink);
  transform: translate(2px, 2px) rotate(var(--tilt));
}

.social-card:hover .arrow-box {
  background: var(--accent);
  transform: rotate(8deg);
}

.social-card:active {
  box-shadow: 0 0 0 var(--ink);
  transform: translate(4px, 4px) rotate(var(--tilt));
}

.social-card:focus-visible {
  box-shadow: 4px 4px 0 var(--ink), 0 0 0 4px var(--accent);
}

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  color: #4f5a64;
  font-family: "Marker Felt", "Bradley Hand", "Comic Sans MS", Arial, sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  transform: rotate(-0.5deg);
}

footer span:first-child,
footer span:last-child {
  color: var(--orange);
  font-size: 0.7rem;
}

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateY(14px) rotate(0.12deg);
  }
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(10px) rotate(var(--tilt));
  }
}

@keyframes background-enter {
  from {
    opacity: 0;
    transform: scale(1.055);
  }
}

@media (max-width: 560px) {
  .page-shell {
    min-height: 100svh;
    overflow-y: auto;
    padding: 28px 12px;
  }

  .link-panel {
    margin: auto 0;
    padding: 29px 15px 19px;
    border-radius: 24px 18px 26px 20px / 19px 25px 18px 24px;
    box-shadow: 6px 7px 0 rgba(9, 15, 24, 0.9), 0 24px 55px rgba(0, 0, 0, 0.3);
  }

  .link-panel::before,
  .link-panel::after {
    width: 61px;
    height: 24px;
  }

  .link-panel::before {
    left: 24px;
  }

  .link-panel::after {
    right: 24px;
  }

  .avatar-frame {
    width: 102px;
    height: 102px;
  }

  h1 {
    margin-top: 17px;
  }

  .title-flourish {
    margin-bottom: 19px;
  }

  .social-card {
    grid-template-columns: 48px 1fr 36px;
    min-height: 70px;
    gap: 12px;
    padding: 9px 10px;
  }

  .icon-box {
    width: 48px;
    height: 48px;
  }

  .arrow-box {
    width: 35px;
    height: 35px;
  }
}

@media (max-height: 690px) {
  .page-shell {
    align-items: start;
    overflow-y: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
