:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --muted-color: #666666;
    --heading-color: #000000;
    --accent-color: #6366f1;
    /* Softer purple/blue accent */
    --code-bg: #f5f5f5;
    --font-main: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--muted-color);
    font-family: var(--font-main);
    line-height: 1.7;
    font-size: 15px;
}

a {
    color: var(--accent-color);
    /* Use the accent color for all links */
    text-decoration: none;
    transition: color 0.2s, opacity 0.2s;
}

a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.container {
    max-width: 800px;
    width: 65%;
    margin: 0 auto;
    padding: 80px 20px;
}

/* Homepage: narrower, more focused layout */
.profile-header~.posts-list {
    max-width: 650px;
    width: 90%;
    margin: 0 auto;
}

/* Header */
.profile-header {
    max-width: 650px;
    width: 100%;
    margin: 0 auto 80px;
    text-align: left;
}

.home-profile {
    max-width: 650px;
    margin: 0 auto;
    padding-top: 60px;
    padding-bottom: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.home-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.home-title-area h1 {
    font-size: 1.25rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-socials {
    display: flex;
    gap: 15px;
    font-size: 1.1rem;
}

.home-socials a {
    color: var(--muted-color);
}

.home-socials a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

.home-bio {
    margin-bottom: 40px;
}

.home-bio p {
    margin-bottom: 15px;
    color: var(--muted-color);
}

.home-nav {
    display: flex;
    gap: 25px;
}

.home-nav a {
    color: var(--accent-color);
    font-weight: 500;
}

.home-nav a:hover {
    text-decoration: underline;
}

h1 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--heading-color);
}

.social-links {
    margin-bottom: 20px;
}

.social-links a {
    margin: 0 10px;
    font-size: 0.9rem;
}

.bio {
    max-width: 500px;
    margin: 0 auto 30px;
    font-size: 0.95rem;
}

.main-nav a {
    margin: 0 15px;
    font-weight: bold;
    border-bottom: none;
}

.main-nav a:hover {
    text-decoration: underline;
    color: var(--accent-color);
}

/* Posts List */
.posts-list {
    margin-top: 60px;
}

.post-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 16px 0;
    transition: opacity 0.2s ease;
}

.post-item:hover {
    opacity: 0.7;
}

.post-emoji {
    margin-right: 12px;
    font-size: 1rem;
}

.post-link {
    flex-grow: 1;
    border-bottom: none;
    margin-right: 15px;
    color: var(--text-color);
}

.post-link:hover {
    color: var(--accent-color);
}

.post-date {
    font-size: 0.85rem;
    color: #999;
    white-space: nowrap;
}

/* Tags */
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.year-header {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-top: 60px;
    margin-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.year-header:first-of-type {
    margin-top: 20px;
}

.tag-chip {
    padding: 5px 10px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 0.85rem;
    border-bottom: none;
}

.tag-chip:hover {
    background: var(--accent-color);
    color: white;
}

.post-footer-tags {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.post-footer-tags a {
    margin-right: 10px;
    color: #999;
    border-bottom: none;
}

.post-footer-tags a:hover {
    color: var(--accent-color);
}

/* Article Page */
.post-nav {
    margin-bottom: 60px;
}

.post-content header {
    margin-bottom: 50px;
    text-align: left;
}

.post-content h1 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.post-content .meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--muted-color);
    margin-bottom: 50px;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 20px;
}

.author-meta .social-mini {
    margin-right: 10px;
}

.author-meta .social-mini a {
    margin-right: 5px;
    font-size: 0.8rem;
    text-decoration: none;
}

.author-link {
    font-weight: bold;
    color: var(--accent-color);
}

.all-posts-link {
    float: right;
    font-size: 0.9rem;
}

.markdown-body {
    font-size: 15px;
    line-height: 1.7;
    color: var(--muted-color);
}

.markdown-body h2 {
    margin-top: 50px;
    margin-bottom: 25px;
    border-bottom: none;
    padding-bottom: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--heading-color);
}

.markdown-body h3 {
    margin-top: 35px;
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--heading-color);
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol {
    margin-bottom: 25px;
}

.markdown-body ul,
.markdown-body ol {
    padding-left: 25px;
}

/* Code Blocks (overriding Prism if needed or setting container) */
/* Prism handles highlighting, we handle box */
:not(pre)>code[class*="language-"],
pre[class*="language-"] {
    background: #f8f8f8 !important;
}

.markdown-body pre {
    padding: 20px !important;
    border-radius: 6px;
    margin-bottom: 30px;
    font-size: 0.85rem;
    overflow-x: auto;
    box-shadow: none;
    border: 1px solid #e5e5e5;
}

/* Inline Code */
.markdown-body code:not([class*="language-"]) {
    background: #f5f5f5;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 0.9em;
    color: #e11d48;
}

/* Tables */
.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 0.9rem;
}

.markdown-body th,
.markdown-body td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #ddd;
}

.markdown-body th {
    background: #f0f0f0;
    font-weight: 700;
    color: var(--heading-color);
}

.markdown-body tr:nth-child(even) {
    background: #fafafa;
}

.markdown-body tr:hover {
    background: #f0f0f0;
}

/* Blockquotes */
.markdown-body blockquote {
    margin: 25px 0;
    padding: 20px 25px;
    border-left: 3px solid #e5e5e5;
    background: #fafafa;
    font-style: normal;
    color: var(--muted-color);
}

/* Horizontal Rule */
.markdown-body hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 40px 0;
}

/* Images */
.markdown-body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 20px 0;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .container {
        width: 90%;
    }
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .container {
        width: 95%;
        padding: 40px 20px;
    }

    .profile-header {
        margin-bottom: 40px;
    }

    .social-links a {
        display: inline-block;
        margin: 5px 8px;
    }

    .post-date {
        margin-top: 4px;
        font-size: 0.75rem;
    }

    h1 {
        font-size: 1.3rem;
    }
}

/* Fish Animation */
#fish-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.angler-fish {
    position: absolute;
    width: 120px;
    height: auto;
    left: -150px;
    /* Start off-screen left */
    opacity: 0.9;
    animation: swimAcross linear infinite;
    /* Use swimAcross as defined below */
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.2));
}

.lure-glow {
    animation: pulse 2s ease-in-out infinite alternate;
}

@keyframes swimAcross {
    0% {
        left: -200px;
        transform: translateY(0) rotate(0deg);
    }

    20% {
        transform: translateY(-20px) rotate(-5deg);
    }

    50% {
        transform: translateY(0) rotate(0deg);
    }

    75% {
        transform: translateY(20px) rotate(5deg);
    }

    100% {
        left: 110vw;
        /* Go fully off-screen right */
        transform: translateY(0) rotate(0deg);
    }
}

@keyframes pulse {
    0% {
        fill: #a898e9;
        filter: drop-shadow(0 0 2px #a898e9);
    }

    100% {
        fill: #fff;
        filter: drop-shadow(0 0 15px #a898e9);
    }
}