/* chrislabonty.com — dark aurora */

:root {
  --bg: #07070b;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-solid: #111117;
  --surface-2: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f4f4f6;
  --muted: #9a9aa6;
  --a1: #2dd4bf; /* teal */
  --a2: #a78bfa; /* violet */
  --a3: #fbbf24; /* amber */
  --radius: 28px;
  --font: "Sora", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- background ---------- */

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.42;
  mix-blend-mode: screen;
  will-change: transform;
}

.blob-1 {
  top: -20vmax;
  left: -15vmax;
  background: radial-gradient(circle at 30% 30%, var(--a1), transparent 60%);
  animation: drift-1 38s ease-in-out infinite alternate;
}

.blob-2 {
  right: -15vmax;
  bottom: -25vmax;
  background: radial-gradient(circle at 70% 40%, var(--a2), transparent 60%);
  animation: drift-2 46s ease-in-out infinite alternate;
}

.blob-3 {
  top: 40%;
  left: 50%;
  width: 40vmax;
  height: 40vmax;
  opacity: 0.22;
  background: radial-gradient(circle at 50% 50%, var(--a3), transparent 60%);
  transform: translate(-50%, -50%);
  animation: drift-3 52s ease-in-out infinite alternate;
}

@keyframes drift-1 { to { transform: translate(18vmax, 12vmax) scale(1.15); } }
@keyframes drift-2 { to { transform: translate(-16vmax, -14vmax) scale(1.1); } }
@keyframes drift-3 {
  from { transform: translate(-50%, -50%); }
  to   { transform: translate(-30%, -70%) scale(1.25); }
}

/* faint film grain so the gradients don't band */
.aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- layout ---------- */

.page {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 32px 16px;
}

.card {
  width: 100%;
  max-width: 460px;
  padding: 40px 28px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  box-shadow:
    0 30px 80px -30px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@supports not (backdrop-filter: blur(1px)) {
  .card { background: var(--surface-solid); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
}

/* ---------- hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.avatar-ring {
  width: 140px;
  height: 140px;
  padding: 4px;
  border-radius: 50%;
  background: conic-gradient(var(--a1), var(--a2), var(--a3), var(--a1));
  box-shadow:
    0 0 40px -6px rgba(45, 212, 191, 0.55),
    0 0 80px -20px rgba(167, 139, 250, 0.6);
  animation: spin 14s linear infinite;
}

.avatar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid var(--bg);
  object-fit: cover;
  background: var(--surface-solid);
  animation: spin 14s linear infinite reverse; /* keeps the photo upright while the ring turns */
}

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

.name {
  margin: 22px 0 6px;
  font-size: clamp(1.9rem, 6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(92deg, #fff 0%, #dffffa 45%, var(--a1) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

/* ---------- socials ---------- */

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.social {
  --brand: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
}

.social svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.social .xhs {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}

.social:focus-visible {
  outline: 2px solid var(--a1);
  outline-offset: 3px;
}

@media (hover: hover) {
  .social:hover {
    transform: translateY(-3px);
    color: #fff;
    background: color-mix(in srgb, var(--brand) 28%, transparent);
    border-color: color-mix(in srgb, var(--brand) 60%, transparent);
    box-shadow: 0 10px 30px -8px var(--brand);
  }
}

/* ---------- stats ---------- */

.stats {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.stats-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.stats-head h2 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.powered {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.powered:hover,
.powered:focus-visible {
  color: var(--text);
  border-bottom-color: currentColor;
}

.chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.chip-num {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.chip-label {
  font-size: 0.75rem;
  color: var(--muted);
}

.langs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lang {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "flag name count"
    "bar  bar  bar";
  column-gap: 10px;
  row-gap: 8px;
  align-items: center;
}

.lang-flag {
  grid-area: flag;
  font-size: 1.25rem;
  line-height: 1;
}

.lang-name {
  grid-area: name;
  font-weight: 600;
}

.lang-count {
  grid-area: count;
  min-width: 4ch;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.lang-bar {
  grid-area: bar;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.lang-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--a1), var(--a2) 60%, var(--a3));
  box-shadow: 0 0 14px -2px var(--a1);
  transition: width 1.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.langs.is-ready .lang-fill {
  width: max(var(--w), 3%);
}

.updated {
  margin: 18px 0 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}

.stats-empty {
  padding: 22px 16px;
  text-align: center;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px dashed var(--border);
}

.stats-empty p { margin: 0; }
.stats-empty p:first-child { font-weight: 600; }

.muted {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- footer ---------- */

.foot {
  color: var(--muted);
  font-size: 0.75rem;
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .blob, .avatar-ring, .avatar, .card { animation: none; }
  .blob-3 { transform: translate(-50%, -50%); }
  .lang-fill { transition: none; }
  .langs .lang-fill { width: max(var(--w), 3%); }
  .social { transition: none; }
}

/* ---------- narrow phones ---------- */

@media (max-width: 420px) {
  .card { padding: 32px 20px 28px; }
  .socials { gap: 10px; }
  .social { width: 46px; height: 46px; }
  .social svg { width: 20px; height: 20px; }
}
