:root {
  --ivory: #f8f3e9;
  --paper: #fffdf7;
  --ink: #111410;
  --muted: #625b50;
  --emerald: #064834;
  --emerald-deep: #043426;
  --emerald-glow: #0f7655;
  --pearl: #fffdf7;
  --pearl-glow: #f7f1e6;
  --line: rgba(4, 46, 33, 0.13);
  --shadow: 0 20px 54px rgba(4, 46, 33, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #edf5ec;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% -8%, rgba(22, 116, 82, 0.34), transparent 17rem),
    radial-gradient(circle at 10% 16%, rgba(255, 253, 247, 0.72), transparent 14rem),
    radial-gradient(circle at 92% 28%, rgba(4, 46, 33, 0.18), transparent 15rem),
    linear-gradient(145deg, #fffdf8 0%, #f6f1e7 38%, #e8f1e7 100%);
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.86), rgba(255, 253, 247, 0.42) 44%, rgba(246, 241, 231, 0.78)),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.8), transparent 19rem);
}

a {
  color: inherit;
}

.link-hub {
  width: min(100%, 31rem);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(1.15rem, env(safe-area-inset-top)) 1rem max(1.25rem, env(safe-area-inset-bottom));
}

.profile {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 0.1rem 0.3rem 0.95rem;
}

.portrait-wrap {
  position: relative;
  isolation: isolate;
  display: grid;
  width: min(94vw, 21rem);
  height: min(112vw, 22.8rem);
  margin: 0.05rem 0 0.82rem;
  border: 1px solid rgba(255, 253, 247, 0.82);
  border-radius: 2rem;
  background:
    linear-gradient(150deg, rgba(255, 253, 247, 0.94), rgba(255, 255, 255, 0.58)) padding-box,
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), var(--emerald-glow), rgba(255, 253, 247, 0.88)) border-box;
  box-shadow:
    0 22px 54px rgba(4, 46, 33, 0.18),
    0 0 0 7px rgba(255, 255, 255, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
  overflow: hidden;
}

.portrait-wrap::after {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 46%;
  content: "";
  background:
    linear-gradient(180deg, transparent, rgba(2, 30, 22, 0.24) 34%, rgba(2, 30, 22, 0.72)),
    linear-gradient(115deg, rgba(255, 253, 247, 0.38), transparent 44%, rgba(255, 255, 255, 0.2));
  pointer-events: none;
}

.portrait {
  width: calc(100% - 0.46rem);
  height: calc(100% - 0.46rem);
  margin: 0.23rem;
  border-radius: inherit;
  display: block;
  object-fit: cover;
  object-position: 50% 12%;
}

h1 {
  position: absolute;
  inset: auto 1.05rem 0.92rem;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 0.36rem;
  max-width: none;
  margin: 0;
  color: var(--paper);
  line-height: 1.08;
  letter-spacing: 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.34);
}

.signature-name {
  color: #fffdf7;
  font-family: WindSong, Georgia, serif;
  font-size: clamp(1.78rem, 7.55vw, 2.48rem);
  font-weight: 500;
  line-height: 0.76;
  transform: translateY(-0.3rem) rotate(-1.4deg);
  text-shadow:
    0 2px 18px rgba(0, 0, 0, 0.28),
    0 0 18px rgba(255, 255, 255, 0.34);
}

.typed-name {
  color: rgba(255, 253, 247, 0.94);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(0.78rem, 3.28vw, 1.04rem);
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
}

.tagline {
  width: min(100%, 27rem);
  margin: 0 auto;
  padding: 0 0.35rem;
  color: var(--emerald-deep);
  font-family: Montserrat, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(0.66rem, 2.38vw, 0.8rem);
  line-height: 1.24;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-wrap: balance;
  white-space: nowrap;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.82);
}

.links {
  display: grid;
  gap: 0.68rem;
  padding: 0.15rem 0 0;
}

.link-button {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.72rem;
  min-height: 3.52rem;
  padding: 0.76rem 1rem;
  border: 1px solid rgba(4, 46, 33, 0.12);
  border-left: 4px solid rgba(13, 101, 72, 0.44);
  border-radius: 1.15rem;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 253, 247, 0.72)),
    rgba(255, 253, 248, 0.84);
  box-shadow:
    0 12px 30px rgba(4, 46, 33, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.22;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, filter 180ms ease;
  overflow: hidden;
  backdrop-filter: blur(14px);
}

.link-button::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(105deg, rgba(255, 255, 255, 0.34), transparent 30%, rgba(13, 101, 72, 0.08) 70%, rgba(255, 255, 255, 0.16) 100%);
  background-size: 220% 100%;
  opacity: 0.72;
  animation: buttonLight 8.5s ease-in-out infinite;
}

.button-copy {
  display: grid;
  gap: 0.14rem;
}

.button-copy small {
  color: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.1;
  opacity: 0.76;
}

.button-icon {
  display: grid;
  place-items: center;
  width: 1.72rem;
  height: 1.72rem;
  border: 1px solid rgba(13, 101, 72, 0.13);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(248, 243, 233, 0.48));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
  line-height: 1;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.link-button:focus-visible {
  outline: 3px solid rgba(28, 138, 100, 0.28);
  outline-offset: 3px;
}

.link-button:hover {
  transform: translateY(-2px) scale(1.008);
  border-color: rgba(13, 101, 72, 0.27);
  box-shadow:
    0 18px 40px rgba(4, 46, 33, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  filter: saturate(1.06);
}

.link-button:active {
  transform: translateY(0) scale(0.992);
}

.link-button:hover .button-icon {
  transform: scale(1.08) rotate(-3deg);
  box-shadow:
    0 0 18px rgba(255, 255, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.link-button:hover .arrow {
  transform: translateX(0.12rem);
}

.green {
  border-color: rgba(6, 72, 52, 0.16);
  border-left-color: rgba(6, 72, 52, 0.2);
  color: var(--emerald);
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.78), transparent 22%),
    linear-gradient(135deg, #e7fbf1 0%, #c9f2df 100%);
  box-shadow:
    0 15px 36px rgba(6, 72, 52, 0.12),
    0 0 28px rgba(201, 242, 223, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.pearl {
  border-color: rgba(255, 255, 255, 0.9);
  border-left-color: rgba(255, 253, 247, 0.84);
  color: #102118;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.94), transparent 27%, rgba(255, 253, 247, 0.72) 52%, transparent 74%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(250, 248, 241, 0.9));
  box-shadow:
    0 14px 34px rgba(4, 46, 33, 0.08),
    0 0 34px rgba(255, 253, 247, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.green::after,
.pearl::after {
  position: absolute;
  top: -45%;
  bottom: -45%;
  left: -38%;
  z-index: -1;
  width: 42%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: rotate(18deg);
  animation: shimmer 5.8s ease-in-out infinite;
}

.pearl::after {
  width: 58%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.92), rgba(255, 253, 247, 0.62), transparent);
  animation-duration: 4.6s;
}

.social {
  min-height: 3.2rem;
  border-left-color: rgba(255, 253, 247, 0.74);
}

.arrow {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid rgba(4, 46, 33, 0.12);
  border-radius: 999px;
  color: var(--emerald-deep);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(248, 243, 233, 0.5));
  font-size: 1rem;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.green .arrow,
.green .button-icon {
  border-color: rgba(6, 72, 52, 0.14);
  color: var(--emerald);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(231, 251, 241, 0.58));
}

.pearl .arrow,
.pearl .button-icon {
  border-color: rgba(13, 101, 72, 0.14);
  color: var(--emerald-deep);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 253, 247, 0.44));
}

@keyframes shimmer {
  0%,
  48% {
    left: -42%;
    opacity: 0;
  }

  58% {
    opacity: 0.8;
  }

  74%,
  100% {
    left: 118%;
    opacity: 0;
  }
}

@keyframes buttonLight {
  0%,
  100% {
    background-position: 0% 50%;
    opacity: 0.62;
  }

  50% {
    background-position: 100% 50%;
    opacity: 0.9;
  }
}

.footer {
  padding: 1rem 0 0;
  text-align: center;
}

.footer p {
  margin: 0;
  color: rgba(20, 18, 14, 0.52);
  font-size: 0.72rem;
  font-weight: 700;
}

@media (min-width: 520px) {
  .link-hub {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

@media (max-height: 740px) {
  .link-hub {
    padding-top: 0.75rem;
  }

  .profile {
    padding-bottom: 0.75rem;
  }

  .portrait-wrap {
    width: min(90vw, 18rem);
    height: min(94vw, 18.8rem);
    margin-bottom: 0.56rem;
  }

  h1 {
    bottom: 0.82rem;
  }

  .signature-name {
    font-size: clamp(1.54rem, 6.8vw, 2.04rem);
  }

  .typed-name {
    font-size: clamp(0.7rem, 3.05vw, 0.9rem);
  }

  .tagline {
    width: min(100%, 25rem);
    font-size: clamp(0.56rem, 2.18vw, 0.68rem);
  }

  .links {
    gap: 0.56rem;
  }

  .link-button {
    min-height: 3.24rem;
    padding-top: 0.66rem;
    padding-bottom: 0.66rem;
  }
}

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

  .link-button:hover {
    transform: none;
  }

  .green::after,
  .pearl::after {
    animation: none;
  }

  .link-button::before {
    animation: none;
  }
}
