/**
 * ProDigit Profile V2. Premium digital identity card.
 */
:root {
  --profile-bg: #050505;
  --profile-surface: rgba(18, 18, 20, 0.78);
  --profile-border: rgba(255, 255, 255, 0.06);
  --profile-border-hover: rgba(34, 211, 238, 0.35);
  --profile-text: #fafafa;
  --profile-muted: #a1a1aa;
  --profile-accent: #22d3ee;
  --profile-accent-dim: rgba(34, 211, 238, 0.08);
  --profile-accent-glow: rgba(34, 211, 238, 0.12);
  --profile-warm: rgba(255, 255, 255, 0.04);
  --reroute-accent: #b7e724;
  --reroute-glow: rgba(183, 231, 36, 0.16);
  --profile-radius: 12px;
  --profile-max: 26rem;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --nothing-border: rgba(255, 255, 255, 0.14);
  --nothing-text: #e4e4e7;
  --intro-font: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Schuyler: cyan / electric blue (default) */
body.profile-v2--cyan {
  --profile-accent: #22d3ee;
  --profile-accent-dim: rgba(34, 211, 238, 0.08);
  --profile-accent-glow: rgba(34, 211, 238, 0.12);
  --profile-border-hover: rgba(34, 211, 238, 0.35);
}

/* Alex: neon green */
body.profile-v2--neon {
  --profile-accent: #39ff14;
  --profile-accent-dim: rgba(57, 255, 20, 0.1);
  --profile-accent-glow: rgba(57, 255, 20, 0.16);
  --profile-border-hover: rgba(57, 255, 20, 0.4);
  --profile-warm: rgba(57, 255, 20, 0.04);
}

body.profile-v2--neon.profile-v2::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400' fill='none'%3E%3Cg transform='translate(200%2C 200)'%3E%3Cpath d='M 6 0 A 32 32 0 0 1 32 26' stroke='%2339ff14' stroke-width='0.75'/%3E%3Cpath d='M 6 0 A 52 52 0 0 1 52 42' stroke='%23ffffff' stroke-width='0.5' opacity='0.6'/%3E%3C/g%3E%3C/svg%3E");
}

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

html {
  -webkit-text-size-adjust: 100%;
  min-height: 100dvh;
  background-color: #050505;
}

html:has(body.profile-v2--cyan),
html:has(body.profile-v2:not(.profile-v2--neon)) {
  background-color: #050505;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(34, 211, 238, 0.14), transparent 55%),
    radial-gradient(circle at 50% 120%, rgba(34, 211, 238, 0.06), transparent 45%),
    linear-gradient(180deg, rgba(34, 211, 238, 0.08) 0%, #050505 42%, #050505 100%);
}

html:has(body.profile-v2--neon) {
  background-color: #050505;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(57, 255, 20, 0.12), transparent 55%),
    radial-gradient(circle at 50% 120%, rgba(57, 255, 20, 0.05), transparent 45%),
    linear-gradient(180deg, rgba(57, 255, 20, 0.06) 0%, #050505 42%, #050505 100%);
}

body.profile-v2 {
  margin: 0;
  min-height: 100dvh;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--profile-text);
  background-color: transparent;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(34, 211, 238, 0.14), transparent 55%),
    radial-gradient(circle at 50% 120%, rgba(34, 211, 238, 0.06), transparent 45%),
    linear-gradient(180deg, rgba(34, 211, 238, 0.08) 0%, #050505 42%, #050505 100%);
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

body.profile-v2--neon.profile-v2 {
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(57, 255, 20, 0.12), transparent 55%),
    radial-gradient(circle at 50% 120%, rgba(57, 255, 20, 0.05), transparent 45%),
    linear-gradient(180deg, rgba(57, 255, 20, 0.06) 0%, #050505 42%, #050505 100%);
}

/* Faint NFC frequency lines */
body.profile-v2::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.04;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 64px,
      rgba(255, 255, 255, 0.35) 64px,
      rgba(255, 255, 255, 0.35) 65px
    );
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, transparent 55%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, transparent 55%);
}

/* Faint NFC arc motif */
body.profile-v2::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400' fill='none'%3E%3Cg transform='translate(200%2C 200)'%3E%3Cpath d='M 6 0 A 32 32 0 0 1 32 26' stroke='%2322d3ee' stroke-width='0.75'/%3E%3Cpath d='M 6 0 A 52 52 0 0 1 52 42' stroke='%23ffffff' stroke-width='0.5' opacity='0.6'/%3E%3Cpath d='M 6 0 A 72 72 0 0 1 72 58' stroke='%23a1a1aa' stroke-width='0.5' opacity='0.4'/%3E%3Cg transform='scale(-1%2C 1)'%3E%3Cpath d='M 6 0 A 32 32 0 0 1 32 26' stroke='%2322d3ee' stroke-width='0.75'/%3E%3Cpath d='M 6 0 A 52 52 0 0 1 52 42' stroke='%23ffffff' stroke-width='0.5' opacity='0.6'/%3E%3Cpath d='M 6 0 A 72 72 0 0 1 72 58' stroke='%23a1a1aa' stroke-width='0.5' opacity='0.4'/%3E%3C/g%3E%3C/g%3E%3Cpath d='M 0 140 Q 100 128%2C 200 140 T 400 140' stroke='%23ffffff' stroke-width='0.5' opacity='0.35'/%3E%3Cpath d='M 0 220 Q 120 208%2C 240 220 T 400 220' stroke='%23a1a1aa' stroke-width='0.5' opacity='0.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center 22%;
  background-size: min(92vw, 380px);
}

@media (prefers-reduced-motion: reduce) {
  body.profile-v2::before,
  body.profile-v2::after {
    animation: none;
  }
}

.profile-shell {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100dvh;
  min-height: 100vh;
}

.profile {
  position: relative;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--profile-max);
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 16px 0;
}

.profile-header {
  text-align: center;
  margin-bottom: 0.15rem;
}

.profile-avatar {
  width: 6.5rem;
  height: 6.5rem;
  margin: 0 auto;
  padding: 2px;
  border-radius: 50%;
  background: rgba(5, 5, 5, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.profile-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center center;
  background: #121214;
}

.profile-body {
  text-align: center;
  padding-top: 0.35rem;
}

.profile-name {
  margin: 0 0 0.2rem;
  font-size: 1.3125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.profile-title {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--profile-accent);
  letter-spacing: 0.04em;
}

.profile-title__sep {
  margin: 0 0.2em;
  color: rgba(255, 255, 255, 0.25);
}

.profile-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
}

.profile-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.625rem;
  height: 2.625rem;
  color: var(--profile-text);
  text-decoration: none;
  background: var(--profile-surface);
  border: 1px solid var(--profile-border);
  border-radius: 50%;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  font: inherit;
  padding: 0;
  cursor: pointer;
  transition:
    border-color 0.22s ease,
    color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.profile-icon-btn svg {
  width: 1.125rem;
  height: 1.125rem;
}

.profile-icon-btn:hover,
.profile-icon-btn:focus-visible {
  border-color: var(--profile-border-hover);
  color: var(--profile-accent);
  background: var(--profile-accent-dim);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 16px var(--profile-accent-glow);
  outline: none;
}

.profile-header .profile-actions--bar {
  width: 100%;
  max-width: 22rem;
  margin: 0.75rem auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.profile-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 3.35rem;
  padding: 0.5rem 0.2rem;
  color: var(--profile-text);
  text-decoration: none;
  background: var(--profile-surface);
  border: 1px solid var(--profile-border);
  border-radius: 0.75rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font: inherit;
  cursor: pointer;
  transition:
    border-color 0.22s ease,
    color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.18s ease;
}

.profile-action-btn__icon svg {
  width: 1rem;
  height: 1rem;
}

.profile-action-btn__label {
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.1;
  text-align: center;
}

.profile-action-btn:hover,
.profile-action-btn:focus-visible {
  border-color: var(--profile-border-hover);
  color: var(--profile-accent);
  background: var(--profile-accent-dim);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 16px var(--profile-accent-glow);
  outline: none;
  transform: translateY(-1px);
}

.profile-action-btn:active {
  transform: translateY(0);
}

@media (max-width: 380px) {
  .profile-header .profile-actions--bar {
    gap: 0.35rem;
  }

  .profile-action-btn {
    min-height: 3rem;
    padding: 0.45rem 0.15rem;
  }

  .profile-action-btn__label {
    font-size: 0.5rem;
  }
}

.profile-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.profile-link-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  text-decoration: none;
  text-align: left;
  background: var(--profile-surface);
  border: 1px solid var(--profile-border);
  border-radius: var(--profile-radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
  transform: translateY(0);
}

.profile-links > li {
  opacity: 0;
  transform: translateY(8px);
}

.profile-links > li.is-built {
  animation: profile-link-in 0.38s ease forwards;
}

.profile-link-card.is-revealed::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 0;
  border-radius: 0 2px 2px 0;
  background: var(--profile-accent);
  transform: translateY(-50%);
  animation: profile-link-scan 0.32s ease forwards;
  pointer-events: none;
}

@keyframes profile-link-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes profile-link-scan {
  from {
    height: 0;
    opacity: 0;
  }
  to {
    height: 58%;
    opacity: 1;
  }
}

.profile-link-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 55%;
  border-radius: 0 2px 2px 0;
  background: transparent;
  transition: background 0.22s ease;
}

.profile-link-card:hover,
.profile-link-card:focus-visible {
  border-color: var(--profile-border-hover);
  background: var(--profile-accent-dim);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 18px var(--profile-accent-glow);
  outline: none;
}

.profile-link-card:hover::after,
.profile-link-card:focus-visible::after {
  background: var(--profile-accent);
}

.profile-link-card__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: var(--profile-muted);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: 0.55rem;
}

.profile-link-card__icon svg {
  width: 1rem;
  height: 1rem;
}

.profile-link-card__icon--accent {
  color: var(--profile-accent);
  border-left-color: rgba(34, 211, 238, 0.35);
}

.profile-link-card__text {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}

.profile-link-card__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--profile-text);
  line-height: 1.3;
}

.profile-link-card__hint {
  font-size: 0.6875rem;
  color: var(--profile-muted);
  line-height: 1.2;
}

.profile-link-card--accent {
  border-color: rgba(34, 211, 238, 0.18);
}

.profile-link-card--accent .profile-link-card__label {
  color: var(--profile-accent);
}

.profile-link-card--accent:hover,
.profile-link-card--accent:focus-visible {
  border-color: rgba(34, 211, 238, 0.45);
}

.profile-link-card--reroute {
  border-color: rgba(183, 231, 36, 0.2);
  background: rgba(183, 231, 36, 0.03);
}

.profile-link-card--reroute .profile-link-card__label {
  color: var(--profile-text);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.profile-link-card--reroute .profile-link-card__hint {
  color: rgba(183, 231, 36, 0.78);
  font-size: 0.6875rem;
  line-height: 1.35;
  margin-top: 0.08rem;
}

.profile-link-card--reroute:hover,
.profile-link-card--reroute:focus-visible,
.profile-link-card--reroute:active {
  border-color: rgba(183, 231, 36, 0.5);
  background: var(--reroute-glow);
  box-shadow: 0 0 18px var(--reroute-glow);
  outline: none;
}

.profile-link-card--reroute:hover::after,
.profile-link-card--reroute:focus-visible::after,
.profile-link-card--reroute:active::after {
  background: var(--reroute-accent);
}

.profile-link-card--reroute:hover .profile-link-card__label,
.profile-link-card--reroute:focus-visible .profile-link-card__label,
.profile-link-card--reroute:active .profile-link-card__label {
  color: var(--reroute-accent);
}

.profile-link-card--reroute:hover .profile-link-card__icon--reroute,
.profile-link-card--reroute:focus-visible .profile-link-card__icon--reroute,
.profile-link-card--reroute:active .profile-link-card__icon--reroute {
  color: var(--reroute-accent);
  border-left-color: rgba(183, 231, 36, 0.5);
}

.profile-link-card__icon--reroute {
  border-left-color: rgba(183, 231, 36, 0.35);
}

.profile-footer {
  flex-shrink: 0;
  width: 100%;
  max-width: var(--profile-max);
  margin-top: auto;
  margin-left: auto;
  margin-right: auto;
  padding: 0.75rem 16px max(1.5rem, calc(env(safe-area-inset-bottom) + 0.85rem));
  text-align: center;
}

.profile-footer p {
  margin: 0;
  font-size: 0.6875rem;
  letter-spacing: 0.03em;
  color: rgba(161, 161, 170, 0.85);
}

@media (max-width: 390px) {
  .profile {
    padding-top: max(4px, env(safe-area-inset-top));
  }

  .profile-share-btn {
    top: max(10px, calc(env(safe-area-inset-top) + 4px));
    right: max(10px, env(safe-area-inset-right, 0px));
    padding: 0.35rem 0.55rem;
    font-size: 0.625rem;
  }

  #founder-root .profile-shell {
    min-height: auto;
    padding-bottom: 0.25rem;
  }

  .profile-footer {
    padding-bottom: max(2rem, calc(env(safe-area-inset-bottom) + 1rem));
  }

  .profile-avatar {
    width: 6rem;
    height: 6rem;
  }

  .profile-name {
    font-size: 1.2rem;
  }

  .profile-links {
    gap: 0.3125rem;
  }

  .profile-link-card {
    padding: 0.5625rem 0.75rem;
  }
}

/* Intro loader */
.profile-intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1.5rem, env(safe-area-inset-top)) 1.5rem max(1.5rem, env(safe-area-inset-bottom));
  background-color: rgba(5, 5, 5, 0.94);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(34, 211, 238, 0.1), transparent 55%),
    linear-gradient(180deg, rgba(34, 211, 238, 0.06) 0%, #050505 50%);
  opacity: 1;
  transition: opacity 0.42s ease;
  pointer-events: auto;
}

body.profile-v2-intro-active {
  overflow: hidden;
}

.profile-intro.profile-intro--fade-out {
  opacity: 0;
  pointer-events: none;
}

body.profile-v2--neon .profile-intro {
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(57, 255, 20, 0.1), transparent 55%),
    linear-gradient(180deg, rgba(57, 255, 20, 0.06) 0%, #050505 50%);
}

.profile-intro[hidden] {
  display: none !important;
}

.profile-intro__overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: min(100%, 20rem);
  text-align: center;
}

.profile-intro__brand {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--profile-text);
}

.profile-intro__tagline {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--profile-accent);
}

.profile-intro__scan-bar {
  display: block;
  width: min(12rem, 70vw);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--profile-accent),
    transparent
  );
  opacity: 0.85;
  animation: profile-intro-scan 1.6s ease-in-out infinite;
}

@keyframes profile-intro-scan {
  0%, 100% { transform: scaleX(0.35); opacity: 0.35; }
  50% { transform: scaleX(1); opacity: 1; }
}

.profile-intro__terminal {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(34, 211, 238, 0.2);
  background: rgba(8, 12, 14, 0.9);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.08);
  text-align: left;
}

body.profile-v2--neon .profile-intro__terminal {
  border-color: rgba(57, 255, 20, 0.25);
  box-shadow: 0 0 24px rgba(57, 255, 20, 0.1);
}

.profile-intro__line {
  margin: 0.35rem 0;
  font-family: var(--intro-font);
  font-size: 0.75rem;
  color: var(--profile-accent);
  min-height: 1.1em;
}

.profile-shell--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#founder-root .profile-shell {
  width: 100%;
  min-height: 100dvh;
}

html.profile-v2-ready .profile-shell,
.profile-shell:not(.profile-shell--hidden) {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

/* Share */
.profile-share-btn {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: 12px;
  z-index: 2;
  padding: 0.4rem 0.7rem;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--profile-muted);
  background: rgba(12, 12, 14, 0.75);
  border: 1px solid var(--profile-border);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.profile-share-btn:hover,
.profile-share-btn:focus-visible {
  color: var(--profile-accent);
  border-color: var(--profile-border-hover);
  outline: none;
}

/* Avatar pulse */
.profile-avatar {
  position: relative;
}

.profile-avatar__ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(34, 211, 238, 0.35);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.12);
  animation: profile-avatar-pulse 3.2s ease-in-out infinite;
  pointer-events: none;
}

body.profile-v2--neon .profile-avatar__ring {
  border-color: rgba(57, 255, 20, 0.45);
  box-shadow: 0 0 22px rgba(57, 255, 20, 0.2);
}

body.profile-v2--neon .profile-avatar__scan {
  background: linear-gradient(
    180deg,
    transparent,
    rgba(57, 255, 20, 0.35),
    transparent
  );
}

body.profile-v2--neon .profile-name {
  color: #fafafa;
  text-shadow: 0 0 18px rgba(57, 255, 20, 0.15);
}

body.profile-v2--neon .profile-title {
  color: #39ff14;
}

body.profile-v2--neon .profile-link-card:hover,
body.profile-v2--neon .profile-link-card:focus-visible {
  box-shadow: 0 0 0 1px rgba(57, 255, 20, 0.2), 0 8px 24px rgba(57, 255, 20, 0.08);
}

@keyframes profile-avatar-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); }
}

/* Staged build sequence */
.profile-build-stage,
.profile-avatar--stage {
  opacity: 0;
  transform: translateY(8px);
}

.profile-build-stage.is-built,
.profile-avatar--stage.is-built {
  animation: profile-stage-in 0.42s ease forwards;
}

.profile-avatar--stage.is-built .profile-avatar__scan {
  animation: profile-avatar-scan 0.55s ease forwards;
}

.profile-avatar__scan {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: var(--profile-accent);
  opacity: 0;
  pointer-events: none;
}

@keyframes profile-stage-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes profile-avatar-scan {
  0% {
    opacity: 0;
    transform: rotate(0deg) scale(0.96);
  }
  40% {
    opacity: 1;
  }
  100% {
    opacity: 0.35;
    transform: rotate(180deg) scale(1);
  }
}

.profile-name--type {
  min-height: 1.35em;
  margin: 0 0 0.2rem;
  font-size: 1.3125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.profile-name__typed {
  display: inline;
}

/* Reveal animations (legacy biolink fallback) */
.profile-reveal {
  opacity: 0;
  transform: translateY(10px);
}

html.profile-v2-ready .profile-reveal {
  animation: profile-reveal-in 0.55s ease forwards;
}

html.profile-v2-ready .profile-reveal--delay {
  animation-delay: 0.12s;
}

html.profile-v2-ready .profile-reveal--delay2 {
  animation-delay: 0.22s;
}

html.profile-v2-ready .profile-reveal--delay3 {
  animation-delay: 0.32s;
}

@keyframes profile-reveal-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Typewriter title */
.profile-title--type {
  min-height: 1.2em;
  margin-bottom: 0.65rem;
}

.profile-title__cursor {
  display: inline-block;
  width: 1px;
  height: 0.85em;
  margin-left: 1px;
  background: var(--profile-accent);
  vertical-align: text-bottom;
  animation: profile-cursor-blink 0.9s step-end infinite;
}

.profile-title__cursor.is-done {
  opacity: 0;
  animation: none;
}

@keyframes profile-cursor-blink {
  50% { opacity: 0; }
}

/* Link variants */
.profile-link-card--primary {
  border-color: rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.06);
}

.profile-link-card--primary .profile-link-card__label {
  color: var(--profile-accent);
  font-weight: 600;
}

.profile-link-card--primary:hover,
.profile-link-card--primary:focus-visible {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.14);
}

.profile-link-card--primary:hover::after,
.profile-link-card--primary:focus-visible::after {
  background: var(--profile-accent);
}

.profile-link-card__icon--primary {
  color: var(--profile-accent);
  border-left-color: rgba(34, 211, 238, 0.4);
}

.profile-link-card--nothing {
  border-color: var(--nothing-border);
  background: rgba(0, 0, 0, 0.55);
}

.profile-link-card--nothing .profile-link-card__label {
  color: var(--nothing-text);
  font-weight: 600;
}

.profile-link-card--nothing .profile-link-card__hint {
  color: rgba(161, 161, 170, 0.9);
  font-style: italic;
}

.profile-link-card--nothing:hover,
.profile-link-card--nothing:focus-visible {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
  transform: none;
}

.profile-link-card--nothing:hover::after,
.profile-link-card--nothing:focus-visible::after {
  background: #fff;
}

.profile-link-card__icon--nothing {
  color: #fff;
  border-left-color: rgba(255, 255, 255, 0.2);
  font-family: var(--intro-font);
  font-size: 0.75rem;
  font-weight: 700;
}

.profile-link-card__icon--primary {
  color: var(--profile-accent);
  border-left-color: rgba(34, 211, 238, 0.4);
}

body.profile-v2--neon .profile-link-card__icon--primary {
  border-left-color: rgba(57, 255, 20, 0.4);
}

.profile-link-card--social,
.profile-link-card--web,
.profile-link-card--coffee {
  border-color: rgba(255, 255, 255, 0.1);
  background: var(--profile-warm);
}

body.profile-v2--neon .profile-link-card--social,
body.profile-v2--neon .profile-link-card--web,
body.profile-v2--neon .profile-link-card--coffee {
  border-color: rgba(57, 255, 20, 0.16);
  background: rgba(57, 255, 20, 0.03);
}

.profile-link-card--social:hover,
.profile-link-card--social:focus-visible,
.profile-link-card--web:hover,
.profile-link-card--web:focus-visible,
.profile-link-card--coffee:hover,
.profile-link-card--coffee:focus-visible {
  border-color: var(--profile-border-hover);
  background: var(--profile-accent-dim);
  box-shadow: 0 0 16px var(--profile-accent-glow);
}

.profile-link-card__icon--social {
  color: var(--profile-accent);
  border-left-color: rgba(255, 255, 255, 0.12);
}

body.profile-v2--neon .profile-link-card__icon--social {
  border-left-color: rgba(57, 255, 20, 0.35);
}

.profile-link-card--coffee .profile-link-card__label {
  color: var(--profile-text);
}

.profile-toast {
  position: fixed;
  left: 50%;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(120%);
  z-index: 30;
  margin: 0;
  padding: 0.55rem 0.9rem;
  font-size: 0.8125rem;
  color: var(--profile-text);
  background: rgba(18, 18, 20, 0.95);
  border: 1px solid var(--profile-border);
  border-radius: 999px;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
}

.profile-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#founder-root {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100dvh;
}

@media (prefers-reduced-motion: reduce) {
  .profile-avatar__ring,
  .profile-avatar__scan,
  .profile-reveal,
  html.profile-v2-ready .profile-reveal,
  .profile-title__cursor,
  .profile-build-stage,
  .profile-avatar--stage,
  .profile-links > li.is-built,
  .profile-link-card.is-revealed::before {
    animation: none !important;
  }

  .profile-reveal,
  html.profile-v2-ready .profile-reveal,
  .profile-build-stage,
  .profile-build-stage.is-built,
  .profile-avatar--stage,
  .profile-avatar--stage.is-built,
  .profile-links > li,
  .profile-links > li.is-built {
    opacity: 1;
    transform: none;
  }

  .profile-link-card.is-revealed::before {
    height: 58%;
    opacity: 1;
  }

  .profile-intro__scan-bar {
    animation: none;
    opacity: 0.7;
  }

  .profile-intro.profile-intro--fade-out {
    transition-duration: 0.12s;
  }
}
