/* ============================================
   Perxibes Blog — raw
   ============================================ */

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

:root {
    --bg: #0d0d0d;
    --bg-card: #141414;
    --text: #c8c8c8;
    --text-dim: #666;
    --accent: #c33;
    --border: #222;
    --mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Cascadia Code', 'Courier New', monospace;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--mono);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--accent);
    color: #fff;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* =========== HEADER =========== */

header {
    border-bottom: 1px solid var(--border);
}

nav {
    max-width: 660px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
}

.logo {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
}

.logo-url {
    color: var(--accent);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-url:hover {
    text-decoration: none;
    opacity: 0.8;
}

.logo-url img {
    border-radius: 4px;
}

.nav-links {
    display: flex;
    gap: 1.25rem;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.8rem;
}

.nav-links a:hover {
    color: var(--text);
    text-decoration: none;
}

.nav-links a.active {
    color: var(--accent);
}

/* =========== MAIN =========== */

main {
    flex: 1;
    max-width: 660px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* =========== PAGE HERO =========== */

.page-hero {
    padding: 3rem 0 1.5rem;
}

.page-hero h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
}

.page-hero .accent {
    color: var(--accent);
}

.page-hero p {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* =========== POSTS LIST =========== */

.posts-list {
    display: flex;
    flex-direction: column;
    padding: 1rem 0 3rem;
}

.post-preview {
    position: relative;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.post-preview:first-child {
    border-top: 1px solid var(--border);
}

.post-preview:hover {
    background: var(--bg-card);
}

.post-preview h2 {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-dim);
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
}

.excerpt {
    color: var(--text-dim);
    font-size: 0.8rem;
    line-height: 1.5;
}

/* =========== TAGS =========== */

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    color: var(--text-dim);
    font-size: 0.7rem;
    text-decoration: none;
}

.tag::before {
    content: '#';
}

.tag:hover {
    color: var(--accent);
    text-decoration: none;
}

/* =========== ABOUT PAGE =========== */

.about-page {
    padding: 3rem 0;
}

.about-hero {
    margin-bottom: 2.5rem;
}

.about-avatar {
    width: 64px;
    height: 64px;
    border-radius: 4px;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

.about-hero h1 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.about-hero h1 .accent {
    color: var(--accent);
}

.about-hero .subtitle {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.7;
}

.about-section {
    margin-bottom: 2rem;
}

.about-section h2 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--accent);
}

.about-section h2::before {
    content: '> ';
}

.about-topics {
    color: var(--text-dim);
    font-size: 0.85rem;
    line-height: 1.8;
}

.about-topics li {
    list-style: none;
}

.about-topics li::before {
    content: '- ';
    color: var(--accent);
}

.about-gif {
    margin: 2rem 0;
}

.about-gif img {
    max-width: 320px;
    width: 100%;
    border: 1px solid var(--border);
}

.about-gif figcaption {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
    font-style: italic;
}

.about-links {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.about-links a {
    color: var(--text-dim);
    font-size: 0.8rem;
}

.about-links a:hover {
    color: var(--accent);
}

.about-links a::before {
    content: '[';
    color: var(--text-dim);
}

.about-links a::after {
    content: ']';
    color: var(--text-dim);
}

.about-callout {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    color: var(--text-dim);
    font-style: italic;
    font-size: 0.8rem;
    margin-top: 2rem;
}

/* =========== POST ARTICLE =========== */

.post-article {
    padding: 3rem 0 4rem;
}

.post-article > h1 {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.post-article > .post-meta {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

/* =========== POST CONTENT =========== */

.post-content {
    color: var(--text);
    line-height: 1.8;
    font-size: 0.9rem;
}

.post-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.post-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content ul,
.post-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.post-content li {
    margin-bottom: 0.3rem;
}

.post-content code {
    background: var(--bg-card);
    padding: 0.15rem 0.4rem;
    font-size: 0.85em;
    color: var(--accent);
    border: 1px solid var(--border);
}

.post-content pre {
    background: var(--bg-card);
    padding: 1rem 1.25rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
    line-height: 1.5;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: var(--text);
    font-size: 0.8rem;
    border: none;
}

.post-content blockquote {
    border-left: 2px solid var(--accent);
    padding: 0.5rem 1rem;
    margin: 1.5rem 0;
    color: var(--text-dim);
    font-style: italic;
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

.post-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content a:hover {
    color: #fff;
}

.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

.post-author {
    margin-top: 2.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    opacity: 0.6;
}

.post-author a {
    color: var(--accent);
    text-decoration: none;
}

.post-author a:hover {
    text-decoration: underline;
}

/* =========== TAGS PAGE =========== */

.tags-page {
    padding: 0 0 3rem;
}

.intro {
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

.tag-index {
    list-style: none;
    padding: 0;
    margin: 0 0 2.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.8rem;
}

.tag-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.tag-link small {
    color: var(--text-dim);
    font-size: 0.7rem;
    opacity: 0.6;
}

.tag-group {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.tag-group:last-of-type {
    border-bottom: none;
}

.tag-group h2 {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--accent);
}

.tag-meta {
    color: var(--text-dim);
    font-size: 0.75rem;
    margin: 0 0 0.75rem;
}

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

.post-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.4rem 0;
    gap: 1rem;
}

.post-title {
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
}

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

time {
    color: var(--text-dim);
    font-size: 0.75rem;
    white-space: nowrap;
}

/* =========== STRETCHED LINK =========== */

.post-preview h2 a {
    color: var(--text);
    text-decoration: none;
}

.post-preview h2 a:hover {
    color: var(--accent);
    text-decoration: none;
}

.stretched-link {
    color: inherit;
    text-decoration: none;
    position: static;
}

.stretched-link::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    cursor: pointer;
}

/* =========== TABLES =========== */

table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.5rem 0;
    color: var(--text);
    font-size: 0.8rem;
    display: block;
    overflow-x: auto;
    border: 1px solid var(--border);
}

thead {
    background: var(--bg-card);
}

thead th {
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
}

td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-card); }

/* =========== FOOTER =========== */

footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.7rem;
    margin-top: auto;
    line-height: 1.6;
}

/* =========== RESPONSIVE =========== */

@media (max-width: 768px) {
    nav { padding: 0 1rem; }
    main { padding: 0 1rem; }

    .page-hero h1 { font-size: 1.2rem; }

    .about-hero h1 { font-size: 1.1rem; }

    .post-article > h1 { font-size: 1.2rem; }

    .post-content { font-size: 0.85rem; }

    .post-list li {
        flex-direction: column;
        gap: 0.1rem;
    }
}

@media (max-width: 480px) {
    nav {
        flex-direction: column;
        height: auto;
        padding: 0.75rem 1rem;
        gap: 0.4rem;
    }
}
.post-preview:nth-child(7) { animation-delay: 0.3s; }
.post-preview:nth-child(8) { animation-delay: 0.35s; }
.post-preview:nth-child(9) { animation-delay: 0.4s; }
.post-preview:nth-child(10) { animation-delay: 0.45s; }

.about-card {
    animation: fadeInUp 0.5s ease both;
}

.about-card:nth-child(1) { animation-delay: 0.1s; }
.about-card:nth-child(2) { animation-delay: 0.2s; }
.about-card:nth-child(3) { animation-delay: 0.3s; }
.about-card:nth-child(4) { animation-delay: 0.4s; }
.about-card:nth-child(5) { animation-delay: 0.5s; }

.tag-group {
    animation: fadeInUp 0.4s ease both;
}

.tag-group:nth-child(1) { animation-delay: 0s; }
.tag-group:nth-child(2) { animation-delay: 0.05s; }
.tag-group:nth-child(3) { animation-delay: 0.1s; }
.tag-group:nth-child(4) { animation-delay: 0.15s; }
.tag-group:nth-child(5) { animation-delay: 0.2s; }
