/* =============================================================
   blog.css — Blog listing + post page styles
   Markdown-rendered content (#post-article, .blog-post-body),
   code blocks & inline code, footnote tooltips, prev/next
   post navigation, scroll progress bar, intro section.
   Loaded via blog/index.njk and blog-post.njk.
   ============================================================= */

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: #ff0000;
    z-index: 9999;
}



h1{
    padding-top: 1rem;
    padding-bottom: 2rem;
}

/* ── Blog post category pill ── */
.blog-post-category {
    display: inline-block;
    background: hsl(0, 0%, 93%);
    color: #000000;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.25em 0.8em;
    border-radius: 100px;
    text-transform: capitalize;
    letter-spacing: 0.02em;
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
}

/* Tighten heading→category gap */
.blog-post-header h1 {
    padding-bottom: 0.25rem;
}

h2{
    padding: 2rem 0rem;
}

h3{
    padding: 1rem 0rem;
}

p{
    padding-bottom: 1rem;
    letter-spacing: .03em;
}

/* Utility class for hiding elements */
.hidden {
    display: none !important;
}

body ul li a{
    color: #000000;
    font-weight:normal ;
}



ul:not(.nav-links) {
    list-style-type: "// ";
    padding-left: 2rem;
}


/* intro */
.intro{
    margin-top: 10rem;
    margin-bottom: 2rem;
    font-size: x-large;
}



/* list styling */
.f2023{
    font-size: large;
}
a.f2023{
    position: relative;
    color: #000000;
}



li.nobullet{
    list-style: none;  
    margin-left: -2rem;
}

/* BLOG SUPPORT */
.blog-ref a {
    display: inline-block;
    vertical-align: middle;
    color: #000000;
    text-decoration: none;
  }


.blog-ref img {
    display: inline-block;
    vertical-align: middle;
  }
.blog-ref p.log-sub {
    display: inline-block;
    vertical-align: -2rem;
    margin-left: -6rem;
  }
.blog-img{
    max-width: 100%;
    padding-top: 2rem;
    padding-bottom: 2rem;
}
.footnotes{
    padding-top: 0rem;
    font-size: var(--font-size-sm);
}

/* Footnote hover tooltip - container */
#post-article .footnote-item {
    position: relative;
    display: inline;
}

/* Footnote reference links */
.blog-post-body sup[id^="fnref"] a,
#post-article sup[id^="fnref"] a {
    position: relative;
    display: inline-block;
    background: none;
    text-decoration: none;
    font-family: inherit;
    color: #000000;
    font-size: 1.25rem;
    cursor: help;
    padding: 0 0.2em;
}



.blog-post-body sup[id^="fnref"] a:hover,
#post-article sup[id^="fnref"] a:hover {
    color: #000000;
}



/* Footnote tooltip content */
.blog-post-body sup[id^="fnref"] a::after,
#post-article sup[id^="fnref"] a::after {
    content: attr(data-footnote);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #ffffff;
    color: #000000;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 1.3rem;
    white-space: normal;
    width: max-content;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    font-family: inherit;
    line-height: 1.4;
    pointer-events: none;
}



/* Show tooltip on hover */
.blog-post-body sup[id^="fnref"] a:hover::after,
#post-article sup[id^="fnref"] a:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ── Footnote section ── */
.blog-post-body .footnotes,
#post-article .footnotes {
    margin-top: 0;
    padding-top: 1.5rem;
    border-top: 1px solid hsl(0, 0%, 85%);
}

/* Override global .footnotes margin-left */
.blog-post-body .footnotes,
#post-article .footnotes {
    margin-left: 0;
    margin-bottom: 0;
}



.blog-post-body .footnotes ol,
#post-article .footnotes ol {
    padding-left: 1.5rem;
    margin: 0;
}

.blog-post-body .footnotes li,
#post-article .footnotes li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    font-size: 1.5rem;
    color: #000000;
}



.blog-post-body .footnotes li p,
#post-article .footnotes li p {
    margin: 0;
    display: inline;
}

/* Footnote back reference */
.blog-post-body .footnote-backref,
#post-article .footnote-backref {
    text-decoration: none;
    color: #000000;
    font-size: 0.85em;
    margin-left: 0.5em;
    opacity: 0.7;
}



.blog-post-body .footnote-backref:hover,
#post-article .footnote-backref:hover {
    opacity: 1;
}

/* ── Footnote target highlight (smooth scroll + fade) ── */
:target.footnote-item,
:target.footnote-ref {
    animation: fn-highlight 1.8s ease forwards;
    border-radius: 3px;
}
@keyframes fn-highlight {
    0%   { background: hsl(55, 100%, 85%); }
    60%  { background: hsl(55, 100%, 85%); }
    100% { background: transparent; }
}
.posts {
    padding-bottom: 0rem;
}

body p a{
    text-decoration: underline;
    color: #000000;
    }



a#fnref1,a#fnref2,a#fnref3,a#fnref4,a#fnref5{
    background: none;
    text-decoration: none;
    font-family: inherit;
    color: #000000;
}


/* filters */
.super{
    vertical-align: 1rem;
    font-size: small;
    margin-left: 2rem;
    color: #000000;
}



.sub-web{
    vertical-align: -1rem;
    font-size: small;
    margin-left: -6rem;
    background-color: hsl(135, 100%, 95%);
    color: #000000;
    padding: 0.25rem;
}



.sub-gen{
    vertical-align: -1rem;
    font-size: small;
    margin-left: -6rem;
    background-color: hsl(44, 100%, 95%);
    color: #000000;
    padding: 0.25rem;
}



.second{
    margin-left: 0.5rem;
}

.filter-button{
    font-family: inherit;
    border: none;
    background-color: hsl(239, 80%, 90%);
    color: #000000;
    padding: 0.25rem 1rem;
}



.selected{
    background-color: hsl(239, 100%, 65%);
    color: #000000;
    box-shadow: inset 0rem 0rem 0rem 0.15rem  black;
}



.filter{
    padding-bottom: 2rem;
}

/* code */
pre code {
	color: #000000;
	tab-size: 4;
}

code {
	font-family: "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace;
	font-size: 1em;
	line-height: 1.357em;
}



pre {
	background-color: hsl(0, 0%, 79%);
    color: #000000;
    padding: 2rem;
    overflow: auto;
    margin: 2rem 0rem;
    white-space: pre-wrap;
}



/* ========== MARKDOWN CONTENT STYLING ========== */

/* Post article container */
.blog-post-article,
#post-article {
    max-width: 100%;
    padding: 2rem 0;
    opacity: 1;
}

#post-article.fade-out {
    opacity: 0;
    transform: translateY(20px);
}

#post-article.fade-in {
    opacity: 0;
    transform: translateY(20px);
}

.blog-post-article h1,
.blog-post-body h1,
#post-article h1 {
    margin-bottom: 1rem;
    color: #000000;
}



.blog-post-body h2,
#post-article h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #000000;
    background: none;
}



.blog-post-body h3,
#post-article h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #000000;
}



.blog-post-body p,
#post-article p {
    margin-bottom: 1.5rem;
    line-height: inherit;
    color: #000000;
}



.blog-post-body li,
#post-article li {
    color: #000000;
}



.blog-post-body code,
#post-article code {
    background: rgba(0,0,0,0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
    color: #000000;
}



.blog-post-body pre,
#post-article pre {
    background: rgba(0,0,0,0.05);
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    color: #000000;
}



.blog-post-body pre code,
#post-article pre code {
    background: none;
    padding: 0;
}

.blog-post-body strong,
#post-article strong {
    font-weight: 700;
    color: #000000;
}



.blog-post-body em,
#post-article em {
    font-style: italic;
}

.blog-post-body img,
#post-article img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1.5rem 0;
}

.blog-post-body ul,
.blog-post-body ol,
#post-article ul,
#post-article ol {
    margin-bottom: 1.5rem;
}

.blog-post-body blockquote,
#post-article blockquote {
    border-left: 4px solid #000000;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #000000;
}



.blog-post-body a,
#post-article a {
    color: #000000;
    text-decoration: underline;
}

.blog-post-body a:hover,
#post-article a:hover {
    color: #000000;
}





.blog-post-body hr,
#post-article hr {
    border: none;
    border-top: 2px solid hsl(0, 0%, 90%);
    margin: 2rem 0;
}



/* Post meta info */
.post-meta {
    margin-bottom: 2rem;
    color: #000000;
    font-size: 1.1rem;
}



.post-date,
.post-category {
    margin-right: 1rem;
}

/* Back button */
.back-button {
    background: #ffffff;
    border: none;
    font-size: 1.5rem;
    font-weight: 400;
    cursor: pointer;
    color: #000000;
    padding: 0.9rem 1.3rem;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-family);
}

.back-button:hover {
    background: #000000;
    color: #ffffff;
}





/* Breadcrumbs */
.breadcrumbs {
    font-size: 1rem;
    color: #000000;
    margin-bottom: 2rem;
    padding-left: 0.5rem;
}

.breadcrumbs a {
    color: #000000;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: #000000;
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: #000000;
}

.breadcrumb-current {
    color: #000000;
    font-weight: 500;
}











/* Blog index transitions */
#blog-index {
    opacity: 1;
}

#blog-index.fade-out {
    opacity: 0;
    transform: translateY(20px);
}

#blog-index.fade-in {
    opacity: 0;
    transform: translateY(20px);
}

/* Post navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid hsl(0, 0%, 90%);
    gap: 1rem;
}



.nav-button {
    background: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    color: #000000;
    padding: 0.8rem 1.2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-family);
    text-decoration: none;
    flex: 1;
    justify-content: center;
    max-width: 48%;
}

.nav-button:hover {
    background: #000000;
    color: #ffffff;
}





.nav-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-button .nav-icon {
    font-size: 1.3rem;
}

.nav-button .nav-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.nav-button .nav-label {
    font-size: 1rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-button .nav-title {
    font-size: 1.5rem;
    font-weight: 400;
}

.nav-button.prev-post {
    justify-content: flex-start;
}

.nav-button.next-post {
    justify-content: flex-end;
}

.nav-button.next-post .nav-text {
    align-items: flex-end;
}

/* Loading spinner */
.loading-spinner {
    text-align: center;
    padding: 3rem;
    font-size: 1.5rem;
    color: var(--font-light);
}



/* Error message */
.error-message {
    background: #ffdddd;
    color: #000000;
    padding: 1rem;
    border-radius: 5px;
    margin: 2rem 0;
    font-family: var(--font-family);
}



/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .back-button {
        font-size: 1.3rem;
        padding: 0.75rem 1rem;
        margin-top: 5rem;
    }

    .breadcrumbs {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
        padding-left: 0;
    }

    .breadcrumb-separator {
        margin: 0 0.3rem;
    }

    .nav-button {
        font-size: 0.95rem;
        padding: 0.7rem 0.9rem;
    }

    .nav-button .nav-label {
        font-size: 0.9rem;
    }

    .nav-button .nav-title {
        font-size: 1.25rem;
    }

    .post-navigation {
        margin-top: 3rem;
        gap: 0.75rem;
    }

    #post-article h1 {
        font-size: 2rem;
    }

    #post-article h2 {
        font-size: 1.6rem;
    }

    #post-article h3 {
        font-size: 1.3rem;
    }
}
