/* ==========================================================================
   zahraawazni.com
   --------------------------------------------------------------------------
   Colors, fonts and sizes live in the :root block just below. Change a value
   there and it updates everywhere. Dark-mode colors are in the block after it.
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL Open Font License, see /fonts) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin-full-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin-full-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  /* Surfaces & text */
  --bg: #fbf6ee;           /* warm cream page */
  --bg-deep: #f4ebdd;      /* sand, used for tinted bands */
  --surface: #fffdf9;      /* cards */
  --ink: #2e2420;          /* main text, deep cocoa */
  --ink-soft: #6b5a50;     /* secondary text */
  --line: #ebdfcf;
  --line-strong: #d9c7b2;

  /* Accent (terracotta) */
  --accent: #b84e33;       /* buttons, decorations */
  --accent-hover: #a3432b;
  --accent-ink: #a8452c;   /* accent-colored text */
  --on-accent: #fffaf4;    /* text on accent buttons */
  --ok: #5b9a5f;

  /* Soft tints for cards & tags */
  --peach: #f9dccb;
  --sage: #dde6d3;
  --butter: #f7e8bb;
  --rose: #f3d6d8;
  --peach-deep: #eeb197;
  --sage-deep: #b5c8a6;
  --butter-deep: #ebd07c;
  --rose-deep: #e4a9ae;

  /* Shape & depth */
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgb(46 36 32 / 0.04), 0 4px 14px -6px rgb(46 36 32 / 0.08);
  --shadow-lift: 0 2px 4px rgb(46 36 32 / 0.05), 0 22px 44px -16px rgb(46 36 32 / 0.25);

  /* Type */
  --font-display: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --font-body: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --container: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
  --header-h: 72px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1713;
    --bg-deep: #251e19;
    --surface: #2b231e;
    --ink: #f4ebe0;
    --ink-soft: #c4b3a4;
    --line: #3a3029;
    --line-strong: #4f4239;

    --accent: #e0805f;
    --accent-hover: #ec9272;
    --accent-ink: #f0937a;
    --on-accent: #22160f;
    --ok: #7fc184;

    --peach: #45291f;
    --sage: #2c3528;
    --butter: #3d3321;
    --rose: #452a2e;
    --peach-deep: #7a4532;
    --sage-deep: #4f6343;
    --butter-deep: #6f5c2f;
    --rose-deep: #774a51;

    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.25), 0 4px 14px -6px rgb(0 0 0 / 0.35);
    --shadow-lift: 0 2px 4px rgb(0 0 0 / 0.3), 0 22px 44px -16px rgb(0 0 0 / 0.6);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 560;
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 100, "WONK" 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent-ink);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 2.5px; }

em { font-family: var(--font-display); font-style: italic; font-size: 1.04em; }

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

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--inline { display: inline-block; width: 1em; height: 1em; vertical-align: -0.12em; }

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 48px;
  padding: 0.7em 1.35em;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: 600 1rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.button:hover { transform: translateY(-2px); text-decoration: none; }
.button:active { transform: translateY(0); }

.button--primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--accent) 80%, transparent);
}
.button--primary:hover { background: var(--accent-hover); }

.button--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.button--ghost:hover { background: var(--surface); border-color: var(--ink-soft); }

.button--small { min-height: 40px; padding: 0.5em 1.1em; font-size: 0.95rem; }
.button--block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variation-settings: "SOFT" 100, "WONK" 0;
}
.brand:hover { text-decoration: none; }

.brand__mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--on-accent);
  transition: transform 0.3s cubic-bezier(0.3, 0.7, 0.4, 1.5);
}
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.05); }
.icon--mark { width: 38px; height: 38px; stroke-width: 6; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: auto;
}

.nav__link {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.975rem;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.nav__link:hover,
.nav__link[aria-current] {
  background: var(--bg-deep);
  color: var(--ink);
}

.header-actions { display: flex; align-items: center; gap: 8px; }

.lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
}
.lang__link {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 32px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.lang__link:hover { background: var(--bg-deep); color: var(--ink); text-decoration: none; }
.lang__link[aria-current="page"] { background: var(--ink); color: var(--bg); }
.lang__link:lang(ar) { font-family: "Readex Pro", "Segoe UI", Tahoma, system-ui, sans-serif; font-size: 0.85rem; letter-spacing: 0; }

.nav__link--mobile { display: none; }

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.menu-toggle .icon { width: 22px; height: 22px; }
.menu-toggle .icon--close,
.menu-toggle[aria-expanded="true"] .icon--open { display: none; }
.menu-toggle[aria-expanded="true"] .icon--close { display: block; }

@media (max-width: 760px) {
  .header-actions { margin-inline-start: auto; }
  .nav { display: none; }
  .has-js .header-cta { display: none; }
  .has-js .nav__link--mobile { display: block; }

  .has-js .menu-toggle:not([hidden]) { display: inline-flex; }

  .has-js .nav {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-lift);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.2s, transform 0.2s, visibility 0s 0.2s;
  }
  .has-js .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.2s, transform 0.2s;
  }
  .has-js .nav__link { padding: 12px 16px; font-size: 1.05rem; border-radius: var(--radius-sm); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  padding-block: clamp(40px, 7vw, 96px) clamp(64px, 8vw, 104px);
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}
.hero::before {
  width: min(620px, 90vw);
  aspect-ratio: 1;
  top: -260px;
  inset-inline-end: -140px;
  background: radial-gradient(closest-side, var(--peach), transparent);
}
.hero::after {
  width: min(520px, 80vw);
  aspect-ratio: 1;
  bottom: -160px;
  inset-inline-start: -220px;
  background: radial-gradient(closest-side, var(--sage), transparent);
}

.hero__intro {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  max-width: 940px;
}

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(120px, 16vw, 176px);
  aspect-ratio: 1;
  margin: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--peach) 10%, var(--rose) 55%, var(--butter));
  box-shadow: 0 0 0 6px var(--surface), var(--shadow-lift);
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 24%;
  border-radius: 50%;
}
.avatar__initials {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4.4vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--accent-ink);
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.avatar__wave {
  position: absolute;
  inset-inline-end: -2px;
  bottom: 6px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 1.45rem;
  line-height: 1;
  transform-origin: 65% 75%;
  animation: wave 1.6s 0.8s ease-in-out both;
}
.avatar:hover .avatar__wave { animation: wave-again 1.6s ease-in-out; }
@keyframes wave {
  0%, 100% { transform: rotate(0); }
  15% { transform: rotate(18deg); }
  30% { transform: rotate(-8deg); }
  45% { transform: rotate(16deg); }
  60% { transform: rotate(-4deg); }
  75% { transform: rotate(10deg); }
}
@keyframes wave-again {
  0%, 100% { transform: rotate(0); }
  15% { transform: rotate(18deg); }
  30% { transform: rotate(-8deg); }
  45% { transform: rotate(16deg); }
  60% { transform: rotate(-4deg); }
  75% { transform: rotate(10deg); }
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin: 0 0 18px;
  padding-block: 6px;
  padding-inline: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 500;
}
.status__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 45%, transparent);
  animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 45%, transparent); }
  70%, 100% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--ok) 0%, transparent); }
}

.hero__title {
  font-size: clamp(2.75rem, 5vw + 1rem, 5rem);
  font-weight: 540;
  line-height: 1.04;
  letter-spacing: -0.025em;
}
.hero__name {
  position: relative;
  display: inline-block;
  padding-inline-end: 0.06em;
  font-style: italic;
  color: var(--accent-ink);
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.squiggle {
  position: absolute;
  inset-inline-start: -2%;
  bottom: -0.2em;
  width: 104%;
  height: auto;
  overflow: visible;
  color: var(--accent);
  opacity: 0.85;
}
.squiggle path {
  fill: none;
  stroke: currentColor;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 1.1s 0.35s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero__lead {
  max-width: 36em;
  margin-top: 26px;
  color: var(--ink-soft);
  font-size: clamp(1.1rem, 0.5vw + 1rem, 1.28rem);
  line-height: 1.6;
}
.hero__lead strong { color: var(--ink); font-weight: 650; }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
}
.hero__meta li { display: flex; align-items: flex-start; gap: 8px; }
.hero__meta .icon { width: 18px; height: 18px; margin-top: 0.15em; color: var(--accent-ink); }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Quick-link tiles */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(44px, 6vw, 72px);
}

.tile {
  --tile-bg: var(--peach);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 176px;
  padding: 20px 20px 22px;
  border-radius: var(--radius-lg);
  background: var(--tile-bg);
  color: var(--ink);
  text-decoration: none;
  transition:
    transform 0.3s cubic-bezier(0.3, 0.7, 0.4, 1.4),
    box-shadow 0.3s,
    opacity 0.7s ease var(--reveal-delay, 0s),
    translate 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) var(--reveal-delay, 0s);
}
.tile:hover { transform: translateY(-5px) rotate(-1.2deg); box-shadow: var(--shadow-lift); text-decoration: none; }
.tile:nth-child(even):hover { transform: translateY(-5px) rotate(1.2deg); }
.tile--peach { --tile-bg: var(--peach); }
.tile--sage { --tile-bg: var(--sage); }
.tile--butter { --tile-bg: var(--butter); }
.tile--rose { --tile-bg: var(--rose); }

.tile__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: auto;
  border-radius: 15px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}
.tile__icon .icon { width: 24px; height: 24px; }
.tile__label {
  margin-top: 22px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.15;
  font-variation-settings: "SOFT" 100, "WONK" 0;
}
.tile__hint { margin-top: 4px; color: var(--ink-soft); font-size: 0.93rem; line-height: 1.4; }
.tile__arrow {
  position: absolute;
  top: 24px;
  inset-inline-end: 22px;
  width: 22px;
  height: 22px;
  transition: transform 0.3s;
}
.tile:hover .tile__arrow { transform: translateX(4px); }

@media (max-width: 920px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hero__intro { grid-template-columns: 1fr; }
  .tile { min-height: 156px; padding: 18px; }
  .tile__label { font-size: 1.25rem; }
  .tile__hint { font-size: 0.875rem; }
}
@media (max-width: 360px) {
  .tiles { grid-template-columns: 1fr; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(72px, 10vw, 128px); }

.section--tinted {
  margin-inline: clamp(8px, 1.6vw, 24px);
  border-radius: clamp(28px, 4vw, 48px);
  background: var(--bg-deep);
}

.section__head { max-width: 660px; margin-bottom: clamp(36px, 5vw, 56px); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.65em;
  margin: 0 0 12px;
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.eyebrow--center { justify-content: center; }
.eyebrow--center::after {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.section__title { font-size: clamp(2.2rem, 2.6vw + 1.2rem, 3.25rem); letter-spacing: -0.02em; }
.section__intro { margin-top: 16px; color: var(--ink-soft); font-size: 1.15rem; }

.card {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.card__title { margin-bottom: 16px; font-size: 1.3rem; }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}

.prose p { font-size: 1.125rem; }
.prose .lead {
  margin-bottom: 1.1em;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1vw + 1.1rem, 1.7rem);
  font-weight: 420;
  line-height: 1.4;
  letter-spacing: -0.01em;
  font-variation-settings: "SOFT" 100, "WONK" 0;
}
.prose p:not(.lead) { color: var(--ink-soft); }

.facts__title { margin-bottom: 8px; font-size: 1.3rem; }
.facts__list { margin: 0; }
.fact {
  position: relative;
  padding-block: 16px;
  padding-inline: 58px 0;
  border-top: 1px dashed var(--line-strong);
}
.fact:first-child { border-top: 0; }
.fact dt {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.fact dd { margin: 2px 0 0; font-weight: 550; }
.fact__icon {
  position: absolute;
  inset-inline-start: 0;
  top: 50%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  transform: translateY(-50%);
  color: var(--ink);
}
.fact__icon .icon { width: 21px; height: 21px; }
.fact__icon--peach { background: var(--peach); }
.fact__icon--sage { background: var(--sage); }
.fact__icon--butter { background: var(--butter); }
.fact__icon--rose { background: var(--rose); }

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

/* ---------- Work ---------- */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 24px;
}

.project {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.35s cubic-bezier(0.3, 0.7, 0.4, 1.2),
    box-shadow 0.35s,
    opacity 0.7s ease var(--reveal-delay, 0s),
    translate 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) var(--reveal-delay, 0s);
}
.project:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }

.project__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  margin: 10px 10px 0;
  border-radius: calc(var(--radius-lg) - 8px);
  background: var(--peach);
}
.project__media img { width: 100%; height: 100%; object-fit: cover; }

.project__media--peach { background: var(--peach); }
.project__media--sage { background: var(--sage); }
.project__media--butter { background: var(--butter); }

/* Small illustrations inside the project cards */
.art { position: absolute; inset: 0; width: 100%; height: 100%; }
.art .s { fill: var(--surface); }
.art .a { fill: var(--accent); }
.art .p { fill: var(--peach-deep); }
.art .g { fill: var(--sage-deep); }
.art .y { fill: var(--butter-deep); }
.art .r { fill: var(--rose-deep); }
.art .track { fill: none; stroke: var(--bg-deep); stroke-width: 14; }
.art .arc { fill: none; stroke: var(--accent); stroke-width: 14; stroke-linecap: round; }
.art .orbit { fill: none; stroke: var(--surface); stroke-opacity: 0.45; stroke-width: 3; stroke-linecap: round; }
.art .trail { fill: none; stroke: var(--accent); stroke-opacity: 0.35; stroke-width: 5; stroke-linecap: round; }
.art .axis { fill: none; stroke: var(--ink-soft); stroke-opacity: 0.4; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.art .dash { fill: color-mix(in srgb, var(--surface) 35%, transparent); stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 7 7; }
.art .ring { fill: none; stroke: var(--ink); stroke-width: 3.5; }

.project__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 22px 24px 26px;
}
.project__meta {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.project__title { font-size: 1.5rem; }
.project__title a { color: inherit; text-decoration: none; }
.project__title a:hover { color: var(--accent-ink); }
.project__title a::after { content: " →"; }
.project__desc { margin: 0; color: var(--ink-soft); }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: auto 0 0;
  padding: 10px 0 0;
  list-style: none;
}
.tags li {
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--bg-deep);
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 600;
}

/* ---------- Experience ---------- */
.experience {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}

.timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline::before {
  content: "";
  position: absolute;
  inset-inline-start: 7px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--line-strong) 0 6px, transparent 6px 12px);
}
.timeline__item {
  position: relative;
  padding-block: 0 44px;
  padding-inline: 46px 0;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 5px;
  width: 16px;
  height: 16px;
  border: 3px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
}
.timeline__item:first-child::before {
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent);
}
.timeline__date {
  margin: 0 0 6px;
  color: var(--accent-ink);
  font-size: 0.86rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.timeline__role { font-size: 1.5rem; }
.timeline__org { margin: 4px 0 10px; font-weight: 550; }
.timeline__desc { max-width: 52ch; color: var(--ink-soft); }
.timeline__sub {
  margin: -4px 0 16px;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-style: italic;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.timeline__list { max-width: 62ch; margin: 0; padding-inline-start: 1.1em; color: var(--ink-soft); }
.timeline__list li { margin-top: 7px; padding-inline-start: 4px; }
.timeline__list li::marker { color: var(--accent); }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.stats li {
  padding: 14px 16px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.stats strong {
  display: block;
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.1;
  font-variation-settings: "SOFT" 100, "WONK" 0;
}
.stats span { display: block; margin-top: 4px; color: var(--ink-soft); font-size: 0.86rem; line-height: 1.4; }
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; gap: 8px; }
  .stats li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
  .stats strong { flex: none; min-width: 2.4em; font-size: 1.6rem; }
  .stats span { margin-top: 0; }
}

.side-stack {
  display: grid;
  gap: 20px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--chip-bg, var(--bg-deep));
  font-size: 0.92rem;
  font-weight: 550;
}
.chips li:nth-child(4n + 1) { --chip-bg: var(--peach); }
.chips li:nth-child(4n + 2) { --chip-bg: var(--sage); }
.chips li:nth-child(4n + 3) { --chip-bg: var(--butter); }
.chips li:nth-child(4n + 4) { --chip-bg: var(--rose); }

.skill-group + .skill-group { margin-top: 18px; }
.skill-group h4 {
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.edu { margin: 0; padding: 0; list-style: none; }
.edu li { position: relative; padding-inline-start: 20px; }
.edu li + li { margin-top: 14px; }
.edu li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.edu__degree { margin: 0; font-weight: 600; line-height: 1.4; }
.edu__school { margin: 2px 0 0; color: var(--ink-soft); font-size: 0.95rem; }

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

/* ---------- Contact ---------- */
.section--contact { padding-top: 0; }

.contact-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(52px, 8vw, 104px) clamp(22px, 6vw, 80px);
  border-radius: clamp(28px, 4vw, 48px);
  background: var(--peach);
  text-align: center;
  transition:
    opacity 0.7s ease var(--reveal-delay, 0s),
    translate 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) var(--reveal-delay, 0s);
}
.contact-card::before,
.contact-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}
.contact-card::before {
  width: 360px;
  aspect-ratio: 1;
  top: -150px;
  inset-inline-start: -110px;
  background: radial-gradient(closest-side, var(--butter), transparent);
}
.contact-card::after {
  width: 420px;
  aspect-ratio: 1;
  inset-inline-end: -150px;
  bottom: -190px;
  background: radial-gradient(closest-side, var(--rose-deep), transparent);
  opacity: 0.7;
}

.contact-card__title {
  max-width: 15ch;
  margin-inline: auto;
  font-size: clamp(2.3rem, 4vw + 1rem, 4rem);
  line-height: 1.06;
}
.contact-card__text {
  max-width: 34em;
  margin: 20px auto 0;
  color: var(--ink-soft);
  font-size: 1.15rem;
}
.contact-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}
.contact-card .button--ghost {
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  border-color: color-mix(in srgb, var(--ink) 18%, transparent);
}
.contact-card .button--ghost:hover { background: var(--surface); }
.contact-card__actions--secondary { margin-top: 12px; }

[data-copy] .icon--check { display: none; }
[data-copy].is-copied .icon--copy { display: none; }
[data-copy].is-copied .icon--check { display: block; color: var(--ok); }

/* ---------- Footer ---------- */
.site-footer { padding-block: 8px 40px; color: var(--ink-soft); font-size: 0.95rem; }
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--ink); }

/* ---------- 404 page ---------- */
.notfound {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 40px var(--gutter);
  text-align: center;
}
.notfound__card { max-width: 520px; }
.notfound__code {
  display: inline-grid;
  place-items: center;
  width: 120px;
  aspect-ratio: 1;
  margin-bottom: 28px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--peach) 10%, var(--rose) 55%, var(--butter));
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-style: italic;
  font-weight: 600;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  box-shadow: 0 0 0 6px var(--surface), var(--shadow-lift);
}
.notfound h1 { font-size: clamp(2.2rem, 4vw + 1rem, 3.2rem); letter-spacing: -0.02em; }
.notfound p { margin: 16px 0 30px; color: var(--ink-soft); font-size: 1.15rem; }

/* ---------- Scroll-in animation (added by script.js) ---------- */
[data-reveal] {
  transition:
    opacity 0.7s ease var(--reveal-delay, 0s),
    translate 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) var(--reveal-delay, 0s);
}
.project[data-reveal] {
  transition:
    transform 0.35s cubic-bezier(0.3, 0.7, 0.4, 1.2),
    box-shadow 0.35s,
    opacity 0.7s ease var(--reveal-delay, 0s),
    translate 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) var(--reveal-delay, 0s);
}
.is-pending { opacity: 0; translate: 0 28px; }

/* ---------- Respect "reduce motion" settings ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
.notfound .notfound__alt { margin: 28px 0 0; font-size: 0.95rem; }

/* ---------- Compact header on phones (room for the 3 language buttons) ---------- */
.brand__name { white-space: nowrap; }
@media (max-width: 760px) {
  .site-header__inner { gap: 12px; }
  .header-actions { gap: 6px; }
  .brand { font-size: 1.08rem; gap: 8px; }
  .menu-toggle { width: 40px; height: 40px; border-radius: 13px; }
  .lang { padding: 2px; }
  .lang__link { min-width: 28px; height: 30px; padding: 0 6px; font-size: 0.75rem; }
}
@media (max-width: 365px) {
  .brand__name { display: none; } /* the logo link still carries the name for screen readers */
}

/* ---------- Arabic version (right-to-left) ---------- */
@font-face {
  font-family: "Noto Naskh Arabic";
  src: url("fonts/noto-naskh-arabic-arabic-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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: "Readex Pro";
  src: url("fonts/readex-pro-arabic-wght-normal.woff2") format("woff2");
  font-weight: 160 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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;
}

html[lang="ar"] {
  --font-display: "Noto Naskh Arabic", "Fraunces", ui-serif, Georgia, serif;
  --font-body: "Readex Pro", "Figtree", ui-sans-serif, system-ui, "Segoe UI", Tahoma, sans-serif;
}
html[lang="ar"] body { font-size: 1.05rem; line-height: 1.85; }
/* Arabic letters join up: never add letter-spacing, and Arabic has no true italics. */
html[lang="ar"] *,
html[lang="ar"] *::before,
html[lang="ar"] *::after { letter-spacing: 0 !important; font-style: normal !important; }
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3 { font-weight: 700; line-height: 1.45; }
html[lang="ar"] .hero__title { font-size: clamp(2.6rem, 4.4vw + 1rem, 4.4rem); line-height: 1.35; }
html[lang="ar"] .squiggle { bottom: -0.02em; }
html[lang="ar"] .prose .lead { font-weight: 500; line-height: 1.75; }
html[lang="ar"] .brand,
html[lang="ar"] .tile__label { font-weight: 700; }
html[lang="ar"] .stats strong { font-size: 1.7rem; }

/* Mirror the directional bits */
[dir="rtl"] .squiggle { transform: scaleX(-1); }
[dir="rtl"] .tile__arrow { transform: scaleX(-1); }
[dir="rtl"] .tile:hover .tile__arrow { transform: scaleX(-1) translateX(4px); }
[dir="rtl"] .tile:hover { transform: translateY(-5px) rotate(1.2deg); }
[dir="rtl"] .tile:nth-child(even):hover { transform: translateY(-5px) rotate(-1.2deg); }
[dir="rtl"] .nav { transform-origin: top left; }
.notfound .notfound__alt + .notfound__alt { margin-top: 6px; }
.notfound__alt:lang(ar) { font-family: "Readex Pro", "Figtree", system-ui, sans-serif; }
