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

:where(ul, ol):where([class]) {
  padding-left: 0;
}

body,
:where(blockquote, figure, fieldset):where([class]) {
  margin: 0;
}

:where(h1, h2, h3, h4, h5, h6, p, ul, ol, dl):where([class]) {
  margin-block: 0;
}

:where(ul[class]) {
  list-style: none;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  line-height: 1.5;
}

a:where([class]) {
  display: inline-flex;
}

:where([fill]:not([fill='none'], [fill^='url'])) {
  fill: currentColor;
}

:where([stroke]:not([stroke='none'], [stroke^='url'])) {
  stroke: currentColor;
}

@media (prefers-reduced-motion: reduce) {
  *,
  ::before,
  ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============ Design tokens ============ */

:root {
  --color-bg: #0a0a0f;
  --color-surface: rgba(12, 12, 20, 0.62);
  --color-border: rgba(255, 255, 255, 0.12);
  --color-text: #f5f5f7;
  --color-text-muted: rgba(245, 245, 247, 0.65);
  --color-accent: #4cc9f0;

  --font-heading: 'DM Sans', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius: 24px;
}

/* ============ Base layout ============ */

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    ellipse at center,
    rgba(10, 10, 15, 0.25) 0%,
    rgba(10, 10, 15, 0.7) 100%
  );
}

.main {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 16px;
}

/* ============ Card ============ */

.card {
  position: relative;
  width: min(440px, 100%);
  padding: 40px 36px 32px;
  border-radius: var(--radius);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

/* Subtle animated light sweep on the card's top edge */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(76, 201, 240, 0.8),
    transparent
  );
  animation: edge-glow 4s ease-in-out infinite;
}

@keyframes edge-glow {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

/* ============ Avatar ============ */

.card-avatar {
  position: relative;
  width: 124px;
  height: 124px;
  display: grid;
  place-items: center;
}

.avatar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--color-accent),
    transparent 30%,
    transparent 70%,
    var(--color-accent)
  );
  animation: spin 6s linear infinite;
}

.avatar-ring::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--color-bg);
}

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

.avatar-img {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card-avatar:hover .avatar-img {
  transform: scale(1.05);
}

/* ============ Text ============ */

.card-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-name {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}

.card-role {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.card-bio {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  max-width: 34ch;
  margin-inline: auto;
  text-wrap: pretty;
}

/* ============ Action buttons ============ */

.card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease;
}

.action-btn:hover {
  transform: translateY(-2px);
}

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

.action-primary {
  background: var(--color-accent);
  color: #06131a;
}

.action-primary:hover {
  box-shadow: 0 8px 24px rgba(76, 201, 240, 0.4);
}

.action-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.action-secondary:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* ============ Divider ============ */

.card-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-border),
    transparent
  );
}

/* ============ Social icons ============ */

.icon-list {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.icon-link {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: var(--color-text-muted);
  border: 1px solid transparent;
  transition:
    color 0.25s ease,
    transform 0.25s ease,
    border-color 0.25s ease,
    background-color 0.25s ease,
    filter 0.25s ease;
}

.icon-link:hover {
  color: var(--color-text);
  transform: translateY(-4px);
  border-color: var(--color-border);
  background: rgba(255, 255, 255, 0.05);
  filter: drop-shadow(0 0 10px rgba(76, 201, 240, 0.45));
}

.icon-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ============ Enter animations ============ */

.card-avatar,
.card-header,
.card-actions,
.icon-item {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

body.is-loaded .card,
body.is-loaded .card-avatar,
body.is-loaded .card-header,
body.is-loaded .card-actions,
body.is-loaded .icon-item {
  opacity: 1;
  transform: translateY(0);
}

body.is-loaded .card-avatar {
  transition-delay: 0.15s;
}

body.is-loaded .card-header {
  transition-delay: 0.3s;
}

body.is-loaded .card-actions {
  transition-delay: 0.45s;
}

body.is-loaded .icon-item:nth-child(1) {
  transition-delay: 0.55s;
}

body.is-loaded .icon-item:nth-child(2) {
  transition-delay: 0.65s;
}

body.is-loaded .icon-item:nth-child(3) {
  transition-delay: 0.75s;
}

body.is-loaded .icon-item:nth-child(4) {
  transition-delay: 0.85s;
}

/* ============ Responsive ============ */

@media (max-width: 640px) {
  .card {
    padding: 32px 20px 28px;
  }

  .card-name {
    font-size: 1.65rem;
  }
}
