:root {
    --bg: #0a0a0a;
    --fg: #ededed;
    --primary: #3b82f6;
    --secondary: #a855f7;
    --border: #262626;
    --surface: #171717;
    --muted: #a3a3a3;

    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'Fira Code', monospace;

    /* Default (Dark) Heading Colors */
    --h2-color: #93c5fd;
    --h3-color: #d8b4fe;
}

.light-theme {
    --bg: #fafafa;
    --fg: #171717;
    --primary: #2563eb;
    --secondary: #9333ea;
    --border: #e5e5e5;
    --surface: #ffffff;
    --muted: #52525b;

    /* Light Theme Heading Colors (Darker for contrast) */
    --h2-color: #2563eb;
    --h3-color: #9333ea;

    /* Light Theme Code Colors */
    --code-bg: #e5e7eb;
    --code-fg: #c026d3;
    /* Purple-600 */
}

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

body {
    background-color: var(--bg);
    color: var(--fg);
    font-family: var(--font-sans);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: color 0.2s ease;
}

a,
button,
.icon-btn {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
    cursor: pointer;
    position: relative;
    z-index: 1;
    display: inline-block;
}

/* ... (keep other styles) ... */

.markdown-body code {
    background-color: rgba(139, 233, 253, 0.1);
    color: #8be9fd;
    padding: 0.2em 0.4em;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.9em;
    word-break: break-word;
}

.light-theme .markdown-body code {
    background-color: var(--code-bg);
    color: var(--code-fg);
}

/* Fix: Ensure code inside pre (blocks) does NOT get the inline code background */
.markdown-body pre code,
.light-theme .markdown-body pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
}

/* ... */

/* Floating TOC */
.toc-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    /* Ensure it's above other content */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.toc-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--surface);
    border: 1px solid var(--border);
    color: var(--fg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: color 0.16s ease, transform 0.16s ease, background-color 0.16s ease;
    position: relative;
    /* Ensure it can be clicked */
    pointer-events: auto;
    z-index: 2;
}

.toc-dropdown {
    position: absolute;
    bottom: 60px;
    right: 0;
    width: 300px;
    /* Increased width */
    background-color: rgba(23, 23, 23, 0.95);
    /* Slightly more opaque */
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    /* Increased padding */
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    pointer-events: none;
    /* Hidden by default */
    transition: opacity 0.18s ease, transform 0.18s ease;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    max-height: 60vh;
    overflow-y: auto;
    z-index: 1;
}

.light-theme .toc-dropdown {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.toc-container.active .toc-dropdown {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    /* Visible */
}

.toc-title {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 1.1rem;
}

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

.toc-list li {
    margin-bottom: 0.5rem;
}

.toc-link {
    display: block;
    padding: 0.5rem;
    color: var(--muted);
    font-size: 0.95rem;
    transition: color 0.2s;
    position: relative;
    z-index: 1;
    /* Ensure text is above hover box */
    border-radius: 6px;
}

.toc-link:hover {
    color: var(--primary);
}

.toc-link.h3 {
    padding-left: 1.5rem;
    font-size: 0.9rem;
}

/* TOC Hover Box (Magnetic Effect) */
.toc-hover-box {
    position: absolute;
    background-color: transparent;
    border: 1px solid var(--primary);
    border-radius: 6px;
    z-index: 0;
    /* Above background, below text */
    opacity: 0;
    transition: opacity 0.2s, border-color 0.3s, width 0.1s, height 0.1s, top 0.1s, left 0.1s;
    pointer-events: none;
    /* Critical: prevents interference with mouse events */
}

/* Code Modal */
.code-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.code-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.code-modal-content {
    background-color: #282a36;
    /* Always Dracula background */
    width: 90%;
    max-width: 1200px;
    height: 85vh;
    border-radius: 12px;
    border: 1px solid #44475a;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.code-modal-overlay.active .code-modal-content {
    transform: scale(1);
}

.code-modal-body {
    flex: 1;
    overflow: auto;
    padding: 2rem;
    font-family: var(--font-mono);
    color: #f8f8f2 !important;
    /* Force Dracula foreground */
}

/* Force cursor behavior in modal */
.code-modal-body,
.code-modal-body pre,
.code-modal-body code {
    cursor: text !important;
}

/* Fix: Remove incorrect override that broke syntax highlighting */
.code-modal-body .codehilite {
    background: transparent !important;
}

/* Only reset background for spans, DO NOT inherit color */
.code-modal-body .codehilite span {
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
}

a:hover,
button:hover,
.icon-btn:hover {
    color: var(--primary);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* Header */
.header {
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
    margin-bottom: 3rem;
    background-color: rgba(10, 10, 10, 0.8);
    position: sticky;
    top: 0;
    z-index: 10;
    transition: border-color 0.3s, background-color 0.3s;
}

.light-theme .header {
    background-color: rgba(250, 250, 250, 0.8);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    background: #54789c;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
}

/* Toggle Buttons */

.icon-btn {
    background: none;
    border: none;
    color: var(--muted);
    padding: 0.4rem;
    border-radius: 8px;
    transition: color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    color: var(--fg);
    background-color: var(--surface);
    transform: scale(1.1) rotate(5deg);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

/* Hero */
.hero {
    margin-bottom: 2rem;
    animation: fadeIn 0.8s ease-out;
}

.centered-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    /* Center vertically on screen */
    text-align: center;
}

.hero-content-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-container {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    border: 3px solid var(--primary);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
    overflow: hidden;
}

.profile-container:hover {
    /* transform: scale(1.05); Removed as per user request */
    box-shadow: 0 0 50px rgba(59, 130, 246, 0.6);
    /* Enhanced glow on hover */
    border-color: var(--primary);
    /* Optional: brighten border slightly */
}

.profile-pic-large,
.profile-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.profile-video {
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 2;
    /* Optimize rendering quality */
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}

.hero-text-centered {
    max-width: 700px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.light-theme .hero-title {
    background: linear-gradient(to right, #171717, #52525b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--muted);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Post List */
.post-list {
    list-style: none;
}

.post-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.post-item:last-child {
    border-bottom: none;
}

.post-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.post-meta {
    font-size: 0.9rem;
    color: var(--muted);
    font-family: var(--font-mono);
}

/* Posts Grid */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0;
}

.view-all {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 500;
}

.view-all:hover {
    text-decoration: underline;
}

.posts-grid {
    display: grid;
    gap: 1.5rem;
}

.post-card {
    display: block;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background-color: rgba(255, 255, 255, 0.02);
    transition: transform 0.2s, border-color 0.2s, background-color 0.2s;
}

.post-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    background-color: rgba(255, 255, 255, 0.04);
}

/* Dock-style Contact Widget */
.dock-container {
    display: flex;
    justify-content: center;
    margin-top: 4rem;
    margin-bottom: 2rem;
}

.dock {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background-color: rgba(23, 23, 23, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.light-theme .dock {
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.dock-item {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--surface);
    border-radius: 12px;
    color: var(--muted);
    text-decoration: none;
    transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.dock-icon {
    width: 24px;
    height: 24px;
    z-index: 2;
    color: var(--fg);
    transition: color 0.3s;
}

.dock-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Hover Effects */
.dock-item:hover {
    transform: translateY(-6px) scale(1.06);
    background-color: var(--item-color);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.28);
    border-color: rgba(255, 255, 255, 0.2);
}

.dock-item:hover .dock-icon {
    color: white;
}

/* Optional: Add a subtle reflection or shine */
.dock-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.dock-item:hover::after {
    opacity: 1;
}

/* Post Detail */
.post-header {
    margin-bottom: 3rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.post-title-large {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.post-meta-large {
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Language Switcher */
.post-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.post-header-top .back-link {
    margin-bottom: 0;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-family: var(--font-heading);
    font-weight: 500;
}

.lang-code {
    color: var(--muted);
    transition: color 0.2s;
    text-transform: uppercase;
}

.lang-code:hover {
    color: var(--primary);
}

.lang-code.active {
    color: var(--primary);
    font-weight: 700;
}

.lang-separator {
    color: var(--border);
}

/* Markdown Body */
.markdown-body {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    /* Slightly increased for serif */
    line-height: 1.8;
    color: var(--fg);
}

.markdown-body a {
    color: var(--primary);
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    font-family: var(--font-heading);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.markdown-body h1 {
    font-size: 2.5rem;
    color: var(--fg);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    margin-top: 2rem;
    /* Less top margin for the first title */
}

.markdown-body h2 {
    font-size: 1.8rem;
    color: var(--h2-color);
    /* Pastel Blue (Blue 300) */
    border-bottom: 1px solid var(--border);
    border-bottom-color: color-mix(in srgb, var(--h2-color), transparent 70%);
    /* Very subtle pastel blue border */
    padding-bottom: 0.3rem;
}

.markdown-body h3 {
    font-size: 1.4rem;
    color: var(--h3-color);
    /* Pastel Purple (Purple 300) */
}

.markdown-body h4 {
    font-size: 1.2rem;
    color: var(--fg);
    opacity: 0.9;
    /* Slightly brighter than muted */
}

.markdown-body h5 {
    font-size: 1.1rem;
    color: var(--muted);
    font-weight: 600;
}

.markdown-body h6 {
    font-size: 1rem;
    color: var(--muted);
    font-style: italic;
}

.markdown-body p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.markdown-body ul,
.markdown-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.markdown-body li {
    margin-bottom: 0.5rem;
}

.markdown-body pre {
    background-color: #282a36;
    /* Dracula Background */
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 2rem;
    border: 1px solid #44475a;
    /* Dracula Selection/Comment */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    /* For copy button positioning */
    cursor: text;
    /* Restore text cursor */
}

.markdown-body pre code {
    background-color: transparent;
    padding: 0;
    font-size: 0.95em;
    color: #f8f8f2;
    border: none;
    /* Fix: Remove inherited border */
    border-radius: 0;
}

.markdown-body code {
    background-color: rgba(139, 233, 253, 0.1);
    /* Dracula Cyan low opacity */
    color: #8be9fd;
    /* Dracula Cyan */
    padding: 0.2em 0.4em;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.9em;
    /* Removed border for cleaner look */
}

.light-theme .markdown-body code {
    background-color: var(--code-bg);
    color: var(--code-fg);
}

/* Force transparent background for syntax highlighting tokens to avoid "boxes" */
.codehilite span {
    background-color: transparent !important;
    border: none !important;
    /* Force remove any borders */
    outline: none !important;
}

/* Nuclear option for code block artifacts */
.markdown-body pre * {
    border: none !important;
    box-shadow: none !important;
}

/* Copy Button */
.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f8f8f2;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, background-color 0.2s;
    font-family: var(--font-sans);
}

.markdown-body pre:hover .copy-btn {
    opacity: 1;
}

.copy-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.copy-btn.copied {
    background-color: #50fa7b;
    /* Dracula Green */
    color: #282a36;
    border-color: #50fa7b;
}

/* Expand Button */
.expand-btn {
    position: absolute;
    top: 0.5rem;
    right: 3.5rem;
    /* Left of Copy button */
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f8f8f2;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.markdown-body pre:hover .expand-btn {
    opacity: 1;
}

.expand-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.expand-btn svg {
    width: 14px;
    height: 14px;
}

/* Code Modal */
.code-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.code-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.code-modal-content {
    background-color: #282a36;
    width: 90%;
    max-width: 1200px;
    height: 85vh;
    border-radius: 12px;
    border: 1px solid #44475a;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.code-modal-overlay.active .code-modal-content {
    transform: scale(1);
}

.code-modal-header {
    padding: 1rem;
    border-bottom: 1px solid #44475a;
    display: flex;
    justify-content: flex-end;
    background-color: #21222c;
}

.code-modal-close {
    background: none;
    border: none;
    color: #f8f8f2;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s;
    display: flex;
    /* Ensure SVG centers */
    align-items: center;
    justify-content: center;
}

.code-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.code-modal-body {
    flex: 1;
    overflow: auto;
    padding: 2rem;
}

.code-modal-body pre {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.code-modal-body code {
    font-size: 1rem;
    /* Larger font for modal */
    white-space: pre;
}

.markdown-body blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
    margin-left: 0;
    margin-bottom: 1.5rem;
    color: var(--muted);
    font-style: italic;
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* TOC Toggle Animation */
.toc-toggle {
    transition: transform 0.2s ease, color 0.2s ease;
}

.toc-toggle:hover {
    transform: scale(1.1);
    color: var(--primary);
    cursor: pointer;
}

.markdown-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* Pimp design */
:root {
    --font-serif: var(--font-sans);
    --accent-hot: #ff6b7a;
    --accent-bright: #2bd4c8;
    --shadow-soft: 0 14px 32px rgba(0, 0, 0, 0.24);
}

body.design-pimp {
    --bg: #05070d;
    --fg: #f6fbff;
    --primary: #20d9ff;
    --secondary: #ff5ea8;
    --border: rgba(135, 230, 255, 0.2);
    --surface: rgba(10, 22, 35, 0.88);
    --muted: #a8bac8;
    --h2-color: #63e6ff;
    --h3-color: #ff8cc8;
    --code-bg: rgba(32, 217, 255, 0.12);
    --code-fg: #9af3ff;
    background:
        radial-gradient(circle at 16% 12%, rgba(45, 212, 200, 0.19), transparent 24rem),
        radial-gradient(circle at 86% 8%, rgba(255, 214, 102, 0.13), transparent 23rem),
        radial-gradient(circle at 50% 38%, rgba(57, 168, 255, 0.15), transparent 36rem),
        linear-gradient(135deg, #05070d 0%, #071b25 52%, #070911 100%);
}

body.design-pimp::before {
    content: none;
}

body.design-pimp .container {
    max-width: 1120px;
}

body.design-pimp .header {
    background: rgba(4, 8, 15, 0.9);
    border-bottom-color: var(--border);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
}

body.design-pimp .logo {
    background: linear-gradient(90deg, #35c8e8 0%, #4d9cff 45%, #e8c66f 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 14px rgba(32, 217, 255, 0.18);
}

body.design-pimp .username-glow {
    background: linear-gradient(90deg, #8ef3e4 0%, #35c8e8 34%, #4d9cff 68%, #e8c66f 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 18px rgba(32, 217, 255, 0.24);
}

body.design-pimp main.container {
    padding-bottom: 5rem;
}

body.design-pimp .post {
    position: relative;
}

body.design-pimp .post::before {
    content: '';
    position: fixed;
    inset: 0;
    height: auto;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(circle at 16% 12%, rgba(45, 212, 200, 0.19), transparent 24rem),
        radial-gradient(circle at 86% 8%, rgba(255, 214, 102, 0.13), transparent 23rem),
        radial-gradient(circle at 50% 38%, rgba(57, 168, 255, 0.15), transparent 36rem),
        linear-gradient(135deg, #05070d 0%, #071b25 52%, #070911 100%);
}

body.design-pimp .centered-hero {
    min-height: calc(100vh - 170px);
    margin-bottom: 4rem;
    position: relative;
}

body.design-pimp .centered-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: min(520px, 74vw);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.65;
}

.hero-kicker,
.section-kicker {
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

body.design-pimp .hero-title {
    max-width: 980px;
    font-size: clamp(2.6rem, 8vw, 5.5rem);
    letter-spacing: 0;
    background: linear-gradient(100deg, #8ef3e4 0%, #35c8e8 34%, #4d9cff 68%, #e8c66f 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.design-pimp .profile-container {
    border-color: rgba(32, 217, 255, 0.9);
    box-shadow:
        0 0 0 6px rgba(45, 212, 200, 0.06),
        0 0 26px rgba(32, 217, 255, 0.28),
        0 18px 38px rgba(0, 0, 0, 0.28);
}

body.design-pimp .dock,
body.design-pimp .post-card,
body.design-pimp .post-shell,
body.design-pimp .toc-dropdown {
    box-shadow: var(--shadow-soft);
}

body.design-pimp .dock,
body.design-pimp .post-card,
body.design-pimp .post-shell {
    background:
        linear-gradient(135deg, rgba(45, 212, 200, 0.1), rgba(57, 168, 255, 0.055), rgba(255, 214, 102, 0.045)),
        rgba(6, 15, 25, 0.86);
    border-color: rgba(122, 235, 255, 0.22);
}

body.design-pimp .dock {
    border-radius: 18px;
}

body.design-pimp .dock-item {
    border-color: rgba(255, 255, 255, 0.12);
}

.home-latest,
.writeups {
    animation: fadeIn 0.6s ease-out;
}

.listing-hero {
    padding: 2.5rem 0 2rem;
    margin-bottom: 1rem;
}

body.design-pimp .section-title {
    font-family: var(--font-heading);
    font-size: clamp(2.1rem, 5vw, 3.8rem);
    letter-spacing: 0;
    line-height: 1;
}

.featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.design-pimp .posts-grid {
    gap: 1rem;
}

body.design-pimp .post-card {
    min-height: 190px;
    padding: 1.35rem;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

body.design-pimp .post-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.14s ease;
    pointer-events: none;
    background: linear-gradient(115deg, rgba(45, 212, 200, 0.1), transparent 42%, rgba(255, 214, 102, 0.1));
}

body.design-pimp .post-card:hover::before {
    opacity: 1;
}

body.design-pimp .post-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 214, 102, 0.44);
    box-shadow: 0 16px 34px rgba(32, 217, 255, 0.12);
}

.post-card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.post-type,
.tag {
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    min-height: 1.7rem;
    padding: 0.2rem 0.58rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    line-height: 1.1;
    text-transform: uppercase;
}

.post-description {
    color: var(--muted);
    margin: 0.75rem 0 1.15rem;
}

.post-tags,
.tags-large {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

body.design-pimp .tag,
body.design-pimp .post-type {
    background: rgba(32, 217, 255, 0.08);
}

body.design-pimp .post-shell {
    max-width: 860px;
    margin: 0 auto 4rem;
    padding: clamp(1.2rem, 4vw, 3rem);
    border: 1px solid var(--border);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(7, 20, 31, 0.91), rgba(4, 12, 21, 0.88)),
        linear-gradient(135deg, rgba(45, 212, 200, 0.065), rgba(255, 214, 102, 0.032));
}

body.design-pimp .post-title-large {
    color: #effaff;
    font-size: clamp(2.2rem, 7vw, 4.6rem);
    letter-spacing: 0;
    text-shadow: 0 0 18px rgba(32, 217, 255, 0.14);
}

body.design-pimp .post-meta,
body.design-pimp .post-meta-large {
    color: #97aeb9;
}

body.design-pimp .markdown-body {
    font-family: var(--font-sans);
    font-size: 1.06rem;
    line-height: 1.82;
    color: #d7e6ec;
    text-rendering: optimizeLegibility;
}

body.design-pimp .markdown-body p {
    line-height: 1.82;
    margin-bottom: 1.35rem;
}

body.design-pimp .markdown-body li {
    line-height: 1.76;
    margin-bottom: 0.42rem;
}

body.design-pimp .markdown-body h1,
body.design-pimp .markdown-body h2,
body.design-pimp .markdown-body h3,
body.design-pimp .markdown-body h4,
body.design-pimp .markdown-body h5,
body.design-pimp .markdown-body h6 {
    margin-top: 2.65rem;
    margin-bottom: 1.1rem;
}

body.design-pimp .markdown-body h1 {
    color: #f1fbff;
}

body.design-pimp .markdown-body h2 {
    color: #8bdfe9;
    border-bottom-color: rgba(139, 223, 233, 0.2);
}

body.design-pimp .markdown-body h3 {
    color: #ffb3ca;
}

body.design-pimp .markdown-body h4 {
    color: #e2f0f4;
}

body.design-pimp .markdown-body h5,
body.design-pimp .markdown-body h6 {
    color: #a9bdc7;
}

body.design-pimp .markdown-body a {
    border-bottom: 1px solid rgba(127, 216, 232, 0.44);
    color: #7fd8e8;
    font-weight: 600;
    text-decoration: none;
}

body.design-pimp .markdown-body a:hover {
    border-bottom-color: rgba(255, 195, 107, 0.62);
    color: #ffc36b;
}

body.design-pimp .markdown-body strong,
body.design-pimp .markdown-body b {
    background: linear-gradient(90deg, #ff9f8a 0%, #ffc36b 50%, #ffe39a 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

body.design-pimp .markdown-body code {
    background:
        linear-gradient(135deg, rgba(45, 212, 200, 0.095), rgba(57, 168, 255, 0.055), rgba(255, 214, 102, 0.04));
    border: 1px solid rgba(122, 235, 255, 0.14);
    color: #b9edf2;
    padding: 0.16em 0.42em;
}

body.design-pimp .markdown-body pre {
    background:
        linear-gradient(180deg, rgba(10, 28, 42, 0.98), rgba(7, 17, 30, 0.98));
    border: 1px solid rgba(85, 221, 242, 0.24);
    border-top-color: rgba(255, 214, 102, 0.24);
    border-radius: 8px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
    padding-top: 2.45rem;
}

body.design-pimp .markdown-body pre::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2.05rem;
    background:
        linear-gradient(90deg, rgba(45, 212, 200, 0.14), rgba(57, 168, 255, 0.08), rgba(255, 214, 102, 0.1)),
        rgba(255, 255, 255, 0.025);
    border-bottom: 1px solid rgba(122, 235, 255, 0.12);
}

body.design-pimp .markdown-body pre::after {
    content: '';
    position: absolute;
    top: 0.78rem;
    left: 1rem;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: #34dcc7;
    box-shadow:
        0.8rem 0 0 #39a8ff,
        1.6rem 0 0 #e8c66f;
}

body.design-pimp .markdown-body pre code {
    display: block;
    background: transparent;
    border: 0;
    color: #dceff3;
    text-shadow: none;
}

body.design-pimp .codehilite>pre>span:first-child:empty {
    display: none;
}

body.design-pimp .copy-btn,
body.design-pimp .expand-btn {
    background: rgba(8, 22, 35, 0.9);
    border: 1px solid rgba(122, 235, 255, 0.2);
    color: #dffbff;
    border-radius: 6px;
}

body.design-pimp .copy-btn:hover,
body.design-pimp .expand-btn:hover {
    background: rgba(45, 212, 200, 0.16);
    border-color: rgba(255, 214, 102, 0.36);
    color: #ffffff;
}

body.design-pimp .copy-btn.copied {
    background: #34dcc7;
    border-color: #34dcc7;
    color: #06131c;
}

body.design-pimp .code-modal-overlay {
    background:
        radial-gradient(circle at 50% 20%, rgba(45, 212, 200, 0.14), transparent 30rem),
        rgba(2, 7, 12, 0.88);
}

body.design-pimp .code-modal-content {
    background:
        linear-gradient(180deg, rgba(10, 28, 42, 0.98), rgba(7, 17, 30, 0.99));
    border: 1px solid rgba(85, 221, 242, 0.26);
    border-top-color: rgba(255, 214, 102, 0.28);
    border-radius: 8px;
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.45);
}

body.design-pimp .code-modal-header {
    min-height: 2.6rem;
    padding: 0.45rem 0.75rem;
    background:
        linear-gradient(90deg, rgba(45, 212, 200, 0.14), rgba(57, 168, 255, 0.08), rgba(255, 214, 102, 0.1)),
        rgba(255, 255, 255, 0.025);
    border-bottom: 1px solid rgba(122, 235, 255, 0.12);
}

body.design-pimp .code-modal-close {
    color: #dffbff;
    border: 1px solid rgba(122, 235, 255, 0.18);
    background: rgba(8, 22, 35, 0.78);
}

body.design-pimp .code-modal-close:hover {
    background: rgba(45, 212, 200, 0.16);
    color: #ffffff;
}

body.design-pimp .code-modal-body {
    background: transparent;
    padding: 1.35rem;
}

body.design-pimp .code-modal-body pre {
    margin: 0;
    max-height: none;
}

body.design-pimp .markdown-body blockquote {
    background: rgba(32, 217, 255, 0.04);
    border-left-color: #ff9f8a;
    color: #c8d9df;
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.2rem;
}

body.design-pimp .markdown-body img {
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

body.design-pimp .toc-toggle {
    background:
        radial-gradient(circle at 30% 18%, rgba(255, 159, 138, 0.16), transparent 1.1rem),
        linear-gradient(135deg, rgba(45, 212, 200, 0.2), rgba(6, 15, 25, 0.94));
    border-color: rgba(122, 235, 255, 0.38);
    color: #bff9f1;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 12px 30px rgba(0, 0, 0, 0.26),
        0 0 18px rgba(53, 200, 232, 0.16);
}

body.design-pimp .toc-toggle:hover {
    color: #ffe1a6;
    border-color: rgba(255, 195, 107, 0.55);
    transform: translateY(-2px);
}

body.design-pimp .toc-dropdown {
    background:
        linear-gradient(135deg, rgba(45, 212, 200, 0.11), rgba(57, 168, 255, 0.07), rgba(255, 159, 138, 0.055)),
        rgba(5, 12, 21, 0.96);
    border: 1px solid rgba(122, 235, 255, 0.26);
    border-radius: 10px;
    box-shadow:
        0 20px 52px rgba(0, 0, 0, 0.32),
        0 0 0 1px rgba(255, 255, 255, 0.035) inset,
        0 0 28px rgba(53, 200, 232, 0.1);
    backdrop-filter: blur(14px);
}

body.design-pimp .toc-title {
    color: #f5fbff;
    border-bottom-color: rgba(122, 235, 255, 0.2);
}

body.design-pimp .toc-title::after {
    content: '';
    display: block;
    width: 3.4rem;
    height: 2px;
    margin-top: 0.55rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #8ef3e4, #35c8e8 58%, #ff9f8a);
}

body.design-pimp .toc-link {
    color: rgba(221, 240, 246, 0.72);
    border-radius: 7px;
}

body.design-pimp .toc-link:hover {
    color: #fff1ca;
}

body.design-pimp .toc-link.h3 {
    color: rgba(184, 218, 228, 0.72);
}

body.design-pimp .toc-link.h3:hover {
    color: #ffd6a7;
}

body.design-pimp .toc-hover-box {
    background:
        linear-gradient(90deg, rgba(45, 212, 200, 0.13), rgba(255, 159, 138, 0.09));
    border-color: rgba(255, 195, 107, 0.32);
    box-shadow: 0 0 16px rgba(53, 200, 232, 0.12);
}

.fishing-line {
    position: fixed;
    top: 0;
    right: clamp(1rem, 4vw, 3rem);
    width: 2.4rem;
    height: 13.45rem;
    transform-origin: 50% 0;
    animation: hookSway 4.8s ease-in-out infinite;
    pointer-events: none;
    z-index: 9;
    will-change: transform, opacity;
}

.fishing-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 11.8rem;
    background: linear-gradient(180deg, rgba(142, 243, 228, 0.8), rgba(142, 243, 228, 0.12));
    box-shadow: 0 0 10px rgba(53, 200, 232, 0.2);
    transform: translateX(-50%);
}

.fish-hook {
    position: absolute;
    opacity: 0.65;
    left: calc(50% - 0.71rem);
    bottom: -0.08rem;
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    border-radius: 999px;
    background: url('/static/hamecon.png') center / contain no-repeat;
    color: inherit;
    cursor: pointer;
    pointer-events: auto;
    transform: rotate(-10deg);
    filter: invert(90%) sepia(20%) saturate(650%) hue-rotate(135deg) brightness(108%) drop-shadow(0 0 9px rgba(53, 200, 232, 0.28));
}

.fishing-line.reeling {
    animation: reelHook 2.05s both;
}

@keyframes hookSway {
    0%,
    100% {
        transform: rotate(-2.5deg);
    }

    50% {
        transform: rotate(3deg);
    }
}

@keyframes reelHook {
    0% {
        transform: translateY(0) rotate(-2deg);
        opacity: 1;
        animation-timing-function: cubic-bezier(0.18, 0.86, 0.24, 1);
    }

    30% {
        transform: translateY(-13.4rem) rotate(6deg);
        opacity: 1;
        animation-timing-function: ease-out;
    }

    38% {
        transform: translateY(-14.4rem) rotate(4deg);
        opacity: 0;
        animation-timing-function: linear;
    }

    46% {
        transform: translateY(-14.4rem) rotate(0deg);
        opacity: 0;
        animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    }

    47% {
        transform: translateY(-14.2rem) rotate(-2deg);
        opacity: 1;
    }

    88% {
        transform: translateY(0) rotate(-2deg);
        opacity: 1;
        animation-timing-function: ease-in-out;
    }

    100% {
        transform: translateY(0) rotate(-2deg);
        opacity: 1;
    }
}

.not-found {
    min-height: calc(100vh - 260px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 4rem 0;
}

.not-found .hero-title {
    margin-bottom: 1rem;
}

.not-found-link {
    margin-top: 1.25rem;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .fishing-line {
        animation: none;
    }
}

@media (max-width: 760px) {
    body.design-pimp .container {
        max-width: 100%;
    }

    .header-content,
    .nav {
        gap: 0.8rem;
    }

    .header-content {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav {
        flex-wrap: wrap;
    }

    body.design-pimp .centered-hero {
        min-height: auto;
        padding: 2.5rem 0 4rem;
    }

    .profile-container {
        width: 150px;
        height: 150px;
    }

    .featured-grid,
    .posts-grid {
        grid-template-columns: 1fr;
    }

    .post-card-topline,
    .post-meta-large {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.6rem;
    }

    body.design-pimp .post-shell {
        border-left: 0;
        border-right: 0;
        border-radius: 0;
        margin-left: -1.5rem;
        margin-right: -1.5rem;
    }

    .toc-container {
        bottom: 1rem;
        right: 1rem;
    }

    .fishing-line {
        top: 7.9rem;
        right: 1.1rem;
        height: 7.2rem;
        opacity: 0.8;
    }

    .fishing-line::before {
        height: 5.8rem;
    }
}
