:root {
  color-scheme: dark;
  --bg: #0f0d0b;
  --card: rgba(20, 16, 13, 0.42);
  --card-hover: rgba(30, 24, 20, 0.6);
  --text: #f7f1ea;
  --muted: rgba(247, 241, 234, 0.72);
  --border: rgba(255, 255, 255, 0.14);
  --icon-bg: rgba(255, 255, 255, 0.1);
  --primary: #f7f1ea;
  --primary-text: #1d1a17;
  --primary-icon-bg: rgba(0, 0, 0, 0.07);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.3), 0 16px 36px -12px rgba(0, 0, 0, 0.7);
  --ring: rgba(255, 255, 255, 0.85);
}

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

body {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding: max(2.5rem, env(safe-area-inset-top)) 1rem max(2.5rem, env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* Full-bleed looping video of Vriti on stage */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg);
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 30%;
  transform: scale(1.04);
  filter: saturate(0.9);
}

@media (prefers-reduced-motion: no-preference) {
  .bg-video { animation: drift 24s ease-in-out infinite alternate; }
  @keyframes drift {
    from { transform: scale(1.04) translate3d(0, 0, 0); }
    to { transform: scale(1.1) translate3d(-1%, -1%, 0); }
  }
}

/* Darken towards the content so text stays readable */
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 8, 6, 0.82) 0%, rgba(10, 8, 6, 0.55) 45%, rgba(10, 8, 6, 0.1) 100%),
    linear-gradient(0deg, rgba(10, 8, 6, 0.6) 0%, transparent 40%);
}

/* Film grain */
.grain {
  position: absolute;
  inset: -50%;
  z-index: 1;
  opacity: 0.09;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%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");
}

@media (prefers-reduced-motion: no-preference) {
  .grain { animation: grain 0.6s steps(4) infinite; }
  @keyframes grain {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-3%, 2%); }
    50% { transform: translate(2%, -3%); }
    75% { transform: translate(-2%, -2%); }
  }
}

/* Desktop: content sits left, Vriti on the right */
@media (min-aspect-ratio: 1/1) and (min-width: 900px) {
  body { justify-content: flex-start; padding-left: clamp(2rem, 8vw, 9rem); }
  .profile { text-align: left; }
  .avatar-ring { margin: 0; }
  .role { margin-left: 0; }
}

/* Portrait: she's centred, so darken top-to-bottom instead */
@media (max-aspect-ratio: 1/1) {
  .bg-video { object-position: 50% 20%; }
  .backdrop::after {
    background: linear-gradient(180deg, rgba(10, 8, 6, 0.45) 0%, rgba(10, 8, 6, 0.55) 35%, rgba(10, 8, 6, 0.82) 100%);
  }
}

main {
  width: 100%;
  max-width: 30rem;
  display: flex;
  flex-direction: column;
}

/* Profile */
.profile { text-align: center; }

.avatar-ring {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  padding: 4px;
  border-radius: 50%;
  background: var(--ring);
  box-shadow: var(--shadow-hover);
}

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

h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-top: 1.25rem;
}

.role {
  margin: 0.5rem auto 0;
  max-width: 22rem;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.4;
  text-wrap: balance;
}

.role .at { color: var(--muted); white-space: nowrap; }

h1, .role { text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45); }

/* Links */
.links {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2.25rem;
}

.link {
  display: grid;
  grid-template-columns: 2.5rem 1fr 2.5rem;
  align-items: center;
  gap: 0.75rem;
  min-height: 4rem;
  padding: 0.75rem;
  border-radius: 1.1rem;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.link .label {
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.25;
}

.link small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  font-weight: 400;
  opacity: 0.7;
}

.icon,
.arrow {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.8rem;
}

.icon { background: var(--icon-bg); }

.icon svg,
.arrow svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.arrow { opacity: 0.35; transition: opacity 0.18s ease, transform 0.18s ease; }
.arrow svg { width: 1rem; height: 1rem; }

.link:hover {
  transform: translateY(-2px);
  background: var(--card-hover);
  box-shadow: var(--shadow-hover);
}

.link:hover .arrow { opacity: 0.8; transform: translate(2px, -2px); }
.link:active { transform: translateY(0) scale(0.99); }

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

.link--primary,
.link--primary:hover {
  background: var(--primary);
  color: var(--primary-text);
  border-color: transparent;
  min-height: 4.5rem;
}

.link--primary .icon { background: var(--primary-icon-bg); }
.link--primary .arrow { opacity: 0.6; }

/* Gentle entrance */
@media (prefers-reduced-motion: no-preference) {
  .profile, .link {
    animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .link:nth-child(1) { animation-delay: 0.08s; }
  .link:nth-child(2) { animation-delay: 0.14s; }
  .link:nth-child(3) { animation-delay: 0.2s; }
  .link:nth-child(4) { animation-delay: 0.26s; }

  @keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .link, .arrow { transition: none; }
}

/* Phones: tighten everything so the whole page fits without scrolling */
@media (max-width: 600px) {
  body { padding: max(1.5rem, env(safe-area-inset-top)) 1rem max(1.5rem, env(safe-area-inset-bottom)); }
  .avatar-ring { width: 104px; height: 104px; padding: 3px; }
  h1 { font-size: 1.75rem; margin-top: 1rem; }
  .role { font-size: 0.92rem; margin-top: 0.4rem; }
  .links { gap: 1.1rem; margin-top: 1.5rem; }
  .link { min-height: 3.5rem; padding: 0.5rem 0.6rem; border-radius: 1rem; grid-template-columns: 2.25rem 1fr 2.25rem; }
  .link--primary, .link--primary:hover { min-height: 4rem; }
  .icon, .arrow { width: 2.25rem; height: 2.25rem; border-radius: 0.7rem; }
}

/* Short screens (small phones, in-app browsers with big toolbars) */
@media (max-height: 640px) {
  body { padding-top: max(1rem, env(safe-area-inset-top)); padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
  .avatar-ring { width: 80px; height: 80px; }
  h1 { font-size: 1.5rem; margin-top: 0.75rem; }
  .links { gap: 0.85rem; margin-top: 1.1rem; }
  .link { min-height: 3.1rem; }
  .link--primary, .link--primary:hover { min-height: 3.5rem; }
}
