@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/instrument-serif-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/instrument-serif-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url("assets/fonts/outfit-300.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url("assets/fonts/outfit-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url("assets/fonts/outfit-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url("assets/fonts/outfit-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0c0a08;
  --gold: #d7b780;
  --gold-bright: #f3d9a6;
  --gold-deep: #8b6d3f;
  --cream: #f4efe6;
  --muted: #b6a48c;
  --ink: #1a140e;
  --line: rgba(215, 183, 128, 0.22);
  --font-serif: "Instrument Serif", "Times New Roman", Times, serif;
  --font-sans: Outfit, "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}

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

html {
  background: var(--bg);
  color: var(--cream);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(1.4rem, env(safe-area-inset-top)) 1.15rem max(1.6rem, env(safe-area-inset-bottom));
  overflow-x: hidden;
  position: relative;
  line-height: 1.4;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }

/* Atmosphere */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(90, 62, 24, 0.28), transparent 60%),
    radial-gradient(800px 500px at 100% 100%, rgba(50, 30, 12, 0.35), transparent 55%),
    var(--bg);
}
.atmosphere::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--gold-bright), var(--gold), transparent);
  opacity: 0.85;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.45;
  will-change: transform;
}
.orb-a {
  width: 340px; height: 340px;
  left: 50%; top: 8%;
  margin-left: -170px;
  background: radial-gradient(circle, rgba(215, 183, 128, 0.45), transparent 70%);
  animation: drift-a 22s ease-in-out infinite alternate;
}
.orb-b {
  width: 280px; height: 280px;
  right: -60px; bottom: 8%;
  background: radial-gradient(circle, rgba(140, 70, 28, 0.35), transparent 70%);
  animation: drift-b 28s ease-in-out infinite alternate;
}
.orb-c {
  width: 200px; height: 200px;
  left: -40px; bottom: 28%;
  background: radial-gradient(circle, rgba(215, 183, 128, 0.18), transparent 70%);
  animation: drift-a 26s ease-in-out infinite alternate-reverse;
}
.grain {
  position: absolute;
  inset: 0;
  background: url("assets/grain.png") repeat;
  opacity: 0.07;
  mix-blend-mode: overlay;
}
.monogram {
  position: absolute;
  right: -0.1em;
  bottom: -0.15em;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(8rem, 28vw, 16rem);
  color: var(--gold);
  opacity: 0.045;
  letter-spacing: -0.06em;
  line-height: 0.8;
  user-select: none;
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(18px, 28px, 0) scale(1.08); }
}
@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-24px, -16px, 0) scale(1.1); }
}
@keyframes shimmer {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Card */
.card {
  position: relative;
  z-index: 1;
  width: min(100%, 26.25rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.eyebrow {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.35rem;
}

.portrait-wrap {
  position: relative;
  width: 10.35rem;
  height: 10.35rem;
  margin-bottom: 1.35rem;
}
.ring {
  position: absolute;
  inset: -0.4rem;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--gold-bright), var(--gold-deep) 25%, #3a2a16 50%, var(--gold-deep) 75%, var(--gold-bright));
  animation: shimmer 16s linear infinite;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
}
.portrait-wrap::after {
  content: "";
  position: absolute;
  inset: -1.4rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215, 183, 128, 0.28), transparent 70%);
  z-index: -1;
  pointer-events: none;
}
.portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(12, 10, 8, 0.8);
}

h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.35rem, 9vw, 3.15rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--cream);
}
h1 em {
  font-style: italic;
  font-weight: 400;
  margin-right: 0.18em;
}

.role {
  margin-top: 0.45rem;
  font-weight: 300;
  font-size: 1.02rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.role::after {
  content: "";
  display: block;
  width: 2.4rem;
  height: 1px;
  margin: 1.05rem auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.9;
}

/* CTA */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.35rem;
  width: 100%;
  padding: 0.92rem 1.2rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-bright) 0%, var(--gold) 55%, var(--gold-deep) 140%);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.04em;
  box-shadow:
    0 1px 0 rgba(255, 240, 210, 0.55) inset,
    0 10px 24px rgba(80, 55, 20, 0.28);
  transition: transform 0.18s ease, filter 0.18s ease;
}
.cta svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.cta:hover { filter: brightness(1.06); }
.cta:active { transform: translateY(1px) scale(0.99); }
.cta:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }

/* Actions */
.actions {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.35rem;
  width: 100%;
  margin-top: 1.25rem;
}
.action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.15rem 0 0.2rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  min-width: 0;
  transition: color 0.18s ease;
}
.action .icon {
  width: 2.85rem;
  height: 2.85rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(215, 183, 128, 0.05);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.action svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.action:hover { color: var(--cream); }
.action:hover .icon {
  border-color: var(--gold);
  background: rgba(215, 183, 128, 0.12);
  transform: translateY(-1px);
}
.action:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 12px; }

/* Details */
.details {
  list-style: none;
  width: 100%;
  margin-top: 1.15rem;
  border-top: 1px solid var(--line);
}
.details li { border-bottom: 1px solid var(--line); }
.details a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.78rem 0.1rem;
  text-align: left;
}
.details .label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.82;
  flex: 0 0 auto;
}
.details .value {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
  text-align: right;
}
.details a:hover .value { color: var(--gold-bright); }
.details a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

.toolbar { width: 100%; margin-top: 1.1rem; }
.share {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.82rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--cream);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  background: rgba(215, 183, 128, 0.04);
  transition: border-color 0.18s ease, background 0.18s ease;
}
.share svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.7;
  stroke-linecap: round;
}
.share:hover { border-color: var(--gold); background: rgba(215, 183, 128, 0.1); }
.share:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }

.qr-block {
  margin-top: 1.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}
.qr-block img {
  width: 7.4rem;
  height: 7.4rem;
  padding: 0.4rem;
  background: var(--cream);
  border-radius: 0.85rem;
  box-shadow: 0 0 0 1px rgba(215, 183, 128, 0.28), 0 10px 24px rgba(0, 0, 0, 0.28);
}
.qr-block figcaption {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.a2hs {
  margin-top: 1.1rem;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  max-width: 18rem;
}
@media (display-mode: standalone) {
  .a2hs { display: none; }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(1rem);
  z-index: 10;
  background: var(--cream);
  color: var(--ink);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 800px) {
  .card { width: 27.5rem; }
  .portrait-wrap { width: 11.5rem; height: 11.5rem; }
  h1 { font-size: 3.25rem; }
  .eyebrow { margin-bottom: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .orb, .ring { animation: none; }
  .cta, .action .icon { transition: none; }
}

@media (max-height: 900px) {
  body { padding-top: max(1.1rem, env(safe-area-inset-top)); padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
  .eyebrow { margin-bottom: 1.05rem; }
  .portrait-wrap { width: 9.5rem; height: 9.5rem; margin-bottom: 1.05rem; }
  h1 { font-size: 2.45rem; }
  .role { margin-top: 0.35rem; }
  .role::after { margin-top: 0.85rem; }
  .cta { margin-top: 1.1rem; padding: 0.84rem 1.2rem; }
  .actions { margin-top: 1.05rem; }
  .details { margin-top: 0.95rem; }
  .details a { padding: 0.68rem 0.1rem; }
  .toolbar { margin-top: 0.95rem; }
  .qr-block { margin-top: 1.05rem; }
  .qr-block img { width: 6.5rem; height: 6.5rem; }
  .a2hs { margin-top: 0.85rem; }
}
