:root {
    --bg: #001524;
    --surface: rgba(2, 43, 73, 0.27);
    --surface-strong: rgba(2, 43, 73, 0.42);
    --text: #ffffff;
    --muted: #8892b0;
    --line: rgba(255, 255, 255, 0.08);
    --accent: #15616d;
    --accent-dark: #0f4c56;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.28);

    --bg-color: #001524;
    --text-color: #ffffff;
    --header-bg: rgba(2, 43, 73, 0.27);
    --accent: #15616D;
    --card-bg: #022b4945;
    --card-border: rgba(255, 255, 255, 0.05);
    --muted-text: #8892b0;
    --tech-text: #ccd6f6;
    --nav-mobile-bg: #001524;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Courier New', Courier, monospace;
    color: var(--text);
    background-color: var(--bg-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    color: inherit;
}

.container {
    width: min(1080px, 92%);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(8px);
    background-color: rgba(2, 25, 43, 0.84);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.02em;
}

.site-nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.site-nav a {
    text-decoration: none;
    font-size: 0.92rem;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    border-color: var(--accent);
    color: var(--text);
}

.hero {
    padding: 72px 0 34px;
}

.hero-content {
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(22px, 4vw, 46px);
}

.eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: var(--accent-dark);
    font-family: "IBM Plex Mono", monospace;
    font-weight: 600;
}

.hero h1 {
    margin: 8px 0 12px;
    line-height: 1.2;
    font-size: clamp(1.8rem, 4vw, 2.9rem);
    max-width: 20ch;
}

.hero-text {
    margin: 0;
    color: var(--muted);
    max-width: 62ch;
}

.hero-visual {
    margin: 22px 0 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
}

.hero-visual img {
    display: block;
    width: 50%;
    height: auto;
}

.hero-meta {
    margin-top: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-meta time {
    font-family: "IBM Plex Mono", monospace;
    color: var(--muted);
    font-size: 0.85rem;
}

.button {
    display: inline-block;
    background-color: var(--accent);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.button:hover,
.button:focus-visible {
    background-color: var(--accent-dark);
    transform: translateY(-1px);
}

.posts {
    padding: 28px 0 44px;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-head h2,
.about h2 {
    margin: 0;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
}

.section-link {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--muted);
}

.section-link:hover,
.section-link:focus-visible {
    color: var(--text);
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(230px, 1fr));
    gap: 14px;
}

.post-card {
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.post-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.post-date {
    margin: 0;
    color: var(--accent-dark);
    font-size: 0.75rem;
    font-family: "IBM Plex Mono", monospace;
}

.post-thumb {
    margin: 2px 0 4px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
}

.post-thumb img {
    display: block;
    width: 50%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.post-card h3 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.35;
}

.post-card p {
    margin: 0;
    color: var(--muted);
}

.post-card a {
    margin-top: 10px;
    text-decoration: none;
    width: fit-content;
    font-size: 0.92rem;
    color: var(--text);
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.post-card a:hover,
.post-card a:focus-visible {
    border-color: var(--accent);
    color: var(--text);
}

.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(2, 25, 43, 0.72);
    margin-top: auto;
}

.footer-content {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-content p {
    color: var(--muted);
}

@media (max-width: 640px) {
    .topbar {
        min-height: 64px;
    }

    .site-nav {
        gap: 12px;
    }

    .site-nav a {
        font-size: 0.82rem;
    }

    .hero {
        padding-top: 44px;
    }

    .hero-meta {
        align-items: flex-start;
    }
}

.loading {
    color: var(--muted);
    font-size: 0.9rem;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.page-btn:hover:not([disabled]) {
    background-color: var(--surface-strong);
    border-color: var(--accent);
    color: var(--text);
}

.page-btn.active {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 700;
    cursor: default;
}



.page-ellipsis {
    color: var(--muted);
    font-size: 0.9rem;
    padding: 0 4px;
    user-select: none;
}


/* Post Pages */
.post-hero {
    padding: 60px 0 0;
}

.post-hero .container {
    display: grid;
    gap: 28px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--muted);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.82rem;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--text);
}

.back-link::before {
    content: '←';
}

.post-meta-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.post-meta-row time {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.82rem;
    color: var(--muted);
}

.post-meta-row .dot {
    color: var(--line);
}

.post-title {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.15;
    max-width: 22ch;
}

.post-description {
    margin: 0;
    color: var(--muted);
    font-size: 1.08rem;
    max-width: 60ch;
    line-height: 1.7;
}

.post-cover {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
}

.post-cover img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 7;
    object-fit: cover;
}


.post-body {
    padding: 8px 0 18px;
}

.post-content {
    width: min(860px, 100%);
    margin: 0 0;
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    line-height: 1.9;
    letter-spacing: 0.01em;
    color: var(--text);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    line-height: 1.25;
    margin-bottom: 0.55em;
    letter-spacing: -0.01em;
}

.post-content h1 {
    margin-top: 1.8em;
    font-size: clamp(1.8rem, 4.2vw, 2.5rem);
}

.post-content h2 {
    margin: 2.1em 0 0.6em;
    font-size: clamp(1.4rem, 3vw, 1.75rem);
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.4em;
}

.post-content h3 {
    margin: 1.65em 0 0.5em;
    font-size: clamp(1.18rem, 2.3vw, 1.35rem);
}

.post-content h4 {
    margin: 1.5em 0 0.45em;
    font-size: 1.08rem;
    color: #d8e6ff;
}

.post-content h5,
.post-content h6 {
    margin: 1.4em 0 0.45em;
    font-size: 0.98rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.post-content p {
    margin: 0 0 1.2em;
    color: #e9f1ff;
}

.post-content a {
    color: #48d5ea;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
    word-break: break-word;
}

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

.post-content ul,
.post-content ol {
    padding-left: 1.6em;
    margin: 0.2em 0 1.4em;
}

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

.post-content li::marker {
    color: var(--accent-dark);
}

.post-content .checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    list-style: none;
    margin-left: -1.2em;
}

.post-content .checklist-item input[type="checkbox"] {
    margin-top: 0.28em;
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: default;
}

.post-content blockquote {
    margin: 1.6em 0;
    padding: 14px 18px;
    border-left: 3px solid var(--accent);
    background-color: var(--surface);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: #d3e3ff;
}

.post-content blockquote p {
    margin: 0 0 0.8em;
}

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

.post-content code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9em;
    background-color: var(--surface-strong);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 2px 6px;
}

.post-content pre {
    background: linear-gradient(180deg, rgba(8, 32, 52, 0.92), rgba(2, 29, 48, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    padding: 18px;
    overflow-x: auto;
    margin: 0 0 1.4em;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.post-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.85rem;
    line-height: 1.65;
    color: #d4f5ff;
}

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

.post-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1em auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
}

.post-content .table-wrap {
    overflow-x: auto;
    margin: 0 0 1.5em;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background-color: rgba(2, 43, 73, 0.18);
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}

.post-content th,
.post-content td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.post-content thead th {
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9fcbe5;
    background-color: rgba(255, 255, 255, 0.03);
}

.post-content tbody tr:last-child td {
    border-bottom: none;
}

.post-content del {
    color: var(--muted);
}

@media (max-width: 768px) {
    .post-content {
        width: 100%;
        font-size: 0.98rem;
        line-height: 1.8;
    }

    .post-content pre {
        padding: 14px;
    }

    .post-content table {
        min-width: 460px;
    }
}

.post-loading,
.post-error {
    padding: 120px 0;
    text-align: center;
    color: var(--muted);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
}

.post-error strong {
    display: block;
    font-size: 2rem;
    margin-bottom: 8px;
    color: var(--text);
}

/* Dashboard */
.admin-page {
    background:
        linear-gradient(180deg, rgba(0, 21, 36, 0.98), rgba(0, 21, 36, 0.92));
}

.admin-main {
    padding: 36px 0 48px;
}

.admin-posts {
    display: grid;
    gap: 18px;
}

.admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0 0;
}

.admin-head h1 {
    margin: 6px 0 0;
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    line-height: 1.1;
}

.create-post-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: var(--radius-sm);
    background-color: var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
}

.create-post-btn:hover,
.create-post-btn:focus-visible {
    background-color: var(--accent-dark);
}

.post-list {
    display: grid;
    gap: 10px;
}

.post-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background-color: var(--surface);
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.post-row:hover,
.post-row:focus-visible {
    border-color: var(--accent);
    background-color: var(--surface-strong);
}

.post-row-title {
    font-size: 0.98rem;
    font-weight: 700;
}

.post-row-meta {
    color: var(--muted);
    font-size: 0.84rem;
    flex: 0 0 auto;
}

.admin-pagination {
    margin-top: 4px;
    justify-content: flex-start;
}

.admin-link {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.92rem;
}

@media (max-width: 640px) {
    .admin-main {
        padding-top: 24px;
    }

    .admin-head,
    .post-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-link {
        font-size: 0.82rem;
    }
}

/*
    Login Page Styles
*/
.auth-page {
    background:
        linear-gradient(180deg, rgba(0, 21, 36, 0.98), rgba(0, 21, 36, 0.92));
}

.auth-main {
    display: grid;
    place-items: center;
    padding: 32px 0 40px;
}

.login-container {
    width: min(100%, 460px);
    margin: 0 auto;
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}
.login-container h2 {
    margin: 0 0 24px;
    font-size: 1.8rem;
    text-align: center;
}
.login-container h1 {
    margin: 8px 0 10px;
    font-size: clamp(1.6rem, 3.6vw, 2.1rem);
    line-height: 1.15;
}
.login-intro {
    margin: 0 0 24px;
}
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.field-group {
    display: grid;
    gap: 8px;
}
.login-container label {
    font-size: 0.9rem;
    color: var(--muted);
}
.login-container input {
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);                   
    background-color: transparent;
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}
.login-container input:focus {
    border-color: var(--accent);
    outline: none;
}
.login-container button {
    padding: 12px 0;
    background-color: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.login-container button:hover {
    background-color: var(--accent-dark);
} 

.auth-footer .footer-content {
    min-height: 58px;
}