/* Guido van Rossum's Personal Site — refreshed styles */

/* ── Reset & base ────────────────────────────────────── */

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

body {
  margin: 0;
  padding: 2rem 1.5rem;
  background-color: #ffffff;
  color: #000000;
  font-family: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Centred, readable column */
.container {
  max-width: 52rem;
  margin: 0 auto;
}

/* ── Typography ──────────────────────────────────────── */

h1 {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 2rem 0 0.5rem;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.8rem 0 0.4rem;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.25rem;
}

h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.4rem 0 0.3rem;
}

p {
  margin: 0.6rem 0;
}

blockquote {
  margin: 1rem 0 1rem 1.5rem;
  padding: 0.5rem 1rem;
  border-left: 3px solid #ccc;
  color: #333;
}

pre {
  background: #f6f6f6;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ── Links ───────────────────────────────────────────── */

a {
  color: #0645ad;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:visited {
  color: #551a8b;
}

a:hover,
a:focus {
  color: #0b0080;
  text-decoration-thickness: 2px;
}

/* ── Images ──────────────────────────────────────────── */

img {
  max-width: 100%;
  height: auto;
  border: 0;
  vertical-align: middle;
}

/* Header portrait thumbnails */
h1 img {
  width: 120px;
  height: auto;
  border-radius: 6px;
}

/* ── Lists ───────────────────────────────────────────── */

ul, ol {
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.4rem;
}

/* ── Horizontal rule ─────────────────────────────────── */

hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 2rem 0;
}

/* ── Tables (basic) ──────────────────────────────────── */

table {
  border-collapse: collapse;
}

td, th {
  padding: 0.3rem 0.6rem;
}

/* ── Footer-style back-links ─────────────────────────── */

body > a:last-child,
.container > a:last-child {
  display: inline-block;
  margin-top: 1.5rem;
}

/* ── Responsive tweaks ───────────────────────────────── */

@media (max-width: 600px) {
  body {
    padding: 1rem;
    font-size: 1rem;
  }

  h1 {
    font-size: 1.35rem;
  }

  h1 img {
    width: 80px;
  }
}
