:root {
  --blue: #1a9fff;
  --cyan: #00c8ff;
  --cyan-soft: #00ffcc;

  --bg: #03080f;
  --bg-card: rgba(5, 20, 46, 0.65);
  --bg-hover: rgba(10, 50, 110, 0.55);

  --border: rgba(0, 110, 220, 0.2);
  --border-hover: rgba(0, 190, 255, 0.55);

  --text: #c2dcf5;
  --text-heading: #eaf4ff;
  --text-muted: #4e6e88;

  --font-body: 'Inter', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;

  --radius-card: 12px;
  --radius-icon: 10px;
  --max-width: 420px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100svh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--blue) 30%,
    var(--cyan) 50%,
    var(--blue) 70%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: topbar-scroll 4s linear infinite;
  z-index: 100;
}

@keyframes topbar-scroll {
  from { background-position: 100% 0; }
  to   { background-position: -100% 0; }
}

.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.055) 2px,
    rgba(0, 0, 0, 0.055) 4px
  );
  pointer-events: none;
  z-index: 1;
}

.wrap {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: 100svh;
  padding: 56px 20px 64px;
}

/* Avatar */

.avatar {
  position: relative;
  width: 96px;
  height: 96px;
  margin-bottom: 22px;
  flex-shrink: 0;
}

.avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid rgba(0, 190, 255, 0.5);
  z-index: 3;
}

.avatar-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 30, 72, 0.9);
  border: 2px solid rgba(0, 190, 255, 0.4);
  font-family: var(--font-mono);
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--blue);
  z-index: 3;
}

/* halo glow */
.avatar::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 159, 255, 0.22) 0%, transparent 70%);
  animation: halo-pulse 3s ease-in-out infinite;
  z-index: 0;
}

@keyframes halo-pulse {
  0%, 100% { transform: scale(1);   opacity: 0.5; }
  50%       { transform: scale(1.1); opacity: 1; }
}

.avatar-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid transparent;
  z-index: 1;
}

.r1 {
  inset: -9px;
  border-color: rgba(0, 180, 255, 0.22);
  animation: spin-cw 14s linear infinite;
}

.r1::after {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 8px var(--blue), 0 0 18px rgba(26, 159, 255, 0.5);
}

.r2 {
  inset: -20px;
  border-color: rgba(0, 210, 255, 0.09);
  animation: spin-ccw 22s linear infinite;
}

.r2::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
}

@keyframes spin-cw  { to { transform: rotate(360deg); } }
@keyframes spin-ccw { to { transform: rotate(-360deg); } }

/* Profile header */

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: var(--max-width);
  text-align: center;
  margin-bottom: 36px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 15px;
  margin-bottom: 18px;
  border: 1px solid rgba(0, 180, 255, 0.3);
  border-radius: 20px;
  background: rgba(0, 80, 160, 0.12);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #5acfff;
  text-transform: uppercase;
}

.badge-dot {
  width: 6px;
  height: 6px;
  min-width: 6px;
  border-radius: 50%;
  background: var(--cyan-soft);
  box-shadow: 0 0 6px var(--cyan-soft), 0 0 12px rgba(0, 255, 200, 0.4);
  animation: dot-blink 1.8s ease-in-out infinite;
}

@keyframes dot-blink {
  0%, 100% { opacity: 1;    transform: scale(1); }
  50%       { opacity: 0.25; transform: scale(0.8); }
}

.name {
  margin-bottom: 14px;
  font-size: clamp(28px, 8vw, 42px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: var(--text-heading);
  text-shadow: 0 0 50px rgba(0, 130, 255, 0.18);
}

.name .accent {
  color: var(--blue);
  text-shadow: 0 0 24px rgba(26, 159, 255, 0.4);
}

.mono-tag {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: clamp(9px, 2.3vw, 10.5px);
  letter-spacing: 2px;
  color: rgba(0, 200, 255, 0.28);
}

.divline {
  width: 48px;
  height: 2px;
  margin: 0 auto 14px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
}

.tagline {
  margin-bottom: 8px;
  font-size: clamp(10.5px, 2.8vw, 12.5px);
  letter-spacing: 0.4px;
  color: #5d8aaa;
}

.sub {
  font-size: clamp(10px, 2.6vw, 11.5px);
  line-height: 1.8;
  color: var(--text-muted);
}

/* Links */

.links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: var(--max-width);
}

.link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  height: 68px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-card);
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: border-color 0.25s, background 0.25s, transform 0.2s;
  /* staggered entrance */
  opacity: 0;
  transform: translateY(16px);
  animation: link-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.link:nth-child(1) { animation-delay: 0.05s; }
.link:nth-child(2) { animation-delay: 0.15s; }
.link:nth-child(3) { animation-delay: 0.25s; }
.link:nth-child(4) { animation-delay: 0.35s; }

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

/* left accent bar — revealed on hover */
.link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12%;
  bottom: 12%;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, var(--blue), var(--cyan));
  opacity: 0;
  transform: scaleY(0.5);
  transition: opacity 0.25s, transform 0.25s;
}

/* top-left corner notch */
.link::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  width: 8px;
  height: 8px;
  border-top: 1px solid rgba(0, 200, 255, 0.14);
  border-left: 1px solid rgba(0, 200, 255, 0.14);
  border-radius: 2px 0 0 0;
  pointer-events: none;
  transition: border-color 0.25s;
}

.link:hover,
.link:focus-visible {
  border-color: var(--border-hover);
  background: var(--bg-hover);
  transform: translateX(5px);
  outline: none;
}

.link:hover::before,
.link:focus-visible::before {
  opacity: 1;
  transform: scaleY(1);
}

.link:hover::after,
.link:focus-visible::after {
  border-color: rgba(0, 200, 255, 0.5);
}

.link:active {
  transform: translateX(3px) scale(0.99);
}

.link-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-icon);
  background: rgba(0, 90, 190, 0.12);
  border: 1px solid rgba(0, 140, 255, 0.2);
  color: var(--blue);
  transition: background 0.25s, border-color 0.25s;
}

.icon svg {
  width: 18px;
  height: 18px;
}

.link:hover .icon,
.link:focus-visible .icon {
  background: rgba(0, 110, 220, 0.22);
  border-color: rgba(0, 210, 255, 0.45);
}

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

.link-title {
  font-size: clamp(13px, 3.5vw, 14.5px);
  font-weight: 600;
  letter-spacing: 0.15px;
  color: #d0e8ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-sub {
  font-family: var(--font-mono);
  font-size: clamp(9.5px, 2.5vw, 11px);
  letter-spacing: 0.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-arrow {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: rgba(0, 150, 255, 0.3);
  transition: color 0.25s, transform 0.25s;
}

.link-arrow svg {
  width: 16px;
  height: 16px;
}

.link:hover .link-arrow,
.link:focus-visible .link-arrow {
  color: var(--blue);
  transform: translateX(3px);
}

/* continuous shine sweep, staggered per card */
.shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 25%,
    rgba(0, 190, 255, 0.05) 46%,
    rgba(0, 230, 255, 0.1) 50%,
    transparent 72%
  );
  background-size: 300% 100%;
  background-position: 220% 0;
  animation: shine-sweep 5s ease-in-out infinite;
}

.link:nth-child(1) .shine { animation-delay: 0s; }
.link:nth-child(2) .shine { animation-delay: 1.25s; }
.link:nth-child(3) .shine { animation-delay: 2.5s; }
.link:nth-child(4) .shine { animation-delay: 3.75s; }

@keyframes shine-sweep {
  0%        { background-position: 220% 0; opacity: 0; }
  12%        { opacity: 1; }
  68%        { background-position: -80% 0; opacity: 1; }
  85%, 100%  { background-position: -80% 0; opacity: 0; }
}

/* Footer */

.footer {
  margin-top: 48px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  text-align: center;
  color: #0d2234;
  user-select: none;
}

/* Responsive */

@media (max-width: 360px) {
  .wrap {
    padding: 48px 14px 56px;
  }

  .avatar {
    width: 80px;
    height: 80px;
  }

  .badge {
    font-size: 9px;
    letter-spacing: 1.5px;
    padding: 4px 12px;
  }

  .link {
    height: 60px;
    padding: 0 14px;
    gap: 10px;
  }

  .icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  .icon svg {
    width: 15px;
    height: 15px;
  }

  .link-title {
    font-size: 12.5px;
  }

  .link-sub {
    display: none;
  }
}

@media (min-width: 481px) {
  .wrap {
    padding: 64px 24px 80px;
  }

  .avatar {
    width: 104px;
    height: 104px;
  }

  .name {
    font-size: 44px;
  }

  .link {
    height: 72px;
    padding: 0 22px;
  }

  .icon {
    width: 44px;
    height: 44px;
  }

  .icon svg {
    width: 19px;
    height: 19px;
  }

  .link-title {
    font-size: 14.5px;
  }

  .link-sub {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .topbar,
  .badge-dot,
  .avatar-ring,
  .avatar::before,
  .shine {
    animation: none;
  }

  .link {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .link:hover {
    transform: translateX(3px);
  }

  .link::before,
  .link-arrow {
    transition: none;
  }
}
