/* ============================================================
   linkpage.css — personal link page layout
   ============================================================ */

.lp {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px var(--gutter) 104px;
  overflow: hidden;
}

/* ── Backdrop ───────────────────────────────────────────── */
.lp__backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.lp__grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 58% at 50% 34%, #000 18%, transparent 74%);
  -webkit-mask-image: radial-gradient(ellipse 70% 58% at 50% 34%, #000 18%, transparent 74%);
}

.lp__glow {
  position: absolute;
  top: -12%;
  left: 50%;
  width: 620px;
  height: 520px;
  transform: translateX(-50%);
  background: radial-gradient(circle at center, rgba(77, 141, 255, 0.13), transparent 62%);
  filter: blur(26px);
}

/* ── Column ─────────────────────────────────────────────── */
.lp__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 452px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Profile ────────────────────────────────────────────── */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 40px;
}

.profile__avatar {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin-bottom: 22px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: linear-gradient(150deg, #171a1f, #0f1114);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.42);
}

/* Blue halo behind the avatar */
.profile__avatar::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--accent),
    rgba(109, 160, 255, 0.72),
    var(--accent-soft),
    var(--accent),
    var(--accent)
  );
  opacity: 0.5;
  filter: blur(8px);
  animation: haloSpin 12s linear infinite;
}

@keyframes haloSpin {
  to { transform: rotate(360deg); }
}

.profile__avatar-img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile__name {
  font-size: clamp(1.8rem, 4.4vw, 2.3rem);
  letter-spacing: -0.035em;
  margin-bottom: 8px;
  background: linear-gradient(180deg, #ffffff 14%, #b9c9e8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.profile__role {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  min-height: 1.2em;
}

/* Animated role text — per-character stagger */
.role-text {
  display: inline-block;
  white-space: nowrap;
  color: var(--accent);
}

.role-text .ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(60%) rotate(6deg);
  animation: charRise 0.62s var(--ease) forwards;
}

@keyframes charRise {
  to { opacity: 1; transform: none; }
}

/* Shimmer sweep once the letters land.
   Applied per-character so the gradient actually has glyphs
   to clip against, and the text never goes transparent. */
.role-text.is-settled .ch {
  background: linear-gradient(
    100deg,
    var(--accent) 30%,
    #a9c9ff 50%,
    var(--accent) 70%
  );
  background-size: 280% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: charRise 0.62s var(--ease) forwards,
             shimmer 5s var(--ease) infinite;
}

@keyframes shimmer {
  0%   { background-position: 130% 0; }
  100% { background-position: -130% 0; }
}

/* Fallback: if background-clip:text is unsupported, stay solid accent. */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .role-text.is-settled .ch {
    -webkit-text-fill-color: var(--accent);
    color: var(--accent);
    background: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile__avatar::before { animation: none; }

  .role-text .ch,
  .role-text.is-settled .ch {
    opacity: 1;
    transform: none;
    color: var(--accent);
    -webkit-text-fill-color: var(--accent);
    background: none;
    animation: none;
  }
}

.profile__bio {
  max-width: 34ch;
  font-size: 0.93rem;
  line-height: 1.68;
  color: var(--text-muted);
}

/* ── Link set ───────────────────────────────────────────── */
.linkset {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.lk {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(19, 21, 25, 0.62);
  transition: background 0.26s var(--ease),
              border-color 0.26s var(--ease),
              transform 0.26s var(--ease);
}

.lk:hover {
  background: rgba(25, 28, 33, 0.9);
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.lk:active { transform: translateY(0); }

.lk__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--text-muted);
  transition: color 0.26s var(--ease),
              border-color 0.26s var(--ease),
              background 0.26s var(--ease),
              box-shadow 0.26s var(--ease);
}

/* All links share the single blue accent. */
.lk:hover { border-color: rgba(77, 141, 255, 0.4); }

.lk:hover .lk__icon {
  color: var(--accent);
  border-color: rgba(77, 141, 255, 0.4);
  background: var(--accent-dim);
  box-shadow: 0 0 0 3px rgba(77, 141, 255, 0.07);
}

.lk__body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
  text-align: left;
}

.lk__label {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
}

.lk__arrow {
  flex-shrink: 0;
  color: var(--text-faint);
  transition: color 0.26s var(--ease), transform 0.26s var(--ease);
}
.lk:hover .lk__arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 560px) {
  .lp {
    padding: 52px 20px 96px;
    align-items: flex-start;
  }

  .profile { margin-bottom: 30px; }
  .profile__avatar { width: 72px; height: 72px; margin-bottom: 18px; }

  .linkset { gap: 9px; }
  .lk { padding: 14px 15px; gap: 13px; }
  .lk__icon { width: 35px; height: 35px; }
}

@media (max-width: 380px) {
  .lk { padding: 14px 13px; gap: 12px; }
}
