:root {
  --bg: #05040c;
  --fg: #f5f3ff;
  --muted: #a5b4fc;
  --soft: #c7d2fe;
  --dim: #9aa3d9;
  --accent: #c084fc;
  --card: #12101c;
  --border: #2a2440;
  --ok: #34d399;
  --radius: 1.1rem;
  --max: 1120px;
  --nav-h: 4rem;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-h2: clamp(1.45rem, 2.8vw, 1.85rem);
  --section-y: 56px;
  --section-y-end: 40px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html[dir="rtl"] body { text-align: right; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--text-md);
  background:
    radial-gradient(1200px 600px at 8% -12%, rgba(124, 58, 237, 0.45) 0%, transparent 55%),
    radial-gradient(900px 520px at 92% 0%, rgba(8, 145, 178, 0.35) 0%, transparent 50%),
    var(--bg);
  color: var(--fg);
  line-height: 1.55;
}
a { color: #a5f3fc; text-decoration: none; }
a:hover { color: var(--accent); }
.wrap { width: min(var(--max), calc(100% - 2rem)); margin: 0 auto; }
.skip { position: absolute; left: -999px; }
.skip:focus, .skip:focus-visible {
  left: 12px; top: 12px; z-index: 80; background: #1e1b4b; color: #fff;
  padding: 8px 12px; border-radius: 8px;
}

.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  backdrop-filter: blur(16px);
  background: rgba(5, 4, 12, 0.72);
  border-bottom: 1px solid rgba(168, 85, 247, 0.22);
}
.nav { height: 100%; display: flex; align-items: center; gap: 12px; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 700; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, #6d28d9, #0891b2);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.55);
}
.nav-links { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.nav-links a, .lang-btn {
  color: var(--dim); font-size: var(--text-sm); font-weight: 600;
  padding: 7px 11px; border-radius: 999px; background: transparent; border: 0; cursor: pointer;
}
.nav-cta {
  background: linear-gradient(135deg, #7c3aed, #0891b2) !important;
  color: #fff !important;
}
.lang-menu { position: relative; }
.lang-list {
  display: none; position: absolute; right: 0; top: 120%;
  background: #0c0a1a; border: 1px solid var(--border); border-radius: 12px;
  min-width: 160px; padding: 6px; z-index: 20;
}
.lang-list.open { display: block; }
.lang-list button {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  color: var(--fg); padding: 8px 10px; border-radius: 8px; cursor: pointer;
}

.menu-btn {
  display: none;
  margin-left: auto;
  min-height: 44px;
  min-width: 44px;
  background: transparent;
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: var(--fg);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

/* opener */
.opener {
  min-height: 100vh; display: grid; place-items: center; text-align: center;
  position: relative; overflow: hidden;
}
.opener video, .opener .fallback {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.opener .fallback {
  background:
    radial-gradient(circle at 30% 40%, rgba(124,58,237,.35), transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(8,145,178,.3), transparent 42%),
    #05040c;
}
.opener .veil {
  position: relative; z-index: 2; padding: 24px;
}
.opener h1 {
  font-size: clamp(2.2rem, 7vw, 4.4rem);
  letter-spacing: -0.04em; line-height: 1.05; max-width: 16ch; margin: 0 auto 12px;
}
.grad {
  background: linear-gradient(90deg, #e9d5ff, #7dd3fc, #c4b5fd);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.kicker { letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-size: var(--text-xs); font-weight: 700; opacity: 0.95; }
.lede { color: var(--soft); max-width: 40rem; margin: 0 auto 22px; font-size: clamp(1rem, 2vw, 1.125rem); line-height: 1.6; }
h2.grad, #tools > h2, .journey > h2, .works h2 {
  font-size: var(--text-h2);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 10px;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 999px; border: 1px solid var(--border);
  color: var(--fg); font-weight: 700; cursor: pointer; background: transparent;
  transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}
.btn-primary {
  background: linear-gradient(135deg, #7c3aed, #0891b2);
  border-color: transparent; color: #fff;
  padding: 14px 24px;
  box-shadow: 0 0 24px rgba(124, 58, 237, 0.45), 0 0 40px rgba(8, 145, 178, 0.18);
}
.btn-primary:hover {
  color: #fff;
  box-shadow: 0 0 32px rgba(192, 132, 252, 0.5), 0 0 36px rgba(8, 145, 178, 0.32);
  transform: translateY(-1px);
}

/* month */
.month-stage { padding: var(--section-y) 0 var(--section-y-end); }
.acrostic {
  position: relative;
  max-width: 560px;
  margin: 18px auto 0;
  padding: 42px 40px 56px;
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 18% 12%, rgba(124, 58, 237, 0.28), transparent 55%),
    radial-gradient(ellipse at 88% 88%, rgba(8, 145, 178, 0.22), transparent 50%),
    linear-gradient(165deg, #1a1528 0%, var(--card) 48%, #0c0a16 100%);
  border: 1px solid var(--border);
  box-shadow:
    0 20px 50px rgba(5, 4, 12, 0.55),
    0 0 40px rgba(192, 132, 252, 0.18),
    inset 0 1px 0 rgba(233, 213, 255, 0.08);
}
.acro-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 22px;
  align-items: center;
  padding: 7px 0;
}
.letter {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 500;
  line-height: 1;
  color: #e9d5ff;
  text-shadow: 0 0 18px rgba(192, 132, 252, 0.45);
}
.phrase {
  color: #f5f3ff;
  font-size: clamp(17px, 2.5vw, 23px);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-shadow: 0 0 14px rgba(125, 211, 252, 0.18);
}
.acrostic .heart {
  position: absolute;
  right: 28px;
  bottom: 22px;
  width: 36px;
  height: 32px;
  opacity: 0.85;
}

/* tools */
#tools { padding: var(--section-y) 0 var(--section-y-end); }
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.tool-card {
  background: linear-gradient(180deg, rgba(28,16,68,.7), rgba(10,8,28,.8));
  border: 1px solid var(--border);
  border-radius: 18px; padding: 18px 12px 14px; text-align: center; color: inherit;
  min-height: 168px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.tool-card:hover {
  border-color: rgba(192, 132, 252, 0.55);
  transform: translateY(-4px);
  color: inherit;
  box-shadow: 0 12px 36px rgba(124, 58, 237, 0.25), 0 0 28px rgba(8, 145, 178, 0.16);
}
.tool-ico {
  width: 72px; height: 72px; margin: 0 auto 10px; border-radius: 20px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, rgba(124,58,237,.35), rgba(8,145,178,.18));
  box-shadow: 0 8px 0 #090616, 0 0 18px rgba(125,211,252,.28);
}
.tool-card h3 { margin: 0; font-size: 14px; }

/* works carousel */
.works { padding: var(--section-y) 0 var(--section-y-end); }
.rail-wrap {
  position: relative;
  overflow: hidden;
}
.rail-wrap::before,
.rail-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 18px;
  width: 36px;
  z-index: 2;
  pointer-events: none;
}
.rail-wrap::before {
  left: 0;
  background: linear-gradient(90deg, rgba(5, 4, 12, 0.92), transparent);
}
.rail-wrap::after {
  right: 0;
  background: linear-gradient(270deg, rgba(5, 4, 12, 0.95), transparent);
}
.rail-wrap::after {
  width: 56px;
}
.rail {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px 2px 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(192, 132, 252, 0.35) transparent;
}
.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-thumb {
  background: rgba(192, 132, 252, 0.35);
  border-radius: 999px;
}
.work-card {
  flex: 0 0 260px; scroll-snap-align: start;
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  padding: 18px; color: inherit; min-height: 220px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.work-card:hover {
  border-color: rgba(192, 132, 252, 0.55);
  color: inherit;
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(124, 58, 237, 0.25), 0 0 28px rgba(8, 145, 178, 0.16);
}

/* journey */
.journey { padding: var(--section-y) 0 var(--section-y-end); }
.scene {
  display: grid; grid-template-columns: 160px 1fr; gap: 18px;
  background: rgba(18,16,28,.7); border: 1px solid var(--border);
  border-radius: 18px; padding: 16px; margin: 12px 0;
}
.figure { height: 140px; }
.howto { color: var(--dim); font-size: var(--text-sm); margin: 8px 0 16px; line-height: 1.6; }

.panel {
  background: color-mix(in srgb, var(--card) 88%, transparent);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
}
.form grid, .form { display: grid; gap: 8px; }
input, textarea, select {
  width: 100%; background: #070616; border: 1px solid var(--border); color: var(--fg);
  border-radius: 12px; padding: 10px 12px; font: inherit;
}
.note-block { padding: var(--section-y) 0 var(--section-y-end); }
.site-footer { border-top: 1px solid rgba(168,85,247,.2); padding: var(--section-y-end) 0 48px; color: var(--dim); font-size: var(--text-sm); }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 18px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.btn:focus-visible,
.nav-links a:focus-visible,
.tool-card:focus-visible,
.work-card:focus-visible,
.lang-btn:focus-visible,
.menu-btn:focus-visible,
.lang-list button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 800px) {
  :root {
    --section-y: 48px;
    --section-y-end: 32px;
  }
  .foot-grid, .scene { grid-template-columns: 1fr; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .rail-wrap::before, .rail-wrap::after { width: 28px; }
  .rail-wrap::after { width: 44px; }
  .nav:has(.menu-btn) .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    background: #0b081c;
    border-bottom: 1px solid var(--border);
    z-index: 40;
  }
  .nav:has(.menu-btn) .nav-links.open { display: flex; }
  .nav:has(.menu-btn) .nav-links a,
  .nav:has(.menu-btn) .lang-btn {
    width: 100%;
    text-align: left;
    padding: 12px 14px;
  }
  .lang-list { right: auto; left: 0; min-width: calc(100% - 8px); }
  .acrostic { padding: 28px 22px 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .tool-card:hover, .work-card:hover, .btn-primary:hover { transform: none; }
}

.print-sheet { background: #fff; color: #111; padding: 28px; border-radius: 8px; }
@media print {
  .site-header, .no-print, .site-footer { display: none !important; }
  body { background: #fff; color: #111; }
}
