:root {
  --bg: #202122;
  --text: #d1d5db;
  --heading: #f9fafb;
  --muted: #9ca3af;
  --border: #343638;
  --card-border: #2b2d30;
  --card-bg: #2a2c2f;
  --container-width: 1180px;
  --card-radius: 22px;
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
}

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

a:hover {
  opacity: 0.8;
}

img {
  max-width: 100%;
  height: auto;
}

.highlight,
pre {
  background: #000000;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 0.95rem;
  border: 1px solid #000000;
  color: #f3f4f6;
  margin: 1.5rem 0;
}

.highlight code,
pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  display: block;
}

code {
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, Menlo, monospace;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  padding: 0.15rem 0.35rem;
  font-size: 0.9em;
  color: #f4f5f9;
}

blockquote {
  border-left: 4px solid #4b5563;
  padding-left: 1.25rem;
  margin: 1.75rem 0;
  color: #e5e7eb;
  font-style: italic;
}

ul,
ol {
  padding-left: 1.4rem;
}

.page-frame {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(32, 33, 34, 0.92);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  gap: 1rem;
}

.site-title {
  font-weight: 600;
  color: var(--heading);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  gap: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.site-nav a {
  color: inherit;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
}

.site-nav a:hover {
  background: #2f3032;
  color: var(--heading);
}

.site-main {
  flex: 1;
  padding: 4rem 0 5rem;
}

.section-heading {
  margin-bottom: 2.5rem;
}

.section-heading h1 {
  font-size: clamp(2.2rem, 5vw, 3rem);
  color: var(--heading);
  margin: 0;
  font-weight: 650;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.card-link {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65);
}

.card-meta {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.card-title {
  font-size: 1.35rem;
  color: var(--heading);
  margin: 0;
  line-height: 1.35;
  font-weight: 600;
}

.card-excerpt {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-section {
  margin-top: 2.5rem;
}

.list-section h2 {
  margin: 0 0 1.25rem 0;
  font-size: 1.4rem;
  color: var(--heading);
}

.list-group {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.4rem;
  border-bottom: 1px solid var(--border);
  color: var(--heading);
  font-weight: 500;
  background: #252628;
}

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

.list-row:hover {
  background: #2f3033;
}

.list-title {
  margin-right: 1rem;
  color: var(--heading);
}

.list-date {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1.2rem;
}

.back-link:hover {
  color: var(--heading);
}

.article-shell {
  max-width: 780px;
  margin: 0 auto;
}

.post-meta {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}

.post-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--heading);
  margin: 0 0 1.5rem 0;
  font-weight: 650;
}

.post-body {
  font-size: 1.05rem;
  color: var(--text);
}

.post-body p {
  margin: 1.3rem 0;
}

.post-body h2,
.post-body h3,
.post-body h4 {
  margin-top: 2.4rem;
  margin-bottom: 1rem;
  color: var(--heading);
}

strong,
b {
  color: #ffffff;
}

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

@media (max-width: 720px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .list-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
}
