/* Custom enhancements for hugo-xmin theme */

/* Improved code blocks */
pre {
  background: #272822;
  color: #f8f8f2;
  padding: 1.5em;
  overflow-x: auto;
  border-radius: 4px;
  line-height: 1.5;
  margin: 1.5em 0;
}

code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Courier New', monospace;
  font-size: 0.9em;
}

/* Inline code */
p code, li code {
  background: #f4f4f4;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  color: #c7254e;
}

/* Post meta styling */
.post-meta {
  color: #666;
  font-size: 0.9em;
  margin: 1em 0;
  padding-bottom: 1em;
  border-bottom: 1px solid #eee;
}

.post-date, .reading-time {
  margin-right: 1em;
}

.post-tags, .post-categories {
  margin-top: 0.5em;
}

.post-tags a, .post-categories a {
  margin-right: 0.5em;
  color: #0366d6;
  text-decoration: none;
}

.post-tags a:hover, .post-categories a:hover {
  text-decoration: underline;
}

/* Post list styling */
.post-list {
  list-style: none;
  padding: 0;
}

.post-item {
  margin: 2em 0;
  padding-bottom: 2em;
  border-bottom: 1px solid #eee;
}

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

.post-item h2, .post-item h3 {
  margin: 0 0 0.5em 0;
}

.post-item h2 a, .post-item h3 a {
  color: #333;
  text-decoration: none;
}

.post-item h2 a:hover, .post-item h3 a:hover {
  color: #0366d6;
}

.post-summary-meta {
  color: #666;
  font-size: 0.9em;
  margin: 0.5em 0;
}

.post-summary {
  color: #555;
  line-height: 1.6;
}

.post-list-tags {
  margin-top: 0.5em;
}

.post-list-tags .tag {
  color: #0366d6;
  margin-right: 0.5em;
  font-size: 0.9em;
}

/* Article description */
.article-description {
  font-size: 1.1em;
  color: #555;
  margin: 1.5em 0;
  padding: 1em;
  background: #f9f9f9;
  border-left: 3px solid #0366d6;
}

/* Table of contents */
.toc {
  background: #f9f9f9;
  padding: 1em 1.5em;
  margin: 1.5em 0;
  border-radius: 4px;
  border: 1px solid #e1e4e8;
}

.toc summary {
  cursor: pointer;
  font-weight: bold;
  margin-bottom: 0.5em;
}

.toc summary:hover {
  color: #0366d6;
}

.toc ul {
  margin-top: 0.5em;
}

/* Post navigation */
.post-nav {
  margin-top: 3em;
  padding-top: 1.5em;
  display: flex;
  justify-content: space-between;
}

.nav-prev, .nav-next {
  max-width: 45%;
}

.nav-next {
  text-align: right;
}

/* Home page intro */
.home-intro {
  margin-bottom: 3em;
}

.home-intro .lead {
  font-size: 1.2em;
  color: #555;
  line-height: 1.6;
}

/* Page header */
.page-header {
  margin-bottom: 2em;
}

.page-header h1 {
  margin-bottom: 0.5em;
}

.page-header p {
  color: #666;
  font-size: 1.1em;
}

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5em 0;
  font-size: 0.9em;
}

th, td {
  border: 1px solid #ddd;
  padding: 0.75em;
  text-align: left;
}

th {
  background-color: #f6f8fa;
  font-weight: bold;
}

tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* Blockquotes */
blockquote {
  margin: 1.5em 0;
  padding: 0.5em 1em;
  color: #666;
  border-left: 4px solid #ddd;
  background: #f9f9f9;
}

blockquote p {
  margin: 0;
}

/* Improved link styling */
a {
  color: #0366d6;
  transition: color 0.2s;
}

a:hover {
  color: #0256b9;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
  pre {
    padding: 1em;
    font-size: 0.85em;
  }

  .post-nav {
    flex-direction: column;
  }

  .nav-prev, .nav-next {
    max-width: 100%;
    text-align: left;
    margin-bottom: 1em;
  }

  table {
    font-size: 0.8em;
  }

  th, td {
    padding: 0.5em;
  }
}

/* Syntax highlighting improvements */
.highlight {
  margin: 1.5em 0;
}

.chroma {
  background-color: #272822 !important;
}

.chroma .lnt,
.chroma .ln {
  color: #7f7f7f;
  margin-right: 0.5em;
  padding-right: 0.5em;
}

/* Focus on readability */
body {
  line-height: 1.7;
}

main {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1em;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

p {
  margin: 1em 0;
}

/* Print styles */
@media print {
  nav, .post-nav, .post-tags, .post-categories {
    display: none;
  }

  pre {
    border: 1px solid #ccc;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}
