/* ---------- Reset & base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #141414;
  --bg-raised: #1c1c1c;
  --bg-card: #1a1a1a;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.16);
  --text: #f5f5f3;
  --text-dim: rgba(245,245,243,0.62);
  --text-faint: rgba(245,245,243,0.38);
  --accent: #ffffff;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-full: 999px;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --maxw: 480px;
}

html { color-scheme: dark; }

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
}

/* ---------- Ambient background ---------- */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 400px at 50% -10%, rgba(255,255,255,0.09), transparent 60%),
    radial-gradient(500px 500px at 90% 15%, rgba(255,255,255,0.05), transparent 60%),
    radial-gradient(500px 500px at 5% 85%, rgba(255,255,255,0.04), transparent 60%);
}

.bg-noise {
  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' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Layout ---------- */
.page {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 8vh, 4.5rem) 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100dvh;
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.55rem;
  margin-bottom: clamp(2rem, 5vh, 2.75rem);
}

.avatar-ring {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(145deg, rgba(255,255,255,0.55), rgba(255,255,255,0.06));
  margin-bottom: 0.6rem;
  box-shadow: var(--shadow);
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--bg-raised);
  border: 3px solid var(--bg);
}

.name {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(1.5rem, 5vw, 1.85rem);
  letter-spacing: -0.01em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.verified-badge {
  width: 0.72em;
  height: 0.72em;
  flex-shrink: 0;
}

.handle {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.handle:hover { color: var(--text); }

.location {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-faint);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.35rem;
}

.location svg {
  width: 12px;
  height: 12px;
}

.tagline {
  color: var(--text-faint);
  font-size: 0.88rem;
  font-weight: 400;
  margin-top: 0.65rem;
  max-width: 320px;
}

/* ---------- Link cards ---------- */
.links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: clamp(1.75rem, 4vh, 2.25rem);
}

.card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 1rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: var(--bg-raised);
}

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

.card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text);
  overflow: hidden;
}

.card-icon svg { width: 20px; height: 20px; }

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}

.card-title {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
}

.card-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.35;
}

.card-arrow {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--text-faint);
  transition: color 0.18s ease, transform 0.18s ease;
}

.card:hover .card-arrow {
  color: var(--text);
  transform: translate(2px, -2px);
}

/* ---------- Socials ---------- */
.socials {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.social-pill:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: rgba(255,255,255,0.04);
}

.ig-glyph { width: 15px; height: 15px; }

/* ---------- Footer ---------- */
.footer {
  font-size: 0.75rem;
  color: var(--text-faint);
  text-align: center;
  margin-top: auto;
  padding-top: 1.5rem;
}

/* ---------- Responsive: tablet & desktop ---------- */
@media (min-width: 640px) {
  :root { --maxw: 520px; }
  .card { padding: 1.15rem 1.3rem; }
  .avatar-ring { width: 128px; height: 128px; }
}

@media (min-width: 1024px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .page {
    min-height: auto;
    padding: 3.5rem 2rem;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    margin: 4vh auto;
  }
}

@media (max-height: 700px) and (min-width: 1024px) {
  .page { margin: 2vh auto; }
}

/* ---------- Fade-in entrance animation ---------- */
.fade-in {
  animation: 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0s 1 normal both running fadeInUp;
}

.fade-in.d1 { animation-delay: 0s; }
.fade-in.d2 { animation-delay: 0.12s; }
.fade-in.d3 { animation-delay: 0.24s; }
.fade-in.d4 { animation-delay: 0.36s; }
.fade-in.d5 { animation-delay: 0.48s; }
.fade-in.d6 { animation-delay: 0.6s; }
.fade-in.d7 { animation-delay: 0.72s; }
.fade-in.d8 { animation-delay: 0.84s; }
.fade-in.d9 { animation-delay: 0.96s; }

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0px); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .fade-in {
    animation: auto ease 0s 1 normal none running none;
    opacity: 1;
    transform: none;
  }
}

/* ---------- Focus states for accessibility ---------- */
a:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}
