body {
  padding-top: 32px !important;
}
/* List accent for /challs and /blog */
.list-feed.list-accent {
  border-left: 2px solid var(--color-border-light);
  margin-bottom: 0.7em;
  padding-left: 1em;
  background: none;
  transition: border-color 0.2s;
}
.list-feed.list-accent:hover {
  border-color: var(--color-border);
}
/* Blog cards grid (1x3) for home */
.home-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2em;
  width: 100%;
}
.home-card {
  width: 100%;
}
@media (max-width: 900px) {
  .home-grid {
    gap: 0.8rem;
  }
}
.see-all-btn-row {
  display: flex;
  justify-content: center;
  margin-top: 1em;
  gap: 1em;
}
.see-all-btn-row .button {
  color: var(--color-text-link);
}
.home-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-main);
  border-radius: 0.5em;
  box-shadow: 0 2px 10px 0 rgba(0,0,0,0.06);
  padding: 0.8em 1em 0.7em 1em;
  transition: box-shadow 0.2s, border 0.2s;
  border: 1px solid var(--color-border-light);
  min-height: 110px;
  text-decoration: none;
  color: inherit;
  position: relative;
  justify-content: space-between;
}
.home-card:hover {
  box-shadow: 0 4px 18px 0 rgba(0,0,0,0.11);
  border-color: var(--color-border);
}
.home-card-header {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.2em;
  min-height: 2.2em;
  gap: 12px;
}
.htb-avatar {
  width: 55px;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 1;
  flex-grow: 0;
}
.home-title {
  font-size: 1.08em;
  font-weight: 600;
  display: flex;
  align-items: flex-start;
  gap: 0.2em;
  flex-wrap: wrap;
  flex-grow: 1;
}
.home-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 0.5em;
  font-size: 0.97em;
  width: 100%;
}
.home-category {
  color: var(--color-text-hint);
  font-size: 0.97em;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-ctf,
.home-platform,
.home-date {
  font-size: 0.97em;
  color: var(--color-text-hint);
  font-weight: 500;
}
.home-date {
  text-align: right;
}
@media (max-width: 900px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
}

/* Home page write-ups grid */
.writeups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 2em;
}

/* Platform/CTF highlight colors (theme-aware) */
.home-accent-hackthebox,
.list-feed.list-accent.home-accent-hackthebox {
  border-left: 2px solid var(--color-text-link);
}
.home-accent-tryhackme,
.list-feed.list-accent.home-accent-tryhackme {
  border-left: 2px solid #4bb6a7;
}
.home-accent-epitech,
.list-feed.list-accent.home-accent-epitech {
  border-left: 2px solid #7a88b6;
}
.home-accent-ctf,
.list-feed.list-accent.home-accent-ctf {
  border-left: 2px solid #e09a7c;
}
@media (max-width: 900px) {
  .writeups-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.8rem;
  }
}
@media (max-width: 600px) {
  .writeups-grid {
    grid-template-columns: 1fr;
  }
}
.navbar-inner-maxwidth {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
}

.navbar-flex-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 64px;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 0 !important;
}

.name-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
}
.navbar-inner-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.navbar-content-wrapper {
  margin: 0 auto;
  max-width: 100vw;
}
.navbar-links {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  gap: 1.5rem;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  box-shadow: none;
  background: none;
}

.theme-toggle-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#theme-toggle-img,
#theme-toggle-img--mobile {
  width: 1.1rem;
  height: 1.1rem;
  margin: auto;
  display: block;
  filter: none !important;
  opacity: 1 !important;
}

/* Absolute, frosted navbar wrapper */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  z-index: 1000;
}



/* Frosted effect background for navbar */
.site-navbar {
  position: relative;
  background: transparent;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: none !important;
  z-index: 1000;
}

/* Themed translucent backgrounds for better contrast in light/dark */

/* Remove default navbar box-shadows if any */
.navbar.site-navbar {
  box-shadow: none;
  border-bottom: none !important; /* belt and suspenders */
}

/* Optional: tighter vertical padding for compact look */
.navbar.site-navbar .navbar-item {
  align-items: center;
}

/* Remove underline on navbar links */
.navbar.site-navbar a.navbar-item,
.navbar.site-navbar a.navbar-item:hover,
.navbar.site-navbar a.navbar-item:focus,
.navbar.site-navbar .navbar-brand a.navbar-item {
  text-decoration: none;
  border-bottom: none;
}

/* Theme toggle icon sizing and centering */
#theme-toggle-img,
#theme-toggle-img--mobile {
  width: 1rem;
  height: 1rem;
  display: block;
}

.navbar.site-navbar .button.is-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 2.2rem;
  height: 2.2rem;
  line-height: 1;
  border: none;
  box-shadow: none;
}

.navbar.site-navbar .icon.is-small {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Center the brand icon within its item */
.navbar.site-navbar .navbar-brand .navbar-item.name-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%; /* On mobile the --text-* variables were computed incorrectly*/
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body > section {
  flex: 1;
}

.button {
  padding: 1rem !important;
}

.buttons .button {
  margin-bottom: 0;
}

.navbar .name-logo img {
  margin-top: 1px;
}


/* Make navbar items fit text and align with flex, not forced height */
.navbar.site-navbar .navbar-item {
  height: auto;
  min-height: 2.2rem;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Theme toggle button sizing remains compact */
.navbar.site-navbar .button.is-text {
  width: 2.2rem;
  height: 2.2rem;
  min-width: unset;
  min-height: unset;
}

code.language-plaintext {
  font-size: smaller;
  background-color: var(--color-border-light);
  padding: 0 2px;
}

.highlight pre, pre {
  border-radius: 4px;
  background-color: #272822;
  padding: 0;
  margin-top: 0;
}

.footer-back {
  display: block;
  padding-top: 2rem;
  margin-top: 2rem;
}

#copyright {
  border-top: 1px solid var(--color-border-light);
  padding-top: 2rem;
  padding-bottom: 2rem;
  margin-bottom: 0;
  margin-top: 2rem;
}

#copyright a {
  background-image: none;
  padding-right: 0;
}

/* p {
  text-align: justify;
} */

img {
  max-height: 80vh;
  margin: 0 auto;
}

p > img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.twitter-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}

.back-link {
  display: none;
}

table {
  display: block;
  overflow-x: auto;
}

tbody * > * {
  white-space: nowrap;
}

pre > code > span,
code > span,
pre > span {
  font-size: var(--size-s);
}

p > p,
p > code,
p > a,
blockquote > p,
blockquote > a,
blockquote > code,
li > code,
li > a {
  display: inline-block;
  /* white-space: pre-wrap; */
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  text-align: left !important;
}

.highlight code {
  line-height: 1.3;
}

.navbar-brand {
  z-index: 10000;
}

.navbar-menu {
  position: absolute;
  width: 100%;
  background-color:  var(--color-bg-main);
  border-bottom: solid 1px var(--color-border);
  z-index: 1000;
}

.navbar-brand .buttons:last-child {
  margin-bottom: 0;
}

/* /challs/ page styles */
.my-challenges {
  width: 100%;
  overflow-x: auto;
  display: block;
}

.my-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-grow: 1;
}

.my-row .my-title {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
}

.my-row .my-category {
  flex-grow: 1;
  flex-shrink: 0;
  font-size: var(--text-xs);
  color: var(--color-text-hint);
  text-align: right;
  white-space: nowrap;
  font-style: italic;
}

.my-row .my-date {
  max-width: 6rem;
  white-space: nowrap;
  text-align: left;
}



/* Breadcrumb styles */
.breadcrumb {
  display: flex;
  overflow-x: auto;
  list-style: none;
  padding: 8px 8px var(--padding-normal);
  margin-top: 0.5rem;
  margin-block-end: 0;
}

.breadcrumb-item {
  font-size: var(--text-s);
  color: var(--color-text-sub);
  padding-right: 8px;
  display: block;
  white-space: nowrap;
  padding-bottom: 0;
}

.breadcrumb-item a {
  color: inherit;
  text-decoration: none;
}

.breadcrumb-item::after {
  content: '/';
  padding-left: 8px;
  color: var(--color-text-hint);
}

.breadcrumb-item:last-child::after {
  content: none;
}

.breadcrumb-item:last-child {
  color: var(--color-text-main);
  font-weight: var(--text-weight-bold);
  padding-right: 0;
}

.breadcrumb::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

/* Table of elements styles */
.right-column {
  position: fixed;
  top: 64px;
  bottom: 0;
  max-width: 20vw;
  width: 30vw;
  pointer-events: none;
}
#table-of-contents-wrapper {
  font-size: 0.8em;
  position: sticky;
  top: 2.5rem;
  right: 0;
  min-width: 220px;
  max-height: calc(100vh - 3.5em);
  min-height: 120px;
  overflow-y: auto;
  pointer-events: auto;
  padding: 0.7em 0.7em 0.7em 0.7em;
  margin: 18px 10px 18px 0;
  background-color: var(--color-bg-main);
  border-radius: 5px;
  box-shadow: 0 0 20px 1px rgba(0,0,0,0.07);
  transform: translateX(0%);
  opacity: 1;
  transition: transform 0.2s ease-in-out, opacity 0.2s ease;
  z-index: 100;
}
#table-of-contents-wrapper.toc-hidden {
  transform: translateX(92%);
  min-height: 59px;
  border: 1px solid #121418;
  border-radius: 5px;
}
.table-of-contents-nav {
  margin-right: 0;
  transform: rotate(0deg);
}
#table-of-contents-wrapper.toc-hidden .table-of-contents-nav {
  transform: rotate(180deg);
  margin-right: calc(100% - 1.6rem - 2rem);
}
.table-of-contents {
  margin: 0;
  padding: 0.2em 0.2em 0.2em 0.2em;
  font-size: 0.98em;
  font-family: inherit;
}
.table-of-contents li {
  list-style: none;
  margin-bottom: 0.2em;
  padding-left: 0.1em;
}
.toc-h2 { margin-left: 0.1em; font-weight: 600; }
.toc-h3 { margin-left: 1.2em; font-weight: 400; }
.toc-h4 { margin-left: 2.1em; font-weight: 400; }
.table-of-contents a {
  color: var(--color-text-sub);
  text-decoration: none;
  border-radius: 3px;
  padding: 2px 6px;
  transition: background 0.2s, color 0.2s;
}
.table-of-contents a:hover {
  color: var(--color-text-link);
  background: var(--color-border-light);
  text-decoration: underline;
}
.table-of-contents li.active a {
  font-weight: 700;
  color: var(--color-text-link);
  background: var(--color-border-light);
}
html[data-theme="light"] .table-of-contents a:hover,
html[data-theme="light"] .table-of-contents li.active a {
  background: #e0e0e0;
}
.table-of-contents-nav {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 1.6rem;
  height: 1.6rem;
}
.table-of-contents-nav > button {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: var(--color-bg-main);
  border-style: unset;
  border: solid 1px var(--color-bg-main);
  padding: 0.2rem;
  margin: 0;
  color: var(--color-text-sub);
  cursor: pointer;
  z-index: 10;
}
.table-of-contents-nav > button > svg {
  width: 1.2rem;
  height: 1.2rem;
  transform: rotate(-90deg);
}



/* Tags styles */
.tags {
  padding-bottom: var(--padding-normal);
}

.tag a {
  color: var(--color-text-main);
}

.tag.primary-tag a {
  font-weight: bolder;

}
.tag.category a {
  font-weight: bolder;
}


/* time */
.date-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: var(--text-xs);
  margin-left: 0.1rem;
  /* padding-bottom: var(--padding-normal); */
}
.date-info .date-item {
  display: inline-block;
  margin-right: 0.5rem;
  color: var(--color-text-sub);
}


/* Mobile */
@media screen and (max-width: 768px) {
  blockquote {
    padding: 0;
    margin-right: calc(2rem + 5px);
    padding-left: 1rem;
    margin-left: 1rem;
  }

  .right-column {
    max-width: 80vw;
    width: 80vw;
    right: 0px;
  }
  #table-of-contents-wrapper.toc-hidden {
    opacity: 0.1;
    transition: opacity 5s ease;
  }

  /* /challs/ page styles */
  .my-row .my-category,
  .my-row .my-ctf {
    display:none;
  }

  .my-row .my-title {
    flex-grow: 1;
    flex-shrink: 0;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 125px;
  }
}

/* Tablet */
@media screen and (min-width: 769px) {
  blockquote {
    /* padding-left: 2rem; */
    margin-left: 1.5rem !important;
  }

  /* Breadcrumb styles */
  .breadcrumb {
    margin-bottom: 0;
  }

  .right-column {
    right: 72px;
  }
}

/* Desktop+ */
@media screen and (min-width: 1026px) {
  .right-column {
    max-width: 22.5vw;
    width: 30vw;
    right: 14px;
  }
}

/* @media screen and (max-width:320px) */
