/* Font overrides — Josefin Sans for headings/UI, Fira Sans for body */
article {
  font-family: 'Fira Sans', sans-serif;
  font-size: 17px;
  line-height: 1.8;
}

article h1, article h2, article h3, article h4 {
  margin-top: 2em;
  margin-bottom: 0.5em;
}

h1, h2, h3, h4, h5, h6, .copyright {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 600;
}

.intro-header .post-heading .subheading {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 400;
}

.intro-header .site-heading .subheading,
.intro-header .page-heading .subheading {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 400;
}

.intro-header .post-heading .meta {
  font-family: 'Josefin Sans', sans-serif;
}

.post-preview > .post-meta {
  font-family: 'Josefin Sans', sans-serif;
}

/* Navbar */
.navbar-custom {
  font-family: 'Josefin Sans', sans-serif;
}

.navbar-custom .nav-link {
  font-size: 25px;
}

/* Selection color */
::-moz-selection { background: #306951; }
::selection { background: #306951; }

/* Link colors */
.post-preview > a:hover,
.post-preview > a:focus,
a:hover, a:focus {
  color: #306951;
}

article a, p a { color: #306951; }
article a:hover, p a:hover { color: #306951; }

/* Pager color override */
.pager li > a:focus,
.pager li > a:hover {
  background-color: #306951;
  border: 1px solid #306951;
}

/* Social icon hover colors */
.twitter:hover { color: #00aced; }
.rss:hover { color: #ee802f; }
.mail:hover { color: #1ccc81; }
.github:hover { color: #601bc6; }
.linkedin:hover { color: #0077b5; }

/* Images */
.image, img + em, .text-center { text-align: center; }
.image {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.full-width { width: 100%; }

img + em {
  display: block;
  font-style: italic;
  font-size: 15px;
  padding-bottom: 15px;
}

/* Table of contents — inline box appearance */
#markdown-toc {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1.5em 2em;
  display: inline-block;
  font-size: 15px;
  line-height: 2;
}
#markdown-toc::before {
  content: "Contents";
  display: block;
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.8em;
  padding-bottom: 0.6em;
  border-bottom: 2px solid #306951;
  color: #306951;
}

/* Section headings — subtle green accent */
article h3 {
  color: #306951;
}

article h3::after {
  content: '';
  display: block;
  width: 36px;
  height: 2px;
  background: rgba(48, 105, 81, 0.35);
  margin-top: 0.35em;
  border-radius: 1px;
}

/* Timeline */
.timeline-list {
  list-style: none;
  padding-left: 28px;
  margin-left: 6px;
  border-left: 2px solid rgba(48, 105, 81, 0.2);
}

.timeline-list li {
  position: relative;
  padding-bottom: 1.4em;
  line-height: 1.75;
  font-size: 0.95em;
}

.timeline-list li:last-child { padding-bottom: 0; }

.timeline-list li strong {
  display: inline-block;
  min-width: 10em;
}

.timeline-list li::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #306951;
  box-shadow: 0 0 0 3px rgba(48, 105, 81, 0.1);
}

/* CVEs */
.cve-list {
  list-style: none;
  padding: 0;
}

.cve-list li a {
  display: inline-block;
  min-width: 15ch;
  font-family: ui-monospace, 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.9em;
}

.cve-list li {
  position: relative;
  padding: 11px 16px 11px 18px;
  margin-bottom: 8px;
  border-left: 3px solid rgba(48, 105, 81, 0.3);
  border-radius: 0 6px 6px 0;
  background: rgba(48, 105, 81, 0.025);
  font-size: 0.93em;
  line-height: 1.65;
  transition: background 0.2s, border-left-color 0.2s;
}

.cve-list li a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.cve-list li:last-child { margin-bottom: 0; }

.cve-list li:hover {
  background: rgba(48, 105, 81, 0.06);
  border-left-color: #306951;
}

/* Projects */
.project-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 0.4em;
}

.project-list li {
  position: relative;
  padding: 18px 20px;
  border: 1.5px solid rgba(48, 105, 81, 0.18);
  border-radius: 10px;
  background: rgba(48, 105, 81, 0.015);
  font-size: 0.91em;
  line-height: 1.7;
  transition: border-color 0.22s, box-shadow 0.22s, transform 0.22s;
}

.project-list li a {
  font-weight: 600;
}

.project-list li a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.project-list li:hover {
  border-color: rgba(48, 105, 81, 0.45);
  box-shadow: 0 4px 18px rgba(48, 105, 81, 0.1);
  transform: translateY(-2px);
}

/* Hall of Fame */
.hof-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-transform: uppercase;
  letter-spacing: 5px;
  font-size: 1em;
  color: #306951;
  margin-top: 3.5em;
  margin-bottom: 0.6em;
}

.hof-title::before,
.hof-title::after {
  content: '';
  flex: 1;
  max-width: 90px;
  height: 1px;
  width: auto;
  margin-top: 0;
  border-radius: 0;
  background: linear-gradient(to right, transparent, rgba(48, 105, 81, 0.45));
}

.hof-title::after {
  background: linear-gradient(to left, transparent, rgba(48, 105, 81, 0.45));
}

.hof-subtitle {
  text-align: center;
  color: #aaa;
  font-size: 0.86em;
  letter-spacing: 0.2px;
  margin-top: 0;
  margin-bottom: 2.4em;
}

.hof-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
  gap: 14px;
}

.hof-list li { margin: 0; }

.hof-list li a {
  display: inline-block;
  padding: 10px 26px;
  background: transparent;
  border: 1.5px solid rgba(48, 105, 81, 0.4);
  border-radius: 50px;
  color: #306951 !important;
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 600;
  font-size: 0.8em;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(48, 105, 81, 0.07);
  transition: background 0.22s ease, border-color 0.22s ease,
              color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.hof-list li a:hover {
  background: #306951;
  border-color: #306951;
  color: #fff !important;
  box-shadow: 0 6px 22px rgba(48, 105, 81, 0.2);
  transform: translateY(-2px);
}

/* Mobile: stack date/ID above description */
@media (max-width: 768px) {
  .timeline-list li strong,
  .cve-list li a {
    display: block;
    min-width: auto;
  }
}

/* Footer */
.footer-nav li { padding: 10px; }

/* TOC Sidebar */
.toc-sidebar {
  position: fixed;
  left: 0;
  width: 400px;
  overflow-y: auto;
  background: #f8f9fa;
  border-right: 1px solid #e9ecef;
  padding: 1.5em 2em;
  z-index: 900;
  font-family: 'Fira Sans', sans-serif;
  font-size: 15px;
  line-height: 2;
  display: none;
}
.toc-sidebar.open { display: block; }

.toc-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8em;
  padding-bottom: 0.6em;
  border-bottom: 2px solid #306951;
}
.toc-sidebar-title {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #306951;
}
.toc-sidebar-close {
  background: none;
  border: none;
  color: #306951;
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  opacity: 0.6;
  font-size: 20px;
  transition: opacity 0.2s;
}
.toc-sidebar-close:hover { opacity: 1; }

/* Shared TOC list styles (inline + sidebar) */
#markdown-toc,
#sidebar-toc {
  list-style: none;
  counter-reset: toc;
}
#markdown-toc li,
#sidebar-toc li { padding: 0; }
#markdown-toc > li,
#sidebar-toc > li { counter-increment: toc; }
#markdown-toc > li::before,
#sidebar-toc > li::before {
  content: counter(toc, decimal-leading-zero);
  color: #306951;
  font-weight: 600;
  font-size: 13px;
  margin-right: 8px;
  opacity: 0.7;
}
#markdown-toc ul,
#sidebar-toc ul {
  list-style: none;
  padding-left: 1.2em;
  margin-top: 0;
  counter-reset: toc-sub;
}
#markdown-toc ul > li,
#sidebar-toc ul > li { counter-increment: toc-sub; }
#markdown-toc ul > li::before,
#sidebar-toc ul > li::before {
  content: counter(toc-sub, lower-alpha);
  color: #306951;
  font-weight: 600;
  font-size: 13px;
  margin-right: 8px;
  opacity: 0.5;
}
#markdown-toc a,
#sidebar-toc a {
  color: #555;
  text-decoration: none;
  transition: color 0.2s;
}
#markdown-toc a:hover,
#sidebar-toc a:hover { color: #306951; }

/* Sidebar-only: active highlight */
#sidebar-toc a.toc-active {
  color: #306951;
  font-weight: 600;
}

/* Sidebar TOC overrides (strip inline-block box) */
#sidebar-toc {
  display: block;
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
}
#sidebar-toc::before { display: none; }

/* Inline pin button — positioned top-right of #markdown-toc */
#markdown-toc {
  position: relative;
}
.toc-inline-toggle {
  position: absolute;
  top: 1.5em;
  right: 1.5em;
  background: none;
  border: none;
  color: #306951;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.toc-inline-toggle:hover { opacity: 1; }

/* Shift content when sidebar is open */
body.toc-sidebar-open article {
  margin-left: 400px;
  transition: margin-left 0.3s ease;
}

/* Header always above sidebar */
.intro-header {
  position: relative;
  z-index: 950;
}

/* Navbar above everything */
.navbar-custom {
  z-index: 1100;
}

/* Disable TOC sidebar on mobile */
@media (max-width: 991px) {
  .toc-sidebar { display: none !important; }
  .toc-inline-toggle { display: none; }
  body.toc-sidebar-open article { margin-left: 0; }
}
