@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/fonts/instrument-serif.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/fonts/instrument-serif-italic.woff2") format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }

@font-face { font-family: "IBM Plex Sans Arabic"; src: url("/fonts/plex-arabic-400.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("/fonts/plex-arabic-500.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("/fonts/plex-arabic-600.woff2") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

:root {
  color-scheme: dark;
  --bg: #0e0e0d;
  --surface: #161614;
  --ink: #ecebe6;
  --ink-2: #a8a59c;
  --ink-3: #6f6c65;
  --line: #26251f;
  --accent: #d4a865;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --sans: "Inter", "IBM Plex Sans Arabic", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.65 var(--sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--accent); color: var(--bg); }

main {
  position: relative;
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(5.5rem, 12vw, 8rem) 1.25rem 4rem;
}

a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 0.22em; text-decoration-thickness: 1px; transition: color .15s, text-decoration-color .15s; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.muted { color: var(--ink-3); }
.tools { position: absolute; top: 1.75rem; inset-inline-end: 1.25rem; display: flex; gap: 1.25rem; align-items: baseline; font-size: 0.9rem; }
.lang { color: var(--ink-2); }
/* Bionic reading, experience descriptions only: word starts wrapped in .bx by /bionic.js */
.bx { font-weight: 560; color: color-mix(in oklab, var(--accent) 72%, var(--ink-2)); }
p { margin: 0; }

/* Intro */
h1 {
  font: 400 clamp(2.6rem, 8vw, 3.6rem)/1.05 var(--serif);
  letter-spacing: -0.015em;
  margin: 0;
}
.role {
  margin-top: 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
}
.lede {
  margin-top: 0.9rem;
  font: 400 clamp(1.1rem, 2.8vw, 1.25rem)/1.65 var(--sans);
  color: var(--ink-2);
  max-width: 36rem;
}
.links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin-top: 2rem; font-size: 0.95rem; }

/* Sections */
section { margin-top: clamp(3.5rem, 9vw, 5rem); }
h2 {
  font: 500 0.75rem/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.rows { list-style: none; margin: 0; padding: 0; }
.rows li { padding: 0.9rem 0; }
.rows li + li { border-top: 1px solid var(--line); }
.rows .head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.1rem 1.5rem; }
.rows .what { flex: 1 1 18rem; color: var(--ink-2); }
.rows .what b { font-weight: 600; color: var(--ink); }
.rows .what .title { color: var(--ink); }
.rows .when { color: var(--ink-3); font-size: 0.85rem; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: 0.01em; }
.rows p { color: var(--ink-2); font-size: 0.95rem; margin-top: 0.35rem; max-width: 38rem; }
.rows .title { font-weight: 500; text-decoration-color: var(--line); }


.feature {
  padding: 1.5rem 1.5rem 0.6rem;
  background:
    radial-gradient(120% 120% at 100% 0%, color-mix(in oklab, var(--accent) 13%, transparent) 0%, transparent 50%),
    var(--surface);
  border: 1px solid color-mix(in oklab, var(--accent) 26%, var(--line));
  border-radius: 14px;
}
.feature .k { display: block; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.feature-title { display: inline-block; font: 400 2.4rem/1.1 var(--serif); margin-top: 0; color: var(--ink); text-decoration: none; }
.feature-title::after { content: " ↗"; font: 400 1rem var(--sans); color: var(--ink-3); transition: color .2s; }
.feature-title:hover::after { color: var(--accent); }
.feature .pitch { margin-top: 0.6rem; color: var(--ink-2); font-size: 1.05rem; line-height: 1.6; max-width: 36rem; }
.rows.parts { margin-top: 1rem; border-top: 1px solid var(--line); }
.rows .src { display: flex; gap: 0.9rem; font-size: 0.85rem; white-space: nowrap; }
.rows .src a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); }
.rows .src a:hover { color: var(--accent); }
:lang(ar) .feature .k { letter-spacing: 0; text-transform: none; font-size: 0.85rem; }
:lang(ar) .feature .pitch { line-height: 1.9; }
[dir="rtl"] .feature { background: radial-gradient(120% 120% at 0% 0%, color-mix(in oklab, var(--accent) 13%, transparent) 0%, transparent 50%), var(--surface); }
[dir="rtl"] .feature-title::after { content: " ↖"; }
[dir="rtl"] .rows .src a { unicode-bidi: isolate; }

.inline-list { color: var(--ink-2); }
.inline-list a { color: var(--ink); }

footer { margin-top: 5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--ink-2); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; }

/* Arabic */
:root:lang(ar) { --arabic: "IBM Plex Sans Arabic", "Inter", ui-sans-serif, system-ui, sans-serif; }
:lang(ar) body { font-family: var(--arabic); line-height: 1.9; font-feature-settings: normal; }
:lang(ar) h1 { font: 600 clamp(2.4rem, 7.5vw, 3.2rem)/1.25 var(--arabic); letter-spacing: 0; }
:lang(ar) .lede { font: 400 clamp(1.1rem, 3vw, 1.25rem)/1.9 var(--arabic); max-width: 36rem; }

:lang(ar) .role, :lang(ar) h2 { letter-spacing: 0; text-transform: none; }
:lang(ar) h2 { font-size: 0.9rem; font-weight: 500; }
:lang(ar) .rows p { line-height: 1.85; }
[dir="rtl"] .rows .title:lang(en) { line-height: 1.5; }
[dir="rtl"] .inline-list a, [dir="rtl"] bdi { unicode-bidi: isolate; }

@media (max-width: 34rem) {
  .rows .head { flex-direction: column; align-items: flex-start; }
  .rows .what { flex: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.rows span.name { color: var(--ink); font-weight: 500; }
/* Project lists: calmer than experience — no dividers, tighter rhythm */
.rows.work li { padding: 0.55rem 0; }
.rows.work li + li { border-top: 0; }
.rows.work p { margin-top: 0.15rem; }
