@font-face {
  font-family: "QT Grotesk";
  src: url("/fonts/QTGrotesk0.2VF.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #1c1b1a;
  --text: #d5d0c8;
  --text-light: #8a857f;
  --accent: #c4956e;
  --accent-hover: #ddb08a;
  --rule: #2e2c2a;
  --font: "QT Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

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

body {
  font-family: var(--font);
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  max-width: 38rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 4rem) clamp(1.25rem, 4vw, 2rem);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Links */

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Site header */

.site-header {
  margin-bottom: clamp(3rem, 8vw, 5rem);
}

.site-title {
  display: block;
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.site-title:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 1.25rem;
}

.site-header nav a {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-light);
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--text);
  text-decoration: none;
}

/* Posts feed */

.post {
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.post + .post {
  padding-top: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--rule);
}

.post h2 {
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.25rem;
  letter-spacing: -0.015em;
}

.post h2 a {
  color: var(--text);
}

.post h2 a:hover {
  color: var(--accent);
  text-decoration: none;
}

.post.linked h2 a.post-title {
  color: var(--accent);
}

.post.linked h2 a.post-title:hover {
  text-decoration: underline;
}

.permalink {
  font-size: 0.75em;
  color: var(--text-light);
  margin-left: 0.35em;
  text-decoration: none;
}

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

.post time,
.post.single time {
  display: block;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

/* Post body */

.post-body p {
  margin-bottom: 1em;
}

.post-body p:last-child {
  margin-bottom: 0;
}

.post-body blockquote {
  border-left: 2px solid var(--rule);
  padding-left: 1.25rem;
  margin: 1.5em 0;
  color: var(--text-light);
}

.post-body ul,
.post-body ol {
  margin: 1em 0;
  padding-left: 1.5rem;
}

.post-body li {
  margin-bottom: 0.35em;
}

.post-body code {
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

.post-body pre {
  background: rgba(255, 255, 255, 0.06);
  padding: 1.25rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1.5em 0;
}

.post-body pre code {
  background: none;
  padding: 0;
}

.post-body a {
  text-decoration: underline;
  text-decoration-color: rgba(196, 149, 110, 0.3);
  text-underline-offset: 0.15em;
}

.post-body a:hover {
  text-decoration-color: var(--accent);
}

.post-body h2,
.post-body h3 {
  margin-top: 2em;
  margin-bottom: 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.post-body h2 {
  font-size: 1.25em;
}

.post-body h3 {
  font-size: 1.1em;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2em 0;
}

/* Single post */

.post.single h1 {
  font-size: clamp(1.5rem, 1.3rem + 0.75vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.post.single h1 a {
  color: var(--accent);
}

/* Pages (about, etc.) */

.page h1 {
  font-size: clamp(1.5rem, 1.3rem + 0.75vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

/* Footer */

.site-footer {
  margin-top: clamp(4rem, 10vw, 8rem);
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--text-light);
}
