/* Minimalistic Blog Theme - Inspired by TeXify3 */

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

/* Typography */
body {
  font-family: 'JetBrains Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Content */
.content {
  margin-bottom: 60px;
}

.content-title {
  font-size: 24px;
  color: #333;
  margin-bottom: 30px;
  font-weight: 600;
}

/* Post List */
.post-list {
  list-style: none;
}

.post-item {
  margin-bottom: 20px;
  padding: 0;
  border: none;
  background: none;
}

.post-item h3 {
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
}

.post-link {
  text-decoration: none;
  color: #0066cc;
  transition: color 0.2s ease;
}

.post-link:hover {
  color: #004499;
  text-decoration: underline;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}

.post-meta time {
  font-style: normal;
}

/* Tags */
.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  color: #666;
  text-decoration: none;
  font-size: 12px;
  font-weight: 400;
  transition: color 0.2s ease;
  background: none;
  border: none;
  padding: 0;
}

.tag:hover {
  color: #0066cc;
  text-decoration: underline;
}

.tag::before {
  content: "#";
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 0;
  border-top: 1px solid #eee;
  margin-top: 40px;
}

.page-link {
  text-decoration: none;
  color: #0066cc;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.page-link:hover {
  color: #004499;
  text-decoration: underline;
}

.page-current {
  color: #666;
  font-size: 14px;
}

/* Individual Post */
.post {
  margin: 0 0 60px;
  padding: 0 20px;
}

.post-site-nav {
  padding: 20px 0 15px;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.nav-title {
  flex: 1;
}

.post-site-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.post-site-title a {
  text-decoration: none;
  color: #666;
  transition: color 0.2s ease;
}

.post-site-title a:hover {
  color: #0066cc;
}

.post-site-tagline {
  font-size: 13px;
  color: #888;
  font-weight: 400;
  margin: 0;
}

.nav-search {
  flex-shrink: 0;
}

.header-search-form {
  display: flex;
  gap: 4px;
  align-items: center;
}

.header-search-input {
  width: 200px;
  padding: 8px 12px;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
  font-size: 13px;
  background: #fff;
  transition: border-color 0.2s ease, width 0.2s ease;
}

.header-search-input:focus {
  outline: none;
  border-color: #0066cc;
  width: 240px;
}

.header-search-button {
  padding: 8px 12px;
  background: #f8f9fa;
  color: #666;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-search-button:hover {
  background: #e9ecef;
  border-color: #0066cc;
}

.search-icon {
  font-size: 14px;
  line-height: 1;
}

.rss-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  margin-left: 8px;
  background: #f8f9fa;
  color: #666;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 14px;
  line-height: 1;
}

.rss-link:hover {
  background: #e9ecef;
  border-color: #0066cc;
  color: #0066cc;
}

.post-header {
  margin: 40px 0 50px;
  padding: 0;
  border-bottom: 1px solid #eee;
  padding-bottom: 30px;
}

.post-title {
  font-size: 32px;
  font-weight: 700;
  color: #333;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.post .post-meta {
  justify-content: flex-start;
  font-size: 14px;
  color: #666;
}

.post-content {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 50px;
  text-align: justify;
  text-justify: inter-word;
}

.post-content h1,
.post-content h2,
.post-content h3 {
  color: #333;
  margin: 32px 0 16px;
  font-weight: 600;
  line-height: 1.3;
}

.post-content h1 { font-size: 28px; }
.post-content h2 { font-size: 24px; }
.post-content h3 { font-size: 20px; }

.post-content p {
  margin-bottom: 16px;
}

.post-content blockquote {
  border-left: 3px solid #eee;
  padding-left: 20px;
  margin: 24px 0;
  color: #666;
  font-style: italic;
}

.post-content pre {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 20px;
  overflow-x: auto;
  margin: 24px 0;
  font-family: 'JetBrains Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
  font-size: 14px;
  line-height: 1.5;
}

.post-content code {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 3px;
  padding: 2px 4px;
  font-family: 'JetBrains Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
  font-size: 14px;
}

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

/* Override Prism.js styling to match our theme */
pre[class*="language-"] {
  background: #f8f9fa !important;
  border: 1px solid #e9ecef !important;
  border-radius: 6px !important;
  margin: 24px 0 !important;
  padding: 20px !important;
  font-family: 'JetBrains Mono', 'Monaco', 'Menlo', 'Consolas', monospace !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

code[class*="language-"] {
  font-family: 'JetBrains Mono', 'Monaco', 'Menlo', 'Consolas', monospace !important;
  font-size: 14px !important;
}

.post-content ul,
.post-content ol {
  margin: 16px 0;
  padding-left: 24px;
}

.post-content li {
  margin-bottom: 4px;
}

.post-content img {
  max-width: 100%;
  height: auto;
  margin: 24px 0;
  border-radius: 4px;
  border: 1px solid #e9ecef;
  display: block;
}

.post-footer {
  padding-top: 30px;
  border-top: 1px solid #eee;
}

.back-link {
  text-decoration: none;
  color: #0066cc;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: #004499;
  text-decoration: underline;
}

/* Footer */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid #eee;
  color: #666;
  font-size: 14px;
  text-align: center;
}

/* Empty State */
.empty-state {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 40px 0;
}

/* 404 Error Page */
.error-page {
  text-align: center;
  padding: 60px 20px;
  max-width: 500px;
  margin: 0 auto;
}

.error-title {
  font-size: 32px;
  font-weight: 700;
  color: #333;
  margin-bottom: 16px;
}

.error-message {
  font-size: 16px;
  color: #666;
  margin-bottom: 40px;
}

.search-section {
  margin-bottom: 40px;
}

.search-prompt {
  font-size: 16px;
  color: #333;
  margin-bottom: 20px;
}

.search-form {
  width: 100%;
}

.search-input-group {
  display: flex;
  gap: 8px;
  max-width: 400px;
  margin: 0 auto;
}

.search-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: #0066cc;
}

.search-button {
  padding: 12px 24px;
  background: #0066cc;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-button:hover {
  background: #004499;
}

.back-section {
  padding-top: 20px;
  border-top: 1px solid #eee;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    font-size: 15px;
    padding: 0 16px;
  }
  
  .post {
    margin: 0 0 40px;
    padding: 0 10px;
  }
  
  .post-site-nav {
    padding: 15px 0 10px;
    margin-bottom: 15px;
  }
  
  .nav-content {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .nav-title {
    text-align: center;
  }
  
  .post-site-title {
    font-size: 18px;
  }
  
  .post-site-tagline {
    font-size: 12px;
  }
  
  .nav-search {
    align-self: center;
  }
  
  .header-search-input {
    width: 180px;
    font-size: 12px;
  }
  
  .header-search-input:focus {
    width: 200px;
  }
  
  .header-search-button {
    padding: 8px 10px;
  }
  
  .rss-link {
    padding: 8px 10px;
    margin-left: 4px;
  }
  
  .post-header {
    margin: 30px 0 40px;
    padding: 0;
    padding-bottom: 20px;
  }
  
  .post-title {
    font-size: 28px;
  }
  
  .post-item h3 {
    font-size: 15px;
  }
  
  .post-meta {
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    font-size: 12px;
  }
  
  .post .post-meta {
    align-items: flex-start;
    flex-direction: column;
  }
  
  .pagination {
    flex-direction: column;
    gap: 16px;
  }
  
  .post-content pre {
    padding: 16px;
    font-size: 13px;
  }
  
  .post-content code {
    font-size: 13px;
  }
  
  pre[class*="language-"] {
    padding: 16px !important;
    font-size: 13px !important;
  }
  
  .error-page {
    padding: 40px 16px;
  }
  
  .error-title {
    font-size: 28px;
  }
  
  .search-input-group {
    flex-direction: column;
    gap: 12px;
  }
  
  .search-input,
  .search-button {
    width: 100%;
  }
}