/* ==========================================================================
   ditsndots — woodshed theme
   One file. Change the variables, change the whole site.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=JetBrains+Mono:wght@400&display=swap');

/* --- Variables --- */
:root {
  --font-body: 'Cormorant Garamond', 'Georgia', serif;
  --font-mono: 'JetBrains Mono', 'Menlo', monospace;
  --font-size: 1.25rem;
  --line-height: 1.75;
  --column-width: 38rem;           /* ~65-70 chars at this font size */
  --color-text: #1a1a1a;
  --color-bg: #faf9f6;             /* warm off-white, not clinical */
  --color-muted: #6b6b6b;
  --color-rule: #d4d0c8;
  --color-link: #1a1a1a;
  --color-link-hover: #4a4a4a;
  --color-code-bg: #f0efe9;
  --spacing-unit: 1.5rem;
}

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

/* --- Body --- */
html {
  font-size: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size);
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-bg);
  max-width: var(--column-width);
  margin: 0 auto;
  padding: 4rem var(--spacing-unit) 6rem;
}

/* --- Site header --- */
.site-header {
  margin-bottom: 4rem;
}

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

.site-name {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: lowercase;
  color: var(--color-muted);
}

.site-nav {
  margin-top: 0.25rem;
}

.site-nav a {
  font-size: 0.85rem;
  color: var(--color-muted);
  text-decoration: none;
  margin-right: 1.25rem;
  letter-spacing: 0.05em;
}

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

/* --- Typography --- */
h1 {
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.3;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: var(--spacing-unit);
}

blockquote {
  border-left: 2px solid var(--color-rule);
  padding-left: 1.25rem;
  margin: var(--spacing-unit) 0;
  font-style: italic;
  color: var(--color-muted);
}

/* --- Links --- */
a {
  color: var(--color-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--color-link-hover);
}

/* --- Article metadata --- */
.article-date {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 2.5rem;
  font-style: italic;
}

/* --- Article content --- */
.article-content {
  margin-bottom: 4rem;
}

.article-content img {
  max-width: 100%;
  height: auto;
  margin: var(--spacing-unit) 0;
}

/* --- Code --- */
code {
  font-family: var(--font-mono);
  font-size: 0.8em;
  background: var(--color-code-bg);
  padding: 0.15em 0.35em;
  border-radius: 2px;
}

pre {
  background: var(--color-code-bg);
  padding: 1.25rem;
  overflow-x: auto;
  margin: var(--spacing-unit) 0;
  border-radius: 2px;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.8rem;
}

/* --- Horizontal rule --- */
hr {
  border: none;
  border-top: 1px solid var(--color-rule);
  margin: 2.5rem 0;
}

/* --- Master list (home page) --- */
.article-list {
  list-style: none;
}

.article-list li {
  margin-bottom: 1.5rem;
}

.article-list a {
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.3;
}

.article-list a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

.article-list .list-date {
  display: block;
  font-size: 0.85rem;
  color: var(--color-muted);
  font-style: italic;
  margin-top: 0.1rem;
}

/* --- Tags on article page only --- */
.article-tags {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-rule);
  font-size: 0.85rem;
  color: var(--color-muted);
}

.article-tags span {
  margin-right: 0.75rem;
}

/* --- Footer --- */
.site-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-rule);
  font-size: 0.8rem;
  color: var(--color-muted);
}

/* --- About page --- */
.page-content {
  margin-bottom: 4rem;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  body {
    font-size: 1.1rem;
    padding: 2.5rem 1.25rem 4rem;
  }

  h1 {
    font-size: 1.65rem;
  }

  .site-header {
    margin-bottom: 3rem;
  }
}
