/* ==========================================================================
   Zuper Labs Ghost Theme - screen.css
   Blog stylesheet for all non-homepage pages
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;600;700&display=swap');

/* --------------------------------------------------------------------------
   1. Reset & Base
   -------------------------------------------------------------------------- */

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

html {
    font-size: 62.5%;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
        Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    font-size: 1.8rem;
    line-height: 1.7;
    color: #39383c;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #fd5000;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #ff8c42;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --------------------------------------------------------------------------
   2. Typography
   -------------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inconsolata', 'Courier New', monospace;
    font-weight: 700;
    line-height: 1.3;
    color: #39383c;
}

h1 { font-size: 3.6rem; }
h2 { font-size: 2.8rem; }
h3 { font-size: 2.2rem; }
h4 { font-size: 1.8rem; }

p {
    margin-bottom: 1.6rem;
}

blockquote {
    border-left: 4px solid #fd5000;
    padding-left: 2rem;
    margin: 2.4rem 0;
    font-style: italic;
    color: #5a595e;
}

pre {
    background: #1e1e2e;
    border: 1px solid #313244;
    border-radius: 6px;
    padding: 2rem;
    overflow-x: auto;
    font-family: 'Inconsolata', 'Courier New', monospace;
    font-size: 1.4rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: #cdd6f4;
}

code {
    font-family: 'Inconsolata', 'Courier New', monospace;
    font-size: 0.88em;
    background: #f0ece4;
    color: #cc4400;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
}

pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: inherit;
    font-size: inherit;
}

hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, #fd5000 20%, #fd5000 80%, transparent);
    margin: 4.8rem 0;
    opacity: 0.4;
}

/* --------------------------------------------------------------------------
   3. Navigation
   -------------------------------------------------------------------------- */

.site-nav {
    background: #39383c;
    padding: 0 3.2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.site-brand {
    font-family: 'Inconsolata', 'Courier New', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: #fd5000;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.site-brand:hover {
    color: #ff8c42;
}

.site-brand img {
    height: 36px;
    width: auto;
    vertical-align: middle;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 2.4rem;
    align-items: center;
}

.nav-item a {
    font-family: 'Inconsolata', 'Courier New', monospace;
    font-size: 1.4rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-item a:hover,
.nav-item.active a {
    color: #fd5000;
    border-bottom-color: #fd5000;
}

/* --------------------------------------------------------------------------
   4. Site Content
   -------------------------------------------------------------------------- */

.site-content {
    min-height: calc(100vh - 60px - 120px);
}

/* --------------------------------------------------------------------------
   5. Blog Listing (index.hbs)
   -------------------------------------------------------------------------- */

.blog-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4.8rem 3.2rem;
}

.blog-header {
    text-align: center;
    margin-bottom: 4.8rem;
    padding-bottom: 3.2rem;
    border-bottom: 1px solid #e0e0e0;
}

.blog-title {
    font-size: 4rem;
    margin-bottom: 0.8rem;
}

.blog-description {
    font-size: 1.8rem;
    color: #6b6a6e;
    max-width: 600px;
    margin: 0 auto;
}

/* --------------------------------------------------------------------------
   6. Post Cards
   -------------------------------------------------------------------------- */

.post-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 3.2rem;
    margin-bottom: 4.8rem;
}

.post-card {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.post-card:hover {
    box-shadow: 0 8px 24px rgba(57, 56, 60, 0.12);
    transform: translateY(-2px);
}

.post-card-image-link {
    display: block;
    overflow: hidden;
}

.post-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: top;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-image {
    transform: scale(1.03);
}

.post-card-content {
    padding: 2rem 2.4rem 2.4rem;
}

.post-card-tag {
    font-family: 'Inconsolata', 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fd5000;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.post-card-title {
    font-size: 2.2rem;
    margin: 0.8rem 0 1.2rem;
    line-height: 1.3;
}

.post-card-title a {
    color: #39383c;
}

.post-card-title a:hover {
    color: #fd5000;
}

.post-card-excerpt {
    font-size: 1.6rem;
    color: #6b6a6e;
    line-height: 1.6;
    margin-bottom: 1.6rem;
}

.post-card-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    font-size: 1.3rem;
    color: #9a999d;
    font-family: 'Inconsolata', 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.post-card-designation {
    flex-basis: 100%;
    font-size: 1.1rem;
    opacity: 0.7;
    margin-top: 2px;
}

/* --------------------------------------------------------------------------
   7. Single Post / Page
   -------------------------------------------------------------------------- */

.post-full {
    max-width: 780px;
    margin: 0 auto;
    padding: 4.8rem 3.2rem;
}

.post-back-link {
    margin-bottom: 2.4rem;
}

.post-back-link a {
    font-family: 'Inconsolata', 'Courier New', monospace;
    font-size: 1.4rem;
    color: #fd5000;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-back-link a:hover {
    color: #ff8c42;
}

.post-reading-time {
    color: #9a999d;
}

.post-full-header {
    margin-bottom: 3.2rem;
}

.post-full-title {
    font-size: 4.2rem;
    margin-bottom: 1.6rem;
    line-height: 1.2;
}

.post-full-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.6rem;
    align-items: center;
    font-family: 'Inconsolata', 'Courier New', monospace;
    font-size: 1.4rem;
    color: #6b6a6e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.post-full-meta a {
    color: #fd5000;
}

.post-full-image {
    margin-bottom: 3.2rem;
    border-radius: 6px;
    overflow: hidden;
}

.post-full-image img {
    width: 100%;
}

/* Ghost Editor Card Widths */
.kg-width-wide {
    position: relative;
    width: 85vw;
    min-width: 100%;
    margin-left: calc(50% - 42.5vw);
    margin-right: calc(50% - 42.5vw);
}

.kg-width-full {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.kg-width-full img {
    max-width: 100vw;
}

/* Ghost Card: Image */
.kg-image-card {
    margin: 3.2rem 0;
}

.kg-image {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.kg-image-card figcaption {
    text-align: center;
    font-size: 1.4rem;
    color: #9a999d;
    margin-top: 1rem;
    font-style: italic;
}

/* Ghost Card: Callout */
.kg-callout-card {
    display: flex;
    gap: 1.2rem;
    padding: 2rem;
    border-radius: 6px;
    margin: 2.4rem 0;
    background: #fdf5ef;
    border-left: 4px solid #fd5000;
}

.kg-callout-emoji {
    font-size: 2rem;
    flex-shrink: 0;
}

.kg-callout-text {
    font-size: 1.6rem;
    line-height: 1.6;
    color: #39383c;
}

/* Ghost Card: Toggle */
.kg-toggle-card {
    margin: 2rem 0;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.kg-toggle-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.6rem 2rem;
    cursor: pointer;
    background: #fafafa;
    font-weight: 600;
}

.kg-toggle-content {
    padding: 0 2rem 1.6rem;
}

/* Ghost Card: Bookmark */
.kg-bookmark-card {
    margin: 2.4rem 0;
}

.kg-bookmark-container {
    display: flex;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease;
}

.kg-bookmark-container:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.kg-bookmark-content {
    flex: 1;
    padding: 2rem;
}

.kg-bookmark-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: #39383c;
    margin-bottom: 0.6rem;
}

.kg-bookmark-description {
    font-size: 1.4rem;
    color: #6b6a6e;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.kg-bookmark-metadata {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1.2rem;
    font-size: 1.3rem;
    color: #9a999d;
}

.kg-bookmark-icon {
    width: 20px;
    height: 20px;
}

.kg-bookmark-thumbnail {
    width: 160px;
    flex-shrink: 0;
}

.kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ghost Card: Button */
.kg-button-card {
    text-align: center;
    margin: 2.4rem 0;
}

.kg-btn {
    display: inline-block;
    padding: 1.2rem 3.2rem;
    background: #fd5000;
    color: #ffffff;
    font-family: 'Inconsolata', 'Courier New', monospace;
    font-size: 1.4rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.kg-btn:hover {
    background: #ff8c42;
    color: #ffffff;
}

/* Post Content Styles */
.post-full-content {
    font-size: 1.8rem;
    line-height: 1.8;
}

/* Hide empty headings generated by Ghost editor */
.post-full-content h1:empty,
.post-full-content h2:empty,
.post-full-content h3:empty {
    display: none;
}

.post-full-content h2 {
    margin-top: 4.8rem;
    margin-bottom: 1.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #f0f0f0;
}

.post-full-content h3 {
    margin-top: 3.2rem;
    margin-bottom: 1rem;
}

.post-full-content ul,
.post-full-content ol {
    margin-bottom: 2rem;
    padding-left: 2.4rem;
}

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

.post-full-content li strong {
    color: #39383c;
}

.post-full-content img {
    margin: 2.4rem 0;
    border-radius: 6px;
}

.post-full-content a {
    color: #fd5000;
    text-decoration: underline;
    text-decoration-color: rgba(253, 80, 0, 0.3);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.2s ease;
}

.post-full-content a:hover {
    text-decoration-color: #fd5000;
}

.post-full-content figure {
    margin: 2.4rem 0;
}

.post-full-content figcaption {
    text-align: center;
    font-size: 1.4rem;
    color: #9a999d;
    margin-top: 0.8rem;
}

.post-full-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.post-full-content th,
.post-full-content td {
    border: 1px solid #e0e0e0;
    padding: 1rem 1.4rem;
    text-align: left;
}

.post-full-content th {
    background: #f5f5f5;
    font-family: 'Inconsolata', 'Courier New', monospace;
    font-weight: 600;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Author Card */
.post-full-footer {
    margin-top: 4.8rem;
    padding-top: 3.2rem;
    border-top: 1px solid #e0e0e0;
}

.author-card {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.author-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-name {
    font-size: 1.8rem;
    margin-bottom: 0.4rem;
}

.author-name a {
    color: #39383c;
}

.author-name a:hover {
    color: #fd5000;
}

.author-designation {
    display: block;
    font-size: 1.3rem;
    color: #6b6a6e;
    opacity: 0.8;
    margin-top: 2px;
    margin-bottom: 0.4rem;
}

.post-author-designation {
    opacity: 0.7;
}

.author-bio {
    font-size: 1.5rem;
    color: #6b6a6e;
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   8. Error Page
   -------------------------------------------------------------------------- */

.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 4.8rem 3.2rem;
}

.error-code {
    font-size: 12rem;
    font-family: 'Inconsolata', 'Courier New', monospace;
    font-weight: 700;
    color: #fd5000;
    line-height: 1;
    margin-bottom: 1.6rem;
}

.error-message {
    font-size: 2rem;
    color: #6b6a6e;
    margin-bottom: 3.2rem;
}

.error-link {
    display: inline-block;
    font-family: 'Inconsolata', 'Courier New', monospace;
    font-size: 1.4rem;
    font-weight: 600;
    color: #ffffff;
    background: #fd5000;
    padding: 1.2rem 3.2rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: background 0.2s ease;
}

.error-link:hover {
    color: #ffffff;
    background: #ff8c42;
}

/* --------------------------------------------------------------------------
   9. Pagination
   -------------------------------------------------------------------------- */

.pagination-wrap {
    text-align: center;
    padding: 2.4rem 0;
}

.pagination {
    display: inline-flex;
    align-items: center;
    gap: 2rem;
    font-family: 'Inconsolata', 'Courier New', monospace;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pagination a {
    display: inline-block;
    padding: 0.8rem 2rem;
    color: #fd5000;
    border: 2px solid #fd5000;
    border-radius: 4px;
    transition: background 0.2s ease, color 0.2s ease;
}

.pagination a:hover {
    background: #fd5000;
    color: #ffffff;
}

.page-number {
    color: #9a999d;
}

/* --------------------------------------------------------------------------
   10. Footer
   -------------------------------------------------------------------------- */

.site-footer {
    background: #39383c;
    padding: 3.2rem;
    margin-top: 4.8rem;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.4rem;
    color: #9a999d;
    font-family: 'Inconsolata', 'Courier New', monospace;
}

.footer-powered a {
    color: #fd5000;
}

.footer-powered a:hover {
    color: #ff8c42;
}

/* --------------------------------------------------------------------------
   11. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    html {
        font-size: 58%;
    }

    .nav-inner {
        flex-direction: column;
        height: auto;
        padding: 1.2rem 0;
        gap: 0.8rem;
    }

    .nav-list {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.2rem;
    }

    .blog-container {
        padding: 3.2rem 2rem;
    }

    .post-feed {
        grid-template-columns: 1fr;
        gap: 2.4rem;
    }

    .blog-title {
        font-size: 3rem;
    }

    .post-full {
        padding: 3.2rem 2rem;
    }

    .post-full-title {
        font-size: 3rem;
    }

    .post-full-meta {
        flex-direction: column;
        gap: 0.4rem;
        align-items: flex-start;
    }

    .author-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-inner {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }

    .error-code {
        font-size: 8rem;
    }
}

@media (max-width: 480px) {
    .site-nav {
        padding: 0 1.6rem;
    }

    .blog-container {
        padding: 2.4rem 1.6rem;
    }

    .post-full {
        padding: 2.4rem 1.6rem;
    }

    .post-card-content {
        padding: 1.6rem;
    }
}
