/* One page, two layouts: body.layout-page (a short site) and body.layout-links (links first). */
:root {
  --ink: #f4ede2;
  --paper: #161210;
  --muted: #b5a998;
  --tint: #2c2420;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 4rem 1.25rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

h1 { font-size: 2.25rem; line-height: 1.15; margin: 0 0 0.75rem; font-weight: 600; }
h2 { font-size: 1.1rem; margin: 0 0 0.25rem; font-weight: 600; }
p { margin: 0; }
.intro p { color: var(--muted); font-size: 1.15rem; }
.intro img { width: 7rem; height: 7rem; border-radius: 50%; object-fit: cover; margin-bottom: 1.5rem; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* Focus changes the thing itself: no outline, no ring. */
a:focus { outline: none; }
a:focus-visible { background: var(--ink); color: var(--paper); text-decoration: none; }

.links:empty, .work:empty, .contact:empty { display: none; }

.links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.links a {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--tint);
  text-decoration: none;
}
.links a:hover, .links a:focus-visible { background: var(--ink); color: var(--paper); }

.work { display: grid; gap: 2rem; }
.work article img { width: 100%; height: auto; border-radius: 6px; margin-bottom: 0.75rem; }
.work article p { color: var(--muted); }

.contact { color: var(--muted); }

/* Links first: a centred column of full-width buttons, the way a link-in-bio page reads. */
body.layout-links main { text-align: center; }
body.layout-links .intro img { margin-left: auto; margin-right: auto; }
body.layout-links .links { order: -1; flex-direction: column; }
body.layout-links .intro { order: -2; }
body.layout-links .links a { display: block; padding: 0.9rem 1rem; }

@media (max-width: 30rem) {
  main { padding-top: 2.5rem; gap: 2.25rem; }
  h1 { font-size: 1.9rem; }
}
