.md-footer-meta {
  display: none;
}

.md-header__button.md-logo {
  display: none;
}

.md-header__title {
  margin-left: 0;
}

.md-header__title {
  font-size: 1.3rem;
  overflow: visible;
  margin-right: 0;
  padding-bottom: 0;
  line-height: 1.2;
  position: relative;
  display: inline;
  white-space: nowrap;
}

.md-header__inner {
  padding-top: 0x;
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1800px;
  margin: 0 auto;
  width: 100%;
  padding-left: 16px;
  padding-right: 16px;
}

.md-tabs {
  max-width: none;
  margin: 0;
  width: 100%;
}

.md-tabs__inner {
  max-width: 1800px;
  margin: 0 auto;
  width: 100%;
  padding-left: 16px;
  padding-right: 16px;
}

.md-search {
  padding-top: 1.4rem;
  position: absolute;
  right: 16px;
}

@media (max-width: 1219px) {
  .md-search {
    position: relative;
    right: 0;
    margin-right: 0;
  }
}

.md-header__topic:first-child {
  font-weight: 600;
  padding-top: 1.4rem;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  margin-right: auto;
  position: relative;
}

.md-header__topic:first-child::after {
  content: "tinkering kook";
  display: inline;
  font-size: 0.65rem;
  color: #aaa;
  padding: 0;
  pointer-events: none;
  line-height: 1.2;
  vertical-align: baseline;
  font-weight: 400;
  white-space: nowrap;
}

.md-header__option {
  padding-top: 1.4rem;
}

.md-search {
  padding-top: 1.4rem;
}

.md-header__button[for="__search"] {
  padding-top: 1.4rem;
}

.md-grid {
  max-width: 1800px;
  margin: 0 auto;
}

.md-main__inner {
  gap: 32px;
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
  padding-left: 16px;
  padding-right: 16px;
}

.md-content {
  max-width: 100%;
  flex: 1 1 auto;
}

.md-sidebar {
  flex-shrink: 0;
}

.md-sidebar--primary {
  width: 16rem;
  margin-left: 0;
}

.md-sidebar--secondary {
  width: 16rem;
  margin-right: 0;
}

.custom-sidebar {
  font-size: 1.35em;
  line-height: 1.6;
  background: #1f1f1f;
  border-radius: 8px;
  padding: 18px;
  color: #e0e0e0;
}

.custom-sidebar h3 {
  margin: 0 0 16px;
  font-size: 1.1rem;
  border-bottom: 1px solid #333;
  padding-bottom: 10px;
}

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

.custom-recent-posts li {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #333;
}

.custom-recent-posts li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.custom-recent-posts a {
  color: #e0e0e0;
  text-decoration: none;
  font-weight: 500;
  display: block;
}

.custom-recent-posts a:hover {
  color: #5dade2;
}

.custom-recent-posts small {
  display: block;
  color: #999;
  margin-top: 4px;
}

.custom-about {
  text-align: center;
}

.custom-about img {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 40%;
  border: 4px solid #5dade2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  margin-top: 8px;
  margin-bottom: 14px;
}

.custom-about p {
  margin: 0 0 10px;
  text-align: left;
}

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

@media (max-width: 1219px) {
  .md-sidebar--secondary {
    display: none;
  }
}

/* Keep header topic always visible (not replaced by page title) */
.md-header__topic:first-child {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.md-header__topic:not(:first-child) {
  display: none !important;
}

@media (max-width: 960px) {
  .md-sidebar--primary {
    display: none;
  }
  
  /* Keep site name visible in mobile header instead of page title */
  .md-header__topic:first-child {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  /* Hide hamburger menu button - all possible selectors */
  .md-header__button.md-icon,
  .md-header__button--menu,
  .md-header__button[for="__drawer"],
  .md-header__button[aria-label="Open navigation drawer"],
  label.md-header__button {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }
  
  /* Ensure title has left padding when hamburger is removed */
  .md-header__title {
    margin-left: 12px !important;
  }
  
  /* Hide navigation drawer completely */
  .md-nav__drawer {
    display: none !important;
  }
  
  .md-overlay {
    display: none !important;
  }
  
  /* Show tabs navigation horizontally under header */
  .md-tabs {
    display: block !important;
    visibility: visible !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    position: relative;
  }
  
  /* Add fade effect on right edge to indicate scrollability */
  .md-tabs::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to right, transparent, rgba(33, 150, 243, 0.5));
    pointer-events: none;
  }
  
  .md-tabs__list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    visibility: visible !important;
    margin: 0;
    padding: 0 12px;
    gap: 2px;
  }
  
  .md-tabs__item {
    display: inline-block !important;
    flex-shrink: 0 !important;
    visibility: visible !important;
    margin: 0;
  }
  
  .md-tabs__link {
    display: block !important;
    visibility: visible !important;
    padding: 8px 14px;
    white-space: nowrap;
    font-size: 0.85rem;
    margin: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .md-tabs__item:last-child .md-tabs__link {
    border-right: none;
  }
}

/* Bits page styling */
.bits-entry {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #333;
}

.bits-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.bits-date {
  font-size: 0.85rem;
  color: #999;
  font-weight: 500;
  margin-bottom: 8px;
}

.bits-content {
  color: #e0e0e0;
  line-height: 1.6;
  margin: 0;
}

/* Resize images in content to not take up entire page */
.md-content img {
  max-width: 600px;
  width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
}
