/* Adventure Byte Studios. Colours and sizes follow the old Gatsby minimal-blog theme. */
:root {
  --text: #2d3748;
  --bg: #fff;
  --heading: #000;
  --primary: #6b46c1;
  --secondary: #5f6c80;
  --divide: #cbd5e0;
  --muted: #edf2f7;
  --toggle: #2d3748;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --text: #cbd5e0;
  --bg: #1a202c;
  --heading: #fff;
  --primary: #9f7aea;
  --secondary: #7f8ea3;
  --divide: #2d3748;
  --muted: #2d3748;
  --toggle: #cbd5e0;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  line-height: 1.625;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg);
  color: var(--primary);
  z-index: 10;
}
.skip-link:focus { left: 0.5rem; }

.container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 1rem;
}

/* Header */
.site-header { margin-bottom: 1rem; }
.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-title {
  color: var(--heading);
  text-decoration: none;
}
.site-title h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.25;
}
.theme-toggle {
  background: none;
  border: 0;
  padding: 0.25rem;
  cursor: pointer;
  color: var(--toggle);
  line-height: 0;
  opacity: 0.75;
}
.theme-toggle:hover { opacity: 1; }
.theme-toggle svg { width: 24px; height: 24px; }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }

.nav-row {
  display: flex;
  flex-flow: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--divide);
  color: var(--secondary);
}
.nav-row a { color: var(--secondary); text-decoration: none; }
.nav-row a:hover { color: var(--heading); }
.site-nav { font-size: 1rem; }
.site-nav a:not(:last-of-type) { margin-right: 1rem; }
.site-nav a[aria-current="page"] { color: var(--heading); font-weight: bold; }
.social { display: flex; gap: 1rem; margin-top: 0.25rem; }
.social svg { width: 1.25em; height: 1.25em; fill: currentColor; display: block; }

/* Content */
main { margin: 2rem 0; }
main p, main li { font-size: 1rem; letter-spacing: -0.003em; }
h1, h2, h3, h4, h5, h6 { color: var(--heading); font-weight: 700; line-height: 1.25; }
main h1 { font-size: 2.25rem; margin-top: 2rem; }
main h2 { font-size: 1.875rem; margin-top: 2rem; }
main h3 { font-size: 1.5rem; margin-top: 2rem; }
main h4 { font-size: 1.25rem; margin-top: 1rem; }
main h5 { font-size: 1rem; margin-top: 1rem; }
main h6 { font-size: 1rem; margin-bottom: 0.5rem; }
blockquote {
  margin: 1rem 0;
  padding-left: 2rem;
  border-left: 6px solid var(--primary);
}
blockquote p { font-style: italic; }
a.plain { text-decoration: none; color: inherit; }

.center { text-align: center; }
img.half { width: 50%; }
img.full { width: 100%; }

.hero { text-align: center; margin-bottom: 2rem; }
.hero img { width: 50%; }

.page-head {
  display: flex;
  flex-flow: wrap;
  align-items: center;
  justify-content: space-between;
}
.page-head h2 { margin: 0; }
.meta, .meta a, .page-head a { color: var(--secondary); }
.page-head a { text-decoration: none; }
.page-head a:hover, .meta a:hover { color: var(--heading); text-decoration: underline; }

.post-list { margin: 2rem 0; }
.post-item { margin-bottom: 1.5rem; }
.post-item > a { font-size: 1.25rem; color: var(--text); }
.post-item .meta { margin: 0.25rem 0 0; font-size: 0.875rem; }

.post-title { margin-bottom: 0; }
.post .meta { margin-top: 1rem; }
.post-body { margin: 3rem 0; }

.tag-list { display: flex; flex-flow: wrap; gap: 0.5rem 2rem; margin-top: 2rem; }
.tag-list a { font-size: 1.25rem; color: var(--text); }
.tag-list span { color: var(--secondary); font-size: 1rem; }

/* Sign-up box */
.signup { display: flex; justify-content: center; margin: 2rem 0; }
.signup-box {
  background: var(--text);
  color: var(--bg);
  opacity: 0.8;
  max-width: 640px;
  min-width: 50%;
  border-radius: 1rem;
  padding: 0.5rem 1rem 1rem;
  text-align: center;
}
.signup-box h3 { margin: 0.5rem; color: var(--bg); font-size: 1.25rem; }
.signup-box p { margin: 0; }
.signup-box a { color: var(--bg); font-weight: bold; }
.signup-box form { display: flex; flex-flow: wrap; justify-content: center; gap: 0.5rem; }
.signup-box input[type="email"] { width: 14rem; height: 2rem; text-align: center; }
.signup-box button { width: 7rem; height: 2rem; font-weight: bold; }

/* Footer */
.site-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--divide);
  color: var(--secondary);
}

@media (min-width: 640px) {
  .container { padding: 2rem; }
  .site-title h1 { font-size: 1.875rem; }
  .site-nav { font-size: 18px; }
  .social { font-size: 18px; }
  main p, main li { font-size: 1rem; }
  main h1 { font-size: 3rem; }
  main h2 { font-size: 2.25rem; }
  main h3 { font-size: 1.875rem; }
  main h4 { font-size: 1.5rem; }
  main h5 { font-size: 1.25rem; }
  .post-item > a { font-size: 1.5rem; }
}
@media (min-width: 768px) {
  main p, main li { font-size: 1.25rem; }
  main h1 { font-size: 4rem; }
  main h2 { font-size: 3rem; }
  main h3 { font-size: 2.25rem; }
  main h4 { font-size: 1.875rem; }
  main h5 { font-size: 1.5rem; }
  .post-item > a { font-size: 1.875rem; }
}
