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

:root {
  --bg: #f8f9fc;
  --surface: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #2d2d44;
  --text-muted: #6b7280;
  --accent: #4361ee;
  --accent-hover: #3651d4;
  --accent-soft: rgba(67, 97, 238, 0.08);
  --border: #e5e7eb;
  --border-light: #f0f1f3;
  --inline-code-bg: #eef0f5;
  --inline-code-text: #2d336b;
  --code-bg: #1e1e2e;
  --code-text: #cdd6f4;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --max-width: 720px;
  --logo-brightness: 1;
  --table-hover: #f8f9fc;
  --blockquote-text: #3a3a5c;
  --transition-theme: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}


[data-theme="dark"] {
  --bg: #0d0d1a;
  --surface: #16162a;
  --text: #e2e2f0;
  --text-secondary: #c4c4d8;
  --text-muted: #8888a0;
  --accent: #6b8aff;
  --accent-hover: #89a0ff;
  --accent-soft: rgba(107, 138, 255, 0.12);
  --border: #2a2a44;
  --border-light: #1f1f36;
  --inline-code-bg: #1f1f36;
  --inline-code-text: #c4c4d8;
  --code-bg: #0a0a14;
  --code-text: #cdd6f4;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.3), 0 1px 4px rgba(0,0,0,0.2);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.4);
  --logo-brightness: 1.4;
  --table-hover: #1a1a30;
  --blockquote-text: #b0b0cc;
}

html {
  font-size: 17px;
  background: var(--bg);
  transition: var(--transition-theme);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: var(--transition-theme);
}


.wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

header {
  padding: 24px 0 0;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s ease;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s;
}
.logo:hover { opacity: 0.75; }
.logo img {
  display: block;
  filter: brightness(var(--logo-brightness));
  transition: filter 0.3s ease;
}


.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.05);
}
.theme-toggle:active {
  transform: scale(0.95);
}
.theme-toggle .icon-sun { display: inline; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: inline; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.2s ease;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }


main {
  margin-top: 32px;
}

article {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 40px;
  transition: var(--transition-theme);
}


.post-header { margin-bottom: 28px; }

.post-header h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 8px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.post-meta time { color: var(--text-muted); }

.post-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border);
}


.read-time { color: var(--text-muted); }

.post-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.post-date .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border);
  display: inline-block;
}


.content { margin-bottom: 32px; }

.content h2 {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  letter-spacing: -0.02em;
  color: var(--text);
  padding-bottom: 6px;
  border-bottom: 2px solid var(--border-light);
  transition: border-color 0.3s ease;
}

.content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.5rem 0 0.6rem;
  color: var(--text);
}

.content p { margin-bottom: 1.1rem; color: var(--text-secondary); }

.content a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.content a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent);
}

.content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 1.5rem 0 0.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: var(--transition-theme);
}


.content em:has(+ br) {
  display: block;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-style: italic;
}

.content img + em {
  display: block;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-style: italic;
}

.content blockquote {
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--blockquote-text);
  transition: background 0.3s ease, color 0.3s ease;
}

.content blockquote p:last-child { margin-bottom: 0; }


.content blockquote.pullquote {
  border-left: none;
  text-align: center;
  background: transparent;
  padding: 1.75rem 1rem;
  margin: 2rem 0;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--accent);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  border-radius: 0;
}

.content blockquote.pullquote p { color: inherit; }


.content .callout {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.content .callout-takeaways {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
}

.content .callout-label {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.content .callout ul {
  margin: 0;
  padding-left: 1.25rem;
}

.content .callout li { color: var(--text-secondary); margin-bottom: 0.35rem; }


.content .stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.content .stat-tile {
  background: var(--accent-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  text-align: center;
  transition: var(--transition-theme);
}

.content .stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
  line-height: 1.1;
}

.content .stat-label {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.content code {
  background: var(--inline-code-bg);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: 500;
  font-family: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;
  color: var(--inline-code-text);
  transition: background 0.3s ease, color 0.3s ease;
}

.content pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 1.25rem 0;
  font-size: 0.82rem;
  line-height: 1.65;
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.3);
  position: relative;
}

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

.content ul, .content ol {
  margin: 0.5rem 0 1.25rem 1.5rem;
}

.content li { margin-bottom: 0.35rem; color: var(--text-secondary); }

.content li::marker { color: var(--accent); }

.content hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
  margin: 2.5rem 0;
  transition: background 0.3s ease;
}


.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.9rem;
}

.content th, .content td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s ease;
}

.content th {
  background: var(--accent-soft);
  font-weight: 600;
  color: var(--text);
  transition: background 0.3s ease, color 0.3s ease;
}

.content tr:last-child td { border-bottom: none; }

.content tr:hover td { background: var(--table-hover); }


.post-footer {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  transition: border-color 0.3s ease;
}

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

.post-nav a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  transition: background 0.2s, color 0.2s;
}

.post-nav a:hover {
  background: var(--accent);
  color: #ffffff;
}

.post-nav-spacer { flex: 1; }

.post-nav span {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 8px 16px;
  opacity: 0.5;
}


.recent-posts {
  margin-top: 40px;
  padding-top: 0;
}

.recent-posts h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.recent-posts ul {
  list-style: none;
  padding: 0;
}

.recent-posts li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 4px;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-theme), transform 0.2s;
}

.recent-posts li:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.recent-posts a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.recent-posts a:hover { color: var(--accent); }

.recent-posts time {
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.recent-posts > p {
  margin-top: 16px;
  text-align: center;
}

.recent-posts > p a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s;
  display: inline-block;
}

.recent-posts > p a:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}


.home-featured {
  padding: 0;
  overflow: hidden;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.home-featured-media {
  line-height: 0;
  background: var(--accent-soft);
}

.home-featured-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1000 / 562;
  max-height: 240px;
  object-fit: cover;
}

.home-featured-body { padding: 22px 24px 26px; }

.home-featured h2 {
  font-size: 1.95rem;
  line-height: 1.22;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.home-featured h2 a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.home-featured h2 a:hover { color: var(--accent); }

.home-excerpt {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: 20px;
  margin-bottom: 14px;
  transition: var(--transition-theme), transform 0.2s, box-shadow 0.2s;
}

.home-excerpt:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg, 0 10px 30px rgba(0, 0, 0, 0.08));
}

.home-excerpt.no-media {
  grid-template-columns: minmax(0, 1fr);
  padding: 26px 30px;
}

.home-thumb { line-height: 0; }

.home-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
}

.home-excerpt-body { min-width: 0; }

.home-excerpt h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.home-excerpt h2 a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.home-excerpt h2 a:hover { color: var(--accent); }

.home-excerpt .post-date,
.home-featured .post-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 9px;
}

.home-excerpt-text {
  color: var(--text-secondary);
  line-height: 1.62;
  font-size: 0.94rem;
  margin-bottom: 11px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-featured .home-excerpt-text {
  font-size: 1.02rem;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

.home-read-more a {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
}

.home-read-more a:hover { text-decoration: underline; }

.archive-link {
  margin: 28px 0 40px;
  text-align: center;
  line-height: 2;
}

.archive-link a {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.archive-link a:hover { text-decoration: underline; }

.archive-link .feed-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .home-featured-body { padding: 18px 20px 22px; }
  .home-featured h2 { font-size: 1.4rem; }
  .home-excerpt {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
  }
  .home-thumb img { aspect-ratio: 1 / 1; }
  .home-excerpt h2 { font-size: 1.02rem; margin-bottom: 6px; }
  .home-excerpt .post-date,
  .home-featured .post-date { font-size: 0.72rem; margin-bottom: 7px; }
  
  .home-excerpt .post-date .read-time,
  .home-excerpt .post-date .dot { display: none; }
  .home-excerpt-text { font-size: 0.86rem; -webkit-line-clamp: 2; line-clamp: 2; }
  .home-featured .home-excerpt-text { -webkit-line-clamp: 4; line-clamp: 4; }
  .home-read-more a { font-size: 0.82rem; }
}

@media (min-width: 900px) {
  .home-featured { grid-template-columns: 1.1fr minmax(0, 1fr); }
  .home-featured-media { height: 100%; }
  .home-featured-media img {
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
  }
  .home-featured-body {
    padding: 30px 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .home-featured h2 { font-size: 1.75rem; }
}

@media (min-width: 1100px) {
  .home-excerpt { grid-template-columns: 240px minmax(0, 1fr); }
}


main h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.archive-list {
  list-style: none;
  padding: 0;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition-theme);
}

.archive-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s, border-color 0.3s ease;
}

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

.archive-list li:hover { background: var(--accent-soft); }

.archive-list a {
  flex: 1 1 auto;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.2s;
}

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

.archive-list time {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}


.site-footer {
  margin-top: 48px;
  padding: 24px 0 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border-light);
  transition: border-color 0.3s ease;
}


.comments-section {
  margin-top: 40px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 40px;
  transition: var(--transition-theme);
}

.comments-section > h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
  letter-spacing: -0.02em;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-light);
  transition: border-color 0.3s ease;
}


.comment {
  display: flex;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-light);
  transition: border-color 0.3s ease;
}
.comment:last-of-type { border-bottom: none; }

.comment-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  user-select: none;
  transition: background 0.3s ease, color 0.3s ease;
}

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

.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.comment-author {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.comment-time {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.comment-text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.comment-text p {
  margin-bottom: 0;
}


.comment-form {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
  transition: border-color 0.3s ease;
}

.comment-form h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.comment-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.3s ease, color 0.3s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.comment-form textarea {
  resize: vertical;
  min-height: 90px;
}

.comment-form button {
  padding: 10px 24px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.comment-form button:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.comment-form button:active {
  transform: translateY(0);
}


.review-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 60px 40px;
  text-align: center;
  transition: var(--transition-theme);
}

.review-card .review-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}

.review-card h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
}

.review-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 400px;
  margin: 0 auto 24px;
}

.review-card .review-back {
  display: inline-block;
  padding: 10px 24px;
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.review-card .review-back:hover {
  background: var(--accent-hover);
}


.about-page {
  padding: 48px 40px;
}

.about-header {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-light);
  transition: border-color 0.3s ease;
}

.author-portrait {
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
  transition: box-shadow 0.3s ease;
}

.about-meta h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 4px;
}

.about-location {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.about-bio p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 1.2rem;
}

.about-bio p:last-child {
  margin-bottom: 0;
}

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

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


.about-hero {
  margin: 0 0 30px;
}

.about-hero img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: var(--accent-soft);
}

.about-hero figcaption {
  margin-top: 10px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

.about-lede {
  font-size: 1.25rem !important;
  line-height: 1.5 !important;
  color: var(--text) !important;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.about-bio h2 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 1.9rem 0 0.7rem;
}

.about-bio ul {
  margin: 0 0 1.3rem 1.15rem;
  padding: 0;
}

.about-bio li {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.about-bio li::marker {
  color: var(--accent);
}

@media (max-width: 640px) {
  .comments-section { padding: 24px 20px; }
  .comment { gap: 10px; }
  .comment-avatar { width: 32px; height: 32px; font-size: 0.85rem; }
  .review-card { padding: 40px 20px; }
}


[data-theme="dark"] ::-webkit-scrollbar-track { background: var(--bg); }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }


@media (max-width: 640px) {
  html { font-size: 16px; }
  .wrapper { padding: 0 16px; }
  article { padding: 24px 20px; border-radius: var(--radius-md); }
  .post-header h1 { font-size: 1.6rem; }
  .recent-posts li { flex-direction: column; align-items: flex-start; gap: 4px; }
  .archive-list li { flex-direction: column; align-items: flex-start; gap: 4px; }
  .post-nav a { font-size: 0.85rem; padding: 6px 12px; }

  
  .logo img { width: 140px; height: auto; }
  nav { flex-wrap: wrap; gap: 8px; }
  .nav-links {
    flex-basis: 100%;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 4px;
  }
}


.search-page { max-width: var(--max-width); }
.search-page h1 { font-size: 1.8rem; margin-bottom: 20px; letter-spacing: -0.02em; }
.search-input {
  width: 100%;
  padding: 14px 18px;
  font-size: 1.05rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-theme), border-color 0.2s ease;
  box-sizing: border-box;
}
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-status { color: var(--text-muted); font-size: 0.9rem; margin: 16px 0 8px; }
.search-results { list-style: none; padding: 0; margin: 0; }
.search-result {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-light);
}
.search-result:last-child { border-bottom: none; }
.search-result h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.search-result a { color: var(--accent); text-decoration: none; }
.search-result a:hover h3 { text-decoration: underline; }
.search-meta { color: var(--text-muted); font-size: 0.82rem; margin-bottom: 6px; }
.search-snippet { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.55; margin: 0; }
.search-result mark, .search-snippet mark {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0 2px;
  border-radius: 3px;
}
@media (max-width: 640px) {
  .search-input { font-size: 1rem; padding: 12px 14px; }
}


.related-posts {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-light);
}
.related-posts h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.related-posts ul { list-style: none; padding: 0; margin: 0; }
.related-posts li { padding: 12px 0; border-bottom: 1px solid var(--border-light); }
.related-posts li:last-child { border-bottom: none; }
.related-posts a {
  display: block;
  color: var(--accent);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
}
.related-posts a:hover { text-decoration: underline; }
.related-meta { display: block; color: var(--text-muted); font-size: 0.82rem; margin-top: 3px; font-weight: 400; }


.not-found { max-width: 560px; text-align: center; padding: 64px 0; }
.not-found h1 {
  font-size: 6rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.04em;
  margin: 0;
  line-height: 1;
}
.not-found-sub { font-size: 1.4rem; font-weight: 600; margin: 8px 0 16px; color: var(--text); }
.not-found p { color: var(--text-secondary); line-height: 1.6; }
.not-found-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.not-found-actions .btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease;
}
.not-found-actions .btn:hover { background: var(--accent-hover); }

.content figure.hero {
  margin: 0 0 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--accent-soft);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  line-height: 0; 
}
.content figure.hero img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}
@media (max-width: 600px) {
  .content figure.hero { border-radius: 0; margin-left: -1rem; margin-right: -1rem; }
}



@media (min-width: 900px) {
  html { font-size: 18px; }

  .wrapper {
    max-width: 1180px;
    padding: 0 40px;
  }

  header { padding-top: 34px; }
  nav { padding-bottom: 22px; }
  .nav-links { gap: 1.75rem; }
  .nav-links a { font-size: 0.95rem; }

  
  main > article:not(.home-featured):not(.home-excerpt):not(.about-page),
  main > .comments-section {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
  }
  main > article.about-page {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }
  main > h1,
  main > .archive-list,
  main > .search-page {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }

  
  main > article:not(.home-featured):not(.home-excerpt),
  main > .comments-section {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }
  main > .comments-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
  }

  
  main > .recent-posts {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }
  .recent-posts ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 36px;
  }
  
  .recent-posts li {
    padding: 16px 0;
    margin-bottom: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid var(--border-light);
  }
  .recent-posts li:hover { transform: none; }

  .post-header h1 { font-size: 2.45rem; line-height: 1.18; }
  .content p { line-height: 1.85; }
  .content h2 { font-size: 1.6rem; }
  .content h3 { font-size: 1.25rem; }

  .site-footer { padding: 28px 0 40px; }
}

@media (min-width: 1200px) {
  
  .content figure.hero { margin-left: -70px; margin-right: -70px; }
  .content figure.hero img { border-radius: var(--radius-md); }
}

@media (min-width: 1400px) {
  .wrapper { max-width: 1280px; padding: 0 48px; }
  main > article:not(.home-featured):not(.home-excerpt):not(.about-page),
  main > .comments-section { max-width: 800px; }
  main > article.about-page { max-width: 960px; }
  main > h1,
  main > .archive-list,
  main > .search-page,
  main > .recent-posts { max-width: 960px; }
}


main > article > h2 { margin-bottom: 6px; }
main > article > h2 a {
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
main > article > h2 a:hover { color: var(--accent); }


.topic-page { max-width: 780px; }
.topic-lede { color: var(--text-muted); margin: 0 0 6px; }
.topic-count { font-size: 0.9rem; color: var(--text-muted); margin: 0 0 26px; }
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.topic-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 0 0 16px;
  background: var(--surface);
}
.topic-grid .topic-card { margin: 0; }
.topic-card h2 { font-size: 1.05rem; margin: 0 0 6px; line-height: 1.3; }
.topic-card h2 a { color: var(--text); text-decoration: none; }
.topic-card h2 a:hover { color: var(--accent); }
.topic-card .post-date { font-size: 0.85rem; color: var(--text-muted); }
.topic-card .home-excerpt-text { margin: 8px 0 0; font-size: 0.92rem; color: var(--text-secondary); }
.topic-archive { margin-top: 22px; }
.post-topics { margin-top: 28px; }
.post-topics .topic-links { margin: 0; }
