:root {
  --paper: #ffffff;
  --paper-lines: #cccccc;
  --ink: #000000;
  --ink-light: #444444;
  --accent: #000000;
  --accent-light: #666666;
  --margin-red: #999999;
  --highlight: #e0e0e0;
  --link: #000000;
  --font-handwriting: 'Caveat', cursive;
  --font-body: 'Patrick Hand', cursive;
}

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

body {
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.8;
  min-height: 100vh;
  position: relative;
}

/* Background removed */
}

/* Header */
.site-header {
  padding: 2rem 2rem 0.5rem;
  margin-bottom: 1rem;
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-title {
  font-family: var(--font-handwriting);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-title:hover {
  color: var(--ink);
}

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

.site-nav a {
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
  position: relative;
}

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

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.site-nav a:hover::after {
  width: 100%;
}

#header-line, #footer-line, #post-divider {
  display: block;
  width: 100%;
  max-width: 720px;
  margin: 0.5rem auto;
}

/* Main content */
.content {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem 2rem 4rem;
}

/* Home hero */
.hero {
  position: relative;
  padding: 2.5rem 2rem;
  margin-bottom: 2.5rem;
}

.hero-border {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-family: var(--font-handwriting);
  font-size: 3rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1.3rem;
  color: var(--ink-light);
}

/* Section title */
.section-title {
  font-family: var(--font-handwriting);
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--accent);
}

/* Post cards */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-card {
  position: relative;
  padding: 1.5rem;
  background: transparent;
}

.card-border {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.card-content {
  position: relative;
  z-index: 1;
}

.post-card h2 {
  font-family: var(--font-handwriting);
  font-size: 1.6rem;
  margin-bottom: 0.25rem;
}

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

.post-card h2 a:hover {
  color: var(--accent);
}

.post-card time {
  font-size: 0.95rem;
  color: var(--ink-light);
}

.post-summary {
  margin-top: 0.5rem;
  color: var(--ink-light);
}

/* Single post */
.post-container {
  position: relative;
  padding: 2rem;
}

.page-border {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.page-content {
  position: relative;
  z-index: 1;
}

.post-header h1 {
  font-family: var(--font-handwriting);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  color: var(--ink-light);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.post-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  font-size: 0.9rem;
  color: var(--accent);
  position: relative;
}

.post-body {
  margin-top: 1.5rem;
}

.post-body h2,
.post-body h3,
.post-body h4 {
  font-family: var(--font-handwriting);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.post-body h2 { font-size: 1.8rem; }
.post-body h3 { font-size: 1.5rem; }

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

.post-body a {
  color: var(--link);
  text-decoration: none;
  background-image: linear-gradient(var(--accent-light), var(--accent-light));
  background-size: 100% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
}

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

.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--ink-light);
}

.post-body code {
  font-family: 'Courier New', monospace;
  background: var(--highlight);
  padding: 0.1em 0.3em;
  border-radius: 2px;
  font-size: 0.95em;
}

.post-body pre {
  background: #2c2c2c;
  color: #f0f0f0;
  padding: 1.2rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  border-radius: 0;
  position: relative;
}

.post-body pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.post-body img {
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
}

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

.post-body li {
  margin-bottom: 0.3rem;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 1rem 2rem 2rem;
  color: var(--ink-light);
  font-size: 0.95rem;
}

/* Page title (list pages) */
.page-title {
  font-family: var(--font-handwriting);
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  color: var(--accent);
}

/* Responsive */
@media (max-width: 600px) {
  body::after {
    left: 30px;
  }

  .site-title {
    font-size: 2rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .content {
    padding: 1rem 1rem 3rem;
  }

  .post-container {
    padding: 1rem;
  }
}
