.skip-link {
    display: none;
}

.wrap {
    padding: 0 1em;
    opacity: 0;
    animation: fadeInUp 0.4s ease-out forwards;
    transform: translateY(12px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Clean blog design system */
:root {
    /* Primary colors - same deep teal */
    --primary-color: #236B63;
    --primary-hover: #2C8D85;
    --primary-light: #38A79F;

    /* Accent colors */
    --accent-color: #57A65A;
    --accent-hover: #468F4B;

    /* Background colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-tertiary: #f8f9f9;
    --bg-code: #E5E7EB;

    /* Text colors */
    --text-primary: #1A202C;
    --text-secondary: #4A5568;
    --text-muted: #718096;

    /* Borders */
    --border-color: #E2E8F0;
    --border-accent: #2C8D85;
}

/* Reset & base */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.7;
    font-size: 18px;
    min-height: 100vh;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    margin: 0;
    padding: 0;
}

/* =============================== */
/* Header Section */
/* =============================== */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
    width: 100%;
    padding: 0 1em;
    background-color: var(--bg-primary);
    margin: 0;

}

.header.scrolled {
    border-bottom-color: var(--primary-light);
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
}

.header-content {
    padding: 0;
}

.header .site-title {
    margin: 0;
}

.header .site-title a {
    font-size: 1.4rem;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 700;
}

.header .site-title a:hover {
    color: var(--primary-hover);
}

nav ul {
    display: flex;
    list-style: none;
    margin-top: 0;
    gap: 1em;
    padding: 0;
    padding-bottom: .5em;

}

nav ul a {
    font-size: .9rem;
    font-weight: 500;
    text-decoration: none;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    border-bottom: 2px solid transparent;
}

nav ul a:hover {
    color: var(--text-primary);
    transform: translateY(-1px);
}

nav ul a[aria-current="page"] {
    color: var(--text-primary);
    border-bottom-color: var(--accent-color);
}

nav ul a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* =============================== */
/* Hero Section */
/* =============================== */
.hero {
    border-bottom: 2px solid var(--border-color);
    transition: border-color 0.3s ease;
    padding: 1em 0;
}

.hero:hover {
    border-bottom: 2px solid var(--primary-color);
}

.hero-title {
    font-size: 1.7rem;
    margin-bottom: .5em;
    color: var(--text-primary);
}

.hero-description {
    font-size: 1.1rem;
    margin-top: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* =============================== */
/* Article Section */
/* =============================== */

article {
    border-bottom: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
    margin-top: 2.5em;
    padding-bottom: 1em;
}

article:hover {
    border-bottom: 1px solid var(--primary-color);
}

.all-articles-container article h3 {
    font-size: 1.3rem;
    margin-bottom: .5em;
}

.all-archives-container article {
    padding-bottom: 1em;
    margin-top: 0;
}

.all-archives-container article h3 {
    font-size: 1rem;
    margin-bottom: .5em;
    font-weight: 400;
}

article h3 a {
    text-decoration: none;
    color: var(--primary-color);
}

article h3 a:hover {
    color: var(--primary-hover);
}

article h3 a:focus {
    outline: 2px solid var(--border-accent);
    outline-offset: 2px;
    padding: .2em;
}

article time,
article span {
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border-radius: 5em;
    font-weight: 500;
    margin-top: 0;
    border: 1px solid var(--border-color);
    padding: .1em .6em;
    font-size: .8rem;
    margin-right: .6em;
}

article time:hover,
article span:hover {
    border: 1px solid var(--primary-light);
}

article p {
    font-size: 1rem;
    color: var(--text-secondary);
}

.post-container article h1 {
    line-height: 1.2;
    font-size: 2rem;
}

.view-archive-cta {
    margin: 2em 0;
    padding: .4em 1.2em;
    background-color: var(--primary-color);
    display: inline-block;
    border-radius: .3em;
    position: relative;
    transition: 0.3s all ease;
}

.view-archive-cta a {
    color: white;
    font-size: 0.95rem;
    text-decoration: none;
    font-weight: 500;


}

.view-archive-cta:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
}

/* =============================== */
/* Miscellaneous Section */
/* =============================== */
.share-post-container,
.related-section-container,
.prev-next-container {
    border-bottom: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
    margin-top: 2.5em;
    padding-bottom: 2em;
}

.share-post-container ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.share-post-container ul li {
    border: 1px solid var(--border-color);
    padding: .3em 1em;
    border-radius: .3em;
    transition: background-color 0.3s ease;
}

.share-post-container ul li:hover {
    border-color: var(--primary-color);
    background: var(--primary-hover);
}

.share-post-container ul li a {
    text-decoration: none;
    font-size: 1rem;
    color: var(--primary-color);
    display: block;
    width: 100%;
    font-weight: 500;
}

.share-post-container ul li a:hover {
    color: var(--text-primary)
}

.share-post-container ul li button {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1rem;
    display: block;
    width: 100%;
    font-weight: 500;
    padding: .3em 0 .3em 0;
    text-align: start;
}

.share-post-container ul li button:hover {
    color: var(--text-primary);
    cursor: pointer;
}

.related-articles-container ul {
    list-style: none;
    padding: 0;
}

.related-articles-container ul li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.related-articles-container ul li a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.1rem;
}

.related-articles-container ul li a:hover {
    color: var(--primary-hover);
}

.related-articles-container ul li p {
    font-size: .9rem;
}

.prev-next-container {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    gap: 1em;
    margin-bottom: 5em;
    padding-bottom: 2em;
}

.prev-article,
.next-article {
    border: 1px solid var(--border-color);
    border-radius: .3em;
    padding: .5em 1em;
}

.prev-article:hover,
.next-article:hover {
    border-color: var(--primary-hover);
}

.prev-article h4,
.next-article h4 {
    font-size: .8rem;
}

.prev-article a,
.next-article a {
    font-size: 1rem;
    text-decoration: none;
    color: var(--primary-color);
}

/* .next-article {
    text-align: end;
} */

/* =============================== */
/* Footer Section */
/* =============================== */
footer {
    padding: 2em 0;
    text-align: center;
    font-size: .9rem;
    width: 100%;
    border-top: 1px solid var(--border-color);
    margin-top: 2em;
    color: var(--text-secondary);
}

/* Scroll bar Progress */
#scroll-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background-color: var(--accent-color);
    z-index: 9999;
    transition: width 0.2s ease-out;
}

/* Main Content */
.content ul li {
    line-height: 2;
    font-size: 1.1rem;
}

blockquote {
    line-height: 1.7;
    color: var(--text-primary);
    margin-left: 0;
    padding-left: 0.8em;
    border-left: 0.3em solid var(--accent-color);
    margin-bottom: 2.5em;
}

blockquote:hover {
    border-color: var(--accent-hover);
}


blockquote p {
    font-size: 1.2rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Primary colors - deeper teal */
        --primary-color: #2C8D85;
        /* deeper, richer teal */
        --primary-hover: #236B63;
        /* darker shade for hover */
        --primary-light: #38A79F;
        /* lighter highlight */

        /* Accent colors */
        --accent-color: #57A65A;
        /* deep soft green */
        --accent-hover: #468F4B;
        /* darker accent hover */

        /* Background colors */
        --bg-primary: #111827;
        /* main dark background */
        --bg-secondary: #1F2937;
        /* panels/sections */
        --bg-tertiary: #374151;
        /* tertiary background */
        --bg-code: #1F2937;
        /* code block background */

        /* Text colors */
        --text-primary: #E0E7FF;
        /* off-white for main text */
        --text-secondary: #CBD5E1;
        /* soft gray for secondary text */
        --text-muted: #94A3B8;
        /* muted text */

        /* Borders */
        --border-color: #4B5563;
        /* soft border */
        --border-accent: #2C8D85;
        /* accent border, matches primary */
    }
}

@media screen and (min-width: 600px) {
    .header-content {
        max-width: 900px;
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1em;

        nav ul {
            margin: 0;
            padding: 0;
        }
    }

    .wrap {
        max-width: 900px;
        margin: 0 auto;
    }

    .share-post-container ul {
        display: grid;
        grid-template-columns: repeat(3, 1fr);

        li a,
        li button {
            text-align: center;
        }
    }
}