/* ai.sparking Style CSS */
:root {
  --bg-color: #f4f5f7;
  --header-bg: #1b1d1f;
  --header-text: #ffffff;
  --card-bg: #ffffff;
  --text-main: #2b2b2b;
  --text-muted: #6e7781;
  --link-color: #0066cc;
  --link-hover: #004499;
  --border-color: #e1e4e8;
  --accent-color: #1e73be;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.7;
  font-size: 15px;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* Site Header */
.site-header {
  background-color: var(--header-bg);
  color: var(--header-text);
  padding: 1rem 0;
  border-bottom: 3px solid var(--accent-color);
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.site-title {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.site-title a {
  color: #ffffff;
}

.site-title a:hover {
  text-decoration: none;
  opacity: 0.9;
}

.site-navigation ul {
  display: flex;
  list-style: none;
  gap: 20px;
}

.site-navigation a {
  color: #d0d7de;
  font-size: 0.95rem;
  font-weight: 500;
}

.site-navigation a:hover {
  color: #ffffff;
  text-decoration: none;
}

/* Sub Header Banner */
.sub-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
  margin-bottom: 30px;
}

.sub-header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Main Layout */
.site-main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px 40px 20px;
  display: flex;
  gap: 30px;
}

.content-area {
  flex: 1;
  min-width: 0;
}

.sidebar-area {
  width: 300px;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .site-main {
    flex-direction: column;
  }

  .sidebar-area {
    width: 100%;
  }
}

/* Breadcrumb */
.breadcrumb {
  margin-bottom: 18px;
  font-size: 0.85rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--text-muted);
}

.breadcrumb li+li::before {
  content: "/";
  padding: 0 8px;
  color: #a0a0a0;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--link-color);
}

.breadcrumb [aria-current="page"] {
  color: #333333;
  font-weight: 500;
}

/* Article Card / Post */
.post-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Left Thumbnail Flex Layout */
.post-card.has-thumbnail {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.post-card-thumbnail {
  width: 240px;
  height: 155px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background-color: #0d1117;
}

.post-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  margin: 0;
  display: block;
}

.post-card-thumbnail a:hover img {
  transform: scale(1.05);
}

.post-card-body {
  flex: 1;
  min-width: 0;
}

@media (max-width: 640px) {
  .post-card.has-thumbnail {
    flex-direction: column;
  }

  .post-card-thumbnail {
    width: 100%;
    height: 190px;
  }
}

.entry-header {
  margin-bottom: 12px;
}

.entry-meta-cat {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.entry-meta-cat a {
  background-color: #f1f5f9;
  color: var(--accent-color);
  padding: 2px 8px;
  border-radius: 3px;
  display: inline-block;
  margin-right: 6px;
}

.entry-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
}

.entry-title a {
  color: #1f2328;
}

.entry-title a:hover {
  color: var(--link-color);
}

.entry-meta-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.subtitle-text {
  font-size: 1.05rem;
  color: #57606a;
  font-weight: 500;
  margin-top: 4px;
  margin-bottom: 16px;
}

.entry-content {
  color: #333333;
  line-height: 1.7;
  word-break: break-word;
}

.entry-content p {
  margin-bottom: 1rem;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  color: #1f2328;
  margin: 1.8rem 0 1rem 0;
  padding-bottom: 6px;
}

.entry-content h1 {
  font-size: 1.5rem;
  border-bottom: 2px solid var(--accent-color);
}

.entry-content h2 {
  font-size: 1.3rem;
  border-bottom: 2px solid var(--accent-color);
}

.entry-content h3 {
  font-size: 1.15rem;
  border-left: 4px solid var(--accent-color);
  padding-left: 10px;
}

/* Inline Code & Code Block */
.entry-content :not(pre)>code {
  background-color: #f3f4f6;
  color: #c7254e;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.88em;
  border: 1px solid #e5e7eb;
}

.highlight {
  margin-bottom: 1.2rem;
  border-radius: 6px;
  overflow: hidden;
  background-color: #0d1117 !important;
}

.entry-content pre,
.chroma {
  background-color: #0d1117 !important;
  color: #e6edf3 !important;
  padding: 16px;
  border-radius: 6px;
  overflow-x: auto;
  font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
  line-height: 1.5;
  margin: 0;
}

.entry-content pre code {
  background-color: transparent !important;
  color: inherit !important;
  padding: 0;
  border: none;
}

/* Code block line table */
.chroma .lntable {
  width: 100%;
  border-collapse: collapse;
}

.chroma .lntd {
  padding: 0;
  margin: 0;
  border: 0;
}

.chroma .lntd:first-child {
  width: 30px;
  user-select: none;
}

.chroma .lnt {
  color: #6e7681 !important;
  padding-right: 12px;
}

/* Markdown Tables */
.entry-content table:not(.lntable) {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.2rem;
  font-size: 0.92rem;
}

.entry-content table:not(.lntable) th,
.entry-content table:not(.lntable) td {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
}

.entry-content table:not(.lntable) th {
  background-color: #f6f8fa;
  font-weight: 600;
}

.entry-content table:not(.lntable) tr:nth-child(even) {
  background-color: #fcfcfc;
}

/* Images & Media */
.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 12px 0;
  display: block;
}

.entry-content ul,
.entry-content ol {
  margin-bottom: 1.2rem;
  padding-left: 24px;
}

.entry-content blockquote {
  border-left: 4px solid #d0d7de;
  color: #57606a;
  padding: 4px 16px;
  margin-bottom: 1.2rem;
  background-color: #f6f8fa;
  border-radius: 0 4px 4px 0;
}

/* Pagination */
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 30px;
  margin-bottom: 20px;
}

.pagination a,
.pagination span {
  padding: 8px 14px;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-main);
  font-size: 0.9rem;
}

.pagination .current {
  background-color: var(--accent-color);
  color: #ffffff;
  border-color: var(--accent-color);
}

/* Sidebar Widgets */
.widget {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.widget-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f2328;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e1e4e8;
}

.widget ul {
  list-style: none;
}

.widget li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 0.9rem;
}

.widget li:last-child {
  border-bottom: none;
}

.widget li a {
  color: #24292f;
}

.widget li a:hover {
  color: var(--link-color);
}

.post-date-sm {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
}

/* Site Footer */
.site-footer {
  background-color: var(--header-bg);
  color: #8c959f;
  text-align: center;
  padding: 24px 0;
  font-size: 0.85rem;
  border-top: 1px solid #30363d;
}

.site-footer a {
  color: #d0d7de;
}