/* ----------------------------
   Colors
----------------------------- */

:root {
  --bg: #fafafa;
  --text: #1e1e1e;
  --muted: #555;
  --accent: #5e81ac;
  --border: #e5e5e5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1e20;
    --text: #dadadb;
    --muted: #a0a0a0;
    --accent: #81a1c1;
    --border: #2e2f33;
  }
}

/* ----------------------------
   Typography & layout
----------------------------- */
@font-face {
	font-family:"IBM Plex Sans";
	src: url("/fonts/IBMPlexSans-Variable.ttf") format('truetype');
}

@font-face {
	font-family:"IBM Plex Sans";
	src: url("/fonts/IBMPlexSans-Italic.ttf") format('truetype');
	font-style: italic;
}

html {
  background: var(--bg);
  color: var(--text);
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", Inter, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  font-size: 18px;
}

/* ----------------------------
   Top bar
----------------------------- */

.topbar-inner {
  max-width: 700px;
  border-bottom: 1px solid var(--border);
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo {
  width: 24px;
  height: 24px;
  padding-right: 0.2rem;
  margin-bottom: -5px;
  color: var(--text);
}

.site-logo:hover {
  color: var(--accent);
}

.site-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
}

.site-brand a {
  text-decoration: none;
  color: var(--text);
}

.site-brand a:hover {
  text-decoration: underline;
  text-underline-offset: 3.1px;
  text-decoration-thickness: 1.3px;
  color: var(--accent);
}


.nav a {
  margin-left: 1rem;
  text-decoration: none;
  text-underline-offset: 3.1px;
  text-decoration-thickness: 1px;
  color: var(--text);
  font-size: 1rem;
}

.nav a:hover {
  text-decoration: underline;
  text-underline-offset: 3.1px;
  text-decoration-thickness: 1.3px;
  color: var(--accent);
}

/* ----------------------------
   Main content
----------------------------- */

main {
  max-width: 700px;
  margin: 2.5rem auto;
  padding: 0 1rem;
}

article h1 {
  font-size: 1.8rem;
  margin-top: 0;
}

article p {
  margin: 1.25rem 0;
  color: var(--text);
}

/* ---------------------------
   Footer
------------------------------*/
.footer {
  margin-top: 3rem;
}

.footer-inner {
  max-width: 700px;
  border-top: 1px solid var(--border);
  margin: 0 auto;
  padding: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}


.footer-inner a {
  text-decoration: none;
  color: var(--text);
}

.footer-inner a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1.3px;
  color: var(--accent);
}

/* Books layout */

.book {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

.book img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

h2 {
  margin-top: 0;
  margin-bottom: 0.1rem;
  font-size: 1.2rem;
}

h3 {
  margin-top: 0;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.book-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.75rem 0;
}

/* Mobile: collapse to one column */

@media (max-width: 600px) {
  .book {
    grid-template-columns: 1fr;
  }

  .book img {
    max-width: 180px;
  }
}

/* Articles layout — mirrors books */

.article {
  margin: 2rem 0;
}

.article-info h2 {
  margin-bottom: 0.25rem;
}

.article-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.75rem 0;
}

.article-link::before {
	content: "| ";
}

.article-link::after {
	content: "\2197";
}

.article-link a {
  font-size: 0.95rem;
  text-decoration: none;
  font-weight: 700;
  color: var(--accent);
  text-transform: lowercase;
}

.article-link a:hover {
  text-decoration: underline;
}

.book-link::after {
	content: "\2197";
}

.book-link {
  font-size: 0.95rem;
  text-decoration: none;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
}

.book-link::hover {
  text-decoration: underline;
}

/* ----------------------------
   Small screens
----------------------------- */

@media (max-width: 600px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    margin-top: 0.5rem;
  }

  .nav a {
    margin-left: 0;
    margin-right: 1rem;
  }
}
