/* Courier Prime — self-hosted */
@font-face {
  font-family: "Courier Prime";
  src: url("/fonts/courier-prime/courierprime-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("/fonts/courier-prime/courierprime-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}


:root {
  --accent: #40ffe3;
  --bg-light: #fdfaf6;
  --bg-dark: #121212;
  --bg-light-rgb: 253,250,246;
  --bg-dark-rgb: 18,18,18;
  --text-light: #222;
  --text-dark: #dcdcdc;
  --text-light-rgb: 34,34,34;
  --text-dark-rgb: 220,220,220;
  --font-heading: "Courier Prime", Courier, monospace;
  --body-width: 1200px;
  --content-width: 1136px;
}

html[data-theme="light"] {
  --bg: var(--bg-light);
  --bg-rgb: var(--bg-light-rgb);
  --text: var(--text-light);
  --text-rgb: var(--text-light-rgb);
}

html[data-theme="dark"] {
  --bg: var(--bg-dark);
  --bg-rgb: var(--bg-dark-rgb);
  --text: var(--text-dark);
  --text-rgb: var(--text-dark-rgb);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: rgba(var(--text-rgb), 0.8);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: rgba(var(--text-rgb), 1);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10000;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background-color: rgba(var(--bg-rgb), 0.8);
  border-bottom: 2px solid rgba(var(--text-rgb), 0.25);
}


h1 {
  font-size: 2.2rem;   /* biggest */
  font-weight: 500;    /* semi-bold, not 700 */
  letter-spacing: 0.02em;
  margin: 3rem 0 1.5rem;
}

h2 {
  font-size: 1.6rem;   /* section titles */
  font-weight: 400;    /* normal */
  letter-spacing: 0.03em;
  margin: 2.5rem 0 1rem;
}

h3 {
  font-size: 1.3rem;
  font-weight: 400;
  margin: 2rem 0 .75rem;
}


a {
  color: inherit;
  text-underline-offset: 2px;
  transition: color .15s ease;
  text-decoration-color: var(--accent);
  text-decoration-style: dotted;
}

a:hover,
a:focus {
  color: var(--accent);
}

nav {
  display: flex;
  gap: 1rem;
  padding: 1rem;
}

nav .spacer {
  flex: 1;
}

.page {
  max-width: var(--body-width);
  margin: 0 auto;
}

main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1rem;
}

footer {
  padding: 1rem;
  text-align: right;
  color: rgba(var(--text-rgb), 0.6);
  border-top: 2px solid rgba(var(--text-rgb), 0.25);
}

hr {
  border: none;
  border-top: 2px solid var(--text);
  opacity: .25;
  margin: 3rem 0 2rem;
}

/* Lists */
ul {
  list-style: square;
  padding-left: 1rem;
  margin: 0;
}

li {
  margin: .5rem 0;
}

li::marker {
  color: var(--accent);
}

li h3 {
  font-weight: normal;
  margin: 0;
}

li em {
  color: var(--text);
  opacity: .6;
}


.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(var(--text-rgb), 0.08);
  transition: transform .2s ease, border-color .2s ease;
  position: relative;
  padding: 1rem;
  border: 2px solid transparent;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .2s ease;
  z-index: 0;
  pointer-events: none;
}

.card:hover img {
  opacity: 0.15;
}

.card h3,
.card p {
  position: relative;
  z-index: 1;
}

.card p,
.card:hover p {
  color: rgba(var(--text-rgb), 0.8);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid rgba(var(--text-rgb), 0.25);
}

th,
td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid rgba(var(--text-rgb), 0.25);
}

th {
  color: rgba(var(--text-rgb), 1);
}
