@media screen and (max-width: 768px) {
  header {
    margin: 0;
    padding: 1.5rem 1rem;
    border-radius: 0; /* No border radius on mobile for full edge-to-edge */
    width: 100%;
  }

  .header-content {
    padding: 0 1rem; /* Less padding on mobile */
  }

  header h1 {
    font-size: 1.8rem;
    letter-spacing: 1px;
  }

  main {
    margin: 0.5rem;
    padding: 1rem;
    margin-bottom: 120px;
  }

  .blog-header {
    flex-direction: column;
    text-align: center;
  }

  nav a {
    display: block;
    margin: 0.25rem 0;
    padding: 0.5rem;
  }

  .header-social {
    position: static; /* Remove absolute positioning */
    margin-top: 1rem;
    justify-content: center;
    bottom: auto;
    right: auto;
  }

  .header-social .social-btn {
    padding: 6px 8px;
    font-size: 0.9rem;
  }

  .header-social .social-btn svg {
    width: 18px;
    height: 18px;
  }

  /* Image fixes */
  .post-content img {
    max-width: 100% !important;
    height: auto !important;
    width: auto !important;
    margin: 0.5rem auto;
    display: block;
    box-sizing: border-box;
  }

  .post-content {
    overflow-x: hidden;
    word-wrap: break-word;
  }

  .post-content * {
    max-width: 100%;
    box-sizing: border-box;
  }
}

@media screen and (max-width: 480px) {
  header h1 {
    font-size: 1.5rem;
  }

  .blog-title {
    font-size: 1rem;
  }

  .header-content {
    padding: 0 0.5rem;
  }

  .header-social {
    gap: 6px;
  }

  /* For very small screens */
  .post-content img {
    max-width: calc(100% - 1rem) !important;
    margin: 0.5rem auto;
  }

  main {
    max-width: calc(100vw - 1rem);
    margin-bottom: 140px;
  }
}
