:root,
html[data-theme="dark"] {
  --bg: #080808;
  --fg: #f1f0ec;
  --muted: #a09e9a;
  --surface: #101010;
  --line: rgba(241, 240, 236, 0.14);
  --grid: rgba(241, 240, 236, 0.055);
  --soft: rgba(241, 240, 236, 0.035);
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f1f0ec;
  --fg: #080808;
  --muted: #555555;
  --surface: #e7e5e0;
  --line: rgba(8, 8, 8, 0.16);
  --grid: rgba(8, 8, 8, 0.055);
  --soft: rgba(8, 8, 8, 0.035);
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: "Cairo", system-ui, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--fg); color: var(--bg); }

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

button { font: inherit; }

:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, #000 35%, transparent 100%);
}

.shell {
  width: 100%;
  max-width: 84rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 4.5rem);
}

.eyebrow {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.display {
  margin: 0;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.lead {
  color: var(--muted);
  line-height: 1.85;
}

.btn,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border: 1px solid var(--fg);
  padding: 0.9rem 1.4rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  transition: background-color 300ms, color 300ms, border-color 300ms;
}

.btn {
  background: var(--fg);
  color: var(--bg);
}

.btn:hover {
  background: transparent;
  color: var(--fg);
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: color-mix(in srgb, var(--fg) 28%, transparent);
}

.btn-ghost:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 400ms, border-color 400ms;
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-color: var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.brand-logo {
  width: 2.75rem;
  height: 2rem;
  object-fit: contain;
}

.logo-dark { display: none; }
html[data-theme="light"] .logo-light { display: none; }
html[data-theme="light"] .logo-dark { display: block; }

.brand-word {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-word strong {
  font-size: 1rem;
  letter-spacing: 0.18em;
}

.brand-word span {
  margin-top: 0.3rem;
  font-size: 0.48rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.5rem;
  padding-inline: 0.85rem;
  border: 1px solid var(--line);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: border-color 300ms, background-color 300ms;
}

.header-link:hover {
  border-color: color-mix(in srgb, var(--fg) 55%, transparent);
  background: var(--soft);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: border-color 300ms, background-color 300ms;
}

.icon-btn:hover {
  border-color: color-mix(in srgb, var(--fg) 55%, transparent);
  background: var(--soft);
}

.icon-btn svg { width: 1rem; height: 1rem; }

.hero {
  position: relative;
  padding-top: 8rem;
  padding-bottom: 4rem;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.hero-copy { order: 2; }
.hero-portrait { order: 1; }

.hero-name {
  margin: 1.2rem 0 0;
  font-size: clamp(2.2rem, 5.2vw, 4.9rem);
  line-height: 1.12;
}

.hero-role {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.role-dot { width: 4px; height: 4px; background: var(--fg); opacity: 0.5; }

.hero-lead {
  max-width: 34rem;
  margin-top: 1.5rem;
  font-size: clamp(0.98rem, 1.2vw, 1.1rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-top: 2.7rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.meta-item span {
  display: block;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta-item strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.portrait-wrap {
  position: relative;
  width: 100%;
  max-width: 28rem;
  margin-inline: auto;
  padding: 1.4rem;
}

.portrait-plate {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-radial-gradient(circle at 50% 50%, transparent 0 22px, color-mix(in srgb, var(--fg) 7%, transparent) 23px 24px);
  mask-image: radial-gradient(circle at 50% 50%, #000 55%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 55%, transparent 78%);
}

.portrait-wrap::before,
.portrait-wrap::after {
  content: "";
  position: absolute;
  pointer-events: none;
  background: var(--line);
}

.portrait-wrap::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.portrait-wrap::after { top: 50%; left: 0; right: 0; height: 1px; }

.portrait-frame {
  position: relative;
  z-index: 1;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: saturate(0.9);
}

.portrait-caption {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.section {
  border-top: 1px solid var(--line);
  padding-block: clamp(3.5rem, 7vw, 6rem);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.6vw, 3.2rem);
  line-height: 1.15;
}

.bio-grid {
  display: grid;
  gap: 2rem;
}

.bio-copy p {
  margin: 0 0 1.1rem;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.9;
  color: color-mix(in srgb, var(--fg) 88%, transparent);
}

.bio-aside {
  border: 1px solid var(--line);
  background: var(--soft);
  padding: 1.4rem;
}

.aside-label {
  margin: 0 0 0.8rem;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.focus-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag {
  border: 1px solid var(--line);
  padding: 0.45rem 0.7rem;
  font-size: 0.64rem;
  font-weight: 500;
  color: var(--muted);
}

.timeline {
  position: relative;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.timeline-item {
  position: relative;
  display: grid;
  gap: 0.5rem;
  padding: 1.4rem 1.5rem 1.4rem 0;
  border-bottom: 1px solid var(--line);
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 1.75rem;
  inset-inline-start: 0;
  width: 7px;
  height: 7px;
  border: 1px solid var(--fg);
  background: var(--bg);
  transform: translateX(calc(-50% - 0.75rem));
}

html[dir="rtl"] .timeline-item { padding: 1.4rem 0 1.4rem 1.5rem; }
html[dir="rtl"] .timeline-item::before { transform: translateX(calc(50% + 0.75rem)); }

.timeline-year {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.timeline-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.timeline-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.contact-panel {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  border: 1px solid var(--line);
  padding: clamp(1.4rem, 3vw, 2.4rem);
  background: var(--soft);
}

.contact-panel h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3.2vw, 2.8rem);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 1.5rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  justify-content: space-between;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-inner a {
  color: var(--fg);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.15rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 800ms cubic-bezier(0.16, 1, 0.3, 1), transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (min-width: 768px) {
  .header-inner { height: 5.25rem; }
  .hero { padding-top: 10rem; }
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 4rem; }
  .hero-copy { order: 1; }
  .hero-portrait { order: 2; }
  .bio-grid { grid-template-columns: 1.2fr 0.8fr; gap: 4rem; }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .timeline-item:nth-child(odd) { padding-inline-end: 2rem; }
  .timeline-item:nth-child(even) { padding-inline-start: 2rem; }
  .timeline-item:nth-child(even)::before { inset-inline-start: 0; }
  .contact-panel { grid-template-columns: 1fr auto; }
  .footer-inner { flex-direction: row; align-items: center; }
}

@media (min-width: 1024px) {
  .timeline { grid-template-columns: repeat(4, 1fr); }
  .timeline-item { padding: 1.4rem 1.5rem 1.4rem 0; }
  html[dir="rtl"] .timeline-item { padding: 1.4rem 0 1.4rem 1.5rem; }
}

@media (max-width: 640px) {
  .header-link span { display: none; }
  .brand-word strong { font-size: 0.92rem; }
  .hero { padding-top: 7rem; }
  .portrait-wrap { max-width: 22rem; padding: 1rem; }
  .portrait-caption { font-size: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* Cinematic entry */
.page-intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  color: var(--fg);
  animation: introRoot 2.7s step-end forwards;
}

html.intro-seen .page-intro { display: none !important; }

.intro-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.6%;
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  will-change: transform;
  animation-duration: 2.7s;
  animation-timing-function: cubic-bezier(0.77, 0, 0.18, 1);
  animation-fill-mode: forwards;
}

.intro-panel-left { left: 0; animation-name: introLeft; border-inline-end: 1px solid var(--line); }
.intro-panel-right { right: 0; animation-name: introRight; }

.intro-seam {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: color-mix(in srgb, var(--fg) 40%, transparent);
  animation: introSeam 2.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.intro-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: introCenter 2.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.intro-rings {
  position: absolute;
  width: min(72vmin, 650px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: repeating-radial-gradient(circle at 50% 50%, transparent 0 20px, color-mix(in srgb, var(--fg) 10%, transparent) 21px 22px);
  mask-image: radial-gradient(circle at 50% 50%, #000 45%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 45%, transparent 72%);
  animation: introSpin 2.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.intro-portrait {
  position: relative;
  z-index: 2;
  width: min(32vmin, 250px);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  animation: introPortrait 2.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.intro-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }

.intro-name {
  position: relative;
  z-index: 2;
  margin: 1.2rem 0 0;
  font-size: clamp(1.2rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  animation: introText 2.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.intro-role {
  position: relative;
  z-index: 2;
  margin: 0.45rem 0 0;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  animation: introText 2.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes introLeft { 0%, 54% { transform: translateX(0); } 100% { transform: translateX(-101%); } }
@keyframes introRight { 0%, 54% { transform: translateX(0); } 100% { transform: translateX(101%); } }
@keyframes introSeam { 0% { opacity: 0; transform: scaleY(0.2); } 20% { opacity: 0.8; transform: scaleY(1); } 60% { opacity: 0.8; } 100% { opacity: 0; } }
@keyframes introCenter { 0%, 55% { opacity: 1; } 78%, 100% { opacity: 0; } }
@keyframes introSpin { 0% { opacity: 0; transform: scale(0.72) rotate(-18deg); } 22% { opacity: 0.95; } 60% { opacity: 0.8; } 100% { opacity: 0; transform: scale(1.14) rotate(52deg); } }
@keyframes introPortrait { 0% { opacity: 0; transform: translateY(14px) scale(0.94); filter: blur(8px); } 28% { opacity: 1; transform: none; filter: blur(0); } 78% { opacity: 1; } 100% { opacity: 0; transform: scale(1.03); filter: blur(2px); } }
@keyframes introText { 0% { opacity: 0; transform: translateY(8px); } 26% { opacity: 1; transform: none; } 76% { opacity: 1; } 100% { opacity: 0; } }
@keyframes introRoot { 0%, 99% { visibility: visible; pointer-events: auto; } 100% { visibility: hidden; pointer-events: none; } }

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 150px;
  grid-auto-flow: dense;
  gap: 6px;
}

.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: var(--surface);
  color: var(--fg);
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1), filter 600ms;
}

.gallery-item:hover img { transform: scale(1.04); }

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 8, 8, 0.3), transparent 45%);
  pointer-events: none;
}

.gallery-index {
  position: absolute;
  z-index: 2;
  bottom: 0.7rem;
  inset-inline-start: 0.7rem;
  padding: 0.18rem 0.38rem;
  background: var(--bg);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery-item:nth-child(4n) { grid-row: span 2; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vw;
  background: color-mix(in srgb, var(--bg) 95%, transparent);
}

.lightbox.is-open { display: flex; }

.lightbox img {
  max-width: 92vw;
  max-height: 84vh;
  object-fit: contain;
  border: 1px solid var(--line);
}

.lightbox button {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.lightbox-close { top: 1.2rem; inset-inline-end: 1.2rem; }
.lightbox-prev { inset-inline-start: 1.2rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { inset-inline-end: 1.2rem; top: 50%; transform: translateY(-50%); }

@media (min-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; gap: 8px; }
  .gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
  .gallery-item:nth-child(4n) { grid-row: span 2; }
}

@media (prefers-reduced-motion: reduce) {
  .page-intro { display: none !important; }
}

/* Balanced gallery compositions */
.gallery-count-4 { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; }
.gallery-count-4 .gallery-item { grid-column: auto; grid-row: auto; }
.gallery-count-4 .gallery-item:nth-child(1),
.gallery-count-4 .gallery-item:nth-child(2) { grid-column: span 2; grid-row: span 1; }

.gallery-count-7 { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
.gallery-count-7 .gallery-item { grid-column: auto; grid-row: auto; }
.gallery-count-7 .gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 1; }

@media (min-width: 768px) {
  .gallery-count-4 { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 230px; }
  .gallery-count-4 .gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
  .gallery-count-4 .gallery-item:nth-child(2) { grid-column: span 2; grid-row: span 1; }
  .gallery-count-4 .gallery-item:nth-child(3),
  .gallery-count-4 .gallery-item:nth-child(4) { grid-column: span 1; grid-row: span 1; }

  .gallery-count-7 { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 200px; }
  .gallery-count-7 .gallery-item { grid-column: auto; grid-row: auto; }
  .gallery-count-7 .gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
  .gallery-count-7 .gallery-item:nth-child(2),
  .gallery-count-7 .gallery-item:nth-child(3) { grid-column: span 1; grid-row: span 2; }
  .gallery-count-7 .gallery-item:nth-child(n + 4) { grid-column: auto; grid-row: auto; }
}

.gallery-item img { object-position: center top; }

.gallery-count-4 { grid-auto-rows: auto; }
.gallery-count-4 .gallery-item {
  grid-column: auto;
  grid-row: auto;
  height: auto;
  aspect-ratio: 3 / 4;
}
@media (min-width: 768px) {
  .gallery-count-4 { grid-template-columns: repeat(4, 1fr); }
}

.gallery-count-4 .gallery-item:nth-child(n) {
  grid-column: auto;
  grid-row: auto;
  height: auto;
  aspect-ratio: 3 / 4;
}

/* Editorial masonry gallery */
.gallery-grid,
.gallery-grid.gallery-count-4,
.gallery-grid.gallery-count-7 {
  display: block;
  columns: 2;
  column-gap: 8px;
}

.gallery-grid .gallery-item,
.gallery-grid .gallery-item:nth-child(n) {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  margin: 0 0 8px;
  break-inside: avoid;
  aspect-ratio: auto;
  grid-column: auto;
  grid-row: auto;
}

.gallery-grid .gallery-item img {
  width: 100%;
  height: auto;
  object-fit: initial;
}

@media (min-width: 768px) {
  .gallery-grid.gallery-count-4 { columns: 2; }
  .gallery-grid.gallery-count-7 { columns: 3; }
}

/* Main-site portal intro */
.page-intro,
.intro-panel,
.intro-seam,
.intro-center,
.intro-rings,
.intro-bird,
.intro-track span {
  animation-duration: 2.85s;
}

.intro-halo {
  position: absolute;
  width: min(46vmin, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--fg) 13%, transparent), transparent 68%);
  filter: blur(3px);
  animation: introHalo 2.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.intro-rings {
  background: none;
  mask-image: none;
  -webkit-mask-image: none;
  color: var(--fg);
  width: min(78vmin, 720px);
  aspect-ratio: 1;
}

.intro-rings svg { width: 100%; height: 100%; }

.intro-bird {
  position: relative;
  z-index: 2;
  width: min(17vmin, 150px);
  animation: introBird 2.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.intro-track {
  position: relative;
  z-index: 2;
  width: 120px;
  height: 1px;
  margin-top: 1.8rem;
  overflow: hidden;
  background: color-mix(in srgb, var(--fg) 20%, transparent);
}

.intro-track span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--fg);
  transform-origin: left;
  animation: introTrack 2.2s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

html[dir="rtl"] .intro-track span { transform-origin: right; }

@keyframes introSpin {
  0% { opacity: 0; transform: scale(0.72) rotate(-18deg); }
  22% { opacity: 0.95; }
  58% { opacity: 0.85; transform: scale(1.06) rotate(34deg); }
  76% { opacity: 0.5; }
  100% { opacity: 0; transform: scale(1.16) rotate(62deg); }
}

@keyframes introHalo {
  0% { opacity: 0; transform: scale(0.6); }
  30% { opacity: 0.9; transform: scale(1); }
  72% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.2); }
}

@keyframes introBird {
  0% { opacity: 0; transform: scale(0.72); filter: blur(6px); }
  30% { opacity: 1; transform: scale(1); filter: blur(0); }
  76% { opacity: 1; transform: scale(1.03); }
  100% { opacity: 0; transform: scale(1.1); filter: blur(2px); }
}

@keyframes introTrack {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

.gallery-grid.gallery-count-3 { columns: 2; }
@media (min-width: 768px) {
  .gallery-grid.gallery-count-3 { columns: 3; }
}

.hero-name-single {
  white-space: nowrap;
  font-size: clamp(1.35rem, 4.1vw, 3.7rem);
}

.gallery-grid.gallery-count-6 { columns: 2; }
@media (min-width: 768px) {
  .gallery-grid.gallery-count-6 { columns: 3; }
}


/* Theme transition: radial reveal from the toggle */
.theme-wipe {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  display: none;
  background: var(--wipe-color, #080808);
  clip-path: circle(0 at var(--x, 50%) var(--y, 50%));
  transition: clip-path 650ms cubic-bezier(0.16, 1, 0.3, 1);
}
.theme-wipe.is-active {
  display: block;
  clip-path: circle(150% at var(--x, 50%) var(--y, 50%));
}
@media (prefers-reduced-motion: reduce) {
  .theme-wipe { display: none !important; }
}
