/* MYM Links — matches makeyourmark.media: near-black + deep green, mint light, liquid-glass controls */
:root {
  --ink: #030806;
  --ink-2: #07110e;
  --deep: #0e4c3c;
  --mint: #2bf5c0;
  --mint-2: #19d5a3;
  --mint-soft: rgb(43 245 192 / 0.14);
  --text: #f2fffb;
  --text-2: rgb(232 250 244 / 0.72);
  --text-3: rgb(232 250 244 / 0.56);
  --line: rgb(160 255 226 / 0.14);
  --line-2: rgb(160 255 226 / 0.26);
  --glass: linear-gradient(180deg, rgb(28 64 54 / 0.55), rgb(8 22 18 / 0.55));
  --grad-mint: linear-gradient(120deg, #7dffe0 0%, var(--mint) 40%, var(--mint-2) 75%, #6fe7ff 100%);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --en: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ar: 'Alexandria', 'Segoe UI', Tahoma, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--ink); }
body {
  min-height: 100vh; min-height: 100dvh;
  font-family: var(--en); color: var(--text); line-height: 1.5;
  background:
    radial-gradient(90vw 60vh at 85% -10%, rgb(14 76 60 / 0.85), transparent 70%),
    radial-gradient(70vw 50vh at -10% 110%, rgb(43 245 192 / 0.12), transparent 70%),
    var(--ink);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
[lang='ar'] { font-family: var(--ar); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 10px; }

.ico { width: 20px; height: 20px; flex: none; }
.ico--flip { transform: scaleX(-1); }

/* atmosphere */
.fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.glow { position: fixed; z-index: 0; border-radius: 50%; filter: blur(70px); pointer-events: none; }
.glow--a { width: 420px; height: 420px; top: -140px; right: -120px; background: radial-gradient(circle, rgb(43 245 192 / 0.28), transparent 70%); animation: drift 16s ease-in-out infinite alternate; }
.glow--b { width: 380px; height: 380px; bottom: -160px; left: -140px; background: radial-gradient(circle, rgb(111 231 255 / 0.12), transparent 70%); animation: drift 20s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(-40px, 50px); } }

/* layout */
.wrap { position: relative; z-index: 1; width: min(560px, 100% - 32px); margin-inline: auto; padding: max(48px, env(safe-area-inset-top)) 0 max(32px, env(safe-area-inset-bottom)); }
.hero { text-align: center; margin-bottom: 32px; }
.avatar {
  width: 112px; height: 112px; margin: 0 auto 22px; border-radius: 32px; display: grid; place-items: center;
  background: var(--glass); border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12), 0 20px 60px -20px rgb(43 245 192 / 0.55);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  animation: rise 0.7s var(--ease) both;
}
.avatar img { width: 78%; }
.name { font-size: clamp(1.35rem, 5vw, 1.65rem); font-weight: 700; letter-spacing: -0.02em; animation: rise 0.7s 0.06s var(--ease) both; }
.name .sep { color: var(--text-3); font-weight: 400; margin-inline: 4px; }
.name [lang='ar'] { font-weight: 600; letter-spacing: 0; }
.tagline {
  margin-top: 10px; font-size: 1rem; font-weight: 600; letter-spacing: -0.01em;
  background: var(--grad-mint); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: rise 0.7s 0.12s var(--ease) both;
}
.tagline--ar { margin-top: 2px; font-size: 0.95rem; font-weight: 500; }
.sub { margin-top: 10px; font-size: 0.9rem; color: var(--text-2); animation: rise 0.7s 0.16s var(--ease) both; }
.loc { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 10px; font-size: 0.85rem; color: var(--text-3); animation: rise 0.7s 0.2s var(--ease) both; }
.loc .ico { width: 16px; height: 16px; color: var(--mint); }
.loc .dot { opacity: 0.6; }

/* link buttons */
.links { list-style: none; display: grid; gap: 12px; }
.item { position: relative; display: flex; gap: 10px; animation: rise 0.6s calc(0.22s + var(--i) * 0.05s) var(--ease) both; }
.btn {
  position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px;
  min-height: 64px; padding: 10px 14px 10px 10px; border-radius: 20px;
  background: var(--glass); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08), 0 12px 32px -18px rgb(0 0 0 / 0.8);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  transition: transform 0.35s var(--ease), border-color 0.25s, box-shadow 0.35s, background 0.25s;
  -webkit-tap-highlight-color: transparent; overflow: hidden;
}
.btn::after { /* specular sweep */
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgb(255 255 255 / 0.09) 50%, transparent 65%);
  background-size: 250% 100%; background-position: 130% 0; transition: background-position 0.9s var(--ease);
}
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); border-color: rgb(43 245 192 / 0.55); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.1), 0 18px 40px -18px rgb(43 245 192 / 0.45); }
  .btn:hover::after { background-position: -30% 0; }
  .btn:hover .btn__go { transform: translateX(3px); color: var(--mint); }
}
.btn:active { transform: scale(0.98); transition-duration: 0.1s; }
.btn__icon { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--mint-soft); color: var(--mint); }
.btn__text { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: start; }
.btn__title { font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.btn__ar { align-self: flex-start; font-size: 0.82rem; color: var(--text-3); margin-top: 1px; }
.btn__go { flex: none; color: var(--text-3); transition: transform 0.35s var(--ease), color 0.25s; display: grid; place-items: center; }
.tag { flex: none; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; padding: 3px 8px; border-radius: 999px; color: var(--mint); border: 1px solid rgb(43 245 192 / 0.4); }

.item--featured .btn { background: var(--grad-mint); border-color: transparent; color: #01120d; box-shadow: 0 16px 44px -16px rgb(43 245 192 / 0.75), inset 0 1px 0 rgb(255 255 255 / 0.6); }
.item--featured .btn__icon { background: rgb(1 18 13 / 0.9); color: var(--mint); }
.item--featured .btn__ar, .item--featured .btn__go { color: rgb(1 18 13 / 0.7); }
@media (hover: hover) { .item--featured .btn:hover .btn__go { color: #01120d; } }

.dl {
  flex: none; width: 64px; display: grid; place-items: center; border-radius: 20px;
  background: var(--glass); border: 1px solid var(--line); color: var(--mint);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  transition: transform 0.35s var(--ease), border-color 0.25s, background 0.25s;
}
.dl .ico { width: 22px; height: 22px; }
@media (hover: hover) { .dl:hover { transform: translateY(-2px); border-color: rgb(43 245 192 / 0.55); background: var(--mint-soft); } }
.dl:active { transform: scale(0.96); }

.foot { margin-top: 40px; display: flex; justify-content: center; gap: 14px; font-size: 0.8rem; color: var(--text-3); }
.foot a { color: var(--text-2); }
.foot a:hover { color: var(--mint); }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------------------------------------------------------- PDF viewer */
.viewer { background: var(--ink); }
.vbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  padding: max(10px, env(safe-area-inset-top)) 16px 10px;
  background: rgb(3 10 8 / 0.72); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
}
.vbar__back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding-inline: 6px 10px; color: var(--text-2); border-radius: 12px; }
.vbar__back:hover { color: var(--mint); }
.vbar__title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vbar__title strong { font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vbar__title span { font-size: 0.75rem; color: var(--text-3); }
.vbar__actions { display: flex; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; font-weight: 600; font-size: 0.9rem; background: var(--grad-mint); color: #01120d; box-shadow: 0 10px 30px -14px rgb(43 245 192 / 0.8); }
.pill--ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); box-shadow: none; }
.pill:active { transform: scale(0.97); }
.vdoc { width: min(1100px, 100% - 24px); margin: 16px auto 48px; display: grid; gap: 14px; }
.vpage { width: 100%; background: #0b1512; border-radius: 12px; overflow: hidden; box-shadow: 0 20px 50px -30px rgb(0 0 0 / 0.9); border: 1px solid var(--line); }
.vpage canvas { display: block; width: 100%; height: 100%; }
.vstatus { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18vh 16px; color: var(--text-2); text-align: center; }
.vstatus[hidden] { display: none; }
.vstatus a { color: var(--mint); text-decoration: underline; }
.vprogress { width: min(260px, 70vw); height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.vprogress i { display: block; height: 100%; width: 0; background: var(--mint); transition: width 0.2s; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--mint); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 420px) {
  .item--pdf .tag { display: none; }
  .btn { gap: 12px; padding-inline-end: 12px; }
  .btn__icon { width: 40px; height: 40px; }
  .dl { width: 52px; }
}
@media (max-width: 520px) {
  .vbar { flex-wrap: wrap; }
  .vbar__title { order: 3; flex-basis: 100%; }
  .vbar__actions { margin-inline-start: auto; }
  .pill--ghost span { display: none; }
  .pill--ghost { padding: 0 12px; }
  .dl { width: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------- desktop QR (scan to open on phone) */
.qr { display: none; }
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .qr {
    position: fixed; z-index: 3; right: 24px; bottom: 24px; width: 172px;
    display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px 16px 14px;
    border-radius: 24px; background: var(--glass); border: 1px solid var(--line-2);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.1), 0 24px 60px -24px rgb(0 0 0 / 0.9), 0 0 0 1px rgb(43 245 192 / 0.06);
    -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
    animation: rise 0.7s 0.6s var(--ease) both;
  }
  .qr[hidden] { display: none; }
  .qr__code { padding: 10px; border-radius: 16px; background: #f2fffb; box-shadow: 0 0 0 4px rgb(43 245 192 / 0.25), 0 10px 30px -10px rgb(43 245 192 / 0.6); }
  .qr__code img { width: 120px; height: 120px; }
  .qr__text { display: flex; flex-direction: column; gap: 2px; text-align: center; font-size: 0.75rem; line-height: 1.35; color: var(--text-2); }
  .qr__text strong { color: var(--text); font-weight: 600; }
  .qr__text [lang='ar'] { font-size: 0.72rem; color: var(--text-3); }
  .qr__close {
    position: absolute; top: 6px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%;
    background: transparent; color: var(--text-3); font-size: 18px; line-height: 1; cursor: pointer;
  }
  .qr__close:hover { color: var(--mint); background: var(--mint-soft); }
}
