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

:root {
  --text: #1a1a1a;
  --text-light: #666;
  --bg: #fafafa;
  --accent: #0066cc;
  --border: #e0e0e0;
  --max-width: 680px;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

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

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

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

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

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

/* Main content */
main {
  flex: 1;
  padding-bottom: 4rem;
}

/* Post list (index) */
.post-list {
  list-style: none;
}

.post-list li {
  margin-bottom: 2.5rem;
}

.post-list a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.post-list h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text);
}

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

.post-list time {
  font-size: 0.9rem;
  color: var(--text-light);
}

.post-list p {
  margin-top: 0.5rem;
  color: var(--text-light);
  font-size: 1rem;
}

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

.post-header h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

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

.post-content {
  font-size: 1.1rem;
  line-height: 1.75;
}

.post-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
}

.post-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.75rem 0 0.75rem;
}

.post-content p {
  margin-bottom: 1.25rem;
}

.post-content a {
  color: var(--accent);
  text-decoration: underline;
}

.post-content ul,
.post-content ol {
  margin: 1rem 0 1.25rem 1.5rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

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

.post-content code {
  font-family: "SF Mono", Consolas, monospace;
  font-size: 0.9em;
  background: #f0f0f0;
  padding: 0.2em 0.4em;
  border-radius: 3px;
}

.post-content pre {
  background: #2d2d2d;
  color: #f8f8f2;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1.5rem 0;
}

.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.post-footer a {
  color: var(--text-light);
  text-decoration: none;
}

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

/* About page */
.about {
  max-width: 600px;
}

.about .profile-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.5rem;
  border: 3px solid var(--border);
}

.about h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.about p {
  margin-bottom: 1.25rem;
  line-height: 1.75;
}

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

.about a:hover {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.email-display {
  font-family: inherit;
}

.social-links a,
.social-links .email-display {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.95rem;
}

.social-links a:hover {
  color: var(--accent);
}

.site-footer p {
  color: var(--text-light);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  .site-header {
    padding: 1.5rem 0;
    margin-bottom: 2rem;
  }

  .post-header h1 {
    font-size: 1.65rem;
  }

  .post-content {
    font-size: 1rem;
  }
}
