/* ===========================================================
   Samir Mahamat Saleh - personal site
   Light is the default; dark follows OS or the [data-theme] flag
   =========================================================== */

:root {
  --bg:            #f6f8f7;
  --bg-elev:       #ffffff;
  --surface:       #ffffff;
  --surface-2:     #eef2f1;
  --text:          #111816;
  --text-strong:   #000000;
  --muted:         #566a66;
  --faint:         #7d8f8b;
  --border:        #dfe6e4;
  --border-strong: #c9d4d1;
  --accent:        #0e6e6e;
  --accent-hover:  #0b5757;
  --accent-ink:    #ffffff;
  --accent-wash:   rgba(14, 110, 110, 0.08);
  --accent-line:   rgba(14, 110, 110, 0.22);
  --shadow-sm:     0 1px 2px rgba(16, 32, 30, .05), 0 1px 3px rgba(16, 32, 30, .06);
  --shadow-md:     0 4px 12px rgba(16, 32, 30, .07), 0 12px 28px rgba(16, 32, 30, .06);
  --radius:        14px;
  --radius-sm:     9px;
  --maxw:          1080px;
  --nav-h:         64px;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            #0a0f0e;
    --bg-elev:       #0f1716;
    --surface:       #111a19;
    --surface-2:     #16211f;
    --text:          #e6edeb;
    --text-strong:   #ffffff;
    --muted:         #9bada9;
    --faint:         #7d908c;
    --border:        #1e2c2a;
    --border-strong: #2a3b38;
    --accent:        #54d6c8;
    --accent-hover:  #7ae3d8;
    --accent-ink:    #06201d;
    --accent-wash:   rgba(84, 214, 200, 0.10);
    --accent-line:   rgba(84, 214, 200, 0.26);
    --shadow-sm:     0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md:     0 6px 18px rgba(0, 0, 0, .45), 0 16px 40px rgba(0, 0, 0, .35);
  }
}

:root[data-theme="dark"] {
  --bg:            #0a0f0e;
  --bg-elev:       #0f1716;
  --surface:       #111a19;
  --surface-2:     #16211f;
  --text:          #e6edeb;
  --text-strong:   #ffffff;
  --muted:         #9bada9;
  --faint:         #7d908c;
  --border:        #1e2c2a;
  --border-strong: #2a3b38;
  --accent:        #54d6c8;
  --accent-hover:  #7ae3d8;
  --accent-ink:    #06201d;
  --accent-wash:   rgba(84, 214, 200, 0.10);
  --accent-line:   rgba(84, 214, 200, 0.26);
  --shadow-sm:     0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md:     0 6px 18px rgba(0, 0, 0, .45), 0 16px 40px rgba(0, 0, 0, .35);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  color: var(--text-strong);
  line-height: 1.2;
  margin: 0 0 .5em;
  font-weight: 700;
  letter-spacing: -0.015em;
}
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
ul { margin: 0; padding: 0; }
img, svg { max-width: 100%; }

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

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}
.skip:focus { left: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}

@supports (backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px)) {
  @supports (background: color-mix(in srgb, red 50%, transparent)) {
    .site-header {
      background: color-mix(in srgb, var(--bg) 80%, transparent);
      backdrop-filter: saturate(165%) blur(12px);
      -webkit-backdrop-filter: saturate(165%) blur(12px);
    }
  }
}

.site-header.is-stuck { border-bottom-color: var(--border); }

.nav-inner { display: flex; align-items: center; gap: 16px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  margin-right: auto;
  white-space: nowrap;
}
.brand:hover { color: var(--text-strong); }

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--accent), var(--accent-hover));
  color: var(--accent-ink);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0;
}
.brand-text { font-size: 15.5px; }

.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-links a {
  display: block;
  padding: 7px 11px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  transition: color .18s ease, background .18s ease;
}
.nav-links a:hover { color: var(--text-strong); background: var(--surface-2); }
.nav-links a.is-active { color: var(--accent); background: var(--accent-wash); font-weight: 600; }

.nav-tools { display: flex; align-items: center; gap: 6px; }

.icon-btn, .lang-btn {
  display: inline-grid;
  place-items: center;
  height: 34px;
  min-width: 34px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color .18s, border-color .18s, background .18s, transform .12s;
}
.icon-btn:hover, .lang-btn:hover {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-wash);
}
.icon-btn:active, .lang-btn:active { transform: translateY(1px); }
.icon-btn svg { width: 17px; height: 17px; }
.lang-btn { letter-spacing: .03em; }

.theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-icon-sun { display: block; }
:root[data-theme="dark"] .theme-icon-moon { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-icon-moon { display: none; }
}

.nav-toggle { display: none; }

/* ---------- sections ---------- */
section { padding-block: clamp(52px, 8vw, 88px); }
section + section { border-top: 1px solid var(--border); }

.sec-head { margin-bottom: 34px; max-width: 64ch; }

.sec-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.sec-kicker::before {
  content: "";
  width: 20px;
  height: 1.5px;
  background: var(--accent);
  border-radius: 2px;
}

.sec-head h2 { font-size: clamp(1.55rem, 3.4vw, 2.1rem); margin-bottom: .3em; }
.sec-sub { color: var(--muted); font-size: 1.02rem; margin: 0; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(56px, 10vw, 104px) clamp(48px, 7vw, 76px);
  border-top: 0;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 70% at 12% 0%, var(--accent-wash), transparent 70%),
    radial-gradient(45% 55% at 92% 8%, var(--accent-wash), transparent 72%);
}
.hero > .wrap { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 44px;
  align-items: start;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px 5px 10px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 20px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.dot-live { animation: pulse 2.4s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-line); }
  50%      { box-shadow: 0 0 0 6px transparent; }
}
@media (prefers-reduced-motion: reduce) { .dot-live { animation: none; } }

.hero h1 {
  font-size: clamp(2.15rem, 6.4vw, 3.5rem);
  letter-spacing: -0.03em;
  margin-bottom: .22em;
}
.hero-role {
  font-size: clamp(1.05rem, 2.6vw, 1.32rem);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: .55em;
}
.hero-pitch {
  font-size: clamp(1.02rem, 2vw, 1.14rem);
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 1.1em;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  list-style: none;
  color: var(--faint);
  font-size: 14.5px;
  margin-bottom: 26px;
}
.hero-meta li { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta svg { width: 15px; height: 15px; color: var(--accent); flex: none; }

.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-strong);
  font: inherit;
  font-size: 14.8px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .14s ease, box-shadow .18s ease, border-color .18s, background .18s, color .18s;
}
.btn:hover {
  color: var(--text-strong);
  border-color: var(--accent-line);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }
.btn svg { width: 17px; height: 17px; flex: none; }

.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }

.btn-ghost {
  background: transparent;
  box-shadow: none;
  border-color: var(--border);
  color: var(--muted);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text-strong); }

.hero-card {
  display: grid;
  place-items: center;
  width: 196px;
  height: 196px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background:
    linear-gradient(150deg, var(--accent-wash), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--accent-line) 1px, transparent 1px);
  background-size: 15px 15px;
  opacity: .5;
  mask-image: radial-gradient(70% 70% at 70% 30%, #000, transparent);
  -webkit-mask-image: radial-gradient(70% 70% at 70% 30%, #000, transparent);
}
.hero-card span {
  position: relative;
  z-index: 1;
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--accent);
}

/* ---------- stat strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  margin-top: 46px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat { background: var(--bg-elev); padding: 18px 20px; }
.stat-num {
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1.1;
  display: block;
  margin-bottom: 4px;
}
.stat-lab { font-size: 13.6px; color: var(--muted); line-height: 1.45; display: block; }

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 40px;
  align-items: start;
}
.about-body > p:last-child { margin-bottom: 0; }
.about-body strong { color: var(--text-strong); font-weight: 650; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.panel h3 { font-size: 15px; letter-spacing: .01em; margin-bottom: 14px; }

.kv { list-style: none; display: grid; gap: 13px; margin: 0; }
.kv > div { display: grid; gap: 2px; }
.kv dt {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
}
.kv dd { margin: 0; font-size: 14.8px; color: var(--text); font-weight: 550; }
.kv dd a { font-weight: 600; }

/* ---------- skills ---------- */
.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
  /* size each card to its own content instead of stretching it to the row */
  align-items: start;
}
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.skill-card:hover {
  border-color: var(--accent-line);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.skill-card h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14.6px;
  margin-bottom: 14px;
}
.skill-card h3 svg { width: 17px; height: 17px; color: var(--accent); flex: none; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.tags li {
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12.8px;
  color: var(--muted);
  font-weight: 500;
}

.skill-card.is-learning { border-style: dashed; }
.skill-card.is-learning .tags li { background: transparent; border-style: dashed; }

/* ---------- timeline ---------- */
.timeline { list-style: none; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 10px;
  bottom: 10px;
  width: 1.5px;
  background: linear-gradient(var(--accent-line), var(--border), transparent);
}

.tl-item { position: relative; padding-left: 34px; padding-bottom: 32px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--bg);
  border: 2.5px solid var(--accent);
}
.tl-item.is-dim::before { border-color: var(--border-strong); }

.tl-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin-bottom: 2px;
}
.tl-role { font-size: 1.07rem; font-weight: 700; color: var(--text-strong); }
.tl-when {
  font-family: var(--mono);
  font-size: 12.4px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-wash);
  border: 1px solid var(--accent-line);
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.tl-org { color: var(--muted); font-size: 14.6px; margin-bottom: 11px; }
.tl-org .tl-place::before { content: "\00b7"; margin: 0 7px; color: var(--faint); }

.tl-points { list-style: none; display: grid; gap: 8px; }
.tl-points li { position: relative; padding-left: 17px; font-size: 14.9px; color: var(--muted); }
.tl-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-line);
}
.tl-points strong { color: var(--text-strong); font-weight: 650; }

/* ---------- projects ---------- */
.proj-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; }

.chip {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.chip:hover { color: var(--text-strong); border-color: var(--border-strong); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 16px;
}
.proj {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 21px;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.proj:hover { border-color: var(--accent-line); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.proj[hidden] { display: none; }

.proj-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}
.proj h3 { font-size: 1.04rem; margin: 0; }
.proj-year {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--faint);
  white-space: nowrap;
  padding-top: 3px;
}
.proj-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin-bottom: 10px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--accent-wash);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 11.6px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.proj p { font-size: 14.7px; color: var(--muted); margin-bottom: 14px; }
.proj .tags { margin-bottom: 16px; }
.proj-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 13.4px;
  font-weight: 600;
  color: var(--text-strong);
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.link-btn:hover { border-color: var(--accent-line); background: var(--accent-wash); color: var(--accent); }
.link-btn svg { width: 15px; height: 15px; flex: none; }

.proj-note { font-size: 13.4px; color: var(--faint); font-style: italic; margin-top: auto; margin-bottom: 0; }

/* ---------- CV download set ---------- */
.cv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 14px;
}
.cv-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.cv-card:hover { border-color: var(--accent-line); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.cv-ico {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-wash);
  color: var(--accent);
  border: 1px solid var(--accent-line);
}
.cv-ico svg { width: 19px; height: 19px; }
.cv-card h3 { font-size: 14.9px; margin-bottom: 3px; }
.cv-card p { font-size: 13.4px; color: var(--muted); margin: 0; }

.cv-lang {
  font-family: var(--mono);
  font-size: 10.6px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--accent);
  border: 1px solid var(--accent-line);
  background: var(--accent-wash);
  padding: 1px 6px;
  border-radius: 5px;
  margin-left: 7px;
  vertical-align: 2px;
}

/* ---------- research / certification ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px;
}
.feature h3 { font-size: 1.02rem; margin-bottom: 4px; }
.feature .feature-meta {
  font-family: var(--mono);
  font-size: 12.2px;
  color: var(--faint);
  margin-bottom: 11px;
  display: block;
}
.feature p { font-size: 14.7px; color: var(--muted); margin-bottom: 14px; }
.feature p:last-of-type { margin-bottom: 0; }

.cred {
  font-family: var(--mono);
  font-size: 12.3px;
  color: var(--faint);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 5px;
  word-break: break-all;
}

/* ---------- languages / strengths ---------- */
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
}
.lang-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.lang-row:last-child { border-bottom: 0; }
.lang-name { font-weight: 650; color: var(--text-strong); font-size: 15px; display: block; }
.lang-note { font-size: 13.6px; color: var(--muted); }
.lang-lvl {
  font-family: var(--mono);
  font-size: 12.4px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-wash);
  border: 1px solid var(--accent-line);
  padding: 2px 9px;
  border-radius: 6px;
  white-space: nowrap;
}

.check-list { list-style: none; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 26px; font-size: 14.8px; color: var(--muted); }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .35em;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  background: var(--accent-wash);
  border: 1px solid var(--accent-line);
}
.check-list li::after {
  content: "";
  position: absolute;
  left: 4.4px;
  top: .62em;
  width: 6px;
  height: 3px;
  border-left: 1.8px solid var(--accent);
  border-bottom: 1.8px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---------- contact ---------- */
.contact { position: relative; overflow: hidden; }
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(55% 80% at 50% 0%, var(--accent-wash), transparent 70%);
}
.contact > .wrap { position: relative; z-index: 1; }

.contact-box { text-align: center; max-width: 620px; margin-inline: auto; }
.contact-box h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.contact-box > p { color: var(--muted); font-size: 1.04rem; margin-bottom: 26px; }
.contact-box .cta-row { justify-content: center; }

.contact-mail {
  font-family: var(--mono);
  font-size: 14.5px;
  color: var(--muted);
  margin-top: 22px;
  margin-bottom: 0;
  word-break: break-word;
}
.contact-mail a { font-weight: 600; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 26px;
  color: var(--faint);
  font-size: 13.8px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
}
.footer-links { display: flex; gap: 16px; list-style: none; }
.footer-links a { color: var(--muted); font-weight: 500; }
.footer-links a:hover { color: var(--accent); }

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-card { width: 136px; height: 136px; border-radius: 18px; }
  .hero-card span { font-size: 40px; }
}

/* The French labels are longer than the English ones, so the nav needs about
   1017px with the full name beside it and 859px with just the monogram. Drop
   the name first, then fall back to the menu button, so the header never
   pushes the page wider than the viewport. */
@media (max-width: 1080px) {
  .brand-text { display: none; }
}

@media (max-width: 940px) {
  .nav-toggle { display: inline-grid; }
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 16px 16px;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 11px 12px; font-size: 15.5px; }
}

@media (max-width: 640px) {
  /* the monogram is decoration; on a phone the space is better spent on content */
  .hero-card { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 16px; }
  .pill { align-items: flex-start; }
  .pill .dot { margin-top: 8px; }
  .cta-row .btn { flex: 1 1 auto; }
  .stats { grid-template-columns: 1fr 1fr; }
  .tl-item { padding-left: 28px; }
  .proj, .skill-card, .feature, .panel { padding: 18px; }
}

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

/* ---------- print ---------- */
@media print {
  .site-header, .nav-tools, .proj-filters, .contact .cta-row, .hero-card { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  section { padding-block: 14pt; border-top: 1px solid #ccc; page-break-inside: avoid; }
  a { color: #000; text-decoration: underline; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
