:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #13131f;
    --text-primary: #e6e6fa;
    --text-secondary: #9090b0;
    --accent: #ff3864;
    --accent-dark: #cc2d50;
    --danger: #ff3333;
    --terminal-pink: #ff71a2;
    --neon-blue: #ff9ebd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

header {
    text-align: center;
}

.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Matrix Background Effect */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.05;
    pointer-events: none;
}

/* Profile Image Effects */
.profile-img-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 1rem;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--accent);
    object-fit: cover;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 20px rgba(255, 56, 100, 0.3);
    transition: all 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 56, 100, 0.5);
}

.profile-img-glitch {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--accent);
    z-index: 0;
    animation: glitch 2s infinite;
    opacity: 0.5;
}

/* Glitch Text Effect */
.glitch-text {
    position: relative;
    font-size: 2.5rem;
    color: var(--accent);
    text-shadow: 0 0 10px rgba(255, 56, 100, 0.3);
    animation: textShadow 2s infinite;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icon {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

/* Post List Enhancement */
#post-list {
    list-style: none;
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

#post-list li {
    background-color: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 56, 100, 0.1);
    position: relative;
    overflow: hidden;
    min-height: 150px;
    padding: 0;
}

/* Background image container */
#post-list li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--post-bg);
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    transition: opacity 0.4s ease;
    z-index: 0;
}

/* Dark overlay */
#post-list li::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 15, 0.95) 0%,
        rgba(10, 10, 15, 0.8) 30%,
        rgba(10, 10, 15, 0.4) 70%,
        rgba(10, 10, 15, 0.2) 100%
    );
    z-index: 1;
    transition: opacity 0.4s ease;
}

#post-list li:hover::before {
    opacity: 0.3;
}

#post-list li:hover::after {
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 15, 0.9) 0%,
        rgba(10, 10, 15, 0.7) 40%,
        rgba(10, 10, 15, 0.3) 80%,
        rgba(10, 10, 15, 0.1) 100%
    );
}

#post-list li:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 5px 20px rgba(255, 56, 100, 0.2);
}

.post-link {
    text-decoration: none;
    color: inherit;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 1.5rem;
    z-index: 2;
}

.post-link:hover {
    text-decoration: none;
}

/* Adjust post content positioning */
.post-title {
    font-size: 1.3rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: color 0.3s ease;
    position: relative;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    position: relative;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
}

.tag {
    background-color: rgba(255, 56, 100, 0.15);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--accent);
    border: 1px solid rgba(255, 56, 100, 0.2);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

#post-list li:hover .tag {
    background-color: rgba(255, 56, 100, 0.2);
    border-color: rgba(255, 56, 100, 0.3);
}

.error {
    color: var(--danger);
    text-align: center;
    padding: 2rem;
}

/* Animations */
@keyframes glitch {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
    100% {
        transform: translate(0);
    }
}

@keyframes textShadow {
    0% {
        text-shadow: 0.4389924193300864px 0 1px rgba(255, 56, 100, 0.5), -0.4389924193300864px 0 1px rgba(255, 80, 0, 0.3), 0 0 3px;
    }
    5% {
        text-shadow: 2.7928974010788217px 0 1px rgba(255, 56, 100, 0.5), -2.7928974010788217px 0 1px rgba(255, 80, 0, 0.3), 0 0 3px;
    }
}

/* Content area enhancement */
main {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 56, 100, 0.1);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    position: relative;
}

/* Code block styling */
pre {
    background-color: #1d1f21;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
}

code {
    font-family: 'Fira Code', monospace;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }
    
    .profile-img {
        width: 150px;
        height: 150px;
    }

    /* Adjust content for mobile */
    #content {
        padding: 0.5rem;
    }

    #content h1 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    #content h2 {
        font-size: 1.4rem;
        margin: 2rem 0 1rem;
    }

    #content h3 {
        font-size: 1.2rem;
        margin: 1.5rem 0 0.8rem;
    }

    #content p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    /* Adjust code blocks for mobile */
    #content pre {
        padding: 1rem;
        margin: 1rem 0;
        font-size: 0.9rem;
    }

    #content code {
        font-size: 0.85rem;
    }

    /* Make images responsive */
    #content img {
        margin: 1rem auto;
    }

    #content img + em {
        font-size: 0.8rem;
        max-width: 95%;
    }

    /* Adjust blog banner */
    .blog-banner {
        height: 150px;
        margin: 0 0 1rem;
    }

    /* Adjust blog title */
    .blog-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    /* Adjust back button */
    .back-button {
        font-size: 1rem;
        margin: 0.5rem 0 1rem;
    }

    #post-list li {
        min-height: 120px;
        padding: 1.25rem;
    }
    
    .post-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Additional mobile optimizations for very small screens */
@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }

    #content h1 {
        font-size: 1.8rem;
    }

    #content pre {
        font-size: 0.85rem;
    }

    .blog-banner {
        height: 120px;
    }

    /* Improve table of contents on mobile */
    #content .table-of-contents {
        margin: 1rem 0;
    }

    #content .table-of-contents ul {
        padding-left: 1rem;
    }
}

/* Add these styles to your existing CSS */

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    text-decoration: none;
    font-size: 1.1rem;
    margin: 1rem 0 2rem;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.back-button:hover {
    transform: translateX(-5px);
    opacity: 1;
}

/* Markdown Content Styling */
#content {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
    background: none;
    border: none;
    box-shadow: none;
    padding-right: 0;
}

#content h1 {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 56, 100, 0.2);
}

#content h2 {
    font-size: 1.6rem;
    color: var(--accent);
    margin: 2.5rem 0 1.5rem;
}

#content h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
}

#content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    text-align: justify;
    hyphens: auto;
}

#content ul, #content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

#content li {
    margin-bottom: 0.8rem;
    text-align: justify;
    hyphens: auto;
}

#content code {
    background-color: rgba(255, 56, 100, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--neon-blue);
    word-break: break-word;
    white-space: pre-wrap;
}

#content pre {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    border: 1px solid rgba(255, 56, 100, 0.2);
    overflow-x: auto;
    white-space: pre-wrap;
    white-space: -moz-pre-wrap;
    white-space: -pre-wrap;
    white-space: -o-pre-wrap;
    word-wrap: break-word;
}

#content pre code {
    background-color: transparent;
    padding: 0;
    color: var(--text-primary);
    word-break: break-word;
}

#content blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 1.5rem;
    margin: 2rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

#content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 2rem auto 0.5rem;
    display: block;
    text-align: center;
}

#content img + em {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-style: italic;
    opacity: 0.8;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
}

/* Style markdown links */
#content a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

#content a:hover {
    border-bottom-color: var(--accent);
    color: var(--neon-blue);
}

/* Remove all TOC-related CSS */
.table-of-contents,
.toc-link,
.toc-h3 {
    display: none;
}

/* Reset content width */
#content {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
    background: none;
    border: none;
    box-shadow: none;
    padding-right: 0;
}

/* Make the blog title stand out */
.blog-title {
    font-size: 2.8rem;
    color: var(--accent);
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.blog-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--neon-blue));
    border-radius: 2px;
}

/* Style ToC links with hover effect */
#content .table-of-contents {
    margin: 2rem 0;
}

#content .table-of-contents a {
    text-decoration: none;
    transition: color 0.2s ease, padding-left 0.2s ease;
    display: inline-block;
}

#content .table-of-contents a:hover {
    color: var(--accent);
    padding-left: 5px;
}

/* Indent nested ToC items */
#content .table-of-contents ul ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Add banner styling */
.blog-banner {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin: 0 0 2rem;
    position: relative;
    overflow: hidden;
}

.blog-banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, var(--bg-primary) 0%, transparent 100%);
}

/* Add smooth scrolling behavior to HTML */
html {
    scroll-behavior: smooth;
}

/* Add proper scroll margin to headings */
h1[id],
h2[id],
h3[id],
h4[id],
h5[id],
h6[id] {
    scroll-margin-top: 2rem;
} 