/* ============================================================
   Ida Ramezani — Portfolio · Apple "Liquid Glass" design system
   v2 — refined blur, unified radii, spring motion
   ============================================================ */

:root {
  --bg: #f5f5f7;
  --bg-2: #ffffff;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #a1a1a6;
  --hair: rgba(0, 0, 0, 0.08);
  --hair-strong: rgba(0, 0, 0, 0.15);
  --card: #ffffff;
  --card-op: rgba(255, 255, 255, 0.6);
  --card-op-strong: rgba(255, 255, 255, 0.8);
  --glass-brd: rgba(255, 255, 255, 0.6);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  --glass-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 16px 48px rgba(0, 0, 0, 0.08);
  --blur: blur(30px) saturate(1.85);
  --seg-bg: rgba(120, 120, 128, 0.13);
  --seg-pill: #ffffff;
  --invert-bg: #1d1d1f;
  --invert-text: #f5f5f7;
  --accent: #0071e3;
  --danger: #ff453a;
  --ok: #30d158;
  --scrim: linear-gradient(to top, rgba(8, 8, 10, 0.74) 0%, rgba(8, 8, 10, 0.3) 42%, rgba(8, 8, 10, 0.2) 100%);
  --r-xs: 12px; --r-sm: 16px; --r-md: 20px; --r-lg: 26px; --r-xl: 34px; --r-2xl: 42px;
  --shadow-1: 0 2px 10px rgba(0, 0, 0, 0.05), 0 14px 44px rgba(0, 0, 0, 0.07);
  --shadow-2: 0 30px 90px rgba(0, 0, 0, 0.18);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.45, 0.44, 1);
  --nav-h: 56px;
}
html[data-theme="dark"] {
  --bg: #060607;
  --bg-2: #0d0d0f;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #6e6e73;
  --hair: rgba(255, 255, 255, 0.1);
  --hair-strong: rgba(255, 255, 255, 0.2);
  --card: #141416;
  --card-op: rgba(26, 26, 30, 0.5);
  --card-op-strong: rgba(26, 26, 30, 0.74);
  --glass-brd: rgba(255, 255, 255, 0.12);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), 0 20px 60px rgba(0, 0, 0, 0.35);
  --seg-bg: rgba(120, 120, 128, 0.22);
  --seg-pill: #48484e;
  --invert-bg: #f5f5f7;
  --invert-text: #0d0d0f;
  --shadow-1: 0 2px 10px rgba(0, 0, 0, 0.4), 0 16px 50px rgba(0, 0, 0, 0.45);
  --shadow-2: 0 30px 100px rgba(0, 0, 0, 0.6);
  --scrim: linear-gradient(to top, rgba(4, 4, 6, 0.84) 0%, rgba(4, 4, 6, 0.36) 46%, rgba(4, 4, 6, 0.24) 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.7s var(--ease-out), color 0.7s var(--ease-out);
}
::selection { background: rgba(0, 113, 227, 0.28); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: rgba(128, 128, 134, 0.4); border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

.container { width: min(1180px, 100% - clamp(40px, 8vw, 96px)); margin-inline: auto; }
.section { padding-block: clamp(96px, 11vw, 170px); position: relative; }
.micro {
  font-size: 11px; font-weight: 600; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 22px;
}
.kicker { display: flex; align-items: center; gap: 14px; }
.kicker::after { content: ""; height: 1px; width: 64px; background: var(--hair-strong); }
.h2 {
  font-size: clamp(38px, 5.6vw, 68px);
  font-weight: 700; letter-spacing: -0.035em; line-height: 1.02;
  margin-bottom: 20px; text-wrap: balance;
}
.lead { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.65; color: var(--text-2); max-width: 56ch; }

/* ---------------- grain + progress ---------------- */
.grain {
  position: fixed; inset: -50%; z-index: 2000; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 1500; }
.scroll-progress i { display: block; height: 100%; width: 0; background: var(--text); opacity: 0.5; }

/* ---------------- preloader ---------------- */
.preloader {
  position: fixed; inset: 0; z-index: 3000; background: #0b0b0d; color: #f5f5f7;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  transition: transform 0.9s var(--ease-out), visibility 0.9s;
}
.preloader.done { transform: translateY(-101%); visibility: hidden; }
.pre-mark { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }
.pre-mark span { color: #6e6e73; font-weight: 500; margin-left: 6px; }
.pre-num { font-size: 12px; font-weight: 600; letter-spacing: 0.3em; color: #6e6e73; font-variant-numeric: tabular-nums; }
.pre-bar { width: 160px; height: 2px; background: rgba(255, 255, 255, 0.14); border-radius: 2px; overflow: hidden; }
.pre-bar i { display: block; height: 100%; width: 0; background: #f5f5f7; border-radius: 2px; transition: width 0.2s var(--ease-out); }

/* ---------------- reveal system ---------------- */
.reveal { opacity: 0; transform: translateY(30px) scale(0.985); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
.reveal.mask {
  opacity: 1; transform: translateY(36px);
  clip-path: inset(0 0 105% 0);
  transition: clip-path 1.1s var(--ease-out), transform 1.1s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.reveal.mask.in { transform: none; clip-path: inset(-15% 0 -15% 0); }

/* ---------------- buttons ---------------- */
.pill-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 26px; border-radius: 999px;
  font-size: 15px; font-weight: 590; letter-spacing: -0.01em; white-space: nowrap;
  transform: translate(var(--mx, 0px), var(--my, 0px));
  transition: transform 0.5s var(--ease-spring), box-shadow 0.45s var(--ease-out), background 0.3s;
  will-change: transform;
}
.pill-btn:active { transform: translate(var(--mx, 0px), var(--my, 0px)) scale(0.95); }
.pill-btn.primary { background: var(--invert-bg); color: var(--invert-text); }
.pill-btn.primary:hover { box-shadow: 0 14px 38px rgba(0, 0, 0, 0.24); }
.pill-btn.glass {
  background: var(--card-op); border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--glass-inset);
}
.pill-btn.glass:hover { background: var(--card-op-strong); }
.pill-btn.small { height: 36px; padding: 0 18px; font-size: 13.5px; }
.pill-btn.wide { width: 100%; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 999px; color: var(--text);
  transition: background 0.3s, transform 0.5s var(--ease-spring);
}
.icon-btn:hover { background: rgba(128, 128, 134, 0.16); }
.icon-btn:active { transform: scale(0.88); }

/* ---------------- nav ---------------- */
.nav { position: fixed; top: 14px; left: 0; right: 0; z-index: 1000; display: flex; justify-content: center; padding-inline: 16px; }
.nav-inner {
  width: min(1060px, 100%);
  display: flex; align-items: center; gap: 18px;
  height: var(--nav-h); padding: 0 10px 0 20px; border-radius: 999px;
  background: var(--card-op); border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--glass-inset), var(--glass-shadow);
  transition: height 0.5s var(--ease-out), background 0.5s var(--ease-out), box-shadow 0.5s;
}
.nav.scrolled .nav-inner { height: 48px; background: var(--card-op-strong); }
.brand { display: flex; align-items: baseline; gap: 10px; margin-right: auto; }
.brand-mark { font-size: 19px; font-weight: 750; letter-spacing: -0.02em; }
.brand-sub { font-size: 10px; font-weight: 600; letter-spacing: 0.28em; color: var(--text-3); }
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  font-size: 13.5px; font-weight: 500; color: var(--text-2);
  padding: 7px 14px; border-radius: 999px;
  transition: color 0.3s, background 0.35s var(--ease-out), transform 0.4s var(--ease-spring);
}
.nav-links a:hover { color: var(--text); background: rgba(128, 128, 134, 0.13); transform: translateY(-1px); }
.nav-links a.active { color: var(--text); background: rgba(128, 128, 134, 0.18); }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.lang-btn { width: auto; padding: 0 12px; gap: 5px; }
.lang-btn svg { flex: 0 0 auto; }
.lang-btn span { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; line-height: 1; }
.ico-sun { display: none; }
html[data-theme="light"] .ico-sun { display: block; }
html[data-theme="light"] .ico-moon { display: none; }
.menu-btn { display: none; }

.mobile-sheet {
  position: fixed; inset: 0; z-index: 900; display: flex; flex-direction: column;
  justify-content: center; align-items: center; gap: 8px; text-align: center;
  background: var(--card-op-strong);
  -webkit-backdrop-filter: blur(46px) saturate(1.9); backdrop-filter: blur(46px) saturate(1.9);
  opacity: 0; visibility: hidden; transform: translateY(-14px) scale(1.02);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out), visibility 0.55s;
}
.mobile-sheet.open { opacity: 1; visibility: visible; transform: none; }
.mobile-sheet nav { display: flex; flex-direction: column; gap: 6px; }
.mobile-sheet nav a {
  font-size: 34px; font-weight: 700; letter-spacing: -0.03em; padding: 10px 30px; border-radius: var(--r-lg);
  opacity: 0; transform: translateY(20px) scale(0.96);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-spring), background 0.3s;
}
.mobile-sheet.open nav a { opacity: 1; transform: none; }
.mobile-sheet.open nav a:nth-child(1) { transition-delay: 0.06s; }
.mobile-sheet.open nav a:nth-child(2) { transition-delay: 0.11s; }
.mobile-sheet.open nav a:nth-child(3) { transition-delay: 0.16s; }
.mobile-sheet.open nav a:nth-child(4) { transition-delay: 0.21s; }
.mobile-sheet.open nav a:nth-child(5) { transition-delay: 0.26s; }
.mobile-sheet nav a:active { background: rgba(128, 128, 134, 0.14); }
.sheet-foot { position: absolute; bottom: 44px; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--text-3); }

/* ---------------- hero ---------------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: -1; will-change: transform; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 62% 20%;
  animation: heroIn 2s var(--ease-out) both, kb 22s 2s var(--ease-in-out) infinite alternate;
}
@keyframes heroIn { from { transform: scale(1.18); opacity: 0.35; } to { transform: scale(1.1); opacity: 1; } }
@keyframes kb { from { transform: scale(1.1); } to { transform: scale(1.18); } }
.hero-scrim { position: absolute; inset: 0; background: var(--scrim); }
.hero-inner { position: relative; padding-bottom: clamp(120px, 16vh, 190px); color: #f5f5f7; will-change: transform, opacity; }
.hero .kicker { color: rgba(245, 245, 247, 0.66); }
.hero .kicker::after { background: rgba(245, 245, 247, 0.32); }
.hero-title { font-size: clamp(52px, 9.4vw, 128px); font-weight: 760; letter-spacing: -0.045em; line-height: 0.98; margin: 6px 0 10px; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.hero-title .line > span { display: inline-block; transform: translateY(115%) rotate(2.5deg); transform-origin: left bottom; animation: lineUp 1.25s var(--ease-out) forwards; }
.hero-title .line:nth-child(2) > span { animation-delay: 0.13s; }
@keyframes lineUp { to { transform: none; } }
.hero-year { font-size: clamp(22px, 3vw, 34px); font-weight: 300; letter-spacing: 0.28em; color: rgba(245, 245, 247, 0.85); animation: fadeUp 1s 0.5s var(--ease-out) both; }
.hero-rule { width: 92px; height: 2px; background: rgba(245, 245, 247, 0.7); margin: 26px 0 18px; transform-origin: left; animation: growX 1s 0.65s var(--ease-out) both; }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.hero-roles { font-size: clamp(12px, 1.4vw, 15px); font-weight: 600; letter-spacing: 0.32em; text-transform: uppercase; color: rgba(245, 245, 247, 0.72); animation: fadeUp 1s 0.75s var(--ease-out) both; }
.hero-cta { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; animation: fadeUp 1s 0.9s var(--ease-out) both; }
.hero-cta .pill-btn.primary { background: #f5f5f7; color: #0d0d0f; }
.hero-cta .pill-btn.glass { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.22); color: #f5f5f7; box-shadow: none; }
.hero-cta .pill-btn.glass:hover { background: rgba(255, 255, 255, 0.2); }
.hero-foot { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding-bottom: 34px; color: rgba(245, 245, 247, 0.8); animation: fadeUp 1s 1.05s var(--ease-out) both; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; max-width: 70%; }
.chip {
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 999px; color: rgba(245, 245, 247, 0.88);
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: background 0.3s, transform 0.5s var(--ease-spring);
}
.chip:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-3px); }
.scroll-hint { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 10px; letter-spacing: 0.34em; text-transform: uppercase; }
.scroll-hint i { width: 1px; height: 44px; background: linear-gradient(to bottom, rgba(245, 245, 247, 0.7), transparent); position: relative; overflow: hidden; }
.scroll-hint i::after { content: ""; position: absolute; top: -40%; left: 0; width: 100%; height: 40%; background: #fff; animation: drip 1.8s var(--ease-out) infinite; }
@keyframes drip { to { top: 110%; } }

/* ---------------- marquee ---------------- */
.marquee { border-block: 1px solid var(--hair); padding: 20px 0; overflow: hidden; background: var(--bg-2); }
.marquee-track { display: flex; gap: 54px; width: max-content; will-change: transform; }
.marquee-track span {
  font-size: 13px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--text-3);
  display: flex; align-items: center; gap: 54px; white-space: nowrap;
}
.marquee-track span::after { content: "✦"; font-size: 10px; color: var(--hair-strong); }

/* ---------------- glass card base ---------------- */
.glass-card {
  background: var(--card-op); border: 1px solid var(--glass-brd); border-radius: var(--r-lg);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--glass-inset), var(--glass-shadow);
  position: relative; overflow: hidden;
}
.glass-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.14) 47%, transparent 60%);
  transform: translateX(-130%); transition: transform 1.2s var(--ease-out);
}
.glass-card:hover::before { transform: translateX(130%); }

/* ---------------- about ---------------- */
.about { background: var(--bg); }
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.about-figure { position: sticky; top: 110px; }
.frame {
  border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-1); background: var(--card);
  transform: perspective(1200px) rotateX(var(--frx, 0deg)) rotateY(var(--fry, 0deg));
  transition: transform 0.7s var(--ease-out); will-change: transform;
}
.frame img { width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; transform: scale(1.06); transition: transform 1.2s var(--ease-out); }
.about-figure:hover .frame img { transform: scale(1); }
.frame-cap { display: flex; justify-content: space-between; margin-top: 14px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.3em; color: var(--text-3); }
.about-copy .h2 { margin-bottom: 26px; }
.about-copy .lead { margin-bottom: 30px; }
.meta-row { display: flex; gap: 16px; align-items: baseline; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--hair); }
.meta-k { font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-3); min-width: 120px; }
.meta-v { font-size: 15.5px; font-weight: 560; }
.tags-line { font-size: 12px; font-weight: 600; letter-spacing: 0.26em; text-transform: uppercase; color: var(--text-3); margin-bottom: 40px; }
.stats { display: flex; gap: 16px; flex-wrap: wrap; }
.stat { flex: 1 1 200px; padding: 26px 28px; display: flex; align-items: center; gap: 20px; }
.stat-n { font-size: clamp(38px, 4vw, 52px); font-weight: 750; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.stat-l { font-size: 12px; font-weight: 550; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); line-height: 1.5; }

/* ---------------- journey ---------------- */
.journey { background: var(--bg-2); border-block: 1px solid var(--hair); }
.journey-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 56px); margin-top: clamp(36px, 5vw, 64px); }
.j-col {
  padding: clamp(20px, 2.4vw, 30px); border-radius: var(--r-lg);
  background: var(--card-op); border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--glass-inset), var(--glass-shadow);
  transition: transform 0.6s var(--ease-spring), box-shadow 0.5s var(--ease-out);
}
.j-col:hover { transform: translateY(-6px); box-shadow: var(--glass-inset), var(--shadow-2); }
.j-title { font-size: 15px; font-weight: 700; letter-spacing: 0.02em; padding-bottom: 14px; border-bottom: 1.5px solid var(--hair-strong); margin-bottom: 22px; }
.j-list { list-style: none; counter-reset: j; }
.j-list li {
  counter-increment: j; display: flex; gap: 16px; align-items: baseline;
  padding: 13px 0; font-size: 15px; line-height: 1.55; color: var(--text-2);
}
.j-list li::before { content: counter(j, decimal-leading-zero) "."; font-size: 22px; font-weight: 650; letter-spacing: -0.02em; color: var(--text-3); flex: 0 0 auto; transition: color 0.3s; }
.j-list li:hover::before { color: var(--text); }
.journey-foot { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; margin-top: clamp(48px, 6vw, 80px); }
.gpa-card {
  background: var(--invert-bg); color: var(--invert-text); border-radius: var(--r-lg);
  padding: 34px 36px; position: relative; overflow: hidden;
}
.gpa-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.16) 46%, transparent 60%);
  transform: translateX(-120%); transition: transform 1.1s var(--ease-out);
}
.gpa-card:hover::after { transform: translateX(120%); }
.gpa-n { display: flex; align-items: baseline; gap: 10px; font-size: clamp(40px, 4.4vw, 56px); font-weight: 760; letter-spacing: -0.04em; }
.gpa-n em { font-style: normal; font-size: 0.44em; font-weight: 550; opacity: 0.55; }
.gpa-l { display: block; margin-top: 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; opacity: 0.6; }
.journey-note { font-size: 15.5px; line-height: 1.7; color: var(--text-2); max-width: 46ch; }

/* ---------------- expertise ---------------- */
.expertise { background: var(--bg); }
.x-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3.4vw, 44px) clamp(28px, 4vw, 56px); margin-top: clamp(36px, 5vw, 64px); }
.x-item { padding: 22px 4px 26px; border-bottom: 1px solid var(--hair); position: relative; cursor: default; }
.x-item .x-n { font-size: 24px; font-weight: 720; letter-spacing: -0.02em; color: var(--text-3); display: block; margin-bottom: 14px; transition: color 0.35s, transform 0.5s var(--ease-spring); }
.x-item .x-t { font-size: 16.5px; font-weight: 620; letter-spacing: -0.01em; line-height: 1.4; }
.x-item::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 1.5px; width: 46px; background: var(--text); transition: width 0.7s var(--ease-out); }
.x-item:hover .x-n { color: var(--text); transform: translateX(4px); }
.x-item:hover::after { width: 100%; }

/* ---------------- collection ---------------- */
.collection { background: var(--bg-2); border-top: 1px solid var(--hair); padding-bottom: 40px; }
.collection-sub { font-size: 12px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--text-3); margin: 6px 0 36px; }
.seg-wrap { position: sticky; top: 84px; z-index: 60; display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.seg {
  position: relative; display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px;
  background: var(--seg-bg);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-brd); box-shadow: var(--glass-inset), var(--glass-shadow);
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg-pill {
  position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px;
  background: var(--seg-pill); box-shadow: 0 3px 12px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.6s var(--ease-spring), width 0.6s var(--ease-spring); z-index: 0;
}
.seg button {
  position: relative; z-index: 1; border-radius: 999px; padding: 9px 18px;
  font-size: 13.5px; font-weight: 590; color: var(--text-2); white-space: nowrap;
  transition: color 0.35s, transform 0.4s var(--ease-spring);
}
.seg button:active { transform: scale(0.94); }
.seg button b { font-weight: 650; opacity: 0.55; margin-left: 5px; font-variant-numeric: tabular-nums; }
.seg button.on { color: var(--text); }
html[data-theme="dark"] .seg button.on { color: #f5f5f7; }
.fav-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px;
  background: var(--seg-bg); border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--glass-inset);
  font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap;
  transition: color 0.3s, transform 0.5s var(--ease-spring), background 0.3s, border-color 0.3s;
}
.fav-chip:hover { transform: translateY(-2px); }
.fav-chip.on { color: #ff375f; border-color: rgba(255, 55, 95, 0.4); background: rgba(255, 55, 95, 0.1); }
.fav-chip svg { width: 15px; height: 15px; }
.fav-chip b { font-variant-numeric: tabular-nums; }
.cat-bar {
  display: flex; align-items: center; gap: 26px; padding: 22px 28px; margin-bottom: 34px;
  border-radius: var(--r-lg);
}
.cat-bar-ch { font-size: 12px; font-weight: 700; letter-spacing: 0.2em; color: var(--text-3); white-space: nowrap; }
.cat-bar-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cat-bar-txt strong { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.cat-bar-txt span { font-size: 13.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-bar-count { margin-left: auto; font-size: 12px; font-weight: 650; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.works-band { padding-bottom: clamp(60px, 8vw, 110px); }
/* JS-distributed masonry — CSS multicol is broken in RTL (items jump
   between columns / vanish after re-render), so columns are built in JS */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.grid-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.grid.no-anim .work, .grid.no-anim .work img { animation: none !important; }
.work {
  position: relative; border-radius: var(--r-md); overflow: hidden;
  background: var(--card); cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  animation: workIn 0.9s var(--ease-out) both; animation-delay: var(--d, 0ms);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: box-shadow 0.5s var(--ease-out);
  will-change: transform;
}
@keyframes workIn { from { opacity: 0; transform: translateY(28px) scale(0.96); } to { opacity: 1; transform: perspective(1000px); } }
.work:hover { box-shadow: var(--shadow-2); z-index: 2; }
.work::before {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0;
  background: radial-gradient(360px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.16), transparent 55%);
  transition: opacity 0.4s;
}
.work:hover::before { opacity: 1; }
.work .sk {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(100deg, rgba(128, 128, 134, 0.1) 30%, rgba(128, 128, 134, 0.22) 50%, rgba(128, 128, 134, 0.1) 70%);
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite;
  transition: opacity 0.6s var(--ease-out);
}
@keyframes shimmer { to { background-position: -200% 0; } }
.work.loaded .sk { opacity: 0; }
.work img {
  position: relative; z-index: 1; width: 100%; min-height: 200px; object-fit: cover;
  background: #17171a;
  transition: transform 1s var(--ease-out);
  animation: imgSettle 0.9s var(--ease-out) backwards;
}
@keyframes imgSettle { from { opacity: 0.3; transform: scale(1.045); } }
.work:hover img { transform: scale(1.055); }
.work::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6, 6, 8, 0.62), transparent 46%);
  opacity: 0; transition: opacity 0.55s var(--ease-out);
}
.work:hover::after { opacity: 1; }
.work-cap {
  position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  color: #f5f5f7; opacity: 0; transform: translateY(12px); transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.work:hover .work-cap, .work:focus-within .work-cap { opacity: 1; transform: none; }
.work-cap strong { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; display: block; }
.work-cap span { font-size: 10.5px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.72; }
.work-zoom {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.25);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  display: flex; align-items: center; justify-content: center;
}
.fav-btn {
  position: absolute; top: 12px; right: 12px; z-index: 4;
  width: 36px; height: 36px; border-radius: 999px;
  background: rgba(12, 12, 14, 0.35); border: 1px solid rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6);
  color: rgba(255, 255, 255, 0.85);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.8);
  transition: opacity 0.35s var(--ease-out), transform 0.45s var(--ease-spring), color 0.3s, background 0.3s;
}
.work:hover .fav-btn, .fav-btn.on { opacity: 1; transform: none; }
.fav-btn:active { transform: scale(0.85); }
.fav-btn.on { color: #ff375f; background: rgba(255, 55, 95, 0.18); }
.fav-btn.pop svg { animation: heartPop 0.5s var(--ease-spring); }
@keyframes heartPop { 0% { transform: scale(0.4); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
.grid-empty { text-align: center; padding: 70px 0; color: var(--text-3); font-size: 15px; }

/* ---------------- quote ---------------- */
.quote-band { background: var(--bg); }
.quote-card { max-width: 780px; margin-inline: auto; padding: clamp(40px, 6vw, 72px); text-align: center; position: relative; }
.quote-mark { font-size: 90px; line-height: 0.6; display: block; color: var(--text-3); font-weight: 700; margin-bottom: 18px; font-family: Georgia, serif; }
.quote-card blockquote { font-size: clamp(20px, 2.6vw, 28px); font-weight: 560; letter-spacing: -0.015em; line-height: 1.45; text-wrap: balance; }
.quote-card figcaption { margin-top: 26px; font-size: 12px; font-weight: 650; letter-spacing: 0.26em; text-transform: uppercase; color: var(--text-3); }

/* ---------------- contact ---------------- */
.contact { background: var(--bg-2); border-top: 1px solid var(--hair); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(44px, 6vw, 90px); align-items: start; }
.avail { display: flex; align-items: center; gap: 10px; margin: 26px 0 34px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.avail i { width: 8px; height: 8px; border-radius: 99px; background: var(--ok); animation: ping 2.2s var(--ease-out) infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.45); } 70% { box-shadow: 0 0 0 9px rgba(48, 209, 88, 0); } 100% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0); } }
.info-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.info-list a, .info-list .plain {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: var(--r-md);
  border: 1px solid var(--hair); background: var(--card);
  transition: transform 0.5s var(--ease-spring), border-color 0.3s, box-shadow 0.4s;
}
.info-list a:hover { transform: translateX(6px); border-color: var(--hair-strong); box-shadow: var(--shadow-1); }
.info-ico {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: var(--r-xs); display: flex; align-items: center; justify-content: center;
  background: rgba(128, 128, 134, 0.12); color: var(--text);
}
.info-k { display: block; font-size: 10.5px; font-weight: 650; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-3); margin-bottom: 2px; }
.info-v { font-size: 14.5px; font-weight: 580; }
.contact-form { padding: clamp(26px, 3vw, 40px); border-radius: var(--r-xl); }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: block; margin-bottom: 14px; }
.f-label { display: block; font-size: 11px; font-weight: 650; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--text);
  background: var(--bg); border: 1px solid var(--hair); border-radius: var(--r-sm);
  padding: 13px 16px; transition: border-color 0.25s, box-shadow 0.25s, background 0.3s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; min-height: 120px; }
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23888' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.16);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(255, 69, 58, 0.14); }
.hp { position: absolute !important; left: -9999px !important; height: 0; width: 0; opacity: 0; }
.cf-spinner { width: 16px; height: 16px; border-radius: 99px; border: 2px solid rgba(255, 255, 255, 0.3); border-top-color: currentColor; display: none; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#cfSend.busy .cf-spinner { display: inline-block; }
#cfSend.busy .cf-label { opacity: 0.75; }
#cfSend.busy { pointer-events: none; }
.f-error { margin-top: 14px; font-size: 13.5px; color: var(--danger); font-weight: 550; }
.form-done { padding: clamp(40px, 5vw, 64px); text-align: center; animation: workIn 0.8s var(--ease-out); }
.done-ring { width: 84px; height: 84px; margin: 0 auto 22px; border-radius: 999px; background: rgba(48, 209, 88, 0.14); display: flex; align-items: center; justify-content: center; animation: pop 0.8s var(--ease-spring); }
.done-ring circle { stroke: var(--ok); stroke-width: 2.4; stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw 0.9s 0.15s var(--ease-out) forwards; }
.done-ring path { stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 36; stroke-dashoffset: 36; animation: draw 0.5s 0.75s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.form-done h3 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 10px; }
.form-done p { color: var(--text-2); line-height: 1.6; }

/* ---------------- footer ---------------- */
.footer { border-top: 1px solid var(--hair); background: var(--bg); padding: 44px 0 40px; }
.foot-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-brand { font-size: 22px; font-weight: 760; letter-spacing: -0.03em; }
.foot-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.foot-nav a { font-size: 13px; font-weight: 550; color: var(--text-2); padding: 7px 13px; border-radius: 999px; transition: color 0.3s, background 0.3s; }
.foot-nav a:hover { color: var(--text); background: rgba(128, 128, 134, 0.13); }
.foot-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--hair); }
.foot-bottom p { font-size: 12.5px; color: var(--text-3); }
.top-btn { border: 1px solid var(--hair); width: 42px; height: 42px; }

/* ---------------- lightbox ---------------- */
.lightbox { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; padding: clamp(16px, 4vw, 56px); visibility: hidden; }
.lightbox.open { visibility: visible; }
.lb-backdrop {
  position: absolute; inset: 0; background: rgba(8, 8, 11, 0.6);
  -webkit-backdrop-filter: blur(40px) saturate(1.15); backdrop-filter: blur(40px) saturate(1.15);
  opacity: 0; transition: opacity 0.45s var(--ease-out);
}
.lightbox.open .lb-backdrop { opacity: 1; }
.lb-stage {
  position: relative; max-width: min(1200px, 92vw); display: flex; flex-direction: column; align-items: center;
  transform: scale(0.92) translateY(14px); opacity: 0;
  transition: transform 0.6s var(--ease-spring), opacity 0.4s var(--ease-out);
}
.lightbox.open .lb-stage { transform: none; opacity: 1; }
.lb-frame { border-radius: var(--r-md); overflow: hidden; box-shadow: 0 40px 130px rgba(0, 0, 0, 0.55); background: #141416; max-height: 76vh; }
.lb-stage img {
  max-width: 100%; max-height: 76vh; object-fit: contain; user-select: none;
  -webkit-user-drag: none; cursor: zoom-in;
  transform: scale(var(--z, 1)) translate(var(--px, 0px), var(--py, 0px));
  transition: transform 0.45s var(--ease-spring), opacity 0.28s var(--ease-out);
  transform-origin: center;
}
.lb-stage img.zoomed { cursor: zoom-out; transition: transform 0.12s linear; }
.lb-stage img.switching { opacity: 0; }
.lb-cap { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; width: 100%; margin-top: 18px; color: rgba(245, 245, 247, 0.92); }
.lb-txt strong { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; display: block; }
.lb-txt span { font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.6; }
.lb-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.lb-count { font-size: 12.5px; font-weight: 600; letter-spacing: 0.12em; opacity: 0.65; font-variant-numeric: tabular-nums; }
.lb-fav { opacity: 1; position: static; width: 34px; height: 34px; background: rgba(255, 255, 255, 0.1); }
.lb-actions { display: flex; gap: 8px; }
.lb-btn {
  position: absolute; z-index: 5; width: 46px; height: 46px; border-radius: 999px;
  color: #f5f5f7; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.85);
  transition: opacity 0.4s var(--ease-out), transform 0.45s var(--ease-spring), background 0.3s;
}
.lightbox.open .lb-btn { opacity: 1; transform: none; }
.lb-btn:hover { background: rgba(255, 255, 255, 0.24); }
.lb-btn:active { transform: scale(0.9); }
.lb-close { top: 22px; right: 22px; }
.lb-share { top: 22px; right: 78px; width: 46px; }
.lb-prev { left: 22px; top: 50%; margin-top: -23px; }
.lb-next { right: 22px; top: 50%; margin-top: -23px; }
.lb-zoom-hint {
  position: absolute; bottom: 86px; left: 50%; transform: translateX(-50%);
  font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(245, 245, 247, 0.55); pointer-events: none; opacity: 0; transition: opacity 0.5s;
}
.lightbox.open .lb-zoom-hint { opacity: 1; }

/* ---------------- toast ---------------- */
.toast-site {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 20px); z-index: 3500;
  padding: 12px 22px; border-radius: 999px;
  background: var(--card-op-strong); border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--glass-inset), var(--glass-shadow);
  font-size: 13.5px; font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity 0.4s var(--ease-out), transform 0.5s var(--ease-spring);
}
.toast-site.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- responsive ---------------- */
@media (max-width: 1080px) {
  .nav-links, .nav-cta { display: none; }
  .menu-btn { display: inline-flex; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid { grid-template-columns: 1fr; }
  .about-figure { position: relative; top: 0; max-width: 560px; }
  .journey-grid { grid-template-columns: 1fr; gap: 24px; }
  .x-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .journey-foot { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container { width: calc(100% - 36px); }
  .grid { grid-template-columns: 1fr; }
  .hero-inner { padding-bottom: 140px; }
  .hero-foot { flex-direction: column; align-items: flex-start; gap: 22px; }
  .chips { max-width: 100%; }
  .scroll-hint { display: none; }
  .x-grid { grid-template-columns: 1fr; gap: 8px; }
  .x-item { padding: 16px 4px; }
  .f-row { grid-template-columns: 1fr; }
  .cat-bar { flex-wrap: wrap; gap: 10px 18px; }
  .cat-bar-count { margin-left: 0; }
  .seg-wrap { top: 72px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .seg-wrap::-webkit-scrollbar { display: none; }
  .lb-prev, .lb-next { top: auto; bottom: 26px; margin-top: 0; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { right: calc(50% - 60px); }
  .lb-cap { margin-top: 74px; flex-direction: column; gap: 6px; align-items: flex-start; }
  .lb-right { margin-left: 0; }
  .fav-btn { opacity: 1; transform: none; }
}

/* ---------------- reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
  .reveal, .reveal.mask { opacity: 1; transform: none; clip-path: none; }
  .hero-media img { transform: none; }
  .marquee-track { transform: none !important; }
  .cursor-dot, .cursor-ring { display: none; }
}

/* fav state for lightbox heart */
.lb-fav.on { color: #ff375f; background: rgba(255, 55, 95, 0.18); }
.fav-chip svg { flex: 0 0 auto; }

/* ============================================================
   Persian (Farsi) — RTL + typography
   html[lang="fa"] is set by the language toggle (default: en)
   ============================================================ */
/* Vazirmatn — minimal, modern Persian face · variable weight, self-hosted */
@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
html[lang="fa"] body {
  font-family: "Vazirmatn", "SF Pro Text", "SF Arabic", "Geeza Pro", "Segoe UI", Tahoma, Arial, sans-serif;
}
/* Persian text flows right-aligned; block start = right */
html[dir="rtl"] .field input:not([dir="ltr"]),
html[dir="rtl"] .field textarea { text-align: right; }
/* letter-spacing breaks joined Persian glyphs — reset it everywhere
   except the Latin brand marks that stay Latin in FA mode */
html[lang="fa"] *:not(.brand-sub):not(.pre-mark):not(.pre-num) { letter-spacing: 0 !important; }
html[lang="fa"] .h2, html[lang="fa"] .hero-title { line-height: 1.24; }
html[lang="fa"] .hero-year, html[lang="fa"] .j-title { line-height: 1.5; }
html[lang="fa"] .lead, html[lang="fa"] .journey-note { line-height: 1.9; }
html[lang="fa"] .j-list li { line-height: 1.85; }
/* Persian numerals for the numbered lists in FA mode */
html[lang="fa"] .j-list li::before { content: counter(j, persian) "\200F."; }

/* RTL: flip physically-positioned pieces */
html[dir="rtl"] .brand { margin-right: 0; margin-left: auto; }
html[dir="rtl"] .seg button b { margin-left: 0; margin-right: 5px; }
html[dir="rtl"] .cat-bar-count { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .fav-btn { right: auto; left: 12px; }
html[dir="rtl"] .lb-right { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .lb-close { right: auto; left: 22px; }
html[dir="rtl"] .lb-share { right: auto; left: 78px; }
html[dir="rtl"] .lb-prev { left: auto; right: 22px; }
html[dir="rtl"] .lb-next { right: auto; left: 22px; }
html[dir="rtl"] .x-item::after { left: auto; right: 0; }
html[dir="rtl"] .x-item:hover .x-n { transform: translateX(-4px); }
html[dir="rtl"] .info-list a:hover { transform: translateX(-6px); }
html[dir="rtl"] .field select {
  background-position: left 16px center; padding-right: 16px; padding-left: 40px;
}
@media (max-width: 640px) {
  html[dir="rtl"] .lb-prev { left: auto; right: calc(50% - 60px); }
  html[dir="rtl"] .lb-next { right: auto; left: calc(50% - 60px); }
}
