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

.bg-grid {
    background-color: #0a0a0a;
    background-image:
        linear-gradient(rgba(180, 74, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(180, 74, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    min-height: 100vh;
    color: #D3D3D3;
}

.bg-grid::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 50% 40%, rgba(180, 74, 255, 0.06) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Header */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10%;
    position: relative;
    z-index: 1;
}

.logo {
    text-decoration: none;
}

.logo-svg {
    height: 40px;
    width: auto;
}

.nav__links {
    list-style: none;
    display: flex;
    gap: 8px;
}

.nav__links a {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #D3D3D3;
    text-decoration: none;
    position: relative;
    padding: 4px 0;
    transition: color 0.3s;
}

.nav__links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: #b44aff;
    transition: width 0.3s ease;
}

.nav__links a:hover {
    color: #b44aff;
}

.nav__links a:hover::after {
    width: 100%;
}

.nav__links li {
    padding: 0 12px;
}

/* Content */

.content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 20px 40px;
    position: relative;
    z-index: 1;
}

/* Post list */

.page-title {
    font-family: 'Ubuntu Mono', monospace;
    font-size: 1.8rem;
    color: #D3D3D3;
    margin-bottom: 32px;
}

.post-list {
    display: flex;
    flex-direction: column;
}

.post-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 14px 0;
    border-bottom: 1px solid #1a1a1a;
    text-decoration: none;
    transition: border-color 0.3s;
}

.post-item:hover {
    border-color: #b44aff;
}

.post-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: #D3D3D3;
    transition: color 0.3s;
}

.post-item:hover .post-title {
    color: #b44aff;
}

.post-date {
    font-family: 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    color: #666;
    white-space: nowrap;
    margin-left: 20px;
}

/* Single post */

.post-header {
    margin-bottom: 40px;
    border-bottom: 1px solid #222;
    padding-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.post-heading {
    font-family: 'Ubuntu Mono', monospace;
    font-size: 2rem;
    color: #D3D3D3;
    margin: 0 0 16px 0;
    line-height: 1.3;
    text-align: center;
    align-self: center;
}

.post-meta {
    font-family: 'Ubuntu Mono', monospace;
    font-size: 0.8rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.post-tags {
    white-space: nowrap;
}

.post-tags a {
    color: #b44aff;
    text-decoration: none;
    margin-right: 8px;
    transition: opacity 0.3s;
}

.post-tags a:hover {
    opacity: 0.7;
}

.reading-time {
    color: #555;
}

/* Post body */

.post-body {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #bbb;
}

.post-body h2 {
    font-family: 'Ubuntu Mono', monospace;
    color: #D3D3D3;
    font-size: 1.8rem;
    margin: 48px 0 20px;
    padding-bottom: 6px;
    border-bottom: 1px solid #222;
}

.post-body h3 {
    font-family: 'Ubuntu Mono', monospace;
    color: #D3D3D3;
    font-size: 1.5rem;
    margin: 40px 0 16px;
}

.post-body h4 {
    font-family: 'Ubuntu Mono', monospace;
    color: #D3D3D3;
    font-size: 1.25rem;
    margin: 32px 0 12px;
}

.post-body h5 {
    font-family: 'Ubuntu Mono', monospace;
    color: #D3D3D3;
    font-size: 1.15rem;
    margin: 28px 0 10px;
}

.post-body h6 {
    font-family: 'Ubuntu Mono', monospace;
    color: #D3D3D3;
    font-size: 1.05rem;
    margin: 24px 0 8px;
}

.post-body p {
    margin-bottom: 12px;
}

.post-body p:empty {
    display: none;
}

.post-body a {
    color: #b44aff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.post-body a:hover {
    border-bottom-color: #b44aff;
}

.post-body code {
    font-family: 'Ubuntu Mono', monospace;
    background: #1a1a1a;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #d070ff;
}

.post-body pre {
    background: #111 !important;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    margin: 20px 0;
}

.post-body pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.post-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 12px 0;
}

.post-body blockquote {
    border-left: 3px solid #b44aff;
    padding: 8px 16px;
    margin: 20px 0;
    color: #999;
    font-style: italic;
}

.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    overflow-x: auto;
    display: block;
}

.post-body th, .post-body td {
    font-family: 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    padding: 10px 14px;
    border: 1px solid #222;
    text-align: left;
}

.post-body th {
    background: #1a1a1a;
    color: #D3D3D3;
    font-weight: 700;
}

.post-body td {
    color: #aaa;
}

.post-body tr:hover td {
    background: #1a1a1a;
}

.post-body ul, .post-body ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.post-body li {
    margin-bottom: 6px;
}

/* Footer */

footer {
    text-align: center;
    padding: 40px 20px;
    font-family: 'Ubuntu Mono', monospace;
    font-size: 0.8rem;
    color: #444;
    position: relative;
    z-index: 1;
}

/* Responsive */

@media (max-width: 600px) {
    header {
        padding: 15px 5%;
    }

    .logo-svg {
        height: 30px;
    }

    .nav__links a {
        font-size: 14px;
    }

    .nav__links li {
        padding: 0 8px;
    }

    .content {
        padding: 40px 16px 30px;
    }

    .page-title {
        font-size: 1.4rem;
    }

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

    .post-date {
        margin-left: 0;
    }

    .post-heading {
        font-size: 1.5rem;
    }
}
