/* =========================================================
   Barakat Qurtas — Independent Designer
   Editorial · Warm Ink · Cream · Burnt Gold
   Light / Dark · 5 languages · RTL aware
   ========================================================= */

/* ---------- Liana — the logo font, used ONLY for the name ---------- */
@font-face {
  font-family: 'Liana';
  src: url('../assets/fonts/Liana.otf') format('opentype'),
       url('../assets/fonts/Liana.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: 'Manrope', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  cursor: none;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: none; border: none; background: none; color: inherit; }
ul, ol { list-style: none; }
input, select, textarea { font-family: inherit; color: inherit; }

/* ---------- Tokens / Themes ---------- */
:root {
  --gold: #c9a253;
  --gold-bright: #c9a253;   /* always-vibrant gold for fills / dots / pills */
  --gold-deep: #a8862f;
  --gold-soft: rgba(201, 162, 83, 0.25);
  --ember: #5a1a1a;

  --rail-w: 96px;
  --dock-h: calc(64px + env(safe-area-inset-bottom));   /* mobile bottom dock height */
  --pad-x: clamp(24px, 6vw, 96px);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* LIGHT (default) */
:root,
:root[data-theme="light"] {
  --bg: #efe6d2;
  --bg-2: #e8dfcd;
  --bg-3: #f5ecd6;
  --surface: rgba(255, 250, 240, 0.4);
  --ink: #1a0f08;
  --ink-2: #2a1a0e;
  --ink-soft: #3a2616;
  --ink-muted: #6b5238;
  --gold: #7d5a12;       /* deep antique gold — readable as text/icons on the light bg (AA) */
  --gold-ink: #7d5a12;   /* alias kept for the small labels */
  --line: rgba(26, 15, 8, 0.18);
  --line-soft: rgba(26, 15, 8, 0.08);
  --rail-bg: #efe6d2;
  --card-bg: rgba(255, 250, 240, 0.3);
  --grain-opacity: 0.08;
}

/* DARK */
:root[data-theme="dark"] {
  --bg: #14100b;
  --bg-2: #1c1610;
  --bg-3: #251c14;
  --surface: rgba(255, 240, 215, 0.04);
  --ink: #f0e6d2;
  --ink-2: #e8dfcd;
  --ink-soft: #c7b89a;
  --ink-muted: #8a7b62;
  --gold: #c9a253;       /* stay vibrant on the dark bg */
  --gold-ink: #c9a253;
  --line: rgba(232, 223, 205, 0.18);
  --line-soft: rgba(232, 223, 205, 0.08);
  --rail-bg: #0f0c08;
  --card-bg: rgba(232, 223, 205, 0.03);
  --grain-opacity: 0.12;
}

/* RTL languages */
:root[lang="ar"] body,
:root[lang="ku"] body {
  font-family: 'Noto Naskh Arabic', 'Manrope', sans-serif;
}
:root[lang="ar"] h1, :root[lang="ar"] h2, :root[lang="ar"] h3, :root[lang="ar"] h4,
:root[lang="ku"] h1, :root[lang="ku"] h2, :root[lang="ku"] h3, :root[lang="ku"] h4,
:root[lang="kmr"] h1, :root[lang="kmr"] h2, :root[lang="kmr"] h3, :root[lang="kmr"] h4 {
  letter-spacing: 0;
}
:root[lang="ar"] h1, :root[lang="ar"] h2, :root[lang="ar"] h3, :root[lang="ar"] h4,
:root[lang="ku"] h1, :root[lang="ku"] h2, :root[lang="ku"] h3, :root[lang="ku"] h4 {
  font-family: 'Noto Kufi Arabic', 'Fraunces', serif;
}
/* The brand name is always Latin — keep its logo/serif type in every language */
:root[lang] .profile-card-name,
:root[lang] .splash-name,
:root[lang] .bio-phil-sign { font-family: 'Liana', 'Fraunces', serif !important; }
:root[lang] .hero-name,
:root[lang] .footer-bq,
:root[lang] .pencemor-hero-name { font-family: 'Fraunces', serif !important; }
/* In Kurdish/Arabic the name itself is in Arabic script — use an Arabic display face */
:root[lang="ku"] .hero-name, :root[lang="ar"] .hero-name,
:root[lang="ku"] .pencemor-hero-name, :root[lang="ar"] .pencemor-hero-name,
:root[lang="ku"] .profile-card-name, :root[lang="ar"] .profile-card-name,
:root[lang="ku"] .splash-name, :root[lang="ar"] .splash-name,
:root[lang="ku"] .bio-phil-sign, :root[lang="ar"] .bio-phil-sign {
  font-family: 'Noto Kufi Arabic', 'Fraunces', serif !important;
}
/* Arabic script connects — tight/negative tracking, clipping and italics
   "break" the name, so relax those for the hero title in ku/ar. */
:root[lang="ku"] .hero-title, :root[lang="ar"] .hero-title {
  letter-spacing: 0; line-height: 1.18;
}
:root[lang="ku"] .hero-line, :root[lang="ar"] .hero-line { overflow: visible; }
:root[lang="ku"] .hero-line--2, :root[lang="ar"] .hero-line--2 { font-style: normal; }

/* ---------- Type ---------- */
.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-soft);
}
h1, h2, h3, h4 { font-family: 'Fraunces', serif; font-weight: 500; color: var(--ink); }
em { font-style: italic; color: var(--ember); }
:root[data-theme="dark"] em { color: var(--gold); }

/* ---------- Grain overlay ---------- */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: var(--grain-opacity);
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.06 0 0 0 0 0.03 0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 200px 200px;
}
:root[data-theme="dark"] .grain { mix-blend-mode: screen; }

/* ---------- Custom Cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
  mix-blend-mode: difference;
}
.cursor-dot { width: 6px; height: 6px; background: var(--gold-bright); border-radius: 50%; }
.cursor-ring {
  width: 32px; height: 32px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  transition: width 0.3s var(--ease), height 0.3s var(--ease), opacity 0.2s ease;
}
.cursor-ring.is-hover { width: 60px; height: 60px; background: rgba(201, 162, 83, 0.08); }
@media (max-width: 900px), (pointer: coarse) {
  body { cursor: auto; }
  button, a { cursor: pointer; }
  .cursor-dot, .cursor-ring { display: none; }
}

/* =========================================================
   SIDE RAIL
   ========================================================= */
.rail {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--rail-w);
  border-right: 1px solid var(--line);
  background: var(--rail-bg);
  z-index: 100;
  display: flex; flex-direction: column;
  align-items: center;
  padding: 24px 0 28px;
}
[dir="rtl"] .rail { left: auto; right: 0; border-right: none; border-left: 1px solid var(--line); }

.rail-logo { display: block; margin-bottom: 34px; }
.rail-logo-mark {
  font-family: 'Fraunces', serif;
  font-size: 30px; font-style: italic; font-weight: 600;
  color: var(--ink); letter-spacing: -0.02em;
  display: inline-block;
  transition: transform 0.4s var(--ease), color 0.3s var(--ease);
}
.rail-logo:hover .rail-logo-mark { transform: rotate(-4deg); color: var(--gold); }
.rail-logo-mark::after { content: '.'; color: var(--gold); }

.rail-nav { flex: 1; display: flex; flex-direction: column; gap: 18px; margin-top: 8px; align-items: center; }

.rail-link {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  color: var(--ink-soft);
  border: 1px solid transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.rail-link:hover {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}
.rail-icon { font-size: 16px; color: var(--gold); transition: transform 0.3s var(--ease); }
.rail-link:hover .rail-icon { transform: scale(1.08); }

.rail-link.is-active {
  color: var(--ink);
  border-color: var(--gold);
  background: rgba(201, 162, 83, 0.08);
}
.rail-link.is-active::before {
  content: '';
  position: absolute;
  left: -16px; top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  border-radius: 50%; background: var(--gold-bright);
  box-shadow: 0 0 0 4px rgba(201,162,83,0.15);
}
[dir="rtl"] .rail-link.is-active::before { left: auto; right: -16px; }

/* ---------- Sliding tooltip (appears on hover, kept away from rail) ---------- */
.rail-tip {
  position: absolute;
  left: calc(100% + 28px);
  top: 50%;
  transform: translateY(-50%) translateX(-10px);
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.14);
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease);
  z-index: 250;
}
[dir="rtl"] .rail-tip {
  left: auto; right: calc(100% + 28px);
  transform: translateY(-50%) translateX(10px);
}
/* tiny notch */
.rail-tip::before {
  content: '';
  position: absolute;
  left: -5px; top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 10px; height: 10px;
  background: var(--bg-3);
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
[dir="rtl"] .rail-tip::before {
  left: auto; right: -5px;
  border-left: none; border-bottom: none;
  border-right: 1px solid var(--line);
  border-top: 1px solid var(--line);
}
.rail-tip-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--gold); letter-spacing: 0.12em;
}
.rail-tip-text {
  font-family: 'Fraunces', serif;
  font-size: 16px; font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.rail-link:hover .rail-tip,
.rail-link:focus-visible .rail-tip {
  opacity: 1; pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

.rail-tools {
  display: flex; flex-direction: column;
  align-items: center;
  gap: 14px; margin-bottom: 18px;
}

/* ---------- Theme switch (toggle) ---------- */
.theme-switch {
  width: 50px; height: 26px;
  padding: 0; border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  position: relative;
  transition: all 0.4s var(--ease);
  cursor: none;
}
.theme-switch:hover { border-color: var(--gold); }
.theme-switch-track {
  position: relative;
  display: block;
  width: 100%; height: 100%;
}
.theme-switch-sun, .theme-switch-moon {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  font-size: 10px;
  transition: opacity 0.3s var(--ease), color 0.3s var(--ease);
}
.theme-switch-sun  { left: 6px;  color: var(--gold); opacity: 1; }
.theme-switch-moon { right: 6px; color: var(--ink-soft); opacity: 0.5; }
.theme-switch-knob {
  position: absolute;
  top: 50%; left: 2px;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: left 0.4s var(--ease), background 0.4s var(--ease);
}
:root[data-theme="dark"] .theme-switch { background: rgba(255,240,215,0.06); }
:root[data-theme="dark"] .theme-switch-knob { left: 26px; background: #f0e6d2; }
:root[data-theme="dark"] .theme-switch-sun  { opacity: 0.4; }
:root[data-theme="dark"] .theme-switch-moon { opacity: 1; color: var(--gold); }
.theme-switch--sm { width: 46px; height: 24px; }
.theme-switch--sm .theme-switch-knob { width: 18px; height: 18px; }
:root[data-theme="dark"] .theme-switch--sm .theme-switch-knob { left: 24px; }

/* ---------- Language hover menu (rail) ---------- */
.lang-hover { position: relative; }
.lang-current {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  color: var(--ink); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  text-transform: uppercase;
  transition: all 0.3s var(--ease);
}
.lang-current:hover { border-color: var(--gold); color: var(--gold); }
.lang-flyout {
  position: absolute;
  left: calc(100% + 14px);
  top: 50%; transform: translateY(-50%) translateX(-8px);
  display: flex; flex-direction: column;
  gap: 4px; padding: 8px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  opacity: 0; pointer-events: none;
  transition: all 0.3s var(--ease);
  min-width: 180px;
  z-index: 200;
}
[dir="rtl"] .lang-flyout { left: auto; right: calc(100% + 14px); transform: translateY(-50%) translateX(8px); }
.lang-hover:hover .lang-flyout,
.lang-hover.is-hovering .lang-flyout,
.lang-hover:focus-within .lang-flyout,
.lang-flyout.is-open { opacity: 1; pointer-events: auto; transform: translateY(-50%) translateX(0); }
.lang-opt {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  font-family: 'Manrope', sans-serif;
  color: var(--ink); text-align: left;
  transition: background 0.2s ease, color 0.2s ease;
}
.lang-opt:hover { background: var(--surface); color: var(--gold); }
.lang-opt span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  color: var(--gold); text-transform: uppercase;
  min-width: 28px;
}
.lang-opt small { font-size: 13px; }
.lang-opt.is-active { background: var(--surface); color: var(--gold); }
/* active-language check */
.lang-check { margin-left: auto; color: var(--gold); font-size: 11px; opacity: 0; transition: opacity 0.2s ease; }
[dir="rtl"] .lang-check { margin-left: 0; margin-right: auto; }
.lang-opt.is-active .lang-check { opacity: 1; }

/* ---------- Social hover menu (rail) ---------- */
.social-hover { position: relative; }
.social-current {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--ink); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s var(--ease);
}
.social-current:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.social-current i { font-size: 14px; }
.social-flyout {
  position: absolute;
  left: calc(100% + 14px);
  top: 50%; transform: translateY(-50%) translateX(-8px);
  display: flex; flex-direction: column;
  gap: 4px; padding: 8px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  opacity: 0; pointer-events: none;
  transition: all 0.3s var(--ease);
  min-width: 200px;
  z-index: 200;
  max-height: 70vh; overflow-y: auto;
}
[dir="rtl"] .social-flyout { left: auto; right: calc(100% + 14px); transform: translateY(-50%) translateX(8px); }
.social-hover:hover .social-flyout,
.social-hover.is-hovering .social-flyout,
.social-hover:focus-within .social-flyout { opacity: 1; pointer-events: auto; transform: translateY(-50%) translateX(0); }
.social-opt {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  font-family: 'Manrope', sans-serif;
  color: var(--ink); text-align: left;
  transition: background 0.2s ease, color 0.2s ease;
}
.social-opt:hover { background: var(--surface); color: var(--gold); }
.social-opt i {
  font-size: 14px; color: var(--gold);
  width: 22px; text-align: center;
}
.social-opt small { font-size: 13px; }

/* ---------- Rail tool tooltips (a small label above each tool) ---------- */
.rail-chat, .theme-btn { position: relative; }
.tool-tip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%; transform: translateX(-50%) translateY(6px);
  padding: 7px 14px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
  white-space: nowrap;
  font-family: 'Fraunces', serif; font-size: 14px; font-weight: 500;
  color: var(--ink);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.3s var(--ease);
  z-index: 260;
}
.tool-tip::after {
  content: ''; position: absolute;
  top: 100%; left: 50%; transform: translateX(-50%) rotate(45deg);
  width: 9px; height: 9px; margin-top: -5px;
  background: var(--bg-3);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.rail-chat:hover .tool-tip,
.lang-hover:hover .tool-tip,
.social-hover:hover .tool-tip,
.theme-btn:hover .tool-tip { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Circular tool button (theme, last in the rail) ---------- */
.rail-tool {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s var(--ease); cursor: none;
}
.rail-tool:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.theme-btn i { font-size: 16px; color: var(--gold); }
.theme-btn .theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-btn .theme-icon-sun  { display: none; }
:root[data-theme="dark"] .theme-btn .theme-icon-moon { display: inline; }

/* Language button shows just the current language code */
.lang-current #langCurrentCode { font-size: 16px; font-weight: 600; }
:root[lang="ar"] .lang-current #langCurrentCode { font-size: 19px; }
/* All four rail tools share one accent colour (chat · language · share · theme) */
.lang-current, .social-current, .social-current i { color: var(--gold); }

.rail-status { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rail-dot {
  width: 8px; height: 8px;
  border-radius: 50%; background: var(--gold-bright);
  box-shadow: 0 0 12px rgba(201,162,83,0.6);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}
.rail-status-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-soft);
  writing-mode: vertical-rl; transform: rotate(180deg);
}

/* ---------- Mobile language strip & socials ---------- */
.topbar-lang {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600;
  color: var(--ink); background: var(--surface);
}
.mobile-langs, .mobile-socials {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface);
  text-align: center; flex-shrink: 0;
}
.mobile-langs .mono, .mobile-socials .mono {
  color: var(--gold); display: block; margin-bottom: 12px; font-size: 12px;
}
.mobile-langs-row, .mobile-socials-row {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
}
.mobile-lang {
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: 'Manrope', sans-serif;
  font-size: 14px; font-weight: 600;
  color: var(--ink); background: var(--surface);
}
.mobile-lang.is-active { background: var(--gold-bright); color: #14100b; border-color: var(--gold); }
.mobile-socials-row a {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 16px;
  transition: all 0.3s var(--ease);
}
.mobile-socials-row a:hover, .mobile-socials-row a:active { color: var(--gold); border-color: var(--gold); }

/* =========================================================
   MOBILE TOP BAR
   ========================================================= */
/* Mobile bottom dock — the top of the page stays empty */
.mobilebar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 850;                 /* always above the menu/chat sheets */
  height: var(--dock-h); box-sizing: border-box;
  padding: 0 14px env(safe-area-inset-bottom);
  background: var(--bg);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px -18px rgba(0,0,0,0.4);
  justify-content: center; align-items: center; gap: 26px;   /* a touch more spacing */
}
.mobilebar-btn {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--gold-ink); font-size: 16px;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.mobilebar-btn:active, .mobilebar-btn.is-active { border-color: var(--gold); }
/* every dock icon shares the gold accent */
.mobilebar-btn #langCurrentCodeM { font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 600; color: var(--gold-ink); }
:root[lang="ar"] .mobilebar-btn #langCurrentCodeM { font-size: 18px; }
.theme-btn.mobilebar-btn i { color: var(--gold-ink); }
.menu-icon { width: 22px; height: 22px; display: block; }

/* A small popup floats above the dock (language · socials) */
.mobilebar-pop-wrap { position: relative; display: flex; }
.mobilebar-pop {
  position: absolute; bottom: calc(100% + 14px); left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 22px 54px rgba(0,0,0,0.28);
  padding: 10px; z-index: 160;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.3s var(--ease);
}
.mobilebar-pop.is-open { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.mobilebar-pop::after {
  content: ''; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%) rotate(45deg); margin-top: -5px;
  width: 10px; height: 10px; background: var(--bg-3);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.mobilebar-pop--lang { display: flex; flex-direction: column; gap: 4px; min-width: 156px; }
.mobilebar-pop--lang .mobile-lang {
  padding: 12px 16px; border: 0; border-radius: 10px; text-align: center;
  font-family: 'Manrope', sans-serif; font-size: 15px; font-weight: 600;
  color: var(--ink); background: none;
}
.mobilebar-pop--lang .mobile-lang.is-active { background: var(--gold-bright); color: #14100b; }
.mobilebar-pop--social { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mobilebar-pop--social a {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); color: var(--ink-soft); font-size: 16px;
}
.mobilebar-pop--social a:active { color: var(--gold); border-color: var(--gold); }

/* Mobile menu — a dimmed backdrop with a compact bottom sheet (not full-screen) */
.mobile-menu {
  display: none;
  position: fixed; inset: 0;
  background: rgba(20,12,6,0.5);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity 0.32s var(--ease);
}
.mobile-menu.is-open { opacity: 1; pointer-events: auto; }
/* the scroll-to-top control hides while the menu is open */
body.menu-open .to-top { opacity: 0 !important; pointer-events: none; transform: scale(0.8); }

.mobile-sheet {
  position: absolute; left: 0; right: 0; bottom: var(--dock-h);   /* sits on top of the dock */
  background: var(--bg);
  border-radius: 28px 28px 0 0;
  border-top: 1px solid var(--line);
  box-shadow: 0 -24px 60px -20px rgba(0,0,0,0.5);
  padding: 14px 22px 24px;
  max-height: 74vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  transform: translateY(calc(100% + var(--dock-h)));
  transition: transform 0.42s var(--ease-out);
}
.mobile-menu.is-open .mobile-sheet { transform: translateY(0); }
.mobile-sheet::before {
  content: ''; display: block; width: 46px; height: 5px; border-radius: 999px;
  background: var(--line); margin: 2px auto 2px;
}
.mobile-menu-close {
  position: absolute; top: 14px; right: 18px;
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); display: flex; align-items: center; justify-content: center;
  font-size: 24px; z-index: 3;
}
[dir="rtl"] .mobile-menu-close { right: auto; left: 18px; }
.mobile-menu-close:hover, .mobile-menu-close:active { color: var(--gold); border-color: var(--gold); }

/* Profile block — photo · name (no Bq logo) */
.mobile-menu-profile {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 6px;
  margin: 6px 0 14px;
}
.mobile-menu-photo {
  width: 76px; height: 76px; border-radius: 50%; overflow: hidden;
  border: 2px solid var(--gold);
}
.mobile-menu-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Only the NAME is set in the Liana logo font */
.mobile-menu-name { font-family: 'Liana', 'Fraunces', serif; font-weight: 400; font-size: 30px; margin: 4px 0 0; }
.mobile-menu-role { color: var(--ink-soft); }

/* Centered room titles — the normal serif heading face */
.mobile-nav {
  width: 100%; max-width: 440px;
  display: flex; flex-direction: column; align-items: stretch; gap: 6px;
  margin: 6px auto 0;
}
.mobile-link {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 13px; border-radius: 12px;
  color: var(--ink);
  font-family: 'Fraunces', serif; font-size: 24px; font-weight: 500;
  text-align: center;
}
.mobile-link i { color: var(--gold); font-size: 18px; }
.mobile-link.is-active { background: var(--surface); color: var(--gold); }
.mobile-link:active { background: var(--surface); }
/* Kurdish/Arabic: the name + titles are Arabic script — use an Arabic face
   (Liana is Latin-only, so the name falls back here too) */
:root[lang="ku"] .mobile-menu-name, :root[lang="ar"] .mobile-menu-name,
:root[lang="ku"] .mobile-link, :root[lang="ar"] .mobile-link {
  font-family: 'Noto Kufi Arabic', 'Fraunces', serif;
}

/* =========================================================
   MAIN
   ========================================================= */
.main { margin-left: var(--rail-w); min-height: 100vh; }
[dir="rtl"] .main { margin-left: 0; margin-right: var(--rail-w); }

.room.is-hidden { display: none; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  height: 100vh; min-height: 680px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: var(--bg);
}
.hero-letterbox {
  position: absolute; left: 0; right: 0;
  height: 64px; background: var(--ink); z-index: 5;
  animation: letterboxOpen 1.6s var(--ease-out) 0.3s both;
}
:root[data-theme="dark"] .hero-letterbox { background: #000; }
.hero-letterbox--top { top: 0; transform-origin: top; }
.hero-letterbox--bottom { bottom: 0; transform-origin: bottom; }
@keyframes letterboxOpen {
  0% { transform: scaleY(0); } 40% { transform: scaleY(1); } 100% { transform: scaleY(1); }
}

.hero-radial {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(201,162,83,0.18), transparent 70%),
    radial-gradient(ellipse 100% 80% at 50% 100%, rgba(90,26,26,0.12), transparent 60%);
  animation: breathe 8s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.85; }
}

.hero-meta { position: absolute; z-index: 6; opacity: 0; animation: fadeIn 1s ease 1.6s forwards; }
.hero-meta .mono { color: var(--gold); display: block; }
.hero-meta i { margin-right: 6px; }
.hero-meta--tl { top: 22px; left: 32px; }
.hero-meta--tr { top: 22px; right: 32px; text-align: right; }
.hero-meta--bl { bottom: 22px; left: 32px; display: flex; gap: 18px; }
.hero-meta--br { bottom: 22px; right: 32px; }
@keyframes fadeIn { to { opacity: 1; } }

.hero-inner { text-align: center; padding: 0 32px; z-index: 4; position: relative; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 28px;
  color: var(--ink-soft) !important;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 1.4s forwards;
}
.hero-eyebrow i { color: var(--gold); }
.hero-hello {
  font-family: 'Fraunces', serif;
  font-style: italic; font-weight: 400;
  font-size: clamp(22px, 3vw, 34px);
  color: var(--ink-soft);
  margin-bottom: 4px; letter-spacing: -0.01em;
  opacity: 0; animation: fadeUp 1s var(--ease-out) 0.7s forwards;
}
.hero-hello::after { content: ' \1F44B'; }
.hero-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(60px, 14vw, 190px);
  line-height: 0.88; letter-spacing: -0.04em;
  color: var(--ink);
}
.hero-line {
  display: block; overflow: hidden;
  opacity: 0; transform: translateY(120%);
  animation: lineRise 1.4s var(--ease-out) forwards;
}
.hero-line--1 { animation-delay: 0.9s; }
.hero-line--2 { animation-delay: 1.1s; font-style: italic; color: var(--ember); }
:root[data-theme="dark"] .hero-line--2 { color: var(--gold); }
@keyframes lineRise { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.hero-marquee {
  width: min(720px, 86vw); margin: 104px auto 0; overflow: hidden;
  direction: ltr;                 /* whole component LTR so the track fills the band in RTL */
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  padding: 16px 0; opacity: 0;
  animation: fadeIn 1s ease 1.8s forwards;
  /* fade edges so items never hard-cut at the seam */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
/* gap:0 + per-separator margins → each [disc + sep] is an identical repeating
   unit, so translateX(-50%) lands seamlessly (no half-gap jump at the loop). */
.hero-marquee-track {
  display: flex; gap: 0; white-space: nowrap;
  width: max-content;
  direction: ltr;                 /* keep the seamless loop identical in RTL */
  animation: marquee 38s linear infinite;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-soft);
  will-change: transform;
}
.hero-disc { unicode-bidi: isolate; }
.hero-marquee-track i { margin-right: 6px; color: var(--gold); }
.hero-marquee-track span:nth-child(even) { color: var(--gold); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* hero services tagline (Design • Printing • Advertising · AI) */
.hero-services {
  margin-top: 22px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px;
  opacity: 0; animation: fadeIn 1s ease 2s forwards;
}
.hero-services-main { color: var(--ink-soft); font-size: 12px; letter-spacing: 0.16em; }
.hero-services-ai {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--gold); font-size: 12px; letter-spacing: 0.14em;
  padding: 6px 13px; border: 1px solid rgba(201,162,83,0.45); border-radius: 999px;
}
.hero-services-ai i { font-size: 11px; }
@media (max-width: 560px) { .hero-services { flex-direction: column; gap: 10px; margin-top: 18px; } }

/* =========================================================
   ROOM HERO — a classy intro at the top of each room
   ========================================================= */
.room-hero {
  position: relative;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 96px var(--pad-x);
  overflow: hidden;
}
/* breathing radial wash, like the main hero */
.room-hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% 45%, rgba(201,162,83,0.14), transparent 70%),
    radial-gradient(ellipse 100% 80% at 50% 100%, rgba(90,26,26,0.10), transparent 60%);
  animation: breathe 8s ease-in-out infinite;
}
:root[data-theme="dark"] .room-hero::before {
  background:
    radial-gradient(ellipse 80% 60% at 50% 45%, rgba(201,162,83,0.10), transparent 70%),
    radial-gradient(ellipse 100% 80% at 50% 100%, rgba(201,162,83,0.06), transparent 60%);
}
/* thin letterbox rules top & bottom */
.room-hero::after {
  content: ''; position: absolute; left: var(--pad-x); right: var(--pad-x); top: 70px; height: 1px;
  background: var(--line-soft); z-index: 0;
}
/* corner meta */
.room-hero-corner {
  position: absolute; z-index: 2;
  font-size: 9px; letter-spacing: 0.18em; color: var(--ink-muted);
  display: inline-flex; align-items: center; gap: 8px;
}
.room-hero-corner i { color: var(--gold); }
.room-hero-corner--tr { top: 30px; right: var(--pad-x); }
.room-hero-corner--bl { bottom: 32px; left: var(--pad-x); }
[dir="rtl"] .room-hero-corner--tr { right: auto; left: var(--pad-x); }
[dir="rtl"] .room-hero-corner--bl { left: auto; right: var(--pad-x); }
@media (max-width: 820px) { .room-hero-corner { font-size: 8px; } .room-hero-corner--bl { display: none; } }
.room-hero-return {
  position: absolute; top: 28px; left: var(--pad-x);
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-soft); padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px;
  transition: all 0.3s var(--ease);
}
[dir="rtl"] .room-hero-return { left: auto; right: var(--pad-x); }
[dir="rtl"] .room-hero-return i { transform: scaleX(-1); }
.room-hero-return:hover { border-color: var(--gold); color: var(--gold); gap: 14px; }
.room-hero-inner { position: relative; z-index: 2; }
.room-hero-ghost {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -54%);
  font-family: 'Fraunces', serif; font-style: italic; font-weight: 600;
  font-size: clamp(220px, 36vw, 460px); line-height: 0.8;
  color: var(--ink); opacity: 0.05; z-index: -1; pointer-events: none; white-space: nowrap;
}
:root[data-theme="dark"] .room-hero-ghost { color: var(--gold); opacity: 0.06; }
.room-hero-num { color: var(--gold) !important; display: inline-block; margin-bottom: 22px; }
.room-hero-title {
  font-family: 'Fraunces', serif; font-weight: 500;
  font-size: clamp(56px, 9vw, 128px); line-height: 0.96; letter-spacing: -0.03em;
  color: var(--ink); margin-bottom: 24px;
}
.room-hero-title em { font-style: italic; color: var(--ember); }
:root[data-theme="dark"] .room-hero-title em { color: var(--gold); }
.room-hero-sub { font-size: clamp(15px, 1.5vw, 19px); color: var(--ink-soft); line-height: 1.6; max-width: 560px; margin: 0 auto; }
.room-hero-scroll {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.room-hero-scroll .mono { font-size: 9px; letter-spacing: 0.2em; color: var(--ink-muted); text-transform: uppercase; }
.room-hero-scroll-line { width: 1px; height: 48px; background: var(--line); position: relative; overflow: hidden; }
.room-hero-scroll-line::after {
  content: ''; position: absolute; top: -50%; left: 0; width: 100%; height: 50%;
  background: var(--gold-bright); animation: scrollCue 2s ease-in-out infinite;
}
@keyframes scrollCue { 0% { top: -50%; } 60%,100% { top: 100%; } }
@media (max-width: 1100px) {
  .room-hero-ghost { font-size: clamp(180px, 40vw, 360px); }
}
@media (max-width: 820px) {
  .room-hero { min-height: 64vh; padding: 96px var(--pad-x) 80px; }
  .room-hero-return { top: 84px; padding: 9px 14px; }
  .room-hero-return span { display: none; }
  .room-hero-title { font-size: clamp(44px, 13vw, 88px); }
  .room-hero-ghost { font-size: clamp(150px, 52vw, 280px); }
  .room-hero-sub { font-size: 14px; padding: 0 6px; }
}
@media (max-width: 480px) {
  .room-hero { min-height: 58vh; }
  .room-hero-num { font-size: 8px; }
  .room-hero-scroll { bottom: 18px; }
  .room-hero-scroll-line { height: 36px; }
}

/* ---------- Pencemor — second hero (refined / international) ---------- */
.pencemor-hero {
  position: relative; min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 110px var(--pad-x);
  overflow: hidden;
  border-top: 1px solid var(--line-soft);
}
/* faint fingerprint watermark, set in the background */
.pencemor-watermark {
  position: absolute; top: 50%; left: 50%;
  width: min(880px, 98vw); height: auto;
  transform: translate(-50%, -50%);
  filter: grayscale(100%);
  opacity: 0.06; z-index: 0; pointer-events: none; user-select: none;
}
:root[data-theme="dark"] .pencemor-watermark { filter: grayscale(100%) invert(1); opacity: 0.07; }
.pencemor-hero-tl, .pencemor-hero-tr {
  position: absolute; top: 40px; z-index: 2;
  font-size: 9px; letter-spacing: 0.18em; color: var(--ink-muted);
}
.pencemor-hero-tl { left: var(--pad-x); }
.pencemor-hero-tr { right: var(--pad-x); }
[dir="rtl"] .pencemor-hero-tl { left: auto; right: var(--pad-x); }
[dir="rtl"] .pencemor-hero-tr { right: auto; left: var(--pad-x); }

.pencemor-hero-inner { position: relative; z-index: 1; max-width: 540px; display: flex; flex-direction: column; align-items: center; }
.pencemor-hero-mark {
  width: 230px; height: auto; margin-bottom: 10px;
  filter: grayscale(100%); opacity: 0.62;
  transition: opacity 0.3s var(--ease);
}
:root[data-theme="dark"] .pencemor-hero-mark { filter: grayscale(100%) invert(1); opacity: 0.55; }
@media (max-width: 820px) { .pencemor-hero-mark { width: 170px; } }
.pencemor-hero-eyebrow { color: var(--gold) !important; letter-spacing: 0.34em; font-size: 10px; margin-bottom: 16px; padding-left: 0.34em; }
.pencemor-hero-name {
  font-family: 'Fraunces', serif; font-weight: 400;
  font-size: clamp(58px, 9vw, 120px); line-height: 0.9; letter-spacing: -0.03em;
  color: var(--ink);
}
.pencemor-hero-rule { display: block; width: 44px; height: 1px; background: var(--gold-bright); margin: 26px 0; }
.pencemor-hero-tag {
  font-family: 'Fraunces', serif; font-style: italic;
  font-size: clamp(18px, 2.2vw, 26px); line-height: 1.45; color: var(--ink); max-width: 460px;
  margin-bottom: 18px;
}
.pencemor-hero-tag em { color: var(--ember); }
:root[data-theme="dark"] .pencemor-hero-tag em { color: var(--gold); }
.pencemor-hero-desc { font-size: 14px; line-height: 1.75; color: var(--ink-soft); max-width: 420px; margin-bottom: 30px; }

.pencemor-hero-social { display: flex; gap: 12px; margin-bottom: 34px; }
.pencemor-hero-social a {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); color: var(--ink-soft); font-size: 15px;
  transition: all 0.3s var(--ease);
}
.pencemor-hero-social a:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-3px); }

.pencemor-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.pencemor-hero-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px; border-radius: 999px; cursor: pointer;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  transition: all 0.3s var(--ease);
}
.pencemor-hero-btn--primary { background: var(--ink); color: var(--bg); border: 1px solid var(--ink); }
.pencemor-hero-btn--primary:hover { background: var(--ember); border-color: var(--ember); }
:root[data-theme="dark"] .pencemor-hero-btn--primary { background: var(--gold-bright); color: #14100b; border-color: var(--gold); }
:root[data-theme="dark"] .pencemor-hero-btn--primary:hover { background: var(--gold-deep); }
.pencemor-hero-btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.pencemor-hero-btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
@media (max-width: 820px) {
  .pencemor-hero { min-height: 88vh; padding: 92px var(--pad-x) 72px; }
  .pencemor-hero-tl, .pencemor-hero-tr { font-size: 8px; top: 30px; }
  .pencemor-hero-actions { width: 100%; flex-direction: column; }
  .pencemor-hero-btn { width: 100%; justify-content: center; }
}

/* =========================================================
   SECTIONS — shared
   ========================================================= */
.section { padding: 120px var(--pad-x) 100px; position: relative; }
.section-head { max-width: 920px; margin-bottom: 64px; }
.section-num { display: inline-flex; align-items: center; color: var(--gold-ink) !important; margin-bottom: 24px; }
.section-num i { font-size: 14px; }
.section-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(36px, 5.5vw, 70px);
  font-weight: 400; line-height: 1.04; letter-spacing: -0.025em;
}
.section-lede {
  margin-top: 22px;
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--ink-soft); max-width: 620px; line-height: 1.6;
}

/* =========================================================
   TABS — 2 rows of 6, underline indicator
   ========================================================= */
.tabs-wrap { margin-bottom: 0; }
.tabs {
  display: flex;
  flex-direction: column;
  background: transparent;
}
.tabs-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.tab {
  position: relative;
  padding: 17px 10px 20px;
  font-family: 'Manrope', sans-serif;
  font-size: 13px; font-weight: 500;
  color: var(--ink-muted);
  background: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-align: center;
  border-radius: 0; border: none;
  transition: color 0.25s ease;
  overflow: hidden;
}
.tab i { color: var(--gold); font-size: 13px; flex-shrink: 0; transition: transform 0.3s var(--ease); }
.tab-label { transition: opacity 0.25s ease; }

/* underline indicator — expands from center */
.tab::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 50%; right: 50%;
  height: 2px;
  background: var(--gold-bright);
  border-radius: 2px 2px 0 0;
  transition: left 0.38s cubic-bezier(.22,1,.36,1),
              right 0.38s cubic-bezier(.22,1,.36,1),
              height 0.25s ease,
              opacity 0.25s ease;
  opacity: 0;
}
.tab:hover { color: var(--ink); }
.tab:hover i { transform: scale(1.12); }
.tab:hover::after {
  left: 18%; right: 18%;
  height: 2px; opacity: 1;
}
.tab.is-active { color: var(--ink); }
.tab.is-active::after {
  left: 0; right: 0;
  height: 3px; opacity: 1;
}
.tab-count { display: none; }
.tab-underline { display: none; }

/* ── Tab header (changes per active tab) ── */
.tab-header {
  padding: 36px 0 44px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 56px;
  overflow: hidden;
}
.tab-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
}
.tab-header-left { flex: 1; min-width: 0; }
.tab-header-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 500; line-height: 1;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 14px;
  will-change: transform, opacity;
  transition: opacity 0.4s ease, transform 0.4s var(--ease-out);
}
.tab-header-title.anim-out { opacity: 0; transform: translateY(14px); }
.tab-header-title.anim-in  { opacity: 1; transform: translateY(0); }
.tab-header-desc {
  font-size: clamp(14px, 1.2vw, 16px);
  color: var(--ink-soft); line-height: 1.65;
  max-width: 560px; margin-bottom: 12px;
}
.tab-header-note { color: var(--gold-ink) !important; }
.tab-header-right { flex-shrink: 0; text-align: right; }
.tab-header-ghost::after { content: attr(data-ghost); }
.tab-header-ghost {
  font-family: 'Fraunces', serif;
  font-size: clamp(80px, 10vw, 140px);
  font-weight: 600; line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--ink);
  opacity: 0.06;
  font-style: italic;
  display: block;
  transition: opacity 0.4s ease;
  white-space: nowrap;
}

/* ── Load More ── */
.load-more-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 64px 0 0;
}
.load-more-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%; max-width: 480px;
}
.load-more-info {
  color: var(--ink-soft) !important;
  font-size: 10px; letter-spacing: 0.2em;
  text-align: center;
}
.load-more-bar {
  width: 100%; height: 1px;
  background: var(--line);
  position: relative; overflow: hidden;
}
.load-more-fill {
  position: absolute; left: 0; top: 0; height: 100%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
  transition: width 0.8s var(--ease-out);
}
.load-more-btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 17px 40px;
  border: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-soft);
  border-radius: 2px; cursor: pointer;
  transition: all 0.35s var(--ease);
}
.load-more-btn:hover {
  border-color: var(--gold); color: var(--ink);
  background: rgba(201,162,83,0.06); gap: 20px;
}
.load-more-btn i { font-size: 12px; color: var(--gold); transition: transform 0.35s var(--ease); }
.load-more-btn:hover i { transform: translateY(3px); }
/* show-more + show-less side by side */
.load-more-actions { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.load-less-btn:hover i { transform: translateY(-3px); }
.load-collapse-btn {
  margin-top: 4px;
  padding: 8px 18px;
  border: 0; background: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-soft); cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.load-collapse-btn:hover { color: var(--gold); border-bottom-color: var(--gold); }

/* =========================================================
   GRID + CARDS
   ========================================================= */
/* JS masonry — flex row of columns; cards stack inside each column.
   New cards append to the shortest column → "load more" always adds below. */
.grid { display: flex; align-items: flex-start; gap: 8px; }
.grid-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
/* span classes kept for non-gallery sections */
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; }

.card { position: relative; display: flex; flex-direction: column; cursor: none; }
.card--photo {
  display: block;
  width: 100%;
  cursor: zoom-in;   /* clear, visible cursor over images */
}
.card--photo * { cursor: zoom-in; }
.card.is-hidden { display: none; }
.card-art {
  width: 100%;
  overflow: hidden; border-radius: 0;
  background: var(--ink);
  transition: transform 0.6s var(--ease-out);
}
.card-art svg { width: 100%; height: 100%; transition: transform 0.8s var(--ease-out); }
.card:hover .card-art svg { transform: scale(1.04); }
.card:hover .card-art { transform: translateY(-4px); }

.card-meta { display: flex; flex-direction: column; gap: 6px; padding-top: 18px; }
.card-tag { color: var(--gold) !important; display: inline-flex; align-items: center; gap: 6px; }
.card-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(20px, 1.6vw, 26px);
  font-weight: 500; letter-spacing: -0.01em; margin-top: 4px;
}
.card-desc { color: var(--ink-soft); font-size: 14px; margin-top: 4px; max-width: 460px; line-height: 1.5; }
.card-year { margin-top: 8px; color: var(--ink-soft) !important; }

/* Gallery loading spinner */
.gallery-loading {
  column-span: all;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 80px 0; color: var(--ink-muted);
}
.gallery-loading i { font-size: 22px; color: var(--gold); }
.gallery-loading span { font-size: 11px; letter-spacing: 0.18em; }

/* Photo gallery cards — tight grid, hover overlay */
.card-art--photo {
  position: relative;
  overflow: hidden;
  display: block; line-height: 0;
}
.card-art--photo img {
  width: 100%; height: auto; display: block;
  transition: transform 0.5s var(--ease-out);
}
.card-art--photo video {
  width: 100%; height: auto; display: block;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.card--photo:hover .card-art--photo img,
.card--photo:hover .card-art--photo video { transform: scale(1.035); }

/* Hover overlay with meta info */
.card-meta--ov {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 48px 10px 10px;
  background: linear-gradient(to top,
    rgba(10,6,2,0.92) 0%,
    rgba(10,6,2,0.5) 55%,
    transparent 100%);
  display: flex; flex-direction: column; gap: 3px;
  opacity: 0; transform: translateY(5px);
  transition: opacity 0.24s ease, transform 0.26s var(--ease-out);
  pointer-events: none;
}
.card--photo:hover .card-meta--ov { opacity: 1; transform: none; }

.card-meta--ov .card-tag {
  color: rgba(201,162,83,0.92) !important;
  font-size: 10.5px; letter-spacing: 0.14em;
  display: inline-flex; align-items: center; gap: 5px;
}
.card-meta--ov .card-title {
  font-family: 'Fraunces', serif;
  font-size: 15px; font-weight: 500; line-height: 1.2;
  color: rgba(240,230,210,0.96) !important; margin: 0;
}
.card-zoom-icon {
  position: absolute; top: 8px; right: 8px;
  width: 27px; height: 27px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(201,162,83,0.45); border-radius: 50%;
  color: var(--gold); font-size: 10px;
  background: rgba(10,6,2,0.5);
}
.card-zoom { display: none; }

/* Lightbox */
.lb-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 6, 2, 0.94);
  z-index: 5000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.lb-overlay.is-open { opacity: 1; pointer-events: auto; }
.lb-img-wrap {
  position: relative;
  max-width: min(90vw, 1200px);
  max-height: 90vh;
  display: flex; align-items: center; justify-content: center;
}
.lb-img-wrap img {
  max-width: 100%; max-height: 90vh;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.7);
  transition: opacity 0.2s ease;
}
.lb-close {
  position: absolute; top: -48px; right: 0;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 18px;
  border: 1px solid rgba(201,162,83,0.4); border-radius: 50%;
  background: transparent; cursor: pointer;
  transition: all 0.2s var(--ease);
}
.lb-close:hover { background: var(--gold-bright); color: #14100b; }
.lb-prev, .lb-next {
  position: fixed; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 16px;
  border: 1px solid rgba(201,162,83,0.3); border-radius: 50%;
  background: rgba(10,6,2,0.6); cursor: pointer;
  transition: all 0.2s var(--ease);
}
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-prev:hover, .lb-next:hover { background: var(--gold-bright); color: #14100b; border-color: var(--gold); }
.lb-caption {
  position: absolute; bottom: -38px; left: 0; right: 0;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(201,162,83,0.75);
}
@media (max-width: 820px) {
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
  .lb-prev, .lb-next { width: 38px; height: 38px; }
}

/* =========================================================
   BLOG
   ========================================================= */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.blog-card {
  padding: 36px 28px;
  border: 1px solid var(--line);
  background: var(--card-bg);
  display: flex; flex-direction: column; gap: 14px;
  transition: transform 0.4s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.blog-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.blog-meta { display: inline-flex; align-items: center; gap: 10px; color: var(--gold) !important; }
.blog-meta i { font-size: 10px; }
.blog-card h3 {
  font-family: 'Fraunces', serif;
  font-size: 26px; font-weight: 500; line-height: 1.2;
  font-style: italic;
}
.blog-card p { color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.blog-more {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink); font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  border-bottom: 1px solid var(--gold-soft);
  padding-bottom: 4px; align-self: flex-start;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.blog-more:hover { color: var(--gold); border-bottom-color: var(--gold); }

/* =========================================================
   INDEX LAYOUT (interactive list + hover preview)
   ========================================================= */
.index-layout {
  display: grid;
  grid-template-columns: 1fr 0.92fr;
  gap: 64px;
  align-items: start;
  position: relative;
}

/* ── Left: numbered list ── */
.index-list {
  position: relative;
  border-top: 1px solid var(--line);
}
.index-ghost {
  position: absolute;
  top: 40%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Fraunces', serif;
  font-size: clamp(220px, 30vw, 420px);
  font-weight: 600; font-style: italic;
  line-height: 0.8;
  color: var(--ember);
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.5s var(--ease);
  white-space: nowrap;
}
:root[data-theme="dark"] .index-ghost { color: var(--gold); opacity: 0.05; }

.index-row {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: baseline;
  gap: 20px;
  padding: 30px 8px;
  border-bottom: 1px solid var(--line);
  transition: padding 0.4s var(--ease), background 0.4s var(--ease);
}
.index-row-num {
  color: var(--ink-muted) !important;
  font-size: 10px;
  transition: color 0.3s var(--ease);
}
.index-row-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 500; line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink-soft);
  transition: color 0.35s var(--ease), transform 0.4s var(--ease), font-style 0.3s;
}
.index-row-tag {
  color: var(--ink-muted) !important;
  font-size: 9px;
  opacity: 0; transform: translateX(-8px);
  transition: opacity 0.35s var(--ease), transform 0.4s var(--ease), color 0.3s;
}
[dir="rtl"] .index-row-tag { transform: translateX(8px); }

.index-row:hover,
.index-row.is-active {
  padding-left: 24px;
  background: linear-gradient(90deg, rgba(201,162,83,0.05), transparent 60%);
}
[dir="rtl"] .index-row:hover,
[dir="rtl"] .index-row.is-active { padding-left: 8px; padding-right: 24px; }
.index-row:hover .index-row-title,
.index-row.is-active .index-row-title {
  color: var(--ember); font-style: italic;
}
:root[data-theme="dark"] .index-row:hover .index-row-title,
:root[data-theme="dark"] .index-row.is-active .index-row-title { color: var(--gold); }
.index-row:hover .index-row-num,
.index-row.is-active .index-row-num { color: var(--gold) !important; }
.index-row:hover .index-row-tag,
.index-row.is-active .index-row-tag { opacity: 1; transform: none; color: var(--gold) !important; }

/* ── Right: sticky preview card ── */
.index-preview {
  position: sticky;
  top: 80px;
  align-self: start;
}
.index-card {
  position: relative;
  min-height: 540px;
  padding: 38px 36px;
  background: #1a2740;
  color: #f0e6d2;
  display: flex; flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: background 0.6s var(--ease);
}
.index-card-top { flex-shrink: 0; }
.index-card-vol {
  display: block;
  color: rgba(240,230,210,0.55) !important;
  font-size: 10px; letter-spacing: 0.25em;
  margin-bottom: 16px;
}
.index-card-rule {
  display: block; height: 1px;
  background: rgba(240,230,210,0.18);
}
.index-card-body {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: 28px 0;
}
.index-card-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(34px, 4vw, 58px);
  font-weight: 500; line-height: 0.98;
  letter-spacing: -0.025em;
  color: #f4ecd9;
  margin-bottom: 20px;
  transition: opacity 0.4s ease, transform 0.4s var(--ease-out);
}
.index-card-title .hl { color: var(--gold); font-style: italic; }
.index-card-sub {
  font-family: 'Fraunces', serif;
  font-size: clamp(15px, 1.4vw, 18px);
  font-style: italic;
  color: rgba(240,230,210,0.75);
  line-height: 1.5;
  max-width: 90%;
  transition: opacity 0.4s ease;
}
.index-card-foot {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 20px;
}
.index-card-box {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px;
  background: rgba(240,230,210,0.06);
  border: 1px solid rgba(240,230,210,0.12);
}
.index-card-no {
  font-family: 'Fraunces', serif;
  font-size: 30px; font-weight: 600;
  color: var(--gold);
}
.index-card-read {
  font-family: 'Fraunces', serif;
  font-size: 15px; line-height: 1.05;
  color: rgba(240,230,210,0.85);
}
.index-card-read em { color: var(--gold); font-size: 13px; }
.index-card-meta { text-align: right; }
.index-card-meta .mono {
  display: block;
  color: rgba(240,230,210,0.5) !important;
  font-size: 9px; letter-spacing: 0.18em;
  margin-bottom: 10px;
}
.index-card-big {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 3vw, 42px);
  font-style: italic; font-weight: 500;
  color: #f4ecd9;
}
/* fade animation when content swaps */
.index-card.swapping .index-card-title,
.index-card.swapping .index-card-sub,
.index-card.swapping .index-card-icon { opacity: 0; transform: translateY(8px); }

/* Honor card variant — icon + full-width meta */
.index-card-icon {
  font-size: 38px; color: var(--gold);
  margin-bottom: 24px; display: block;
  transition: opacity 0.4s ease, transform 0.4s var(--ease-out);
}
.index-card-meta--full { width: 100%; display: flex; justify-content: space-between; align-items: flex-end; }
.index-card--honor .index-card-big { color: var(--gold); }

/* =========================================================
   BIOGRAPHY
   ========================================================= */
.bio-block { margin-bottom: 80px; }

/* =========================================================
   BIO — stacking cards (each topic is a card; they pile up on scroll)
   ========================================================= */
.bio-stack { position: relative; }
@media (min-width: 821px) {
  .bio-stack > .bio-block {
    position: sticky;
    margin: 0 0 26px;
    padding: 34px clamp(28px, 3.5vw, 52px);
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 -14px 50px -28px rgba(26,15,8,0.5), 0 30px 60px -40px rgba(0,0,0,0.35);
    /* every card is exactly the same height so the stack is even */
    height: min(84vh, 800px);
    overflow: hidden;
  }
  /* social cards already use a horizontal flex — keep it centred in the tall card */
  .bio-stack > .bio-social { align-items: center; }
  /* compact the experience timeline so it fits one card */
  .bio-stack .timeline { padding-left: 26px; }
  .bio-stack .tl-item { padding-bottom: 14px; }
  .bio-stack .tl-card { padding: 15px 18px; }
  .bio-stack .tl-head { margin-bottom: 3px; }
  .bio-stack .tl-head h4 { font-size: 18px; }
  .bio-stack .tl-org, .bio-stack .tl-loc { font-size: 12.5px; margin-top: 2px; }
  .bio-stack .tl-desc { font-size: 12.5px; margin-top: 6px; line-height: 1.5; }
  .bio-stack .tl-skills { margin-top: 8px; padding-top: 8px; font-size: 11px; }
  .bio-stack .tl-dot { width: 14px; height: 14px; top: 16px; }
  .bio-stack .bio-block-title { margin-bottom: 22px; padding-bottom: 12px; }
  :root[data-theme="dark"] .bio-stack > .bio-block { background: var(--bg-2); }
  /* incremental tops → a small peek of each stacked card */
  .bio-stack > .bio-block:nth-child(1) { top: 86px; }
  .bio-stack > .bio-block:nth-child(2) { top: 98px; }
  .bio-stack > .bio-block:nth-child(3) { top: 110px; }
  .bio-stack > .bio-block:nth-child(4) { top: 122px; }
  .bio-stack > .bio-block:nth-child(5) { top: 134px; }
  .bio-stack > .bio-block:nth-child(6) { top: 146px; }
  .bio-stack > .bio-block:nth-child(7) { top: 158px; }
  .bio-stack > .bio-block:nth-child(8) { top: 170px; }
  .bio-stack > .bio-block:nth-child(9) { top: 182px; }
  .bio-stack > .bio-block:nth-child(10) { top: 194px; }
  .bio-stack > .bio-block:last-child { margin-bottom: 0; }
  /* the honours index inside a card: drop its own sticky to avoid nesting */
  .bio-stack .index-preview { position: relative; top: 0; align-self: stretch; }
  .bio-stack .bio-block-title { margin-top: 0; }
}
/* Mobile: the biography topics stack and pile on top of each other on scroll */
@media (max-width: 820px) {
  .bio-stack { display: block; position: relative; }
  .bio-stack > .bio-block {
    position: sticky;
    margin: 0 0 16px;
    padding: 24px 20px;
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 -8px 30px -22px rgba(26,15,8,0.5), 0 26px 50px -34px rgba(0,0,0,0.5);
    /* a fixed (viewport-stable) height avoids the resize jump while scrolling */
    height: min(72vh, 560px);
    overflow: hidden;
  }
  :root[data-theme="dark"] .bio-stack > .bio-block { background: var(--bg-2); }
  .bio-stack > .bio-social { align-items: center; text-align: center; }
  /* compact the timeline so the experience card fits */
  .bio-stack .timeline { padding-left: 22px; }
  .bio-stack .tl-item { padding-bottom: 12px; }
  .bio-stack .tl-card { padding: 13px 15px; }
  .bio-stack .tl-head h4 { font-size: 16px; }
  .bio-stack .tl-org, .bio-stack .tl-loc, .bio-stack .tl-desc { font-size: 12px; margin-top: 2px; }
  .bio-stack .tl-skills { margin-top: 7px; padding-top: 7px; font-size: 10.5px; }
  .bio-stack .index-preview { position: relative; top: 0; }
  /* incremental tops → each pile keeps a small peek of the one beneath */
  .bio-stack > .bio-block:nth-child(1) { top: 24px; }
  .bio-stack > .bio-block:nth-child(2) { top: 30px; }
  .bio-stack > .bio-block:nth-child(3) { top: 36px; }
  .bio-stack > .bio-block:nth-child(4) { top: 42px; }
  .bio-stack > .bio-block:nth-child(5) { top: 48px; }
  .bio-stack > .bio-block:nth-child(6) { top: 54px; }
  .bio-stack > .bio-block:nth-child(7) { top: 60px; }
  .bio-stack > .bio-block:nth-child(8) { top: 66px; }
  .bio-stack > .bio-block:nth-child(9) { top: 72px; }
  .bio-stack > .bio-block:nth-child(10) { top: 78px; }
  .bio-stack > .bio-block:last-child { margin-bottom: 0; }
}

/* Work-philosophy intro card */
.bio-philosophy { position: relative; overflow: hidden; }
.bio-philosophy::before {
  content: '\201C'; position: absolute; top: -30px; right: 24px;
  font-family: 'Fraunces', serif; font-size: 200px; line-height: 1;
  color: var(--gold); opacity: 0.07; pointer-events: none;
}
[dir="rtl"] .bio-philosophy::before { right: auto; left: 24px; }
.bio-phil-eyebrow { color: var(--gold) !important; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.bio-phil-label { font-family: 'Fraunces', serif; font-size: clamp(30px, 4vw, 50px); font-weight: 500; line-height: 1; margin-bottom: 24px; }
.bio-phil-label em { font-style: italic; color: var(--ember); }
:root[data-theme="dark"] .bio-phil-label em { color: var(--gold); }
.bio-phil-quote {
  font-family: 'Fraunces', serif; font-style: italic;
  font-size: clamp(18px, 2vw, 24px); line-height: 1.5;
  color: var(--ink); border-left: 2px solid var(--gold);
  padding: 4px 0 4px 22px; margin: 0 0 26px; max-width: 760px;
}
[dir="rtl"] .bio-phil-quote { border-left: none; border-right: 2px solid var(--gold); padding: 4px 22px 4px 0; }
.bio-phil-text { columns: 2; column-gap: 40px; max-width: 880px; }
.bio-phil-text p { color: var(--ink-soft); font-size: 14px; line-height: 1.7; margin-bottom: 14px; break-inside: avoid; }
.bio-phil-sign { font-family: 'Liana', 'Fraunces', serif; font-size: 32px; color: var(--ink); display: inline-block; margin-top: 18px; }
@media (max-width: 760px) { .bio-phil-text { columns: 1; } }

/* Social stacking cards (LinkedIn / Behance) — vertical, centred, fills the tall card */
.bio-social {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 0;
  text-decoration: none; position: relative; overflow: hidden;
  --brand: var(--gold);
}
.bio-social--linkedin { --brand: #0a66c2; }
.bio-social--behance  { --brand: #1769ff; }
/* huge faint brand glyph fills the empty space */
.bio-social::before {
  font-family: 'Font Awesome 6 Brands'; font-weight: 400;
  position: absolute; z-index: 0; right: -8%; bottom: -22%;
  font-size: 56vh; line-height: 0.8; color: var(--brand);
  opacity: 0.05; pointer-events: none;
  transition: opacity 0.45s var(--ease), transform 0.6s var(--ease);
}
.bio-social--linkedin::before { content: '\f0e1'; }
.bio-social--behance::before  { content: '\f1b4'; }
.bio-social:hover::before { opacity: 0.08; transform: scale(1.04) rotate(-3deg); }
.bio-social:hover { border-color: var(--brand); }
.bio-social-mark {
  position: relative; z-index: 1; flex-shrink: 0;
  width: 104px; height: 104px; border-radius: 26px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; font-size: 46px;
  margin-bottom: 30px;
  box-shadow: 0 24px 50px -16px color-mix(in srgb, var(--brand) 55%, transparent);
  transition: transform 0.45s var(--ease);
}
.bio-social:hover .bio-social-mark { transform: scale(1.06) rotate(-4deg); }
.bio-social-text { position: relative; z-index: 1; max-width: 460px; }
.bio-social-eyebrow { color: var(--brand) !important; font-size: 10px; letter-spacing: 0.2em; display: block; margin-bottom: 12px; }
.bio-social-title { font-family: 'Fraunces', serif; font-size: clamp(32px, 4vw, 48px); font-weight: 500; line-height: 1.04; margin-bottom: 16px; }
.bio-social-title em { font-style: italic; color: var(--brand); }
.bio-social-desc { color: var(--ink-soft); font-size: 15px; line-height: 1.65; margin: 0 auto 14px; }
.bio-social-handle { color: var(--ink-muted) !important; font-size: 11px; letter-spacing: 0.1em; }
.bio-social-go {
  position: relative; z-index: 1; flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 10px; margin-top: 30px;
  padding: 15px 30px; border: 1px solid var(--brand); border-radius: 999px;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brand);
  transition: all 0.3s var(--ease);
}
.bio-social-go i { transition: transform 0.3s var(--ease); }
.bio-social:hover .bio-social-go { background: var(--brand); color: #fff; gap: 14px; }
.bio-social:hover .bio-social-go i { transform: translate(2px, -2px); }
@media (max-width: 760px) {
  .bio-social-mark { width: 84px; height: 84px; font-size: 38px; }
}

/* faint icon watermark to fill the lower whitespace of each card */
@media (min-width: 821px) {
  .bio-stack > .bio-block[data-wm] { position: sticky; }
  .bio-stack > .bio-block[data-wm]::after {
    content: attr(data-wm);
    font-family: 'Font Awesome 6 Free'; font-weight: 900;
    position: absolute; right: -2%; bottom: -14%; z-index: 0;
    font-size: 42vh; line-height: 0.8; color: var(--gold);
    opacity: 0.045; pointer-events: none;
  }
  [dir="rtl"] .bio-stack > .bio-block[data-wm]::after { right: auto; left: -2%; }
  .bio-stack > .bio-block[data-wm] > * { position: relative; z-index: 1; }
}

.bio-block-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 500; font-style: italic;
  margin-bottom: 36px;
  display: inline-flex; align-items: center; gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.bio-block-title i { color: var(--gold); font-size: 0.85em; }

/* Timeline */
.timeline { position: relative; padding-left: 30px; }
[dir="rtl"] .timeline { padding-left: 0; padding-right: 30px; }
.timeline::before {
  content: '';
  position: absolute; left: 8px; top: 8px; bottom: 8px;
  width: 1px; background: var(--line);
}
[dir="rtl"] .timeline::before { left: auto; right: 8px; }
.tl-item { position: relative; padding-bottom: 36px; }
.tl-dot {
  position: absolute; left: -30px; top: 14px;
  width: 18px; height: 18px;
  border: 2px solid var(--gold);
  background: var(--bg); border-radius: 50%;
}
.tl-dot::after {
  content: ''; position: absolute; inset: 4px;
  background: var(--gold-bright); border-radius: 50%;
}
[dir="rtl"] .tl-dot { left: auto; right: -30px; }
.tl-card {
  padding: 24px 28px;
  border: 1px solid var(--line);
  background: var(--card-bg);
  border-radius: 4px;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.tl-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.tl-head {
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: 12px; margin-bottom: 6px;
}
.tl-head h4 { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 500; }
.tl-date { color: var(--gold) !important; }
.tl-org, .tl-loc { color: var(--ink-soft); font-size: 14px; margin-top: 4px; }
.tl-org i, .tl-loc i { color: var(--gold); margin-right: 6px; }
.tl-desc { margin-top: 10px; color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.tl-desc a { color: var(--gold); border-bottom: 1px solid var(--gold-soft); }
.tl-skills {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--line-soft);
  font-size: 13px; color: var(--ink-soft);
}
.tl-skills i { color: var(--gold); margin-right: 6px; }
.tl-skills span { color: var(--gold); font-family: 'JetBrains Mono', monospace; font-size: 11px; margin-left: 6px; }

/* Bio card (education) */
.bio-card {
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--card-bg);
  border-radius: 4px;
}
.bio-card h4 { font-family: 'Fraunces', serif; font-size: 24px; font-weight: 500; margin-bottom: 6px; }
.bio-sub { color: var(--gold); font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 12px; }
.bio-card p { color: var(--ink-soft); font-size: 15px; line-height: 1.6; margin-bottom: 4px; }
.bio-card .tl-skills { margin-top: 16px; }

/* Honors */
.honors { display: grid; gap: 18px; }
.honor {
  display: flex; gap: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--card-bg); border-radius: 4px;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.honor:hover { border-color: var(--gold); transform: translateX(4px); }
[dir="rtl"] .honor:hover { transform: translateX(-4px); }
.honor-icon {
  font-size: 28px; color: var(--gold);
  flex-shrink: 0;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--gold-soft); border-radius: 50%;
}
.honor h4 { font-family: 'Fraunces', serif; font-size: 19px; font-weight: 500; margin-bottom: 6px; }
.honor p { color: var(--ink-soft); font-size: 14px; line-height: 1.55; }
.honor p.mono { color: var(--gold) !important; margin-bottom: 6px; }

/* Languages grid */
.langs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lang-item {
  display: flex; gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  background: var(--card-bg); border-radius: 4px;
}
.lang-item > i {
  color: var(--gold); font-size: 16px;
  flex-shrink: 0; padding-top: 3px;
}
.lang-item h4 { font-family: 'Fraunces', serif; font-size: 15px; font-weight: 500; margin-bottom: 2px; }
.lang-item p { font-size: 11px; color: var(--ink-soft); margin-bottom: 7px; line-height: 1.35; }
.lang-bar {
  height: 4px; background: var(--line-soft); border-radius: 2px; overflow: hidden;
}
.lang-bar span {
  display: block; height: 100%; background: linear-gradient(90deg, var(--gold-bright), var(--gold-deep));
}

/* Orgs */
.orgs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.orgs li {
  display: flex; gap: 16px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  background: var(--card-bg); border-radius: 4px;
}
.orgs li i { color: var(--gold); font-size: 22px; padding-top: 4px; }
.orgs h4 { font-family: 'Fraunces', serif; font-size: 18px; font-weight: 500; margin-bottom: 4px; }
.orgs p { font-size: 13px; color: var(--ink-soft); }

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.service {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  background: var(--card-bg); border-radius: 4px;
  font-family: 'Fraunces', serif; font-size: 17px;
  transition: all 0.3s var(--ease);
}
.service i { color: var(--gold); font-size: 18px; }
.service:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

/* =========================================================
   CERTIFICATE GALLERY (inside Biography)
   ========================================================= */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.cert-item {
  display: flex; flex-direction: column; gap: 6px;
  cursor: zoom-in;
}
.cert-item * { cursor: zoom-in; }
.cert-img-wrap {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--ink);
}
.cert-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.6s var(--ease-out), opacity 0.3s ease;
}
.cert-item:hover .cert-img-wrap img { transform: scale(1.04); }
.cert-zoom {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(26,15,8,0.45);
  color: var(--gold); font-size: 22px;
  opacity: 0; transition: opacity 0.3s var(--ease);
  pointer-events: none;
}
.cert-item:hover .cert-zoom { opacity: 1; }
.cert-item:hover .cert-img-wrap { border-color: var(--gold); }
.cert-label {
  font-size: 11px; letter-spacing: 0.08em;
  color: var(--ink-muted); text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cert-zoom { font-size: 16px; }
@media (max-width: 1100px) { .cert-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 820px)  { .cert-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px)  { .cert-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; } }

/* Dropcap (re-used in bio lede) */
.dropcap {
  float: left;
  font-family: 'Fraunces', serif;
  font-size: 84px; font-weight: 500; line-height: 0.85;
  color: var(--ember);
  padding: 8px 14px 0 0; font-style: italic;
}
:root[data-theme="dark"] .dropcap { color: var(--gold); }
[dir="rtl"] .dropcap { float: right; padding: 8px 0 0 14px; }

/* =========================================================
   CONTACT
   ========================================================= */
.contact-eyebrow { color: var(--gold) !important; margin-bottom: 18px; display: block; }

/* Quick contact cards */
.contact-quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 64px;
}
.qc-card {
  display: flex; align-items: center; gap: 18px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  background: var(--card-bg); border-radius: 4px;
  transition: all 0.3s var(--ease);
}
.qc-card:hover { border-color: var(--gold); transform: translateY(-4px); }
.qc-card > i {
  font-size: 22px; color: var(--gold);
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--gold-soft); border-radius: 50%;
  flex-shrink: 0;
}
.qc-card span.mono { color: var(--gold) !important; display: block; margin-bottom: 4px; }
.qc-card p { font-family: 'Fraunces', serif; font-size: 18px; color: var(--ink); }

/* Pitch form */
.pitch-wrap {
  padding: 48px;
  border: 1px solid var(--line);
  background: var(--card-bg);
  border-radius: 4px;
}
.pitch-head { margin-bottom: 36px; }
.pitch-head .mono { color: var(--gold) !important; display: block; margin-bottom: 12px; }
.pitch-head h3 {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 500; line-height: 1.15;
  margin-bottom: 12px;
}

.pitch-form { display: flex; flex-direction: column; gap: 22px; }
.row-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px;
}
.field {
  display: flex; flex-direction: column; gap: 8px;
  border-bottom: 1px solid var(--line); padding-bottom: 12px;
}
.field label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold);
  display: inline-flex; align-items: center; gap: 8px;
}
.field label i { font-size: 11px; }
.field input, .field select, .field textarea {
  font-family: 'Fraunces', serif;
  font-size: 19px; background: transparent; border: none;
  color: var(--ink); outline: none; padding: 6px 0;
  cursor: none; width: 100%;
}
.field textarea { resize: vertical; font-size: 17px; line-height: 1.55; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-muted); opacity: 0.7; }
.field select option { background: var(--bg); color: var(--ink); }

.checkbox {
  display: inline-flex; align-items: center; gap: 12px;
  cursor: none;
  font-family: 'Manrope', sans-serif; font-size: 14px;
  letter-spacing: 0 !important; text-transform: none !important;
  color: var(--ink-soft) !important;
}
.checkbox input { width: 18px; height: 18px; accent-color: var(--gold); }
.checkbox span i { color: var(--gold); margin-right: 6px; }

.pitch-submit {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 14px;
  padding: 18px 32px;
  background: var(--ink); color: var(--bg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  margin-top: 16px;
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}
.pitch-submit:hover { background: var(--ember); gap: 22px; }
:root[data-theme="dark"] .pitch-submit { background: var(--gold-bright); color: #14100b; }
:root[data-theme="dark"] .pitch-submit:hover { background: var(--gold-deep); }
.contact-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: 0.1em;
  color: var(--gold); margin-top: 8px; min-height: 16px;
  display: inline-flex; align-items: center; gap: 8px;
}

/* =========================================================
   BIO TEASER + STATISTICS (inside Design room)
   ========================================================= */
.bio-teaser { padding-top: 80px; padding-bottom: 80px; border-top: 1px solid var(--line-soft); }
.bio-teaser-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 72px;
  align-items: center;
}
.bio-teaser-text .section-num { display: inline-flex; align-items: center; }
.bio-teaser-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 500; line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 16px 0 18px;
}
.bio-teaser-text p {
  color: var(--ink-soft);
  font-size: 16px; line-height: 1.7;
  max-width: 540px;
  margin-bottom: 24px;
}
.bio-teaser-link {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 24px;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}
.bio-teaser-link:hover { background: var(--ink); color: var(--bg); gap: 16px; }
:root[data-theme="dark"] .bio-teaser-link { border-color: var(--gold); color: var(--gold); }
:root[data-theme="dark"] .bio-teaser-link:hover { background: var(--gold-bright); color: #14100b; }

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.stat {
  padding: 28px 24px;
  border: 1px solid var(--line);
  background: var(--card-bg);
  border-radius: 4px;
  display: flex; flex-direction: column; gap: 10px;
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}
.stat::before {
  content: ''; position: absolute;
  top: 0; left: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
  transform: translateX(-100%);
  transition: transform 0.8s var(--ease-out);
}
.stat:hover { border-color: var(--gold); transform: translateY(-4px); }
.stat:hover::before { transform: translateX(100%); }
.stat-num {
  font-family: 'Fraunces', serif;
  font-size: clamp(40px, 4.4vw, 60px);
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.03em;
}
.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold);
  display: inline-flex; align-items: center; gap: 8px;
}

/* =========================================================
   LOGOS SECTION (Worked-with + Designed-by-hand)
   ========================================================= */
.logos-section { padding-top: 80px; padding-bottom: 80px; border-top: 1px solid var(--line-soft); }
.logos-head {
  margin: 0 0 36px;
  display: flex; flex-direction: column; gap: 12px;
}
.logos-head .section-num { color: var(--gold-ink) !important; }
.logos-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 500; font-style: italic;
  color: var(--ink);
}

/* horizontal marquee of client chips */
.logo-marquee {
  position: relative;
  overflow: hidden;
  direction: ltr;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 80px;
  padding: 24px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.logo-marquee-track {
  display: flex;
  align-items: center;
  gap: 56px;
  white-space: nowrap;
  direction: ltr;                 /* seamless loop stays consistent in RTL */
  animation: logosMarquee 50s linear infinite;
  width: max-content;
}
@keyframes logosMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.logo-chip {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 14px 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: 'Fraunces', serif;
  font-size: 17px; font-weight: 500;
  color: var(--ink);
  background: var(--card-bg);
  flex-shrink: 0;
}
.logo-chip i { color: var(--gold); font-size: 16px; }

/* WorkWith real image chip — larger logos, no shape/frame */
.logo-chip--img {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
}
.logo-chip--img img {
  height: 116px; width: auto;
  max-width: 300px;
  object-fit: contain;
  display: block;
  filter: grayscale(20%);
  opacity: 0.9;
  transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}
.logo-chip--img:hover img { filter: none; opacity: 1; transform: scale(1.05); }

/* logos designed — two rows of four, centered */
.logos-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 28px 24px;
}
.logo-mark {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px;
  aspect-ratio: 1 / 1;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--card-bg);
  border-radius: 4px;
  color: var(--ink);
  transition: all 0.4s var(--ease);
  overflow: hidden;
}
.logo-mark svg { width: 56%; height: auto; }
.logo-mark span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-soft); text-align: center;
}
/* TickerLogo real image mark — 4 per row, no shape/frame */
.logo-mark--img {
  flex: 0 0 calc((100% - 72px) / 4);   /* 4 across, 3 × 24px column gaps */
  height: 104px; min-width: 0;
  padding: 6px; gap: 0; cursor: pointer;
  border: none;
  background: transparent;
  aspect-ratio: auto;
}
@media (max-width: 560px) {
  .logo-mark--img { flex-basis: calc((100% - 24px) / 2); }  /* 2 per row on phones */
}
.logo-mark--img img {
  width: 100%; height: 100%;
  object-fit: contain;
  transition: transform 0.4s var(--ease);
}
.logo-mark--img:hover { transform: none; }
.logo-mark--img:hover img { transform: scale(1.08); }
.logo-mark:not(.logo-mark--img):hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-4px);
}
.logo-mark:hover span { color: var(--gold); }

/* =========================================================
   LATEST FROM BLOG (in Design room)
   ========================================================= */
.latest-blog { padding-top: 80px; padding-bottom: 80px; border-top: 1px solid var(--line-soft); }
.latest-blog-head {
  display: flex; flex-direction: column;
  gap: 12px;
  margin-bottom: 36px;
  position: relative;
}
.latest-blog-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 500; font-style: italic;
  color: var(--ink);
}
.latest-blog-all {
  position: absolute;
  right: 0; top: 0;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold);
  padding: 12px 18px;
  border: 1px solid var(--gold-soft);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}
[dir="rtl"] .latest-blog-all { right: auto; left: 0; }
.latest-blog-all:hover { background: var(--gold-bright); color: #14100b; gap: 14px; }
.latest-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: var(--bg-2);
  position: relative;
}
:root[data-theme="dark"] .footer { background: #0a0805; color: var(--ink-soft); }

/* CTA strip */
.footer-cta {
  padding: 56px var(--pad-x);
  border-bottom: 1px solid rgba(232, 223, 205, 0.12);
  display: flex;
  justify-content: space-between; align-items: center;
  gap: 36px; flex-wrap: wrap;
  background:
    radial-gradient(ellipse 80% 100% at 50% 0%, rgba(201,162,83,0.08), transparent 70%);
}
.footer-cta-left .mono {
  color: var(--gold) !important;
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.footer-cta-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 500; line-height: 1.15;
  color: var(--bg-2);
  letter-spacing: -0.02em;
  max-width: 640px;
}
.footer-cta-title em { color: var(--gold); font-style: italic; }
.footer-cta-btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 20px 32px;
  background: var(--gold-bright); color: #14100b;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.3s var(--ease);
  flex-shrink: 0;
}
.footer-cta-btn:hover { background: var(--bg-2); color: var(--ink); gap: 18px; }

/* Main grid */
.footer-main {
  padding: 64px var(--pad-x) 48px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 48px;
  border-bottom: 1px solid rgba(232, 223, 205, 0.12);
}
.footer-brand { display: flex; flex-direction: column; gap: 18px; }
.footer-bq {
  font-family: 'Fraunces', serif;
  font-size: 56px; font-style: italic; font-weight: 600; color: var(--gold);
  line-height: 1;
}
.footer-bq::after { content: '.'; color: var(--gold); }
.footer-brand p {
  color: rgba(232, 223, 205, 0.72);
  font-size: 14px; line-height: 1.6;
  max-width: 380px;
}
.footer-coords {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--gold) !important;
  margin-top: 4px;
}

.footer-col { display: flex; flex-direction: column; gap: 16px; }
.footer-col-title {
  color: var(--gold) !important;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px !important;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col li a, .footer-col li span, .footer-contact li {
  color: rgba(232, 223, 205, 0.72);
  font-size: 14px;
  display: inline-flex; align-items: center; gap: 10px;
  transition: color 0.3s var(--ease);
}
.footer-col li a:hover { color: var(--gold); }
.footer-col li i { color: var(--gold); font-size: 11px; width: 16px; }
.footer-contact li i { font-size: 12px; }
.footer-contact li a { color: rgba(232, 223, 205, 0.72); }
.footer-contact li a:hover { color: var(--gold); }

/* Languages (text only) */
.footer-langs {
  padding: 36px var(--pad-x);
  border-bottom: 1px solid rgba(232, 223, 205, 0.12);
  display: flex; flex-direction: column; gap: 16px;
}
.footer-langs-row { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-lang {
  padding: 10px 18px;
  border: 1px solid rgba(232, 223, 205, 0.18);
  border-radius: 999px;
  color: rgba(232, 223, 205, 0.85);
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  transition: all 0.3s var(--ease);
}
.footer-lang:hover { background: rgba(201, 162, 83, 0.12); border-color: var(--gold); color: var(--gold); }
.footer-lang.is-active { background: var(--gold-bright); color: #14100b; border-color: var(--gold); }

/* Socials (icons only) */
.footer-social {
  padding: 36px var(--pad-x);
  border-bottom: 1px solid rgba(232, 223, 205, 0.12);
  display: flex; flex-direction: column; gap: 18px;
}
.footer-social-row { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-social-row a {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(232, 223, 205, 0.18);
  color: rgba(232, 223, 205, 0.85);
  font-size: 15px;
  transition: all 0.3s var(--ease);
}
.footer-social-row a:hover {
  background: var(--gold-bright); color: #14100b;
  border-color: var(--gold);
  transform: translateY(-3px);
}

.footer-bottom {
  padding: 28px var(--pad-x) 32px;
  display: flex; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; color: rgba(232, 223, 205, 0.62) !important;
}

/* ---------- Balanced editorial footer body ---------- */
.footer-body {
  padding: 72px var(--pad-x);
  display: grid; grid-template-columns: 1.3fr 1.7fr; gap: 56px;
  border-bottom: 1px solid rgba(232, 223, 205, 0.12);
}
.footer-lead { display: flex; flex-direction: column; gap: 18px; }
.footer-lead .footer-bq {
  font-family: 'Fraunces', serif; font-style: italic; font-weight: 600;
  font-size: 64px; color: var(--gold); line-height: 1;
}
.footer-lead-text { color: rgba(232, 223, 205, 0.7); font-size: 15px; line-height: 1.7; max-width: 380px; }
.footer-avail {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(232, 223, 205, 0.85);
  transition: color 0.3s var(--ease); align-self: flex-start;
}
.footer-avail:hover { color: var(--gold); }
.footer-avail-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #6bbf59;
  box-shadow: 0 0 0 3px rgba(107,191,89,0.18);
  animation: pulse 2.4s ease-in-out infinite;
}
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-col2 { display: flex; flex-direction: column; gap: 16px; }
.footer-col2-title { color: var(--gold) !important; font-size: 10px !important; letter-spacing: 0.2em; }
.footer-nav { display: flex; flex-direction: column; gap: 12px; }
.footer-nav a {
  font-family: 'Fraunces', serif; font-size: 19px; font-style: italic;
  color: rgba(232, 223, 205, 0.85);
  position: relative; padding-bottom: 2px; align-self: flex-start;
  transition: color 0.3s var(--ease);
}
.footer-nav a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--gold-bright); transition: right 0.35s var(--ease);
}
[dir="rtl"] .footer-nav a::after { right: 0; left: 100%; transition: left 0.35s var(--ease); }
.footer-nav a:hover { color: var(--gold); }
.footer-nav a:hover::after { right: 0; left: 0; }
.footer-list { display: flex; flex-direction: column; gap: 12px; }
.footer-list a, .footer-list span {
  color: rgba(232, 223, 205, 0.72); font-size: 14px;
  transition: color 0.3s var(--ease);
}
.footer-list a:hover { color: var(--gold); }
.footer-social-min { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-social-min a {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(232, 223, 205, 0.18);
  color: rgba(232, 223, 205, 0.85); font-size: 14px;
  transition: all 0.3s var(--ease);
}
.footer-social-min a:hover { background: var(--gold-bright); color: #14100b; border-color: var(--gold); transform: translateY(-3px); }
.footer-coords-min { display: inline-flex; align-items: center; gap: 8px; }
.footer-coords-min i { color: var(--gold); }
@media (max-width: 900px) {
  .footer-body { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 560px) {
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 28px; }
}

/* ---------- Logo section hover (Worked-with grows, Designed enlarge) ---------- */
.logo-marquee:hover .logo-marquee-track { animation-play-state: paused; }
.logo-chip--img { transition: transform 0.4s var(--ease); transform-origin: center; position: relative; }
.logo-chip--img:hover { transform: scale(1.45); z-index: 5; }
.logo-chip--img:hover img { filter: none; opacity: 1; }
.logos-grid .logo-mark--img { cursor: pointer; transition: transform 0.4s var(--ease-out); }
.logos-grid .logo-mark--img:hover { transform: scale(1.18); z-index: 5; }
.logos-grid .logo-mark--img:hover img { transform: scale(1.05); }

/* =========================================================
   Reveal animations
   ========================================================= */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: translateY(0); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1200px) {
  .footer-main { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: span 3; }
  .logos-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1100px) {
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 4; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .langs-grid, .orgs { grid-template-columns: 1fr; }
  .bio-teaser-grid { grid-template-columns: 1fr; gap: 48px; }
  .latest-blog-grid { grid-template-columns: repeat(2, 1fr); }
  .latest-blog-all { position: static; align-self: flex-start; margin-top: 8px; }
  .tab-header-ghost { font-size: 80px; }
  .index-layout { grid-template-columns: 1fr 0.85fr; gap: 40px; }
}

@media (max-width: 900px) {
  .row-2 { grid-template-columns: 1fr; gap: 22px; }
  .pitch-wrap { padding: 28px; }
}

@media (max-width: 820px) {
  /* Hide rail, show the bottom dock + mobile menu; the top stays empty */
  .rail { display: none; }
  .mobilebar { display: flex; }
  .mobile-menu { display: flex; }
  .main { margin-left: 0; padding-top: 0; padding-bottom: var(--dock-h); }
  [dir="rtl"] .main { margin-right: 0; }

  .hero { min-height: 580px; }
  .hero-letterbox { height: 40px; }
  .hero-meta .mono { font-size: 9px; }
  .hero-meta--bl { gap: 10px; }
  .hero-title { font-size: clamp(54px, 18vw, 110px); }

  .section { padding: 72px var(--pad-x); }
  .section-head { margin-bottom: 40px; }

  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 3; }

  .blog-grid { grid-template-columns: 1fr; gap: 20px; }

  /* Index layout → single column, hide preview, show row meta inline */
  .index-layout { grid-template-columns: 1fr; gap: 0; }
  .index-preview { display: none; }
  .index-row { grid-template-columns: 48px 1fr; gap: 14px; padding: 22px 6px; }
  .index-row-tag { display: none; }
  .index-row-title { font-size: 24px; }
  .index-ghost { font-size: 180px; opacity: 0.05; }
  .index-row:hover, .index-row.is-active { padding-left: 14px; }

  /* Mobile tabs — icon only */
  .tabs-row { grid-template-columns: repeat(6, 1fr); }
  /* Visually hidden but still read by screen readers (keeps the i18n label as the button's accessible name) */
  .tab-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .tab { padding: 13px 4px 17px; gap: 0; }
  .tab-header-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .tab-header-right { display: none; }

  .stats { grid-template-columns: 1fr 1fr; }
  .logos-grid { grid-template-columns: repeat(3, 1fr); }
  .latest-blog-grid { grid-template-columns: 1fr; }

  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
  .footer-cta { padding: 40px var(--pad-x); }
  .footer-cta-btn { padding: 16px 24px; font-size: 11px; }
}

@media (max-width: 560px) {
  :root { --pad-x: 20px; }
  .grid { gap: 6px; }
  .grid-col { gap: 6px; }
  .tabs-row { grid-template-columns: repeat(6, 1fr); }
  .tab { padding: 12px 3px 16px; font-size: 12px; }
  .tab i { font-size: 12px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 20px 16px; }
  .logos-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .logo-mark { padding: 16px; }
  .footer-main { grid-template-columns: 1fr; gap: 36px; }
  .footer-brand { grid-column: span 1; }
  .footer-bq { font-size: 44px; }
  .footer-cta { flex-direction: column; align-items: flex-start; }
  .footer-cta-btn { width: 100%; justify-content: center; }
  .logo-chip { padding: 12px 18px; font-size: 14px; gap: 10px; }
  .topbar { padding: 12px 16px; }
  .topbar-logo { font-size: 22px; }
  .topbar-btn { width: 36px; height: 36px; }

  .hero-meta--tl, .hero-meta--tr { font-size: 8px; }
  .hero-meta--bl, .hero-meta--br { font-size: 8px; }
  .hero-meta--tr, .hero-meta--bl, .hero-meta--br, .hero-meta--tl {
    top: 70px;
  }
  .hero-meta--bl { top: auto; bottom: 16px; }
  .hero-meta--br { top: auto; bottom: 16px; }
  .hero-meta--tr { top: 16px; }
  .hero-meta--tl { top: 16px; }
  .hero-eyebrow { font-size: 9px !important; }
  .hero-marquee { margin-top: 28px; }

  .pitch-wrap { padding: 22px 18px; }
  .field input, .field select { font-size: 17px; }

  .footer-langs { grid-template-columns: 1fr; }
  .footer-top { padding-bottom: 28px; margin-bottom: 28px; }

  .timeline { padding-left: 24px; }
  [dir="rtl"] .timeline { padding-right: 24px; padding-left: 0; }
  .tl-dot { left: -24px; width: 14px; height: 14px; }
  [dir="rtl"] .tl-dot { right: -24px; left: auto; }
  .tl-card { padding: 18px 20px; }
  .tl-head h4 { font-size: 19px; }

  .honor { gap: 16px; padding: 18px; }
  .honor-icon { width: 44px; height: 44px; font-size: 20px; }

  .qc-card { padding: 18px 20px; gap: 14px; }
  .qc-card > i { width: 40px; height: 40px; font-size: 18px; }
  .qc-card p { font-size: 16px; }

  .bio-block-title { font-size: 24px; }
  .pitch-head h3 { font-size: 24px; }

  .blog-card { padding: 24px 22px; }
  .blog-card h3 { font-size: 22px; }
}

/* Print friendly */
@media print {
  .rail, .topbar, .mobile-menu, .grain, .cursor-dot, .cursor-ring, .lang-picker { display: none !important; }
  .main { margin-left: 0 !important; }
  .room.is-hidden { display: block !important; }
  body { cursor: auto; }
}

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

/* =========================================================
   ENHANCEMENTS — splash, rail extras, hero float, to-top,
   chatbot, dashboard
   ========================================================= */

/* ---------- 1 · SPLASH ---------- */
.splash {
  position: fixed; inset: 0; z-index: 99999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: opacity 0.8s var(--ease);
}
.splash-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 22px; width: min(340px, 76vw);
  position: relative; z-index: 2;
  animation: splashIn 0.9s var(--ease-out) both;
}
@keyframes splashIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.splash-logo img {
  width: 120px; height: 120px; object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,0.5);
  animation: splashLogo 3s var(--ease) infinite alternate;
}
@keyframes splashLogo { from { transform: translateY(0); } to { transform: translateY(-8px); } }
.splash-line { width: 100%; height: 2px; background: var(--line); overflow: hidden; border-radius: 2px; }
.splash-line-fill { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright)); }
.splash-row { width: 100%; display: flex; justify-content: space-between; align-items: baseline; }
.splash-name { font-family: 'Liana', 'Fraunces', serif; font-style: normal; font-size: 30px; line-height: 1; color: var(--ink); letter-spacing: 0; text-transform: none; }
.splash-pct { color: var(--gold); font-size: 13px; }
.splash-tag { font-size: 9px; letter-spacing: 0.2em; color: var(--ink-muted); }
.splash-curtain { position: absolute; top: 0; bottom: 0; width: 50%; background: var(--ink); z-index: 1; transition: transform 0.9s var(--ease-out); }
:root[data-theme="dark"] .splash-curtain { background: #000; }
.splash-curtain--l { left: 0; transform: translateX(-101%); }
.splash-curtain--r { right: 0; transform: translateX(101%); }
.splash.is-done { opacity: 0; pointer-events: none; }
.splash.is-done .splash-inner { opacity: 0; transition: opacity 0.3s ease; }

/* ---------- 2 · RAIL PROGRESS + AVATAR ---------- */
.rail-progress {
  position: absolute; top: 0; bottom: 0; right: -1px; width: 2px;
  background: transparent; z-index: 2;
}
[dir="rtl"] .rail-progress { right: auto; left: -1px; }
.rail-progress-fill {
  position: absolute; top: 0; left: 0; width: 100%; height: 0%;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
  box-shadow: 0 0 10px rgba(201,162,83,0.5);
  transition: height 0.1s linear;
}
/* Rail chat button — looks like a rail tool, opens the chat box */
.rail-chat {
  position: relative;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s var(--ease);
}
.rail-chat i { font-size: 15px; color: var(--gold); transition: transform 0.3s var(--ease); }
.rail-chat:hover { border-color: var(--gold); transform: translateY(-2px); }
.rail-chat:hover i { transform: scale(1.1); }
.rail-chat.is-active { background: var(--gold-bright); border-color: var(--gold); }
.rail-chat.is-active i { color: #14100b; }
.rail-chat-dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #6bbf59; box-shadow: 0 0 0 2px var(--rail-bg);
  animation: pulse 2.4s ease-in-out infinite;
}
.rail-chat.is-active .rail-chat-dot { display: none; }

/* ---------- 3a · PROFILE CARD (hover the Bq logo) ---------- */
.profile-card {
  position: fixed; top: 24px; left: calc(var(--rail-w) + 14px); z-index: 460;
  width: 300px; padding: 0; overflow: hidden;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: 0 34px 80px -28px rgba(0,0,0,0.5);
  opacity: 0; pointer-events: none; transform: translateX(-14px) scale(0.97);
  transition: opacity 0.32s var(--ease), transform 0.42s var(--ease-out);
}
[dir="rtl"] .profile-card { left: auto; right: calc(var(--rail-w) + 14px); transform: translateX(14px) scale(0.97); }
.profile-card.is-shown { opacity: 1; pointer-events: auto; transform: none; }
.profile-card-photo { position: relative; width: 104px; height: 104px; margin: 28px auto 0; }
.profile-card-photo img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: center 20%;
  filter: grayscale(100%) contrast(1.05);
  border: 3px solid var(--bg-3);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.4);
}
.profile-card-ring {
  position: absolute; inset: -7px; border-radius: 50%;
  border: 1px solid var(--gold-soft); border-top-color: var(--gold);
  animation: hfSpin 6s linear infinite;
}
.profile-card-body { padding: 16px 24px 24px; text-align: center; }
.profile-card-eyebrow { color: var(--gold) !important; font-size: 9px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; }
.profile-card-dot { width: 7px; height: 7px; border-radius: 50%; background: #6bbf59; box-shadow: 0 0 0 3px rgba(107,191,89,0.18); animation: pulse 2.4s ease-in-out infinite; }
.profile-card-name { font-family: 'Liana', 'Fraunces', serif; font-weight: 400; font-size: 34px; line-height: 1; color: var(--ink); margin-bottom: 12px; }
.profile-card-bio { font-size: 13px; color: var(--ink-soft); line-height: 1.6; margin-bottom: 18px; }
.profile-card-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px; border: 1px solid var(--ink); border-radius: 999px;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink); transition: all 0.3s var(--ease);
}
.profile-card-btn:hover { background: var(--ink); color: var(--bg); gap: 14px; }
:root[data-theme="dark"] .profile-card-btn { border-color: var(--gold); color: var(--gold); }
:root[data-theme="dark"] .profile-card-btn:hover { background: var(--gold-bright); color: #14100b; }
@media (max-width: 820px) { .profile-card { display: none; } }

/* ---------- 3 · RAIL ROOM CARD ---------- */
.rail-card {
  position: fixed; left: calc(var(--rail-w) + 14px);
  transform: translateY(-50%) translateX(-12px);
  width: 280px; padding: 22px 22px 20px;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 30px 70px -24px rgba(0,0,0,0.4);
  opacity: 0; pointer-events: none; z-index: 400;
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease);
  overflow: hidden;
}
[dir="rtl"] .rail-card { left: auto; right: calc(var(--rail-w) + 14px); transform: translateY(-50%) translateX(12px); }
.rail-card.is-shown { opacity: 1; pointer-events: auto; transform: translateY(-50%) translateX(0); }
.rail-card-n {
  position: absolute; top: -10px; right: 6px;
  font-family: 'Fraunces', serif; font-style: italic; font-weight: 600;
  font-size: 76px; color: var(--ink); opacity: 0.06; line-height: 1;
}
.rail-card-tag { color: var(--gold) !important; font-size: 9px; }
.rail-card-title { font-family: 'Fraunces', serif; font-size: 26px; font-weight: 500; margin: 6px 0 8px; }
.rail-card-desc { font-size: 13px; color: var(--ink-soft); line-height: 1.55; margin-bottom: 12px; }
.rail-card-count { color: var(--ink-muted) !important; font-size: 9px; }
.rail-card-icon { position: absolute; bottom: 16px; right: 18px; color: var(--gold); font-size: 16px; opacity: 0.5; }
[dir="rtl"] .rail-card-icon { right: auto; left: 18px; }

/* ---------- 3b · TAB HOVER CARD (info, no image) ---------- */
.tab-card {
  position: fixed; z-index: 450;
  width: 250px; padding: 18px 20px 16px;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 26px 60px -22px rgba(0,0,0,0.42);
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity 0.26s var(--ease), transform 0.3s var(--ease);
  overflow: hidden;
}
.tab-card.is-shown { opacity: 1; pointer-events: auto; transform: none; }
.tab-card-n {
  position: absolute; top: -14px; right: 8px;
  font-family: 'Fraunces', serif; font-style: italic; font-weight: 600;
  font-size: 60px; color: var(--ink); opacity: 0.06; line-height: 1;
}
[dir="rtl"] .tab-card-n { right: auto; left: 8px; }
.tab-card-tag { color: var(--gold) !important; font-size: 11px; }
.tab-card-title { font-family: 'Fraunces', serif; font-size: 26px; font-weight: 500; margin: 7px 0 9px; }
.tab-card-desc { font-size: 14px; color: var(--ink-soft); line-height: 1.6; margin-bottom: 12px; }
.tab-card-count { color: var(--ink-muted) !important; font-size: 11px; display: inline-flex; align-items: center; gap: 6px; }
.tab-card-count i { color: var(--gold); }
@media (max-width: 820px) { .tab-card { display: none; } }

/* ---------- 4 · HERO interactions ---------- */
.hero-marquee:hover .hero-marquee-track { animation-play-state: paused; }
.hero-disc {
  cursor: pointer; padding: 4px 2px;
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}
.hero-disc:hover { color: var(--gold) !important; transform: translateY(-2px); }
.hero-sep { color: var(--gold); margin: 0 32px; }
/* only the actual letters are the hover target (not the wide centered box) */
.hero-name { display: inline-block; cursor: pointer; }
/* the name is set in Liana — Barakat's logo font */
/* hero name back to the original thick Fraunces */
.hero-title .hero-name { font-family: 'Fraunces', serif; font-weight: 500; }
.hero-line--2 .hero-name { font-style: italic; }

.hero-float {
  position: fixed; z-index: 600; top: 0; left: 0;
  width: 230px; pointer-events: none; opacity: 0;
  transform: translate(-50%, -118%) scale(0.92);
  transition: opacity 0.3s var(--ease), transform 0.32s var(--ease-out);
}
.hero-float.is-shown { opacity: 1; transform: translate(-50%, -116%) scale(1); }

/* Album — three fanned photos */
.hf-album { position: relative; width: 100%; height: 200px; display: none; }
.hero-float.is-album .hf-album { display: block; }
.hf-a {
  position: absolute; left: 50%; top: 50%;
  width: 150px; height: 188px; object-fit: cover;
  border-radius: 6px; background: var(--ink);
  border: 2px solid var(--bg-3);
  box-shadow: 0 18px 40px -14px rgba(0,0,0,0.55);
  transform: translate(-50%, -50%);
  transition: transform 0.45s var(--ease-out);
}
.hf-a1 { z-index: 3; }
.hf-a2 { z-index: 2; }
.hf-a3 { z-index: 1; }
.hero-float.is-album .hf-a1 { transform: translate(-50%, -50%) rotate(-5deg); }
.hero-float.is-album .hf-a2 { transform: translate(-38%, -52%) rotate(5deg); }
.hero-float.is-album .hf-a3 { transform: translate(-62%, -48%) rotate(-13deg); }

/* Round portrait */
.hf-portrait {
  position: relative; width: 196px; height: 196px; margin: 0 auto;
  display: none;
}
.hero-float.is-portrait .hf-portrait { display: block; }
.hf-portrait img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  border: 3px solid var(--bg-3);
  box-shadow: 0 20px 46px -14px rgba(0,0,0,0.55);
}
.hf-portrait-ring {
  position: absolute; inset: -8px; border-radius: 50%;
  border: 1px solid var(--gold-soft); border-top-color: var(--gold);
  animation: hfSpin 5s linear infinite;
}
@keyframes hfSpin { to { transform: rotate(360deg); } }

/* Meta */
.hf-meta { margin-top: 12px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.hf-title { font-family: 'Fraunces', serif; font-style: italic; font-size: 20px; color: var(--ink); }
.hf-sub { font-size: 9px; letter-spacing: 0.14em; color: var(--ink-muted); }
.hf-go { font-size: 9px; letter-spacing: 0.18em; color: var(--gold); text-transform: uppercase; margin-top: 2px; }
.hero-float.is-portrait .hf-go { display: none; }

/* ---------- 5 · GO TO TOP (bottom-right) ---------- */
.to-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 700;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--bg-3); border: 1px solid var(--line);
  color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(16px) scale(0.8); pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), background 0.3s, color 0.3s;
  box-shadow: 0 14px 34px -10px rgba(0,0,0,0.35);
}
[dir="rtl"] .to-top { right: auto; left: 28px; }
.to-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--gold-bright); color: #14100b; }
.to-top i { font-size: 14px; position: relative; z-index: 2; transition: transform 0.3s var(--ease); }
.to-top:hover i { transform: translateY(-2px); }
.to-top-ring { position: absolute; inset: 0; width: 50px; height: 50px; transform: rotate(-90deg); }
.to-top-track { fill: none; stroke: var(--line-soft); stroke-width: 2; }
.to-top-prog  { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; transition: stroke-dashoffset 0.1s linear; }

/* ---------- 6 · CHATBOT (opens from rail, bottom-left) ---------- */
.chat-fab--removed {
  position: fixed; bottom: 28px; right: 28px; z-index: 800;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--ink); color: var(--bg);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 18px 40px -12px rgba(0,0,0,0.5);
  transition: transform 0.4s var(--ease), background 0.3s;
}
[dir="rtl"] .chat-fab { right: auto; left: 28px; }
:root[data-theme="dark"] .chat-fab { background: var(--gold-bright); color: #14100b; }
.chat-fab:hover { transform: scale(1.06); }
.chat-fab i { font-size: 22px; position: absolute; transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); }
.chat-fab .chat-fab-close { opacity: 0; transform: rotate(-90deg); }
.chat-fab.is-open .chat-fab-open { opacity: 0; transform: rotate(90deg); }
.chat-fab.is-open .chat-fab-close { opacity: 1; transform: none; }
.chat-fab-pulse { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--gold); animation: chatPulse 2.4s ease-out infinite; }
@keyframes chatPulse { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(1.6); opacity: 0; } }
.chat-fab.is-open .chat-fab-pulse { display: none; }

.chat {
  position: fixed; bottom: 28px; left: calc(var(--rail-w) + 20px); z-index: 800;
  width: min(370px, calc(100vw - 40px)); height: min(540px, 78vh);
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none; transform: translateY(20px) scale(0.96);
  transform-origin: bottom left;
  transition: opacity 0.35s var(--ease), transform 0.4s var(--ease-out);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.5);
}
[dir="rtl"] .chat { left: auto; right: calc(var(--rail-w) + 20px); transform-origin: bottom right; }
.chat.is-open { opacity: 1; pointer-events: auto; transform: none; }
/* Mobile: the assistant is a bottom sheet ABOVE the dock (the dock stays visible) */
@media (max-width: 820px) {
  .chat {
    top: auto; bottom: var(--dock-h); left: 0; right: 0;
    width: 100%; max-width: none; height: 62vh; max-height: 62vh;
    border-radius: 24px 24px 0 0; border: 1px solid var(--line); border-bottom: 0;
    transform: translateY(calc(100% + var(--dock-h))); transform-origin: bottom center;
  }
  [dir="rtl"] .chat { left: 0; right: 0; }
  .chat.is-open { transform: none; }
  .chat-head { padding: 18px; border-radius: 24px 24px 0 0; }
  .chat-min { width: 42px; height: 42px; font-size: 19px; background: rgba(255,255,255,0.08); }
  .chat-body { padding: 20px; gap: 14px; }
  .chat-msg { max-width: 88%; font-size: 15px; }
}
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; background: var(--ink); color: var(--bg-2); }
:root[data-theme="dark"] .chat-head { background: #0a0805; }
.chat-head-id { display: flex; align-items: center; gap: 12px; }
.chat-ava { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; border: 1px solid rgba(201,162,83,0.4); flex-shrink: 0; }
.chat-ava img { width: 100%; height: 100%; object-fit: cover; }
.chat-head-id strong { font-family: 'Fraunces', serif; font-size: 16px; font-weight: 500; display: block; }
.chat-status { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.12em; color: rgba(232,223,205,0.6); display: inline-flex; align-items: center; gap: 6px; }
.chat-status i { color: #6bbf59; font-size: 7px; }
.chat-min { width: 30px; height: 30px; border-radius: 50%; color: var(--bg-2); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.3s; }
.chat-min:hover { background: rgba(255,255,255,0.1); }
.chat-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { max-width: 82%; padding: 11px 15px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.chat-msg a { color: var(--gold); text-decoration: underline; }
.chat-msg--bot { background: var(--surface); border: 1px solid var(--line-soft); color: var(--ink); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg--me { background: var(--ink); color: var(--bg-2); align-self: flex-end; border-bottom-right-radius: 4px; }
:root[data-theme="dark"] .chat-msg--me { background: var(--gold-bright); color: #14100b; }
.chat-typing { display: inline-flex; gap: 4px; align-items: center; }
.chat-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-muted); animation: chatDot 1s infinite; }
.chat-typing i:nth-child(2) { animation-delay: 0.15s; } .chat-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes chatDot { 0%,60%,100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.chat-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 10px; }
.chat-chip { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--ink-soft); cursor: pointer; transition: all 0.25s var(--ease); }
.chat-chip:hover { border-color: var(--gold); color: var(--gold); }
.chat-input { display: flex; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 11px 16px; font-size: 14px; color: var(--ink); outline: none; }
.chat-input input:focus { border-color: var(--gold); }
.chat-input button { width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: var(--bg-2); cursor: pointer; flex-shrink: 0; transition: background 0.3s; }
:root[data-theme="dark"] .chat-input button { background: var(--gold-bright); color: #14100b; }
.chat-input button:hover { background: var(--ember); }

/* ---------- 7 · DASHBOARD ---------- */
.dash [hidden] { display: none !important; }
.dash { position: fixed; inset: 0; z-index: 100000; background: rgba(10,6,2,0.7); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity 0.4s var(--ease); }
.dash.is-open { opacity: 1; pointer-events: auto; }
.dash-panel { width: min(860px, 100%); height: min(620px, 90vh); background: var(--bg-3); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 40px 100px -20px rgba(0,0,0,0.6); transform: translateY(20px) scale(0.97); transition: transform 0.45s var(--ease-out); }
.dash.is-open .dash-panel { transform: none; }
.dash-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 26px; border-bottom: 1px solid var(--line); background: var(--ink); color: var(--bg-2); }
.dash-head-id { display: flex; align-items: center; gap: 14px; }
.dash-logo { font-family: 'Fraunces', serif; font-style: italic; font-weight: 600; font-size: 30px; color: var(--gold); }
.dash-head-id strong { font-family: 'Fraunces', serif; font-size: 18px; font-weight: 500; display: block; }
.dash-head-id .mono { font-size: 9px; letter-spacing: 0.16em; color: rgba(232,223,205,0.5); }
.dash-close { width: 36px; height: 36px; border-radius: 50%; color: var(--bg-2); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.3s; }
.dash-close:hover { background: rgba(255,255,255,0.12); }

.dash-gate { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 30px; }
.dash-gate-icon { font-size: 30px; color: var(--gold); }
.dash-gate h3 { font-family: 'Fraunces', serif; font-size: 26px; font-weight: 500; }
.dash-gate .mono { font-size: 10px; letter-spacing: 0.16em; color: var(--ink-muted); }
.dash-login { display: flex; gap: 10px; margin-top: 10px; }
.dash-login input { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 12px 20px; font-size: 14px; color: var(--ink); outline: none; min-width: 200px; }
.dash-login input:focus { border-color: var(--gold); }
.dash-login button { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; background: var(--gold-bright); color: #14100b; border-radius: 999px; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; }
.dash-hint { color: var(--ember) !important; font-size: 11px; min-height: 14px; }

.dash-main { flex: 1; display: flex; min-height: 0; }
.dash-tabs { width: 190px; flex-shrink: 0; border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; }
[dir="rtl"] .dash-tabs { border-right: none; border-left: 1px solid var(--line); }
.dash-tab { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 10px; color: var(--ink-soft); font-size: 14px; cursor: pointer; text-align: left; transition: all 0.25s var(--ease); }
.dash-tab i { color: var(--gold); width: 18px; }
.dash-tab:hover { background: var(--surface); color: var(--ink); }
.dash-tab.is-active { background: var(--surface); color: var(--ink); }
.dash-view { flex: 1; overflow-y: auto; padding: 26px 30px; }

.dash-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.dash-card { padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--card-bg); display: flex; flex-direction: column; gap: 6px; }
.dash-card-n { font-family: 'Fraunces', serif; font-size: 40px; font-weight: 500; color: var(--ink); line-height: 1; }
.dash-card .mono { font-size: 10px; letter-spacing: 0.14em; color: var(--gold); }
.dash-note { margin-top: 20px; font-size: 11px; color: var(--ink-muted); line-height: 1.6; }

.dash-bars { display: flex; flex-direction: column; gap: 12px; }
.dash-bar-row { display: grid; grid-template-columns: 120px 1fr 44px; align-items: center; gap: 14px; }
.dash-bar-label { font-size: 13px; color: var(--ink-soft); }
.dash-bar { height: 8px; background: var(--line-soft); border-radius: 4px; overflow: hidden; }
.dash-bar-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright)); border-radius: 4px; }
.dash-bar-n { color: var(--ink-soft) !important; font-size: 11px; text-align: right; }

.dash-leads { display: flex; flex-direction: column; gap: 12px; }
.dash-lead { padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--card-bg); }
.dash-lead-top { display: flex; justify-content: space-between; align-items: baseline; }
.dash-lead-top strong { font-family: 'Fraunces', serif; font-size: 17px; }
.dash-lead-top .mono { font-size: 9px; color: var(--gold); letter-spacing: 0.1em; }
.dash-lead-mail { font-size: 11px; color: var(--gold) !important; display: block; margin: 2px 0 8px; }
.dash-lead p { font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.dash-lead-meta { display: block; margin-top: 8px; font-size: 9px; color: var(--ink-muted) !important; letter-spacing: 0.1em; }
.dash-empty { text-align: center; color: var(--ink-muted); padding: 60px 0; line-height: 2; }
.dash-empty i { font-size: 30px; color: var(--gold); }

.dash-set { display: flex; flex-direction: column; gap: 8px; max-width: 460px; }
.dash-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--card-bg); font-size: 14px; }
.dash-row select { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; color: var(--ink); }
.dash-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; color: var(--ink-soft); cursor: pointer; margin-top: 10px; transition: all 0.25s var(--ease); }
.dash-btn:hover { border-color: var(--gold); color: var(--gold); }
.dash-btn--danger:hover { border-color: var(--ember); color: var(--ember); }
.dash-btn i { color: var(--gold); }

/* ---------- 8 · SUBSCRIBE BOX (blog room) ---------- */
.subscribe {
  margin-top: 72px;
  padding: 48px clamp(28px, 5vw, 64px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(ellipse 90% 120% at 100% 0%, rgba(201,162,83,0.08), transparent 60%),
    var(--card-bg);
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center;
}
.subscribe-eyebrow { color: var(--gold) !important; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.subscribe-title { font-family: 'Fraunces', serif; font-size: clamp(26px, 3vw, 38px); font-weight: 500; line-height: 1.1; margin-bottom: 12px; }
.subscribe-title em { color: var(--ember); font-style: italic; }
:root[data-theme="dark"] .subscribe-title em { color: var(--gold); }
.subscribe-text p { color: var(--ink-soft); font-size: 15px; line-height: 1.65; max-width: 420px; }
.subscribe-form { display: flex; flex-direction: column; gap: 12px; }
.subscribe-field { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); transition: border-color 0.3s var(--ease); }
.subscribe-field:focus-within { border-color: var(--gold); }
.subscribe-field i { color: var(--gold); font-size: 14px; }
.subscribe-field input { flex: 1; background: transparent; border: none; outline: none; font-size: 15px; color: var(--ink); }
.subscribe-form button {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 15px 24px; background: var(--ink); color: var(--bg);
  border-radius: 999px; cursor: pointer;
  font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  transition: all 0.3s var(--ease);
}
:root[data-theme="dark"] .subscribe-form button { background: var(--gold-bright); color: #14100b; }
.subscribe-form button:hover { background: var(--ember); gap: 16px; }
:root[data-theme="dark"] .subscribe-form button:hover { background: var(--gold-deep); }
.subscribe-status { color: var(--gold) !important; font-size: 11px; min-height: 14px; }
@media (max-width: 820px) { .subscribe { grid-template-columns: 1fr; gap: 28px; padding: 32px 24px; } }

/* ---------- 9 · BLOG READER ---------- */
.index-card-cta { position: absolute; bottom: 14px; left: 36px; color: rgba(240,230,210,0.55) !important; font-size: 9px; display: inline-flex; align-items: center; gap: 6px; }
.index-card-cta i { color: var(--gold); }
.index-row { cursor: pointer; }

.reader {
  position: fixed; inset: 0; z-index: 100001;
  background: rgba(10,6,2,0.7); backdrop-filter: blur(8px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 20px; overflow-y: auto;
  opacity: 0; pointer-events: none; transition: opacity 0.4s var(--ease);
}
.reader.is-open { opacity: 1; pointer-events: auto; }
.reader-panel {
  position: relative; width: min(720px, 100%);
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 40px 100px -20px rgba(0,0,0,0.6);
  transform: translateY(24px) scale(0.98); transition: transform 0.45s var(--ease-out);
  margin: auto;
}
.reader.is-open .reader-panel { transform: none; }
.reader-close {
  position: absolute; top: 16px; right: 16px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,6,2,0.5); color: #f0e6d2; cursor: pointer;
  border: 1px solid rgba(240,230,210,0.2); transition: all 0.25s var(--ease);
}
.reader-close:hover { background: var(--gold-bright); color: #14100b; }
.reader-cover { position: relative; height: 280px; background: var(--ink); overflow: hidden; }
.reader-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reader-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,6,2,0.5), transparent 50%); }
.reader-cover-tag { position: absolute; bottom: 16px; left: 24px; z-index: 2; color: var(--gold) !important; background: rgba(10,6,2,0.6); padding: 6px 12px; border-radius: 999px; font-size: 9px; }
.reader-body { padding: 32px clamp(24px, 4vw, 48px) 40px; }
.reader-title { font-family: 'Fraunces', serif; font-size: clamp(28px, 3.4vw, 42px); font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 18px; }
.reader-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.reader-author { display: inline-flex; align-items: center; gap: 10px; }
.reader-author img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 1px solid var(--gold-soft); }
.reader-author strong { font-family: 'Fraunces', serif; font-size: 15px; font-weight: 500; display: block; }
.reader-author small { font-size: 9px; color: var(--ink-muted); letter-spacing: 0.1em; }
.reader-meta-dot { color: var(--ink-muted); }
.reader-date, .reader-read { color: var(--ink-soft) !important; font-size: 10px; }
.reader-text { color: var(--ink-2); font-size: 16px; line-height: 1.8; }
.reader-text p { margin-bottom: 18px; }
.reader-text p:first-child::first-letter { font-family: 'Fraunces', serif; font-size: 58px; font-weight: 500; float: left; line-height: 0.8; padding: 6px 10px 0 0; color: var(--ember); }
:root[data-theme="dark"] .reader-text p:first-child::first-letter { color: var(--gold); }
[dir="rtl"] .reader-text p:first-child::first-letter { float: right; padding: 6px 0 0 10px; }

.reader-engage { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 32px 0 20px; padding-top: 24px; border-top: 1px solid var(--line); }
.reader-like {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink-soft); cursor: pointer; font-size: 14px;
  transition: all 0.25s var(--ease);
}
.reader-like i { color: var(--ink-muted); transition: transform 0.3s var(--ease), color 0.25s; }
.reader-like small { color: var(--ink-muted); font-size: 11px; }
.reader-like:hover { border-color: var(--ember); }
.reader-like.is-liked { border-color: var(--ember); background: rgba(90,26,26,0.06); }
.reader-like.is-liked i { color: var(--ember); transform: scale(1.15); }
:root[data-theme="dark"] .reader-like.is-liked i { color: #e8607a; }
.reader-engage-count { color: var(--ink-muted) !important; font-size: 10px; }

.reader-comments { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.reader-comment { padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.reader-comment-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.reader-comment-head strong { font-family: 'Fraunces', serif; font-size: 15px; font-weight: 500; }
.reader-comment-head .mono { font-size: 9px; color: var(--ink-muted); }
.reader-comment p { font-size: 14px; color: var(--ink-soft); line-height: 1.55; }
.reader-comment-empty { color: var(--ink-muted); font-size: 13px; font-style: italic; padding: 6px 0; }

.reader-comment-form { display: flex; flex-direction: column; gap: 10px; }
.reader-comment-row { display: flex; gap: 10px; }
.reader-comment-form input, .reader-comment-form textarea {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; font-size: 14px; color: var(--ink); outline: none; font-family: inherit;
}
.reader-comment-form input { flex: 1; }
.reader-comment-form textarea { resize: vertical; }
.reader-comment-form input:focus, .reader-comment-form textarea:focus { border-color: var(--gold); }
.reader-comment-form button {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  padding: 0 20px; background: var(--ink); color: var(--bg); border-radius: 10px; cursor: pointer;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  transition: all 0.3s var(--ease);
}
:root[data-theme="dark"] .reader-comment-form button { background: var(--gold-bright); color: #14100b; }
.reader-comment-form button:hover { background: var(--ember); }
@media (max-width: 560px) { .reader-cover { height: 200px; } .reader-comment-row { flex-direction: column; } .reader-comment-form button { padding: 12px; justify-content: center; } }

/* ---------- 10 · BLOG rich preview card + pagination ---------- */
.index-card--blog { padding: 0; min-height: 0; display: block; }
.blog-card-cover { position: relative; height: 220px; overflow: hidden; background: var(--ink); }
.blog-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity 0.3s ease, transform 0.6s var(--ease-out); }
.index-card--blog:hover .blog-card-cover img { transform: scale(1.04); }
.blog-card-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,6,2,0.55), transparent 55%); }
.blog-card-tag {
  position: absolute; bottom: 14px; left: 20px; z-index: 2;
  background: rgba(10,6,2,0.6); color: var(--gold) !important;
  padding: 5px 12px; border-radius: 999px; font-size: 9px;
}
.blog-card-body { padding: 22px 26px 24px; }
.blog-card-title { font-family: 'Fraunces', serif; font-size: clamp(22px, 2.2vw, 30px); font-weight: 500; line-height: 1.08; color: #f4ecd9; margin-bottom: 10px; transition: opacity 0.4s ease, transform 0.4s var(--ease-out); }
.blog-card-title .hl { color: var(--gold); font-style: italic; }
.blog-card-excerpt { font-family: 'Fraunces', serif; font-style: italic; font-size: 15px; line-height: 1.5; color: rgba(240,230,210,0.72); transition: opacity 0.4s ease; }
.blog-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(240,230,210,0.14); }
.blog-card-author { display: inline-flex; align-items: center; gap: 10px; }
.blog-card-author img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(201,162,83,0.4); }
.blog-card-author strong { display: block; font-family: 'Fraunces', serif; font-size: 14px; font-weight: 500; color: #f4ecd9; }
.blog-card-author small { font-size: 8px; letter-spacing: 0.12em; color: rgba(240,230,210,0.5); }
.blog-card-read { color: var(--gold) !important; font-size: 9px; letter-spacing: 0.1em; }
.blog-card-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; color: rgba(240,230,210,0.55) !important; font-size: 9px; }
.blog-card-cta i { color: var(--gold); }
.index-card--blog.swapping .blog-card-title,
.index-card--blog.swapping .blog-card-excerpt { opacity: 0; transform: translateY(8px); }
.index-card--blog.swapping .blog-card-cover img { opacity: 0.3; }

.blog-pager { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 44px; }
.blog-pager-arrow {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid var(--line); color: var(--ink-soft); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s var(--ease);
}
.blog-pager-arrow:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.blog-pager-arrow:disabled { opacity: 0.3; cursor: not-allowed; }
[dir="rtl"] .blog-pager-arrow i { transform: scaleX(-1); }
.blog-pager-pages { display: flex; gap: 6px; flex-wrap: wrap; }
.blog-page {
  min-width: 42px; height: 42px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 10px;
  font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--ink-soft);
  cursor: pointer; transition: all 0.25s var(--ease);
}
.blog-page:hover { border-color: var(--gold); color: var(--ink); }
.blog-page.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
:root[data-theme="dark"] .blog-page.is-active { background: var(--gold-bright); color: #14100b; border-color: var(--gold); }
.blog-pager-go { display: flex; align-items: center; gap: 10px; margin-left: auto; }
[dir="rtl"] .blog-pager-go { margin-left: 0; margin-right: auto; }
.blog-pager-go label { font-size: 9px; letter-spacing: 0.16em; color: var(--ink-muted); text-transform: uppercase; }
.blog-pager-go input {
  width: 58px; height: 42px; text-align: center;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--ink); outline: none;
  -moz-appearance: textfield;
}
.blog-pager-go input::-webkit-outer-spin-button, .blog-pager-go input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.blog-pager-go input:focus { border-color: var(--gold); }
.blog-pager-go button {
  height: 42px; padding: 0 20px; background: var(--ink); color: var(--bg); border-radius: 10px; cursor: pointer;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  transition: all 0.3s var(--ease);
}
:root[data-theme="dark"] .blog-pager-go button { background: var(--gold-bright); color: #14100b; }
.blog-pager-go button:hover { background: var(--ember); }
@media (max-width: 560px) {
  .blog-pager { justify-content: center; }
  .blog-pager-go { margin: 10px auto 0; width: 100%; justify-content: center; }
}

/* ---------- Enhancement responsive ---------- */
@media (max-width: 820px) {
  .rail-card { display: none; }
  .to-top { bottom: calc(var(--dock-h) + 16px); right: 16px; width: 46px; height: 46px; }
  .to-top-ring { width: 44px; height: 44px; }
  .chat { top: auto; bottom: var(--dock-h); left: 0; right: 0; width: 100%; height: 62vh; max-height: 62vh; border-radius: 24px 24px 0 0; transform-origin: bottom center; }
  [dir="rtl"] .chat { right: 0; left: 0; }
  .dash-main { flex-direction: column; }
  .dash-tabs { width: 100%; flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line); }
  .dash-tab { white-space: nowrap; }
  .hero-float { display: none; }
}

/* =========================================================
   SECTION SNAP — one gesture moves to the next section.
   Desktop + fine pointer only. No forced heights → no white gaps.
   The gallery is taller than the viewport, so it scrolls freely
   (the browser only snaps at its edges).
   ========================================================= */
@media (min-width: 821px) and (pointer: fine) {
  html { scroll-snap-type: y mandatory; scroll-padding-top: 0; }
  .hero,
  .room-hero,
  .pencemor-hero,
  .room > .section,
  .footer { scroll-snap-align: start; scroll-snap-stop: always; }
}
/* Mobile: strong-feeling snapping — every screen AND every section is a snap
   point (proximity, so the page always scrolls freely and nothing is trapped). */
@media (max-width: 820px) {
  html { scroll-snap-type: y proximity; scroll-padding-top: 0; }
  .hero { height: auto; min-height: calc(100svh - var(--dock-h)); scroll-snap-align: start; }
  .room-hero,
  .pencemor-hero { min-height: calc(100svh - var(--dock-h)); scroll-snap-align: start; }
  .room > .section { scroll-snap-align: start; }
  .footer { scroll-snap-align: start; padding-bottom: calc(var(--dock-h) + 8px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-snap-type: none; }
}

/* The footer and the studio dashboard sit on a permanently-dark panel, even in
   light mode. Re-point --gold to its vibrant value inside them so gold text
   stays readable on the dark background (the deep --gold is only for light bg). */
.footer,
.dash,
.hero-meta {
  --gold: var(--gold-bright);
}
