:root {
  --bg: #f8f5ef;
  --surface: #ffffff;
  --ink: #1c1a17;
  --muted: #6b655c;
  --line: #e6dfd3;
  --brand: #0f3d33;
  --gold: #a8844f;
  --gold-soft: #f1e8d8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12100e; --surface: #1b1916; --ink: #f1ece3; --muted: #a79f92;
    --line: #2d2a25; --brand: #7fbfa9; --gold: #d2b27c; --gold-soft: #2a2418;
  }
}
:root[data-theme="dark"] {
  --bg: #12100e; --surface: #1b1916; --ink: #f1ece3; --muted: #a79f92;
  --line: #2d2a25; --brand: #7fbfa9; --gold: #d2b27c; --gold-soft: #2a2418;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans Arabic", system-ui, sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
html[lang="en"] body { font-family: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif; line-height: 1.7; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }

/* Header */
header.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.mark { font-family: "Amiri", serif; font-size: 22px; font-weight: 700; color: var(--brand); text-decoration: none; white-space: nowrap; }
nav { display: flex; align-items: center; gap: 22px; }
nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
nav a:hover { color: var(--ink); }
nav a.lang {
  color: var(--brand); font-weight: 500;
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px;
}
nav a.lang:hover { border-color: var(--brand); }

/* Hero */
.hero { padding: 96px 0 84px; text-align: center; }
.monogram {
  width: 88px; height: 88px; margin: 0 auto 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: "Amiri", serif; font-size: 40px; line-height: 1;
}
.hero h1 {
  margin: 0;
  font-family: "Amiri", serif; font-weight: 700;
  font-size: clamp(44px, 9vw, 76px);
  line-height: 1.25;
}
.alt { margin-top: 6px; color: var(--muted); font-size: 18px; }
.alt.latin { letter-spacing: .22em; text-transform: uppercase; font-size: 13px; }

/* Sections */
section.block { padding: 64px 0; border-top: 1px solid var(--line); }
.eyebrow { color: var(--gold); font-size: 14px; font-weight: 600; letter-spacing: .04em; margin: 0 0 6px; }
html[lang="en"] .eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; }
h2 { font-family: "Amiri", serif; font-size: clamp(30px, 5vw, 40px); margin: 0 0 36px; line-height: 1.3; }

/* Education */
.cards { display: grid; gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 26px;
  display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; align-items: start;
}
.card h3 { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.6; }
.card .where { margin: 2px 0 0; color: var(--muted); font-size: 16px; }
.card .honor {
  margin: 12px 0 0; display: inline-block;
  background: var(--gold-soft); color: var(--gold);
  border-radius: 999px; padding: 2px 14px; font-size: 14px; font-weight: 500;
}
.year { font-variant-numeric: tabular-nums; color: var(--brand); font-weight: 600; font-size: 18px; white-space: nowrap; }
.status {
  color: var(--brand); font-weight: 500; font-size: 14px; white-space: nowrap;
  border: 1px solid var(--brand); border-radius: 999px; padding: 2px 12px;
}

/* Activities */
.uni { color: var(--muted); margin: -24px 0 32px; font-size: 16px; }
.club { margin-bottom: 36px; }
.club:last-child { margin-bottom: 0; }
.club h3 { margin: 0 0 14px; font-size: 19px; font-weight: 600; color: var(--brand); }
.roles { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid var(--line); }
.roles li {
  position: relative;
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding-block: 12px; padding-inline: 22px 0;
}
.roles li::before {
  content: ""; position: absolute; inset-inline-start: -6px; top: 22px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--gold);
}
.roles .role { font-size: 17px; font-weight: 500; }
.roles .year { font-size: 16px; font-weight: 500; color: var(--muted); }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; text-align: center; color: var(--muted); font-size: 14px; }
footer a { color: inherit; text-decoration: none; unicode-bidi: isolate; }

@media (max-width: 560px) {
  nav { gap: 12px; }
  nav a { font-size: 13px; }
  nav a.lang { padding: 1px 10px; }
  .mark { font-size: 19px; }
  .hero { padding: 64px 0 60px; }
  section.block { padding: 48px 0; }
  .card { grid-template-columns: 1fr; padding: 20px; }
  .card .year, .card .status { grid-row: 1; justify-self: start; }
  .roles li { flex-direction: column; gap: 0; }
}
@media (max-width: 400px) {
  nav a:not(.lang) { display: none; }
}
