:root,
[data-theme="dark"] {
  --bg: #050506;
  --bg-2: #0b0b0e;
  --fg: #f4f4f5;
  --muted: #a1a1aa;
  --accent: #d8dde6;
  --glow: #9eb6ff;
  --danger: #ff3b4a;
  --panel: #ececea;
  --ink: #111114;
  --border: rgb(255 255 255 / 10%);
  --hero-glow-a: rgb(158 182 255 / 16%);
  --hero-glow-b: rgb(255 59 74 / 8%);
  --card-bg: rgb(255 255 255 / 3.5%);
  --card-hover-bg: rgb(158 182 255 / 5%);
  --header-bg: rgb(5 5 6 / 72%);
  --font-display: "Space Grotesk", "Cairo", sans-serif;
  --font-body: "Cairo", "Space Grotesk", sans-serif;
  --header-h: 72px;
  --max: 1180px;
}

[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-2: #eceef4;
  --fg: #111114;
  --muted: #52525b;
  --accent: #1a1a1f;
  --glow: #4f6ef7;
  --danger: #dc2626;
  --panel: #ffffff;
  --ink: #111114;
  --border: rgb(17 17 20 / 12%);
  --hero-glow-a: rgb(79 110 247 / 12%);
  --hero-glow-b: rgb(255 59 74 / 6%);
  --card-bg: rgb(255 255 255 / 88%);
  --card-hover-bg: rgb(79 110 247 / 8%);
  --header-bg: rgb(246 247 251 / 88%);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  overflow-x: clip;
  line-height: 1.7;
  letter-spacing: 0.01em;
  word-spacing: 0.04em;
}

html[dir="rtl"] {
  --font-display: "Cairo", "Space Grotesk", sans-serif;
  --font-body: "Cairo", sans-serif;
  letter-spacing: 0.015em;
  word-spacing: 0.08em;
}

html[dir="ltr"] {
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Space Grotesk", "Cairo", sans-serif;
  letter-spacing: -0.01em;
  word-spacing: 0.02em;
}

body {
  background:
    radial-gradient(ellipse 70% 45% at 50% -8%, var(--hero-glow-a), transparent 55%),
    radial-gradient(ellipse 40% 30% at 85% 15%, var(--hero-glow-b), transparent 50%),
    var(--bg);
}

a, button { cursor: pointer; color: inherit; }
a { text-decoration: none; }
button { font: inherit; }

:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 3px;
}

.has-cursor, .has-cursor * { cursor: none !important; }

.cursor, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  z-index: 10000;
  pointer-events: none;
  border-radius: 50%;
  transform: translate3d(-100px, -100px, 0);
  will-change: transform;
}

.cursor {
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--accent);
  box-shadow: 0 0 14px rgb(158 182 255 / 75%);
}

.cursor-ring {
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid rgb(216 221 230 / 45%);
  transition: width .2s, height .2s, margin .2s, background .2s, border-color .2s;
}

html.cursor-expand .cursor-ring {
  width: 58px; height: 58px;
  margin: -29px 0 0 -29px;
  border-color: rgb(158 182 255 / 70%);
  background: rgb(158 182 255 / 8%);
}

.scroll-progress {
  position: fixed;
  top: calc(var(--header-h) + 10px);
  inset-inline-end: 18px;
  z-index: 60;
  min-width: 48px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgb(5 5 6 / 70%);
  backdrop-filter: blur(12px);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--glow);
}

.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-inline: clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(16px);
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  text-shadow: 0 0 18px rgb(158 182 255 / 35%);
}

html[dir="ltr"] .logo {
  letter-spacing: -.02em;
}

.nav {
  display: none;
  gap: 1.25rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.nav a, .header-end a, .header-utilities a { color: var(--muted); transition: color .2s; }
.nav a:hover, .header-end a:hover, .header-utilities a:hover { color: var(--fg); }

.header-start {
  display: flex;
  align-items: center;
  gap: .75rem;
  justify-self: start;
  min-width: 0;
}

.header-utilities {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
}

.header-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
}

.site-header--compact {
  grid-template-columns: 1fr 1fr;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .75rem;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.lang-switch button {
  min-height: 36px;
  min-width: 44px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  padding: 0 .7rem;
}

.lang-switch button.is-active {
  background: rgb(158 182 255 / 14%);
  color: var(--fg);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 36px;
  min-width: 36px;
  padding: 0 .65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  transition: border-color .2s, background .2s, color .2s;
}

.theme-toggle:hover {
  color: var(--fg);
  border-color: rgb(158 182 255 / 35%);
  background: rgb(158 182 255 / 8%);
}

.theme-toggle[aria-pressed="true"] {
  color: var(--fg);
  border-color: rgb(158 182 255 / 45%);
  background: rgb(158 182 255 / 12%);
}

.theme-toggle [data-theme-icon] {
  font-size: .95rem;
  line-height: 1;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 .95rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.pill:hover {
  border-color: rgb(158 182 255 / 45%);
  background: rgb(158 182 255 / 8%);
  box-shadow: 0 0 24px rgb(158 182 255 / 12%);
}

.btn-header {
  min-height: 40px;
  padding: 0 1rem;
  font-size: .8rem;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0.01em;
}

.wa-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 40px;
  padding: 0 .75rem;
  border: 1px solid rgb(37 211 102 / 35%);
  border-radius: 999px;
  color: #86efac;
  background: rgb(37 211 102 / 8%);
  font-size: .78rem;
  font-weight: 600;
  transition: background .2s, border-color .2s, color .2s;
}

.wa-link:hover {
  color: #bbf7d0;
  border-color: rgb(37 211 102 / 55%);
  background: rgb(37 211 102 / 14%);
}

.wa-link svg { flex-shrink: 0; }

.wa-number {
  direction: ltr;
  unicode-bidi: plaintext;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .theme-toggle-label { display: none; }
}

@media (max-width: 1100px) {
  .wa-link .wa-number { display: none; }
}

@media (max-width: 820px) {
  .header-end .pill,
  .header-end .btn-header { display: none; }
}

.hero {
  position: relative;
  min-height: 100svh;
  padding: calc(var(--header-h) + 2.5rem) clamp(1.1rem, 4vw, 2.5rem) 3rem;
  overflow: hidden;
}

.hero-atmosphere {
  position: absolute;
  inset: 8% 18% auto;
  height: 42%;
  background: radial-gradient(circle, rgb(158 182 255 / 20%), transparent 68%);
  filter: blur(30px);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 3.2%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 3.2%) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, #000 18%, transparent 75%);
  opacity: .35;
  pointer-events: none;
}

.hero-layout {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.72fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  min-height: calc(100svh - var(--header-h) - 4rem);
}

.kicker {
  margin: 0 0 1rem;
  color: var(--glow);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  display: grid;
  gap: .55rem;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5.8vw, 4.8rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.28;
}

html[dir="ltr"] .hero-title {
  letter-spacing: -.02em;
  line-height: 1.12;
  gap: .35rem;
}

html[dir="rtl"] .hero-title {
  line-height: 1.38;
  gap: .65rem;
}

.hero-title span { display: block; }
.hero-title .accent {
  color: var(--accent);
  text-shadow: 0 0 30px rgb(158 182 255 / 28%);
}

.lead {
  max-width: 40rem;
  margin: 1.25rem 0 0;
  color: var(--muted);
  line-height: 1.75;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .85rem;
  margin-top: 2rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.25rem;
  border-radius: 999px;
  border: 1px solid rgb(158 182 255 / 45%);
  background: linear-gradient(135deg, rgb(158 182 255 / 22%), rgb(158 182 255 / 8%));
  color: var(--fg);
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .02em;
  transition: transform .2s, box-shadow .2s, background .2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgb(158 182 255 / 18%);
  background: linear-gradient(135deg, rgb(158 182 255 / 32%), rgb(158 182 255 / 12%));
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600;
  transition: color .2s, border-color .2s, background .2s;
}

.btn-ghost:hover {
  color: var(--fg);
  border-color: rgb(255 255 255 / 22%);
  background: rgb(255 255 255 / 4%);
}

.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: 1.75rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 52px;
  background: linear-gradient(to bottom, var(--glow), transparent);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scaleY(.55); opacity: .45; }
  50% { transform: scaleY(1); opacity: 1; }
}

.hero-figure {
  position: relative;
  width: min(100%, 340px);
  aspect-ratio: 3 / 4;
  height: auto;
  max-height: min(62svh, 520px);
  justify-self: center;
  align-self: center;
  transform: translateY(-2.25rem);
  pointer-events: none;
}

html[dir="ltr"] .hero-figure { justify-self: center; }

.hero-figure::before {
  content: "";
  position: absolute;
  inset: 6% 2% 4%;
  z-index: 0;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 40%, rgb(158 182 255 / 28%), transparent 58%),
    linear-gradient(160deg, rgb(18 22 36 / 85%), rgb(7 7 8 / 40%));
  border: 1px solid rgb(158 182 255 / 18%);
  box-shadow: inset 0 0 40px rgb(158 182 255 / 10%);
}

.tech-stage {
  position: absolute;
  inset: 6% 2% 4%;
  z-index: 0;
  overflow: hidden;
  border-radius: 28px;
  pointer-events: none;
}

.tech-grid {
  width: 100%;
  height: 100%;
  opacity: 0.9;
}

.tech-glow {
  position: absolute;
  inset: 18% 12% 22%;
  background: radial-gradient(circle, rgb(158 182 255 / 35%), transparent 68%);
  filter: blur(18px);
  animation: tech-pulse 5.5s ease-in-out infinite alternate;
}

@keyframes tech-pulse {
  from { opacity: 0.45; transform: scale(0.96); }
  to { opacity: 0.9; transform: scale(1.05); }
}

.smoke { display: none; }

.fig {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 16px 24px rgb(0 0 0 / 40%));
  mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
  will-change: transform, opacity;
}

.about {
  padding: clamp(4rem, 9vw, 7rem) clamp(1.1rem, 4vw, 2.5rem);
}

.about-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgb(244 244 245 / 96%), rgb(228 232 240 / 92%));
  color: #111114;
  box-shadow: 0 28px 70px rgb(0 0 0 / 35%);
}

.about-head .kicker { color: #4b6cb7; }
.about-head h2 {
  margin: 0;
  color: #111114;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  letter-spacing: 0;
  line-height: 1.35;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}

.about-card {
  padding: 1.25rem;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgb(17 17 20 / 8%);
  box-shadow: 0 10px 24px rgb(17 17 20 / 6%);
  min-height: 220px;
}

.about-card .eyebrow {
  margin: 0 0 .55rem;
  color: #4b6cb7;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.about-card h3 {
  margin: 0 0 .85rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #111114;
  line-height: 1.4;
  letter-spacing: 0;
}

.about-card p {
  margin: 0;
  color: #3f3f46;
  line-height: 1.85;
  font-size: .95rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.about-card p[dir="ltr"] {
  direction: ltr;
  text-align: left;
  unicode-bidi: plaintext;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: 1rem;
}

.about-tags span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 .7rem;
  border-radius: 999px;
  background: rgb(75 108 183 / 10%);
  color: #334155;
  font-size: .78rem;
  font-weight: 600;
}

.about-cta {
  display: flex;
  justify-content: center;
  margin-top: 1.75rem;
}

.about-cta .btn-primary {
  color: #111114;
  border-color: rgb(75 108 183 / 35%);
  background: linear-gradient(135deg, rgb(158 182 255 / 55%), rgb(158 182 255 / 18%));
}

.story {
  position: relative;
  height: 280vh;
}

.story-pin {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 2rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse at center, rgb(158 182 255 / 12%), transparent 55%),
    var(--bg);
}

.story-text {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 5.4vw, 3.8rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.45;
  word-spacing: 0.1em;
  text-shadow: 0 0 34px rgb(158 182 255 / 22%);
}

html[dir="ltr"] .story-text {
  max-width: 16ch;
  letter-spacing: -.02em;
  line-height: 1.2;
  word-spacing: 0.02em;
}

.story-fog {
  position: absolute;
  inset: 20% 10%;
  background: radial-gradient(circle, rgb(255 255 255 / 12%), transparent 60%);
  filter: blur(28px);
  animation: fog 6s ease-in-out infinite alternate;
}

@keyframes fog {
  from { transform: translateX(-4%) scale(1); }
  to { transform: translateX(5%) scale(1.08); }
}

.principles, .work, .audience {
  padding: clamp(4.5rem, 10vw, 8rem) clamp(1.1rem, 4vw, 2.5rem);
}

.section-head {
  max-width: var(--max);
  margin: 0 auto 2.25rem;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.4vw, 3.4rem);
  letter-spacing: 0;
  line-height: 1.35;
}

html[dir="ltr"] .section-head h2 {
  letter-spacing: -.02em;
  line-height: 1.15;
}

.section-head .lead {
  line-height: 1.85;
}

.principles-grid, .audience-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

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

.card {
  position: relative;
  min-height: 210px;
  padding: 1.4rem;
  border: 1px solid var(--border);
  background: var(--card-bg);
  transition: transform .22s, border-color .22s, box-shadow .22s, background .22s;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgb(158 182 255 / 35%);
  background: rgb(158 182 255 / 5%);
  box-shadow: 0 18px 40px rgb(0 0 0 / 35%);
}

.card .idx {
  display: block;
  margin-bottom: 1.2rem;
  color: var(--glow);
  font-family: var(--font-display);
  letter-spacing: .12em;
  font-size: .8rem;
}

.card h3 {
  margin: 0 0 .85rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.4;
  letter-spacing: 0;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: .95rem;
}

.work-meta {
  max-width: var(--max);
  margin: -1rem auto 1.25rem;
  color: var(--glow);
  font-size: .8rem;
  letter-spacing: .04em;
}

#firebase-status[data-status-key="work.status.blocked"] {
  color: #fbbf24;
}

.work-stage {
  max-width: var(--max);
  margin: 0 auto;
}

.is-hidden {
  display: none !important;
}

.work-sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .work-sections-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .work-sections-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
  }
}

.work-section-card {
  --section-accent: var(--glow);
  --section-accent-soft: rgb(158 182 255 / 22%);
  --section-accent-border: rgb(158 182 255 / 45%);
  --section-accent-bg: rgb(158 182 255 / 12%);
  position: relative;
  display: grid;
  grid-template-rows: 1.15fr auto;
  min-height: 240px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--card-bg);
  color: inherit;
  text-align: inherit;
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}

.work-section-card[data-section="health"] {
  --section-accent: #2dd4bf;
  --section-accent-soft: rgb(45 212 191 / 22%);
  --section-accent-border: rgb(45 212 191 / 45%);
  --section-accent-bg: rgb(45 212 191 / 12%);
}

.work-section-card[data-section="education"] {
  --section-accent: #a78bfa;
  --section-accent-soft: rgb(167 139 250 / 22%);
  --section-accent-border: rgb(167 139 250 / 45%);
  --section-accent-bg: rgb(167 139 250 / 12%);
}

.work-section-card[data-section="restaurant"] {
  --section-accent: #fb923c;
  --section-accent-soft: rgb(251 146 60 / 22%);
  --section-accent-border: rgb(251 146 60 / 45%);
  --section-accent-bg: rgb(251 146 60 / 12%);
}

.work-section-card[data-section="delivery"] {
  --section-accent: #60a5fa;
  --section-accent-soft: rgb(96 165 250 / 22%);
  --section-accent-border: rgb(96 165 250 / 45%);
  --section-accent-bg: rgb(96 165 250 / 12%);
}

.work-section-card[data-section="institutions"],
.work-section-card[data-section="enterprise"] {
  --section-accent: #818cf8;
  --section-accent-soft: rgb(129 140 248 / 22%);
  --section-accent-border: rgb(129 140 248 / 45%);
  --section-accent-bg: rgb(129 140 248 / 12%);
}

.work-section-card[data-section="general"],
.work-section-card[data-section="other"] {
  --section-accent: #94a3b8;
  --section-accent-soft: rgb(148 163 184 / 22%);
  --section-accent-border: rgb(148 163 184 / 45%);
  --section-accent-bg: rgb(148 163 184 / 12%);
}

.work-section-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, var(--section-accent-soft), transparent 58%);
  pointer-events: none;
  z-index: 1;
}

.work-section-card:hover {
  transform: translateY(-8px);
  border-color: var(--section-accent-border);
  box-shadow:
    0 22px 48px rgb(0 0 0 / 22%),
    0 0 0 1px var(--section-accent-bg);
}

.work-section-media {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, var(--section-accent-soft), transparent 45%),
    linear-gradient(160deg, var(--section-accent-bg), var(--bg-2));
}

.work-section-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease, filter .45s ease;
}

.work-section-fallback {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 140px;
}

.work-section-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 8%, rgb(0 0 0 / 18%) 45%, transparent 72%);
  pointer-events: none;
}

.work-section-card:hover .work-section-media img {
  transform: scale(1.06);
  filter: saturate(1.05) brightness(1.03);
}

.work-section-body {
  position: relative;
  z-index: 2;
  padding: 1rem 1.15rem 1.15rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--card-bg), var(--section-accent-bg));
}

.work-section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .45rem;
}

.work-section-card .idx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  border: 1px solid var(--section-accent-border);
  background: var(--section-accent-bg);
  color: var(--section-accent);
  font-family: var(--font-display);
  letter-spacing: .1em;
  font-size: .72rem;
  font-weight: 700;
}

.work-section-arrow {
  color: var(--section-accent);
  font-size: 1.1rem;
  line-height: 1;
  opacity: .55;
  transform: translateX(4px);
  transition: opacity .25s ease, transform .25s ease;
}

html[dir="rtl"] .work-section-arrow {
  transform: translateX(-4px) scaleX(-1);
}

.work-section-card:hover .work-section-arrow {
  opacity: 1;
  transform: translateX(0);
}

html[dir="rtl"] .work-section-card:hover .work-section-arrow {
  transform: scaleX(-1);
}

.work-section-card h3 {
  margin: 0 0 .35rem;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0;
}

.work-section-card p {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
}

.work-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 1rem;
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgb(255 255 255 / 4%);
  color: var(--fg);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .25s, background .25s;
}

.work-back:hover {
  border-color: rgb(158 182 255 / 45%);
  background: rgb(158 182 255 / 8%);
}

.work-section-title {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  line-height: 1.35;
}

.work-panel {
  animation: work-panel-in .35s ease;
}

.work-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 1.5rem;
}

@media (min-width: 720px) {
  .work-projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.75rem;
  }
}

@media (min-width: 1024px) {
  .work-projects-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }
}

.work-project-card {
  display: grid;
  grid-template-rows: 1fr auto;
  aspect-ratio: 1;
  min-height: 260px;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--card-bg);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}

@media (min-width: 720px) {
  .work-project-card {
    min-height: 300px;
  }
}

@media (min-width: 1024px) {
  .work-project-card {
    min-height: 320px;
  }
}

.work-project-card:hover {
  transform: translateY(-8px);
  border-color: rgb(158 182 255 / 40%);
  box-shadow:
    0 22px 48px rgb(0 0 0 / 24%),
    0 0 0 1px rgb(158 182 255 / 10%);
}

.work-project-media {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, var(--hero-glow-a), transparent 50%),
    var(--bg-2);
}

.work-project-fallback {
  display: block;
  width: 100%;
  height: 100%;
}

.work-project-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 45%) 0%, transparent 55%);
  pointer-events: none;
}

.work-project-year {
  position: absolute;
  top: .85rem;
  inset-inline-end: .85rem;
  z-index: 2;
  padding: .25rem .65rem;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 22%);
  background: rgb(0 0 0 / 42%);
  backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.work-project-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.94) brightness(1.02);
  transition: transform .45s ease, filter .45s ease;
}

.work-project-card:hover .work-project-media img {
  transform: scale(1.06);
  filter: saturate(1.02) brightness(1.05);
}

.work-project-name {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4rem;
  padding: 1rem 1.1rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--card-bg), rgb(158 182 255 / 5%));
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

html[dir="rtl"] .work-project-name {
  letter-spacing: 0;
}

.work-empty {
  margin: 0;
  color: var(--muted);
  text-align: center;
  padding: 2rem 1rem;
}

@keyframes work-panel-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.work-viewport {
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgb(255 255 255 / 3%);
}

.work-track {
  display: flex;
  direction: ltr;
  will-change: transform;
}

.work-slide {
  flex: 0 0 100%;
  min-width: 100%;
  display: block;
  color: inherit;
  text-decoration: none;
}

html[dir="rtl"] .work-slide .body {
  direction: rtl;
  text-align: right;
}

.work-slide img {
  display: block;
  width: 100%;
  height: clamp(280px, 48vw, 460px);
  object-fit: cover;
  filter: saturate(.9) brightness(1.03);
}

.work-slide .body {
  padding: 1.35rem 1.5rem 1.6rem;
}

.work-slide .year {
  display: block;
  margin-bottom: .45rem;
  color: var(--glow);
  font-size: .75rem;
  letter-spacing: .14em;
}

.work-slide h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0;
}

.work-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
}

.work-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 52px;
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgb(255 255 255 / 4%);
  color: var(--fg);
  transition: border-color .25s, background .25s, transform .25s;
}

.work-nav:hover {
  border-color: rgb(158 182 255 / 45%);
  background: rgb(158 182 255 / 8%);
}

.work-nav:disabled {
  opacity: .35;
  pointer-events: none;
}

.work-counter {
  color: var(--muted);
  font-size: .9rem;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}

.clarity {
  padding: 2rem clamp(1.1rem, 4vw, 2.5rem) 5rem;
}

.clarity-panel {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem);
  border-radius: 28px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 30px 80px rgb(0 0 0 / 45%);
}

.clarity-panel h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.6rem);
  letter-spacing: 0;
  line-height: 1.35;
}

html[dir="ltr"] .clarity-panel h2 {
  letter-spacing: -.02em;
  line-height: 1.15;
}

.clarity-panel .mono {
  margin: 1rem 0 2rem;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #52525b;
}

.clarity-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.clarity-cols article {
  padding-top: 1rem;
  border-top: 1px solid rgb(0 0 0 / 12%);
  font-size: .92rem;
  line-height: 1.6;
  color: #3f3f46;
}

.clarity-cols strong {
  display: block;
  margin-bottom: .55rem;
  color: var(--ink);
  font-family: var(--font-display);
}

.site-footer {
  padding: 5rem clamp(1.1rem, 4vw, 2.5rem) 2rem;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.footer-mail {
  display: block;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.35;
  text-shadow: 0 0 24px rgb(158 182 255 / 20%);
  transition: color .2s;
}

.footer-mail:hover { color: var(--glow); }

html[dir="ltr"] .footer-mail {
  letter-spacing: -.02em;
}

.footer-social-icons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
}

.footer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card-bg);
  transition: transform .2s, border-color .2s, background .2s;
}

.footer-icon:hover {
  transform: translateY(-3px);
  border-color: rgb(158 182 255 / 35%);
}

.footer-icon--wa {
  color: #86efac;
  border-color: rgb(37 211 102 / 35%);
  background: rgb(37 211 102 / 8%);
}

.footer-icon--wa:hover {
  color: #bbf7d0;
  border-color: rgb(37 211 102 / 55%);
  background: rgb(37 211 102 / 14%);
}

.footer-icon--ig {
  color: #f472b6;
  border-color: rgb(244 114 182 / 35%);
  background: rgb(244 114 182 / 8%);
}

.footer-icon--fb {
  color: #60a5fa;
  border-color: rgb(96 165 250 / 35%);
  background: rgb(96 165 250 / 8%);
}

.footer-icon--li {
  color: var(--glow);
  border-color: rgb(158 182 255 / 35%);
  background: rgb(158 182 255 / 8%);
}

.header-utilities .wa-link {
  min-width: 40px;
  padding-inline: .65rem;
  justify-content: center;
}

.header-utilities .wa-link .wa-number {
  display: none;
}

.book-page {
  min-height: 100svh;
  padding: calc(var(--header-h) + 2.5rem) clamp(1.1rem, 4vw, 2.5rem) 4rem;
}

.book-shell {
  max-width: 720px;
  margin: 0 auto;
}

.book-shell h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.35;
  letter-spacing: 0;
}

.book-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.1rem;
  margin-top: 2rem;
}

.book-form label {
  display: grid;
  gap: .45rem;
}

.book-form label.full,
.book-actions.full,
.book-status.full {
  grid-column: 1 / -1;
}

.book-form span {
  color: var(--muted);
  font-size: .88rem;
  font-weight: 600;
}

.book-form input,
.book-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgb(255 255 255 / 4%);
  color: var(--fg);
  font: inherit;
  padding: .85rem 1rem;
  line-height: 1.5;
}

.book-form textarea {
  resize: vertical;
  min-height: 120px;
}

.book-form input:focus,
.book-form textarea:focus {
  outline: none;
  border-color: rgb(158 182 255 / 45%);
  box-shadow: 0 0 0 3px rgb(158 182 255 / 12%);
}

.book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: .5rem;
}

.book-wa-btn {
  gap: .5rem;
}

.book-status {
  margin: .25rem 0 0;
  min-height: 1.4em;
  color: var(--glow);
  font-size: .92rem;
  line-height: 1.6;
}

@media (max-width: 700px) {
  .book-form { grid-template-columns: 1fr; }
}

.project-page {
  min-height: 100svh;
  padding: calc(var(--header-h) + 2rem) clamp(1.1rem, 4vw, 2.5rem) 4rem;
}

.project-shell {
  max-width: 980px;
  margin: 0 auto;
}

.project-back {
  display: inline-flex;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: .92rem;
}

.project-back:hover { color: var(--fg); }

.project-hero-img {
  width: 100%;
  max-height: 52svh;
  object-fit: cover;
  border: 1px solid var(--border);
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: .85rem;
}

.project-gallery-item {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: var(--card-bg);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.project-gallery-item:hover {
  transform: translateY(-4px);
  border-color: rgb(158 182 255 / 40%);
  box-shadow: 0 16px 36px rgb(0 0 0 / 22%);
}

.project-gallery-img {
  display: block;
  width: 100%;
  height: clamp(180px, 28vw, 320px);
  object-fit: cover;
  background: rgb(255 255 255 / 3%);
  pointer-events: none;
}

.project-gallery-zoom {
  position: absolute;
  inset-inline-end: .65rem;
  bottom: .65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 25%);
  background: rgb(0 0 0 / 48%);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
}

.project-gallery-item:hover .project-gallery-zoom {
  opacity: 1;
  transform: translateY(0);
}

body.lightbox-open {
  overflow: hidden;
}

.project-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: clamp(.75rem, 3vw, 1.5rem);
}

.project-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgb(0 0 0 / 82%);
  backdrop-filter: blur(10px);
  cursor: zoom-out;
}

.project-lightbox-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .75rem;
  width: min(1200px, 100%);
  max-height: min(92svh, 920px);
}

.project-lightbox-figure {
  margin: 0;
  min-width: 0;
  display: grid;
  gap: .65rem;
}

.project-lightbox-img {
  display: block;
  width: 100%;
  max-height: min(82svh, 820px);
  object-fit: contain;
  border-radius: .65rem;
  border: 1px solid rgb(255 255 255 / 12%);
  background: rgb(0 0 0 / 35%);
  box-shadow: 0 24px 60px rgb(0 0 0 / 45%);
}

.project-lightbox-counter {
  margin: 0;
  text-align: center;
  color: rgb(255 255 255 / 78%);
  font-size: .85rem;
  letter-spacing: .06em;
}

.project-lightbox-close {
  position: absolute;
  top: -.25rem;
  inset-inline-end: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 999px;
  background: rgb(0 0 0 / 55%);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}

.project-lightbox-close:hover {
  background: rgb(0 0 0 / 72%);
  border-color: rgb(255 255 255 / 35%);
}

.project-lightbox-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 999px;
  background: rgb(0 0 0 / 55%);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.project-lightbox-nav:hover {
  background: rgb(0 0 0 / 72%);
  border-color: rgb(255 255 255 / 35%);
}

@media (max-width: 720px) {
  .project-lightbox-panel {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    justify-items: center;
    gap: .65rem;
  }

  .project-lightbox-nav {
    width: 2.4rem;
    height: 2.4rem;
    font-size: 1.45rem;
  }

  .project-lightbox-prev,
  .project-lightbox-next {
    position: static;
  }

  .project-lightbox-close {
    top: .25rem;
    inset-inline-end: .25rem;
  }
}

.project-site-link {
  display: inline-flex;
  margin-top: 1.25rem;
  min-height: 44px;
  padding: 0 1.2rem;
  font-size: .9rem;
}

.project-meta {
  margin-top: 1.5rem;
  color: var(--glow);
  font-size: .8rem;
  letter-spacing: .12em;
}

.project-shell h1 {
  margin: .55rem 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.35;
  letter-spacing: 0;
}

.project-shell .lead,
.project-desc {
  margin-top: 0;
  max-width: 42rem;
  line-height: 1.9;
  white-space: pre-wrap;
}

.project-body {
  margin-top: 1.75rem;
  max-width: 42rem;
  color: var(--muted);
  line-height: 1.9;
  font-size: 1.02rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.project-body[dir="ltr"],
.project-desc[dir="ltr"] {
  direction: ltr;
  text-align: left;
  unicode-bidi: plaintext;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .85rem;
}

@media (min-width: 900px) {
  .nav { display: flex; }
}

@media (max-width: 900px) {
  .hero-layout { grid-template-columns: 1fr; }
  .hero-figure {
    order: -1;
    justify-self: center !important;
    width: min(62vw, 280px);
    max-height: min(42svh, 360px);
    transform: translateY(-1rem);
  }
  .about-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-line, .embers, .story-fog { animation: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
