/* Reset and base styles — matches apoorvdayal.com */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    font-size: 16px;
}

.container {
    max-width: 650px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Typography */
h1 {
    font-size: 2em;
    font-weight: 600;
    margin-bottom: 0.5em;
    color: #000;
}

h2 {
    font-size: 1.3em;
    font-weight: 600;
    margin-top: 2em;
    margin-bottom: 0.8em;
    color: #000;
}

h3 {
    font-size: 1.1em;
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: #000;
}

p {
    margin-bottom: 1em;
}

/* Links */
a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Site Header / Nav */
.site-header {
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 2em;
    padding-bottom: 1em;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5em;
}

.site-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #000;
    text-decoration: none;
}

.site-title:hover {
    text-decoration: none;
    color: #0066cc;
}

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

.nav-links a {
    font-size: 0.9em;
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #0066cc;
    text-decoration: none;
}

/* Post List (Home / Section) */
.post-list {
    list-style: none;
    padding: 0;
}

.post-item {
    margin-bottom: 2em;
    padding-bottom: 2em;
    border-bottom: 1px solid #f0f0f0;
}

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

.post-item-title {
    font-size: 1.15em;
    font-weight: 600;
    margin-bottom: 0.3em;
}

.post-item-title a {
    color: #000;
    text-decoration: none;
}

.post-item-title a:hover {
    color: #0066cc;
}

.post-meta {
    color: #999;
    font-size: 0.85em;
    margin-bottom: 0.5em;
    display: flex;
    align-items: center;
    gap: 0.8em;
    flex-wrap: wrap;
}

.post-meta-separator {
    color: #ddd;
}

.post-description {
    color: #555;
    font-size: 0.95em;
    line-height: 1.5;
}

/* Single Post */
.post-header {
    margin-bottom: 2em;
}

.post-title {
    font-size: 1.8em;
    font-weight: 600;
    color: #000;
    margin-bottom: 0.4em;
    line-height: 1.3;
}

/* Author Byline */
.post-author {
    color: #666;
    font-size: 0.85em;
    margin-top: 0.3em;
}

/* Hero Image */
.post-hero {
    margin: 0 0 2em;
}

.post-hero img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* Share Buttons */
.post-share {
    display: flex;
    align-items: center;
    gap: 0.6em;
    margin-top: 2.5em;
    padding-top: 1.5em;
    border-top: 1px solid #e5e5e5;
}

.share-label {
    font-size: 0.85em;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    color: #555;
    background: #f6f8fa;
    border: 1px solid #e5e5e5;
    text-decoration: none;
    transition: all 0.2s ease;
}

.share-btn:hover {
    text-decoration: none;
}

.share-twitter:hover {
    color: #000;
    background: #e8f5fd;
    border-color: #cce7f8;
}

.share-linkedin:hover {
    color: #0a66c2;
    background: #e8f0fe;
    border-color: #c2d9f2;
}

.post-content {
    line-height: 1.8;
}

.post-content h2 {
    margin-top: 2.5em;
}

.post-content h3 {
    margin-top: 2em;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1.5em 0;
}

.post-content blockquote {
    border-left: 3px solid #0066cc;
    padding-left: 1em;
    margin: 1.5em 0;
    color: #555;
    font-style: italic;
}

.post-content pre {
    background-color: #f6f8fa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 1em;
    overflow-x: auto;
    margin: 1.5em 0;
    font-size: 0.9em;
    line-height: 1.5;
}

.post-content code {
    font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", Menlo, Courier, monospace;
    font-size: 0.9em;
}

.post-content p code,
.post-content li code {
    background-color: #f6f8fa;
    padding: 0.15em 0.4em;
    border-radius: 3px;
    border: 1px solid #e5e5e5;
}

.post-content ul,
.post-content ol {
    margin: 1em 0;
    padding-left: 1.5em;
}

.post-content li {
    margin-bottom: 0.5em;
}

.post-content ul {
    list-style: disc;
}

.post-content ol {
    list-style: decimal;
}

.post-content hr {
    border: none;
    border-top: 1px solid #e5e5e5;
    margin: 2em 0;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

.post-content th,
.post-content td {
    border: 1px solid #e5e5e5;
    padding: 0.6em 1em;
    text-align: left;
}

.post-content th {
    background-color: #f6f8fa;
    font-weight: 600;
}

/* Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-top: 0.5em;
}

.tag {
    display: inline-block;
    padding: 0.3em 0.7em;
    background-color: #f0f4ff;
    color: #0066cc;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
    border: 1px solid #d0e0ff;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag:hover {
    background-color: #d0e0ff;
    text-decoration: none;
}

/* Post Navigation (Prev/Next) */
.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 1em;
    margin-top: 3em;
    padding-top: 2em;
    border-top: 1px solid #e5e5e5;
}

.post-nav a {
    font-size: 0.9em;
    color: #0066cc;
    text-decoration: none;
    max-width: 45%;
}

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

.post-nav .nav-label {
    display: block;
    font-size: 0.8em;
    color: #999;
    margin-bottom: 0.2em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Tag listing page */
.tag-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8em;
}

.tag-list-item a {
    display: inline-block;
    padding: 0.4em 0.8em;
    background-color: #f0f4ff;
    color: #0066cc;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
    border: 1px solid #d0e0ff;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag-list-item a:hover {
    background-color: #d0e0ff;
    text-decoration: none;
    transform: translateY(-2px);
}

.tag-count {
    color: #999;
    font-size: 0.85em;
    margin-left: 0.3em;
}

/* CTF Hint Block (shortcode) */
.ctf-hint {
    background-color: #fffbeb;
    border: 1px solid #fbbf24;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    padding: 1em 1.2em;
    margin: 1.5em 0;
    font-size: 0.95em;
    color: #92400e;
}

.ctf-hint strong {
    color: #78350f;
}

/* Footer */
.site-footer {
    margin-top: 3em;
    padding-top: 1.5em;
    border-top: 1px solid #e5e5e5;
    text-align: center;
    color: #999;
    font-size: 0.85em;
}

.site-footer a {
    color: #999;
}

.site-footer a:hover {
    color: #0066cc;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5em;
    margin-top: 2em;
}

.pagination a,
.pagination span {
    padding: 0.4em 0.8em;
    border-radius: 4px;
    font-size: 0.9em;
    text-decoration: none;
}

.pagination a {
    color: #0066cc;
    border: 1px solid #d0e0ff;
}

.pagination a:hover {
    background-color: #f0f4ff;
    text-decoration: none;
}

.pagination .active {
    background-color: #0066cc;
    color: #fff;
    border: 1px solid #0066cc;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }

    .post-title {
        font-size: 1.4em;
    }

    .site-nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .post-nav {
        flex-direction: column;
    }

    .post-nav a {
        max-width: 100%;
    }
}