/* eInk-inspired theme for Jekyll blog */

:root {
  --bg-color: #fafaf8;
  --text-color: #1a1a1a;
  --secondary-text: #4a4a4a;
  --border-color: #d0d0d0;
  --link-color: #2a2a2a;
  --code-bg: #f0f0f0;
  --max-width: 720px;
}

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

body {
  font-family: 'Georgia', 'Palatino', 'Palatino Linotype', 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-color);
  background-color: var(--bg-color);
  padding: 2rem 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

h1 {
  font-size: 2.2rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.8rem;
  margin-top: 2.5rem;
}

h3 {
  font-size: 1.4rem;
}

p {
  margin-bottom: 1.5rem;
  text-align: justify;
  hyphens: auto;
}

/* Links */
a {
  color: var(--link-color);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.7;
}

/* Header */
.site-header {
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
}

.site-title {
  font-size: 1.8rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-color);
  display: inline-block;
}

.site-nav {
  margin-top: 1rem;
  font-size: 0.95rem;
}

.site-nav a {
  margin-right: 1.5rem;
  text-decoration: none;
  color: var(--secondary-text);
}

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

/* Posts */
.post-list {
  list-style: none;
  margin: 2rem 0;
}

.post-list-item {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.post-list-item:last-child {
  border-bottom: none;
}

.post-meta {
  font-size: 0.9rem;
  color: var(--secondary-text);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.post-link {
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-color);
  display: block;
  margin-bottom: 0.5rem;
}

.post-link:hover {
  opacity: 0.7;
}

.post-excerpt {
  color: var(--secondary-text);
  margin-top: 0.5rem;
}

/* Post content */
.post-header {
  margin-bottom: 2rem;
}

.post-title {
  margin-bottom: 0.5rem;
}

.post-content {
  margin-top: 2rem;
}

/* Code */
code {
  font-family: 'Courier New', 'Courier', monospace;
  font-size: 0.9em;
  background-color: var(--code-bg);
  padding: 0.2em 0.4em;
  border-radius: 3px;
}

pre {
  background-color: var(--code-bg);
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

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

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

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

li {
  margin-bottom: 0.5rem;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2rem 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

th, td {
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  text-align: left;
}

th {
  background-color: var(--code-bg);
  font-weight: 600;
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--secondary-text);
  text-align: center;
}

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

/* Responsive */
@media (max-width: 768px) {
  body {
    font-size: 16px;
    padding: 1rem 0.75rem;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  p {
    text-align: left;
  }
}
