:root {
  --primary: #f0d264;
  --bg: #282a36;
  --bg1: #343647;
  --bg2: #44475a;
  --bg3: #6272a4;
  --fg: #d4d0c8;
  --fg-muted: #8889a0;
  --code-bg: #2e3040;
}

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

body {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1rem;
  color: var(--fg);
  background: var(--bg);
  font-family: 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

nav { margin-top: 3rem; }

.menu {
  display: flex;
  flex-wrap: wrap;
}

.menu > a { margin-right: 1rem; }

.menu a.active { color: var(--primary); border-bottom-color: var(--primary); }
.menu a.active:hover { color: var(--bg); }

main, footer { padding: 1rem 0; }

a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px dotted var(--primary);
}

a:hover {
  color: var(--bg);
  background: var(--primary);
}

hr {
  background: var(--bg2);
  height: 1px;
  border: none;
}

blockquote {
  border-left: 3px solid var(--primary);
  padding: 10px 0 10px 20px;
}

blockquote > p { margin: 0; }

code {
  font-size: 0.9rem;
  background: var(--code-bg);
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo,
    Consolas, 'DejaVu Sans Mono', monospace;
  padding: 2px 4px;
}

pre {
  font-size: 0.9rem;
  background: var(--code-bg);
  padding: 1rem;
  overflow: auto;
}

pre code {
  padding: 0;
  background: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* gallery */

.hugo-gallery-tight {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  margin: 1rem 0;
}

.gallery-item {
  background: var(--bg1);
  border-radius: 4px;
  overflow: hidden;
}

.image-link {
  display: block;
  border-bottom: none;
}

.image-link:hover { background: none; }

.tight-image {
  width: 100%;
  display: block;
  transition: transform 0.2s;
}

.tight-image:hover {
  transform: scale(1.05);
  cursor: zoom-in;
}

.image-label {
  padding: 10px 12px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--fg-muted);
  border-top: 1px solid var(--bg2);
}

.hugo-gallery-tight.single {
  display: flex;
  justify-content: center;
}

.hugo-gallery-tight.single .gallery-item { max-width: 500px; }
.hugo-gallery-tight.double { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 768px) {
  .hugo-gallery-tight { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .hugo-gallery-tight { grid-template-columns: 1fr; }
}

/* the easter egg */

.the-end {
  font-style: normal;
  color: var(--bg3);
}

.the-end::after { content: "~"; }

.the-end:hover::after {
  content: "this is an easter egg :o";
  color: var(--primary);
}

/* skip link for a11y */

.skip-link {
  position: absolute;
  left: -9999px;
  padding: 8px 16px;
  background: var(--primary);
  color: var(--bg);
  border-bottom: none;
}

.skip-link:focus {
  left: 0;
  top: 0;
}
