/* Linocut-inspired design - bold, textured, hand-carved aesthetic */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #0a0a0a;
    --text-color: #f5f5f5;
    --link-color: #ffffff;
    --link-hover-color: #d4a574;
    --border-color: #2a2a2a;
    --code-bg: #151515;
    --accent-color: #d4a574;
    --carved-shadow: rgba(0, 0, 0, 0.8);
}

body {
    font-family: 'Georgia', 'Palatino', 'Times New Roman', serif;
    font-size: 19px;
    line-height: 1.8;
    color: var(--text-color);
    background-color: var(--bg-color);
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 255, 255, 0.02) 2px, rgba(255, 255, 255, 0.02) 4px);
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 40px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(212, 165, 116, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(212, 165, 116, 0.06) 0%, transparent 50%),
        repeating-linear-gradient(45deg, transparent 0px, transparent 2px, rgba(212, 165, 116, 0.02) 2px, rgba(212, 165, 116, 0.02) 4px),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"><defs><pattern id="woodgrain" x="0" y="0" width="200" height="200" patternUnits="userSpaceOnUse"><path d="M0,50 Q50,40 100,50 T200,50" stroke="rgba(212,165,116,0.03)" fill="none" stroke-width="2"/><path d="M0,100 Q50,90 100,100 T200,100" stroke="rgba(212,165,116,0.02)" fill="none" stroke-width="3"/><path d="M0,150 Q50,140 100,150 T200,150" stroke="rgba(212,165,116,0.025)" fill="none" stroke-width="2"/></pattern></defs><rect width="200" height="200" fill="url(%23woodgrain)"/></svg>');
    pointer-events: none;
    z-index: -1;
    opacity: 0.9;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.4) 50%, transparent 100%),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300"><filter id="noise"><feTurbulence baseFrequency="1.5" numOctaves="6" seed="2"/></filter><rect width="300" height="300" filter="url(%23noise)" opacity="0.05"/></svg>');
    pointer-events: none;
    z-index: -1;
    mix-blend-mode: multiply;
}

/* Header */
header {
    margin-bottom: 50px;
    padding-bottom: 25px;
    border-bottom: 3px solid var(--border-color);
    box-shadow: 0 3px 0 rgba(212, 165, 116, 0.3);
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--accent-color) 20%, transparent 40%, var(--accent-color) 60%, transparent 80%);
    opacity: 0.5;
}

.site-logo {
    display: inline-block;
    margin-right: 30px;
    text-decoration: none;
    line-height: 1;
    transition: all 0.3s ease;
    vertical-align: middle;
}

.site-logo:hover {
    transform: scale(1.05);
}

.site-logo img {
    height: 50px;
    width: auto;
    vertical-align: middle;
    filter:
        contrast(1.3)
        brightness(1.1)
        drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.8))
        drop-shadow(4px 4px 0 rgba(212, 165, 116, 0.3));
    transition: all 0.3s ease;
    border: none;
    box-shadow: none;
}

.site-logo:hover img {
    filter:
        contrast(1.4)
        brightness(1.2)
        drop-shadow(4px 4px 0 rgba(0, 0, 0, 0.9))
        drop-shadow(5px 5px 0 var(--accent-color));
    transform: rotate(-2deg);
}

nav {
    display: inline-block;
}

nav a {
    margin-right: 25px;
    text-decoration: none;
    color: var(--link-color);
    font-size: 18px;
    font-weight: 700;
    text-transform: lowercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    position: relative;
    padding: 2px 6px;
}

nav a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
    box-shadow: 0 1px 2px rgba(212, 165, 116, 0.6);
}

nav a:hover::before {
    width: 100%;
}

nav a:hover {
    color: var(--accent-color);
    text-shadow: 0 0 8px rgba(212, 165, 116, 0.4);
}

/* Links */
a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    font-weight: 600;
}

a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    text-shadow: 0 0 10px rgba(212, 165, 116, 0.3);
}

/* Main content */
main {
    margin-bottom: 60px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 900;
    margin-top: 40px;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
    font-family: 'Georgia', 'Palatino', serif;
    text-shadow:
        2px 2px 0 var(--carved-shadow),
        3px 3px 0 rgba(212, 165, 116, 0.2);
    position: relative;
}

h1::before, h2::before, h3::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 80%;
    background: var(--accent-color);
    box-shadow: 2px 0 4px rgba(212, 165, 116, 0.5);
}

h1 {
    font-size: 42px;
    line-height: 1.1;
    border-bottom: 4px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 25px;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 60%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color) 0%, transparent 100%);
    opacity: 0.6;
}

h2 {
    font-size: 32px;
    line-height: 1.2;
}

h3 {
    font-size: 24px;
    line-height: 1.3;
}

p {
    margin-bottom: 18px;
    text-align: justify;
    hyphens: auto;
}

/* Post list */
.post-list {
    list-style: none;
    margin: 30px 0;
    line-height: 2;
}

.post-item {
    margin-bottom: 18px;
    display: block;
    padding: 12px 15px;
    border-left: 5px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    background: linear-gradient(90deg, rgba(212, 165, 116, 0.02) 0%, transparent 100%);
}

.post-item::before {
    content: '▸';
    position: absolute;
    left: -20px;
    color: var(--accent-color);
    font-size: 20px;
    opacity: 0;
    transition: all 0.3s ease;
}

.post-item:hover {
    border-left-color: var(--accent-color);
    background: linear-gradient(90deg, rgba(212, 165, 116, 0.08) 0%, transparent 100%);
    box-shadow: inset 0 0 20px rgba(212, 165, 116, 0.1);
}

.post-item:hover::before {
    opacity: 1;
    left: -10px;
}

.post-number {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Fira Mono', 'Roboto Mono', 'Courier New', monospace;
    display: inline;
    margin-right: 18px;
    font-size: 18px;
    font-weight: 900;
    color: var(--accent-color);
    text-shadow: 1px 1px 0 var(--carved-shadow);
    letter-spacing: 1px;
}

.post-content {
    display: inline;
}

.post-title {
    font-weight: 700;
    font-size: 19px;
    margin: 0;
    display: inline;
}

.post-title a {
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.post-title a:hover {
    border-bottom-color: var(--accent-color);
    color: var(--accent-color);
}

.post-meta {
    font-size: 15px;
    color: #999;
    margin-top: 6px;
    font-weight: 600;
    font-style: italic;
}

.post-date {
    margin-right: 12px;
}

.post-tags {
    display: inline;
}

.post-tags a {
    margin-right: 10px;
    font-size: 14px;
    padding: 2px 8px;
    background: rgba(212, 165, 116, 0.1);
    border-radius: 3px;
    border: 1px solid rgba(212, 165, 116, 0.3);
    transition: all 0.2s ease;
}

.post-tags a:hover {
    background: rgba(212, 165, 116, 0.2);
    border-color: var(--accent-color);
}

/* Single post */
.post-header {
    margin-bottom: 30px;
}

.post-header h1 {
    margin: 0 0 10px 0;
}

/* Code blocks */
pre {
    background-color: var(--code-bg);
    padding: 20px;
    overflow-x: auto;
    border: 3px solid var(--border-color);
    border-left: 6px solid var(--accent-color);
    margin: 30px 0;
    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 0.5),
        0 4px 8px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(212, 165, 116, 0.2);
    position: relative;
}

pre::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color) 0%, transparent 50%, var(--accent-color) 100%);
    opacity: 0.5;
}

code {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Fira Mono', 'Roboto Mono', 'Courier New', monospace;
    font-size: 16px;
    color: #f5f5f5;
    font-weight: 500;
}

p code {
    background-color: var(--code-bg);
    padding: 4px 10px;
    border: 2px solid var(--border-color);
    border-radius: 0;
    box-shadow:
        inset 0 0 10px rgba(0, 0, 0, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.4);
    font-weight: 700;
    color: var(--accent-color);
}

/* Images */
img {
    max-width: 100%;
    height: auto;
}

/* Content images (not logo) */
article img,
.post-content img,
main img:not(.site-logo img) {
    border: 3px solid var(--border-color);
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.7),
        inset 0 0 0 1px rgba(212, 165, 116, 0.2);
    filter: contrast(1.1) brightness(0.95);
    transition: all 0.3s ease;
}

article img:hover,
.post-content img:hover,
main img:not(.site-logo img):hover {
    transform: scale(1.02);
    border-color: var(--accent-color);
    box-shadow:
        0 12px 24px rgba(0, 0, 0, 0.8),
        0 0 0 3px rgba(212, 165, 116, 0.3);
}

/* Tables */
table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin: 30px 0;
    border: 3px solid var(--border-color);
    box-shadow:
        inset 0 0 20px rgba(0, 0, 0, 0.5),
        0 4px 8px rgba(0, 0, 0, 0.6);
}

th, td {
    border: 2px solid var(--border-color);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
}

th {
    background-color: var(--code-bg);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
    color: var(--accent-color);
    text-shadow: 1px 1px 0 var(--carved-shadow);
    border-bottom: 4px solid var(--accent-color);
}

td {
    background: linear-gradient(180deg, transparent 0%, rgba(212, 165, 116, 0.02) 100%);
}

tr:hover td {
    background: rgba(212, 165, 116, 0.08);
}

/* Blockquotes */
blockquote {
    border-left: 6px solid var(--accent-color);
    margin: 30px 0;
    padding: 20px 25px;
    color: #ddd;
    font-style: italic;
    background: linear-gradient(90deg, rgba(212, 165, 116, 0.08) 0%, transparent 100%);
    box-shadow:
        inset 0 0 20px rgba(0, 0, 0, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.4);
    position: relative;
    font-size: 18px;
    font-weight: 600;
}

blockquote::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 60px;
    color: var(--accent-color);
    opacity: 0.3;
    font-family: Georgia, serif;
    line-height: 1;
}

/* Horizontal rule */
hr {
    border: none;
    height: 4px;
    background: linear-gradient(90deg, transparent 0%, var(--accent-color) 20%, var(--border-color) 50%, var(--accent-color) 80%, transparent 100%);
    margin: 40px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
}

hr::after {
    content: '◆';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-color);
    padding: 0 15px;
    color: var(--accent-color);
    font-size: 12px;
}

/* Lists */
ul, ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

li {
    margin-bottom: 5px;
}

/* Syntax highlighting adjustments for dark mode */
.highlight {
    background-color: var(--code-bg);
    border-radius: 5px;
}

.highlight pre {
    background-color: var(--code-bg);
    margin: 0;
    padding: 15px;
    overflow-x: auto;
}

/* Ensure syntax highlighting colors are visible */
.highlight .hll { background-color: #49483e }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .c1 { color: #75715e } /* Comment.Single */
.highlight .cs { color: #75715e } /* Comment.Special */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
.highlight .kt { color: #66d9ef } /* Keyword.Type */
.highlight .ld { color: #e6db74 } /* Literal.Date */
.highlight .m { color: #ae81ff } /* Literal.Number */
.highlight .s { color: #e6db74 } /* Literal.String */
.highlight .na { color: #a6e22e } /* Name.Attribute */
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
.highlight .nc { color: #a6e22e } /* Name.Class */
.highlight .no { color: #66d9ef } /* Name.Constant */
.highlight .nd { color: #a6e22e } /* Name.Decorator */
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
.highlight .ne { color: #a6e22e } /* Name.Exception */
.highlight .nf { color: #a6e22e } /* Name.Function */
.highlight .nl { color: #f8f8f2 } /* Name.Label */
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
.highlight .nx { color: #a6e22e } /* Name.Other */
.highlight .py { color: #f8f8f2 } /* Name.Property */
.highlight .nt { color: #f92672 } /* Name.Tag */
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
.highlight .ow { color: #f92672 } /* Operator.Word */
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
.highlight .sc { color: #e6db74 } /* Literal.String.Char */
.highlight .sd { color: #e6db74 } /* Literal.String.Doc */
.highlight .s2 { color: #e6db74 } /* Literal.String.Double */
.highlight .se { color: #ae81ff } /* Literal.String.Escape */
.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
.highlight .si { color: #e6db74 } /* Literal.String.Interpol */
.highlight .sx { color: #e6db74 } /* Literal.String.Other */
.highlight .sr { color: #e6db74 } /* Literal.String.Regex */
.highlight .s1 { color: #e6db74 } /* Literal.String.Single */
.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */

/* Mermaid diagrams */
.mermaid {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.03) 0%, transparent 50%);
    margin: 50px 0;
    padding: 40px 30px;
    text-align: center;
    border: 3px solid var(--border-color);
    border-left: 6px solid var(--accent-color);
    box-shadow:
        inset 0 0 40px rgba(0, 0, 0, 0.4),
        0 6px 12px rgba(0, 0, 0, 0.7);
    position: relative;
}

.mermaid::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color) 0%, transparent 50%, var(--accent-color) 100%);
    opacity: 0.6;
}

pre.mermaid {
    background-color: transparent;
    border: none;
    padding: 20px 0;
}

/* Mermaid SVG styling - make it BIGGER and more readable */
.mermaid svg {
    max-width: 100%;
    height: auto;
    min-height: 400px;
    font-size: 17px !important;
    filter: contrast(1.15) brightness(1.05);
}

/* Mermaid text elements - ensure readability */
.mermaid text {
    font-size: 17px !important;
    font-family: 'Georgia', 'Palatino', serif !important;
    fill: #f5f5f5 !important;
    font-weight: 700 !important;
}

/* Mermaid labels - bigger and clearer */
.mermaid .nodeLabel,
.mermaid .edgeLabel {
    font-size: 17px !important;
    color: #f5f5f5 !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
    padding: 10px 15px !important;
    font-weight: 700 !important;
}

/* Mermaid nodes - better contrast */
.mermaid rect,
.mermaid circle,
.mermaid polygon {
    stroke: var(--accent-color) !important;
    stroke-width: 3px !important;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

/* Mermaid arrows/paths - more visible */
.mermaid path {
    stroke: #bbb !important;
    stroke-width: 3px !important;
}

.mermaid .arrowheadPath {
    fill: #bbb !important;
}

/* Mermaid flowchart specific */
.mermaid .flowchart-link {
    stroke: #bbb !important;
    stroke-width: 3px !important;
}

/* Footer */
footer {
    margin-top: 80px;
    padding-top: 25px;
    border-top: 4px solid var(--border-color);
    font-size: 15px;
    color: #888;
    position: relative;
    text-align: center;
    font-weight: 700;
}

footer::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent 0%, var(--accent-color) 20%, transparent 40%, var(--accent-color) 60%, transparent 80%);
    opacity: 0.5;
}

footer p {
    text-shadow: 1px 1px 0 var(--carved-shadow);
}

/* Post Layout with Sidebar TOC */
.post-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.post-article {
    flex: 1;
    min-width: 0;
}

.toc-sidebar {
    position: sticky;
    position: -webkit-sticky;
    top: 20px;
    width: 300px;
    flex-shrink: 0;
    height: fit-content;
    align-self: flex-start;
}

.toc {
    background-color: var(--code-bg);
    border: 3px solid var(--border-color);
    border-left: 6px solid var(--accent-color);
    border-radius: 0;
    padding: 25px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 0.5),
        0 6px 12px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(212, 165, 116, 0.2);
    position: relative;
}

.toc::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color) 0%, transparent 50%, var(--accent-color) 100%);
    opacity: 0.5;
}

.toc-title {
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--accent-color);
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 0 var(--carved-shadow);
    border-bottom: 3px solid var(--border-color);
    padding-bottom: 10px;
}

.toc ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc li {
    margin: 8px 0;
}

.toc a {
    color: #888;
    text-decoration: none;
    display: block;
    padding: 8px 12px;
    transition: all 0.3s ease;
    font-size: 14px;
    line-height: 1.6;
    border-radius: 0;
    font-weight: 600;
    border-left: 3px solid transparent;
}

.toc a:hover {
    color: #ddd;
    background: linear-gradient(90deg, rgba(212, 165, 116, 0.1) 0%, transparent 100%);
    border-left-color: rgba(212, 165, 116, 0.5);
}

.toc a.is-active-link {
    color: #ffffff !important;
    background: linear-gradient(90deg, rgba(212, 165, 116, 0.15) 0%, transparent 100%);
    font-weight: 900;
    border-left: 4px solid var(--accent-color);
    padding-left: 15px;
    box-shadow: inset 0 0 15px rgba(212, 165, 116, 0.1);
}

.toc .toc-link::before {
    content: '▸ ';
    color: #555;
    margin-right: 6px;
    font-size: 12px;
}

.toc a.is-active-link::before {
    color: var(--accent-color);
    content: '◆ ';
}

/* Nested TOC items */
.toc .is-collapsible {
    padding-left: 18px;
}


/* Prism.js overrides for dark theme */
pre[class*="language-"] {
    background-color: var(--code-bg) !important;
    border: 3px solid var(--border-color) !important;
    border-left: 6px solid var(--accent-color) !important;
    border-radius: 0 !important;
    padding: 1.5em !important;
    margin: 30px 0 !important;
    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 0.5),
        0 4px 8px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(212, 165, 116, 0.2) !important;
}

code[class*="language-"] {
    background: transparent;
    color: #f5f5f5;
    font-size: 15px;
    text-shadow: none;
    font-weight: 500;
}

.line-numbers .line-numbers-rows {
    border-right: 2px solid var(--accent-color);
    padding-right: 10px;
}

.line-numbers-rows > span:before {
    color: var(--accent-color);
    font-weight: 700;
}

/* Copy button styling */
div.code-toolbar > .toolbar {
    opacity: 1;
}

div.code-toolbar > .toolbar > .toolbar-item > button,
div.code-toolbar > .toolbar > .toolbar-item > a {
    background: var(--code-bg);
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    border-radius: 0;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.5),
        inset 0 0 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

div.code-toolbar > .toolbar > .toolbar-item > button:hover,
div.code-toolbar > .toolbar > .toolbar-item > a:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    box-shadow:
        0 4px 8px rgba(212, 165, 116, 0.5),
        inset 0 0 15px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

/* Tippy.js custom theme */
.tippy-box[data-theme~='custom'] {
    background-color: #333;
    color: #e0e0e0;
    border: 1px solid #555;
    font-size: 14px;
}

.tippy-box[data-theme~='custom'] .tippy-arrow {
    color: #333;
}

.tippy-box[data-theme~='custom'] .tippy-content {
    padding: 8px 12px;
}

/* KaTeX math styling */
.katex {
    font-size: 1.1em;
}

.katex-display {
    margin: 20px 0;
    overflow-x: auto;
    overflow-y: hidden;
}

/* Asciinema player dark theme */
.asciinema-player-wrapper {
    margin: 30px 0;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Search box */
.search-container {
    margin: 30px 0;
}

.search-input {
    width: 100%;
    padding: 12px 20px;
    background-color: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-color);
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #666;
}

.search-results {
    margin-top: 20px;
}

.search-result-item {
    padding: 15px;
    background-color: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin-bottom: 10px;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #252525;
}

.search-result-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.search-result-excerpt {
    color: #999;
    font-size: 14px;
}

/* Enhanced link styling */
.post-content a[href^="http"]::after {
    content: " ↗";
    font-size: 0.8em;
    opacity: 0.6;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Responsive */
@media (max-width: 1024px) {
    .post-layout {
        flex-direction: column;
    }

    .toc-sidebar {
        width: 100%;
        order: -1;
    }

    .toc {
        position: relative;
        top: 0;
        max-height: 400px;
    }
}

@media (max-width: 600px) {
    body {
        padding: 15px;
        font-size: 14px;
    }

    .post-item {
        flex-direction: column;
        gap: 5px;
    }

    .post-number {
        min-width: auto;
    }
}
