/* Pixelated Polymath: shared styles */
:root {
  --bg: #191d3a;
  --ink: #ece8f5;
  --muted: #b3aed0;
  --accent: #f0a878;
  --line: #34386a;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "EB Garamond", Georgia, serif;
  font-size: 21px;
  line-height: 1.6;
}

img { image-rendering: pixelated; max-width: 100%; }

a { color: var(--accent); }
a:hover { color: #ffd2b0; }

/* Front page */
.home {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: url("dusk.png") center bottom / cover no-repeat;
  image-rendering: pixelated;
  position: relative;
}
.home::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(14, 20, 48, 0.15);
}
.home > * { position: relative; }
.home .name {
  margin: 28px 0 0;
  font-size: 26px;
  color: #e8ecf8;
}
.home nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: clamp(48px, 9vw, 76px);
  line-height: 1.12;
  padding-bottom: 8vh;
}
.home nav a { color: #ffffff; text-decoration: none; }
.home nav a:hover { color: #ffe08a; }

/* Inner pages */
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}
.page > header { text-align: center; margin-bottom: 56px; }
.page > header a { color: var(--ink); text-decoration: none; font-size: 26px; }
.page > header nav { margin-top: 6px; font-size: 18px; display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; }
.page > header nav a { font-size: 18px; color: var(--muted); }
.page > header nav a[aria-current="page"] { color: var(--accent); }

h1 { font-weight: 400; font-size: clamp(44px, 8vw, 64px); line-height: 1.1; margin: 0 0 24px; text-align: center; }
h2 { font-weight: 400; font-size: 34px; line-height: 1.2; margin: 48px 0 12px; }
.lede { font-size: 24px; text-align: center; color: var(--muted); margin: 0 auto 48px; max-width: 600px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }

.project { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; text-decoration: none; color: var(--ink); padding: 24px 0; border-top: 1px solid var(--line); }
.project:last-child { border-bottom: 1px solid var(--line); }
.project img { width: 120px; flex: none; }
.project .text { flex: 1 1 300px; }
.project h2 { margin: 0 0 6px; }
.project p { margin: 0; color: var(--muted); }
.project:hover h2 { color: var(--accent); }
.meta { font-size: 17px; color: var(--accent); letter-spacing: 0.5px; }

.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 32px 0; }
.gallery img { width: 100%; display: block; border-radius: 6px; }
.gallery figure { margin: 0; }
.gallery figcaption { font-size: 16px; color: var(--muted); margin-top: 6px; text-align: center; }
.wide { width: 100%; display: block; border-radius: 6px; margin: 32px 0 8px; }

.button { display: inline-block; background: var(--accent); color: #1a1430; text-decoration: none; padding: 12px 24px; border-radius: 999px; font-size: 21px; }
.button:hover { background: #ffd2b0; color: #1a1430; }
.note { font-size: 18px; color: var(--muted); }

footer.site { text-align: center; font-size: 16px; color: var(--muted); padding: 32px 24px 48px; }

@media (max-width: 600px) {
  body { font-size: 19px; }
  .gallery { gap: 10px; }
}
