/* ==================================================================
   Yazeed Mohamed Tony — 3D CV
   A flight through the work, not a scroll down a page.
================================================================== */

:root {
  --bg: #04060d;
  --bg-2: #080c18;
  --ink: #e9edf9;
  --dim: rgba(233, 237, 249, 0.6);
  --faint: rgba(233, 237, 249, 0.34);
  --cy: #35e0e6;
  --vi: #7c5cff;
  --gold: #ffb545;
  --pink: #ff5c8a;
  --line: rgba(148, 170, 255, 0.16);
  --glass: rgba(14, 20, 38, 0.52);
  --glass-2: rgba(20, 27, 48, 0.72);
  --font-d: 'Space Grotesk', system-ui, sans-serif;
  --font-m: 'JetBrains Mono', ui-monospace, monospace;
  --font-a: 'Cairo', system-ui, sans-serif;
  --pad: clamp(16px, 3.2vw, 40px);
  --accent: var(--cy);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg);
}

body {
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 8%, #0a1226 0%, var(--bg) 58%, #010206 100%);
  color: var(--ink);
  font-family: var(--font-d);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
  touch-action: none;
}

body.custom-cursor,
body.custom-cursor button {
  cursor: none;
}

body.lang-ar {
  font-family: var(--font-a);
}

body.touch {
  cursor: auto;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

::selection {
  background: var(--cy);
  color: #04060d;
}

/* ---------------------------------------------------------------- layers */

#gl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

.grain,
.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.grain {
  opacity: 0.045;
  mix-blend-mode: overlay;
  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='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.vignette {
  background:
    radial-gradient(130% 100% at 50% 50%, transparent 42%, rgba(2, 3, 8, 0.72) 100%),
    linear-gradient(to bottom, rgba(4, 6, 13, 0.75), transparent 22%, transparent 78%, rgba(4, 6, 13, 0.85));
}

/* ---------------------------------------------------------------- boot */

.boot {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 26px;
  background: radial-gradient(80% 60% at 50% 50%, #071021 0%, #04060d 70%);
  transition: opacity 0.8s ease, visibility 0.8s;
}

.boot.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot__core {
  position: relative;
  width: 92px;
  height: 92px;
}

.boot__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: var(--cy);
  animation: spin 1.6s linear infinite;
}

.boot__ring:nth-child(2) {
  inset: 12px;
  border-top-color: var(--vi);
  animation-duration: 2.3s;
  animation-direction: reverse;
}

.boot__ring:nth-child(3) {
  inset: 24px;
  border-top-color: var(--gold);
  animation-duration: 3s;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.boot__label {
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 0.42em;
  color: var(--faint);
}

.boot__bar {
  width: 180px;
  height: 2px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
  border-radius: 2px;
}

.boot__bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cy), var(--vi));
  transition: width 0.3s ease;
}

/* ---------------------------------------------------------------- topbar */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--pad);
  pointer-events: none;
}

.topbar>* {
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-family: var(--font-m);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #04060d;
  background: linear-gradient(140deg, var(--cy), var(--vi));
  box-shadow: 0 0 22px rgba(53, 224, 230, 0.34);
}

.brand__txt {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(10, 15, 30, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--dim);
  transition: color 0.25s, border-color 0.25s, transform 0.25s, background 0.25s;
}

.ghost-btn:hover {
  color: var(--ink);
  border-color: rgba(148, 170, 255, 0.4);
  transform: translateY(-1px);
}

.ghost-btn--accent {
  color: #04060d;
  background: linear-gradient(120deg, var(--cy), #8ef2ff);
  border-color: transparent;
  box-shadow: 0 6px 26px rgba(53, 224, 230, 0.28);
}

.ghost-btn--accent:hover {
  color: #04060d;
  box-shadow: 0 10px 34px rgba(53, 224, 230, 0.44);
}

/* ---------------------------------------------------------------- rail */

.rail {
  position: fixed;
  z-index: 40;
  top: 50%;
  right: var(--pad);
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
}

body.lang-ar .rail {
  right: auto;
  left: var(--pad);
  flex-direction: row-reverse;
}

.rail__line {
  position: relative;
  width: 1px;
  height: 190px;
  background: rgba(148, 170, 255, 0.16);
}

.rail__line i {
  position: absolute;
  top: 0;
  left: -1px;
  width: 3px;
  height: 0%;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--cy), var(--vi));
  box-shadow: 0 0 14px rgba(53, 224, 230, 0.6);
}

.rail__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rail__item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-m);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  transition: color 0.3s;
}

body.lang-ar .rail__item {
  flex-direction: row-reverse;
  font-family: var(--font-a);
  letter-spacing: 0;
  font-size: 12px;
}

.rail__item i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid currentColor;
  transition: all 0.35s;
}

.rail__item:hover {
  color: var(--ink);
}

.rail__item.on {
  color: var(--cy);
}

.rail__item.on i {
  background: var(--cy);
  box-shadow: 0 0 12px var(--cy);
  transform: scale(1.35);
}

/* ---------------------------------------------------------------- stage */

.stage {
  position: fixed;
  inset: 0;
  z-index: 20;
  perspective: 1250px;
  perspective-origin: 50% 46%;
  transform-style: preserve-3d;
  pointer-events: none;
}

.panel {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: calc(var(--pad) + 54px) calc(var(--pad) + 42px);
  transform-style: preserve-3d;
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
}

.panel.off {
  visibility: hidden;
}

.panel.live {
  pointer-events: auto;
}

.panel__in {
  width: min(1120px, 100%);
  transform-style: preserve-3d;
}

/* --- shared type ------------------------------------------------ */

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

body.lang-ar .kicker {
  font-family: var(--font-a);
  letter-spacing: 0.06em;
  font-size: 13px;
}

.kicker::before {
  content: '';
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.h2 {
  margin: 0 0 22px;
  font-size: clamp(34px, 6.4vw, 74px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

body.lang-ar .h2 {
  letter-spacing: 0;
  font-weight: 900;
}

.h2 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--cy), var(--vi) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.p {
  margin: 0 0 16px;
  font-size: clamp(14.5px, 1.35vw, 17.5px);
  line-height: 1.75;
  color: var(--dim);
  max-width: 62ch;
}

.card {
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--glass-2), var(--glass));
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ---------------------------------------------------------------- hero */

.hero {
  text-align: center;
  transform-style: preserve-3d;
}

.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(92, 255, 157, 0.3);
  background: rgba(92, 255, 157, 0.08);
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7dffb8;
  transform: translateZ(40px);
}

body.lang-ar .hero__status {
  font-family: var(--font-a);
  letter-spacing: 0;
  font-size: 13px;
}

.hero__status b {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5cff9d;
  box-shadow: 0 0 10px #5cff9d;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(0.75);
  }
}

.hero__name {
  margin: 22px 0 10px;
  font-size: clamp(40px, 9.2vw, 132px);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.045em;
  transform: translateZ(90px);
  transform-style: preserve-3d;
}

body.lang-ar .hero__name {
  letter-spacing: 0;
  font-weight: 900;
  line-height: 1.12;
}

.hero__name span {
  display: inline-block;
  transform-style: preserve-3d;
  background: linear-gradient(178deg, #ffffff 24%, #93a7d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: dropIn 1s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

@keyframes dropIn {
  from {
    opacity: 0;
    transform: translateY(0.5em) translateZ(-260px) rotateX(-70deg);
    filter: blur(6px);
  }
}

.hero__role {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-family: var(--font-m);
  font-size: clamp(11px, 1.5vw, 14px);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--cy);
  transform: translateZ(60px);
}

body.lang-ar .hero__role {
  font-family: var(--font-a);
  letter-spacing: 0.04em;
  font-size: clamp(13px, 2vw, 17px);
}

.hero__role s {
  text-decoration: none;
  opacity: 0.34;
  color: var(--ink);
}

.hero__tag {
  margin: 26px auto 0;
  max-width: 42ch;
  font-size: clamp(15px, 1.8vw, 21px);
  line-height: 1.6;
  color: var(--dim);
  transform: translateZ(30px);
}

.hero__meta {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  transform: translateZ(20px);
}

.chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(10, 15, 30, 0.44);
  font-size: 12.5px;
  color: var(--dim);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- about */

.about {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(24px, 4vw, 60px);
  align-items: center;
  transform-style: preserve-3d;
}

.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  transform: translateZ(50px);
}

.stat {
  padding: 20px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(20, 27, 48, 0.7), rgba(10, 14, 28, 0.5));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s;
}

.stat:hover {
  transform: translateZ(30px) scale(1.03);
  border-color: rgba(53, 224, 230, 0.45);
}

.stat b {
  display: block;
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(140deg, var(--cy), var(--vi));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat span {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--faint);
}

/* ---------------------------------------------------------------- stack */

.stack {
  transform-style: preserve-3d;
}

.stack__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(188px, 1fr));
  gap: 12px;
  transform-style: preserve-3d;
}

.sgroup {
  padding: 17px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(20, 27, 48, 0.66), rgba(8, 12, 24, 0.5));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s, box-shadow 0.4s;
}

.sgroup:hover {
  transform: translateZ(46px);
  border-color: color-mix(in srgb, var(--c) 55%, transparent);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 40px color-mix(in srgb, var(--c) 18%, transparent);
}

.sgroup__h {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--c);
}

.sgroup__h::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--c);
  box-shadow: 0 0 14px var(--c);
}

.sgroup__list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid rgba(148, 170, 255, 0.14);
  background: rgba(255, 255, 255, 0.035);
  font-family: var(--font-m);
  font-size: 11.5px;
  color: var(--dim);
  white-space: nowrap;
  transition: background 0.25s, color 0.25s, transform 0.25s;
}

.sgroup:hover .tag {
  color: var(--ink);
}

.tag:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.09);
}

/* ---------------------------------------------------------------- work carousel */

.work {
  position: relative;
  transform-style: preserve-3d;
}

.work__head {
  position: absolute;
  top: -8vh;
  left: 0;
  right: 0;
  text-align: center;
  transform: translateZ(30px);
}

.deck {
  position: relative;
  height: min(64vh, 560px);
  transform-style: preserve-3d;
}

.deck__stage {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

/* the carousel containers sit on the same depth plane as the front card,
   so they must never take the click themselves — only the cards do */
.deck,
.deck__stage,
.deck__counter {
  pointer-events: none;
}

.pcard {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(370px, 78vw);
  margin: 0;
  padding: 24px 24px 22px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(158deg, rgba(22, 29, 52, 0.86), rgba(8, 11, 23, 0.78));
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transform-style: preserve-3d;
  will-change: transform, opacity;
}

.pcard::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  /* it covers the whole card — without this it swallows every click */
  pointer-events: none;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 70%, transparent), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s;
}

.pcard.front::before {
  opacity: 1;
}

.pcard__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.pcard__glyph {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 22px;
  background: color-mix(in srgb, var(--c) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 38%, transparent);
  box-shadow: 0 0 30px color-mix(in srgb, var(--c) 22%, transparent);
}

.pcard__year {
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--faint);
}

.pcard__name {
  margin: 0 0 4px;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pcard__type {
  margin: 0 0 14px;
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c);
}

body.lang-ar .pcard__type {
  font-family: var(--font-a);
  letter-spacing: 0;
  font-size: 12.5px;
}

.pcard__blurb {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.68;
  color: var(--dim);
}

.pcard__ul {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.pcard__ul li {
  position: relative;
  padding-inline-start: 17px;
  font-size: 12.6px;
  line-height: 1.55;
  color: var(--faint);
}

.pcard__ul li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--c);
  opacity: 0.75;
}

.pcard__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.pcard__tech span {
  padding: 4px 9px;
  border-radius: 7px;
  border: 1px solid rgba(148, 170, 255, 0.14);
  font-family: var(--font-m);
  font-size: 10.5px;
  color: var(--dim);
}

.pcard__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: #04060d;
  background: var(--c);
  transition: transform 0.3s, box-shadow 0.3s;
}

.pcard__cta:hover {
  transform: translateY(-2px) translateZ(20px);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--c) 40%, transparent);
}

.pcard__cta--off {
  color: var(--faint);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  cursor: default;
}

.deck__counter {
  position: absolute;
  left: 50%;
  bottom: -6vh;
  transform: translateX(-50%) translateZ(60px);
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-m);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--faint);
  white-space: nowrap;
}

.deck__counter b {
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
}

/* ---------------------------------------------------------------- method */

.method__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  transform-style: preserve-3d;
}

.mcard {
  position: relative;
  padding: 22px 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(20, 27, 48, 0.66), rgba(8, 12, 24, 0.48));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s;
  transform-style: preserve-3d;
}

.mcard:hover {
  transform: translateZ(40px);
  border-color: rgba(124, 92, 255, 0.45);
}

.mcard b {
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--vi);
}

.mcard h3 {
  margin: 12px 0 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.mcard p {
  margin: 0;
  font-size: 13.4px;
  line-height: 1.68;
  color: var(--faint);
}

/* ---------------------------------------------------------------- contact */

.contact {
  text-align: center;
  transform-style: preserve-3d;
}

.contact__grid {
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  max-width: 900px;
  transform-style: preserve-3d;
}

.ccard {
  display: grid;
  gap: 6px;
  padding: 22px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(20, 27, 48, 0.72), rgba(8, 12, 24, 0.52));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: start;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s, box-shadow 0.4s;
  transform-style: preserve-3d;
}

.ccard:hover {
  transform: translateZ(56px) scale(1.02);
  border-color: color-mix(in srgb, var(--c) 55%, transparent);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55), 0 0 44px color-mix(in srgb, var(--c) 20%, transparent);
}

.ccard i {
  font-style: normal;
  font-size: 20px;
  filter: drop-shadow(0 0 12px color-mix(in srgb, var(--c) 60%, transparent));
}

.ccard b {
  font-family: var(--font-m);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c);
}

.ccard span {
  font-size: 14.5px;
  font-weight: 600;
  word-break: break-word;
  direction: ltr;
  text-align: start;
}

.contact__note {
  margin-top: 26px;
  font-family: var(--font-m);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--faint);
}

body.lang-ar .contact__note {
  font-family: var(--font-a);
  letter-spacing: 0;
  font-size: 13px;
}

.contact__foot {
  margin-top: 12px;
  font-size: 12px;
  color: rgba(233, 237, 249, 0.22);
}

/* ---------------------------------------------------------------- hud / hint */

.hint {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-m);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--faint);
  transition: opacity 0.6s;
}

body.lang-ar .hint {
  font-family: var(--font-a);
  letter-spacing: 0.04em;
  font-size: 12.5px;
}

.hint.gone {
  opacity: 0;
}

.hint__mouse {
  position: relative;
  width: 20px;
  height: 32px;
  border: 1px solid rgba(148, 170, 255, 0.4);
  border-radius: 12px;
}

.hint__mouse i {
  position: absolute;
  left: 50%;
  top: 6px;
  width: 2px;
  height: 6px;
  margin-left: -1px;
  border-radius: 2px;
  background: var(--cy);
  animation: wheel 1.8s ease-in-out infinite;
}

@keyframes wheel {

  0%,
  100% {
    transform: translateY(0);
    opacity: 1;
  }

  60% {
    transform: translateY(11px);
    opacity: 0.2;
  }
}

.hud {
  position: fixed;
  z-index: 40;
  left: var(--pad);
  bottom: var(--pad);
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-m);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: rgba(233, 237, 249, 0.24);
}

body.lang-ar .hud {
  left: auto;
  right: var(--pad);
  direction: ltr;
}

.hud__v {
  color: var(--cy);
}

/* ---------------------------------------------------------------- cursor */

.cursor {
  position: fixed;
  z-index: 80;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  border: 1px solid rgba(53, 224, 230, 0.7);
  box-shadow: 0 0 18px rgba(53, 224, 230, 0.35), inset 0 0 12px rgba(53, 224, 230, 0.16);
  pointer-events: none;
  transition: width 0.28s, height 0.28s, margin 0.28s, background 0.28s, opacity 0.3s;
  will-change: transform;
}

.cursor.hot {
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  background: rgba(53, 224, 230, 0.12);
}

body.touch .cursor {
  opacity: 0;
}

/* ---------------------------------------------------------------- misc */

.noscript {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-content: center;
  padding: 40px;
  text-align: center;
  background: #04060d;
  color: var(--ink);
  line-height: 1.7;
}

.noscript a {
  color: var(--cy);
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .about {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .about__stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .stat {
    padding: 13px 10px;
  }

  .stat span {
    font-size: 10px;
  }

  .rail__list {
    display: none;
  }

  .rail__line {
    height: 120px;
  }
}

@media (max-width: 720px) {
  .stage {
    perspective: 900px;
  }

  .panel {
    padding: 84px 18px 96px;
    align-content: center;
  }

  .hint {
    bottom: 16px;
  }

  .hud {
    display: none;
  }

  .about__stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .stack__grid {
    grid-template-columns: 1fr;
    gap: 10px;
    max-height: 68vh;
    overflow: hidden;
  }

  .sgroup {
    padding: 14px 15px;
  }

  .sgroup__h {
    margin-bottom: 10px;
  }

  .deck {
    height: min(70vh, 520px);
  }

  .work__head {
    top: -13vh;
  }

  .method__grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .mcard {
    padding: 15px 14px;
  }

  .mcard h3 {
    font-size: 15px;
    margin: 8px 0 6px;
  }

  .mcard p {
    font-size: 11.6px;
    line-height: 1.55;
  }

  .contact__grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .ccard {
    padding: 14px 16px;
  }
}

@media (max-width: 480px) {

  /* تحجيم الكروت لتناسب الشاشات الصغيرة جداً دون اقتطاع */
  .pcard {
    width: 90vw;
    padding: 20px 16px 18px;
  }

  .pcard__name {
    font-size: 21px;
  }

  .pcard__tech span {
    font-size: 9.5px;
    padding: 3px 7px;
  }

  /* تصغير حجم خطوط الإحصائيات في قسم "عني" لتجنب كسر التصميم */
  .stat b {
    font-size: clamp(20px, 6vw, 26px);
  }

  /* تقليل المساحات الجانبية للإطار العام */
  .panel {
    padding: 70px 14px 80px;
  }

  /* تصغير اسم البطل (Hero Name) على الشاشات العمودية */
  .hero__name {
    font-size: clamp(32px, 11vw, 50px);
    margin: 14px 0 6px;
  }

  /* تحسين قائمة المهارات (Stack) للضغط الرأسي */
  .stack__grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* تحسين السحب باللمس (Touch) داخل مساحة 3D */
body.touch {
  /* يمنع السحب الافتراضي للمتصفح ليسمح لـ FlightScroll بالعمل بسلاسة */
  touch-action: none;
}

@media (max-width: 420px) {
  .method__grid {
    grid-template-columns: 1fr;
  }

  .mcard p {
    display: none;
  }
}

/* short viewports: keep every station inside one screen */
@media (max-height: 840px) and (min-width: 721px) {
  .panel {
    padding: calc(var(--pad) + 40px) calc(var(--pad) + 42px);
  }

  .h2 {
    font-size: clamp(30px, 4.6vw, 52px);
    margin-bottom: 16px;
  }

  .kicker {
    margin-bottom: 12px;
  }

  .stack .p {
    display: none;
  }

  .sgroup {
    padding: 14px 14px;
  }

  .sgroup__h {
    margin-bottom: 10px;
  }

  .tag {
    padding: 4px 9px;
    font-size: 11px;
  }

  .mcard {
    padding: 17px 16px;
  }

  .mcard p {
    font-size: 12.6px;
  }

  .ccard {
    padding: 16px 16px;
  }

  .deck {
    height: min(58vh, 460px);
  }
}

@media (prefers-reduced-motion: reduce) {

  .hero__name span,
  .boot__ring,
  .hint__mouse i {
    animation: none !important;
  }
}