/* Palette sampled from the intro video: ink, cream, one red accent. */
:root {
  --ink: #0a0809;
  --ink-2: #141112;
  --cream: #ebe7de;
  --paper: #f4f0e9;
  --red: #d8192a;
  --red-2: #ff2b3d;
  --dim-d: rgba(235, 231, 222, 0.55);
  --dim-l: rgba(10, 8, 9, 0.55);
  --font: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.7, 0, 0.2, 1);
  --pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --pad: clamp(20px, 5vw, 72px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: clip; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--ink);
  color: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.mono { font-family: var(--mono); letter-spacing: 0.08em; direction: ltr; unicode-bidi: isolate; }
::selection { background: var(--red); color: #fff; }

/* ---------- Loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 100; background: var(--ink);
  display: grid; place-items: center;
}
.loader-word span {
  display: inline-block; background: var(--red); color: #fff;
  font-weight: 700; font-size: clamp(44px, 9vw, 110px); line-height: 1;
  padding: 0.12em 0.28em 0.22em; transform: scale(0.6); opacity: 0;
  animation: pop 0.45s var(--pop) 0.1s forwards;
}
.loader-word span.cut { animation: cut 0.32s var(--pop) forwards; }
.loader-count { position: absolute; bottom: 28px; inset-inline-end: 32px; color: var(--dim-d); font-size: 13px; }
.loader-wipe {
  position: absolute; inset: 0; background: var(--cream);
  clip-path: circle(0% at 50% 50%);
}
#loader.out .loader-wipe { transition: clip-path 0.7s var(--ease); clip-path: circle(75% at 50% 50%); }
#loader.gone { transition: opacity 0.5s ease 0.1s; opacity: 0; pointer-events: none; }
@keyframes pop { to { transform: scale(1); opacity: 1; } }
@keyframes cut { 0% { transform: scale(1.25); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* ---------- Cursor + grain ---------- */
#cursor {
  position: fixed; top: 0; left: 0; z-index: 90; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; background: var(--red); pointer-events: none;
  transition: width 0.25s var(--ease), height 0.25s var(--ease), margin 0.25s var(--ease), opacity 0.2s;
  mix-blend-mode: difference; opacity: 0;
}
#cursor.big { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
@media (hover: none) { #cursor { display: none; } }
.grain {
  position: fixed; inset: 0; z-index: 80; pointer-events: none; opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(4) infinite;
}
@keyframes grain { 25% { background-position: -40px 30px; } 50% { background-position: 30px -50px; } 75% { background-position: -20px 60px; } }

/* ---------- Nav ---------- */
#nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 18px var(--pad); transition: background 0.3s, backdrop-filter 0.3s, color 0.3s;
}
#nav.scrolled { background: rgba(10, 8, 9, 0.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: var(--red); color: #fff; font-size: 19px; line-height: 1;
}
.brand-name { font-family: var(--mono); letter-spacing: 0.2em; font-size: 13px; }
.nav-links { display: flex; gap: 6px; }
.nav-links a {
  position: relative; padding: 6px 12px; font-size: 14px; font-weight: 500; color: var(--dim-d);
  transition: color 0.2s;
}
.nav-links a::after {
  content: ""; position: absolute; inset: 0; background: var(--red); z-index: -1;
  transform: scaleX(0); transform-origin: var(--origin-start); transition: transform 0.3s var(--ease);
}
.nav-links a:hover, .nav-links a.on { color: #fff; }
.nav-links a:hover::after, .nav-links a.on::after { transform: scaleX(1); }
.lang { display: flex; border: 1px solid rgba(235, 231, 222, 0.2); border-radius: 999px; padding: 3px; }
.lang button { padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--dim-d); transition: 0.2s; }
.lang button.on { background: var(--cream); color: var(--ink); }
html[dir="rtl"] { --origin-start: right; --origin-end: left; --dir: -1; }
html[dir="ltr"] { --origin-start: left; --origin-end: right; --dir: 1; }
@media (max-width: 860px) { .nav-links { display: none; } }

/* ---------- Hero ---------- */
#hero {
  position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden;
  display: grid; place-items: center; background: var(--ink); isolation: isolate;
}
#ambient {
  position: absolute; inset: -10%; width: 120%; height: 120%; z-index: -2;
  filter: blur(50px) saturate(1.3) brightness(0.55); transform: scale(1.1);
}
.hero-vignette {
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse at center, transparent 20%, rgba(10, 8, 9, 0.85) 75%),
    linear-gradient(to bottom, rgba(10, 8, 9, 0.5), transparent 20%, transparent 70%, var(--ink));
}
.hero-stage { position: relative; height: min(84vh, 84svh, calc(42vw * 16 / 9)); aspect-ratio: 9 / 16; will-change: transform; }
.frame {
  position: relative; width: 100%; height: 100%; border-radius: 22px; overflow: hidden;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(235, 231, 222, 0.08);
  transform: scale(0.92); opacity: 0; transition: transform 1.1s var(--ease), opacity 0.8s;
}
body.ready .frame { transform: scale(1); opacity: 1; }
.frame video { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--ink); }
.corner { position: absolute; width: 26px; height: 26px; border: 3px solid var(--red); pointer-events: none; transition: 0.6s var(--ease) 0.4s; }
.corner.tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.corner.tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.corner.bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }
.corner.br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }
body:not(.ready) .corner { opacity: 0; transform: scale(1.6); }
.frame-ui {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 3;
}
.pill {
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: rgba(10, 8, 9, 0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(235, 231, 222, 0.18); color: #fff; transition: background 0.2s, transform 0.2s;
}
.pill:hover { background: var(--red); transform: translateY(-2px); }
.pill.icon { padding: 9px 11px; }
.eq { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i { width: 3px; height: 3px; background: currentColor; border-radius: 1px; }
.sound-on .eq i { animation: eq 0.6s ease-in-out infinite alternate; }
.sound-on .eq i:nth-child(2) { animation-delay: 0.2s; }
.sound-on .eq i:nth-child(3) { animation-delay: 0.4s; }
@keyframes eq { to { height: 12px; } }
.progress { position: absolute; bottom: 0; inset-inline: 0; height: 3px; background: rgba(255, 255, 255, 0.12); z-index: 3; direction: ltr; }
.progress i { display: block; height: 100%; width: 0; background: var(--red); }
.timecode { position: absolute; top: 18px; opacity: .8; left: 50%; transform: translateX(-50%); font-size: 11px; color: rgba(255, 255, 255, 0.7); z-index: 3; text-shadow: 0 1px 6px rgba(0,0,0,.6); }

.hero-name {
  position: relative; z-index: 1;
  text-align: center; font-weight: 700; line-height: 0.9; white-space: nowrap;
  font-size: clamp(54px, 10.5vw, 200px); color: var(--cream);
  letter-spacing: -0.01em;
}
html[dir="ltr"] .hero-name { letter-spacing: -0.04em; }
.hero-name .ch { display: inline-block; opacity: 0; transform: translateY(40%); filter: blur(8px); }
#name.in .hero-name .ch { animation: chIn 0.8s var(--ease) forwards; animation-delay: calc(0.1s + var(--i) * 45ms); }
.hero-name .word { display: inline-block; }
@keyframes chIn { to { opacity: 1; transform: none; filter: none; } }

.hero-side { position: absolute; z-index: 5; top: 50%; translate: 0 -50%; max-width: 26vw; }
.hero-side.start { inset-inline-start: var(--pad); }
.hero-side.end { inset-inline-end: var(--pad); text-align: end; }
.hero-pre { font-size: 14px; color: var(--dim-d); margin-bottom: 6px; }
.typer { font-size: clamp(20px, 2.3vw, 34px); font-weight: 700; min-height: 1.4em; display: flex; align-items: center; }
.caret { display: inline-block; width: 3px; height: 1.05em; background: var(--red); margin-inline-start: 4px; animation: blink 0.8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-meta { list-style: none; font-size: 13px; color: var(--dim-d); line-height: 2; }
.hero-meta li::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--red); border-radius: 50%; margin-inline-end: 10px; vertical-align: middle; }
.hero-side, .scroll-cue { opacity: 0; transform: translateY(16px); transition: 0.8s var(--ease) 1.1s; }
body.ready .hero-side, body.ready .scroll-cue { opacity: 1; transform: none; }
.scroll-cue {
  position: absolute; z-index: 5; bottom: 26px; inset-inline-end: 50%; display: none;
}
.scroll-cue { font-size: 11px; letter-spacing: 0.2em; color: var(--dim-d); }
.scroll-cue i { display: block; width: 1px; height: 40px; margin: 8px auto 0; background: linear-gradient(var(--red), transparent); animation: drop 1.6s var(--ease) infinite; transform-origin: top; }
@keyframes drop { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

@media (max-width: 860px) {
  .hero-stage { position: absolute; inset: 0; height: auto; width: auto; aspect-ratio: auto; }
  .frame { border-radius: 0; box-shadow: none; }
  .corner { display: none; }
  .hero-name { font-size: clamp(56px, 19vw, 120px); }
  .hero-side { max-width: none; }
  .hero-side.start { top: auto; translate: none; bottom: 13%; inset-inline: var(--pad); text-align: center; }
  .hero-side.start .typer { justify-content: center; }
  .hero-pre { text-align: center; }
  .hero-side.end { display: none; }
  .frame-ui { bottom: 4%; }
  .langs { top: 78px; }
  .timecode { display: none; }
  #hero::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(10,8,9,.9)); z-index: 3; pointer-events: none; }
}

/* ---------- Sections ---------- */
section { position: relative; padding: clamp(90px, 14vh, 160px) 0; }
section.tight { padding: clamp(70px, 10vh, 110px) 0; }
.wrap { width: min(1240px, 100%); margin: 0 auto; padding: 0 var(--pad); }
.light { background: var(--cream); color: var(--ink); }
.dark { background: var(--ink); color: var(--cream); }
.red { background: var(--red); color: #fff; }
.wipe { clip-path: circle(var(--r, 150%) at 50% 0%); }

.kicker { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 700; margin-bottom: 28px; }
.kicker .mono { color: var(--red); font-size: 12px; }
.kicker .mono::after { content: " /"; }
.red .kicker .mono { color: #fff; opacity: 0.7; }

.display { font-weight: 700; line-height: 1.12; font-size: clamp(38px, 6.6vw, 104px); max-width: 15ch; letter-spacing: -0.01em; }
html[dir="ltr"] .display { letter-spacing: -0.035em; line-height: 1; }
.display.huge { font-size: clamp(48px, 9.5vw, 160px); max-width: none; }
.lead { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.75; max-width: 58ch; margin-top: 30px; font-weight: 500; }
html[dir="ltr"] .lead { line-height: 1.55; }
.dim { color: var(--dim-l); }
.dark .dim, .dark.dim { color: var(--dim-d); }

/* Highlight box that wipes in (like the video) */
.hl { position: relative; display: inline-block; padding: 0 0.16em 0.06em; margin: 0 0.04em; z-index: 0; transition: color 0.3s 0.25s; }
.hl::before {
  content: ""; position: absolute; inset: 0.08em 0 0; background: var(--red); z-index: -1;
  transform: scaleX(0); transform-origin: var(--origin-start); transition: transform 0.6s var(--ease) 0.15s;
}
.in .hl, .hl.in { color: #fff; }
.in .hl::before, .hl.in::before { transform: scaleX(1); }
.red .hl::before { background: var(--ink); }

.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: clamp(60px, 9vh, 100px); border-top: 2px solid var(--ink); }
.stat { padding: 26px 18px 0 0; border-inline-end: 1px solid rgba(10, 8, 9, 0.15); padding-inline: 18px; }
.stat:first-child { padding-inline-start: 0; }
.stat:last-child { border: 0; }
.stat b { display: block; font-size: clamp(40px, 5vw, 76px); line-height: 1; font-weight: 700; direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] .stat b { text-align: right; }
.stat b em { font-style: normal; color: var(--red); }
.stat span { display: block; margin-top: 12px; font-size: 14px; color: var(--dim-l); font-weight: 500; line-height: 1.5; }
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { border: 0; padding: 22px 0 0; }
}

/* ---------- Projects: sticky stacking cards ---------- */
.stack-cards { margin-top: 70px; padding: 0 var(--pad); }
.pcard {
  position: sticky; top: calc(90px + var(--i) * 18px);
  width: min(1240px, 100%); margin: 0 auto 8vh; min-height: min(78vh, 640px);
  background: var(--paper); color: var(--ink); border-radius: 28px; overflow: hidden;
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.45);
  transform-origin: center top;
}
.pcard:last-child { margin-bottom: 0; }
.pcard-body { padding: clamp(28px, 4vw, 56px); display: flex; flex-direction: column; }
.pcard-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--dim-l); }
.pcard-top .mono b { color: var(--red); }
.pcard h3 { font-size: clamp(44px, 6.4vw, 100px); line-height: 1; margin-top: auto; padding-top: 40px; letter-spacing: -0.03em; direction: ltr; text-align: start; unicode-bidi: plaintext; }
html[dir="rtl"] .pcard h3, html[dir="rtl"] .model .id { text-align: right; }
.pcard .tagline { margin-top: 18px; font-size: clamp(18px, 1.7vw, 24px); font-weight: 700; }
.pcard p { margin-top: 16px; font-size: 16px; line-height: 1.8; color: rgba(10, 8, 9, 0.75); max-width: 52ch; }
html[dir="ltr"] .pcard p { line-height: 1.6; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; direction: ltr; justify-content: flex-start; }
html[dir="rtl"] .chips { justify-content: flex-end; }
.chip { font-family: var(--mono); font-size: 11.5px; padding: 6px 11px; border-radius: 999px; border: 1px solid rgba(10, 8, 9, 0.2); }
.plinks { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px; overflow: hidden;
  padding: 12px 20px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; z-index: 0;
}
.btn::before { content: ""; position: absolute; inset: 0; background: var(--red); z-index: -1; transform: scaleX(0); transform-origin: var(--origin-start); transition: transform 0.35s var(--ease); }
.btn:hover::before { transform: scaleX(1); }
.btn svg { transition: transform 0.3s var(--ease); }
html[dir="rtl"] .btn svg { transform: scaleX(-1); }
.btn:hover svg { transform: translateX(3px); }
html[dir="rtl"] .btn:hover svg { transform: scaleX(-1) translateX(3px); }

.pcard-art { position: relative; background: var(--ink); overflow: hidden; display: grid; place-items: center; }
.pcard-art .mono-big {
  font-weight: 700; font-size: clamp(120px, 15vw, 240px); color: var(--cream); line-height: 1; letter-spacing: -0.05em;
  font-family: var(--font); direction: ltr; z-index: 2;
}
.pcard-art .mono-big b { color: var(--red); }
.orbit { position: absolute; inset: 50% auto auto 50%; border: 1px solid rgba(235, 231, 222, 0.14); border-radius: 50%; translate: -50% -50%; animation: spin linear infinite; }
.orbit::after { content: ""; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--cream); }
.orbit.r { border-color: rgba(216, 25, 42, 0.5); }
.orbit.r::after { background: var(--red); box-shadow: 0 0 18px var(--red); }
@keyframes spin { to { transform: rotate(360deg); } }
.pcard-art .grid-bg { position: absolute; inset: 0; background-image: linear-gradient(rgba(235,231,222,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(235,231,222,.05) 1px, transparent 1px); background-size: 40px 40px; }
.pcard-art .corner { border-color: var(--red); }
@media (max-width: 860px) {
  .pcard { grid-template-columns: 1fr; min-height: auto; top: calc(70px + var(--i) * 12px); }
  .pcard-art { height: 180px; order: -1; }
  .pcard-art .mono-big { font-size: 110px; }
}

/* ---------- Models ---------- */
.model-list { margin-top: 60px; border-top: 2px solid var(--ink); }
.model {
  position: relative; display: grid; grid-template-columns: 60px 1fr auto 40px; align-items: center; gap: 20px;
  padding: 26px 8px; border-bottom: 1px solid rgba(10, 8, 9, 0.18); z-index: 0; transition: color 0.3s, padding 0.3s var(--ease);
}
.model::before { content: ""; position: absolute; inset: 0; background: var(--red); z-index: -1; transform: scaleY(0); transform-origin: bottom; transition: transform 0.4s var(--ease); }
.model:hover { color: #fff; padding-inline: 22px; }
.model:hover::before { transform: scaleY(1); }
.model .n { font-family: var(--mono); font-size: 12px; color: var(--red); }
.model:hover .n { color: #fff; }
.model .id { font-family: var(--mono); font-size: clamp(15px, 2vw, 26px); direction: ltr; text-align: start; unicode-bidi: plaintext; word-break: break-all; }
.model .id b { font-weight: 500; opacity: 0.45; }
.model .k { font-size: 13px; font-family: var(--mono); opacity: 0.7; direction: ltr; white-space: nowrap; }
.model .arr { justify-self: end; transition: transform 0.3s var(--ease); }
html[dir="rtl"] .model .arr { transform: scaleX(-1); }
.model:hover .arr { transform: rotate(-45deg); }
html[dir="rtl"] .model:hover .arr { transform: scaleX(-1) rotate(-45deg); }
@media (max-width: 700px) { .model { grid-template-columns: 34px 1fr 24px; } .model .k { grid-column: 2; grid-row: 2; } }

/* ---------- How I work: word swap ---------- */
.swap-line { font-size: clamp(34px, 6vw, 92px); font-weight: 700; line-height: 1.25; }
.swap { position: relative; display: inline-flex; align-items: center; gap: 0.25em; vertical-align: bottom; height: 1.3em; overflow: hidden; color: var(--red); }
.swap .item { display: inline-flex; align-items: center; gap: 0.25em; white-space: nowrap; transition: transform 0.55s var(--ease), opacity 0.45s, filter 0.45s; }
.swap .item.out { transform: translateY(-110%); opacity: 0; filter: blur(6px); }
.swap .item.pre { transform: translateY(110%); opacity: 0; filter: blur(6px); }
.swap svg { width: 0.7em; height: 0.7em; flex: none; }
.way-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-top: 80px; background: rgba(235, 231, 222, 0.12); border-radius: 22px; overflow: hidden; }
.way-item { background: var(--ink); padding: 36px 30px 40px; transition: background 0.3s; }
.way-item:hover { background: var(--ink-2); }
.way-item .mono { color: var(--red); font-size: 12px; }
.way-item h4 { font-size: 22px; margin: 22px 0 12px; }
.way-item p { color: var(--dim-d); line-height: 1.8; font-size: 15px; }
@media (max-width: 860px) { .way-grid { grid-template-columns: 1fr; } }

/* ---------- Toolbox marquee ---------- */
.marquees { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; direction: ltr; }
.mq { display: flex; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.mq-track { display: flex; gap: 14px; padding-inline-end: 14px; flex: none; animation: mq var(--d, 40s) linear infinite; }
.mq.rev .mq-track { animation-direction: reverse; }
.mq:hover .mq-track { animation-play-state: paused; }
.mq span { font-size: clamp(20px, 2.6vw, 36px); font-weight: 700; padding: 10px 26px; border-radius: 999px; border: 2px solid var(--ink); white-space: nowrap; transition: 0.2s; }
.mq span:nth-child(4n + 1) { background: var(--ink); color: var(--cream); }
.mq span:hover { background: var(--red); border-color: var(--red); color: #fff; }
@keyframes mq { to { transform: translateX(-100%); } }

/* ---------- Certificates: card deck ---------- */
.certs-wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: center; }
.certs-head .display { font-size: clamp(38px, 5.4vw, 84px); }
.certs-head > .dim { margin-top: 12px; font-weight: 500; }
.deck-ctl { display: flex; align-items: center; gap: 16px; margin-top: 36px; }
.deck-ctl .mono { color: var(--red); font-weight: 700; font-size: 14px; }
.round { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--ink); font-size: 26px; line-height: 1; display: grid; place-items: center; transition: 0.2s; }
.round:hover { background: var(--ink); color: var(--cream); }
html[dir="rtl"] .round { transform: scaleX(-1); }
.legal { margin-top: 36px; font-size: 13px; color: var(--dim-l); }
.now { margin-top: 10px; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.now i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(216, 25, 42, 0.6); } 100% { box-shadow: 0 0 0 12px rgba(216, 25, 42, 0); } }

.deck { position: relative; height: clamp(360px, 44vw, 500px); perspective: 1400px; }
.cert {
  position: absolute; inset: 0; margin: auto; width: min(100%, 600px); height: min(100%, 430px);
  background: #fff; color: var(--ink); border-radius: 10px; padding: 34px 38px;
  box-shadow: 0 30px 70px rgba(10, 8, 9, 0.25), 0 2px 0 rgba(10,8,9,.05);
  display: flex; flex-direction: column; direction: ltr; text-align: left;
  transition: transform 0.7s var(--ease), opacity 0.5s, filter 0.5s; cursor: grab; user-select: none;
  background-image: radial-gradient(circle at 92% 12%, rgba(216,25,42,.06), transparent 40%), repeating-linear-gradient(135deg, transparent 0 22px, rgba(10,8,9,.018) 22px 23px);
}
.cert:active { cursor: grabbing; }
.cert .ribbon { position: absolute; top: 0; right: 42px; width: 64px; height: 120px; background: var(--ink); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%); display: grid; place-items: center; color: #fff; font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; }
.cert .seal { position: absolute; top: 52px; right: 48px; width: 52px; height: 52px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); }
.cert .org { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 14px; }
.cert .org i { font-style: normal; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 700; font-family: var(--mono); font-size: 15px; }
.cert .who { margin-top: auto; font-family: var(--mono); font-size: 12px; color: var(--dim-l); }
.cert .who b { display: block; color: var(--ink); font-family: var(--font); font-size: 22px; margin-top: 4px; }
.cert h5 { font-size: clamp(22px, 2.6vw, 34px); line-height: 1.1; margin-top: 18px; letter-spacing: -0.02em; max-width: 14ch; }
.cert .sub { font-size: 13px; color: var(--red); font-weight: 700; margin-top: 8px; }
.cert .foot { display: flex; justify-content: space-between; align-items: end; margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(10,8,9,.12); font-size: 12px; }
.cert .verify { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; color: var(--ink); border-bottom: 2px solid var(--red); padding-bottom: 2px; }
.cert .verify:hover { color: var(--red); }
.cert.more { background: var(--red); color: #fff; align-items: flex-start; justify-content: center; background-image: none; }
.cert.more .plus { font-size: clamp(90px, 11vw, 150px); font-weight: 700; line-height: 0.9; }
.cert.more p { font-size: 22px; font-weight: 700; margin-top: 10px; font-family: var(--font); }
.cert.more .verify { color: #fff; border-color: #fff; margin-top: 26px; }
@media (max-width: 960px) { .certs-wrap { grid-template-columns: 1fr; } .deck { height: 420px; } .cert { padding: 26px; } }

/* ---------- Beyond ---------- */
.beyond-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 50px; }
.beyond-grid h4 { font-size: clamp(24px, 2.6vw, 36px); line-height: 1.2; }
.beyond-grid h4::before { content: ""; display: block; width: 36px; height: 4px; background: var(--red); margin-bottom: 22px; }
.beyond-grid p { margin-top: 12px; color: var(--dim-d); line-height: 1.8; }
@media (max-width: 860px) { .beyond-grid { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- Contact ---------- */
#contact { padding-bottom: 40px; overflow: hidden; }
#contact .lead { opacity: 0.85; }
.contact-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 46px; }
.clink {
  display: inline-flex; align-items: center; gap: 12px; padding: 18px 28px; border-radius: 999px;
  border: 2px solid #fff; font-weight: 700; font-size: clamp(16px, 1.5vw, 20px); transition: 0.25s var(--ease);
}
.clink:hover { background: #fff; color: var(--red); transform: translateY(-3px); }
.clink small { font-family: var(--mono); font-size: 11px; opacity: 0.7; font-weight: 500; direction: ltr; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 120px var(--pad) 0; font-size: 13px; opacity: 0.8; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Languages on top of the video ---------- */
.langs {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%); z-index: 3;
  display: flex; gap: 6px; list-style: none; direction: ltr; white-space: nowrap;
}
.langs li {
  font-size: 12px; font-weight: 700; padding: 6px 11px; border-radius: 999px; color: #fff;
  background: rgba(10, 8, 9, 0.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(235, 231, 222, 0.18);
  opacity: 0; transform: translateY(-8px); transition: 0.5s var(--ease);
}
body.ready .langs li { opacity: 1; transform: none; }
body.ready .langs li:nth-child(2) { transition-delay: 0.08s; }
body.ready .langs li:nth-child(3) { transition-delay: 0.16s; }
body.ready .langs li:nth-child(4) { transition-delay: 0.24s; }

/* ---------- Name band: between the video and the about section ---------- */
#name { padding: clamp(50px, 9vh, 110px) 0 clamp(60px, 10vh, 120px); overflow: hidden; text-align: center; }
#name .hero-name { will-change: transform; }
.name-sub { margin-top: 40px; font-size: 13px; color: var(--dim-d); letter-spacing: 0.4em; }
.name-sub::before, .name-sub::after { content: ""; display: inline-block; width: 40px; height: 2px; background: var(--red); vertical-align: middle; margin: 0 16px; }

/* ---------- Contact: icons only ---------- */
.cicon {
  display: grid; place-items: center; width: 74px; height: 74px; border-radius: 22px;
  border: 2px solid #fff; color: #fff; transition: 0.25s var(--ease); overflow: hidden;
}
.cicon svg { width: 32px; height: 32px; }
.cicon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cicon:has(img) { border-color: rgba(255, 255, 255, 0.6); }
.cicon:hover { background: #fff; color: var(--red); transform: translateY(-4px) rotate(-4deg); box-shadow: 0 16px 30px rgba(0, 0, 0, 0.25); }
@media (max-width: 600px) { .cicon { width: 60px; height: 60px; border-radius: 18px; } .cicon svg { width: 26px; height: 26px; } }
@media (max-width: 860px) { .langs { top: 80px; } .langs li { font-size: 11px; padding: 5px 9px; } }
