@font-face {
  font-family: "Yekan";
  src: url("../../fonts/YekanBakh-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: rgba(12, 12, 14, 0.86);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f7f7f8;
  --muted: #a0a0aa;
  --faint: #6e6e78;
  --blue: #7dd3fc;
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --green: #8ff0c4;
  --rose: #fb7185;
  --shadow: 0 30px 100px rgba(0, 0, 0, 0.65);
  --radius: 26px;
  --max: 1160px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

html[dir="rtl"] body {
  font-family: Yekan, Inter, ui-sans-serif, system-ui, sans-serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: -3;
  width: min(520px, 42vw);
  height: min(520px, 42vw);
  border-radius: 999px;
  filter: blur(52px);
  opacity: 0.34;
  transform: translate3d(0, 0, 0);
  animation: drift 18s ease-in-out infinite alternate;
}

body::before {
  top: -180px;
  left: -150px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.52), transparent 68%);
}

body::after {
  right: -150px;
  top: 18vh;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.48), transparent 70%);
  animation-delay: -7s;
}

a {
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  pointer-events: auto;
}

.site-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.09), transparent 34%),
    radial-gradient(circle at 16% 22%, rgba(125, 211, 252, 0.12), transparent 28%),
    radial-gradient(circle at 82% 7%, rgba(143, 240, 196, 0.08), transparent 26%),
    linear-gradient(180deg, #090909 0%, #050505 44%, #080808 100%);
}

.site-bg::before {
  content: "";
  position: absolute;
  inset: -20%;
  pointer-events: none;
  opacity: 0.46;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 18%, black, transparent 68%);
  animation: gridMove 26s linear infinite;
}

.site-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    radial-gradient(circle at 18% 21%, rgba(255, 255, 255, 0.62) 0 1px, transparent 1.5px),
    radial-gradient(circle at 70% 9%, rgba(255, 255, 255, 0.42) 0 1px, transparent 1.5px),
    radial-gradient(circle at 91% 36%, rgba(255, 255, 255, 0.36) 0 1px, transparent 1.5px),
    radial-gradient(circle at 38% 74%, rgba(255, 255, 255, 0.34) 0 1px, transparent 1.5px);
  background-size: 520px 520px, 430px 430px, 610px 610px, 390px 390px;
  animation: starFloat 32s linear infinite;
}

.page {
  position: relative;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 28px 20px 72px;
}

.topbar,
.topbar-actions,
.nav,
.brand,
.language-switcher {
  display: flex;
  align-items: center;
}

.topbar {
  position: relative;
  z-index: 100;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 22px;
}

.topbar-actions {
  position: relative;
  z-index: 110;
  gap: 12px;
}

.brand {
  gap: 10px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 650;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 10px 40px rgba(34, 211, 238, 0.12);
}

.nav {
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
}

.nav a,
.lang-button {
  border-radius: 999px;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.nav a {
  padding: 8px 11px;
  pointer-events: auto;
}

.nav a:hover,
.nav a:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  outline: none;
}

.language-switcher {
  position: relative;
  z-index: 120;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 3px;
  max-width: 620px;
  overflow-x: scroll;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
  touch-action: pan-x;
  pointer-events: auto;
  scrollbar-width: none;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.language-switcher::-webkit-scrollbar {
  display: none;
}

.lang-button {
  position: relative;
  z-index: 130;
  flex: 0 0 auto;
  min-width: 0;
  min-height: 30px;
  padding: 6px 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
  pointer-events: auto;
}

.lang-button.active,
.lang-button:hover,
.lang-button:focus-visible {
  background: rgba(125, 211, 252, 0.14);
  color: #fff;
  outline: none;
}

.link-hub {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 28px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035) 45%, rgba(255, 255, 255, 0.07)),
    var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  isolation: isolate;
}

.link-hub::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  pointer-events: none;
  opacity: 0.8;
  background:
    radial-gradient(circle at 23% 18%, rgba(125, 211, 252, 0.28), transparent 28%),
    radial-gradient(circle at 73% 2%, rgba(167, 139, 250, 0.22), transparent 34%),
    radial-gradient(circle at 84% 80%, rgba(143, 240, 196, 0.12), transparent 30%);
}

.identity {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: space-between;
  gap: 30px;
  padding: 34px;
  border-inline-end: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015)),
    radial-gradient(circle at 50% 0%, rgba(125, 211, 252, 0.15), transparent 42%);
}

.avatar-stage {
  position: relative;
  display: grid;
  min-height: auto;
  margin: -34px -34px 22px;
  padding: 10px 34px 16px;
  align-items: start;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(167, 139, 250, 0.18), rgba(125, 211, 252, 0.1) 52%, rgba(143, 240, 196, 0.04)),
    radial-gradient(circle at 25% 18%, rgba(125, 211, 252, 0.22), transparent 38%);
}

.avatar-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 17, 20, 0.5) 100%);
}

.avatar-wrap {
  position: relative;
  z-index: 1;
  width: 132px;
  height: 132px;
}

.avatar-wrap::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 999px;
  background: conic-gradient(from 180deg, rgba(125, 211, 252, 0), rgba(125, 211, 252, 0.86), rgba(167, 139, 250, 0.8), rgba(143, 240, 196, 0.64), rgba(125, 211, 252, 0));
  filter: blur(4px);
  opacity: 0.84;
  animation: rotateGlow 12s linear infinite;
}

.avatar {
  position: relative;
  width: 132px;
  height: 132px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  object-fit: cover;
  object-position: center 42%;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.58);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 14px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 999px;
  padding: 7px 10px;
  color: #d9f7ff;
  background: rgba(125, 211, 252, 0.065);
  font-size: 12px;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 16px rgba(143, 240, 196, 0.8);
}

h1 {
  max-width: 820px;
  color: #fff;
  font-size: clamp(34px, 5.8vw, 66px);
  font-weight: 760;
  line-height: 1.03;
  overflow-wrap: anywhere;
  hyphens: auto;
}

html[dir="rtl"] h1 {
  max-width: 900px;
  font-size: clamp(30px, 5.2vw, 56px);
  line-height: 1.18;
}

.identity h2 {
  margin-bottom: 10px;
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 0.94;
  overflow-wrap: anywhere;
}

.role-line {
  margin-bottom: 12px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.tagline {
  max-width: 460px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.gallery-action {
  grid-column: 1 / -1;
}

.action {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  text-align: center;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.action.primary {
  border-color: rgba(125, 211, 252, 0.36);
  background: linear-gradient(180deg, rgba(125, 211, 252, 0.18), rgba(125, 211, 252, 0.07));
  box-shadow: 0 16px 52px rgba(34, 211, 238, 0.13);
}

.action:hover,
.action:focus-visible {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  outline: none;
}

.action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  flex: 0 0 auto;
}

.hub-panel {
  padding: 24px;
}

.hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.hub-header p {
  color: var(--muted);
  font-size: 13px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(143, 240, 196, 0.18);
  border-radius: 999px;
  padding: 7px 10px;
  color: rgba(220, 255, 239, 0.92);
  background: rgba(143, 240, 196, 0.07);
  font-size: 12px;
  white-space: nowrap;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.link-card {
  position: relative;
  display: flex;
  min-height: 74px;
  align-items: center;
  gap: 13px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 18px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 200ms ease, border-color 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

.link-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 20%), rgba(125, 211, 252, 0.2), transparent 38%);
  transition: opacity 200ms ease;
}

.link-card:hover,
.link-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.35);
  outline: none;
}

.link-card:hover::before,
.link-card:focus-visible::before {
  opacity: 1;
}

.link-card img {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.28));
  transition: transform 200ms ease, filter 200ms ease, opacity 200ms ease;
}

.link-card:hover img,
.link-card:focus-visible img {
  opacity: 0.96;
  transform: scale(1.08);
  filter: drop-shadow(0 0 16px rgba(125, 211, 252, 0.26)) drop-shadow(0 10px 22px rgba(0, 0, 0, 0.3));
}

.link-card span {
  position: relative;
  display: block;
  min-width: 0;
  font-size: 15px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-card small {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 11px;
}

section {
  padding: 98px 0 0;
}

.section-kicker {
  margin-bottom: 14px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

html[dir="rtl"] .section-kicker {
  text-transform: none;
}

.hero-statement {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
  align-items: end;
}

.hero-copy {
  max-width: 440px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
}

.section-heading {
  max-width: 840px;
  font-size: clamp(30px, 4.6vw, 56px);
  font-weight: 760;
  line-height: 1.06;
  overflow-wrap: anywhere;
  hyphens: auto;
}

html[dir="rtl"] .section-heading {
  font-size: clamp(27px, 4.2vw, 48px);
  line-height: 1.2;
}

.section-body {
  margin-top: 20px;
  max-width: 860px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 22px;
  align-items: stretch;
}

.about-card,
.project-card,
.portfolio-card,
.quote-card,
.contact-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.028));
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.about-card {
  padding: 28px;
}

.signal-list {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.signal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
  padding-top: 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.signal span:last-child {
  color: var(--faint);
  text-align: end;
}

.orbital {
  position: relative;
  min-height: 356px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 50%, rgba(125, 211, 252, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018));
}

.orbit {
  position: absolute;
  inset: 44px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  animation: rotateGlow 22s linear infinite;
}

.orbit:nth-child(2) {
  inset: 82px;
  animation-duration: 16s;
  animation-direction: reverse;
}

.node {
  position: absolute;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(9, 9, 10, 0.72);
  color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.36);
  font-size: 22px;
  font-weight: 800;
}

.node:nth-child(3) { top: 54px; inset-inline-start: 44px; }
.node:nth-child(4) { inset-inline-end: 40px; top: 76px; }
.node:nth-child(5) { inset-inline-start: 42%; bottom: 42px; }

.stack-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.stack-card {
  position: relative;
  overflow: hidden;
  min-height: 136px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.045);
  transition: transform 200ms ease, background 200ms ease, border-color 200ms ease;
}

.stack-card:hover {
  transform: translateY(-5px);
  border-color: rgba(125, 211, 252, 0.25);
  background: rgba(255, 255, 255, 0.068);
}

.stack-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--blue);
  font-size: 18px;
  font-weight: 800;
}

.stack-card h3,
.portfolio-card h3 {
  font-size: 17px;
}

.stack-card p,
.portfolio-card p {
  margin-top: 8px;
  color: var(--faint);
  font-size: 13px;
  line-height: 1.6;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.gallery-item {
  position: relative;
  display: grid;
  min-height: 210px;
  align-content: end;
  gap: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 18px;
  padding: 16px;
  background:
    radial-gradient(circle at 20% 5%, rgba(125, 211, 252, 0.16), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
  color: var(--text);
  cursor: pointer;
  text-align: start;
  transition: transform 200ms ease, border-color 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

.gallery-item::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  pointer-events: none;
}

.gallery-item.has-image::before {
  inset: 0;
  border: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, transparent 28%, rgba(0, 0, 0, 0.78) 100%);
  z-index: 1;
}

.gallery-thumb {
  position: absolute;
  inset: 0;
  display: block;
  max-width: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.86;
  transform: scale(1.01);
  transition: transform 260ms ease, opacity 260ms ease;
}

.gallery-item:hover,
.gallery-item:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(125, 211, 252, 0.24);
  background:
    radial-gradient(circle at 20% 5%, rgba(125, 211, 252, 0.22), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
  outline: none;
}

.gallery-item.has-image:hover .gallery-thumb,
.gallery-item.has-image:focus-visible .gallery-thumb {
  opacity: 0.96;
  transform: scale(1.055);
}

.gallery-item span,
.gallery-empty span {
  position: relative;
  z-index: 2;
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
}

.gallery-item strong {
  position: relative;
  z-index: 2;
  font-size: 16px;
}

.gallery-item small {
  position: relative;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(18px);
}

.gallery-lightbox[hidden] {
  display: none;
}

.gallery-preview {
  position: relative;
  display: grid;
  width: min(920px, 100%);
  min-height: min(640px, 78vh);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background:
    radial-gradient(circle at 25% 10%, rgba(125, 211, 252, 0.18), transparent 42%),
    linear-gradient(135deg, rgba(20, 20, 24, 0.98), rgba(8, 8, 10, 0.98));
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.72);
}

.gallery-preview img {
  width: 100%;
  height: 100%;
  max-height: 78vh;
  object-fit: contain;
  background: #050505;
}

.gallery-preview-title {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 2;
  display: block;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(8, 8, 10, 0.3), rgba(8, 8, 10, 0.78));
  color: #fff;
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 820;
  text-align: center;
  backdrop-filter: blur(14px);
}

.gallery-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 34px;
  text-align: center;
}

.go-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(10, 10, 12, 0.82);
  color: #fff;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45), 0 0 36px rgba(125, 211, 252, 0.16);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease, border-color 180ms ease, background 180ms ease;
  backdrop-filter: blur(16px);
}

.go-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.go-top:hover,
.go-top:focus-visible {
  border-color: rgba(125, 211, 252, 0.36);
  background: rgba(18, 18, 22, 0.94);
  outline: none;
}

.go-top svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.gallery-empty strong {
  font-size: clamp(26px, 4vw, 48px);
}

.gallery-empty small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.gallery-close {
  position: fixed;
  top: 18px;
  inset-inline-end: 18px;
  z-index: 1000;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.portfolio-card {
  position: relative;
  overflow: hidden;
  min-height: 310px;
  padding: 22px;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.portfolio-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.75;
  background:
    radial-gradient(circle at 18% 0%, var(--accent), transparent 42%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
}

.portfolio-card > * {
  position: relative;
}

.portfolio-card:hover,
.portfolio-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

.portfolio-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.project-index,
.external-icon {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
}

.project-index {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 20px;
  font-weight: 800;
}

.external-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: var(--blue);
  font-size: 18px;
}

.role-badge {
  min-height: 92px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 16px;
  padding: 12px;
  background: rgba(125, 211, 252, 0.055);
  color: rgba(255, 255, 255, 0.78) !important;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag-row span {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 6px 9px;
  color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.045);
  font-size: 11px;
}

.wide-card {
  grid-column: span 2;
}

.accent-cyan { --accent: rgba(125, 211, 252, 0.22); }
.accent-violet { --accent: rgba(167, 139, 250, 0.2); }
.accent-green { --accent: rgba(143, 240, 196, 0.19); }
.accent-rose { --accent: rgba(251, 113, 133, 0.18); }
.accent-blue { --accent: rgba(34, 211, 238, 0.18); }

.timeline {
  position: relative;
  display: grid;
  gap: 16px;
  margin-top: 30px;
  padding-inline-start: 22px;
}

.timeline::before {
  content: "";
  position: absolute;
  inset-inline-start: 4px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, rgba(125, 211, 252, 0), rgba(125, 211, 252, 0.7), rgba(167, 139, 250, 0));
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.timeline-item::before {
  content: "";
  position: absolute;
  inset-inline-start: -23px;
  top: 26px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 24px rgba(125, 211, 252, 0.9);
}

.timeline-date {
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.timeline-item h3 {
  font-size: 18px;
}

.timeline-item p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}

.stat {
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 18px;
  padding: 22px 18px;
  background: rgba(255, 255, 255, 0.04);
}

.stat strong {
  display: block;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 10px;
  color: var(--faint);
  font-size: 13px;
}

.quote-card {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 6vw, 70px);
}

.quote-card::before {
  content: "";
  position: absolute;
  inset: -30% 40% auto -16%;
  pointer-events: none;
  height: 330px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(125, 211, 252, 0.18), transparent 70%);
  filter: blur(36px);
}

blockquote {
  position: relative;
  max-width: 920px;
  font-size: clamp(28px, 4.2vw, 52px);
  font-weight: 760;
  line-height: 1.04;
  overflow-wrap: anywhere;
  hyphens: auto;
}

html[dir="rtl"] blockquote {
  font-size: clamp(25px, 3.8vw, 44px);
  line-height: 1.22;
}

.quote-card cite {
  position: relative;
  display: block;
  margin-top: 24px;
  color: var(--muted);
  font-style: normal;
}

.contact-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: center;
  padding: clamp(24px, 4vw, 42px);
}

.contact-card h2 {
  max-width: 620px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.contact-card p {
  max-width: 620px;
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.8;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

html[dir="rtl"] .contact-actions {
  justify-content: flex-start;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 54px;
  color: var(--faint);
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  direction: ltr;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 720ms cubic-bezier(0.22, 1, 0.36, 1), transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 20;
  transform: translate(-50%, 24px);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 15px;
  background: rgba(12, 12, 14, 0.92);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
  color: rgba(255, 255, 255, 0.88);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes gridMove {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(64px, 64px, 0); }
}

@keyframes starFloat {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-90px, 120px, 0); }
}

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

@keyframes drift {
  to { transform: translate3d(6vw, 4vh, 0) scale(1.08); }
}

@media (max-width: 980px) {
  .page {
    padding-inline: 16px;
  }

  .link-hub,
  .hero-statement,
  .about-grid,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .identity {
    border-inline-end: 0;
    border-bottom: 1px solid var(--line);
  }

  .stack-grid,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .portfolio-grid,
  .wide-card {
    grid-template-columns: 1fr;
    grid-column: span 1;
  }
}

@media (max-width: 680px) {
  .page {
    padding-top: 16px;
  }

  .topbar {
    align-items: flex-start;
    gap: 10px;
  }

  .topbar-actions {
    align-items: flex-end;
    flex-direction: column;
    min-width: 0;
  }

  .language-switcher {
    gap: 2px;
    max-width: min(54vw, 216px);
    padding: 3px;
    justify-content: flex-start;
  }

  .lang-button {
    min-height: 28px;
    padding: 5px 8px;
    font-size: 10px;
  }

  .nav {
    display: none;
  }

  .link-hub {
    border-radius: 22px;
  }

  .identity,
  .hub-panel {
    padding: 20px;
  }

  .avatar-stage {
    min-height: auto;
    margin: -20px -20px 22px;
    padding: 10px 20px 14px;
  }

  .avatar-wrap,
  .avatar {
    width: 112px;
    height: 112px;
  }

  .stats-grid,
  .stack-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .quick-actions,
  .links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-action {
    grid-column: auto;
  }

  .hub-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .link-card {
    min-height: 68px;
    gap: 9px;
    padding: 10px;
  }

  .link-card img {
    width: 34px;
    height: 34px;
  }

  .link-card span {
    font-size: 13px;
  }

  .link-card small {
    font-size: 10px;
  }

  .gallery-item {
    min-height: 168px;
  }

  .gallery-preview {
    min-height: min(560px, 76vh);
    border-radius: 18px;
  }

  .gallery-preview-title {
    right: 10px;
    bottom: 10px;
    left: 10px;
    padding: 11px 12px;
  }

  .go-top {
    right: 14px;
    bottom: 14px;
    width: 44px;
    height: 44px;
  }

  section {
    padding-top: 72px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .signal {
    align-items: flex-start;
    flex-direction: column;
  }

  .signal span:last-child {
    text-align: start;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
