/* ===========================================================
   IMVMVD — Official Site
   ---------------------------------------------------------
   Rewritten to match the Django templates. The previous
   stylesheet targeted the legacy single-page PHP markup
   (.nav-links, .hero-title, .about-portrait img) and most of
   its rules matched nothing, which is why the nav had no
   spacing and images sized wrongly.

   Fonts are self-hosted rather than pulled from a CDN: a
   Google Fonts request is unreliable from Iran, which is
   exactly where a large share of the readers are.
=========================================================== */

/* ============================================================
   1. FONTS
   Variable fonts — one file covers every weight.
   Latin  → Space Grotesk (display) + Inter (text)
   fa/ar  → Vazirmatn, which covers both scripts
   zh     → system CJK. A Chinese webfont runs to megabytes;
            the installed system faces are excellent.
============================================================ */

@font-face{
  font-family:'Space Grotesk';
  src:url("../fonts/space-grotesk-latin.87c506d88b9f.woff2") format('woff2-variations');
  font-weight:300 700;
  font-display:swap;
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215;
}

@font-face{
  font-family:'Inter';
  src:url("../fonts/inter-latin.260c81a4759b.woff2") format('woff2-variations');
  font-weight:100 900;
  font-display:swap;
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215;
}
@font-face{
  font-family:'Inter';
  src:url("../fonts/inter-latin-ext.1ad231aac0a8.woff2") format('woff2-variations');
  font-weight:100 900;
  font-display:swap;
  unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF;
}

@font-face{
  font-family:'Vazirmatn';
  src:url("../fonts/vazirmatn-arabic.05d9ce2a23d3.woff2") format('woff2-variations');
  font-weight:100 900;
  font-display:swap;
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+08A0-08FF,U+200C-200E,U+2010-2011,U+FB50-FDFF,U+FE70-FEFF;
}
@font-face{
  font-family:'Vazirmatn';
  src:url("../fonts/vazirmatn-latin.e7eada615dc3.woff2") format('woff2-variations');
  font-weight:100 900;
  font-display:swap;
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+20AC,U+2122;
}

/* ============================================================
   2. TOKENS
============================================================ */

:root{
  /* Brand */
  --primary:#3C8CFF;
  --secondary:#783CFF;
  --primary-glow:rgba(60,140,255,.40);

  /* Surfaces */
  --bg:#050505;
  --bg-raised:#0A0A0C;
  --glass:rgba(255,255,255,.035);
  --glass-hover:rgba(255,255,255,.062);
  --line:rgba(245,241,236,.10);
  --line-strong:rgba(245,241,236,.18);

  /* Ink. Every text colour is solid, never see-through: the letters of a
     Persian word overlap where they join, and a see-through colour is
     painted twice there, so every joint shows as a brighter seam. The
     greys below are what the old 62 % / 40 % looked like on --bg. */
  --ink:#F5F1EC;
  --ink-muted:#9A9794;
  --ink-faint:#656361;
  --danger:#FF6B5A;
  --success:#2DD4BF;

  /* Type */
  --font-display:'Space Grotesk','Vazirmatn',ui-sans-serif,system-ui,sans-serif;
  --font-text:'Inter','Vazirmatn',ui-sans-serif,system-ui,-apple-system,sans-serif;
  --font-cjk:'PingFang SC','Hiragino Sans GB','Microsoft YaHei','Noto Sans SC',sans-serif;
  --font-mono:ui-monospace,'SFMono-Regular',Menlo,Consolas,monospace;

  /* Fluid type scale */
  --t-hero:clamp(2.6rem,8vw,5.5rem);
  --t-h1:clamp(2rem,5vw,3.2rem);
  --t-h2:clamp(1.4rem,3vw,2rem);
  --t-h3:1.05rem;
  --t-body:1rem;
  --t-label:.72rem;

  /* Rhythm */
  --space-section:clamp(3.5rem,8vw,6rem);
  --radius:18px;
  --radius-sm:12px;
  --header-h:76px;

  --ease:cubic-bezier(.16,.84,.44,1);
}

/* Chinese takes the CJK stack ahead of the Latin faces. */
html[lang^="zh"]{
  --font-display:var(--font-cjk);
  --font-text:var(--font-cjk);
}

/* ---------- light theme ---------- */
[data-theme="light"]{
  --bg:#F7F8FC;
  --bg-raised:#FFFFFF;
  --glass:rgba(10,10,12,.030);
  --glass-hover:rgba(10,10,12,.055);
  --line:rgba(10,10,12,.10);
  --line-strong:rgba(10,10,12,.18);

  --ink:#12100F;
  --ink-muted:#615F5D;
  --ink-faint:#92908E;
  --primary:#0B62E4;
  --primary-glow:rgba(11,98,228,.20);
}

/* ============================================================
   3. RESET & BASE
============================================================ */

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

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

body{
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font-text);
  font-size:var(--t-body);
  line-height:1.65;
  /* dvh, not vh: on mobile browsers vh counts the space behind the address
     bar, which puts the footer just off the bottom of a short page. */
  min-height:100dvh;
  /* A column with a growing <main> is what keeps the footer against the
     bottom of the window when a page has little on it, instead of leaving it
     floating halfway up with dead space underneath. */
  display:flex;
  flex-direction:column;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  transition:background .4s var(--ease),color .4s var(--ease);
}

a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; color:inherit; }
img{ max-width:100%; display:block; }
ul,ol{ list-style:none; }

::selection{ background:var(--primary); color:#fff; }

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

.sr-only{
  position:absolute;
  width:1px; height:1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
}

/* ============================================================
   4. TYPOGRAPHY
============================================================ */

h1,h2,h3,h4{
  font-family:var(--font-display);
  font-weight:700;
  line-height:1.12;
  letter-spacing:-.01em;
  /* Stops a heading from leaving one orphaned word on its own line. */
  text-wrap:balance;
}

/* Same idea for body copy, but cheaper — the browser only fixes the last
   line rather than rebalancing the whole block. */
p{ text-wrap:pretty; }

main h1{ font-size:var(--t-h1); margin-bottom:.6em; }
main h3{ font-size:var(--t-h3); }

/* Section headings get a short accent rule so a long page reads as a
   sequence of parts rather than one undifferentiated column. */
main h2{
  position:relative;
  font-size:var(--t-h2);
  margin-bottom:.7em;
  padding-top:1.1rem;
}
main h2::before{
  content:'';
  position:absolute;
  top:0;
  inset-inline-start:0;
  width:34px; height:2px;
  border-radius:2px;
  background:linear-gradient(90deg,var(--primary),var(--secondary));
}
/* Centred headings (project hero) and card headings keep no rule. */
.project-hero h2::before,
.teaser-card h3::before,
.player h2::before{ content:none; }

p{ max-width:70ch; }

/* Persian and Arabic need a little more height than Latin to stay
   comfortable at the same nominal size. */
html[dir="rtl"] body{ font-size:1.04rem; line-height:1.85; }

/* On an RTL page, a run of English would have its trailing full stop pushed
   to the front by the bidi algorithm (".like this"). `plaintext` gives each
   block its own direction, taken from its first strong character, so English
   prose reads LTR and Persian reads RTL side by side. */
html[dir="rtl"] p,
html[dir="rtl"] li,
html[dir="rtl"] td{
  unicode-bidi:plaintext;
}

/* Headings are the exception, because most of them are brand names — SAMYAR
   BEATZ, CHANG CAST, MVMVD — which are Latin permanently and by choice, not
   because a translation is missing. Under `plaintext` each one claimed its
   own direction and jumped to the far side of its card, leaving the Arabic
   label above it stranded on the other. `isolate` keeps the heading on the
   page's side while the name inside it still reads left to right. */
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3{
  unicode-bidi:isolate;
}

/* ============================================================
   5. LAYOUT
============================================================ */

.container{
  width:100%;
  max-width:1180px;
  margin-inline:auto;
  padding-inline:1.5rem;
}

main > section{ padding-block:var(--space-section) 0; }
main > section:first-child{ padding-top:calc(var(--header-h) + var(--space-section)); }
main > section:last-child{ padding-bottom:var(--space-section); }

/* The project detail page wraps its sections in an <article>. Its first child
   is a <header>, not a <section>, so a rule scoped to `section:first-child`
   never matched it and the project's own name rendered underneath the fixed
   header — the one element on the page nobody could afford to lose. */
main > article > section{ padding-block:var(--space-section) 0; }
main > article > :first-child{ padding-top:calc(var(--header-h) + var(--space-section)); }
main > article > :last-child{ padding-bottom:var(--space-section); }

.section-intro{
  color:var(--ink-muted);
  font-size:1.05rem;
  margin-top:-.3em;
}

/* ============================================================
   6. BACKGROUND
============================================================ */

.bg-layer{
  position:fixed;
  inset:0;
  z-index:0;
  overflow:hidden;
  pointer-events:none;
  background:
    radial-gradient(ellipse 60% 40% at 50% -10%,var(--primary-glow) 0%,transparent 62%),
    radial-gradient(ellipse 50% 40% at 100% 100%,rgba(120,60,255,.10) 0%,transparent 60%),
    var(--bg);
}
[data-theme="light"] .bg-layer{
  background:
    radial-gradient(ellipse 60% 40% at 50% -10%,var(--primary-glow) 0%,transparent 62%),
    var(--bg);
}

.meteor{
  position:absolute;
  top:-10%;
  width:2px; height:120px;
  background:linear-gradient(180deg,rgba(245,241,236,.85),var(--primary) 55%,transparent);
  filter:drop-shadow(0 0 6px var(--primary-glow));
  transform:rotate(215deg);
  animation:meteorFall linear infinite;
  opacity:0;
}
@keyframes meteorFall{
  0%{ transform:translate(0,0) rotate(215deg); opacity:0; }
  8%{ opacity:1; }
  80%{ opacity:.7; }
  100%{ transform:translate(-620px,780px) rotate(215deg); opacity:0; }
}
.particle{
  position:absolute;
  border-radius:50%;
  background:rgba(245,241,236,.5);
  animation:floatUp linear infinite;
  opacity:0;
}
@keyframes floatUp{
  0%{ transform:translateY(0); opacity:0; }
  10%{ opacity:.5; }
  90%{ opacity:.35; }
  100%{ transform:translateY(-100vh) translateX(20px); opacity:0; }
}
[data-theme="light"] .meteor,
[data-theme="light"] .particle{ display:none; }
.bg-layer.is-paused *{ animation-play-state:paused; }

main,.site-header,.site-footer{ position:relative; z-index:1; }

/* Takes up whatever is left, so the footer below it lands on the bottom edge
   of a short page rather than partway up it. flex-basis stays auto so a long
   page is unaffected. */
main{ flex:1 0 auto; }

/* ============================================================
   7. HEADER & NAV
============================================================ */

.site-header{
  position:fixed;
  top:0; inset-inline:0;
  z-index:100;
  height:var(--header-h);
  display:flex;
  align-items:center;
  background:color-mix(in srgb,var(--bg) 72%,transparent);
  backdrop-filter:blur(18px) saturate(140%);
  -webkit-backdrop-filter:blur(18px) saturate(140%);
  border-bottom:1px solid var(--line);
  transition:background .4s var(--ease),border-color .4s var(--ease);
}

.header-inner{
  display:flex;
  align-items:center;
  gap:1.25rem;
}

.brand{
  display:flex;
  align-items:center;
  font-family:var(--font-display);
  font-weight:700;
  font-size:1.05rem;
  letter-spacing:.16em;
  white-space:nowrap;
  transition:color .3s var(--ease);
}
.brand:hover{ color:var(--primary); }

/* The logo is a white monogram on transparency, so it is painted as a mask
   over currentColor rather than dropped in with <img>. That way it inherits
   the theme's ink — white artwork as an image would disappear against the
   light theme's near-white background — and the existing hover colour keeps
   working on it for free.

   Where masking is unavailable the wordmark below stays visible instead, so
   the header is never an empty link. */
.brand__mark{ display:none; }

@supports (-webkit-mask-image:url("")) or (mask-image:url("")){
  .brand__mark{
    display:block;
    width:60px;
    height:36px;
    background:currentColor;
    /* --brand-mark is set inline from SiteSettings when a logo has been
       uploaded through the panel. The fallback is the file that ships with
       the site, so an untouched install needs no database row. */
    -webkit-mask:var(--brand-mark,url("../img/head-logo.bee0e853434c.png")) no-repeat center / contain;
    mask:var(--brand-mark,url("../img/head-logo.bee0e853434c.png")) no-repeat center / contain;
  }
  .brand__name{
    position:absolute;
    width:1px; height:1px;
    padding:0; margin:-1px;
    overflow:hidden;
    clip-path:inset(50%);
    white-space:nowrap;
    border:0;
  }
}

.nav{
  display:flex;
  align-items:center;
  gap:1.75rem;
  margin-inline:auto;
}
.nav a{
  position:relative;
  font-size:0.8125rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--ink-muted);
  padding-block:.4rem;
  white-space:nowrap;
  transition:color .3s var(--ease);
}
.nav a::after{
  content:'';
  position:absolute;
  inset-inline-start:0;
  bottom:0;
  width:0; height:1px;
  background:var(--primary);
  /* A line of light rather than a rule: the glow is what makes it read as
     the nav answering the pointer. */
  box-shadow:0 0 8px var(--primary),0 0 2px var(--primary);
  transition:width .35s var(--ease);
}
.nav a:hover{ color:var(--ink); }
.nav a:hover::after{ width:100%; }

.util-switchers{
  display:flex;
  align-items:center;
  gap:.55rem;
}
.switch-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:38px; height:38px;
  padding-inline:.65rem;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--glass);
  font-size:0.8125rem;
  line-height:1;
  cursor:pointer;
  transition:border-color .3s var(--ease),background .3s var(--ease);
}
.switch-btn:hover{ border-color:var(--primary); background:var(--glass-hover); }

/* ---------- language flags ---------- */


.nav-toggle{
  display:none;
  width:38px; height:38px;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--glass);
  cursor:pointer;
  align-items:center;
  justify-content:center;
}

@media (max-width:900px){
  .nav{
    position:fixed;
    top:var(--header-h);
    inset-inline:0;
    flex-direction:column;
    align-items:flex-start;
    gap:1.1rem;
    margin:0;
    padding:1.6rem 1.5rem 2rem;
    background:var(--bg-raised);
    border-bottom:1px solid var(--line);
    transform:translateY(-140%);
    transition:transform .42s var(--ease);
  }
  .nav.is-open{ transform:translateY(0); }
  .nav-toggle{ display:inline-flex; }
  .header-inner{ justify-content:space-between; }
}

/* ============================================================
   8. HERO
============================================================ */

.hero{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}

/* The hero animates on load rather than on scroll — it is already in view,
   so the scroll observer would never fire for it. Each piece is staggered
   behind the one above it. */
.hero > *{ animation:heroRise .9s var(--ease) both; }
.hero > :nth-child(1){ animation-delay:.05s; }
.hero > :nth-child(2){ animation-delay:.15s; }
.hero > :nth-child(3){ animation-delay:.25s; }
.hero > :nth-child(4){ animation-delay:.33s; }
.hero > :nth-child(5){ animation-delay:.4s; }
@keyframes heroRise{
  from{ opacity:0; transform:translateY(24px); }
  to{ opacity:1; transform:translateY(0); }
}

img.hero-avatar{
  width:136px; height:136px;
  border-radius:50%;
  object-fit:cover;
  border:1px solid var(--line-strong);
  box-shadow:0 0 70px var(--primary-glow);
  margin-bottom:2rem;
}

/* The name is the loudest thing on the site, so it is worth the trouble.

   Two gradients are clipped to the letterforms at once. The lower one is a
   fixed vertical fade that gives the glyphs some dimension instead of a flat
   fill. The upper one is the sheen, wider than the text, and its position is
   what animates — so nothing reflows and nothing relayouts.

   The old sheen was white travelling through near-white letters, which is
   barely a change; the light theme only ever looked better because its band
   happened to be a different hue. So the band carries colour in both themes
   now: violet in, hot white core, blue out. */
.hero h1{
  position:relative;
  font-size:var(--t-hero);
  letter-spacing:.02em;
  line-height:.98;
  margin-bottom:0;

  --sheen-glow:rgba(60,140,255,.16);
  --sheen-glow-wide:rgba(120,60,255,.10);
  --sheen-glow-peak:rgba(120,60,255,.42);
  --sheen-glow-wide-peak:rgba(60,140,255,.24);

  /* The sheen is one tile of a repeating pattern: plain ink at both ends,
     the coloured band in the middle. The animation moves it by exactly one
     tile, so the last frame is the first frame and the loop has no seam —
     the colour rises, passes, and the letters settle back to plain ink
     before the next pass, instead of snapping back to where it started. */
  background:
    linear-gradient(
      100deg,
      var(--ink) 0%,
      var(--ink) 36%,
      var(--secondary) 45%,
      #FFFFFF 50%,
      var(--primary) 55%,
      var(--ink) 64%,
      var(--ink) 100%
    ),
    linear-gradient(
      180deg,
      #FFFFFF 0%,
      color-mix(in srgb,var(--ink) 78%,transparent) 100%
    );
  background-size:300% 100%,100% 100%;
  background-repeat:repeat-x,no-repeat;
  /* Where the sheen rests when the animation is off — mid-glyph, not
     parked off to one side. */
  background-position:50% 0,0 0;
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;

  /* The glow lives on ::before, not here. A filter on this element blurs a
     rectangle rather than the letters: Chromium applies the filter before the
     background is clipped to the text, so drop-shadow sees the full box and
     leaves a smudge behind the name. */
  isolation:isolate;

  /* Started part-way through its cycle, just before the band reaches the
     first letter, so the colour arrives with the page rather than seconds
     after it. The halo below runs on the same clock. */
  animation:heroRise .9s var(--ease) both, heroSheen 8s linear -2.6s infinite;
}

/* The halo. A copy of the name with transparent glyphs, so all that renders is
   its text-shadow — which follows the letterforms exactly and costs a great
   deal less than an animated blur. Only its opacity animates, which the
   compositor can do without repainting anything. */
.hero h1::before{
  content:attr(data-text);
  position:absolute;
  inset:0;
  z-index:-1;
  color:transparent;
  text-shadow:
    0 0 13px var(--sheen-glow-peak),
    0 0 38px var(--sheen-glow-wide-peak);
  opacity:.3;
  pointer-events:none;
  animation:heroGlow 8s ease-in-out -2.6s infinite;
}

/* The halo swells as the bright core crosses the letters and settles once it
   has passed, so it reads as a reflection rather than as a lamp someone left
   switched on. */
@keyframes heroGlow{
  0%,36%{ opacity:.3; }
  67%{ opacity:1; }
  97%,100%{ opacity:.3; }
}
/* 150% moves a 300%-wide tile by exactly its own width: with the image three
   times the box, each percent of position is 2% of the box. */
@keyframes heroSheen{
  0%{ background-position:150% 0,0 0; }
  100%{ background-position:0% 0,0 0; }
}

/* Light theme keeps the blue pass that already worked, over dark letterforms
   rather than pale ones, and its halo is pulled right down — a violet bloom
   that reads as neon on black turns to mud on cream. */
[data-theme="light"] .hero h1{
  --sheen-glow:rgba(11,98,228,.10);
  --sheen-glow-wide:rgba(120,60,255,.05);
  --sheen-glow-peak:rgba(11,98,228,.22);
  --sheen-glow-wide-peak:rgba(120,60,255,.12);

  background:
    linear-gradient(
      100deg,
      var(--ink) 0%,
      var(--ink) 36%,
      var(--secondary) 45%,
      var(--primary) 52%,
      var(--ink) 64%,
      var(--ink) 100%
    ),
    linear-gradient(
      180deg,
      var(--ink) 0%,
      color-mix(in srgb,var(--ink) 72%,transparent) 100%
    );
  background-size:300% 100%,100% 100%;
  background-repeat:repeat-x,no-repeat;
  background-position:50% 0,0 0;
  -webkit-background-clip:text;
  background-clip:text;
}

.tagline{
  margin-top:1.5rem;
  max-width:46ch;
  font-size:1.08rem;
}
.bio-short{
  margin-top:.7rem;
  max-width:58ch;
  font-size:.94rem;
  color:var(--ink-muted);
}
.warning-text{
  margin-top:1.7rem;
  padding:.55rem 1.2rem;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--glass);
  font-size:.82rem;
  color:var(--ink-faint);
}

.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:.8rem;
  justify-content:center;
  margin-top:2.2rem;
}

/* A quiet nudge that there is more below — the hero fills the screen, and
   without this the fold reads as the end of the page. */
.scroll-cue{
  display:block;
  width:1px;
  height:52px;
  margin-top:3rem;
  background:linear-gradient(180deg,transparent,var(--ink-faint),transparent);
  background-size:100% 200%;
  animation:cueSlide 2.6s ease-in-out infinite;
}
@keyframes cueSlide{
  0%,100%{ background-position:0 -100%; opacity:.35; }
  50%{ background-position:0 100%; opacity:1; }
}

/* ============================================================
   9. BUTTONS
============================================================ */

.btn-solid,.btn-ghost{
  display:inline-block;
  padding:.85rem 1.8rem;
  border-radius:999px;
  border:1px solid transparent;
  font-family:var(--font-display);
  font-size:0.8125rem;
  font-weight:600;
  letter-spacing:.09em;
  text-transform:uppercase;
  cursor:pointer;
  transition:transform .3s var(--ease),box-shadow .3s var(--ease),border-color .3s var(--ease);
}
.btn-solid{
  background:linear-gradient(135deg,var(--primary),var(--secondary));
  color:#fff;
}
.btn-solid:hover{ transform:translateY(-2px); box-shadow:0 10px 32px var(--primary-glow); }
.btn-ghost{ border-color:var(--line-strong); }
.btn-ghost:hover{ border-color:var(--primary); }

.back-link{
  display:inline-block;
  font-size:.85rem;
  color:var(--ink-muted);
  transition:color .3s var(--ease);
}
.back-link:hover{ color:var(--ink); }

/* ============================================================
   10. CARDS
============================================================ */

.teaser-grid,.project-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
  gap:1.1rem;
  margin-top:1.8rem;
}

.teaser-card,.project-card,.work-card{
  display:block;
  border-radius:var(--radius);
  border:1px solid var(--line);
  background:var(--glass);
  transition:border-color .35s var(--ease),background .35s var(--ease),transform .35s var(--ease);
}
.teaser-card:hover{
  border-color:var(--line-strong);
  background:var(--glass-hover);
  transform:translateY(-3px);
}

.teaser-card{ padding:1.6rem 1.4rem; }
.teaser-card h3{
  font-size:.9rem;
  letter-spacing:.12em;
  text-transform:uppercase;
  margin-bottom:.65rem;
}
.teaser-card p{ color:var(--ink-muted); font-size:.9rem; }

/* ---------- project card ---------- */

.project-card{
  --project-accent:var(--primary);
  position:relative;
  padding:1.7rem 1.5rem;
  overflow:hidden;
  isolation:isolate;
}
.project-card::before{
  content:'';
  position:absolute;
  inset-block:0;
  inset-inline-start:0;
  width:3px;
  background:var(--project-accent);
  opacity:.8;
  transition:width .35s var(--ease),opacity .35s var(--ease);
}
/* The brand's own colour blooms from the corner on hover, so each card
   lights up in its own hue rather than a shared generic highlight. */
.project-card::after{
  content:'';
  position:absolute;
  inset:0;
  z-index:-1;
  background:radial-gradient(130% 100% at 0% 0%,var(--project-accent) 0%,transparent 58%);
  opacity:0;
  transition:opacity .45s var(--ease);
}
html[dir="rtl"] .project-card::after{
  background:radial-gradient(130% 100% at 100% 0%,var(--project-accent) 0%,transparent 58%);
}
.project-card:hover{
  border-color:color-mix(in srgb,var(--project-accent) 50%,transparent);
  background:var(--glass-hover);
  transform:translateY(-5px);
  box-shadow:0 18px 45px rgba(0,0,0,.35);
}
.project-card:hover::before{ width:5px; opacity:1; }
.project-card:hover::after{ opacity:.14; }

/* The name slides just enough to feel like it responded. */
.project-card__name{ transition:transform .35s var(--ease); }
.project-card:hover .project-card__name{ transform:translateX(3px); }
html[dir="rtl"] .project-card:hover .project-card__name{ transform:translateX(-3px); }

.project-card__logo{
  width:46px; height:46px;
  object-fit:contain;
  margin-bottom:1rem;
}
.project-card__name{
  font-size:1.14rem;
  letter-spacing:.07em;
}
.project-card__kind{
  margin-top:.35rem;
  font-size:var(--t-label);
  letter-spacing:.2em;
  text-transform:uppercase;
  color:var(--project-accent);
}
.project-card__tagline{
  margin-top:.85rem;
  font-size:.9rem;
  color:var(--ink-muted);
}
.project-card__external{
  display:inline-block;
  margin-top:1rem;
  font-size:0.8125rem;
  letter-spacing:.08em;
  color:var(--project-accent);
}

/* ---------- card background image ----------
   The photo is atmosphere behind the name, not something the visitor is meant
   to look at — the way an artist header works on a streaming service. Three
   things do that job together: the image is desaturated and pulled far below
   the brightness of the text, a scrim thickens toward the bottom edge where
   the text sits, and the brand accent still bleeds over the top. Any one of
   them alone is not enough; CHANG CAST's artwork is red on bright blue, and
   dimming without a scrim just leaves a dark blue rectangle still shouting.

   Shared on purpose: .project-card is the grid on /projects/, .project-tile is
   the bento on the home page, and they should not drift apart. */

.project-card__bg,
.project-tile__bg{
  position:absolute;
  inset:0;
  z-index:-2;
  border-radius:inherit;
  overflow:hidden;
  pointer-events:none;
}
.project-card__bg img,
.project-tile__bg img{
  width:100%;
  height:100%;
  object-fit:cover;
  filter:grayscale(.28) brightness(.58) contrast(1.06);
  /* Slightly overscaled so the hover zoom never exposes an edge. */
  transform:scale(1.04);
  transition:filter .55s var(--ease),transform .7s var(--ease);
}

/* Dimming alone leaves bright patches wherever the photo had highlights, and
   text lands on them unpredictably. The scrim is what actually guarantees
   legibility, so it is the strongest at the bottom where every card writes. */
.project-card__bg::after,
.project-tile__bg::after{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(
    180deg,
    rgba(4,4,6,.20) 0%,
    rgba(4,4,6,.44) 42%,
    rgba(4,4,6,.80) 100%
  );
}

/* The two card types write at opposite edges. .project-tile stacks its text
   against the bottom, .project-card starts at the top, so the same scrim that
   protects one leaves the other's title sitting on whatever the photo happens
   to put there — KOTIZGOY's is a brightly lit hand. Weight it to match. */
.project-card__bg::after{
  background:linear-gradient(
    180deg,
    rgba(4,4,6,.72) 0%,
    rgba(4,4,6,.42) 62%,
    rgba(4,4,6,.60) 100%
  );
}

/* Enough of a lift to feel alive under the cursor, still nowhere near the
   brightness of the text. */
.project-card.has-cover:hover .project-card__bg img,
.project-tile.has-cover:hover .project-tile__bg img{
  filter:grayscale(.08) brightness(.76) contrast(1.06);
  transform:scale(1.09);
}

/* A translucent card surface behind a photo reads as haze, and shows through
   as a pale flash before the image decodes. Covered cards sit on solid ink and
   let the scrim be the surface instead. */
.project-card.has-cover,
.project-card.has-cover:hover,
.project-tile.has-cover,
.project-tile.has-cover:hover{ background-color:#0A0A0C; }

/* Light theme keeps the dark treatment rather than mirroring it.

   Bleaching the photo and turning the scrim white was the obvious move and it
   was wrong: washed to that degree the image stops being a background and
   becomes a haze over the card, and every one of the five ends up the same
   pale grey regardless of what it is a picture of.

   So a covered card stays a piece of dark media sitting on a light page —
   which is what a streaming service does with artwork too. Redefining the ink
   tokens on the card relights everything inside it, because the name, the
   tagline and the kind label all read those tokens already. */
[data-theme="light"] .project-card.has-cover,
[data-theme="light"] .project-tile.has-cover{
  --ink:#F5F1EC;
  --ink-muted:#A3A19D;
  color:var(--ink);
  border-color:rgba(10,10,12,.12);
  box-shadow:0 10px 30px rgba(10,10,12,.13);
}
[data-theme="light"] .project-card.has-cover:hover,
[data-theme="light"] .project-tile.has-cover:hover{
  box-shadow:0 18px 44px rgba(10,10,12,.22);
}

/* ---------- project detail ---------- */

/* Set inline from the model in projects/detail.html, so everything below can
   read it without knowing which project it is. This declaration is only the
   floor for a project that has no colour saved. */
.project-page{ --project-accent:var(--primary); }

/* Every button on a project's page wears that project's colour, including the
   two that are shared with the rest of the site. Without these, the "Send a
   request" button under KOTIZGOY's teal page came out in the site's blue. */
.project-page .btn-solid{
  background:linear-gradient(135deg,var(--project-accent),color-mix(in srgb,var(--project-accent) 55%,var(--secondary)));
}
.project-page .btn-solid:hover{
  box-shadow:0 10px 32px color-mix(in srgb,var(--project-accent) 45%,transparent);
}
.project-page .btn-ghost:hover{ border-color:var(--project-accent); }
/* The short rule above each section heading, in the project's colour rather
   than the site's — otherwise a teal page has a blue mark on every heading. */
.project-page h2::before{
  background:linear-gradient(90deg,var(--project-accent),color-mix(in srgb,var(--project-accent) 35%,transparent));
}
.project-page .back-link:hover{ color:var(--project-accent); }
.project-page .contact-project a:hover{ color:var(--project-accent); }

.project-hero{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}
.project-hero__logo{
  width:84px; height:84px;
  object-fit:contain;
  margin-bottom:1.5rem;
}
.project-hero__name{
  font-size:var(--t-h1);
  letter-spacing:.05em;
}
.project-hero__kind{
  margin-top:.8rem;
  font-size:var(--t-label);
  letter-spacing:.3em;
  text-transform:uppercase;
  color:var(--project-accent);
}
.project-hero__tagline{
  margin-top:1.1rem;
  max-width:52ch;
  font-size:1.05rem;
  color:var(--ink-muted);
}
.project-body{ max-width:66ch; font-size:1.08rem; color:var(--ink-muted); }
/* The links' last block ends the section; its own margin would only widen
   the gap above the description. */
.project-links .category-block:last-child{ margin-bottom:0; }

/* The way to get in touch: a card the width of the page, under the
   description (it was once a narrow column beside it, which left most of
   the other column empty). */
.project-body + .project-contact{ margin-top:32px; }
.project-contact{
  padding:24px;
  border:1px solid color-mix(in srgb,var(--project-accent) 28%,var(--line));
  border-radius:var(--radius);
  background:
    radial-gradient(120% 80% at 100% 0%,color-mix(in srgb,var(--project-accent) 12%,transparent),transparent 60%),
    var(--glass);
}
.project-contact h2{ font-size:1.25rem; margin-bottom:0; }
.project-contact__head .contact-project{ margin-top:16px; }
.project-contact .service-list{ margin:24px 0; }

/* ---------- work grid ---------- */

.work-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(210px,1fr));
  gap:1rem;
  margin-top:1.5rem;
}
.work-card{ padding:1.1rem; border-radius:var(--radius-sm); }
a.work-card:hover{
  border-color:color-mix(in srgb,var(--project-accent) 45%,transparent);
  background:var(--glass-hover);
  transform:translateY(-3px);
}
.work-card__cover{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  border-radius:calc(var(--radius-sm) - 4px);
  margin-bottom:.9rem;
}
.work-card__title{ font-size:.98rem; }
.work-card__kind{
  margin-top:.3rem;
  font-size:0.8125rem;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--project-accent);
}
.work-card__desc{
  margin-top:.6rem;
  font-size:.85rem;
  color:var(--ink-muted);
}

/* ============================================================
   10b. HOME — bento, now playing, quick links
============================================================ */

.section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:1rem;
  flex-wrap:wrap;
}
.section-head h2{ margin-bottom:0; }
.section-head__link{
  font-size:0.8125rem;
  letter-spacing:.06em;
  color:var(--ink-muted);
  transition:color .3s var(--ease);
}
.section-head__link:hover{ color:var(--primary); }

/* ---------- bento ----------
   Five equal boxes read as a list and gave the page no focal point. The
   lead tile is twice the size, so the eye lands somewhere first. */
.project-bento{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  grid-auto-rows:minmax(148px,auto);
  gap:.9rem;
  margin-top:1.8rem;
}
.project-bento > :first-child{
  grid-column:span 2;
  grid-row:span 2;
}

.project-tile{
  --project-accent:var(--primary);
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  gap:.15rem;
  padding:1.4rem;
  border-radius:var(--radius);
  border:1px solid var(--line);
  background:var(--glass);
  overflow:hidden;
  isolation:isolate;
  transition:border-color .4s var(--ease),transform .4s var(--ease),box-shadow .4s var(--ease);
}
.project-tile:hover{
  border-color:color-mix(in srgb,var(--project-accent) 55%,transparent);
  transform:translateY(-4px);
  box-shadow:0 20px 50px rgba(0,0,0,.4);
}

/* The accent bleeds up from the bottom edge, so each tile is coloured by its
   own brand rather than by a shared highlight. */
.project-tile__glow{
  position:absolute;
  inset:0;
  z-index:-1;
  background:linear-gradient(0deg,var(--project-accent) -40%,transparent 62%);
  opacity:.16;
  transition:opacity .45s var(--ease);
}
.project-tile:hover .project-tile__glow{ opacity:.38; }

.project-tile__logo{
  width:38px; height:38px;
  object-fit:contain;
  margin-bottom:auto;
}
.project-tile__kind{
  font-size:0.8125rem;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:var(--project-accent);
}
.project-tile__name{
  font-family:var(--font-display);
  font-size:1.15rem;
  font-weight:700;
  letter-spacing:.06em;
  line-height:1.15;
  text-wrap:balance;
}
.project-tile--lead .project-tile__name{ font-size:clamp(1.6rem,3.4vw,2.5rem); }
.project-tile__tagline{
  margin-top:.5rem;
  max-width:34ch;
  font-size:.92rem;
  color:var(--ink-muted);
}
.project-tile__go{
  position:absolute;
  top:1.2rem;
  inset-inline-end:1.2rem;
  font-size:1.05rem;
  color:var(--project-accent);
  opacity:0;
  transform:translateX(-4px);
  transition:opacity .35s var(--ease),transform .35s var(--ease);
}
.project-tile:hover .project-tile__go{ opacity:1; transform:translateX(0); }

@media (max-width:900px){
  .project-bento{ grid-template-columns:repeat(2,1fr); }
  .project-bento > :first-child{ grid-column:span 2; grid-row:span 1; }
}
@media (max-width:520px){
  .project-bento{ grid-template-columns:1fr; }
  .project-bento > :first-child{ grid-column:span 1; }
}

/* ---------- now playing ---------- */

.now-playing{
  display:flex;
  align-items:center;
  gap:1.1rem;
  margin-top:1.8rem;
  padding:1rem 1.3rem;
  border-radius:var(--radius);
  border:1px solid var(--line);
  background:var(--glass);
  transition:border-color .35s var(--ease),background .35s var(--ease);
}
.now-playing:hover{ border-color:var(--primary); background:var(--glass-hover); }
.now-playing__cover{
  width:56px; height:56px;
  border-radius:var(--radius-sm);
  object-fit:cover;
  flex-shrink:0;
}
.now-playing__bars{
  display:flex;
  align-items:flex-end;
  gap:2px;
  height:18px;
}
.now-playing__bars i{
  width:2.5px;
  border-radius:2px;
  background:var(--primary);
  animation:eq 1.1s ease-in-out infinite;
}
.now-playing__bars i:nth-child(1){ height:40%; animation-delay:0s; }
.now-playing__bars i:nth-child(2){ height:85%; animation-delay:.18s; }
.now-playing__bars i:nth-child(3){ height:60%; animation-delay:.36s; }
.now-playing__bars i:nth-child(4){ height:95%; animation-delay:.5s; }
@keyframes eq{
  0%,100%{ transform:scaleY(.35); }
  50%{ transform:scaleY(1); }
}
.now-playing__meta{ min-width:0; }
.now-playing__title{
  display:block;
  font-family:var(--font-display);
  font-weight:700;
}
.now-playing__artist{
  display:block;
  font-size:.85rem;
  color:var(--ink-muted);
}
.now-playing__cta{
  margin-inline-start:auto;
  font-size:0.8125rem;
  letter-spacing:.06em;
  color:var(--primary);
  white-space:nowrap;
}

/* ---------- quick links ---------- */

.quick-links{
  display:flex;
  flex-wrap:wrap;
  gap:.6rem;
  margin-top:1.4rem;
}
.quick-link{
  display:inline-flex;
  align-items:center;
  gap:.55rem;
  padding:.65rem 1.2rem;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--glass);
  font-size:.88rem;
  color:var(--ink-muted);
  transition:all .3s var(--ease);
}
.quick-link:hover{
  color:var(--ink);
  border-color:var(--primary);
  background:var(--glass-hover);
  transform:translateY(-2px);
}

/* ============================================================
   11. ABOUT
============================================================ */

img.about-portrait{
  width:100%;
  max-width:340px;
  aspect-ratio:4/5;
  object-fit:cover;
  border-radius:var(--radius);
  border:1px solid var(--line);
  margin-bottom:2rem;
}
/* One large photo with the rest packed around it, the way an artist page
   handles a gallery. Deliberately the same idea as the project bento so the
   two sections look like they came from the same site — but on a six-column
   track, because photos are the content here rather than labels for
   somewhere else, and they want to be bigger.

   The lead spans three columns and two rows; everything after it takes one
   cell. With a single photo that still resolves to one large image, so the
   page is not waiting on a second upload to look finished. */
/* Clipped to a couple of rows until asked otherwise. The clip lives here and
   not on the grid, because a ::after on a grid becomes a grid item and the
   fade would be given a cell of its own. */
.photo-wall-wrap{ position:relative; }
.photo-wall-wrap.is-clipped{
  max-height:420px;
  overflow:hidden;
}
.photo-wall-wrap.is-clipped::after{
  content:'';
  position:absolute;
  inset-inline:0;
  bottom:0;
  height:150px;
  pointer-events:none;
  background:linear-gradient(0deg,var(--bg) 8%,transparent);
}

.photo-wall{
  display:grid;
  grid-template-columns:repeat(6,1fr);
  grid-auto-rows:124px;
  gap:.6rem;
  /* Photos of different proportions take different numbers of cells, which
     leaves holes wherever the next one does not fit. dense backfills them, so
     the wall stays solid instead of gap-toothed. */
  grid-auto-flow:dense;
}

/* Each photo takes the cell its own proportions ask for — a portrait two rows
   tall, a landscape two columns wide. A grid of equal squares would crop every
   portrait through the chin. */
.photo-wall__item--tall{ grid-row:span 2; }
.photo-wall__item--wide{ grid-column:span 2; }
.photo-wall__item{
  position:relative;
  overflow:hidden;
  border-radius:var(--radius-sm);
  border:1px solid var(--line);
  background:var(--glass);
}
/* Three rows rather than two: at two the lead cell is nearly two and a half
   times as wide as it is tall, and a square photograph put through that loses
   most of itself top and bottom. */
.photo-wall__item:first-child{
  grid-column:span 3;
  grid-row:span 3;
  border-radius:var(--radius);
}
.photo-wall__open{
  display:block;
  width:100%;
  height:100%;
  padding:0;
  border:0;
  background:none;
  cursor:zoom-in;
}
.photo-wall__item img{
  width:100%;
  height:100%;
  object-fit:cover;
  /* Biased above centre. The cell is rarely the photo's own proportions, and
     centring the crop cuts the top off a head — these are almost all
     portraits, where the face sits in the upper half. */
  object-position:center 30%;
  display:block;
  transition:transform .5s var(--ease);
}
.photo-wall__item:hover img{ transform:scale(1.05); }

.photo-wall__more{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  margin-top:1.1rem;
  padding:.6rem 1.3rem;
  border-radius:999px;
  border:1px solid var(--line-strong);
  background:var(--glass);
  font-size:.82rem;
  letter-spacing:.04em;
  cursor:pointer;
  transition:border-color .3s var(--ease),background .3s var(--ease);
}
.photo-wall__more:hover{ border-color:var(--primary); background:var(--glass-hover); }
.photo-wall__more svg{ transition:transform .3s var(--ease); }
.photo-wall__more[aria-expanded="true"] svg{ transform:rotate(180deg); }

.photo-wall figcaption{
  position:absolute;
  inset-inline:0;
  bottom:0;
  padding:1.6rem .8rem .6rem;
  font-size:0.8125rem;
  line-height:1.35;
  color:#F5F1EC;
  background:linear-gradient(0deg,rgba(4,4,6,.85),transparent);
  opacity:0;
  transition:opacity .35s var(--ease);
}
.photo-wall__item:hover figcaption{ opacity:1; }

@media (max-width:760px){
  .photo-wall{ grid-template-columns:repeat(4,1fr); grid-auto-rows:104px; }
  .photo-wall__item:first-child{ grid-column:span 4; grid-row:span 2; }
  .photo-wall-wrap.is-clipped{ max-height:330px; }
}

/* ---------- lightbox ---------- */

.lightbox{
  position:fixed;
  inset:0;
  z-index:300;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  padding:clamp(1rem,4vw,3rem);
  background:color-mix(in srgb,#050505 82%,transparent);
  backdrop-filter:blur(22px) saturate(140%);
  -webkit-backdrop-filter:blur(22px) saturate(140%);
  animation:overlayIn .28s var(--ease) both;
}
.lightbox[hidden]{ display:none; }

.lightbox__frame{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:.9rem;
  min-width:0;
}
.lightbox__image{
  max-width:min(100%,1100px);
  /* Room left under it for the caption line, so a tall photograph does not
     push the caption off the bottom of the screen. */
  max-height:calc(100dvh - 9rem);
  object-fit:contain;
  border-radius:var(--radius-sm);
  box-shadow:0 30px 80px rgba(0,0,0,.6);
  animation:modalIn .34s var(--ease) both;
}
.lightbox__meta{
  display:flex;
  align-items:center;
  gap:.9rem;
  font-size:0.8125rem;
  color:var(--ink-muted);
}
.lightbox__count{ font-family:var(--font-mono); color:var(--ink-faint); }

/* Left is previous in both directions. Mirroring these with the writing
   direction makes a photo viewer feel broken to anyone who has used one. */
.lightbox__nav,
.lightbox__close{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:none;
  border-radius:999px;
  border:1px solid var(--line);
  background:color-mix(in srgb,var(--bg-raised) 70%,transparent);
  color:var(--ink-muted);
  cursor:pointer;
  transition:color .3s var(--ease),border-color .3s var(--ease),background .3s var(--ease);
}
.lightbox__nav{ width:46px; height:46px; }
.lightbox__nav:hover,
.lightbox__close:hover{ color:var(--ink); border-color:var(--line-strong); background:var(--glass-hover); }

.lightbox__close{
  position:absolute;
  top:1.1rem;
  right:1.2rem;
  width:40px; height:40px;
  font-size:1.5rem;
  line-height:1;
}

@media (max-width:640px){
  .lightbox{ gap:.2rem; padding:.8rem; }
  .lightbox__nav{ width:38px; height:38px; }
  .lightbox__image{ max-height:calc(100dvh - 8rem); }
}

.about-text p{ color:var(--ink-muted); font-size:1.05rem; }

/* "Core Projects & Subdivisions" — a list, not cards. The projects page is
   already built out of cards, and repeating that shape here would read as the
   same section printed twice. A rule down the start edge in each brand's own
   colour separates them with less furniture. */
.about-divisions__heading{
  margin-top:2.8rem;
  font-size:var(--t-label);
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--ink-muted);
}
.about-divisions{ list-style:none; margin:1.3rem 0 0; padding:0; }
.about-division{
  --project-accent:var(--primary);
  margin-top:1.2rem;
  padding-inline-start:1.1rem;
  border-inline-start:2px solid var(--project-accent);
}
.about-division__head{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:.7rem;
  margin:0;
}
.about-division__name{
  font-family:var(--font-display);
  font-weight:700;
  font-size:.98rem;
  letter-spacing:.1em;
}
.about-division__kind{
  font-size:0.8125rem;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--project-accent);
}
.about-division__text{ margin:.35rem 0 0; color:var(--ink-muted); font-size:.95rem; }

/* The motto closes the page, so it gets air above it and nothing after. */
.about-motto{ margin-top:2.8rem; }

/* Same reason as the contact address: the motto is Cyrillic, `plaintext`
   would hand its line an LTR direction of its own, and it would drift to the
   far side of the column away from the label introducing it. The dir="auto"
   in the template keeps the Russian reading correctly inside the line. */
html[dir="rtl"] .about-motto{ unicode-bidi:isolate; }
.about-motto__lead{
  display:block;
  font-size:var(--t-label);
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--ink-muted);
  margin-bottom:.45rem;
}
.about-motto__text{
  font-family:var(--font-display);
  font-size:1.02rem;
  letter-spacing:.04em;
  color:var(--ink);
}

.skill-years{
  margin-top:.6rem;
  font-size:0.8125rem;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--primary);
}

/* ============================================================
   12. LINKS PAGE
============================================================ */

#linkSearch{
  width:100%;
  max-width:420px;
  padding:.8rem 1.15rem;
  margin-bottom:2rem;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--glass);
  color:var(--ink);
  font-family:inherit;
}
#linkSearch:focus{ outline:none; border-color:var(--primary); }

.category-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:.55rem;
  margin-bottom:2.5rem;
}
.category-tab{
  padding:.5rem 1.1rem;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--glass);
  font-size:0.8125rem;
  cursor:pointer;
  transition:all .3s var(--ease);
}
.category-tab:hover{ border-color:var(--project-accent,var(--line-strong)); }
.category-tab.is-active{
  background:var(--project-accent,var(--primary));
  border-color:var(--project-accent,var(--primary));
  color:#fff;
}

.category-block{ margin-bottom:2.6rem; }
.category-block h2,
.category-block h3{
  font-size:1.08rem;
  margin-bottom:1rem;
  padding-bottom:.6rem;
  border-bottom:1px solid var(--line);
}

.links-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
  gap:.7rem;
}
.link-card{
  display:flex;
  align-items:center;
  gap:.8rem;
  padding:.85rem 1.1rem;
  border-radius:var(--radius-sm);
  border:1px solid var(--line);
  background:var(--glass);
  font-size:.92rem;
  transition:all .3s var(--ease);
}
/* Hovering a link says which brand it belongs to, not which company hosts it.
   The category's project colour comes first, so this page highlights exactly
   as a project's own page does: every link under SAMYAR glows SAMYAR's indigo
   whether it is Kick, Steam or GameUp.

   The platform's own colour (set inline per link from links/platforms.py) is
   only the fallback, for the categories that belong to no brand — Music
   Platforms, Social Media, Support — where there is no project colour to use
   and a single site accent would say nothing at all. The site accent is the
   last resort.

   None of the three is declared on this element: a declaration here would beat
   every inherited value and the whole arrangement would collapse to one
   colour. */
.link-card:hover{
  border-color:var(--project-accent,var(--link-accent,var(--primary)));
  background:var(--glass-hover);
  color:var(--project-accent,var(--link-accent,var(--primary)));
  box-shadow:0 8px 30px -16px var(--project-accent,var(--link-accent,var(--primary)));
  transform:translateX(3px);
}

/* Stands in for a mark the site is not allowed to ship. Sized and spaced to
   match .link-card__icon exactly so a row containing one does not visibly
   step out of line. */
.link-card__mono{
  display:grid;
  place-items:center;
  width:22px;
  height:22px;
  flex-shrink:0;
  border-radius:6px;
  border:1px solid currentColor;
  font-family:var(--font-display);
  font-size:0.8125rem;
  font-weight:700;
  line-height:1;
  opacity:.72;
  transition:opacity .3s var(--ease);
}
.link-card:hover .link-card__mono{ opacity:1; }
html[dir="rtl"] .link-card:hover{ transform:translateX(-3px); }

/* Every logo reduced to its silhouette in one ink. The files behind these are
   a mixture of flat-colour PNGs, gradients and SVGs; masking is what makes a
   row of them read as one set instead of as a ransom note. Slightly dimmed at
   rest so the labels lead, full strength on hover. */
.link-card__icon{
  width:22px;
  height:22px;
  flex-shrink:0;
  background:currentColor;
  opacity:.72;
  -webkit-mask:var(--icon) no-repeat center / contain;
  mask:var(--icon) no-repeat center / contain;
  transition:opacity .3s var(--ease);
}
.link-card:hover .link-card__icon{ opacity:1; }

/* ============================================================
   13. WALLETS
   The app's design, drawn the same way here so a wallet looks like itself
   on every device: one card per coin in the coin's own colour, and a QR
   panel that takes that colour too — its title, its mark, the ring round
   the code and the end of the address.
============================================================ */

.wallet-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr));
  gap:1rem;
  margin-top:1.8rem;
}

/* --coin is the card's own brand colour, set from the model; a ticker the
   site does not know keeps the site accent. --coin-ink is the same colour,
   except for the one coin where it cannot be: Ethereum's brand grey #3D3E3F
   is very nearly this background, so its mark and labels use a lighter grey
   on the dark theme while the glow keeps the exact brand colour. */
.wallet,.qr-dialog__panel{
  --coin:var(--primary);
  --coin-ink:var(--coin);
}
.wallet[data-coin="ETH"],
.qr-dialog__panel[data-coin="ETH"]{ --coin-ink:#9AA0A6; }
[data-theme="light"] .wallet[data-coin="ETH"],
[data-theme="light"] .qr-dialog__panel[data-coin="ETH"]{ --coin-ink:var(--coin); }

.wallet{
  position:relative;
  display:grid;
  gap:.95rem;
  padding:1.25rem;
  border-radius:var(--radius);
  border:1px solid var(--line);
  background:var(--glass);
  overflow:hidden;
  isolation:isolate;
  transition:border-color .35s var(--ease),transform .35s var(--ease),box-shadow .35s var(--ease);
}
.wallet::before{
  content:'';
  position:absolute;
  inset:0;
  z-index:-1;
  background:radial-gradient(ellipse 70% 80% at 100% 0%,color-mix(in srgb,var(--coin) 18%,transparent),transparent 65%);
  pointer-events:none;
  transition:opacity .35s var(--ease);
}
.wallet:hover{
  border-color:color-mix(in srgb,var(--coin) 55%,transparent);
  transform:translateY(-3px);
  box-shadow:0 18px 40px -22px var(--coin);
}

.wallet__head{
  display:flex;
  align-items:center;
  gap:.7rem;
}
.wallet__mark{
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  flex:none;
  border-radius:13px;
  background:color-mix(in srgb,var(--coin) 16%,transparent);
  color:var(--coin-ink);
  transition:transform .35s var(--ease);
}
.wallet:hover .wallet__mark{ transform:scale(1.05); }
.wallet__mark svg{ width:24px; height:24px; }
.wallet__ticker{
  font-family:var(--font-display);
  font-size:1.1rem;
  font-weight:700;
  color:var(--coin-ink);
}
.wallet__name{ font-weight:600; }

.wallet__address{
  display:flex;
  min-width:0;
  max-width:none;
  padding:.65rem .8rem;
  border-radius:var(--radius-sm);
  background:rgba(0,0,0,.28);
  border:1px solid var(--line);
  font-family:var(--font-mono);
  font-size:0.8125rem;
  color:var(--ink-faint);
  direction:ltr;
  unicode-bidi:isolate;
}
[data-theme="light"] .wallet__address{ background:rgba(0,0,0,.04); }
.wallet__address > :first-child{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
/* The last eight characters, which are what people check an address against,
   in the coin's own colour. */
.wallet__address-tail{
  flex:none;
  color:var(--coin-ink);
  font-weight:600;
}

.wallet__actions{ display:flex; gap:.5rem; }
.wallet__chip{
  flex:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.45rem;
  min-height:40px;
  padding:.45rem 1rem;
  border-radius:999px;
  border:1px solid color-mix(in srgb,var(--coin) 32%,transparent);
  background:color-mix(in srgb,var(--coin) 6%,transparent);
  color:var(--coin-ink);
  font-size:.85rem;
  font-weight:500;
  cursor:pointer;
  transition:background .25s var(--ease),border-color .25s var(--ease),transform .16s var(--ease);
}
.wallet__chip:hover{
  background:color-mix(in srgb,var(--coin) 16%,transparent);
  border-color:color-mix(in srgb,var(--coin) 60%,transparent);
}
.wallet__chip:active{ transform:scale(.96); }
.wallet__chip.is-done{ background:color-mix(in srgb,var(--coin) 22%,transparent); }

/* ---------- QR panel ---------- */

.qr-dialog{
  position:fixed;
  inset:0;
  z-index:200;
  display:grid;
  place-items:center;
  padding:1.5rem;
  background:rgba(0,0,0,.55);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  opacity:0;
  transition:opacity .25s var(--ease);
}
.qr-dialog[hidden]{ display:none; }
.qr-dialog.is-open{ opacity:1; }
html.has-dialog{ overflow:hidden; }

.qr-dialog__panel{
  position:relative;
  width:min(420px,100%);
  max-height:calc(100dvh - 3rem);
  overflow:auto;
  padding:1.1rem 1.4rem 1.5rem;
  border-radius:28px;
  border:1px solid color-mix(in srgb,var(--coin) 26%,var(--line));
  background:
    radial-gradient(ellipse 90% 55% at 50% 0%,color-mix(in srgb,var(--coin) 14%,transparent),transparent 70%),
    var(--bg-raised);
  box-shadow:0 30px 80px rgba(0,0,0,.55);
  transform:translateY(18px) scale(.97);
  transition:transform .3s cubic-bezier(.2,1.2,.4,1);
}
.qr-dialog.is-open .qr-dialog__panel{ transform:none; }

.qr-dialog__head{
  display:flex;
  align-items:center;
  gap:.6rem;
  margin-bottom:1.2rem;
}
.qr-title{
  flex:1;
  display:inline-flex;
  align-items:center;
  gap:.55rem;
  margin:0;
  padding:0;
  font-size:1.12rem;
  color:var(--coin-ink);
}
.qr-title::before{ content:none !important; }
.qr-title__mark{ flex:none; color:var(--coin-ink); }

/* A real button with a real hit area, on top of everything in the panel. */
.qr-dialog__close{
  position:relative;
  z-index:1;
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  flex:none;
  border:0;
  border-radius:999px;
  background:color-mix(in srgb,var(--ink) 8%,transparent);
  color:var(--ink-muted);
  cursor:pointer;
  transition:background .2s var(--ease),color .2s var(--ease),transform .16s var(--ease);
}
.qr-dialog__close:hover{ background:color-mix(in srgb,var(--ink) 15%,transparent); color:var(--ink); }
.qr-dialog__close:active{ transform:scale(.92); }

/* The card the code is printed on. The white belongs to the card — the SVG
   draws no background — so the corner radius is real, the padding is the
   quiet zone, and the coin's colour rings the edge. */
.qr-card{
  position:relative;
  width:min(300px,100%);
  margin:.2rem auto 1.2rem;
  padding:18px;
  border-radius:26px;
  background:#fff;
  box-shadow:
    0 20px 44px rgba(0,0,0,.38),
    0 0 0 1px color-mix(in srgb,var(--coin) 45%,transparent),
    0 0 0 7px color-mix(in srgb,var(--coin) 12%,transparent);
}
.qr-card::before{
  content:'';
  position:absolute;
  inset:-18%;
  z-index:-1;
  border-radius:50%;
  background:radial-gradient(circle,color-mix(in srgb,var(--coin) 32%,transparent),transparent 68%);
  filter:blur(26px);
  pointer-events:none;
}
.qr-card__code svg{ display:block; width:100%; height:auto; }

.qr-card__address{
  max-width:none;
  margin-bottom:1.1rem;
  font-family:var(--font-mono);
  font-size:0.8125rem;
  line-height:1.7;
  color:var(--ink-faint);
  text-align:center;
  word-break:break-all;
}
.qr-card__address strong{ color:var(--coin-ink); font-weight:700; }

.qr-dialog__copy{
  display:flex;
  width:100%;
  justify-content:center;
  align-items:center;
  gap:.5rem;
  border:0;
  cursor:pointer;
  background:linear-gradient(135deg,var(--coin),color-mix(in srgb,var(--coin) 60%,var(--secondary)));
  box-shadow:0 10px 28px -10px var(--coin);
}
.qr-dialog__copy:hover{ box-shadow:0 14px 34px -10px var(--coin); }

/* ---------- toast ---------- */

.toast{
  position:fixed;
  left:50%;
  bottom:2rem;
  z-index:300;
  padding:.65rem 1.2rem;
  border-radius:999px;
  background:var(--ink);
  color:var(--bg);
  font-size:.88rem;
  font-weight:600;
  box-shadow:0 10px 30px rgba(0,0,0,.35);
  opacity:0;
  transform:translate(-50%,14px) scale(.96);
  transition:opacity .22s var(--ease),transform .22s var(--ease);
  pointer-events:none;
}
.toast:empty{ display:none; }
.toast.is-shown{ opacity:1; transform:translate(-50%,0) scale(1); }

/* ============================================================
   14. MUSIC
============================================================ */

/* The two accents come from the cover art, set in the markup. The site's own
   colours are the fallback — what a greyscale cover gets — and they are
   written at each point of use rather than declared here, because declaring
   them on .player would override the value inherited from a wrapper and the
   podcast player takes its accents from one. */
.player{
  position:relative;
  max-width:620px;
  padding:1.5rem;
  margin-top:1.8rem;
  border-radius:var(--radius);
  border:1px solid var(--line);
  background:
    linear-gradient(160deg,rgba(255,255,255,.05),transparent 45%),
    var(--glass);
  overflow:hidden;
  isolation:isolate;
}
.player::before{
  content:'';
  position:absolute;
  inset-block-start:0;
  inset-inline:0;
  height:1px;
  background:linear-gradient(90deg,transparent,var(--track-accent,var(--primary)),transparent);
  opacity:.6;
}

/* The cover again, blown up and blurred far past legibility, so the panel
   sits in the record's own light. Blurred with a filter rather than shipped
   pre-blurred: the same file is already being downloaded for the thumbnail,
   and a second copy would be bytes for something nobody looks at directly. */
.player__bg{
  position:absolute;
  inset:0;
  z-index:-1;
  border-radius:inherit;
  overflow:hidden;
  pointer-events:none;
}
.player__bg img{
  width:100%;
  height:100%;
  object-fit:cover;
  /* Scaled up because blur pulls the edges inward and would otherwise leave a
     pale border all the way round. */
  transform:scale(1.35);
  filter:blur(38px) saturate(170%);
  opacity:.6;
}
.player__bg::after{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(155deg,rgba(6,6,8,.5),rgba(6,6,8,.78));
}
[data-theme="light"] .player__bg img{ opacity:.4; }
[data-theme="light"] .player__bg::after{
  background:linear-gradient(155deg,rgba(255,255,255,.72),rgba(255,255,255,.86));
}

.player__badge{
  display:inline-block;
  margin-bottom:1.1rem;
  padding:.25rem .7rem;
  border-radius:999px;
  border:1px solid var(--line);
  font-size:0.8125rem;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--ink-faint);
}

.player__top{
  display:flex;
  align-items:center;
  gap:1.2rem;
  margin-bottom:1.4rem;
}
.player-cover{
  width:94px; height:94px;
  border-radius:var(--radius-sm);
  object-fit:cover;
  flex-shrink:0;
  box-shadow:0 10px 30px rgba(0,0,0,.45);
}
.player-info{ min-width:0; }
.player-title{
  font-family:var(--font-display);
  font-weight:700;
  font-size:1.1rem;
  line-height:1.25;
}
.player-artist{ margin-top:.2rem; font-size:.88rem; color:var(--ink-muted); }
.player__link{
  display:inline-block;
  margin-top:.6rem;
  font-size:0.8125rem;
  color:var(--track-accent,var(--primary));
}

/* ---------- progress ---------- */

.player__progress{
  display:flex;
  align-items:center;
  gap:.8rem;
  margin-bottom:1.2rem;
}
.time-current,.time-duration{
  font-family:var(--font-mono);
  font-size:0.8125rem;
  color:var(--ink-faint);
  min-width:34px;
  direction:ltr;
}
.time-duration{ text-align:end; }
.progress-track{
  position:relative;
  flex:1;
  height:6px;
  border-radius:999px;
  background:var(--line);
  cursor:pointer;
}
.progress-fill{
  height:100%;
  width:0;
  border-radius:999px;
  background:linear-gradient(90deg,var(--track-accent,var(--primary)),var(--track-accent-2,var(--secondary)));
}
/* No handle on the end of the bar. The grab target it needed is kept, though:
   this widens the hit area to 21px without changing what is drawn, so the bar
   stays as thin as it looks and is still easy to hit. */
.progress-track::after{
  content:'';
  position:absolute;
  inset:-8px 0;
}

/* ---------- controls ----------
   Built the way One UI 8.5 builds its media controls: no outlines, soft
   tonal circles that fill in on hover and sink a little on press, one large
   play button carrying the record's own colours, and the volume as a pill
   with its level filled in and spelled out beside it. */

.player__controls{
  display:flex;
  align-items:center;
  gap:.75rem;
  flex-wrap:wrap;
}
.player__transport{
  display:flex;
  align-items:center;
  gap:.55rem;
}
.ctrl-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:42px; height:42px;
  border-radius:999px;
  border:0;
  background:color-mix(in srgb,var(--ink) 8%,transparent);
  color:var(--ink-muted);
  cursor:pointer;
  transition:background .25s var(--ease),color .25s var(--ease),transform .2s var(--ease),box-shadow .3s var(--ease);
}
.ctrl-btn:hover{
  color:var(--ink);
  background:color-mix(in srgb,var(--ink) 14%,transparent);
}
.ctrl-btn:active{ transform:scale(.92); }
.ctrl-btn:focus-visible{ outline:2px solid var(--track-accent,var(--primary)); outline-offset:2px; }

.ctrl-btn-play{
  position:relative;
  width:60px; height:60px;
  color:#fff;
  background:linear-gradient(140deg,var(--track-accent,var(--primary)),var(--track-accent-2,var(--secondary)));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    0 10px 30px -6px color-mix(in srgb,var(--track-accent,var(--primary)) 65%,transparent);
}
.ctrl-btn-play:hover{
  color:#fff;
  background:linear-gradient(140deg,var(--track-accent,var(--primary)),var(--track-accent-2,var(--secondary)));
  transform:scale(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.32),
    0 14px 38px -6px color-mix(in srgb,var(--track-accent,var(--primary)) 80%,transparent);
}
.ctrl-btn-play:active{ transform:scale(.95); }
/* A soft ring that breathes while the track plays, so a playing player is
   visible from across the page. */
.ctrl-btn-play::after{
  content:'';
  position:absolute;
  inset:-5px;
  border-radius:inherit;
  border:2px solid color-mix(in srgb,var(--track-accent,var(--primary)) 55%,transparent);
  opacity:0;
  transform:scale(.9);
  transition:opacity .3s var(--ease),transform .3s var(--ease);
  pointer-events:none;
}
.is-playing .ctrl-btn-play::after{
  opacity:1;
  transform:scale(1);
  animation:playRing 2.4s ease-in-out infinite;
}
@keyframes playRing{
  0%,100%{ opacity:.9; transform:scale(1); }
  50%{ opacity:.35; transform:scale(1.08); }
}

.speed-btn{
  width:auto;
  min-width:52px;
  padding-inline:.9rem;
  font-family:var(--font-mono);
  font-size:0.8125rem;
  font-weight:600;
}

.player__volume{
  display:flex;
  align-items:center;
  gap:.6rem;
  margin-inline-start:auto;
  padding:.3rem .85rem .3rem .3rem;
  border-radius:999px;
  background:color-mix(in srgb,var(--ink) 6%,transparent);
  color:var(--ink-muted);
}
html[dir="rtl"] .player__volume{ padding:.3rem .3rem .3rem .85rem; }
.player__volume .ctrl-btn{ width:36px; height:36px; background:transparent; }
.player__volume .ctrl-btn:hover{ background:color-mix(in srgb,var(--ink) 10%,transparent); }
.player__volume label{ display:flex; }

/* The level is painted into the track itself — accent up to the thumb,
   faint after it — from --level, which player.js keeps in step. */
.volume-input{
  --level:85%;
  -webkit-appearance:none;
  appearance:none;
  width:110px;
  height:6px;
  border-radius:999px;
  background:linear-gradient(90deg,var(--track-accent,var(--primary)),var(--track-accent-2,var(--secondary))) 0 0 / var(--level) 100% no-repeat,
             color-mix(in srgb,var(--ink) 16%,transparent);
  cursor:pointer;
}
html[dir="rtl"] .volume-input{ background-position:100% 0,0 0; }
.volume-input::-webkit-slider-thumb{
  -webkit-appearance:none;
  width:16px; height:16px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 4px rgba(0,0,0,.4),0 0 0 3px color-mix(in srgb,var(--track-accent,var(--primary)) 35%,transparent);
  cursor:pointer;
  transition:transform .2s var(--ease);
}
.volume-input:hover::-webkit-slider-thumb{ transform:scale(1.12); }
.volume-input::-moz-range-thumb{
  width:16px; height:16px;
  border:none;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 4px rgba(0,0,0,.4),0 0 0 3px color-mix(in srgb,var(--track-accent,var(--primary)) 35%,transparent);
  cursor:pointer;
}
.volume-value{
  min-width:3.4ch;
  font-family:var(--font-mono);
  font-size:0.8125rem;
  font-weight:600;
  color:var(--ink);
  text-align:end;
  direction:ltr;
  font-variant-numeric:tabular-nums;
}

@media (max-width:520px){
  .player__top{ flex-direction:column; align-items:flex-start; }
  .player__volume{ margin-inline-start:0; width:100%; }
  .volume-input{ flex:1; width:auto; }
  .player__volume label{ flex:1; }
}

/* ---------- podcast ----------
   One set of controls beside the episode list, rather than a player per
   episode. Side by side on a wide screen because the list is short and the
   two belong together; stacked below that. */
.podcast{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,.85fr);
  gap:1.1rem;
  align-items:start;
  margin-top:1.8rem;
}
.podcast .player{ margin-top:0; max-width:none; }

.episode-list{
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:.35rem;
  margin:0;
  padding:0;
}
.episode{
  display:flex;
  align-items:center;
  gap:.9rem;
  width:100%;
  padding:.75rem .9rem;
  border-radius:var(--radius-sm);
  border:1px solid transparent;
  background:var(--glass);
  cursor:pointer;
  text-align:start;
  transition:background .3s var(--ease),border-color .3s var(--ease);
}
.episode:hover{ background:var(--glass-hover); border-color:var(--line); }
.episode.is-current{
  border-color:color-mix(in srgb,var(--track-accent,var(--primary)) 45%,transparent);
  background:color-mix(in srgb,var(--track-accent,var(--primary)) 10%,transparent);
}
.episode__number{
  font-family:var(--font-mono);
  font-size:0.8125rem;
  color:var(--ink-faint);
  min-width:1.4em;
  text-align:center;
}
.episode.is-current .episode__number{ color:var(--track-accent,var(--primary)); }
.episode__title{
  flex:1;
  min-width:0;
  font-size:.95rem;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* Three bars that stand still until this episode is the one playing, so the
   list says which is current and whether it is running, not just which was
   clicked last. */
.episode__state{
  display:flex;
  align-items:flex-end;
  gap:2px;
  height:14px;
  opacity:0;
  transition:opacity .3s var(--ease);
}
.episode.is-current .episode__state{ opacity:1; }
.episode__state i{
  width:3px;
  height:5px;
  border-radius:1px;
  background:var(--track-accent,var(--primary));
}
.podcast-player.is-playing ~ .episode-list .episode.is-current .episode__state i{
  animation:eqBar .9s ease-in-out infinite;
}
.podcast-player.is-playing ~ .episode-list .episode.is-current .episode__state i:nth-child(2){ animation-delay:.18s; }
.podcast-player.is-playing ~ .episode-list .episode.is-current .episode__state i:nth-child(3){ animation-delay:.36s; }
@keyframes eqBar{
  0%,100%{ height:4px; }
  50%{ height:14px; }
}

@media (max-width:820px){
  .podcast{ grid-template-columns:1fr; }
}

/* ============================================================
   15. CONTACT
============================================================ */

.contact-form{ max-width:720px; margin-top:2rem; }

/* Hidden from sighted users and screen readers alike, so anything
   typed into it came from a bot. */
.hp-field{
  position:absolute !important;
  width:1px; height:1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
}

.contact-form .field{ margin-bottom:1.2rem; }
.contact-form .field-row{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:1.2rem;
}
.contact-form label,
.contact-form legend{
  display:block;
  margin-bottom:.5rem;
  font-size:var(--t-label);
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--ink-muted);
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea{
  width:100%;
  padding:.9rem 1.05rem;
  border-radius:var(--radius-sm);
  border:1px solid var(--line);
  background:var(--glass);
  color:var(--ink);
  font-family:inherit;
  font-size:.95rem;
  transition:border-color .3s var(--ease),background .3s var(--ease);
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus{
  outline:none;
  border-color:var(--primary);
  background:var(--glass-hover);
}
/* The open list is drawn by the operating system, not the page. Without a
   colour scheme Windows draws it light while the text inside stays this
   theme's ink, and in the dark theme that is white on white. Declaring the
   scheme makes the system draw the list in the page's own colours; the
   option colours below are for the browsers that let a page style them. */
.contact-form select{ color-scheme:dark; }
[data-theme="light"] .contact-form select{ color-scheme:light; }
.contact-form select option{ background:var(--bg-raised); color:var(--ink); }
.contact-form select option:checked{ background:var(--primary); color:#fff; }
.contact-form textarea{ resize:vertical; min-height:160px; }
.contact-form button{ margin-top:.6rem; }

.priority-field{ border:none; }
/* A question over its choices: --s-3, as a heading over what it heads. */
.priority-field > legend{ margin-bottom:var(--s-3); }
/* Django wraps RadioSelect in its own container, so the flex row has to be
   declared on that child too or the options stack vertically. */
.priority-options,
.priority-options > div,
.priority-options > ul{
  display:flex;
  flex-wrap:wrap;
  gap:.55rem;
}
.priority-options label{
  margin:0;
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  padding:.5rem 1rem;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--glass);
  font-size:.85rem;
  letter-spacing:0;
  text-transform:none;
  color:var(--ink);
  cursor:pointer;
  transition:all .3s var(--ease);
}
.priority-options label:hover{ border-color:var(--primary); }
.priority-options input[type="radio"]{ accent-color:var(--primary); }

.errorlist{
  margin-top:.4rem;
  font-size:.82rem;
  color:var(--danger);
}
.form-message{
  padding:.9rem 1.2rem;
  margin-bottom:1.6rem;
  border-radius:var(--radius-sm);
  border:1px solid color-mix(in srgb,var(--success) 40%,transparent);
  background:color-mix(in srgb,var(--success) 10%,transparent);
}
.form-errors{
  padding:.9rem 1.2rem;
  margin-bottom:1.4rem;
  border-radius:var(--radius-sm);
  border:1px solid color-mix(in srgb,var(--danger) 40%,transparent);
  background:color-mix(in srgb,var(--danger) 10%,transparent);
}

.contact-direct{ margin-top:3.5rem; }

/* The email address is Latin, and the `plaintext` rule near the top of this
   file gives every line its own direction from its first strong character.
   That is right for prose, and wrong here: the label is Arabic so its line
   hugs the right, the address is Latin so its line hugs the left, and the two
   end up a column apart with nothing between them.

   `isolate` is the narrower tool. The line keeps the paragraph's direction —
   so the address sits under the label it belongs to — while the address
   itself still reads left to right inside it. */
html[dir="rtl"] .contact-direct p{ unicode-bidi:isolate; }

.contact-direct__label{
  display:block;
  font-size:var(--t-label);
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--ink-muted);
  margin-bottom:.25rem;
}
/* No `--project-accent` declaration here on purpose. On the contact page the
   template sets it inline per project; on a project's own page it is inherited
   from .project-page. Declaring a default on this element would beat the
   inherited value and every project's contact block would come out blue. The
   fallback belongs at each point of use instead. */
.contact-project{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:1rem;
  padding:.9rem 1.2rem;
  margin-top:.7rem;
  border-radius:var(--radius-sm);
  border:1px solid var(--line);
  border-inline-start:3px solid var(--project-accent,var(--primary));
  background:var(--glass);
}
.contact-project__name{
  font-family:var(--font-display);
  font-weight:700;
  font-size:.85rem;
  letter-spacing:.08em;
  color:var(--project-accent,var(--primary));
}
.contact-project a{ color:var(--ink-muted); font-size:.9rem; }
.contact-project a:hover{ color:var(--ink); }

.service-list{ margin:1.3rem 0 1.8rem; }
.service-list__item{
  padding:.8rem 0;
  border-bottom:1px solid var(--line);
}
.service-list__item span{
  display:block;
  margin-top:.2rem;
  font-size:.88rem;
  color:var(--ink-muted);
}

/* ============================================================
   16. FOOTER
============================================================ */

.site-footer{
  padding-block:3.5rem 2rem;
  border-top:1px solid var(--line);
  background:linear-gradient(180deg,transparent,var(--glass));
}
.site-footer__inner{ display:grid; gap:2.2rem; }
.site-footer__cols{
  display:grid; gap:2rem 2.5rem;
  grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) minmax(0,1.2fr);
}
@media (max-width:820px){ .site-footer__cols{ grid-template-columns:1fr 1fr; } .site-footer__about{ grid-column:1 / -1; } }
@media (max-width:520px){ .site-footer__cols{ grid-template-columns:1fr; } }
.site-footer__about{ display:grid; gap:1rem; align-content:start; justify-items:start; }
.site-footer__tagline{ max-width:34ch; font-size:.88rem !important; letter-spacing:0 !important; line-height:1.7; color:var(--ink-muted) !important; }
.site-footer__brand{
  display:inline-flex;
  align-items:center;
  gap:.6rem;
  font-family:var(--font-display);
  font-weight:700;
  font-size:.95rem;
  letter-spacing:.16em;
  color:var(--ink);
  transition:color .3s var(--ease);
}
.site-footer__brand:hover{ color:var(--primary); }
.site-footer__brand .brand__mark{ width:44px; height:26px; }
.site-footer__title{ margin:0 0 .9rem; font-size:.82rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--ink); }
.site-footer__col ul{ list-style:none; margin:0; padding:0; display:grid; gap:.55rem; }
/* The pages in two short columns rather than one long one. */
.site-footer__col--pages ul{ grid-template-columns:repeat(2,minmax(0,max-content)); column-gap:2.2rem; }
.site-footer__col a{ font-size:.88rem; color:var(--ink-muted); transition:color .25s var(--ease); }
.site-footer__col a:hover{ color:var(--primary); }
.site-footer__reach{ margin-bottom:.9rem !important; }
.site-footer__reach a{ display:inline-flex; align-items:center; gap:.55rem; }
.site-footer__reach .ch-icon{ width:1rem; height:1rem; color:var(--primary); }
.site-footer__bottom{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:1rem;
  padding-top:1.4rem; border-top:1px solid var(--line);
}
.site-footer__small{ display:grid; gap:.3rem; }
.site-footer__small .footer-powered{ justify-content:flex-start; margin:0; }
@media (max-width:520px){ .site-footer__bottom{ flex-direction:column; text-align:center; } .site-footer__small .footer-powered{ justify-content:center; } }
.site-footer__socials{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:.5rem;
}
.site-footer__social{
  display:grid;
  place-items:center;
  width:2.25rem;
  height:2.25rem;
  border-radius:50%;
  border:1px solid var(--line);
  background:var(--glass);
  color:var(--ink-muted);
  transition:color .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease);
}
.site-footer__social:hover{
  color:var(--ink);
  background:var(--glass-hover);
  border-color:var(--line-strong);
}
/* Painted as a mask over the text colour, like the links page, so every
   mark is one quiet colour here rather than a row of brand colours. */
.site-footer__social span{
  width:1rem;
  height:1rem;
  background:currentColor;
  -webkit-mask:var(--icon) no-repeat center / contain;
  mask:var(--icon) no-repeat center / contain;
}
/* Smaller than on the payment pages: here it is a footnote, not a promise
   made next to a Pay button. White behind it, because the badge is drawn
   for a light page. */
.site-footer__enamad{
  display:inline-grid;
  place-items:center;
  min-width:4.25rem;
  min-height:4.25rem;
  padding:.35rem;
  border-radius:10px;
  background:#fff;
  color:#64748b;
  font-size:0.8125rem;
  line-height:1.4;
}
.site-footer__enamad img{ display:block; max-width:60px; height:auto; }
.site-footer p{
  max-width:none;
  font-size:.82rem;
  letter-spacing:.06em;
  color:var(--ink-faint);
}
.footer-powered{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.45rem;
  margin-top:.5rem;
  /* The credit sits under the copyright and should not compete with it. */
  font-size:0.8125rem;
}
.footer-powered__mark{
  width:17px;
  height:17px;
  color:var(--ink-muted);
  transition:color .3s var(--ease);
}
.site-footer:hover .footer-powered__mark{ color:var(--primary); }

/* ============================================================
   17. MOTION
   .reveal only hides itself once JS has confirmed it can put it
   back. Without the html.has-js guard, a script error would
   leave every page blank.
============================================================ */

.page-fade{ animation:pageFade .55s var(--ease) both; }
@keyframes pageFade{
  from{ opacity:0; transform:translateY(10px); }
  to{ opacity:1; transform:translateY(0); }
}

/* Cross-document view transitions: navigating between pages crossfades
   instead of blinking white. Chromium and Safari 18.2+ honour it; anywhere
   else the rule is ignored and navigation behaves exactly as before. */
@view-transition{ navigation:auto; }
::view-transition-old(root){ animation:vtOut .22s var(--ease) both; }
::view-transition-new(root){ animation:vtIn .32s var(--ease) both; }
@keyframes vtOut{ to{ opacity:0; transform:translateY(-6px); } }
@keyframes vtIn{ from{ opacity:0; transform:translateY(8px); } }

/* Switching theme (theme.js). The page-to-page animation above slides as it
   fades; a theme change is the same page, so it only fades, and slowly
   enough to read as the lights changing rather than as a reload. */
html.theme-switching::view-transition-group(*){ animation-duration:.55s; }
html.theme-switching::view-transition-old(*){ animation:themeOut .55s ease both; }
html.theme-switching::view-transition-new(*){ animation:themeIn .55s ease both; }
@keyframes themeOut{ to{ opacity:0; } }
@keyframes themeIn{ from{ opacity:0; } }
html.theme-fade *,
html.theme-fade *::before,
html.theme-fade *::after{
  transition:background-color .5s ease,color .5s ease,border-color .5s ease,
             fill .5s ease,stroke .5s ease,box-shadow .5s ease !important;
}

/* The header is the same object across pages, so it should not fade with
   the rest — naming it keeps it fixed while the body crossfades under it. */
.site-header{ view-transition-name:site-header; }

/* Scroll-driven reveal, where the browser supports it: the animation is
   tied to the element's position in the viewport rather than to a one-shot
   JS observer, so it tracks scrolling in both directions. The JS version
   below stays as the fallback and is switched off here to avoid two
   systems animating the same element. */
@supports (animation-timeline: view()){
  html.has-js .reveal{
    opacity:1;
    transform:none;
    transition:none;
    animation:revealRise linear both;
    animation-timeline:view();
    animation-range:entry 8% cover 26%;
  }
  html.has-js .reveal :is(.project-bento,.project-grid,.teaser-grid,.wallet-grid,.work-grid) > *{
    opacity:1;
    transform:none;
    transition:none;
    animation:revealRise linear both;
    animation-timeline:view();
    animation-range:entry 4% cover 22%;
  }
}
@keyframes revealRise{
  from{ opacity:0; transform:translateY(26px); }
  to{ opacity:1; transform:translateY(0); }
}

html.has-js .reveal{
  opacity:0;
  transform:translateY(22px);
  transition:opacity .7s var(--ease),transform .7s var(--ease);
}
html.has-js .reveal.is-visible{
  opacity:1;
  transform:translateY(0);
}

/* Cards inside a revealed section arrive one after another instead of all
   at once. Six steps is enough — beyond that the wait starts to read as lag. */
html.has-js .reveal .project-grid > *,
html.has-js .reveal .teaser-grid > *,
html.has-js .reveal .wallet-grid > *,
html.has-js .reveal .work-grid > *{
  opacity:0;
  transform:translateY(16px);
  transition:opacity .55s var(--ease),transform .55s var(--ease);
}
html.has-js .reveal.is-visible .project-grid > *,
html.has-js .reveal.is-visible .teaser-grid > *,
html.has-js .reveal.is-visible .wallet-grid > *,
html.has-js .reveal.is-visible .work-grid > *{
  opacity:1;
  transform:translateY(0);
}
html.has-js .reveal.is-visible :is(.project-grid,.teaser-grid,.wallet-grid,.work-grid) > :nth-child(1){ transition-delay:.05s; }
html.has-js .reveal.is-visible :is(.project-grid,.teaser-grid,.wallet-grid,.work-grid) > :nth-child(2){ transition-delay:.11s; }
html.has-js .reveal.is-visible :is(.project-grid,.teaser-grid,.wallet-grid,.work-grid) > :nth-child(3){ transition-delay:.17s; }
html.has-js .reveal.is-visible :is(.project-grid,.teaser-grid,.wallet-grid,.work-grid) > :nth-child(4){ transition-delay:.23s; }
html.has-js .reveal.is-visible :is(.project-grid,.teaser-grid,.wallet-grid,.work-grid) > :nth-child(5){ transition-delay:.29s; }
html.has-js .reveal.is-visible :is(.project-grid,.teaser-grid,.wallet-grid,.work-grid) > :nth-child(n+6){ transition-delay:.35s; }

@media (prefers-reduced-motion:reduce){
  html{ scroll-behavior:auto; }
  .meteor,.particle{ display:none; }
  .page-fade,.hero > *,.hero h1,.hero h1::before,.scroll-cue,.now-playing__bars i{ animation:none; }
  @view-transition{ navigation:none; }
  html.has-js .reveal,
  html.has-js .reveal :is(.project-bento,.project-grid,.teaser-grid,.wallet-grid,.work-grid) > *{
    animation:none;
  }
  html.has-js .reveal,
  html.has-js .reveal :is(.project-grid,.teaser-grid,.wallet-grid,.work-grid) > *{
    opacity:1;
    transform:none;
    transition:none;
  }
  *{ transition-duration:.01ms !important; animation-duration:.01ms !important; }
}

/* ============================================================
   17b. WIDE SCREENS
   This stylesheet now serves computers only — phones and tablets get the
   app — so the layouts below are drawn for a monitor rather than a phone
   stretched to fit one. Each falls back to the single column under 960px,
   which is a narrow window on a laptop, not a phone.
============================================================ */

/* Music: the players share the page's width instead of sitting in a narrow
   column against the start edge. */
.music-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,460px),1fr));
  gap:1.4rem;
  margin-top:1.8rem;
}
.music-grid > .player{ max-width:none; margin-top:0; }
/* A single track takes the full width but not an absurd one. */
.music-grid > .player:only-child{ max-width:760px; margin-inline:auto; }

/* Project page banner: the cover, dimmed, behind the name. */
.project-hero.has-cover{
  position:relative;
  isolation:isolate;
  padding-block:clamp(3.5rem,8vw,6rem);
  margin-top:calc(var(--header-h) + 2rem);
  /* Lined up with the content below it, which sits inside the container's
     padding — the banner is the container, so it has to lose that padding
     from its own width instead. */
  width:calc(100% - 3rem);
  max-width:calc(1180px - 3rem);
  border-radius:calc(var(--radius) + 6px);
  border:1px solid color-mix(in srgb,var(--project-accent) 30%,var(--line));
  overflow:hidden;
}
main > article > .project-hero.has-cover:first-child{ padding-top:clamp(3.5rem,8vw,6rem); }
.project-hero.has-cover::before{
  content:'';
  position:absolute;
  inset:0;
  z-index:-2;
  background:var(--hero-cover) center / cover no-repeat;
  filter:grayscale(.25) brightness(.5) contrast(1.06);
  transform:scale(1.04);
}
.project-hero.has-cover::after{
  content:'';
  position:absolute;
  inset:0;
  z-index:-1;
  background:
    radial-gradient(120% 90% at 50% 120%,color-mix(in srgb,var(--project-accent) 38%,transparent),transparent 62%),
    linear-gradient(180deg,rgba(4,4,6,.35),rgba(4,4,6,.75));
}
/* Dark media on a light page, as on the project cards. */
.project-hero.has-cover{ --ink:#F5F1EC; --ink-muted:#B2AFAB; color:var(--ink); }

@media (min-width:960px){
  /* About: the words and the divisions beside the portrait, which stays in
     view while the text scrolls past it. */
  .about-intro.has-portrait{
    display:grid;
    grid-template-columns:minmax(0,1.5fr) minmax(260px,.85fr);
    gap:clamp(2.5rem,5vw,5rem);
    align-items:start;
  }
  .about-intro__side{
    position:sticky;
    top:calc(var(--header-h) + 2rem);
  }
  .about-divisions{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:.4rem 2rem;
  }

  /* Contact: the form beside the direct contacts. */
  .contact-layout{
    display:grid;
    grid-template-columns:minmax(0,1.55fr) minmax(280px,1fr);
    gap:clamp(2.5rem,5vw,4.5rem);
    align-items:start;
  }
  .contact-layout .contact-form{ max-width:none; }
  .contact-layout .contact-direct{
    position:sticky;
    top:calc(var(--header-h) + 2rem);
    margin-top:2rem;
    padding:1.6rem;
    border:1px solid var(--line);
    border-radius:var(--radius);
    background:var(--glass);
  }
  .contact-layout .contact-direct h2{ font-size:1.25rem; }

  /* Project page: the heading and the direct contacts share a line, and
     the services sit side by side, so the full-width card is filled. */
  .project-contact{ padding:32px; }
  .project-contact__head{
    display:flex;
    flex-wrap:wrap;
    align-items:flex-end;
    justify-content:space-between;
    gap:16px 32px;
  }
  .project-contact__head .contact-project{ margin-top:0; }
  /* auto-fit, so one or two services share the row out between them
     rather than leaving the rest of it empty. */
  .project-contact .service-list{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:12px;
  }
  .project-contact .service-list__item{
    padding:16px;
    border:1px solid var(--line);
    border-radius:var(--radius-sm);
    background:var(--glass);
  }
}

/* The portrait card beside the biography. */
.about-card{
  margin:0;
  padding:.8rem;
  border:1px solid var(--line);
  border-radius:calc(var(--radius) + 4px);
  background:var(--glass);
  box-shadow:0 30px 60px -30px var(--primary-glow);
}
.about-card__photo{
  width:100%;
  aspect-ratio:4/5;
  object-fit:cover;
  border-radius:var(--radius);
}
.about-card figcaption{
  display:grid;
  gap:.25rem;
  padding:1rem .4rem .4rem;
}
.about-card__name{
  font-family:var(--font-display);
  font-size:1.15rem;
  letter-spacing:.08em;
}
.about-card__tagline{ font-size:.88rem; color:var(--ink-muted); }

@media (max-width:959px){
  .about-intro__side{ margin-top:2.5rem; max-width:360px; }
  .contact-direct{ margin-top:3.5rem; }
}

/* ============================================================
   18. RESPONSIVE
============================================================ */

@media (max-width:640px){
  :root{ --header-h:66px; }
  .container{ padding-inline:1.15rem; }
  img.hero-avatar{ width:104px; height:104px; }
  .links-grid,.wallet-grid{ grid-template-columns:1fr; }
  .brand{ font-size:.95rem; letter-spacing:.1em; }
}

/* ============================================================
   19. ADMIN PANEL
============================================================ */

.admin-wrap{ max-width:1080px; margin-inline:auto; padding:2rem 1.5rem; }

nav.admin-nav{
  display:flex;
  flex-wrap:wrap;
  gap:.6rem;
  margin-bottom:1.8rem;
  padding-bottom:1.2rem;
  border-bottom:1px solid var(--line);
}
nav.admin-nav a{
  padding:.5rem 1rem;
  border-radius:999px;
  border:1px solid var(--line);
  font-size:.82rem;
  transition:all .3s var(--ease);
}
nav.admin-nav a:hover{ border-color:var(--primary); background:var(--glass-hover); }

.admin-card{
  padding:1.6rem;
  margin-bottom:1.4rem;
  border-radius:var(--radius);
  border:1px solid var(--line);
  background:var(--glass);
}
.admin-card h2{ font-size:1.15rem; margin-bottom:1rem; }

.admin-form label{
  display:block;
  margin-top:1rem;
  margin-bottom:.35rem;
  font-size:var(--t-label);
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--ink-muted);
}
.admin-form input,
.admin-form select,
.admin-form textarea{
  width:100%;
  padding:.7rem .9rem;
  border-radius:var(--radius-sm);
  border:1px solid var(--line);
  background:var(--glass);
  color:var(--ink);
  font-family:inherit;
}
.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus{ outline:none; border-color:var(--primary); }

.btn-admin,
.admin-form button{
  display:inline-block;
  margin-top:1rem;
  padding:.6rem 1.3rem;
  border-radius:999px;
  border:1px solid var(--line-strong);
  background:var(--glass);
  font-size:.82rem;
  cursor:pointer;
  transition:all .3s var(--ease);
}
.btn-admin:hover,
.admin-form button:hover{ border-color:var(--primary); background:var(--glass-hover); }

.admin-table{ width:100%; border-collapse:collapse; margin-top:.8rem; }
.admin-table th,
.admin-table td{
  padding:.75rem;
  border-bottom:1px solid var(--line);
  text-align:start;
  font-size:.88rem;
  vertical-align:top;
}
.admin-table th{
  font-size:var(--t-label);
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--ink-muted);
}
.admin-table tr.is-unread{ background:var(--glass); }

.inbox-filters{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.7rem;
  margin:1rem 0 1.5rem;
}
.inbox-filters select{
  padding:.55rem .85rem;
  border-radius:var(--radius-sm);
  border:1px solid var(--line);
  background:var(--glass);
  color:var(--ink);
  font-family:inherit;
}
.inbox-filters select option{ background:var(--bg-raised); }
.inbox-filters__check{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  font-size:.86rem;
}
.inbox-filters .btn-admin{ margin-top:0; }

.inbox-tag{
  --project-accent:var(--primary);
  display:inline-block;
  padding:.2rem .6rem;
  border-radius:6px;
  font-size:0.8125rem;
  font-weight:700;
  letter-spacing:.1em;
  color:var(--project-accent);
  border:1px solid color-mix(in srgb,var(--project-accent) 40%,transparent);
}
.priority-urgent{ color:var(--danger); font-weight:700; }
.priority-low{ color:var(--ink-faint); }

@media (max-width:768px){
  .admin-wrap{ padding:1.4rem 1rem; }
  .admin-table{ font-size:0.8125rem; }
}

/* ============================================================
   DONATE — the way to /donate/, above the wallets
============================================================ */
.donate-cta{
  display:flex; align-items:center; gap:1rem;
  max-width:560px; margin:0 0 2rem; padding:1rem 1.15rem;
  border-radius:var(--radius); color:var(--ink); text-decoration:none;
  background:
    radial-gradient(120% 160% at 0% 0%,rgba(60,140,255,.22),transparent 55%),
    radial-gradient(120% 160% at 100% 100%,rgba(120,60,255,.22),transparent 55%),
    var(--glass);
  border:1px solid rgba(120,140,255,.35);
  box-shadow:0 18px 40px -24px rgba(60,140,255,.8);
  transition:transform .3s var(--ease), box-shadow .3s var(--ease);
}
.donate-cta:hover{ transform:translateY(-2px); box-shadow:0 24px 50px -22px rgba(60,140,255,.95); }
.donate-cta__icon{
  flex:none; display:grid; place-items:center; width:46px; height:46px; border-radius:14px; color:#fff;
  background:linear-gradient(135deg,#3C8CFF,#783CFF); box-shadow:0 10px 24px -10px #3C8CFF;
}
.donate-cta__text{ flex:1; display:grid; line-height:1.45; }
.donate-cta__text span{ font-size:.86rem; color:var(--ink-muted); }
.donate-cta__arrow{ flex:none; color:var(--ink-muted); transition:transform .3s var(--ease); }
.donate-cta:hover .donate-cta__arrow{ transform:translateX(4px); }
[dir="rtl"] .donate-cta__arrow svg{ transform:scaleX(-1); }
[dir="rtl"] .donate-cta:hover .donate-cta__arrow{ transform:translateX(-4px); }

/* ============================================================
   ADDRESS MAP (contact page)
   A card with the address that opens into a drawn street map.
   Tilt comes from --rx/--ry, set by the script on pointer move;
   the open state is .is-open. Brand blue and violet where the
   original used green, so it belongs to this site.
============================================================ */

.loc-map {
  position: relative;
  width: min(100%, 360px);
  perspective: 1000px;
  margin-block: 1.25rem 2.25rem;
}
.loc-map__card {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  display: block;
  width: min(100%, 260px);
  height: 150px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, transparent), transparent 45%,
      color-mix(in srgb, var(--secondary) 14%, transparent)),
    var(--bg-raised);
  color: var(--ink);
  font: inherit;
  text-align: start;
  cursor: pointer;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition:
    width 0.5s cubic-bezier(0.3, 1.3, 0.5, 1),
    height 0.5s cubic-bezier(0.3, 1.3, 0.5, 1),
    transform 0.25s var(--ease),
    border-color 0.3s var(--ease);
}
.loc-map__card:hover { border-color: var(--line-strong); }
.loc-map__card:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.loc-map.is-open .loc-map__card { width: 100%; height: 290px; }

.loc-map__grid {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image:
    linear-gradient(var(--ink) 0.5px, transparent 0.5px),
    linear-gradient(90deg, var(--ink) 0.5px, transparent 0.5px);
  background-size: 20px 20px;
  transition: opacity 0.3s var(--ease);
}
.loc-map.is-open .loc-map__grid { opacity: 0; }

/* --- the drawn map ------------------------------------------------------ */
.loc-map__streets {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: color-mix(in srgb, var(--ink) 5%, var(--bg-raised));
  transition: opacity 0.4s var(--ease) 0.1s;
}
.loc-map__streets::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-raised), transparent 55%);
  opacity: 0.75;
}
.loc-map.is-open .loc-map__streets { opacity: 1; }
.loc-map__roads { position: absolute; inset: 0; width: 100%; height: 100%; }
.loc-map__roads line {
  stroke: color-mix(in srgb, var(--ink) 10%, transparent);
  stroke-width: 1.5;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 0.5s var(--ease) var(--d, 0s);
}
.loc-map__roads line.is-main { stroke: color-mix(in srgb, var(--primary) 34%, transparent); stroke-width: 4; }
.loc-map__roads line.is-avenue { stroke: color-mix(in srgb, var(--secondary) 30%, transparent); stroke-width: 3; }
.loc-map.is-open .loc-map__roads line { stroke-dashoffset: 0; }
.loc-map__streets i {
  position: absolute;
  border-radius: 3px;
  background: color-mix(in srgb, var(--ink-muted) 24%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink-muted) 16%, transparent);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.4s var(--ease) var(--d, 0s), transform 0.4s var(--ease) var(--d, 0s);
}
.loc-map.is-open .loc-map__streets i { opacity: 1; transform: scale(1); }
.loc-map__pin {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  translate: -50% -50%;
  transform: translateY(-20px) scale(0);
  filter: drop-shadow(0 0 10px var(--primary-glow));
  transition: transform 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) 0.3s;
}
.loc-map__pin path { fill: var(--primary); }
.loc-map__pin circle { fill: var(--bg-raised); }
.loc-map.is-open .loc-map__pin { transform: none; }

/* --- the words on top --------------------------------------------------- */
.loc-map__body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 1.1rem 1.2rem;
}
.loc-map__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.loc-map__icon {
  color: var(--primary);
  filter: drop-shadow(0 0 4px var(--primary-glow));
  transition: opacity 0.3s var(--ease), filter 0.3s var(--ease);
}
.loc-map__card:hover .loc-map__icon { filter: drop-shadow(0 0 8px var(--primary-glow)); }
.loc-map.is-open .loc-map__icon { opacity: 0; }
.loc-map__city {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  backdrop-filter: blur(6px);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.loc-map__card:hover .loc-map__city { transform: scale(1.05); background: color-mix(in srgb, var(--ink) 9%, transparent); }
.loc-map__city i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--secondary);
  box-shadow: 0 0 6px var(--secondary);
}
.loc-map__bottom { display: grid; gap: 0.3rem; }
.loc-map__address {
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: translate 0.3s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.loc-map__card:hover .loc-map__address { translate: 4px 0; }
html[dir="rtl"] .loc-map__card:hover .loc-map__address { translate: -4px 0; }
.loc-map.is-open .loc-map__address { -webkit-line-clamp: 3; }
.loc-map__coords {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  transition: max-height 0.25s var(--ease), opacity 0.25s var(--ease);
}
html[dir="rtl"] .loc-map__coords { text-align: end; }
.loc-map.is-open .loc-map__coords { max-height: 1.5em; opacity: 1; }
.loc-map__underline {
  height: 1px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 60%, transparent),
    color-mix(in srgb, var(--secondary) 35%, transparent), transparent);
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
html[dir="rtl"] .loc-map__underline {
  transform-origin: right;
  background: linear-gradient(270deg, color-mix(in srgb, var(--primary) 60%, transparent),
    color-mix(in srgb, var(--secondary) 35%, transparent), transparent);
}
.loc-map__card:hover .loc-map__underline,
.loc-map.is-open .loc-map__underline { transform: scaleX(1); }
.loc-map__hint {
  position: absolute;
  top: calc(100% + 0.45rem);
  inset-inline-start: 0;
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ink-faint);
  opacity: 0;
  translate: 0 4px;
  transition: opacity 0.2s var(--ease), translate 0.2s var(--ease);
  pointer-events: none;
}
.loc-map:hover:not(.is-open) .loc-map__hint { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  .loc-map__card { transform: none; }
}

/* ============================================================
   TIMELINE (/timeline/)
   A glowing line down the middle on a wide screen: each year a
   pill sitting on the line, its entries alternating left and right
   as cards joined to the line by a short connector and a dot; the
   line fills with colour as the page scrolls (--progress, set by the
   script). An entry tied to a project wears that project's colour
   (--accent). On a narrow screen everything moves to one side.
============================================================ */

.timeline {
  --tl-line: 2px;
  --tl-gap: 2.6rem;
  position: relative;
  list-style: none;
  margin: 2.4rem 0 1rem;
  padding: 0;
  display: grid;
  gap: 2.2rem;
}
/* The line, and the coloured part of it that grows with the scroll. */
.timeline::before,
.timeline::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-start: 50%;
  width: var(--tl-line);
  translate: calc(var(--tl-line) / -2) 0;
  border-radius: 2px;
}
[dir="rtl"] .timeline::before,
[dir="rtl"] .timeline::after { translate: calc(var(--tl-line) / 2) 0; }
.timeline::before {
  background: linear-gradient(to bottom, transparent, var(--line) 6%, var(--line) 94%, transparent);
}
.timeline::after {
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
  box-shadow: 0 0 14px color-mix(in srgb, var(--primary) 55%, transparent);
  transform-origin: top;
  transform: scaleY(var(--progress, 0));
  transition: transform 0.15s linear;
}

.timeline__year {
  position: relative;
  display: grid;
  gap: 1.4rem;
}
/* The year: a pill on the line. */
.timeline__label {
  position: relative;
  z-index: 1;
  justify-self: center;
  margin: 0;
  padding: 0.35rem 1.15rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 45%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 22%, transparent), color-mix(in srgb, var(--secondary) 18%, transparent)),
    var(--bg-raised, var(--bg));
  box-shadow: 0 10px 30px -14px var(--primary);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.timeline__label span { display: block; }
/* Not the accent rule the site puts over its headings. */
.timeline__label::before,
.timeline__label::after { display: none !important; }

.timeline__entries {
  display: grid;
  gap: 1.1rem;
}

.timeline__entry {
  --accent: var(--primary);
  position: relative;
  width: calc(50% - var(--tl-gap));
  justify-self: start;
  display: grid;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 55%),
    var(--glass);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.timeline__entry:nth-child(even) { justify-self: end; }
.timeline__entry:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  box-shadow: 0 18px 40px -24px var(--accent);
}
/* The connector from the card to the line. */
.timeline__entry::before {
  content: "";
  position: absolute;
  top: 1.55rem;
  inset-inline-end: calc(var(--tl-gap) * -1);
  width: var(--tl-gap);
  height: 1px;
  background: linear-gradient(to left, color-mix(in srgb, var(--accent) 70%, transparent), transparent);
}
[dir="rtl"] .timeline__entry::before { background: linear-gradient(to right, color-mix(in srgb, var(--accent) 70%, transparent), transparent); }
.timeline__entry:nth-child(even)::before {
  inset-inline-end: auto;
  inset-inline-start: calc(var(--tl-gap) * -1);
  background: linear-gradient(to right, color-mix(in srgb, var(--accent) 70%, transparent), transparent);
}
[dir="rtl"] .timeline__entry:nth-child(even)::before { background: linear-gradient(to left, color-mix(in srgb, var(--accent) 70%, transparent), transparent); }

/* The dot on the line. */
.timeline__dot {
  position: absolute;
  top: calc(1.55rem - 6px);
  inset-inline-end: calc(var(--tl-gap) * -1 - 7px);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent), 0 0 14px var(--accent);
  z-index: 1;
}
.timeline__entry:nth-child(even) .timeline__dot {
  inset-inline-end: auto;
  inset-inline-start: calc(var(--tl-gap) * -1 - 6px);
}

.timeline__image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 17px 17px 0 0;
  border-bottom: 1px solid var(--line);
}
.timeline__text {
  display: grid;
  gap: 0.35rem;
  padding: 1.05rem 1.2rem 1.15rem;
}
.timeline__text h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.45;
}
.timeline__text p {
  margin: 0;
  max-width: none;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--ink-muted);
}
.timeline__project {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.12rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  text-decoration: none;
}
.timeline__project::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.timeline__link {
  justify-self: start;
  margin-top: 0.2rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.timeline__link:hover { text-decoration: underline; }
.timeline-empty { color: var(--ink-faint); }

/* One side on a narrow screen: the line near the start edge. */
@media (max-width: 760px) {
  .timeline { --tl-gap: 1.6rem; gap: 1.8rem; }
  .timeline::before,
  .timeline::after { inset-inline-start: 0.6rem; }
  .timeline__label { justify-self: start; margin-inline-start: 0; font-size: 1rem; box-shadow: 0 10px 30px -14px var(--primary); }
  .timeline__entry,
  .timeline__entry:nth-child(even) {
    width: auto;
    justify-self: stretch;
    margin-inline-start: calc(0.6rem + var(--tl-gap));
  }
  .timeline__entry::before,
  .timeline__entry:nth-child(even)::before {
    inset-inline-end: auto;
    inset-inline-start: calc(var(--tl-gap) * -1);
    background: linear-gradient(to right, color-mix(in srgb, var(--accent) 70%, transparent), transparent);
  }
  [dir="rtl"] .timeline__entry::before,
  [dir="rtl"] .timeline__entry:nth-child(even)::before { background: linear-gradient(to left, color-mix(in srgb, var(--accent) 70%, transparent), transparent); }
  .timeline__dot,
  .timeline__entry:nth-child(even) .timeline__dot {
    inset-inline-end: auto;
    inset-inline-start: calc(var(--tl-gap) * -1 - 6px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .timeline::after { transition: none; }
  .timeline__entry { transition: none; }
}

/* ============================================================
   AURORA (light theme)
   After Aceternity's Aurora Background: bands of blue, sky and
   violet with white streaks between them, sliding slowly across
   a cool white page, blurred, strongest in the top corner and
   fading towards the opposite one. A second, faster layer drifts
   over the first for depth. Only in the light theme, where the
   dark theme's meteors are switched off. (No difference blend:
   over a light page it turned the colours a muddy grey.)
============================================================ */
.aurora {
  display: none;
  position: absolute;
  inset: -10px;
  pointer-events: none;
  opacity: .78;
  --aurora-white: repeating-linear-gradient(100deg, #fff 0%, #fff 7%, transparent 10%, transparent 12%, #fff 16%);
  --aurora-colors: repeating-linear-gradient(100deg, #3b82f6 10%, #a5b4fc 15%, #93c5fd 20%, #ddd6fe 25%, #60a5fa 30%);
  background-image: var(--aurora-white), var(--aurora-colors);
  background-size: 300% 100%, 200% 100%;
  background-position: 50% 50%, 50% 50%;
  filter: blur(12px) saturate(1.2);
  animation: aurora 60s linear infinite;
  will-change: background-position;
  -webkit-mask-image: radial-gradient(ellipse at 100% 0%, #000 12%, transparent 72%);
  mask-image: radial-gradient(ellipse at 100% 0%, #000 12%, transparent 72%);
}
.aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--aurora-white), var(--aurora-colors);
  background-size: 200% 100%, 100% 100%;
  opacity: .55;
  animation: aurora 40s linear infinite reverse;
}
@keyframes aurora {
  from { background-position: 50% 50%, 50% 50%; }
  to { background-position: 350% 50%, 350% 50%; }
}
[data-theme="light"] .aurora { display: block; }
@media (prefers-reduced-motion: reduce) {
  .aurora, .aurora::after { animation: none; }
}


/* The lightbox as a shared-element gallery (static/js/main.js): a frosted
   backdrop that fades in while the photo grows out of its tile, and fades
   with the drag when the photo is pulled away. */
.lightbox{
  background:color-mix(in srgb,var(--bg) calc(var(--fade,1) * 78%),transparent) !important;
  -webkit-backdrop-filter:blur(calc(var(--fade,1) * 22px)) saturate(1.2);
  backdrop-filter:blur(calc(var(--fade,1) * 22px)) saturate(1.2);
  opacity:0;
  animation:none;
  transition:opacity .3s var(--ease);
}
.lightbox.is-open{ opacity:1; }
.lightbox__image{ touch-action:none; cursor:grab; will-change:transform; }
.lightbox__image:active{ cursor:grabbing; }

/* ============================================================
   TILT CARDS ([data-tilt], static/js/tilt.js; the app's
   ProjectTile does the same in React). The card leans towards
   the pointer and a glare follows it.
============================================================ */
.is-tilt {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.2, 1, 0.3, 1);
}
.is-tilt.is-tilting {
  transition: transform 0.08s linear;
}
.is-tilt > .tilt-glare {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 50%),
    rgba(255, 255, 255, 0.16), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.is-tilt.is-tilting > .tilt-glare {
  opacity: 1;
}
.is-tilt:hover {
  transform: perspective(900px) translateY(-3px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
}

/* ============================================================
   BUTTONS, after Wensity's Button: a shine that sweeps across
   the primary on hover, a press that gives, icons that nudge in
   the direction they point, and a loading state (.is-loading)
   that keeps the button's width and shows a spinner instead of
   the words.
============================================================ */
.btn-solid, .btn-ghost, .dn-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-solid:active, .btn-ghost:active, .dn-btn:active { transform: scale(0.97); }
.btn-solid, .dn-btn--primary {
  background-image: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%),
    var(--btn-fill, linear-gradient(120deg, var(--primary, #3c8cff), var(--secondary, #783cff)));
  background-size: 250% 100%, 100% 100%;
  background-position: 130% 0, 0 0;
  background-repeat: no-repeat;
  transition: background-position 0.7s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.dn-btn--primary { --btn-fill: linear-gradient(120deg, var(--dn-a), var(--dn-b)); }
.btn-solid:hover, .dn-btn--primary:hover { background-position: -30% 0, 0 0; }
.btn-solid svg, .btn-ghost svg, .dn-btn svg { transition: transform 0.25s cubic-bezier(0.2, 1.4, 0.4, 1); }
.btn-solid:hover svg, .btn-ghost:hover svg, .dn-btn:hover svg { transform: translateX(3px); }
[dir="rtl"] .btn-solid:hover svg, [dir="rtl"] .btn-ghost:hover svg, [dir="rtl"] .dn-btn:hover svg { transform: translateX(-3px); }
.btn-solid.is-loading, .btn-ghost.is-loading, .dn-btn.is-loading {
  color: transparent !important;
  pointer-events: none;
}
.btn-solid.is-loading > *, .dn-btn.is-loading > * { visibility: hidden; }
.btn-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
  visibility: visible !important;
}
.btn-ghost .btn-spinner { border-color: color-mix(in srgb, currentColor 25%, transparent); border-top-color: var(--ink, #fff); }
@keyframes btn-spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) {
  .btn-solid, .dn-btn--primary { transition: none; }
}

/* ============================================================
   CONTACT CHANNELS (templates/includes/_channels.html)
   One button per phone or messenger: the platform's logo in its
   own colour on a soft tile of that colour, the name and the
   handle. .ch-list--icons is the logos alone (the footers).
============================================================ */
.ch-list{ list-style:none; margin:0; padding:0; display:grid; gap:.55rem;
  grid-template-columns:repeat(auto-fill,minmax(min(100%,210px),1fr)); }
.ch{
  display:flex; align-items:center; gap:.75rem; min-height:3.4rem; padding:.55rem .8rem;
  border-radius:16px; border:1px solid var(--line); background:var(--ch-bg,rgba(127,127,127,.06));
  color:var(--ink); text-decoration:none;
  transition:border-color .25s, transform .25s, box-shadow .25s, background .25s;
}
.ch:hover{
  border-color:color-mix(in srgb,var(--brand) 55%,transparent);
  background:color-mix(in srgb,var(--brand) 8%,var(--ch-bg,transparent));
  box-shadow:0 10px 26px -16px var(--brand); transform:translateY(-2px);
}
.ch__logo{
  flex:none; display:grid; place-items:center; width:2.3rem; height:2.3rem; border-radius:12px;
  color:var(--brand); background:color-mix(in srgb,var(--brand) 14%,transparent);
}
.ch-icon{ width:1.2rem; height:1.2rem; display:block; }
.ch-icon--mask{ background:currentColor; -webkit-mask:var(--mask) no-repeat center / contain; mask:var(--mask) no-repeat center / contain; }
.ch__text{ display:grid; min-width:0; line-height:1.35; }
.ch__name{ font-size:0.8125rem; color:var(--ink-muted); }
.ch__value{ font-size:.9rem; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:start; }
.ch-list--icons{ display:flex; flex-wrap:wrap; gap:.45rem; }
.ch-list--icons .ch{ min-height:0; padding:0; border:0; background:none; border-radius:12px; }
.ch-list--icons .ch:hover{ background:none; box-shadow:none; }
.ch-list--icons .ch__logo{ width:2.25rem; height:2.25rem; }
.ch-list--icons .ch:hover .ch__logo{ color:#fff; background:var(--brand); }

.contact-direct .ch-list{ grid-template-columns:1fr; margin-bottom:1.4rem; }
.site-footer__col .ch-list--icons{ display:flex; }

/* ============================================================
   HEADER: the way into the shop, a gradient pill apart from the
   menu, with a sheen that passes now and then.
============================================================ */
.header-cta{
  position:relative; overflow:hidden; isolation:isolate;
  display:inline-flex; align-items:center; gap:.45rem; height:2.4rem; padding:0 1.05rem;
  border-radius:999px; color:#fff !important; font-size:.84rem; font-weight:700; white-space:nowrap;
  background:linear-gradient(120deg,#3c8cff,#783cff);
  box-shadow:0 10px 26px -12px #5b6cff, inset 0 1px 0 rgba(255,255,255,.25);
  transition:transform .25s var(--ease), box-shadow .25s var(--ease);
}
.header-cta::after{
  content:""; position:absolute; inset:0; z-index:-1;
  background:linear-gradient(110deg,transparent 35%,rgba(255,255,255,.35) 50%,transparent 65%);
  transform:translateX(-120%); animation:cta-sheen 4.5s ease-in-out infinite;
}
.header-cta:hover{ transform:translateY(-1px); box-shadow:0 14px 32px -12px #5b6cff, inset 0 1px 0 rgba(255,255,255,.3); }
@keyframes cta-sheen{ 0%,60%{ transform:translateX(-120%); } 100%{ transform:translateX(120%); } }
@media (max-width:900px){ .header-cta span{ display:none; } .header-cta{ padding:0; width:2.4rem; justify-content:center; } }
@media (prefers-reduced-motion:reduce){ .header-cta::after{ animation:none; } }

/* The real map: tiles around the point, under the pin; dimmed and turned
   dark in the dark theme. The drawn streets stay beneath in case they fail. */
.loc-map__tiles { position: absolute; inset: 0; overflow: hidden; }
.loc-map__tiles img {
  position: absolute; width: 256px; height: 256px; max-width: none;
  filter: saturate(.8);
}
[data-theme="dark"] .loc-map__tiles img,
:root:not([data-theme="light"]) .loc-map__tiles img { filter: invert(1) hue-rotate(180deg) brightness(.85) saturate(.7); }
[data-theme="light"] .loc-map__tiles img { filter: saturate(.8); }
.loc-map__open { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-5); }
.loc-map__open a {
  display: inline-flex; align-items: center; min-height: var(--tap-min); padding: 0 var(--s-4); border-radius: 999px;
  border: 1px solid var(--line); font-size: .8125rem; color: var(--ink-muted); text-decoration: none;
  transition: color .2s, border-color .2s;
}
.loc-map__open a:hover { color: var(--primary); border-color: var(--primary); }
/* The tiles cover the drawn streets (still there beneath if they fail); the
   fade at the bottom and the pin stay on top. */
.loc-map__tiles { z-index: 1; }
.loc-map__streets::after { z-index: 2; }
.loc-map__pin { z-index: 3; }

/* ============================================================
   Persian only: Vazirmatn is the face, so the menu and the small
   print are sized for its letters rather than for small caps.
   Spacing on the SamyarBeatz scale (DESIGN.md).
============================================================ */
:root{
  --s-1:4px;  --s-2:8px;  --s-3:12px; --s-4:16px;
  --s-5:24px; --s-6:32px; --s-7:48px; --s-8:72px; --s-9:104px;
  --page-top:clamp(28px,5vw,64px);
  --section-gap:clamp(56px,7vw,96px);
  --tap-min:44px;
  --t-body:1.0625rem;
  --t-label:.8125rem;
  --t-h3:1.15rem;
}
body{ line-height:1.8; }
.nav{ gap:var(--s-6); }
.nav a{ font-size:1rem; letter-spacing:0; text-transform:none; font-weight:500; padding-block:var(--s-2); }
.site-footer__col a{ font-size:1rem; display:inline-flex; align-items:center; min-height:36px; }
.site-footer__bottom{ font-size:.92rem; }
.header-cta{ font-size:.92rem; }

/* Where the language flags were: the way to donate. */
.header-donate{
  display:inline-flex; align-items:center; gap:.45rem; height:2.4rem; padding:0 1rem;
  border-radius:999px; color:#fff !important; font-size:.92rem; font-weight:700; white-space:nowrap;
  background:linear-gradient(135deg,#FF8C42,#E8590C);
  box-shadow:0 10px 24px -12px #E8590C;
  transition:transform .25s var(--ease), box-shadow .25s var(--ease);
}
.header-donate:hover{ transform:translateY(-1px); box-shadow:0 14px 30px -12px #E8590C; }
@media (max-width:900px){ .header-donate span{ display:none; } .header-donate{ padding:0; width:2.4rem; justify-content:center; } }

/* No overlap, whatever the content. */
:where(main,footer) :where(div,section,article,aside,li,p,h1,h2,h3,h4,dd,dt,label){ min-width:0; }
:where(main,footer) :where(p,h1,h2,h3,h4,li,dd,dt,a,label){ overflow-wrap:break-word; }
/* The Toman donate button a full step below the wallets intro, not on it. */
.section-intro + .donate-cta{ margin-top:var(--s-5); }
.donate-cta{ margin-bottom:var(--s-6); }
/* Each paragraph takes its direction from its own first letter. */
:where(main,footer) :where(p,h1,h2,h3,h4,li,dd,blockquote){ unicode-bidi:plaintext; }
/* Where the reveal is tied to scrolling, the fallback's transitions (whose
   rules come after the @supports block above and won the cascade) are off:
   two systems moving the same element made it jump now and then. */
@supports (animation-timeline: view()){
  html.has-js .reveal,
  html.has-js .reveal :is(.project-bento,.project-grid,.teaser-grid,.wallet-grid,.work-grid) > *{ transition:none; }
}
/* The player's badge was sized for spaced Latin capitals; in Persian that
   read as a speck. */
.player__badge{ font-size:0.8125rem; letter-spacing:0; text-transform:none; padding:.3rem .8rem; }

/* ============================================================
   SOFT 3D on the coloured buttons, after SamyarBeatz's One UI
   tiles at about two thirds of their strength: a 145deg light
   from the top corner with shade toward the bottom, a 1px
   highlight along the top edge and a 1px shade along the bottom.
   It is a layer under the label (::before at z-index -1 inside
   the button's own stacking context), so every button keeps its
   own colour, glow, radius and sheen. A press turns the light
   round, as if the button sank.
============================================================ */
.btn-solid,
.dn-btn--primary,
.header-cta,
.header-donate,
.ctrl-btn-play{ position:relative; isolation:isolate; }
.btn-solid::before,
.dn-btn--primary::before,
.header-cta::before,
.header-donate::before,
.ctrl-btn-play::before{
  content:""; position:absolute; inset:0; z-index:-1; border-radius:inherit; pointer-events:none;
  background:linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,0) 46%, rgba(0,0,0,.12));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22), inset 0 -1px 0 rgba(0,0,0,.18);
}
.btn-solid:active::before,
.dn-btn--primary:active::before,
.header-cta:active::before,
.header-donate:active::before,
.ctrl-btn-play:active::before{
  background:linear-gradient(145deg, rgba(0,0,0,.1), rgba(0,0,0,0) 50%, rgba(255,255,255,.08));
  box-shadow:inset 0 1px 2px rgba(0,0,0,.22);
}

/* ============================================================
   HELPTIP: a "?" beside what a visitor may not understand
   (templates/includes/_helptip.html, static/js/helptip.js).
   The bubble is dark in both themes, like a system tooltip. It is
   fixed, placed by the script under the "?" and kept 16px inside
   the screen (--ht-x, --ht-y): an absolute bubble near the left
   edge widened the whole right-to-left page the moment it opened.
============================================================ */
.ht-row{ display:flex; align-items:center; gap:var(--s-2); }
.ht-row > :first-child{ min-width:0; }
.helptip{ position:relative; display:inline-flex; vertical-align:middle; margin-inline-start:var(--s-1); }
.helptip__btn{
  position:relative; display:grid; place-items:center; flex:none;
  width:20px; height:20px; padding:0; border-radius:50%;
  border:1px solid var(--line-strong, rgba(255,255,255,.18)); background:transparent;
  color:var(--ink-muted, currentColor); cursor:help;
  transition:color .2s ease, border-color .2s ease;
}
/* 44px to tap; the drawn circle stays small beside the text. */
.helptip__btn::after{ content:""; position:absolute; inset:-12px; }
.helptip__btn:hover, .helptip.is-open .helptip__btn{ color:var(--ink, #fff); border-color:currentColor; }
.helptip__pop{
  position:fixed; z-index:60; top:var(--ht-y, 0); left:var(--ht-x, 0);
  width:max-content; max-width:min(18rem, calc(100vw - 32px));
  padding:var(--s-3) var(--s-4); border-radius:12px;
  background:#1d1d23; color:#f4f4f5; border:1px solid rgba(255,255,255,.1);
  box-shadow:0 1px 2px rgba(0,0,0,.4), 0 14px 34px -10px rgba(0,0,0,.6);
  font-family:inherit; font-size:.875rem; font-weight:400; line-height:1.8;
  text-align:start; white-space:normal; letter-spacing:0; text-transform:none; unicode-bidi:plaintext;
  display:none;
}
@keyframes ht-in{ from{ opacity:0; } }
/* A bridge over the gap, so the pointer can reach the bubble. */
.helptip__pop::before{ content:""; position:absolute; inset-inline:0; top:calc(-1 * var(--s-2)); height:var(--s-2); }
.helptip.is-open .helptip__pop,
.helptip:not(.is-dismissed) .helptip__btn:focus-visible + .helptip__pop{
  display:block; animation:ht-in .18s ease;
}
@media (hover:hover){
  .helptip:not(.is-dismissed):hover .helptip__pop{
    display:block; animation:ht-in .18s ease;
  }
}
@media (prefers-reduced-motion:reduce){ .helptip__pop{ animation:none !important; } }

/* ---------- the owner's announcement (includes/_announcement.html) ----------
   First in <main>, so it takes the header's room and the section after it
   starts without that padding of its own. */
.site-notice{
  width:min(100% - 2 * var(--s-4), 72rem);
  margin:calc(var(--header-h) + var(--s-3)) auto 0; padding:var(--s-2) var(--s-4);
  border-radius:var(--radius-sm); font-size:.875rem; line-height:1.7; text-align:center; color:var(--ink);
  background:color-mix(in srgb,var(--primary) 14%,transparent);
  border:1px solid color-mix(in srgb,var(--primary) 38%,transparent);
}
main > .site-notice + article > :first-child{ padding-top:var(--space-section); }
