.octo-mark,
.header-avatar {
  display: none !important;
}

.github-header {
  border-bottom: 1px solid var(--border);
}

.header-inner {
  width: min(1280px, 100%);
  margin-inline: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.profile-tabs {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 33;
  height: var(--sticky-header-height);
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom: 0;
  justify-content: center;
  pointer-events: none;
  padding-left: max(24px, calc((100% - 1280px) / 2 + 24px));
  padding-right: max(24px, calc((100% - 1280px) / 2 + 24px));
}

.profile-tabs a {
  height: 100%;
  pointer-events: auto;
}

.profile-tabs a:not(:has(span:not(:empty))) {
  display: none;
}

@media (width <= 1040px) {
  .header-inner {
    padding-left: 16px;
    padding-right: 16px;
  }
  .profile-tabs {
    padding-left: max(16px, calc((100% - 1280px) / 2 + 16px));
    padding-right: max(16px, calc((100% - 1280px) / 2 + 16px));
  }
}

@media (width <= 720px) {
  .profile-tabs {
    justify-content: flex-start;
    gap: 0;
    padding-left: 108px;
    padding-right: 100px;
    overflow-x: auto;
  }
  .profile-tabs a {
    gap: 4px;
    padding-left: 6px;
    padding-right: 6px;
  }
  .profile-tabs a:has(span:not(:empty)) .tab-icon {
    display: none;
  }
}

.profile-avatar {
  width: 148px !important;
  border: none !important;
}

.profile-status {
  margin: -46px 0 24px 110px;
}

@media (width <= 1360px) {
  .profile-avatar { width: 128px !important; }
  .profile-status { margin-left: 90px; }
}

@media (width <= 1040px) {
  .profile-avatar { width: 110px !important; }
  .profile-status { margin-left: 72px; }
}

@media (width <= 720px) {
  .profile-avatar { width: 80px !important; }
  .profile-status {
    margin: -42px auto 16px;
    transform: translate(21px);
  }
}

.sidebar-latest,
.sidebar-music {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.profile-card .music-player {
  position: static;
  z-index: auto;
  width: 100%;
  margin-top: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px 10px;
}

.profile-card .music-player-cover {
  width: 40px;
  height: 40px;
}

.profile-card .music-player-controls {
  grid-column: 1 / -1;
}

.profile-card .music-player-progress {
  display: block;
  grid-column: 1 / -1;
  width: 100%;
  height: 4px;
  margin: 0;
}

.profile-card .music-player-lyrics {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-latest ol {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.sidebar-latest li + li {
  border-top: 1px solid var(--border-muted);
}

.sidebar-latest a {
  display: block;
  padding: 8px 0;
  color: inherit;
  text-decoration: none;
}

.sidebar-latest time {
  display: block;
  color: var(--fg-subtle);
  font-size: 12px;
}

.sidebar-latest span {
  display: block;
  color: var(--fg);
  font-size: 14px;
  line-height: 1.4;
}

.sidebar-latest a:hover span {
  color: var(--accent);
}


/* === Unfreeze left sidebar on post pages === */
body:has(.article-content) .profile-card {
  position: static !important;
}

/* === Post TOC in left sidebar (sticky on scroll) === */
.post-toc {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.5;
  position: sticky;
  top: calc(var(--sticky-header-height) + 16px);
  max-height: calc(100vh - var(--sticky-header-height) - 32px);
  overflow-y: auto;
}
.post-toc-title {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  font-weight: 600;
}
.post-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border-muted);
}
.post-toc a {
  display: block;
  padding: 4px 0 4px 12px;
  color: var(--fg-subtle);
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
  border-left: 2px solid transparent;
  margin-left: -1px;
}
.post-toc a:hover {
  color: var(--fg);
}
.post-toc a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
}
.post-toc a.toc-h3 {
  padding-left: 24px;
  font-size: 12px;
}
.profile-meta .profile-resume-icon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-inline: 3px;
  white-space: nowrap;
  height: 24px;
  font-size: 14px;
  color: var(--fg-muted);
  border-radius: 4px;
}

.profile-meta a.profile-resume-icon:is(:hover, :focus-visible) {
  color: var(--accent);
  background: var(--button-hover);
}
#resume-preview {
  width: min(920px, 94vw);
  height: 88vh;
  height: 88dvh;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--canvas);
  color: var(--fg);
}

#resume-preview[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

#resume-preview::backdrop { background: rgb(15 23 42 / 65%); }
html:has(#resume-preview[open]) { overflow: hidden; }
#resume-preview header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
}
#resume-preview button {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: inherit;
  background: var(--button-bg);
  cursor: pointer;
}
#resume-preview iframe { width: 100%; height: 100%; border: 0; }
