@media (max-width: 900px) {
  :root {
    --content-width: 100%;
    --content-wide: 100%;
  }

  .main-content {
    padding: 2rem 1.25rem 3rem;
  }

  #life-canvas {
    filter: blur(3px);
  }

  .nav-inner {
    padding: 0 1.25rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-links a {
    font-size: 0.75rem;
  }

  .post-full .post-title {
    font-size: 1.6rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .archive-entry {
    flex-direction: column;
    gap: 0.15rem;
  }

  .archive-date {
    min-width: auto;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .post-nav-inner {
    flex-direction: column;
    gap: 1rem;
  }

  .post-nav-next {
    text-align: left;
  }
}

@media (max-width: 600px) {
  .main-content {
    padding: 1.25rem 1rem 2rem;
  }

  .nav-inner {
    padding: 0 1rem;
  }

  .nav-links {
    gap: 0.75rem;
  }

  .nav-links a {
    font-size: 0.72rem;
  }

  .post-full .post-title {
    font-size: 1.35rem;
  }

  .post-content {
    font-size: 0.88rem;
    line-height: 1.75;
  }

  .post-content h2 {
    font-size: 1.15rem;
  }

  .post-content h3 {
    font-size: 1rem;
  }

  .post-content pre code {
    padding: 0.75rem;
    font-size: 0.75rem;
  }

  .hero {
    padding: 2rem 0 1.5rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero-desc {
    font-size: 0.85rem;
  }

  .page-404 h1 {
    font-size: 3rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .toc {
    padding: 1rem;
  }

  .copy-code-button {
    opacity: 1;
  }

  .code-block-wrapper::before {
    display: none;
  }

  .post-content table {
    font-size: 0.78rem;
  }

  .post-content th,
  .post-content td {
    padding: 0.375rem 0.5rem;
  }

  .search-input {
    width: 80px;
  }

  .search-input:focus {
    width: 120px;
  }

  .search-results {
    width: 260px;
    right: -40px;
  }
}

@media (max-width: 400px) {
  .nav-links {
    gap: 0.5rem;
  }

  .nav-links a {
    font-size: 0.65rem;
  }

  .post-preview .post-title {
    font-size: 0.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

@media print {
  .site-nav,
  .site-footer,
  .post-nav,
  .related-posts,
  .copy-code-button,
  .toc {
    display: none !important;
  }
  .main-content {
    padding: 0;
    max-width: none;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }
  .post-content {
    color: #000;
  }
  .post-content a {
    color: #000;
    text-decoration: underline;
  }
  .post-content pre,
  .post-content code {
    background: #f5f5f5 !important;
    border: 1px solid #ddd;
    color: #000 !important;
  }
}
