/* Global Styles - Minimal, readable typography */

:root {
  --bg: #faf9f7;
  --text: #1a1a1a;
  --text-muted: #666;
  --border: #e5e5e5;
  --link: #1a1a1a;
  --link-hover: #555;
  --max-width: 720px;
}

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

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: Georgia, 'Times New Roman', Times, serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  padding: 0 1.5rem;
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Header */
header {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

nav {
  display: flex;
  gap: 2rem;
}

nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

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

/* Main content */
main {
  min-height: 60vh;
  padding-bottom: 4rem;
}

/* Typography */
h1 {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 1rem;
  line-height: 1.3;
}

h2 {
  font-size: 1.3rem;
  font-weight: 400;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1.25rem;
}

/* Links */
a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

/* Lists */
ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Blockquotes */
blockquote {
  margin: 1.5rem 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--border);
  color: var(--text-muted);
  font-style: italic;
}

/* Code */
code {
  font-family: 'SF Mono', Menlo, Monaco, 'Courier New', monospace;
  font-size: 0.85em;
  background: rgba(0, 0, 0, 0.05);
  padding: 0.2em 0.4em;
  border-radius: 3px;
}

pre {
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 6px;
  overflow-x: auto;
}

pre code {
  background: none;
  padding: 0;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

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

/* Essay list */
.essay-list {
  list-style: none;
  padding: 0;
}

.essay-list li {
  margin-bottom: 1.25rem;
}

.essay-list a {
  text-decoration: none;
}

.essay-list a:hover {
  text-decoration: underline;
}

.essay-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.essay-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Photos grid */
.photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1rem 0;
}

.photos img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

@media (max-width: 600px) {
  .photos {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Elsewhere links */
.elsewhere {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* Essay page */
.essay-header {
  margin-bottom: 2rem;
}

.essay-date {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.essay-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Prose styling for essay content */
.prose h2 {
  margin-top: 2rem;
}

.prose h3 {
  margin-top: 1.5rem;
}

/* Footer */
footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.koan {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  margin: 0;
}
