@font-face {
  font-family: 'HelveticaLocal';
  src: url('fonts/Helvetica-light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'HelveticaLocal';
  src: url('fonts/Helvetica.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'HelveticaLocal';
  src: url('fonts/Helvetica-italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'HelveticaLocal';
  src: url('fonts/Helvetica-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'HelveticaLocal';
  src: url('fonts/Helvetica-Bold-italic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #080705;
  --text: #efe9db;
  --text-muted: #9a9184;
  --text-faint: #7d7568;
  --gold: #c8a765;
  --gold-bright: #e8cf98;
  --hairline: rgba(200, 167, 101, 0.16);
  --hairline-soft: rgba(255, 255, 255, 0.06);
  --ink: #12100b;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: 'HelveticaLocal', 'Noto Kufi Arabic', 'Noto Kufi Arabic Fallback', sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.5;
  display: flex;
  justify-content: center;
  padding: var(--space-8) var(--space-4) var(--space-7);
  position: relative;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(50% 32% at 50% 0%, rgba(200, 167, 101, 0.09), transparent 70%),
    radial-gradient(80% 60% at 50% 100%, rgba(0, 0, 0, 0.6), transparent 70%);
}

.bg-grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
}

/* Skeleton */
.skeleton {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding-top: var(--space-6);
}
.sk-line {
  height: 12px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--hairline-soft) 25%, rgba(255, 255, 255, 0.1) 50%, var(--hairline-soft) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.w-60 { width: 60%; }
.w-40 { width: 40%; }
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Profile */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 var(--space-4);
}

.name {
  margin: 0;
  font-family: 'HelveticaLocal', 'Noto Kufi Arabic', 'Noto Kufi Arabic Fallback', sans-serif;
  font-size: 46px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0;
  unicode-bidi: plaintext;
}

.name-rule {
  width: 36px;
  height: 1px;
  margin: var(--space-4) 0;
  background: var(--gold);
  opacity: 0.6;
}

.title {
  margin: 0;
  color: var(--gold);
  font-weight: 500;
  font-size: 16px;
  unicode-bidi: plaintext;
}

.bio {
  margin: var(--space-4) 0 0;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 300;
  width: 95%;
  line-height: 1.6;
}

/* Contact links (person + entity share this look) */
.actions,
.entity-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-6);
  margin-top: var(--space-6);
  width: 100%;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.action-btn svg {
  width: 20px;
  height: 20px;
  color: var(--gold);
  opacity: 0.85;
  transition: color 200ms var(--ease-out), opacity 200ms var(--ease-out);
}
.action-btn span:last-child {
  position: relative;
  padding-bottom: 3px;
}
.action-btn span:last-child::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--gold-bright);
  transform: translateX(-50%);
  transition: width 250ms var(--ease-out);
}
.action-btn:hover {
  color: var(--gold-bright);
  transform: translateY(-1px);
}
.action-btn:hover svg {
  opacity: 1;
}
.action-btn:hover span:last-child::after {
  width: 100%;
}
.action-btn:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

/* Social row (plain glyphs, no fills) */
.social-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-5);
  margin-top: var(--space-5);
}

.social-link {
  display: flex;
  color: var(--gold);
  opacity: 0.55;
  text-decoration: none;
  transition: color 200ms var(--ease-out), opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.social-link svg {
  width: 19px;
  height: 19px;
}
.social-link:hover {
  color: var(--gold-bright);
  opacity: 1;
  transform: translateY(-1px) scale(1.06);
}
.social-link:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}

/* Divider */
.section-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-4) 0;
  color: var(--gold-bright);
  font-size: 15px;
  font-weight: 500;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
  opacity: 0.55;
}

/* Entities */
.entities {
  display: flex;
  flex-direction: column;
}

.entity-card {
  padding: var(--space-6) 0;
}
.entity-card:not(:first-child) {
  border-top: 1px solid var(--hairline);
}

.entity-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-direction: column;
  text-align: center;
}

.entity-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}
.entity-logo img {
  height: 56px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
}

.entity-titles {
  min-width: 0;
}
.entity-tagline {
  margin: var(--space-3) 0 0;
  font-size: 14px;
  color: var(--gold);
  font-weight: 500;
}

.entity-desc {
  margin: var(--space-4) auto 0;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 300;
  max-width: 90%;
  text-align: center;
  line-height: 1.6;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: color 200ms var(--ease-out);
}
.pill-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--gold);
  opacity: 0.85;
  transition: color 200ms var(--ease-out), opacity 200ms var(--ease-out);
}
.pill-btn:hover {
  color: var(--gold-bright);
}
.pill-btn:hover svg {
  opacity: 1;
}
.pill-btn:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

.entity-social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-5);
  margin-top: var(--space-5);
}

/* Footer */
.card-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  padding-top: var(--space-6);
  border-top: 1px solid var(--hairline);
}

.btn-save {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-6);
  min-height: 48px;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 400;
  cursor: pointer;
  transition: background 220ms var(--ease-out), color 220ms var(--ease-out);
}
.btn-save:hover {
  background: var(--gold);
  color: var(--ink);
}
.btn-save:focus-visible {
  outline: 1px solid var(--gold-bright);
  outline-offset: 4px;
}

/* Entrance animation */
[data-anim] {
  opacity: 0;
  transform: translateY(8px);
  animation: rise 600ms var(--ease-out) forwards;
}
[data-anim="1"] { animation-delay: 40ms; }
[data-anim="2"] { animation-delay: 120ms; }
[data-anim="3"] { animation-delay: 200ms; }
[data-anim="4"] { animation-delay: 280ms; }
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  [data-anim] {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .sk-line {
    animation: none;
  }
  * {
    transition-duration: 1ms !important;
  }
}

@media (max-width: 380px) {
  .name { font-size: 36px; }
  .actions, .entity-actions { gap: var(--space-5); }
}
