@font-face {
  font-family: Geist;
  src: url("./fonts/geist-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Geist;
  src: url("./fonts/geist-semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #fff;
  --ink: #171717;
  --muted: #565656;
  --label: #2e2e2e;
  --rule: #dedede;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0e;
    --ink: #ededed;
    --muted: #a6a6a6;
    --label: #cfcfcf;
    --rule: #2b2b2b;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Geist, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  text-wrap: pretty;
}

main {
  max-width: 700px;
  margin: 0 auto;
  padding: clamp(56px, 12vw, 128px) 24px;
}

h1,
h2,
h3,
dt {
  font-weight: 600;
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(32px, 5vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

h2 {
  margin: 0 0 32px;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--label);
}

h3 {
  margin: 0 0 6px;
  font-size: 19px;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 18px;
  max-width: 64ch;
}

.intro {
  max-width: 46ch;
  font-size: clamp(19px, 2.2vw, 21px);
  line-height: 1.55;
  letter-spacing: -0.015em;
}

.intro,
.now {
  margin-bottom: 28px;
}

/* Small grey type: dates, roles, stacks, the current-work line. */
.meta,
.stack,
.now {
  color: var(--muted);
}

.meta,
.stack {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
}

.stack {
  margin: 10px 0 0;
}

/* Separator only where a name is followed by its dates or status. */
h3 .meta::before,
dt .meta::before {
  content: "· ";
}

/* Geist has no Arabic; the fallback runs small next to it. */
:lang(ar) {
  font-size: 1.18em;
}

section {
  margin-top: clamp(64px, 10vw, 96px);
}

article + article {
  margin-top: 40px;
}

section > p + dl {
  margin-top: 36px;
}

dl {
  margin: 0;
}

dt {
  margin-top: 30px;
  letter-spacing: -0.01em;
}

dt:first-of-type {
  margin-top: 0;
}

dd {
  margin: 4px 0 0;
  max-width: 64ch;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

footer {
  margin-top: clamp(64px, 10vw, 96px);
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-size: 15px;
  color: var(--muted);
}

footer p {
  margin: 0;
  max-width: none;
}

a {
  color: inherit;
  text-underline-offset: 4px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}
