/* Fonts: Archivo (SIL OFL), self-hosted. Heavy expanded italic is reserved for the name, echoing the DJAWHAR wordmark. */
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-wdth-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #edeff3;
  --sheet: #ffffff;
  --ink: #0f1720;
  --muted: #566274;
  --line: #dbdfe7;
  --field-line: #8a94a5;
  --accent: #2740e8;
  --accent-ink: #ffffff;
  --accent-soft: #e8ebfd;
  --avatar-bg: #eceef4;
  --banner-a: #2740e8;
  --banner-b: #1a2bb0;
  --ok: #157a43;
  --err: #b3261e;
  --radius: 14px;
  --avatar: 104px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0a0f16;
    --sheet: #121923;
    --ink: #edf1f7;
    --muted: #97a3b4;
    --line: #243041;
    --field-line: #566276;
    --accent: #8fa2ff;
    --accent-ink: #0a0f16;
    --accent-soft: #1b2540;
    --avatar-bg: #edf1f7;
    --banner-a: #1f31b8;
    --banner-b: #131f78;
    --ok: #58d68d;
    --err: #ff8a80;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.page { max-width: 46rem; margin: 0 auto; padding: 16px 16px 56px; }

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

/* Profile header */
.profile, .sheet {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.profile { overflow: hidden; }

.banner {
  height: 112px;
  /* stripes lean at the same angle as the italic name */
  background:
    repeating-linear-gradient(100deg, rgb(255 255 255 / 0.13) 0 2px, transparent 2px 20px),
    linear-gradient(135deg, var(--banner-a), var(--banner-b));
}

.profile-body { padding: 0 20px 24px; }

.avatar {
  display: block;
  width: var(--avatar);
  height: var(--avatar);
  margin-top: calc(var(--avatar) / -2);
  padding: 16px 14px 16px 18px;
  border: 4px solid var(--sheet);
  border-radius: 50%;
  background: var(--avatar-bg);
  object-fit: contain;
}

h1 {
  margin: 14px 0 0;
  font-style: italic;
  font-weight: 850;
  font-stretch: 125%;
  font-size: clamp(2rem, 8.6vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.headline { margin: 10px 0 0; font-size: 1.125rem; font-weight: 550; }
.location { margin: 2px 0 0; color: var(--muted); }

.status {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 12px 0 0; font-size: 0.9375rem; font-weight: 550;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px;
  border: 1px solid transparent; border-radius: 999px;
  font: inherit; font-size: 0.9375rem; font-weight: 650; line-height: 1;
  text-decoration: none; cursor: pointer;
  transition: background-color 120ms, border-color 120ms, color 120ms;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(0.92); }
.btn-secondary { border-color: var(--accent); color: var(--accent); }
.btn-secondary:hover { background: var(--accent-soft); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--paper); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Sections: one sheet, hairline-separated */
.sheet { margin-top: 12px; }
.sheet > section { padding: 24px 20px; }
.sheet > section + section { border-top: 1px solid var(--line); }

h2 { margin: 0 0 16px; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0; max-width: 62ch; }

.rows { display: grid; gap: 22px; margin: 0; padding: 0; list-style: none; }
/* Narrow screens: title, org, dates, description. Wide screens: dates sit beside the title. */
.rows li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "title" "sub" "when" "desc";
  justify-items: start;
}
h3 { grid-area: title; margin: 0; font-size: 1rem; font-weight: 650; line-height: 1.4; }
.sub { grid-area: sub; margin-top: 2px; color: var(--muted); }
.when { grid-area: when; margin-top: 2px; color: var(--muted); font-size: 0.875rem; }
.rows li > p:not(.sub) { grid-area: desc; margin-top: 6px; }
h3 a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
h3 a:hover { color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li {
  padding: 6px 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); font-size: 0.9375rem;
}

/* Contact form */
.lead { margin-bottom: 20px; }
form { display: grid; gap: 16px; max-width: 34rem; }
.field { display: grid; gap: 6px; }
label { font-size: 0.9375rem; font-weight: 600; }
input, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--field-line); border-radius: 10px;
  background: var(--sheet); color: var(--ink);
  font: inherit; font-size: 1rem; line-height: 1.4;
}
textarea { min-height: 9rem; resize: vertical; }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
form .btn { justify-self: start; }

.form-status { min-height: 1.6em; font-size: 0.9375rem; }
.form-status[data-kind="ok"] { color: var(--ok); }
.form-status[data-kind="error"] { color: var(--err); }
.form-status[data-kind="info"] { color: var(--muted); }

/* Honeypot: off-screen, not display:none (bots skip display:none fields less often) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (min-width: 640px) {
  :root { --avatar: 120px; }
  .banner { height: 152px; }
  .profile-body { padding: 0 32px 32px; }
  .sheet > section { padding: 28px 32px; }
  .rows li {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "title when" "sub sub" "desc desc";
    column-gap: 16px;
    align-items: baseline;
  }
  .when { margin-top: 0; justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
