/* ==========================================================================
   RAASHID AMBEL — DESIGN SYSTEM
   Black, white, one accent (baby blue). Large whitespace. One motion
   language everywhere: slow, decelerating, never bouncy.
   ========================================================================== */

:root {
  --ink: #000000;
  --ink-soft: #0a0a0a;
  --ink-raised: #111111;
  --ink-line: #1c1c1c;
  --paper: #ffffff;
  --signal: #a7c7e7;
  --signal-bright: #c4dbf2;
  --signal-deep: #6c97c2;
  --mute: rgba(255, 255, 255, 0.56);
  --mute-low: rgba(255, 255, 255, 0.38);
  --mute-faint: rgba(255, 255, 255, 0.2);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;

  --ease-cinema: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-curtain: cubic-bezier(0.83, 0, 0.17, 1);

  --gutter: 1.5rem;
  --header-h: 4.5rem;
  --section-space: clamp(7rem, 16vh, 14rem);
  --section-space-lg: clamp(10rem, 24vh, 20rem);

  color-scheme: dark;
}

@media (min-width: 768px) {
  :root { --gutter: 2.5rem; }
}
@media (min-width: 1280px) {
  :root { --gutter: 4rem; }
}
@media (min-width: 1728px) {
  :root { --gutter: 5.5rem; }
}

/* ---------------------------------------------------------------------- */
/* RESET / BASE                                                            */
/* ---------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  opacity: 1;
  transition: opacity 0.32s var(--ease-cinema);
}
body.page-exit { opacity: 0; }

img, video { max-width: 100%; height: auto; display: block; }

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

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p { margin: 0; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }
dd { margin: 0; }

::selection { background: var(--signal); color: var(--ink); }

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

[id] { scroll-margin-top: calc(var(--header-h) + 2rem); }

::-webkit-scrollbar { width: 0; height: 0; }
* { scrollbar-width: none; }

/* ---------------------------------------------------------------------- */
/* LAYOUT                                                                  */
/* ---------------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: 112rem;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section { padding-top: var(--section-space); padding-bottom: var(--section-space); }
.section-lg { padding-top: var(--section-space-lg); padding-bottom: var(--section-space-lg); }
.pt-header { padding-top: 10rem; }
.pb-section { padding-bottom: var(--section-space); }

.rule { height: 1px; width: 100%; background: rgba(255, 255, 255, 0.1); }

/* ---------------------------------------------------------------------- */
/* TYPE                                                                    */
/* ---------------------------------------------------------------------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mute-low);
}
.eyebrow-lg { font-size: 0.8125rem; letter-spacing: 0.12em; }

.d1 {
  font-family: var(--font-serif);
  font-size: clamp(2.75rem, 12vw, 11rem);
  line-height: 0.88;
  letter-spacing: -0.04em;
  color: var(--paper);
}
.d2 {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 7.5vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--paper);
}
.d3 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4.6vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--paper);
}
.d4 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.6vw, 2.15rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--paper);
}

.lede { font-size: 1.4rem; line-height: 1.5; letter-spacing: -0.016em; color: var(--mute); }
.body-lg { font-size: 1.2rem; line-height: 1.6; color: var(--mute); }
.text-mute { color: var(--mute); }
.text-mute-low { color: var(--mute-low); }
.text-paper-90 { color: rgba(255, 255, 255, 0.9); }
.text-signal { color: var(--signal); }

.max-prose { max-width: 38rem; }
.max-editorial { max-width: 60rem; }

/* ---------------------------------------------------------------------- */
/* LINKS / BUTTONS                                                         */
/* ---------------------------------------------------------------------- */

.link-wipe {
  position: relative;
  display: inline-block;
  transition: color 0.4s var(--ease-cinema);
}
.link-wipe::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s var(--ease-cinema);
}
.link-wipe:hover, .link-wipe:focus-visible { color: var(--signal); }
.link-wipe:hover::after, .link-wipe:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 999px;
  padding: 0.9rem 1.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: all 0.5s var(--ease-cinema);
}
.btn-primary { background: var(--paper); color: var(--ink); }
.btn-primary:hover { background: var(--signal); }
.btn-ghost { border: 1px solid rgba(255, 255, 255, 0.25); color: var(--paper); }
.btn-ghost:hover { border-color: var(--signal); color: var(--signal); }
.btn .arrow { transition: transform 0.5s var(--ease-cinema); }
.btn:hover .arrow { transform: translateX(4px); }
.btn:active { transform: scale(0.96); }
.filter-btn:active { transform: scale(0.95); }
.masonry button:active img { transform: scale(1.02); }

/* ---------------------------------------------------------------------- */
/* HEADER                                                                  */
/* ---------------------------------------------------------------------- */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 55;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--signal);
  transform-origin: left;
  transform: scaleX(0);
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 50;
  transition: transform 0.5s var(--ease-cinema), background-color 0.5s ease, backdrop-filter 0.5s ease;
}
.site-header.is-solid { background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(20px); }
.site-header.is-hidden { transform: translateY(-100%); }

.site-header .shell {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  transition: opacity 0.3s;
}
.logo:hover { opacity: 0.7; }

.primary-nav { display: none; align-items: center; gap: 2.5rem; }
@media (min-width: 768px) { .primary-nav { display: flex; } }

.primary-nav a {
  position: relative;
  padding: 0.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mute);
  transition: color 0.3s;
}
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--paper); }
.primary-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--signal);
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
}
@media (min-width: 768px) { .menu-toggle { display: none; } }
.menu-toggle span {
  width: 24px;
  height: 1px;
  background: var(--paper);
  transition: transform 0.35s var(--ease-cinema), opacity 0.2s;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--header-h) + 1rem);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.7s var(--ease-curtain);
}
.mobile-menu.is-open { clip-path: inset(0 0 0% 0); }
.mobile-menu nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  overflow-y: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.mobile-menu nav a {
  padding: 0.5rem 0;
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 9vw, 3.5rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-cinema), transform 0.6s var(--ease-cinema);
}
.mobile-menu.is-open nav a { opacity: 1; transform: translateY(0); }
.mobile-menu nav a:nth-child(1) { transition-delay: 0.15s; }
.mobile-menu nav a:nth-child(2) { transition-delay: 0.21s; }
.mobile-menu nav a:nth-child(3) { transition-delay: 0.27s; }
.mobile-menu nav a:nth-child(4) { transition-delay: 0.33s; }
.mobile-menu nav a:nth-child(5) { transition-delay: 0.39s; }
.mobile-menu nav a:nth-child(6) { transition-delay: 0.45s; }
.mobile-menu nav a:hover { color: var(--signal); }
.mobile-menu .footer-note { padding-bottom: 2.5rem; }

body.menu-open { overflow: hidden; }

/* ---------------------------------------------------------------------- */
/* HERO                                                                    */
/* ---------------------------------------------------------------------- */

.hero {
  position: relative;
  height: 100svh;
  min-height: 640px;
  width: 100%;
  overflow: hidden;
  background: var(--ink);
  display: flex;
  align-items: flex-end;
}
.hero-media {
  position: absolute;
  inset: 0;
  will-change: transform;
}
.hero-media img, .hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vignette::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 30%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, transparent 28%, transparent 62%, rgba(0, 0, 0, 0.8) 100%);
}
.grain { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.grain::after {
  content: "";
  position: absolute;
  inset: -150%;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 8s steps(10) infinite;
}
@keyframes grain-shift {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-2%, -4%); }
  30% { transform: translate(4%, -6%); }
  50% { transform: translate(-8%, 4%); }
  70% { transform: translate(0, 8%); }
  90% { transform: translate(-4%, 2%); }
}

.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  padding-bottom: 5rem;
  padding-top: 10rem;
}
@media (max-width: 640px) { .hero-content { padding-bottom: 4rem; } }

.hero-eyebrow {
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fade-in 1s var(--ease-cinema) 0.3s forwards;
}

.mask-line { display: block; overflow: hidden; }
.mask-line span {
  display: block;
  transform: translateY(110%);
  animation: mask-up 1.1s var(--ease-cinema) forwards;
}
.hero-title .mask-line:nth-child(1) span { animation-delay: 0.15s; }
.hero-title .mask-line:nth-child(2) span { animation-delay: 0.27s; }

@keyframes mask-up { to { transform: translateY(0%); } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.hero-title {
  font-family: var(--font-serif);
  text-transform: uppercase;
  font-size: clamp(3rem, 12vw, 12rem);
  line-height: 0.86;
  letter-spacing: -0.045em;
}

.hero-disciplines {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  animation: fade-up 0.9s var(--ease-cinema) 0.85s forwards;
}
.hero-disciplines span.dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(167, 199, 231, 0.7); }

.hero-actions {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  opacity: 0;
  animation: fade-up 0.9s var(--ease-cinema) 1.05s forwards;
}

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fade-in 1s ease 1.6s forwards;
}
@media (min-width: 640px) { .scroll-cue { display: flex; } }
.scroll-cue .line { width: 1px; height: 2.5rem; background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), transparent); }

/* ---------------------------------------------------------------------- */
/* SCROLL REVEAL (IntersectionObserver driven)                            */
/* ---------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-cinema), transform 0.9s var(--ease-cinema);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-scale { opacity: 0; transform: scale(1.05); transition: opacity 1.4s var(--ease-cinema), transform 1.4s var(--ease-cinema); }
.reveal-scale.in-view { opacity: 1; transform: scale(1); }

.stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-cinema), transform 0.7s var(--ease-cinema);
}
.stagger.in-view > *:nth-child(1) { transition-delay: 0.05s; }
.stagger.in-view > *:nth-child(2) { transition-delay: 0.12s; }
.stagger.in-view > *:nth-child(3) { transition-delay: 0.19s; }
.stagger.in-view > *:nth-child(4) { transition-delay: 0.26s; }
.stagger.in-view > *:nth-child(5) { transition-delay: 0.33s; }
.stagger.in-view > *:nth-child(6) { transition-delay: 0.4s; }
.stagger.in-view > * { opacity: 1; transform: translateY(0); }

/* ---------------------------------------------------------------------- */
/* SECTION HEADING                                                        */
/* ---------------------------------------------------------------------- */

.section-heading { display: flex; flex-direction: column; }
.section-heading .eyebrow { margin-bottom: 1.25rem; color: var(--signal); opacity: 0.9; }
.section-heading .dek { margin-top: 1.5rem; max-width: 38rem; }

.section-head-row {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  justify-content: space-between;
}
@media (min-width: 640px) {
  .section-head-row { flex-direction: row; align-items: flex-end; }
}

/* ---------------------------------------------------------------------- */
/* SELECTED WORK ROWS                                                      */
/* ---------------------------------------------------------------------- */

/* Fixed column order everywhere this component is used: index, thumb, title, year.
   Both the homepage rail and the /work index must share this exact structure —
   mismatched child order against grid-template-columns was the cause of the
   misaligned rows reported earlier. */
.work-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 1.75rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  transition: opacity 0.3s;
}
.work-row:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
@media (min-width: 640px) {
  .work-row { grid-template-columns: 2.5rem 4.5rem 1fr auto; gap: 2rem; padding: 2rem 0; align-items: center; }
}
@media (min-width: 1024px) {
  .work-row { grid-template-columns: 2.5rem 5.5rem 1fr auto; gap: 2.5rem; padding: 2.25rem 0; }
}

.work-row .index { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--mute-low); line-height: 1; }
.work-row .title { font-family: var(--font-serif); line-height: 1.1; transition: color 0.5s var(--ease-cinema); }
.work-row:hover .title { color: var(--signal); }
.work-row .roles { margin-top: 0.5rem; color: var(--mute); line-height: 1.4; }
.work-row .year {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--mute-low);
  line-height: 1;
  text-align: right;
  align-self: center;
}
@media (min-width: 640px) { .work-row .year { display: block; } }
.work-row .thumb {
  display: none;
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 2px;
  overflow: hidden;
  background: var(--ink-raised);
  align-self: center;
}
@media (min-width: 640px) { .work-row .thumb { display: block; } }
.work-row .thumb img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1); opacity: 0.7;
  transition: transform 0.7s var(--ease-cinema), filter 0.7s var(--ease-cinema), opacity 0.7s var(--ease-cinema);
}
.work-row:hover .thumb img { transform: scale(1.1); filter: grayscale(0); opacity: 1; }

/* ---------------------------------------------------------------------- */
/* GRIDS / CARDS                                                          */
/* ---------------------------------------------------------------------- */

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }

.tile {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background: var(--ink-raised);
  display: block;
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-cinema); }
.tile:hover img { transform: scale(1.06); }
.tile .tile-caption {
  position: absolute; inset: 0; display: flex; align-items: flex-end;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent 60%);
  opacity: 0; transition: opacity 0.5s;
  padding: 1rem;
  font-family: var(--font-mono); font-size: 0.6875rem;
}
.tile:hover .tile-caption { opacity: 1; }

.card-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 640px) { .card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); gap: 3rem; } }
@media (min-width: 640px) { .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .card-grid.cols-3-lg { grid-template-columns: repeat(3, 1fr); } }

.card-cover { position: relative; width: 100%; aspect-ratio: 4/3; overflow: hidden; border-radius: 2px; background: var(--ink-raised); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-cinema); }
.card:hover .card-cover img { transform: scale(1.06); }
.card .card-meta { margin-top: 1.5rem; }
.card .card-title { margin-top: 0.75rem; transition: color 0.5s; }
.card:hover .card-title { color: var(--signal); }
.card .card-excerpt { margin-top: 0.75rem; }

/* Experience / meta cards (homepage) */
.meta-cards { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 768px) { .meta-cards { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }
.meta-card {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.5s var(--ease-cinema), border-color 0.5s var(--ease-cinema);
}
.meta-card:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.3); }
.meta-card .role-dates { color: var(--signal); opacity: 0.9; }
.meta-card h3 { margin-top: 1rem; transition: color 0.4s var(--ease-cinema); }
.meta-card:hover h3 { color: var(--signal); }
.meta-card .org { margin-top: 0.25rem; color: var(--mute); }
.meta-card p.summary { margin-top: 1rem; color: var(--mute); }

/* ---------------------------------------------------------------------- */
/* ABOUT / PORTRAIT SPLIT                                                 */
/* ---------------------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 768px) { .split { grid-template-columns: 1fr 1fr; gap: 5rem; } }
.split .portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: 2px;
  overflow: hidden;
  background: var(--ink-raised);
}
.split .portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }

/* ---------------------------------------------------------------------- */
/* CONTACT CTA                                                            */
/* ---------------------------------------------------------------------- */

.contact-cta { text-align: center; }
.contact-cta .cta-title { max-width: 56rem; margin: 0 auto; }
.line-draw {
  height: 1px; width: 6rem; background: var(--signal); margin: 2.5rem auto 0;
  transform: scaleX(0); transform-origin: left;
  transition: transform 1.4s var(--ease-cinema);
}
.line-draw.in-view { transform: scaleX(1); }

/* ---------------------------------------------------------------------- */
/* FOOTER                                                                  */
/* ---------------------------------------------------------------------- */

.site-footer { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding-top: 4rem;
  padding-bottom: 4rem;
}
@media (min-width: 768px) {
  .footer-grid { flex-direction: row; align-items: flex-start; justify-content: space-between; padding-top: 5rem; padding-bottom: 5rem; }
}
.footer-brand .d4 { margin: 0; }
.footer-brand .eyebrow { margin-top: 1.5rem; }
.footer-nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem 3rem; }
@media (min-width: 480px) { .footer-nav { grid-template-columns: repeat(3, 1fr); } }
.footer-socials { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
  font-size: 0.6875rem;
  color: var(--mute-low);
}
.footer-bottom-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}
@media (min-width: 640px) {
  .footer-bottom-row { flex-direction: row; align-items: center; justify-content: space-between; }
}
/* The stage-name / legal-name disclosure. Small, quiet, present on every page —
   ties "Raashid Ambel" to "Mohammed Raashid" for identity verification without
   shouting about it. */
.legal-note { font-size: 0.6875rem; color: rgba(255, 255, 255, 0.3); letter-spacing: 0.02em; }

/* ---------------------------------------------------------------------- */
/* PROJECT / NOTE PAGE HERO                                                */
/* ---------------------------------------------------------------------- */

.page-hero {
  position: relative;
  height: 100svh;
  min-height: 640px;
  width: 100%;
  overflow: hidden;
  background: var(--ink);
}
.page-hero .hero-media { position: absolute; inset: 0; }
.page-hero .hero-media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero-content {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 4rem;
}
@media (min-width: 640px) { .page-hero-content { padding-bottom: 5rem; } }

/* ---------------------------------------------------------------------- */
/* PROJECT DETAIL LAYOUT                                                  */
/* ---------------------------------------------------------------------- */

.project-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}
@media (min-width: 768px) { .project-layout { grid-template-columns: 1fr 20rem; gap: 5rem; } }

.spec-list, .credit-list { display: flex; flex-direction: column; gap: 0.75rem; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.25rem; }
.spec-list .row, .credit-list .row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.spec-list dt, .credit-list .role { font-size: 0.6875rem; color: var(--mute-low); font-family: var(--font-mono); }
.spec-list dd, .credit-list .name { font-size: 0.8125rem; letter-spacing: 0.06em; text-align: right; }

.gallery-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .gallery-grid { grid-template-columns: 1fr 1fr; } }
.gallery-grid figure { position: relative; margin: 0; overflow: hidden; border-radius: 2px; background: var(--ink-raised); }
.gallery-grid figure.full { grid-column: 1 / -1; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; }
.gallery-grid figcaption {
  position: absolute; inset-inline: 0; bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  padding: 1rem 1.25rem;
  font-size: 0.6875rem;
  color: var(--mute);
}

.prev-next {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2.5rem;
  margin-top: 6rem;
}
@media (min-width: 640px) { .prev-next { grid-template-columns: 1fr 1fr; } }
.prev-next a { display: flex; align-items: center; gap: 1.25rem; }
.prev-next a.next-link { justify-content: flex-end; text-align: right; }
.prev-next .thumb-sm { position: relative; width: 3.5rem; aspect-ratio: 2/3; border-radius: 2px; overflow: hidden; background: var(--ink-raised); flex-shrink: 0; }
.prev-next .thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.prev-next a:hover .d4 { color: var(--signal); }

/* ---------------------------------------------------------------------- */
/* FRAMES / MASONRY / LIGHTBOX                                            */
/* ---------------------------------------------------------------------- */

.filter-row { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; margin-bottom: 3rem; }
@media (min-width: 768px) { .filter-row { margin-bottom: 4rem; } }
.filter-btn {
  position: relative;
  padding-bottom: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mute-low);
  transition: color 0.3s, transform 0.3s var(--ease-cinema);
}
.filter-btn:hover { color: var(--mute); }
.filter-btn.active { color: var(--paper); }
.filter-btn.active::after {
  content: ""; position: absolute; left: 0; bottom: -1px; width: 100%; height: 1px; background: var(--signal);
}

.masonry { columns: 2; column-gap: 1rem; }
@media (min-width: 768px) { .masonry { columns: 4; } }
.masonry .frame-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.4s var(--ease-cinema), transform 0.4s var(--ease-cinema);
}
.masonry .frame-item.is-filtered-out { opacity: 0; transform: scale(0.96); pointer-events: none; }
.masonry button { display: block; width: 100%; border-radius: 2px; overflow: hidden; background: var(--ink-raised); }
.masonry img {
  width: 100%;
  display: block;
  transition: transform 1.4s var(--ease-cinema);
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.masonry button:hover img { transform: scale(1.05); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.97);
  backdrop-filter: blur(12px);
}
.lightbox.is-open { display: flex; }
.lightbox-figure { position: relative; max-height: 100%; max-width: 100%; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.lightbox-figure img {
  max-height: 80vh;
  max-width: 92vw;
  width: auto;
  object-fit: contain;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  opacity: 1;
  transition: opacity 0.2s var(--ease-cinema);
}
.lightbox-figure img.is-swapping { opacity: 0; }
.lightbox-caption { text-align: center; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  font-size: 1.5rem;
  transition: color 0.3s;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { color: var(--signal); }
.lightbox-close { top: 1.25rem; right: 1.25rem; }
.lightbox-prev { left: 0.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 0.5rem; top: 50%; transform: translateY(-50%); }
@media (min-width: 640px) {
  .lightbox-close { top: 2rem; right: 2rem; }
  .lightbox-prev { left: 1.5rem; }
  .lightbox-next { right: 1.5rem; }
}

/* ---------------------------------------------------------------------- */
/* TIMELINE                                                                */
/* ---------------------------------------------------------------------- */

.timeline { position: relative; }
.timeline-spine {
  position: absolute; left: 7px; top: 0.5rem; width: 1px; height: 100%;
  background: rgba(255,255,255,0.1);
  display: none;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1.4s var(--ease-cinema);
}
.timeline-spine.in-view { transform: scaleY(1); }
@media (min-width: 640px) { .timeline-spine { display: block; } }

.timeline-list { display: flex; flex-direction: column; gap: 4rem; }
@media (min-width: 768px) { .timeline-list { gap: 5rem; } }
.timeline-item { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .timeline-item { grid-template-columns: 1.5rem 10rem 1fr; gap: 2rem; } }
.timeline-dot-wrap { display: none; align-items: center; justify-content: center; height: 1rem; width: 1rem; }
@media (min-width: 640px) { .timeline-dot-wrap { display: flex; } }
.timeline-dot { width: 0.625rem; height: 0.625rem; border-radius: 50%; background: rgba(255,255,255,0.4); }
.timeline-dot.current { background: var(--signal); }
.timeline-item .dates { font-family: var(--font-mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--mute-low); }
.timeline-item .org { margin-top: 0.25rem; color: var(--mute); }
.timeline-item .summary { margin-top: 1rem; max-width: 60rem; color: var(--mute); }
.timeline-item ul.highlights { margin-top: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; }
.timeline-item ul.highlights li { display: flex; gap: 0.75rem; color: rgba(255,255,255,0.85); }
.timeline-item ul.highlights li::before { content: ""; margin-top: 0.55em; width: 4px; height: 4px; border-radius: 50%; background: rgba(167,199,231,0.7); flex-shrink: 0; }
.tags { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag { border: 1px solid rgba(255,255,255,0.15); border-radius: 999px; padding: 0.25rem 0.75rem; font-family: var(--font-mono); font-size: 0.6875rem; color: var(--mute-low); }

/* ---------------------------------------------------------------------- */
/* FORMS                                                                   */
/* ---------------------------------------------------------------------- */

.form-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 640px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
.field label { display: block; margin-bottom: 0.5rem; }
.field input, .field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.75rem 0;
  font-size: 1.2rem;
  color: var(--paper);
  font-family: inherit;
  transition: border-color 0.3s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--mute-low); }
.field input:focus, .field textarea:focus { border-color: var(--signal); outline: none; }
.field textarea { resize: none; }
.form-note { margin-top: 1.5rem; font-size: 0.75rem; color: var(--mute-low); }
.form-success { display: none; padding: 4rem 0; text-align: center; border-top: 1px solid rgba(255,255,255,0.1); }
.form-success.is-visible { display: block; }

/* ---------------------------------------------------------------------- */
/* MISC                                                                    */
/* ---------------------------------------------------------------------- */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 1rem; left: 1rem; z-index: 100;
  background: var(--signal); color: var(--ink);
  padding: 0.5rem 1rem; border-radius: 4px;
  font-size: 0.75rem; font-weight: 500;
  transform: translateY(-6rem);
  transition: transform 0.3s;
}
.skip-link:focus-visible { transform: translateY(0); }

/* ---------------------------------------------------------------------- */
/* LIQUID GLASS                                                            */
/* A single frosted-glass treatment reused across chrome: the header       */
/* (already blurred), pill buttons, filter tabs, tags and lightbox         */
/* controls. Kept subtle — a hairline edge and a soft highlight, never a   */
/* heavy card.                                                             */
/* ---------------------------------------------------------------------- */

.glass {
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 30px rgba(0, 0, 0, 0.25);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.btn-ghost:hover {
  background: rgba(167, 199, 231, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 0 1px rgba(167, 199, 231, 0.15);
}

.tag {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.filter-btn.active {
  padding: 0.4rem 0.9rem 0.55rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.filter-btn.active::after { display: none; }

.lightbox-close, .lightbox-prev, .lightbox-next {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  background: rgba(167, 199, 231, 0.1);
  border-color: rgba(167, 199, 231, 0.3);
}

.card-cover, .tile, .work-row .thumb {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* ---------------------------------------------------------------------- */
/* PRELOADER                                                               */
/* The same RAASHID / AMBEL mask reveal from the homepage hero, reused as  */
/* a splash screen on every page. Fires once per page load, then unmounts  */
/* itself — it never blocks back/forward cache or reduced-motion users.    */
/* ---------------------------------------------------------------------- */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  transition: opacity 0.6s var(--ease-cinema), visibility 0.6s var(--ease-cinema);
}
.preloader-mark {
  font-family: var(--font-serif);
  text-transform: uppercase;
  font-size: clamp(1.5rem, 5vw, 2.75rem);
  letter-spacing: -0.03em;
  line-height: 1;
  display: flex;
  gap: 0.28em;
  color: var(--paper);
}
.preloader-mark .mask-line span { animation-duration: 0.9s; }
.preloader-mark .mask-line:nth-child(2) span { animation-delay: 0.08s; }
.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
body.preloading { overflow: hidden; }

/* A poster that hasn't landed yet — a quiet placeholder instead of a fake image. */
.poster-tba {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.4rem;
  background: var(--ink-raised);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 2px;
}
.poster-tba span {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mute-low);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal-scale, .stagger > *, .mask-line span { opacity: 1 !important; transform: none !important; }
  .preloader { display: none !important; }
}
