/* ============================================================
   Atiaf Al-Muqri — Data Analyst | محللة بيانات
   White + burgundy identity (tokens unchanged from the original)
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --bg: #FFFFFF;
  --bg-raised: #FFFFFF;
  --bg-soft: #F8F6F6;
  --ink: #2A2426;
  --ink-soft: #4A4245;
  --gray: #6B6265;
  --border: #E9E4E5;
  --accent: #7A1424;        /* burgundy */
  --accent-dark: #5C0F1B;
  --accent-text: #7A1424;
  --accent-ink: #FFFFFF;
  --accent-tint: rgba(122, 20, 36, 0.06);

  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --font-ar: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;

  --max-width: 1120px;
  --header-h: 76px;
  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(16px, 0.35vw + 15px, 18px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
img { display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
dl, dd { margin: 0; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* Arabic text uses its own face and a slightly looser line-height */
.ar, [lang="ar"] { font-family: var(--font-ar); letter-spacing: 0; }
.ar { line-height: 1.9; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: 0.75rem 1.25rem; z-index: 200;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Layout helpers ---------- */
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}
.section { padding: clamp(3rem, 7vw, 6rem) 0; }
.section-title {
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  margin-bottom: 2.5rem;
  color: var(--accent);
  display: inline-block;
  width: fit-content;
  padding-bottom: 0.7rem;
  border-bottom: 2px solid var(--accent);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
}
.brand { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.brand span { color: var(--accent-text); }

.nav-desktop { display: flex; gap: 1.8rem; }
.nav-desktop a {
  font-size: 0.95rem; color: var(--ink-soft);
  position: relative; padding: 0.3rem 0;
}
.nav-desktop a:hover, .nav-desktop a[aria-current="true"] { color: var(--ink); }
.nav-desktop a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1.5px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 0.2s ease;
}
.nav-desktop a:hover::after, .nav-desktop a[aria-current="true"]::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 0.5rem; }

.menu-toggle {
  display: none; width: 40px; height: 40px;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.menu-toggle span {
  display: block; width: 20px; height: 1.6px; background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

.nav-mobile {
  display: none; flex-direction: column;
  border-top: 1px solid var(--border); background: var(--bg);
  max-height: calc(100vh - var(--header-h)); overflow-y: auto;
}
.nav-mobile a { padding: 0.95rem 1.5rem; border-bottom: 1px solid var(--border); font-size: 1.05rem; }
.nav-mobile a:hover, .nav-mobile a:focus-visible { background: var(--bg-soft); box-shadow: inset 3px 0 0 var(--accent); }
.nav-mobile.open { display: flex; }

@media (max-width: 1000px) { .nav-desktop { gap: 1.2rem; } }
@media (max-width: 900px) {
  .nav-desktop { display: none; }
  .menu-toggle { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 6rem) 0;
  overflow: hidden;
}
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
  position: relative; z-index: 2;
}
.hero-inner > * { max-width: 720px; }
.hero-kicker {
  font-family: var(--font-mono); font-size: 0.9rem;
  color: var(--accent-text); margin-bottom: 1rem; letter-spacing: 0.02em;
}
.hero-title {
  font-size: clamp(2.1rem, 6.4vw, 4.2rem);
  line-height: 1.12;
  margin-bottom: 1.4rem;
  color: var(--accent);
  overflow-wrap: anywhere;
}
.hero-inner > .hero-title { max-width: 920px; }
.hero-title .ar { display: inline-block; white-space: nowrap; font-weight: 600; line-height: 1.2; }
.hero-divider { font-weight: 400; opacity: 0.45; }
.hero-specialty { font-size: 1.05rem; font-weight: 500; color: var(--ink); margin-bottom: 1rem; }
.hero-specialty span { color: var(--accent); margin: 0 0.35rem; }
.hero-lede { font-size: clamp(1rem, 1.6vw, 1.2rem); color: var(--ink-soft); max-width: 50ch; margin-bottom: 0.7rem; }
.hero-lede-ar { display: block; width: fit-content; font-size: clamp(1rem, 1.5vw, 1.12rem); color: var(--ink-soft); margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; max-width: none; }

.hero-mark {
  position: absolute; right: -40px; top: 50%; transform: translateY(-50%);
  width: 420px; color: var(--border); opacity: 0.9; z-index: 1; pointer-events: none;
}
.hero-svg { width: 100%; height: auto; }
@media (max-width: 900px) { .hero-mark { width: 260px; right: -80px; opacity: 0.6; } }
@media (max-width: 620px) { .hero-mark { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.5rem; font-size: 0.95rem; font-weight: 500;
  border-radius: 3px; border: 1px solid transparent; white-space: nowrap;
  transition: background-color .18s, color .18s, border-color .18s, transform .18s, box-shadow .18s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(122, 20, 36, 0.18); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { border-color: var(--border); color: var(--ink); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-tint); }
.btn[hidden], [data-link][hidden], .project-link[hidden] { display: none !important; }
.ci { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ci-fill { fill: var(--accent); stroke: none; }
.btn .ci { stroke: currentColor; width: 16px; height: 16px; margin-right: 0.5rem; }
.btn .ci-fill { fill: currentColor; stroke: none; }
.btn-outline .ci { stroke: var(--accent); }
.btn-outline .ci-fill { fill: var(--accent); stroke: none; }
.btn-primary .ci-fill { fill: currentColor; }

@media (max-width: 480px) {
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { padding-inline: 0.8rem; }
  .hero-actions .btn-primary { grid-column: 1 / -1; }
}

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 2.5rem; }
.about-grid .section-title { align-self: start; }
.about-copy p { color: var(--ink-soft); margin-bottom: 1.1rem; max-width: 64ch; }
.about-copy .about-ar { max-width: 64ch; border-inline-start: 2px solid var(--accent); padding-inline-start: 1rem; }
.about-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }
.about-tags li {
  font-family: var(--font-mono); font-size: 0.82rem;
  padding: 0.4rem 0.8rem; border: 1px solid var(--border); border-radius: 3px; color: var(--ink-soft);
}
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; gap: 1rem; } }

/* ---------- Skills ---------- */
.skills-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
}
.skill-group { background: var(--bg); padding: 1.8rem; }
.skill-group h3 {
  font-size: 1rem; margin-bottom: 1.1rem; color: var(--accent-text);
  border-left: 2px solid var(--accent); padding-left: 0.7rem;
}
.skill-group li {
  padding: 0.45rem 0; color: var(--ink-soft);
  border-bottom: 1px dashed var(--border); font-size: 0.95rem;
}
.skill-group li:last-child { border-bottom: none; }
@media (max-width: 860px) { .skills-grid { grid-template-columns: 1fr; } }

/* ---------- Projects: shared ---------- */
.projects .section-inner { max-width: 1280px; }
.project-jump { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: -1rem 0 0.5rem; }
.project-jump a {
  font-size: 0.9rem; padding: 0.45rem 0.95rem;
  border: 1px solid var(--border); border-radius: 999px; color: var(--ink-soft);
  transition: border-color .18s, color .18s, background-color .18s;
}
.project-jump a:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-tint); }

.category-title {
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  margin: clamp(2.5rem, 6vw, 4rem) 0 1.4rem;
  padding-top: 1.1rem;
  border-top: 2px solid var(--accent);
  color: var(--accent);
}
.project-category:first-of-type .category-title { margin-top: 2.5rem; }
.project-category > article + article { margin-top: 1.6rem; }

.tool-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tool-chips li {
  font-family: var(--font-mono); font-size: 0.78rem;
  padding: 0.3rem 0.7rem; border-radius: 3px;
  background: var(--accent-tint); color: var(--accent-text);
  border: 1px solid rgba(122, 20, 36, 0.22);
}

/* ---------- Project cards (Power BI + Excel) ---------- */
.project-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.2rem, 3vw, 2.2rem);
  padding: clamp(1rem, 2.6vw, 1.8rem);
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 4px;
  box-shadow: 0 8px 26px rgba(122, 20, 36, 0.05);
  transition: box-shadow .2s;
}
.project-card:hover { box-shadow: 0 12px 34px rgba(122, 20, 36, 0.1); }
@media (min-width: 980px) {
  .project-card { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; }
  .card-body { position: sticky; top: calc(var(--header-h) + 1.2rem); }
}
.card-media { display: flex; flex-direction: column; gap: 1.3rem; min-width: 0; }
.card-body { display: flex; flex-direction: column; gap: 0.9rem; min-width: 0; }
.card-label { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent-text); }
.card-body h4 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: var(--accent); }
.card-sub { color: var(--gray); font-size: 0.95rem; margin-top: -0.5rem; }
.card-desc { color: var(--ink-soft); }
.project-link { align-self: flex-start; }

.card-details { border-top: 1px solid var(--border); padding-top: 0.4rem; }
.card-details summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 0; font-weight: 500; color: var(--accent-text);
}
.card-details summary::-webkit-details-marker { display: none; }
.card-details summary::after { content: "+"; font-family: var(--font-mono); font-size: 1.2rem; line-height: 1; }
.card-details[open] summary::after { content: "−"; }
.card-details summary:hover { text-decoration: underline; }

.project-facts { display: grid; grid-template-columns: 1fr; gap: 1.05rem; padding: 0.4rem 0 0.6rem; }
.project-facts dt { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent-text); margin-bottom: 0.2rem; }
.project-facts dd { color: var(--ink-soft); font-size: 0.97rem; overflow-wrap: anywhere; }

/* Dashboard images: contain, original ratio, zoomable */
.shot { margin: 0; }
.shot a {
  position: relative; display: block; cursor: zoom-in;
  background: #fff; border: 1px solid var(--border); padding: clamp(0.3rem, 1vw, 0.7rem);
  box-shadow: 0 6px 22px rgba(42, 36, 38, 0.07);
  transition: box-shadow .2s, border-color .2s;
}
.shot a:hover { border-color: var(--accent); box-shadow: 0 12px 30px rgba(122, 20, 36, 0.14); }
.shot img { width: 100%; height: auto; object-fit: contain; }
.shot figcaption { margin-top: 0.55rem; font-size: 0.88rem; color: var(--gray); }
.zoom-badge {
  position: absolute; right: clamp(0.6rem, 1.6vw, 1.1rem); bottom: clamp(0.6rem, 1.6vw, 1.1rem);
  background: var(--accent); color: #fff; font-size: 0.8rem; font-weight: 500;
  padding: 0.3rem 0.65rem; border-radius: 3px; opacity: 0.92;
}
.shot a:hover .zoom-badge { opacity: 1; }

/* ---------- Featured project (Misk) ---------- */
.featured-project {
  border: 1px solid var(--border); border-top: 3px solid var(--accent);
  background: var(--bg-raised);
  box-shadow: 0 10px 30px rgba(122, 20, 36, 0.06);
  padding: clamp(1.1rem, 4vw, 3rem);
  display: flex; flex-direction: column; gap: 2.4rem;
}
.featured-head { display: flex; flex-direction: column; gap: 0.9rem; max-width: 74ch; }
.badge-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.badge {
  display: inline-flex; font-family: var(--font-mono); font-size: 0.78rem;
  padding: 0.35rem 0.75rem; border-radius: 3px;
}
.badge-team {
  background: rgba(122, 20, 36, 0.07); color: var(--accent-text);
  border: 1px solid rgba(122, 20, 36, 0.3);
}
.badge-first { background: var(--accent); color: var(--accent-ink); font-weight: 600; border: 1px solid var(--accent); }
.featured-program { color: var(--gray); font-size: 0.92rem; }
.featured-title { font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--accent); overflow-wrap: anywhere; }
.featured-win { font-weight: 500; color: var(--ink); }
.featured-overview { color: var(--ink-soft); font-size: 1.02rem; max-width: 68ch; }

.featured-highlights {
  display: grid; grid-template-columns: repeat(4, auto); justify-content: start;
  gap: 0.8rem 2.4rem; margin-top: 0.6rem; padding-top: 1.1rem; border-top: 1px solid var(--border);
}
.featured-highlights li { display: flex; flex-direction: column; gap: 0.15rem; }
.hl-label { font-family: var(--font-mono); font-size: 0.78rem; color: var(--gray); }
.hl-value { font-weight: 600; font-size: 0.98rem; color: var(--accent); }
@media (max-width: 860px) { .featured-highlights { grid-template-columns: 1fr 1fr; } }

.featured-block h5 {
  font-size: 1.05rem; margin-bottom: 0.9rem; padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.featured-block p { color: var(--ink-soft); max-width: 70ch; }

.pipeline { display: flex; flex-wrap: wrap; gap: 0.6rem 0; }
.pipeline li {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.92rem; color: var(--ink-soft); padding: 0.5rem 1rem 0.5rem 0;
}
.pipeline li:not(:last-child)::after { content: "→"; color: var(--gray); margin-inline-start: 0.9rem; }
.pipeline-num {
  font-family: var(--font-mono); font-size: 0.78rem; width: 22px; height: 22px;
  border-radius: 50%; border: 1px solid var(--accent); color: var(--accent-text);
  display: grid; place-items: center; flex-shrink: 0;
}
@media (max-width: 700px) {
  .pipeline { flex-direction: column; gap: 0; }
  .pipeline li { padding: 0.45rem 0; width: 100%; }
  .pipeline li:not(:last-child)::after { display: none; }
}

.source-list li { color: var(--ink-soft); padding: 0.4rem 0 0.4rem 1.1rem; position: relative; font-size: 0.95rem; }
.source-list li::before {
  content: ""; position: absolute; left: 0; top: 0.95rem;
  width: 6px; height: 6px; background: var(--accent); border-radius: 50%;
}

.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 1rem; margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--bg); border: 1px solid var(--border); border-top: 3px solid var(--accent);
  border-radius: 4px; padding: 1.2rem 1.1rem;
  display: flex; flex-direction: column; gap: 0.25rem; min-width: 0;
}
.stat-num {
  font-family: var(--font-mono); font-weight: 600; color: var(--accent-text);
  font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.1; white-space: nowrap;
}
.stat-title { font-weight: 600; font-size: 1rem; color: var(--ink); }
.stat-label { font-size: 0.9rem; color: var(--gray); line-height: 1.4; }
.impact-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); margin-bottom: 0; }
@media (max-width: 600px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
  .stat-card { padding: 1rem 0.85rem; }
  .impact-grid { grid-template-columns: 1fr 1fr 1fr; }
  .impact-grid .stat-card { padding: 0.9rem 0.5rem; text-align: center; }
}
@media (max-width: 380px) { .stat-num { font-size: 1.4rem; } .impact-grid { grid-template-columns: 1fr 1fr; } }

.substat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; }
.substat h6 { font-size: 0.9rem; margin-bottom: 0.3rem; }
.substat p { color: var(--gray); font-size: 0.88rem; font-family: var(--font-mono); overflow-wrap: anywhere; }

.dialect-bars { display: grid; gap: 1rem; max-width: 820px; }
.dialect-row { display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; row-gap: 0.4rem; align-items: baseline; }
.dialect-name { font-weight: 600; color: var(--ink); }
.dialect-pct { font-family: var(--font-mono); font-weight: 600; color: var(--accent); text-align: right; }
.dialect-bar {
  grid-column: 1 / -1; display: block; height: 18px;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 3px; overflow: hidden;
}
.dialect-bar span { display: block; height: 100%; background: var(--accent); }
@media (min-width: 761px) {
  .dialect-row { grid-template-columns: 110px 1fr 64px; align-items: center; }
  .dialect-name { grid-column: 1; grid-row: 1; }
  .dialect-bar { grid-column: 2; grid-row: 1; }
  .dialect-pct { grid-column: 3; grid-row: 1; }
}

.impact-block p { margin-bottom: 1rem; }

.role-block { background: var(--bg-soft); border: 1px solid var(--border); padding: clamp(1.1rem, 3vw, 1.8rem); }
.role-block h5 { border-bottom: none; margin-bottom: 0.5rem; padding-bottom: 0; }
.role-note { font-size: 0.88rem; color: var(--gray) !important; font-style: italic; margin-bottom: 1.3rem; }
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.role-col h6 { font-size: 0.95rem; margin-bottom: 0.6rem; color: var(--accent-text); }
.role-col p { margin-bottom: 0.7rem; font-size: 0.95rem; }
.role-col strong { color: var(--ink); }
@media (max-width: 700px) { .role-grid { grid-template-columns: 1fr; gap: 1.3rem; } }

.github-block .btn { margin-top: 0.9rem; }
.github-block p { margin-bottom: 0; }

/* ---------- Graduation project ---------- */
.grad-card {
  display: flex; flex-direction: column; gap: 1rem;
  padding: clamp(1.1rem, 4vw, 2.4rem);
  background: var(--bg);
  border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: 4px;
  box-shadow: 0 8px 26px rgba(122, 20, 36, 0.05);
}
.grad-title { font-size: clamp(1.4rem, 3vw, 2rem); color: var(--accent); line-height: 1.6; width: fit-content; max-width: 100%; }
.grad-card .card-sub { margin-top: 0; }
.grad-desc { color: var(--ink-soft); max-width: 70ch; }
.grad-columns {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(1.2rem, 4vw, 3rem);
  padding: 1.4rem 0; margin: 0.4rem 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.grad-columns h5 { font-size: 1rem; margin-bottom: 0.8rem; color: var(--accent-text); }
.grad-steps { counter-reset: step; display: grid; gap: 0.55rem; }
.grad-steps li {
  counter-increment: step; position: relative; padding-left: 2rem; color: var(--ink-soft); font-size: 0.97rem;
}
.grad-steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0.12rem;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--accent); color: var(--accent-text);
  font-family: var(--font-mono); font-size: 0.75rem; display: grid; place-items: center;
}
.grad-note { margin-top: 1rem; font-size: 0.9rem; color: var(--gray); }
.grad-ar { font-size: 0.98rem; color: var(--ink-soft); background: var(--bg-soft); padding: 1.2rem 1.3rem; border-radius: 4px; }
.grad-ar h5 { font-family: var(--font-ar); }
.grad-ar p { margin-bottom: 0.8rem; }
.grad-ar ul { list-style: disc; padding-inline-start: 1.3rem; }
.grad-ar li::marker { color: var(--accent); }
.grad-ar li { padding: 0.1rem 0; }
@media (max-width: 860px) { .grad-columns { grid-template-columns: 1fr; } }

/* ---------- Certifications ---------- */
.cert-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem;
  padding: clamp(1.2rem, 3vw, 1.9rem);
  background: var(--bg-soft);
  border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 4px;
}
.cert-title { font-size: clamp(1.2rem, 2.4vw, 1.5rem); color: var(--accent); margin-bottom: 0.3rem; }
.cert-issuer { font-weight: 500; color: var(--ink); }
.cert-date { font-family: var(--font-mono); font-size: 0.88rem; color: var(--gray); margin-top: 0.2rem; }
.cert-link a { color: var(--accent-text); font-size: 0.95rem; text-decoration: underline; text-underline-offset: 3px; }
.cert-link a:hover { color: var(--accent-dark); }

/* ---------- Contact ---------- */
.contact-lede { color: var(--ink-soft); margin-bottom: 2.2rem; max-width: 60ch; }
.contact-grid {
  display: flex; flex-wrap: wrap;
  border-top: 1px solid var(--border); border-left: 1px solid var(--border);
}
.contact-item {
  background: var(--bg); padding: 1.6rem;
  display: flex; flex-direction: column; gap: 0.4rem;
  flex: 1 1 220px; min-width: 0;
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  transition: background-color .15s, box-shadow .15s;
}
.contact-item:hover { background: var(--bg-soft); box-shadow: inset 4px 0 0 var(--accent); }
.contact-item:hover .contact-value { text-decoration: underline; color: var(--accent-text); }
.contact-label {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-text);
}
.contact-value { font-size: 0.98rem; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0; }
.footer-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  color: var(--gray); font-size: 0.9rem;
}
.footer-social { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.footer-social .ci { width: 15px; height: 15px; margin-right: 0.35rem; vertical-align: -2px; }
.footer-social a:hover { color: var(--accent-text); text-decoration: underline; }
@media (max-width: 600px) { .footer-inner { flex-direction: column; align-items: flex-start; } }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(255, 255, 255, 0.98); display: none; }
.lightbox.open { display: block; }
.lb-scroll {
  position: absolute; inset: 0; overflow: auto; display: flex; padding: 4rem 1rem 1rem;
  touch-action: pan-x pan-y pinch-zoom; -webkit-overflow-scrolling: touch;
}
.lb-scroll img {
  margin: auto; width: auto; height: auto;
  max-width: min(96vw, 1800px); max-height: calc(100vh - 5.5rem);
  object-fit: contain; border: 1px solid var(--border); background: #fff;
}
.lb-close {
  position: fixed; top: 0.9rem; right: 0.9rem; z-index: 2;
  background: var(--accent); color: #fff; padding: 0.6rem 1.1rem; border-radius: 3px; font-weight: 500;
}
.lb-close:hover { background: var(--accent-dark); }
@media (max-width: 760px) { .lb-scroll img { max-width: none; max-height: none; width: 1100px; } }
body.lb-open { overflow: hidden; }

@media (min-width: 1700px) { :root { --max-width: 1240px; } .projects .section-inner { max-width: 1320px; } }

/* Download CV — emphasized secondary action */
.btn-cv { border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.btn-cv:hover { background: var(--accent); color: var(--accent-ink); }
.btn-cv:hover .ci { stroke: var(--accent-ink); }
