html {
  background-color: #f6f8fa;
  /* Slight grey outside */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  margin: 0.5rem auto;
  padding: 0;
  max-width: 48rem;
  background-color: #ffffff;
  border: 1px solid #d0d7de;
  box-shadow: 0 8px 24px rgba(149, 157, 165, 0.1);
  box-sizing: border-box;
  min-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  text-align: justify;
}

/* Main content padding */
.wrapper,
.blog-post-container,
.cont,
main {
  padding: 0.5rem 1.5rem;
  flex: 1;
}

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

li {
  padding-left: 0.25rem;
  margin-bottom: 0.5rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 1.25em 0 0.5em 0;
  line-height: 1.2;
}

a:link {
  color: rgb(14, 13, 14);
}

a:visited {
  color: rgb(78, 78, 157);
}

a:focus,
a:hover {
  color: rgb(40, 100, 204);
}

a:active {
  color: #e00;
}

h1 a:empty:before,
h2 a:empty:before,
h3 a:empty:before,
h4 a:empty:before,
h5 a:empty:before,
h6 a:empty:before {
  content: "#";
}

h1 a:empty,
h2 a:empty,
h3 a:empty,
h4 a:empty,
h5 a:empty,
h6 a:empty {
  visibility: hidden;
  padding-left: 0.25em;
}

h1:hover a:empty,
h2:hover a:empty,
h3:hover a:empty,
h4:hover a:empty,
h5:hover a:empty,
h6:hover a:empty {
  visibility: visible;
}

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

figure {
  margin: 1em 0;
  text-align: center;
}

figcaption {
  font-size: small;
}

pre,
code,
samp,
kbd {
  font-family: monospace, monospace;
}

pre,
code,
kbd {
  color: #050;
}

samp {
  color: #730;
}

pre,
blockquote {
  background: #eee;
  padding: 0.5em;
}

pre {
  overflow: auto;
}

blockquote {
  border-left: medium solid #ccc;
  margin: 1em 0;
}

blockquote :first-child {
  margin-top: 0;
}

blockquote :last-child {
  margin-bottom: 0;
}

table {
  border-collapse: collapse;
}

th,
td {
  padding: 0.3em 0.4em;
  text-align: left;
}

:where(html) {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.thumbnail {
  width: 60px;
  height: 60px;
  background-color: #f5f5f5;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #666;
}

.menu {
  max-width: 800px;
  font-family: Arial, sans-serif;
}

.menu-item {
  display: grid;
  grid-template-columns: 120px auto 200px;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #ddd;
  align-items: center;
}

.link a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  max-width: 100%;
}

/* Navbar */
.navbar-container {
  background-color: #fff;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #d0d7de;
  flex-wrap: wrap;
}

.navbar-title a {
  color: #222;
  font-size: 20px;
  text-decoration: none;
  font-weight: 500;
}

.navbar-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.navbar-menu li {
  margin: 0;
  padding-left: 0;
}

.navbar-menu a {
  color: #444;
  text-decoration: none;
  font-size: 16px;
  font-weight: 400;
  transition: color 0.3s;
}

.navbar-menu a:hover {
  color: #007bff;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-favicon {
  width: 20px;
  height: 20px;
}

/* Responsive Navbar */
@media (max-width: 768px) {
  body {
    margin: 0;
    max-width: 100%;
    border: none;
    box-shadow: none;
    min-height: 100vh;
  }

  .navbar-container,
  .footer-container,
  .wrapper,
  .blog-post-container,
  .cont {
    padding: 1rem 1.25rem;
  }

  .navbar-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .navbar-menu {
    flex-direction: column;
    width: 100%;
    gap: 10px;
    margin-top: 10px;
  }

  .navbar-menu li {
    width: 100%;
  }

  .navbar-menu a {
    display: block;
    width: 100%;
  }
}

/* Footer */
.footer-container {
  background-color: #fff;
  padding: 1.5rem 2rem;
  font-size: 14px;
  color: #6e7781;
  border-top: 1px solid #d0d7de;
  font-family: 'Inter', sans-serif;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  box-sizing: border-box;
}

.footer-container a {
  color: #007bff;
  text-decoration: none;
  font-weight: 400;
}

.footer-container a:hover {
  text-decoration: underline;
}

/* Blog Post Content */
.blog-post-content {
  line-height: 1.7;
}

.blog-post-content p {
  margin: 1em 0;
  line-height: 1.7;
}

.blog-post-content ul,
.blog-post-content ol {
  margin: 1em 0;
  line-height: 1.7;
}

.blog-post-content li {
  margin-bottom: 0.5rem;
}

/* Blog Post List */
.blog-post-list {
  list-style: none;
  padding: 0;
  max-width: 40.625em;
  margin: 0 auto;
}

.blog-post-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem;
  padding-left: 0.25rem;
  margin-bottom: 0.25rem;
  align-items: center;
  flex-wrap: nowrap;
}

.blog-post-title {
  flex: 1 1 auto;
  min-width: 0;
  /* allows text truncation or wrapping */
}

.blog-post-date {
  color: rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
  margin-left: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* .separator {
  opacity: 0.5;
} */

.blog-post-title a:hover {
  color: #007bff;
}

/* Table Styles */
.table-wrapper {
  overflow-x: auto;
  padding: 16px;
  max-width: 100%;
  box-sizing: border-box;
}

.table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: auto;
  word-break: break-word;
}

.table-wrapper thead th {
  background-color: #f9f9f9;
  text-align: left;
  padding: 12px;
  font-weight: 500;
  text-transform: uppercase;
  color: #666;
  border-bottom: none;
}

.table-wrapper tbody td {
  border-bottom: none;
  color: #333;
  white-space: normal;
  word-break: break-word;
}

.table-wrapper tbody tr:hover {
  background-color: #f5f5f5;
}

.table-action-btn {
  color: #007bff;
  background: none;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s;
}

.table-action-btn:hover {
  color: #0056b3;
}

.rss-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

/* Tags link in blog page */
.blog-tags-link {
  margin-bottom: 1.5rem;
}

/* All tags list (main tags page) */
.all-tags-list {
  line-height: 1.8;
}

/* Individual tag list (posts in a tag) */
.individual-tag-list {
  line-height: 1.8;
}