:root {
  color-scheme: dark;
  --ink: #11100f;
  --ink-2: #171513;
  --ink-3: #221d18;
  --ivory: #fbf4e4;
  --ivory-soft: #eadfcb;
  --muted: #c6b89f;
  --gold: #d8b46b;
  --gold-bright: #f0d996;
  --gold-dim: rgba(216, 180, 107, 0.42);
  --body-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif-font: "Cormorant Garamond", Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #ded0b9;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ivory);
  font-family: var(--body-font);
  background:
    linear-gradient(rgba(246, 232, 205, 0.52), rgba(166, 132, 85, 0.22)),
    url("/assets/marble-surface.png") center / cover fixed,
    #ded0b9;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.42), transparent 24%),
    radial-gradient(circle at 82% 82%, rgba(97, 73, 40, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.38), rgba(154, 122, 82, 0.12));
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

.page {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(22px, 5vw, 64px);
}

.vcard {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: min(100%, 760px);
  border: 1px solid rgba(240, 217, 150, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 30%),
    radial-gradient(circle at 16% 4%, rgba(240, 217, 150, 0.16), transparent 26%),
    linear-gradient(145deg, var(--ink), var(--ink-2) 52%, #0b0a09);
  box-shadow:
    0 38px 82px rgba(38, 29, 18, 0.36),
    0 2px 0 rgba(255, 255, 255, 0.12) inset,
    0 -1px 0 rgba(216, 180, 107, 0.18) inset;
  padding: clamp(24px, 4vw, 42px);
}

.vcard::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.38;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent),
    repeating-linear-gradient(110deg, transparent 0 16px, rgba(255, 255, 255, 0.018) 17px 18px);
  mix-blend-mode: screen;
}

.lang-switch {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  display: inline-flex;
  padding: 4px;
  border: 1px solid rgba(216, 180, 107, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.lang-btn {
  min-width: 42px;
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.lang-btn.is-active {
  color: #11100f;
  background: linear-gradient(135deg, #f4dda0, #c89a45);
}

.lang-btn:focus-visible {
  outline: 3px solid rgba(216, 180, 107, 0.4);
  outline-offset: 3px;
}

.identity {
  display: grid;
  grid-template-columns: minmax(190px, 0.72fr) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 38px);
  align-items: center;
  padding-top: 18px;
}

.portrait-wrap {
  position: relative;
  overflow: hidden;
  width: min(100%, 260px);
  aspect-ratio: 4 / 5;
  border: 1px solid rgba(216, 180, 107, 0.36);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 28%, rgba(240, 217, 150, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 48%),
    #17130f;
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.28);
}

.portrait-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(0deg, rgba(17, 16, 15, 0.42), transparent 46%),
    linear-gradient(90deg, transparent 58%, rgba(17, 16, 15, 0.38));
}

.portrait {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.92) contrast(1.04);
}

.portrait.is-missing {
  display: none;
}

.portrait-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--gold-bright);
}

.portrait-fallback span {
  display: grid;
  width: clamp(86px, 18vw, 132px);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(240, 217, 150, 0.42);
  border-radius: 999px;
  font-family: var(--serif-font);
  font-size: clamp(3.8rem, 9vw, 6rem);
  line-height: 1;
  box-shadow: 0 0 34px rgba(216, 180, 107, 0.14);
}

.identity-copy {
  min-width: 0;
}

.monogram {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin: 0 0 14px;
  border: 1px solid rgba(216, 180, 107, 0.54);
  border-radius: 999px;
  color: var(--gold-bright);
  font-family: var(--serif-font);
  font-size: 1.32rem;
  line-height: 1;
}

h1 {
  margin: 0;
  color: var(--ivory);
  font-family: var(--serif-font);
  font-size: clamp(2.35rem, 5.2vw, 3.7rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.08;
  text-wrap: balance;
}

.gold-divider {
  width: min(100%, 260px);
  height: 1px;
  margin: clamp(14px, 2vw, 20px) 0;
  background: linear-gradient(90deg, var(--gold-bright), var(--gold-dim), transparent);
}

.role,
.services {
  margin: 0;
  color: var(--ivory-soft);
  font-size: clamp(0.92rem, 1.8vw, 1.08rem);
  font-weight: 560;
  line-height: 1.38;
}

.services {
  margin-top: 3px;
  color: var(--muted);
  font-size: clamp(0.82rem, 1.5vw, 0.94rem);
  letter-spacing: 0.02em;
}

.actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: clamp(24px, 4vw, 34px) 0;
}

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid rgba(216, 180, 107, 0.22);
  border-radius: 8px;
  color: var(--ivory);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  font-size: 0.92rem;
  font-weight: 760;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.action.primary {
  color: #11100f;
  border-color: rgba(240, 217, 150, 0.7);
  background: linear-gradient(135deg, #f4dda0, #c89a45);
}

.action:hover {
  transform: translateY(-1px);
  border-color: rgba(240, 217, 150, 0.48);
  background-color: rgba(255, 255, 255, 0.07);
}

.action:focus-visible,
.contact-row a:focus-visible,
.footer a:focus-visible {
  outline: 3px solid rgba(216, 180, 107, 0.4);
  outline-offset: 3px;
}

.action svg,
.contact-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(216, 180, 107, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.contact-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  color: var(--ivory-soft);
  font-size: clamp(0.88rem, 1.7vw, 1rem);
  font-weight: 650;
}

.contact-row a {
  min-width: 0;
  overflow-wrap: anywhere;
}

.contact-icon {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(216, 180, 107, 0.42);
  border-radius: 999px;
  color: var(--gold-bright);
}

.summary {
  display: grid;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(216, 180, 107, 0.25);
  color: var(--ivory-soft);
}

.summary p {
  margin: 0;
  font-size: clamp(0.88rem, 1.55vw, 0.98rem);
  line-height: 1.58;
}

.summary p {
  color: #f0e4cd;
}

.footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  margin-top: clamp(22px, 4vw, 32px);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer span {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 217, 150, 0.5));
}

.footer span:last-child {
  background: linear-gradient(90deg, rgba(240, 217, 150, 0.5), transparent);
}

.curve {
  position: absolute;
  z-index: -1;
  width: 34%;
  aspect-ratio: 1;
  border: 1px solid rgba(216, 180, 107, 0.26);
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 999px;
  opacity: 0.72;
}

.curve-a {
  right: -12%;
  top: -22%;
}

.curve-b {
  left: -16%;
  bottom: -24%;
  transform: rotate(180deg);
}

.spark {
  position: absolute;
  z-index: 2;
  width: 9px;
  height: 9px;
  rotate: 45deg;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  box-shadow: 0 0 16px rgba(240, 217, 150, 0.44);
}

.spark-top {
  right: 30px;
  top: 30px;
}

.spark-bottom {
  left: 32px;
  bottom: 32px;
}

@media (max-width: 720px) {
  .page {
    place-items: start center;
    padding: 18px 14px 28px;
  }

  .vcard {
    padding: 20px;
  }

  .lang-switch {
    position: relative;
    top: auto;
    right: auto;
    justify-self: center;
    margin: 0 auto 18px;
  }

  .identity {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-top: 0;
  }

  .portrait-wrap {
    width: min(100%, 210px);
    margin: 0 auto;
  }

  .identity-copy {
    text-align: center;
  }

  .monogram {
    margin-inline: auto;
  }

  .gold-divider {
    margin-inline: auto;
  }

  .actions {
    grid-template-columns: 1fr;
  }

  .contact-panel {
    grid-template-columns: 1fr;
  }

  .footer {
    font-size: 0.68rem;
    letter-spacing: 0.07em;
  }
}

@media (max-width: 390px) {
  .vcard {
    padding: 18px 16px;
  }

  h1 {
    font-size: 2.35rem;
  }

  .role,
  .services,
  .summary p {
    font-size: 0.84rem;
  }
}
