/* ==========================================================================
   Luxury Digital Visiting Card — style.css
   Design tokens live in :root so the whole palette / scale is editable
   from one place.
   ========================================================================== */

:root {
  /* ---- Dark luxury (default) palette ---- */
  --bg-primary: #07070a;
  --bg-secondary: #101014;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --border-soft: rgba(255, 255, 255, 0.08);

  --gold: #c9a45c;
  --gold-light: #f0d58a;
  --gold-dim: #8a723f;

  --text-primary: #f3f1ec;
  --text-secondary: #a4a29c;
  --text-tertiary: #6f6d68;

  --shadow-ambient: rgba(0, 0, 0, 0.6);

  /* ---- Motion / geometry ---- */
  --radius-card: 28px;
  --radius-frame: 999px;
  --ease-lux: cubic-bezier(0.19, 1, 0.22, 1);
  --dur-fast: 0.25s;
  --dur-med: 0.6s;
  --dur-slow: 1.4s;

  color-scheme: dark;
}

[data-theme="light"] {
  --bg-primary: #f4f1ea;
  --bg-secondary: #e9e4d8;
  --surface: rgba(20, 18, 12, 0.03);
  --surface-strong: rgba(20, 18, 12, 0.05);
  --border-soft: rgba(20, 18, 12, 0.1);

  --gold: #a9822f;
  --gold-light: #c9a45c;
  --gold-dim: #8a723f;

  --text-primary: #221f19;
  --text-secondary: #5c584e;
  --text-tertiary: #8b8779;

  --shadow-ambient: rgba(60, 50, 30, 0.18);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
  transition: background var(--dur-med) var(--ease-lux), color var(--dur-med) var(--ease-lux);
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Background — layered atmosphere
   ========================================================================== */

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 0%, var(--bg-secondary), var(--bg-primary) 70%);
}

.bg-gradient {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  will-change: transform;
  mix-blend-mode: screen;
}
[data-theme="light"] .bg-gradient { opacity: 0.22; mix-blend-mode: multiply; }

.bg-gradient--1 {
  top: -20%;
  left: -10%;
  background: radial-gradient(circle, rgba(201, 164, 92, 0.35), transparent 65%);
  animation: drift1 34s ease-in-out infinite;
}
.bg-gradient--2 {
  bottom: -25%;
  right: -15%;
  background: radial-gradient(circle, rgba(120, 100, 60, 0.3), transparent 65%);
  animation: drift2 40s ease-in-out infinite;
}
.bg-gradient--3 {
  top: 30%;
  left: 40%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
  animation: drift3 46s ease-in-out infinite;
}

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8vw, 10vh) scale(1.15); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-6vw, -8vh) scale(1.1); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-40%, -60%) scale(1.2); }
}

/* Cinematic light beam */
.bg-beam {
  position: absolute;
  top: -20%;
  left: -30%;
  width: 45%;
  height: 160%;
  background: linear-gradient(100deg, transparent 40%, rgba(240, 213, 138, 0.05) 48%, rgba(240, 213, 138, 0.09) 50%, rgba(240, 213, 138, 0.05) 52%, transparent 60%);
  transform: rotate(8deg);
  animation: beamSweep 16s ease-in-out infinite;
  pointer-events: none;
}
@keyframes beamSweep {
  0%, 82%, 100% { left: -60%; opacity: 0; }
  90% { opacity: 1; }
  95% { left: 110%; opacity: 0; }
}

#particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Film grain — subtle noise via inline SVG turbulence */
.bg-noise {
  position: absolute;
  inset: -10%;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}
[data-theme="light"] .bg-noise { opacity: 0.05; }

.bg-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}
[data-theme="light"] .bg-vignette {
  background: radial-gradient(ellipse at 50% 50%, transparent 45%, rgba(60,50,30,0.12) 100%);
}

/* ==========================================================================
   Top controls
   ========================================================================== */

.top-controls {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 20;
  display: flex;
  gap: 10px;
}

.icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-lux), color var(--dur-fast) var(--ease-lux), box-shadow var(--dur-fast) var(--ease-lux);
}
.icon-btn:hover {
  color: var(--gold-light);
  border-color: var(--gold-dim);
  box-shadow: 0 0 18px rgba(201, 164, 92, 0.25);
}
.icon-btn .icon { width: 18px; height: 18px; }

.icon--moon { display: none; }
[data-theme="light"] .icon--sun { display: none; }
[data-theme="light"] .icon--moon { display: block; }

.icon--note-off { transition: opacity var(--dur-fast) ease; }
.music-btn.is-playing .icon--note-off { opacity: 0.35; }

.visualizer {
  position: absolute;
  left: 100%;
  margin-left: 8px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
  opacity: 0;
  transition: opacity var(--dur-fast) ease;
  pointer-events: none;
}
.music-btn.is-playing .visualizer { opacity: 1; }
.visualizer span {
  width: 2px;
  height: 20%;
  background: var(--gold-light);
  border-radius: 2px;
  transform-origin: bottom;
}

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

.stage {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  perspective: 1600px;
}

.card {
  position: relative;
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius-card);
  background: linear-gradient(160deg, var(--surface-strong), var(--surface));
  border: 1px solid var(--border-soft);
  box-shadow:
    0 30px 60px -20px var(--shadow-ambient),
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 0 0 1px rgba(201, 164, 92, 0.06);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  transform-style: preserve-3d;
  will-change: transform;
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  filter: blur(6px);
  animation: cardEnter var(--dur-slow) var(--ease-lux) forwards;
  animation-delay: 0.15s;
}

@keyframes cardEnter {
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.card__sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), rgba(240, 213, 138, 0.14), transparent 45%);
  opacity: 0;
  transition: opacity var(--dur-fast) ease;
  pointer-events: none;
}
.card:hover .card__sheen { opacity: 1; }

.card__inner {
  position: relative;
  padding: 52px 36px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform: translateZ(30px);
}

/* ---- Profile image ---- */

.profile {
  position: relative;
  width: 130px;
  height: 130px;
  margin-bottom: 26px;
  opacity: 0;
  transform: scale(0.85);
  animation: profileEnter var(--dur-med) var(--ease-lux) forwards;
  animation-delay: 0.6s;
}
@keyframes profileEnter {
  to { opacity: 1; transform: scale(1); }
}

.profile__ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from var(--ring-angle, 0deg), transparent 0deg, var(--gold-light) 40deg, transparent 100deg, transparent 260deg, var(--gold) 300deg, transparent 340deg);
  animation: ringRotate 6s linear infinite;
  filter: blur(0.5px);
}
@keyframes ringRotate {
  to { --ring-angle: 360deg; }
}
@property --ring-angle {
  syntax: '<angle>';
  inherits: true;
  initial-value: 0deg;
}

.profile__frame {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(201, 164, 92, 0.55);
  background: var(--bg-secondary);
  box-shadow:
    0 0 0 6px rgba(7, 7, 10, 0.7),
    0 12px 30px -8px rgba(0,0,0,0.7),
    0 0 26px rgba(201, 164, 92, 0.18);
  transition: box-shadow var(--dur-med) var(--ease-lux);
}
[data-theme="light"] .profile__frame {
  box-shadow: 0 0 0 6px rgba(244,241,234,0.9), 0 12px 26px -10px rgba(60,50,30,0.3), 0 0 22px rgba(169,130,47,0.18);
}

.profile__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--dur-med) var(--ease-lux), filter var(--dur-med) var(--ease-lux);
  filter: saturate(0.96) contrast(1.03);
}

.profile:hover .profile__frame {
  box-shadow:
    0 0 0 6px rgba(7, 7, 10, 0.7),
    0 12px 30px -8px rgba(0,0,0,0.7),
    0 0 44px rgba(201, 164, 92, 0.4);
}
.profile:hover .profile__img { transform: scale(1.08); }

.profile__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.35) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.9s var(--ease-lux);
}
.profile:hover .profile__frame::after { transform: translateX(120%); }

/* ---- Name / text ---- */

.name {
  margin: 0 0 6px;
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(1.9rem, 6vw, 2.5rem);
  letter-spacing: 0.06em;
  background: linear-gradient(100deg, var(--text-primary) 30%, var(--gold-light) 50%, var(--text-primary) 70%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
  animation:
    nameEnter var(--dur-med) var(--ease-lux) forwards,
    nameSheen 7s ease-in-out infinite;
  animation-delay: 1s, 2.4s;
}
@keyframes nameEnter {
  from { opacity: 0; letter-spacing: 0.25em; }
  to { opacity: 1; letter-spacing: 0.06em; }
}
@keyframes nameSheen {
  0%, 100% { background-position: 200% 0; }
  50% { background-position: 0% 0; }
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: revealUp var(--dur-med) var(--ease-lux) forwards;
}
.profession.reveal { animation-delay: 1.15s; }
.tagline.reveal { animation-delay: 1.3s; }
.details.reveal { animation-delay: 1.55s; }
.socials.reveal { animation-delay: 1.9s; }
.cta.reveal { animation-delay: 2.05s; }
.divider.reveal:nth-of-type(1) { animation-delay: 1.45s; }

@keyframes revealUp {
  to { opacity: 1; transform: translateY(0); }
}

.profession {
  margin: 0;
  font-size: 0.92rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 500;
}

.tagline {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}
.tagline .dot { color: var(--gold); margin: 0 6px; }

.divider {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 22px 0;
}
.divider span {
  width: 46px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.7;
}

/* ---- Details list ---- */

.details {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.details__item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.details__icon {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--gold);
  opacity: 0.85;
}

.details__item a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--dur-fast) ease;
}
.details__item a:hover { color: var(--gold-light); }

/* ---- Socials ---- */

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

.social {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: color var(--dur-fast) var(--ease-lux), border-color var(--dur-fast) var(--ease-lux), box-shadow var(--dur-fast) var(--ease-lux), background var(--dur-fast) var(--ease-lux);
}
.social svg { width: 17px; height: 17px; transition: transform var(--dur-fast) var(--ease-lux); }
.social:hover {
  color: var(--gold-light);
  border-color: var(--gold-dim);
  background: var(--surface-strong);
  box-shadow: 0 0 20px rgba(201, 164, 92, 0.3);
}
.social:hover svg { transform: scale(1.12); }

/* ---- CTA ---- */

.cta {
  position: relative;
  margin-top: 30px;
  padding: 14px 40px;
  border-radius: 999px;
  border: 1px solid var(--gold-dim);
  color: var(--gold-light);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  font-weight: 600;
  overflow: hidden;
  background: transparent;
  transition: box-shadow var(--dur-fast) var(--ease-lux), border-color var(--dur-fast) var(--ease-lux), transform var(--dur-fast) var(--ease-lux);
}
.cta span { position: relative; z-index: 1; }
.cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(240,213,138,0.4), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s var(--ease-lux);
}
.cta:hover {
  border-color: var(--gold-light);
  box-shadow: 0 0 26px rgba(201, 164, 92, 0.35);
  transform: translateY(-1px);
}
.cta:hover::before { left: 130%; }

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

@media (max-width: 480px) {
  .card__inner { padding: 44px 26px 34px; }
  .profile { width: 108px; height: 108px; }
  .socials { gap: 10px; }
  .social { width: 38px; height: 38px; }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .card { max-width: 420px; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .card, .name, .reveal, .profile { opacity: 1; transform: none; filter: none; }
  .profile__ring { animation: none; }
  .bg-beam, .bg-gradient { display: none; }
}
