/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00d4aa;
    --secondary-color: #00ff88;
    --dark-teal: #0a4d3e;
    --light-teal: #1a7a66;
    --dark-bg: #0a0f1a;
    --light-bg: #1a1f2a;
    --text-primary: #ffffff;
    --text-secondary: #b8c5d1;
    --border-color: #2a3a4a;
    --card-bg: #1e2835;
    --hover-bg: #253242;
    --gradient-1: linear-gradient(135deg, var(--dark-teal) 0%, var(--primary-color) 100%);
    --gradient-2: linear-gradient(135deg, var(--dark-bg) 0%, var(--light-bg) 100%);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

main {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Global responsive image rule - safety net */
img {
    max-width: 100%;
    height: auto;
}

/* Override for specific cases that need different behavior */
.book-cover,
.platform-badge,
.blog-post-image-logo-overlay img {
    /* These have specific sizing requirements */
}

.page-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.navbar {
    background: rgba(10, 15, 26, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: 1px;
}

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

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    background: var(--gradient-2);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.book-cover-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.book-cover {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 212, 170, 0.3);
    transition: transform 0.3s ease;
}

.book-cover:hover {
    transform: translateY(-5px) scale(1.02);
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-text .subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.hero-text .author {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 2rem;
}

.hero-text .description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.hero-text .description p {
    margin-bottom: 1rem;
}

.hero-text .description p:last-child {
    margin-bottom: 0;
}

.hero-text .description strong {
    color: var(--primary-color);
    font-weight: 600;
}

.hero-text .description ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.hero-text .description li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* Purchase Section */
.purchase-section {
    padding: 5rem 0;
    background: var(--dark-bg);
}

.purchase-section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* Featured Platforms Section */
.featured-platforms {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.featured-platform-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
    padding: 1.5rem;
    border-radius: 12px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
}

.featured-platform-card:hover {
    transform: translateY(-5px) scale(1.02);
}

.featured-platform-card.featured-apple:hover {
    border-color: #007AFF;
    box-shadow: 0 10px 30px rgba(0, 122, 255, 0.3);
}

.featured-platform-card.featured-kobo:hover {
    border-color: #7324BC;
    box-shadow: 0 10px 30px rgba(115, 36, 188, 0.3);
}

a.featured-platform-card.featured-kindle:hover {
    border-color: #FF9900 !important;
    box-shadow: 0 10px 30px rgba(255, 153, 0, 0.3);
}

.platform-badge {
    max-width: 180px;
    height: auto;
    display: block;
    margin-bottom: 1rem;
}

.featured-platform-card .platform-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.other-platforms-title {
    text-align: center;
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 600;
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.platform-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.platform-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    background: var(--hover-bg);
    box-shadow: 0 10px 30px rgba(0, 212, 170, 0.2);
}

.platform-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.platform-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.platform-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* About Section */
.about-section {
    padding: 4rem 0;
    background: var(--gradient-2);
    min-height: calc(100vh - 200px);
}

.about-section h1 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.about-text {
    text-align: center;
}

.about-text h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-text strong {
    color: var(--primary-color);
}

.placeholder-image,
.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.placeholder-image {
    width: 100%;
    aspect-ratio: 3/4;
    background: var(--card-bg);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* Press Section */
/* Shared long-form typography */
.prose {
    max-width: 900px;
    margin: 0 auto;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.1rem;
}
.prose h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 2.5rem 0 1rem;
    font-weight: 600;
}
.prose h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
    font-weight: 600;
}
.prose p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}
.prose ul, .prose ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}
.prose li {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
}
.prose a {
    color: var(--primary-color);
    text-decoration: none;
}
.prose a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}
.prose strong {
    color: var(--text-primary);
}

.press-section {
    padding: 4rem 0;
    background: var(--gradient-2);
    min-height: calc(100vh - 200px);
}

.press-section h1 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.press-content {
    max-width: 900px;
    margin: 0 auto;
    color: var(--text-secondary);
    line-height: 1.8;
    font-family: inherit;
    font-size: inherit;
    width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
    overflow-x: hidden;
}

.press-content h2,
.press-content h3 {
    overflow-wrap: break-word;
}

.press-content p,
.press-content li {
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.press-content a {
    word-break: break-word;
}

.press-for-immediate-release {
    text-align: center;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.press-content h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 2.5rem 0 1rem;
    text-align: center;
}

.press-content h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.press-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    font-family: inherit;
}

.press-content ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
    list-style-type: disc;
    color: var(--text-secondary);
}

.press-content li {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
    font-family: inherit;
}

.press-content a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.press-content a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Press: make section headers match About's green styling */
.press-section .press-content h3 {
    color: var(--primary-color);
}

.press-section .press-content strong {
    color: var(--primary-color);
}

.press-book-info {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    font-family: inherit;
}

.press-book-info h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-family: inherit;
}

.press-book-info p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-family: inherit;
}

/* Contact Section */
.contact-section {
    padding: 4rem 0;
    background: var(--gradient-2);
    min-height: calc(100vh - 200px);
}

.contact-section h1 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-section .section-subtitle {
    max-width: 700px;
    margin: 0 auto 3rem;
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.error-message {
    display: block;
    color: #ff6b6b;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    min-height: 1.25rem;
}

.submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--gradient-1);
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 170, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.form-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.form-message.success {
    display: block;
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.form-message.error {
    display: block;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
}

/* Footer */
footer {
    background: var(--dark-bg);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
}

footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-text h1 {
        font-size: 2.5rem;
        text-align: center;
    }

    .hero-text .subtitle,
    .hero-text .author,
    .hero-text .description {
        text-align: center;
    }

    .platforms-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .featured-platforms {
        gap: 1.5rem;
    }

    .platform-badge {
        max-width: 150px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--dark-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .contact-form {
        padding: 2rem 1.5rem;
    }

    .platforms-grid {
        grid-template-columns: 1fr;
    }

    .featured-platforms {
        flex-direction: column;
        align-items: center;
    }

    .featured-platform-card {
        width: 100%;
        max-width: 300px;
    }


    .platform-badge {
        max-width: 160px;
    }

    .purchase-section h2,
    .about-section h1,
    .contact-section h1,
    .page-title {
        font-size: 2rem;
    }

    /* Press Section Mobile Optimizations */
    .press-section {
        padding: 2rem 0;
    }

    .press-section h1 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .press-content {
        padding: 0 1rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .press-content h2 {
        font-size: 1.5rem;
        margin: 2rem 0 1rem;
        line-height: 1.3;
    }

    .press-content h3 {
        font-size: 1.25rem;
        margin: 1.5rem 0 0.75rem;
        line-height: 1.4;
        color: var(--primary-color);
    }

    .press-content p {
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 1.25rem;
    }

    .press-content ul {
        padding-left: 1.5rem;
        margin: 1.25rem 0;
    }

    .press-content li {
        margin-bottom: 0.75rem;
        line-height: 1.6;
    }

    .press-for-immediate-release {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .press-book-info {
        padding: 1.5rem;
        margin-top: 2rem;
    }

    .press-book-info h3 {
        font-size: 1.25rem;
    }

    .press-book-info p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 2rem 0;
    }

    .purchase-section,
    .about-section,
    .contact-section {
        padding: 3rem 0;
    }

    /* Extra Small Mobile - Press Section */
    .press-section {
        padding: 1.5rem 0;
    }

    .press-section h1 {
        font-size: 1.75rem;
    }

    .page-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .press-content {
        padding: 0 0.75rem;
    }

    .press-content h2 {
        font-size: 1.35rem;
    }

    .press-content h3 {
        font-size: 1.15rem;
        color: var(--primary-color);
    }

    .press-content p {
        font-size: 0.95rem;
    }

    .press-book-info {
        padding: 1.25rem;
    }

    /* Extra Small Mobile - Blog Section */
    .blog-listing-section {
        padding: 1.5rem 0;
    }

    .blog-page-title {
        font-size: 1.75rem;
    }

    .blog-page-subtitle {
        font-size: 0.95rem;
        padding: 0 0.75rem;
    }

    .blog-post-card .blog-card-content,
    .blog-card-content {
        padding: 1.5rem 1.25rem;
    }

    .blog-post-title {
        font-size: 1.35rem;
    }

    .blog-post-excerpt {
        font-size: 0.9rem;
    }

    .blog-post-page-title {
        font-size: 1.75rem;
    }

    .blog-card-content h2 {
        font-size: 1.35rem;
    }

    .blog-card-content h3 {
        font-size: 1.15rem;
    }

    .blog-post-image-logo-overlay {
        max-width: 300px;
        max-height: 120px;
    }
}

/* Blog landing card body (separate from article body) */
/* Blog landing page: card body – generous padding so text never touches borders */
.blog-post-card .blog-card-content {
    padding: 2rem 2.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    box-sizing: border-box;
}

.blog-card-content {
    padding: 2rem 2.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    box-sizing: border-box;
}

/* Ensure first and last elements have breathing room */
.blog-card-content > *:first-child {
    margin-top: 0;
}

.blog-card-content > *:last-child {
    margin-bottom: 0;
}

/* Blog article body */
.blog-article {
    width: 100%;
    box-sizing: border-box;
    overflow-x: clip;
}

.blog-article img,
.blog-article figure img,
.blog-article .blog-screenshot-container img {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
}

/* Mobile hero image: avoid forced crop on narrow screens */
@media (max-width: 768px) {
    .blog-post-page .blog-post-image {
        aspect-ratio: auto;
        height: auto;
    }
    .blog-post-page .blog-post-image img {
        height: auto;
        object-fit: contain;
    }
}

.blog-card-content .blog-post-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: var(--text-primary);
}
.blog-card-content .blog-post-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 1.5rem;
    flex-grow: 1;
}
.blog-card-content .blog-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.blog-card-content .blog-post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Blog Section Styles */
.blog-listing-section {
    padding: 4rem 0;
    background: var(--gradient-2);
    min-height: calc(100vh - 200px);
}

.blog-page-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-page-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.blog-post-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.blog-post-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 212, 170, 0.2);
}

.blog-post-image {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--dark-bg);
    position: relative;
    border-radius: 12px;
    box-sizing: border-box;
}

.blog-post-image img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    border-radius: 12px;
    box-sizing: border-box;
}

.blog-post-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.blog-post-card:hover .blog-post-image img {
    transform: scale(1.05);
}

.blog-post-image-logo-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    max-width: 800px;
    max-height: 320px;
    width: auto;
    box-sizing: border-box;
}

.blog-post-image-logo-overlay img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    box-sizing: border-box;
}

.blog-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: var(--gradient-2);
    color: var(--text-secondary);
}

.blog-image-placeholder-large {
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    background: var(--gradient-2);
    color: var(--text-secondary);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.blog-post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.blog-post-date {
    color: var(--text-secondary);
}

.blog-post-category {
    color: var(--primary-color);
    font-weight: 500;
}

.blog-reading-time {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.blog-post-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.blog-post-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-post-title a:hover {
    color: var(--primary-color);
}

.blog-post-excerpt {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.blog-page-subtitle,
.blog-post-title,
.blog-post-page-title,
.blog-post-excerpt {
    overflow-wrap: break-word;
}

.blog-card-content p,
.blog-card-content li {
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.blog-card-content a {
    word-break: break-word;
}

.blog-post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.blog-read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.blog-read-more:hover {
    color: var(--secondary-color);
}

/* Blog Post Page Styles */
.blog-post-page {
    padding: 4rem 0;
    background: var(--gradient-2);
    min-height: calc(100vh - 200px);
}

.blog-post-header {
    margin-bottom: 2rem;
}

.blog-back-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 1.5rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.blog-post-page-title {
    font-size: 3rem;
    margin-top: 1rem;
    line-height: 1.2;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Article body only (post page) – do not apply to .blog-card-content on landing */
.blog-article.prose {
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.1rem;
    width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
    overflow-x: hidden;
}

.blog-article.prose h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 2.5rem 0 1rem;
    font-weight: 600;
}

.blog-article.prose h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.blog-article.prose p {
    margin-bottom: 1.5rem;
}

.blog-article.prose ul,
.blog-article.prose ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.blog-article.prose li {
    margin-bottom: 0.8rem;
}

.blog-article.prose a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-article.prose a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.blog-post-content strong,
.blog-article.prose strong {
    color: var(--text-primary);
    font-weight: 600;
}

.blog-game-info {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.blog-game-info h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.blog-game-info p {
    margin-bottom: 0.5rem;
}

.blog-game-info p:last-child {
    margin-bottom: 0;
}

.blog-post-author {
    margin-top: 4rem;
    padding: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.blog-post-author h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.blog-post-author p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.blog-post-author strong {
    color: var(--text-primary);
}

/* Comments Section */
.blog-comments-section {
    margin-top: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.blog-comments-section h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

.giscus-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

.comments-note {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 1rem;
    font-style: italic;
}

/* Blog Responsive Design */
@media (max-width: 768px) {
    .blog-page-title {
        font-size: 2rem;
    }

    .blog-post-page-title {
        font-size: 2rem;
    }

    .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    .blog-post-card .blog-card-content,
    .blog-card-content {
        padding: 1.75rem 1.5rem;
    }

    .blog-card-content h2 {
        font-size: 1.5rem;
    }

    .blog-card-content h3 {
        font-size: 1.3rem;
    }

    .blog-image-placeholder-large {
        height: 250px;
        font-size: 4rem;
    }

    .blog-post-image-logo-overlay {
        top: 10px;
        left: 10px;
        max-width: 500px;
        max-height: 200px;
    }

    .blog-post-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .giscus-container {
        padding: 1rem;
    }

    /* Blog Listing Mobile Optimizations */
    .blog-listing-section {
        padding: 2rem 0;
    }

    .blog-page-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
        margin-bottom: 2rem;
    }

    .blog-post-card {
        margin-bottom: 1.5rem;
    }

    .blog-post-title {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }

    .blog-post-excerpt {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }

    .blog-post-image {
        max-height: 45vh;
    }

    .blog-post-meta {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }

    .blog-post-card .blog-card-content,
    .blog-card-content {
        padding: 1.5rem 1.25rem;
    }

    /* Blog Post Page Mobile Optimizations */
    .blog-post-page {
        padding: 2rem 0;
    }

    .blog-post-header {
        padding: 0 1rem;
        margin-bottom: 1.5rem;
    }

    .blog-back-link {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .blog-post-meta {
        font-size: 0.85rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .blog-post-card .blog-card-content {
        padding: 1.5rem 1.25rem;
    }

    .blog-article.prose {
        font-size: 1rem;
        line-height: 1.7;
    }

    .blog-article.prose p {
        margin-bottom: 1.25rem;
        line-height: 1.7;
    }

    .blog-game-info {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .blog-game-info h3 {
        font-size: 1.1rem;
    }

    .blog-screenshot-container {
        margin: 2rem 0;
    }

    .blog-screenshot-caption {
        font-size: 0.85rem;
        padding: 0 0.5rem;
        margin-top: 0.75rem;
    }

    .blog-post-author {
        padding: 1.5rem 1rem;
        margin: 2rem 0;
    }

    .blog-post-author h3 {
        font-size: 1.25rem;
    }

    .blog-post-author p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .blog-comments-section {
        padding: 0 1rem;
    }

    .blog-comments-section h3 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .blog-listing-section,
    .blog-post-page {
        padding: 2rem 0;
    }

    .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .blog-post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .blog-post-page .blog-post-content {
        padding: 1rem 0.75rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .blog-game-info {
        padding: 1rem;
    }

    .blog-post-image-logo-overlay {
        width: 70%;
        max-width: 220px;
        max-height: 140px;
        top: 8px;
        left: 8px;
    }

    .blog-post-image {
        max-height: 40vh;
    }

    .press-content {
        padding: 0 0.5rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .press-content ul {
        padding-left: 1.25rem;
    }

    .press-book-info {
        padding: 1.1rem;
    }
}

/* Blog Image Responsive Styles */
/* Ensure all images in blog content are responsive */
.blog-post-content,
.blog-post-content * {
    box-sizing: border-box;
}

.blog-card-content img {
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

/* Prevent image overflow in blog content containers */
.blog-post-content {
    overflow-wrap: break-word;
    word-wrap: break-word;
    overflow-x: hidden;
}

.blog-post-content * {
    max-width: 100%;
}

.blog-screenshot-container {
    margin: 2.5rem 0;
    text-align: center;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.blog-screenshot-container img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    margin: 0 auto;
    box-sizing: border-box;
}

.blog-screenshot-caption {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.6;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* --- FIX: Blog post hero should NOT crop on mobile ---
   Base .blog-post-image rules (16/9 + cover) are defined later and override earlier mobile rules.
   Keep cards cropped, but force post-page hero to be auto-height + contain on mobile.
*/
@media (max-width: 768px) {
    .blog-post-page .blog-post-image {
        aspect-ratio: auto !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
    .blog-post-page .blog-post-image a {
        height: auto !important;
    }
    .blog-post-page .blog-post-image img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
    }
}


/* --- FIX: Blog post hero should NOT crop on mobile ---
   Reason: the base .blog-post-image rules (16/9 + img height:100% + object-fit:cover)
   appear AFTER the earlier mobile override, so they win in the cascade on small screens.
   Keep cards cropped (16/9 cover), but force post-page hero to be auto-height + contain on mobile.
*/
@media (max-width: 768px) {
    .blog-post-page .blog-post-image {
        aspect-ratio: auto !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
    .blog-post-page .blog-post-image a {
        height: auto !important;
    }
    .blog-post-page .blog-post-image img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
    }
}

/* --- FIX: Press h3 must be green on mobile ---
   Mobile media queries (.press-content h3) now include color: var(--primary-color)
   This final override ensures it wins over .prose h3 on all viewports
*/
@media (max-width: 768px) {
    .press-section .press-content h3 {
        color: var(--primary-color);
    }
}

@media (max-width: 480px) {
    .press-section .press-content h3 {
        color: var(--primary-color);
    }
}

