:root {
  --bg: #070709;
  --bg-elevated: rgba(255, 255, 255, 0.06);
  --bg-elevated-hover: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --radius: 14px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --maxw: 420px;
}

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

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

#matrix-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: var(--matrix-opacity, 1);
}

.page-glow {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 80% 55% at 50% 20%,
    rgba(120, 80, 200, 0.12) 0%,
    transparent 55%
  );
}

.shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 2.5rem;
  max-width: var(--maxw);
  margin: 0 auto;
}

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

.profile-link {
  display: inline-block;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.profile-link:hover {
  opacity: 0.92;
}

.profile-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 4px;
  border-radius: 8px;
}

.avatar-wrap {
  margin-bottom: 1rem;
}

.avatar-wrap--logo {
  max-width: var(--avatar-logo-max, 260px);
  margin-left: auto;
  margin-right: auto;
}

.avatar-wrap--circle {
  margin-bottom: 1.1rem;
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 0 auto;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12), var(--shadow);
}

.avatar--img {
  display: block;
  object-fit: cover;
}

.avatar--circle {
  width: var(--avatar-size, 104px);
  height: var(--avatar-size, 104px);
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.14),
    0 0 28px rgba(245, 158, 11, 0.12),
    0 12px 40px rgba(0, 0, 0, 0.35);
}

.avatar--logo {
  width: 100%;
  height: auto;
  max-height: min(140px, 28vw);
  border-radius: 18px;
  object-fit: contain;
  object-position: center;
}

.avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--g1, #f59e0b), var(--g2, #dc2626) 60%, var(--g3, var(--g2)));
}

.avatar__initial {
  font-size: 2.25rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  letter-spacing: -0.02em;
}

.username {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 400;
}

.links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1.1rem;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.link-card:hover {
  background: var(--bg-elevated-hover);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.link-card:active {
  transform: translateY(0);
}

.link-card__icon {
  font-size: 1.65rem;
  line-height: 1;
  flex-shrink: 0;
  width: 2.25rem;
  text-align: center;
}

.link-card__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 0;
}

.link-card__title {
  font-weight: 600;
  font-size: 1rem;
}

.link-card__subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer {
  margin-top: auto;
  padding-top: 2rem;
}

.copyright {
  margin: 0;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(161, 161, 170, 0.55);
}

body:not(:has(#matrix-canvas)) {
  background-image: radial-gradient(
    circle at 50% 0%,
    rgba(255, 255, 255, 0.04) 0%,
    transparent 45%
  );
}
