/* Jessica Bluemke Greiff — site styles
   Design tokens taken from Figma (font: Habibi, bg #f5f5f5) */

:root {
  color-scheme: light dark;
  --bg: #f5f5f5;
  --ink: rgba(0, 0, 0, 0.85);   /* headings / name */
  --faint: rgba(0, 0, 0, 0.35); /* intro copy */
  --muted: rgba(0, 0, 0, 0.40); /* link lists */
  --read: rgba(0, 0, 0, 0.72);  /* long-form reading text */
  --line: rgba(0, 0, 0, 0.10);  /* dividers */
  --em: #000;                   /* emphasised words in intro */
  --shadow: rgba(0, 0, 0, 0.10);
}

/* Dark mode — inverted token values, applied automatically when the
   visitor's system is set to dark. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d0d;
    --ink: rgba(255, 255, 255, 0.87);
    --faint: rgba(255, 255, 255, 0.40);
    --muted: rgba(255, 255, 255, 0.45);
    --read: rgba(255, 255, 255, 0.75);
    --line: rgba(255, 255, 255, 0.14);
    --em: #fff;
    --shadow: rgba(0, 0, 0, 0.55);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Habibi", Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

/* ---------- Home ---------- */

.home {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 74px;
  max-width: 764px;
  margin: 0 auto;
  padding: 120px 24px 104px;
}

.photo {
  flex: 0 0 227px;
  width: 227px;
  height: 227px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 16px 20px var(--shadow);
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.col {
  width: 389px;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.name {
  margin: 0;
  font-size: 33px;
  line-height: 1.15;
  color: var(--ink);
  font-weight: 400;
}

.intro {
  margin: 0;
  font-size: 19px;
  line-height: 30px;
  color: var(--faint);
}

.intro p { margin: 0 0 1.4em; }
.intro p:last-child { margin-bottom: 0; }
.intro .em { color: var(--em); }
.intro a { text-decoration: none; }
.intro a:hover,
.intro a:focus-visible { text-decoration: underline; }

.rule {
  width: 100%;
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--line);
}

.block {
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.block h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 400;
  color: var(--ink);
}

.links {
  display: flex;
  flex-direction: column;
}

.links a,
.links span {
  font-size: 19px;
  line-height: 30px;
  color: var(--muted);
  text-decoration: none;
  width: fit-content;
}

.links a:hover,
.links a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}

/* ---------- Sub-pages ---------- */

.page {
  max-width: 680px;
  margin: 0 auto;
  padding: 72px 24px 104px;
}

.topbar { margin-bottom: 52px; }

.home-link {
  font-size: 15px;
  color: var(--muted);
  text-decoration: none;
}

.home-link:hover,
.home-link:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}

.page h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.2;
  font-weight: 400;
  color: var(--ink);
}

.page-intro {
  margin: 12px 0 0;
  font-size: 19px;
  line-height: 30px;
  color: var(--faint);
  max-width: 40ch;
}

article {
  margin-top: 56px;
  padding-top: 56px;
  border-top: 1px solid var(--line);
}

article:first-of-type {
  border-top: 0;
  padding-top: 0;
}

article .source {
  margin: 0 0 8px;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

article h2 {
  margin: 0 0 20px;
  font-size: 27px;
  line-height: 1.25;
  font-weight: 400;
  color: var(--ink);
}

article h2 a { text-decoration: none; }
article h2 a:hover,
article h2 a:focus-visible { text-decoration: underline; }

article h3 {
  margin: 30px 0 12px;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 400;
  color: var(--ink);
}

article p {
  margin: 0 0 20px;
  font-size: 19px;
  line-height: 30px;
  color: var(--read);
}

article p:last-child { margin-bottom: 0; }

.back {
  margin: 56px 0 0;
  padding-top: 56px;
  border-top: 1px solid var(--line);
}

article blockquote {
  margin: 0 0 20px;
  padding-left: 18px;
  border-left: 2px solid var(--line);
  color: var(--ink);
  font-style: italic;
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .home {
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
    padding: 56px 18px 72px;
  }

  .col {
    width: 100%;
    max-width: 420px;
    gap: 44px;
  }

  .name { font-size: 38px; line-height: 1.34; }
  .block h2 { font-size: 30px; }

  .page { padding: 48px 18px 80px; }
  .page h1 { font-size: 32px; }
  article h2 { font-size: 24px; }
}
