/* =========================================================
   Yanal Haddadin — links page
   Colours from his business card: copper / bronze on warm black
   ========================================================= */

/* Thmanyah Serif Text (free font, used as-is — see assets/fonts/thmanyah-licence.txt) */
@font-face {
  font-family: 'Thmanyah Serif';
  src: url('../fonts/thmanyah-serif-text-bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #14100e;
  --bg2: #1f1915;
  --copper: #c68a5a;
  --copper-l: #e8bd93;
  --bronze: #a36d48;
  --cream: #f4ebe2;
  --muted: #b3a497;
  --line: rgba(232, 189, 147, 0.28);
  --ar: 'Thmanyah Serif', 'Geeza Pro', 'Segoe UI', Tahoma, sans-serif;
  --en: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
}

@property --r {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  min-height: 100%;
}
body {
  font-family: var(--ar);
  background: linear-gradient(160deg, #3a2618 0%, var(--bg2) 38%, var(--bg) 100%) fixed;
  color: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
:focus-visible {
  outline: 2px solid var(--copper-l);
  outline-offset: 4px;
  border-radius: 14px;
}

/* ---------- background ---------- */
.glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.glow span {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  mix-blend-mode: screen;
  will-change: transform;
}
.glow .g1 {
  width: 70vmax;
  height: 70vmax;
  left: -30vmax;
  top: -30vmax;
  background: radial-gradient(circle, rgba(215, 150, 95, 0.55), transparent 62%);
  animation: drift1 24s ease-in-out infinite;
}
.glow .g2 {
  width: 55vmax;
  height: 55vmax;
  right: -28vmax;
  bottom: -22vmax;
  background: radial-gradient(circle, rgba(163, 109, 72, 0.4), transparent 65%);
  animation: drift2 30s ease-in-out infinite;
}
@keyframes drift1 {
  50% {
    transform: translate(10vmax, 8vmax) scale(1.1);
  }
}
@keyframes drift2 {
  50% {
    transform: translate(-8vmax, -6vmax) scale(1.12);
  }
}
.paths {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  color: var(--copper);
}
.paths canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- page column ---------- */
.page {
  position: relative;
  z-index: 5;
  min-height: 100svh;
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
  padding: clamp(48px, 9vh, 84px) 22px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ---------- hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.avatar {
  position: relative;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  padding: 3px;
  isolation: isolate;
}
.avatar .ring,
.avatar .ring::after {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  z-index: -1;
  background: conic-gradient(from var(--r), var(--bronze), var(--copper-l), #fff3e6, var(--copper), var(--bronze));
  animation: spin 6s linear infinite;
}
.avatar .ring::after {
  content: '';
  z-index: -2;
  filter: blur(16px);
  opacity: 0.55;
}
.avatar .face {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 30%, #2b211b, #120e0c);
}
.avatar .face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.initials {
  font-family: var(--en);
  font-weight: 500;
  font-size: 34px;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, var(--copper-l), var(--bronze));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@keyframes spin {
  to {
    --r: 360deg;
  }
}

.name {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.name .ar {
  display: block;
  overflow: hidden;
  padding: 0.12em 0.15em 0.3em;
  margin-bottom: -0.2em;
  font-size: clamp(2.2rem, 10vw, 2.9rem);
  line-height: 1.25;
  color: var(--cream);
}
.name .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  animation: wordUp 0.9s cubic-bezier(0.34, 1.45, 0.64, 1) forwards;
  animation-delay: calc(var(--i) * 0.14s + 0.25s);
}
@keyframes wordUp {
  to {
    opacity: 1;
    transform: none;
  }
}
.name .en {
  font-family: var(--en);
  font-weight: 600;
  font-size: clamp(0.82rem, 3.6vw, 0.95rem);
  letter-spacing: 0.28em;
  margin-inline-end: -0.28em; /* letter-spacing leaves a gap at the end */
  background: linear-gradient(90deg, var(--copper-l), var(--copper), var(--copper-l));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 6s linear infinite;
}
@keyframes sheen {
  to {
    background-position: -200% 0;
  }
}
.rule {
  display: block;
  width: 64px;
  height: 1px;
  margin: 18px auto 14px;
  background: linear-gradient(90deg, transparent, var(--copper-l), transparent);
}
.title {
  font-size: 1.05rem;
  color: var(--muted);
}

/* ---------- link cards (glass + turning copper edge) ---------- */
.links {
  width: 100%;
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.card {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 240, 225, 0.045);
  -webkit-backdrop-filter: blur(8px) saturate(1.3);
  backdrop-filter: blur(8px) saturate(1.3);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 235, 215, 0.18);
  transition:
    transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
    background 0.3s,
    box-shadow 0.3s;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: conic-gradient(
    from var(--r),
    rgba(232, 189, 147, 0.08),
    var(--copper-l) 12%,
    #fff1e2 18%,
    var(--bronze) 28%,
    rgba(232, 189, 147, 0.08) 40%,
    rgba(232, 189, 147, 0.08) 60%,
    var(--copper) 74%,
    var(--copper-l) 82%,
    rgba(232, 189, 147, 0.08)
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.55;
  animation: spin 8s linear infinite;
  animation-delay: var(--ad, 0s);
  pointer-events: none;
  transition: opacity 0.35s;
}
a.card:hover {
  transform: translateY(-3px);
  background: rgba(255, 240, 225, 0.08);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 235, 215, 0.22);
}
a.card:hover::before {
  opacity: 1;
  animation-duration: 3s;
}
a.card:active {
  transform: scale(0.985);
}
.card .ic {
  flex: 0 0 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(232, 189, 147, 0.2), rgba(163, 109, 72, 0.12));
  border: 1px solid rgba(232, 189, 147, 0.22);
  color: var(--copper-l);
}
.card .ic svg {
  width: 21px;
  height: 21px;
}
.card .tx {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.35;
  min-width: 0;
}
.card .tx b {
  font-size: 1.12rem;
  font-weight: 700;
}
.card .tx span {
  font-family: var(--en);
  font-size: 0.78rem;
  color: var(--muted);
  direction: ltr;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.card .go {
  margin-inline-start: auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--copper-l);
  border: 1px solid var(--line);
  transition:
    transform 0.3s,
    background 0.3s,
    color 0.3s;
}
.card .go svg {
  width: 14px;
  height: 14px;
}
a.card:hover .go {
  transform: translateX(-4px);
  background: var(--copper);
  color: var(--bg);
  border-color: transparent;
}
/* a card with no link yet */
.card.soon {
  cursor: default;
  opacity: 0.6;
}
.card.soon::before {
  animation: none;
  opacity: 0.25;
}
.card .badge {
  margin-inline-start: auto;
  font-size: 0.8rem;
  color: var(--copper-l);
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px dashed var(--line);
}

/* ---------- footer ---------- */
.foot {
  margin-top: auto;
  padding-top: 48px;
  font-family: var(--en);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  opacity: 0.7;
}

/* ---------- staggered reveal ---------- */
.rev,
.card {
  opacity: 0;
  transform: translateY(16px);
}
.show {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.card.soon.show {
  opacity: 0.6;
}

/* ---------- small phones ---------- */
@media (max-width: 360px) {
  .card .ic {
    flex-basis: 40px;
    height: 40px;
  }
  .card {
    gap: 12px;
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .glow span,
  .avatar .ring,
  .avatar .ring::after,
  .card::before,
  .name .en {
    animation: none;
  }
  .name .w {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .rev,
  .card {
    opacity: 1;
    transform: none;
  }
}
