/* =============================================================
   Joud Alharthi — Portfolio
   Concept: an archaeological excavation. Scroll = digging down
   through strata. Visual language: AlUla + Historic Jeddah.
   ============================================================= */

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* palette */
  --cream:      #F4EDE2;   /* Al-Balad limestone       */
  --sandstone:  #E2CDAE;   /* AlUla sandstone          */
  --ochre:      #C8A27A;   /* desert ochre             */
  --hegra:      #8B4A32;   /* Hegra iron-oxide red      */
  --roshan:     #2E7D74;   /* roshan turquoise (accent) */
  --indigo:     #1B2A41;   /* AlUla night sky           */
  --ink:        #2B2119;   /* ink brown-black (text)    */
  --gold:       #C9A227;   /* manuscript gold           */

  /* stratum tones, surface -> deep */
  --s-surface:  #F6F0E6;
  --s-a:        #F0E6D5;
  --s-b:        #E9D9C0;
  --s-c:        #E0CBAB;
  --s-d:        #D4B98F;
  --s-e:        #C9A87A;

  --measure: 62ch;
  --nav-w: 150px;

  --f-display: "Cormorant Garamond", Georgia, serif;
  --f-body: "Inter", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;
}
/* Arabic swaps the display + body faces */
html[lang="ar"] {
  --f-display: "Amiri", serif;
  --f-body: "IBM Plex Sans Arabic", system-ui, sans-serif;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--s-surface);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; color: var(--hegra); }

/* ---------- BILINGUAL SHOW / HIDE ---------- */
[data-lang] { display: none; }
html[lang="en"] [data-lang="en"] { display: revert; }
html[lang="ar"] [data-lang="ar"] { display: revert; }
html[lang="ar"] body { line-height: 1.9; }         /* Arabic needs more air */
html[lang="ar"] .hero__name { line-height: 1.05; }

/* ---------- PAPER / STONE GRAIN ---------- */
.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  opacity: 0.035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- IKMAH INSCRIPTION TEXTURE ---------- */
.ikmah-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  color: var(--hegra); opacity: 0.05;
}
.ikmah-bg svg { width: 100%; height: 100%; }

/* ---------- HEADER ---------- */
.site-head {
  position: fixed; top: 0; inset-inline: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 40px);
  mix-blend-mode: multiply;
}
.brand {
  font-family: var(--f-display); font-size: 1.35rem; font-weight: 600;
  letter-spacing: .01em;
}
.lang-toggle {
  font-family: var(--f-mono); font-size: .74rem; letter-spacing: .14em;
  text-transform: uppercase; cursor: pointer;
  background: transparent; color: var(--ink);
  border: 1px solid var(--ink); border-radius: 0;
  padding: 8px 14px; transition: background .25s, color .25s;
}
.lang-toggle:hover { background: var(--ink); color: var(--cream); }

/* ---------- DEPTH SCALE (desktop) ---------- */
.depth-scale {
  position: fixed; top: 0; inset-inline-start: 0; z-index: 55;
  height: 100vh; width: var(--nav-w);
  display: flex; flex-direction: column; justify-content: center;
  padding-inline-start: 22px;
}
.depth-scale::before {   /* the measuring line */
  content: ""; position: absolute; top: 16%; bottom: 16%;
  inset-inline-start: 46px; width: 1px;
  background: linear-gradient(var(--ochre), var(--hegra));
}
.depth-scale__unit {
  position: absolute; top: calc(16% - 20px); inset-inline-start: 40px;
  font-family: var(--f-mono); font-size: .7rem; color: var(--hegra);
}
.depth-scale ol {
  list-style: none; height: 68%;
  display: flex; flex-direction: column; justify-content: space-between;
}
.depth-scale a {
  display: flex; align-items: center; gap: 12px;
  color: var(--ink); opacity: .5; transition: opacity .25s;
}
.depth-scale a:hover, .depth-scale a.is-active { opacity: 1; }
.depth-scale i {
  font-family: var(--f-mono); font-size: .74rem; font-style: normal;
  width: 26px; text-align: end; color: var(--hegra);
}
.depth-scale b {
  font-family: var(--f-mono); font-size: .66rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
}
.depth-scale a.is-active i, .depth-scale a.is-active b { color: var(--hegra); font-weight: 500; }
.depth-scale__marker {
  position: absolute; inset-inline-start: 42px; top: 16%;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--gold); border: 1px solid var(--indigo);
  transform: translate(-50%, -50%); transition: top .15s linear;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 30%, transparent);
}
[dir="rtl"] .depth-scale__marker { transform: translate(50%, -50%); }

/* mobile horizontal progress */
.depth-progress {
  position: fixed; top: 0; inset-inline: 0; z-index: 55; height: 4px;
  background: color-mix(in srgb, var(--ochre) 40%, transparent);
  display: none;
}
.depth-progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold), var(--hegra));
}

/* ---------- STRATA ---------- */
.stratum {
  position: relative; z-index: 1; overflow: hidden;
  padding: clamp(80px, 12vh, 150px) clamp(22px, 6vw, 80px);
  padding-inline-start: clamp(22px, calc(var(--nav-w) + 2vw), 220px);
}
.stratum--surface { background: var(--s-surface); min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; }

/* =========================================================
   MOTIF COLOUR SYSTEM
   Every motif is flat fill layers (.f/.f2/.f3) + ink outline (.o).
   A tone class on the <use> sets the whole palette of that copy.
   ========================================================= */
/* Motifs are drawn with <use>, which builds a shadow tree that document
   selectors cannot reach. Custom properties DO inherit across that
   boundary, so each tone class simply declares --m1/--m2/--m3/--mo. */
.t-sand  { --m1: var(--sandstone); --m2: var(--ochre);  --m3: var(--hegra);  --mo: var(--ink); }
.t-ochre { --m1: var(--ochre);     --m2: var(--hegra);  --m3: var(--cream);  --mo: var(--ink); }
.t-red   { --m1: var(--hegra);     --m2: var(--ochre);  --m3: var(--cream);  --mo: var(--ink); }
.t-teal  { --m1: var(--roshan);    --m2: var(--cream);  --m3: var(--ochre);  --mo: var(--ink); }
.t-deep  { --m1: var(--indigo);    --m2: var(--roshan); --m3: var(--gold);   --mo: var(--cream); }
.t-cream { --m1: var(--cream);     --m2: var(--roshan); --m3: var(--hegra);  --mo: var(--ink); }
.t-ink   { --m1: var(--ochre);     --m2: var(--hegra);  --m3: var(--ink);    --mo: var(--ink); }
.motif use, .amb use { opacity: .92; }

/* Hero is a single quiet cream column — the type carries it. */
.hero { grid-template-columns: minmax(0, 1fr); max-width: 680px; }
.stratum--a { background: var(--s-a); }
.stratum--ab { background: color-mix(in srgb, var(--s-a) 50%, var(--s-b)); }
.stratum--b { background: var(--s-b); }
.stratum--c { background: var(--s-c); }
.stratum--d { background: var(--s-d); }
.stratum--e { background: var(--s-e); }
.stratum--bedrock { background: var(--indigo); color: var(--cream); }

/* irregular boundary between strata */
.strata-line { position: relative; z-index: 2; line-height: 0; margin-top: -1px; }
.strata-line svg { width: 100%; height: clamp(36px, 5vw, 60px); }
.strata-line path:first-child { fill: var(--s-a); }
.stratum--a + .strata-line path:first-child { fill: color-mix(in srgb, var(--s-a) 50%, var(--s-b)); }
.stratum--ab + .strata-line path:first-child { fill: var(--s-b); }
.stratum--b + .strata-line path:first-child { fill: var(--s-c); }
.stratum--c + .strata-line path:first-child { fill: var(--s-d); }
.stratum--d + .strata-line path:first-child { fill: var(--s-e); }
.strata-line .hatch { stroke: color-mix(in srgb, var(--hegra) 40%, transparent); stroke-width: 1; stroke-dasharray: 2 7; }
.strata-line--bedrock path:first-child { fill: var(--indigo); }

/* ---------- AMBIENT MOTIFS (decorative, per stratum) ---------- */
.amb { position: absolute; z-index: 0; pointer-events: none; width: clamp(220px, 34vw, 460px); opacity: .16; }
.amb svg { width: 100%; height: auto; }
.amb--tr { top: -20px; inset-inline-end: -30px; }
.amb--br { bottom: -20px; inset-inline-end: -30px; }
.amb--night { opacity: .3; }
[dir="rtl"] .amb svg { transform: scaleX(-1); }
.stratum > *:not(.amb):not(.hero-field):not(.stars) { position: relative; z-index: 1; }

/* ---------- FIELD RECORD LABEL ---------- */
.field-record {
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--hegra);
  margin-bottom: clamp(18px, 4vh, 40px);
  padding-bottom: 8px; border-bottom: 1px solid color-mix(in srgb, var(--hegra) 30%, transparent);
  display: inline-block;
}
.field-record--light { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 40%, transparent); }

/* ---------- SECTION HEADINGS ---------- */
.section-title {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(2rem, 5.5vw, 3.6rem); line-height: 1.08;
  letter-spacing: -.01em; max-width: 18ch; margin-bottom: .5em;
}
.section-title--light { color: var(--cream); }
.section-lede { font-size: 1.1rem; color: color-mix(in srgb, var(--ink) 78%, transparent); margin-bottom: 2.4em; max-width: 44ch; }

/* ---------- HERO ---------- */
.hero {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 5vw, 72px);
  align-items: center; flex: 1;
}
.hero__dig { position: relative; }
.hero__eyebrow {
  font-family: var(--f-mono); font-size: .8rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--hegra); margin-bottom: 1rem;
}
.hero__name {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(3.4rem, 12vw, 7.5rem); line-height: .92;
  letter-spacing: -.02em; color: var(--ink);
}
.hero__title { font-family: var(--f-display); font-size: clamp(1.3rem, 3vw, 1.9rem); margin-top: .5rem; color: var(--hegra); }
.hero__loc { font-family: var(--f-mono); font-size: .8rem; letter-spacing: .12em; margin-top: 1rem; color: color-mix(in srgb, var(--ink) 70%, transparent); }
.hero__sand {
  position: absolute; inset: -8% -6%; width: 112%; height: 116%;
  z-index: 3; pointer-events: none;   /* never blocks scroll/tap (esp. mobile) */
}
.cv-btn {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 1.6rem;
  font-family: var(--f-mono); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink); background: transparent; border: 1px solid var(--ink);
  padding: 13px 22px; min-height: 44px;
  transition: background .25s, color .25s, transform .2s;
}
.cv-btn:hover { background: var(--hegra); border-color: var(--hegra); color: var(--cream); transform: translateY(-2px); }
.cv-btn svg { flex: none; }
.hero__hint {
  position: absolute; inset-inline-start: 2px; bottom: -34px; z-index: 4;
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .12em;
  color: var(--hegra); transition: opacity .6s;
}
.museum-label {
  font-family: var(--f-mono); font-size: .66rem; letter-spacing: .08em;
  text-transform: uppercase; color: color-mix(in srgb, var(--ink) 65%, transparent);
  margin-top: 14px; text-align: center; line-height: 1.5;
}
.scroll-cue {
  align-self: center; margin-top: clamp(24px, 5vh, 60px);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--hegra);
}
.scroll-cue svg { animation: bob 2.2s ease-in-out infinite; }
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(6px);} }

/* ---------- CONTEXT / ABOUT ---------- */
.context { display: grid; grid-template-columns: 1.4fr .6fr; gap: clamp(24px, 5vw, 60px); align-items: start; }
.context__body { max-width: var(--measure); }
.context__body p { margin-bottom: 1.1em; font-size: 1.12rem; }
.context__body p:first-child { font-size: 1.35rem; font-family: var(--f-display); }
.sherd svg { max-width: 260px; }

/* ---------- WHAT I BRING / VALUE CARDS ---------- */
.value { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 36px); margin-bottom: clamp(32px, 6vh, 56px); }
.value__card {
  border-top: 3px solid var(--m1, var(--hegra));
  padding-top: 20px;
}
.value__fig {
  font-family: var(--f-display); font-size: clamp(2.6rem, 6vw, 3.8rem); font-weight: 700;
  line-height: 1; color: var(--m1, var(--hegra)); margin-bottom: 10px;
}
html[lang="ar"] .value__fig { font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
.value__card h3 { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.25rem, 2.6vw, 1.6rem); line-height: 1.15; margin-bottom: 8px; }
.value__card p { color: color-mix(in srgb, var(--ink) 80%, transparent); font-size: .98rem; }

.ready {
  border-top: 1px solid color-mix(in srgb, var(--hegra) 25%, transparent);
  padding-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px;
}
.ready__label { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--hegra); }
html[lang="ar"] .ready__label { font-family: var(--f-body); letter-spacing: normal; font-size: .85rem; }
.ready__list { flex: 1 1 320px; font-size: 1rem; color: color-mix(in srgb, var(--ink) 82%, transparent); }
.ready__cta { margin-top: 0; }

/* ---------- FIELD KIT / SKILLS ---------- */
.kit {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 44px) clamp(16px, 2vw, 32px);
}
.tool { text-align: center; }
.tool svg { width: 100%; max-width: 132px; margin: 0 auto 6px; overflow: visible; }
.tool .museum-label { border-top: 1px solid color-mix(in srgb, var(--hegra) 30%, transparent); padding-top: 8px; }

/* cartouche backing — a soft coloured tablet the glyph sits on */
.tool .cart { stroke: none; transition: opacity .3s, transform .3s; transform-origin: center; }
.t-red   .cart { fill: color-mix(in srgb, var(--hegra) 16%, transparent); }
.t-teal  .cart { fill: color-mix(in srgb, var(--roshan) 16%, transparent); }
.t-ochre .cart { fill: color-mix(in srgb, var(--ochre) 24%, transparent); }
.t-sand  .cart { fill: color-mix(in srgb, var(--sandstone) 40%, transparent); }
.tool:hover .cart { transform: scale(1.06); }
/* glyph strokes pick up the tone's ink */
.t-red   .dline { stroke: var(--hegra); }
.t-teal  .dline { stroke: var(--roshan); }
.t-ochre .dline, .t-sand .dline { stroke: var(--ink); }

/* ---------- MUSEUM-LABEL CONTEXT CARDS (no shadow, no radius) ---------- */
.log { list-style: none; display: grid; gap: clamp(24px, 4vh, 48px); max-width: 760px; }
.context-card {
  border-inline-start: 2px solid var(--gold);
  padding-inline-start: clamp(18px, 3vw, 32px);
  padding-block: 4px;
}
.context-card__acc { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .16em; color: var(--hegra); margin-bottom: 6px; }
.context-card h3 { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.1; }
.context-card__org { font-family: var(--f-mono); font-size: .8rem; letter-spacing: .06em; color: var(--roshan); margin: 4px 0 10px; }
.context-card__desc { font-size: 1.05rem; max-width: 56ch; }
.context-card__tags { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--ink) 60%, transparent); margin-top: 10px; }
.prov { display: grid; gap: clamp(24px, 4vh, 40px); max-width: 760px; }

/* ---------- SITES / INTERESTS ---------- */
.sites { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(24px, 4vw, 56px); max-width: 900px; }
.site svg { width: 100%; max-width: 220px; margin-bottom: 10px; }
/* flat colour blocks under the ink outlines */
.sfill { stroke: none; }
.sfill.sand  { fill: color-mix(in srgb, var(--sandstone) 85%, #fff); }
.sfill.cream { fill: var(--cream); }
.sfill.ochre { fill: var(--ochre); }
.sfill.red   { fill: color-mix(in srgb, var(--hegra) 62%, var(--sandstone)); }
.sfill.teal  { fill: color-mix(in srgb, var(--roshan) 55%, var(--cream)); }
.site figcaption b { display: block; font-family: var(--f-display); font-size: 1.5rem; font-weight: 600; }
.site figcaption span { display: block; font-size: 1rem; color: color-mix(in srgb, var(--ink) 78%, transparent); max-width: 40ch; margin-top: 4px; }

/* ---------- BEDROCK / CONTACT ---------- */
.stratum--bedrock { min-height: 92vh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.stars { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 22%, #fff9, transparent),
    radial-gradient(1.2px 1.2px at 28% 64%, #fff8, transparent),
    radial-gradient(1.6px 1.6px at 46% 18%, #fffb, transparent),
    radial-gradient(1.1px 1.1px at 63% 48%, #fff7, transparent),
    radial-gradient(1.5px 1.5px at 78% 30%, #fff9, transparent),
    radial-gradient(1.2px 1.2px at 88% 70%, #fff8, transparent),
    radial-gradient(1.3px 1.3px at 36% 82%, #fff7, transparent),
    radial-gradient(1.4px 1.4px at 70% 86%, #fff9, transparent);
}
.bedrock { position: relative; z-index: 1; max-width: 760px; }
.bedrock__lede { font-size: 1.2rem; color: color-mix(in srgb, var(--cream) 85%, transparent); margin: 1em 0 2.4em; max-width: 44ch; }
.bedrock__links { list-style: none; display: grid; gap: 2px; max-width: 520px; }
.bedrock__links a {
  display: flex; align-items: baseline; gap: 16px;
  padding: 16px 0; border-top: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
  font-family: var(--f-display); font-size: 1.5rem; color: var(--cream);
  transition: padding-inline-start .25s, color .25s;
}
.bedrock__links a:last-child { border-bottom: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); }
.bedrock__links a:hover { padding-inline-start: 12px; color: var(--gold); }
.bedrock__links i { font-family: var(--f-mono); font-size: .82rem; font-style: normal; letter-spacing: .06em; color: color-mix(in srgb, var(--cream) 60%, transparent); margin-inline-start: auto; }
.colophon { position: relative; z-index: 1; margin-top: clamp(40px, 8vh, 90px); font-family: var(--f-mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: color-mix(in srgb, var(--cream) 45%, transparent); }

/* ---------- INK ILLUSTRATION DRAW-ON ---------- */
.ink path { stroke-linecap: round; }
.ink .dline { transition: stroke-dashoffset 1.5s ease; }
.ink .dfill { opacity: 0; transition: opacity .8s ease .6s; }
.ink.is-drawn .dfill { opacity: 1; }

/* ---------- FOCUS (manuscript gold) ---------- */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- ARABIC REFINEMENTS (delightful, correct joining) ---------- */
/* Labels: use the Arabic sans and NEVER letter-space (it breaks the cursive join) */
html[lang="ar"] .field-record,
html[lang="ar"] .museum-label,
html[lang="ar"] .hero__eyebrow,
html[lang="ar"] .hero__loc,
html[lang="ar"] .cv-btn,
html[lang="ar"] .context-card__acc,
html[lang="ar"] .context-card__org,
html[lang="ar"] .context-card__tags,
html[lang="ar"] .lang-toggle,
html[lang="ar"] .depth-scale i,
html[lang="ar"] .depth-scale b,
html[lang="ar"] .scroll-cue,
html[lang="ar"] .colophon,
html[lang="ar"] .bedrock__links i {
  font-family: var(--f-body);
  letter-spacing: normal;
  text-transform: none;
}
/* Display: Amiri, generous, no negative tracking */
html[lang="ar"] .section-title,
html[lang="ar"] .hero__name,
html[lang="ar"] .hero__title,
html[lang="ar"] .context__body p:first-child,
html[lang="ar"] .context-card h3,
html[lang="ar"] .site figcaption b,
html[lang="ar"] .bedrock__links a {
  font-family: var(--f-display);
  letter-spacing: normal;
}
html[lang="ar"] .hero__name { font-size: clamp(3.2rem, 12vw, 7rem); font-weight: 700; }
html[lang="ar"] .section-title { font-size: clamp(2rem, 5.5vw, 3.4rem); max-width: 24ch; }
html[lang="ar"] .context__body p { font-size: 1.2rem; }
html[lang="ar"] .hero__eyebrow { font-size: .95rem; }
html[lang="ar"] .field-record { font-size: .82rem; letter-spacing: normal; }
html[lang="ar"] .cv-btn { font-size: .95rem; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; max-width: none; }
  .context { grid-template-columns: 1fr; }
  .kit { grid-template-columns: repeat(3, 1fr); }
  .value { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 768px) {
  .depth-scale { display: none; }
  .depth-progress { display: block; }
  .stratum { padding-inline: clamp(20px, 6vw, 40px); padding-inline-start: clamp(20px, 6vw, 40px); }
  .site figcaption b { font-size: 1.3rem; }
}
@media (max-width: 520px) {
  .kit { grid-template-columns: repeat(2, 1fr); }
  .sites { grid-template-columns: 1fr; }
  .bedrock__links a { font-size: 1.2rem; flex-wrap: wrap; gap: 6px; }
  .bedrock__links i { margin-inline-start: 0; }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .ink .dline { transition: none !important; stroke-dashoffset: 0 !important; }
  .ink .dfill { opacity: 1 !important; transition: none !important; }
  .hero__sand { display: none !important; }
}

/* ---------- PRINT: clean one-page CV ---------- */
@media print {
  .grain, .ikmah-bg, .depth-scale, .depth-progress, .lang-toggle,
  .hero__sand, .hero__hint, .scroll-cue, .strata-line, .stars,
  .hero-field, .amb, .sherd { display: none !important; }
  .stratum { overflow: visible !important; }
  body, .stratum, .stratum--bedrock { background: #fff !important; color: #000 !important; }
  .stratum { min-height: 0 !important; padding: 10px 0 !important; break-inside: avoid; }
  .section-title, .section-title--light, .bedrock__links a, .colophon, .field-record--light { color: #000 !important; }
  .hero__name { font-size: 2.4rem !important; }
  .section-title { font-size: 1.5rem !important; }
  a { color: #000 !important; }
  .bedrock__links a { border-color: #999 !important; }
}

/* ---------- MOBILE UX POLISH ---------- */
@media (max-width: 768px) {
  .hero__hint { position: static; margin-top: 12px; }
  .hero { gap: 28px; }
  .site-head { padding: 14px 18px; }
  .context-card__desc { font-size: 1rem; }
}
@media (max-width: 520px) {
  .hero__name { font-size: clamp(3rem, 15vw, 4.8rem); }
  html[lang="ar"] .hero__name { font-size: clamp(2.8rem, 14vw, 4.6rem); }
  .cv-btn { width: 100%; justify-content: center; }
  .section-title { font-size: clamp(1.9rem, 8vw, 2.6rem); }
  .field-record { font-size: .62rem; }
  .site figcaption span { font-size: .95rem; }
}
