/* ===========================================
   Fuck The Seahawks - Blog Styles
   Dark mode, navy + lime rivalry colors
   =========================================== */

:root {
    --bg-page: #0B1220;
    --bg-card: #111827;
    --bg-elevated: #1F2937;
    --text-primary: #F9FAFB;
    --text-secondary: #B8BFC7;
    --text-muted: #8B939E;
    --accent: #B8FF3B;
    --accent-dim: rgba(184, 255, 59, 0.1);
    --border: #374151;

    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

    --sidebar-width: 35%;
    --content-width: 65%;
}

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

@keyframes subtlePulse {
    0%, 100% { box-shadow: 0 0 4px 0px rgba(102, 217, 239, 0.3); }
    50% { box-shadow: 0 0 7px 1px rgba(102, 217, 239, 0.45); }
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===========================================
   Layout
   =========================================== */

.layout {
    display: flex;
    min-height: 100vh;
}

/* ===========================================
   Sidebar
   =========================================== */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    overflow: hidden;
}

.sidebar-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    filter: brightness(0.7);
}

.sidebar-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(11, 18, 32, 0.95) 0%,
        rgba(11, 18, 32, 0.8) 30%,
        rgba(11, 18, 32, 0.4) 60%,
        rgba(11, 18, 32, 0.2) 100%
    );
}

.sidebar-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    padding-bottom: 3rem;
}

.branding {
    margin-bottom: 2rem;
}

.site-title {
    font-family: var(--font-display);
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.site-logo {
    max-width: 320px;
    width: 100%;
    height: 190px;
    object-fit: contain;
    object-position: left bottom;
    cursor: pointer;
    margin-bottom: 0.75rem;
    margin-left: -24px;
}

@media (max-width: 1024px) {
    .site-logo {
        max-width: 270px;
        height: 160px;
        margin-left: -18px;
    }
}

@media (max-width: 768px) {
    .site-logo {
        max-width: 280px;
        height: 166px;
        margin-left: -20px;
    }
}

@media (max-width: 480px) {
    .site-logo {
        max-width: 250px;
        height: 148px;
        margin-left: -16px;
    }
}

.title-underline {
    width: 100px;
    height: 3px;
    background: var(--accent);
    margin-bottom: 1rem;
}

.tagline {
    font-size: 0.875rem;
    color: var(--text-secondary);
    max-width: 220px;
    line-height: 1.5;
    height: 42px; /* Fixed height for 2 lines - prevents layout jump */
    overflow: hidden;
    display: block;
}

/* Author Card */
.author-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(17, 24, 39, 0.6);
    border-radius: 8px;
    border: 1px solid var(--border);
    min-height: 62px; /* Fixed height - prevents layout shift on mode toggle */
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    /* background-size and background-position set via JS per mode */
    background-repeat: no-repeat;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.author-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 2px var(--accent);
}

.author-info {
    flex: 1;
    min-width: 0;
}

.author-name-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.author-name {
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-primary);
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    padding: 2px;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
}

.contact-icon:hover {
    color: var(--accent);
    background-color: var(--accent-dim);
}

.author-tagline {
    display: block;
    font-size: 0.625rem;
    color: var(--text-muted);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.author-social {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    flex-shrink: 0;
}

.author-social:hover {
    color: var(--accent);
    background: var(--accent-dim);
}

/* ===========================================
   Author Toggle (hidden by default, replaces Instagram icon)
   =========================================== */

.author-toggle {
    display: none;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.author-toggle.visible {
    display: flex;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-elevated);
    transition: 0.3s;
    border-radius: 20px;
    border: 1px solid rgba(102, 217, 239, 0.4);
    box-shadow: 0 0 5px 0px rgba(102, 217, 239, 0.35);
    animation: subtlePulse 3s ease-in-out infinite;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-secondary);
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent-dim);
    border-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(16px);
    background-color: var(--accent);
}

/* ===========================================
   Lightbox Modal (for full-size images)
   =========================================== */

.lightbox-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    touch-action: none;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 2rem;
    cursor: pointer;
    z-index: 1002;
    line-height: 1;
    padding: 0.5rem 0.75rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.7);
    color: white;
}

.lightbox-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.lightbox-container.swiping {
    transition: none;
}

.lightbox-container.dismissing {
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0;
}

.lightbox-image {
    max-width: 95vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    transform-origin: center center;
    transition: transform 0.3s ease;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.lightbox-image.zoomed {
    max-width: none;
    max-height: none;
    cursor: grab;
}

.lightbox-image.zoomed.panning {
    cursor: grabbing;
    transition: none;
}

.lightbox-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    text-align: center;
    font-style: italic;
    z-index: 1001;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.lightbox-caption:empty {
    display: none;
}

.lightbox-caption.hidden {
    opacity: 0;
    transform: translateY(100%);
    pointer-events: none;
}

.lightbox-hint {
    position: absolute;
    bottom: 5rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.6);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    border-radius: 1rem;
    z-index: 1001;
    opacity: 1;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.lightbox-hint.hidden {
    opacity: 0;
}

@media (hover: hover) and (pointer: fine) {
    .lightbox-hint {
        display: none;
    }
}

/* Gallery Navigation (arrows and counter) */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    padding: 0;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 10001;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-nav svg {
    width: 24px;
    height: 24px;
}

.lightbox-nav.visible {
    opacity: 0.7;
    visibility: visible;
}

.lightbox-nav:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.6);
}

.lightbox-prev {
    left: 0.75rem;
}

.lightbox-next {
    right: 0.75rem;
}

.lightbox-counter {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 0.75rem;
    font-family: var(--font-sans);
    background: rgba(0, 0, 0, 0.4);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 10001;
}

.lightbox-counter.visible {
    opacity: 0.8;
    visibility: visible;
}

/* Hide nav arrows on very small screens - swipe preferred */
@media (max-width: 400px) {
    .lightbox-nav {
        width: 36px;
        height: 36px;
    }
    .lightbox-nav svg {
        width: 20px;
        height: 20px;
    }
    .lightbox-prev {
        left: 0.5rem;
    }
    .lightbox-next {
        right: 0.5rem;
    }
}

/* ===========================================
   Load More Button
   =========================================== */

.load-more-container {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.load-more-btn {
    padding: 0.75rem 2rem;
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.load-more-btn:hover:not(:disabled) {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===========================================
   Main Content
   =========================================== */

.content {
    margin-left: var(--sidebar-width);
    width: var(--content-width);
    min-height: 100vh;
    padding: 3rem;
}

/* Section Titles */
.section-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
}

/* ===========================================
   Posts Section
   =========================================== */

.posts-section {
    margin-bottom: 4rem;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Post Card - Uniform Layout */
.post-card {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 8px;
}

/* No image variant - just content */
.post-card.no-image {
    display: block;
}

/* Featured image thumbnail */
.post-card-image {
    width: 150px;
    height: 100px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
}

.post-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.post-title-link {
    cursor: pointer;
    color: var(--text-primary);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.post-meta .separator {
    color: var(--accent);
}

.post-preview {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.read-more-btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--accent);
    color: var(--bg-page);
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    align-self: flex-start;
}

/* Bottom collapse button - matches read more button style */
.collapse-btn {
    display: block;
    margin: 2rem auto 0;
    padding: 0.5rem 1.25rem;
    background: var(--accent);
    color: var(--bg-page);
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
}

/* ===========================================
   Features Section
   =========================================== */

.features {
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 8px;
}

.features-list {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.features-list li::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
}

/* ===========================================
   Loading State
   =========================================== */

.loading-placeholder {
    padding: 3rem;
    text-align: center;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: 8px;
}

/* ===========================================
   Post Expansion
   =========================================== */

.expanded-content {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out;
}

.is-expanded .expanded-content {
    max-height: none;
    opacity: 1;
    margin-top: 0;
}

.is-expanded {
    flex-direction: column;
    padding: 2rem;
}

.is-expanded .post-card-image {
    width: 100%;
    height: 250px;
}

/* Expanded featured image with vignette and caption */
.expanded-featured-figure {
    position: relative;
    width: 100%;
    margin: 0;
    cursor: pointer;
    overflow: hidden;
    border-radius: 6px;
}

.expanded-featured-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem 1rem 0.75rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    font-style: italic;
    cursor: pointer;
}

/* Hide preview and reduce spacing when expanded */
.is-expanded .post-preview {
    display: none;
}

.is-expanded .post-meta {
    margin-bottom: 0.25rem;
}

.post-full-content {
    padding: 0;
    margin-top: 0;
    background: transparent;
    border-radius: 0;
    border-left: none;
}

.post-full-content > *:first-child {
    margin-top: 0;
}

.post-full-content h1,
.post-full-content h2,
.post-full-content h3 {
    font-family: var(--font-display);
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.post-full-content h1 { font-size: 1.75rem; }
.post-full-content h2 { font-size: 1.5rem; }
.post-full-content h3 { font-size: 1.25rem; }

.post-full-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

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

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

.post-full-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border-left: 3px solid var(--accent);
    font-style: italic;
    color: var(--text-secondary);
}

.post-full-content ul,
.post-full-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

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

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

.post-full-content strong {
    color: var(--text-primary);
}

.post-full-content em {
    color: var(--accent);
}

/* WordPress Gallery Blocks */
.post-full-content .wp-block-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.post-full-content .wp-block-gallery .wp-block-image {
    margin: 0;
    aspect-ratio: 4/3;
    overflow: hidden;
}

/* Last image spans full width when odd number of images */
.post-full-content .wp-block-gallery .wp-block-image:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.post-full-content .wp-block-gallery .wp-block-image img {
    margin: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
}

/* WordPress Figure Captions - Overlay style with vignette */
.post-full-content figure {
    position: relative;
    margin: 1.5rem 0;
}

.post-full-content figure img {
    margin: 0;
    display: block;
}

.post-full-content figcaption,
.post-full-content .wp-element-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1rem 0.75rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    font-style: italic;
    border-radius: 0 0 8px 8px;
    cursor: pointer;
}

/* Truncate IMAGE captions on mobile to prevent overflow (not video captions) */
@media (max-width: 768px) {
    .post-full-content figure:not(.wp-block-video):not(.wp-block-embed) > figcaption,
    .post-full-content figure:not(.wp-block-video):not(.wp-block-embed) > .wp-element-caption,
    .post-full-content .wp-block-gallery figcaption,
    .post-full-content .wp-block-gallery .wp-element-caption,
    .expanded-featured-caption {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 1.5rem 0.75rem 0.5rem;
    }

    /* Video captions should wrap normally - no truncation */
    .post-full-content .wp-block-video figcaption,
    .post-full-content .wp-block-embed figcaption {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }
}

/* Gallery images with captions */
.post-full-content .wp-block-gallery figure {
    position: relative;
}

.post-full-content .wp-block-gallery figcaption,
.post-full-content .wp-block-gallery .wp-element-caption {
    border-radius: 0 0 6px 6px;
}

/* WordPress Video/Embed Blocks */
.post-full-content .wp-block-video,
.post-full-content .wp-block-embed {
    position: relative;
    margin: 1.5rem 0;
}

.post-full-content .wp-block-video video,
.post-full-content .wp-block-video iframe,
.post-full-content .wp-block-embed iframe {
    max-width: 100%;
    width: 100%;
    aspect-ratio: 9/16;
    border-radius: 8px;
    display: block;
}

/* Video captions - positioned below (not overlay) to avoid covering controls */
.post-full-content .wp-block-video figcaption,
.post-full-content .wp-block-embed figcaption {
    position: relative;
    padding: 0.75rem 0.5rem;
    background: transparent;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    font-style: italic;
}

/* WordPress Separator */
.post-full-content .wp-block-separator {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

/* ===========================================
   Responsive Design
   =========================================== */

@media (max-width: 1024px) {
    :root {
        --sidebar-width: 30%;
        --content-width: 70%;
    }

    .site-title {
        font-size: 2rem;
    }

    .post-card-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        min-height: 60vh;
    }

    .sidebar-content {
        padding: 1.5rem;
        padding-top: 40vh;
    }

    .content {
        margin-left: 0;
        width: 100%;
        padding: 1.5rem;
    }

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

    .post-card-image {
        width: 100%;
        height: 180px;
    }

    .author-card {
        padding: 0.5rem;
    }

    .author-tagline {
        white-space: normal;
    }

    /* Slightly smaller text on mobile */
    .post-full-content p {
        font-size: 0.875rem;
        line-height: 1.75;
    }

    .post-full-content li {
        font-size: 0.875rem;
    }

    .post-full-content blockquote {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.75rem;
    }

    .post-card-title {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.25rem;
    }
}

/* ===========================================
   Comments/Contact Section
   =========================================== */

.comments-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

/* Comments Info Box */
.comments-info {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.comments-info.visible {
    display: block;
}

.comments-info p {
    margin: 0 0 0.75rem 0;
}

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

/* Medieval font for "Maki Mode" text */
.maki-mode-text {
    font-family: 'UnifrakturMaguntia', cursive;
    font-size: 1.1em;
    color: var(--accent);
}

/* Rubik Puddles font for "Maqqi Mode" text */
.maqqi-mode-text {
    font-family: 'Rubik Puddles', cursive;
    font-size: 1em;
    color: var(--accent);
}

/* Comments List (only visible in Maki mode) */
.comments-list {
    display: none;
    margin-bottom: 2rem;
}

.comments-list.visible {
    display: block;
}

.comment-item {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border-left: 3px solid var(--accent);
}

/* Rainbow comment borders - sequential cycling to distinguish comments */
.comment-item.color-0 { border-left-color: #B8FF3B; } /* Lime (accent) */
.comment-item.color-1 { border-left-color: #6B8AFF; } /* Blue */
.comment-item.color-2 { border-left-color: #FFB86B; } /* Orange */
.comment-item.color-3 { border-left-color: #B86BFF; } /* Purple */
.comment-item.color-4 { border-left-color: #6BFFD4; } /* Teal */
.comment-item.color-5 { border-left-color: #FF6B9D; } /* Pink */

/* Self-destruct always gets red regardless of position */
.comment-item.self-destruct {
    border-left-color: #ff6b6b !important;
    opacity: 0.9;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.comment-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.comment-time[title] {
    cursor: help;
}

.comment-body {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
}

.comment-ephemeral-badge {
    display: inline-block;
    font-size: 0.65rem;
    color: #ff6b6b;
    margin-left: 0.5rem;
    opacity: 0.8;
}

/* Comment Actions (edit/delete buttons) */
.comment-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.comment-action-btn {
    background: none;
    border: none;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
}

.comment-action-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-elevated);
}

.comment-action-btn.delete:hover {
    color: #ff6b6b;
}

.comment-action-btn svg {
    width: 14px;
    height: 14px;
}

/* Comment Edit Mode */
.comment-edit-textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--accent);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    resize: vertical;
    margin-bottom: 0.5rem;
}

.comment-edit-textarea:focus {
    outline: none;
}

.comment-edit-actions {
    display: flex;
    gap: 0.5rem;
}

.comment-edit-btn {
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.comment-edit-btn.save {
    background: var(--accent);
    color: var(--bg-page);
    border: none;
}

.comment-edit-btn.save:hover {
    opacity: 0.9;
}

.comment-edit-btn.cancel {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.comment-edit-btn.cancel:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

/* Edited indicator */
.comment-edited {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-style: italic;
    margin-left: 0.5rem;
}

/* Custom Confirm Modal */
.confirm-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1001;
    justify-content: center;
    align-items: center;
}

.confirm-modal-overlay.active {
    display: flex;
}

.confirm-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.confirm-modal-message {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.confirm-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.confirm-modal-btn {
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.confirm-modal-btn.confirm {
    background: #ff6b6b;
    color: white;
    border: none;
}

.confirm-modal-btn.confirm:hover {
    background: #ff5252;
}

.confirm-modal-btn.cancel {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.confirm-modal-btn.cancel:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

/* Comment/Contact Form */
.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row input {
    flex: 1;
}

.comment-form input,
.comment-form textarea {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.comment-form input::placeholder,
.comment-form textarea::placeholder {
    color: var(--text-muted);
}

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

/* Self-destruct toggle (hidden by default, shown in Maki mode) */
.self-destruct-toggle {
    display: none;
}

.self-destruct-toggle.visible {
    display: block;
}

/* Self-destruct switch - styled like sidebar toggle */
.self-destruct-switch {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    position: relative;
}

.self-destruct-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.self-destruct-slider {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    background-color: var(--bg-elevated);
    border-radius: 22px;
    border: 1px solid var(--border);
    transition: 0.3s;
    flex-shrink: 0;
}

.self-destruct-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-secondary);
    transition: 0.3s;
    border-radius: 50%;
}

.self-destruct-switch input:checked + .self-destruct-slider {
    background-color: rgba(255, 107, 107, 0.2);
    border-color: #ff6b6b;
}

.self-destruct-switch input:checked + .self-destruct-slider:before {
    transform: translateX(18px);
    background-color: #ff6b6b;
}

.self-destruct-text {
    user-select: none;
}

/* Submit button */
.submit-btn {
    align-self: flex-start;
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: var(--bg-page);
    border: none;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.submit-btn:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form status message */
.form-status {
    font-size: 0.85rem;
    min-height: 1.2em;
}

.form-status.success {
    color: var(--accent);
}

.form-status.error {
    color: #ff6b6b;
}

/* Mobile adjustments for comments */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
}

/* ===========================================
   Scroll to Top Button
   =========================================== */

.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, color 0.2s, border-color 0.2s;
    z-index: 100;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.scroll-to-top svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
    }

    .scroll-to-top svg {
        width: 18px;
        height: 18px;
    }
}

/* ===============================================
   INDIVIDUAL POST PAGE STYLES
   =============================================== */

/* Breadcrumb Navigation */
.post-breadcrumb {
    margin-bottom: 1.5rem;
}

.breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: var(--accent);
}

.breadcrumb-link svg {
    transition: transform 0.2s ease;
}

.breadcrumb-link:hover svg {
    transform: translateX(-3px);
}

/* Single Post Container */
.single-post {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Post Header */
.post-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.post-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.post-separator {
    color: var(--text-muted);
}

/* Featured Image */
.post-featured-image {
    margin: 0 0 2rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-featured-image figcaption {
    padding: 0.75rem;
    background: var(--bg-elevated);
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Post Not Found */
.post-not-found {
    text-align: center;
    padding: 3rem 1rem;
}

.post-not-found h1 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.post-not-found p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.post-not-found .back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    text-decoration: none;
}

.post-not-found .back-link:hover {
    text-decoration: underline;
}

/* Visibility Notice for Unpublished Posts */
.visibility-notice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(253, 151, 31, 0.15);
    border: 1px solid rgba(253, 151, 31, 0.3);
    border-radius: 8px;
    color: #fd971f;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.visibility-notice.hidden {
    display: none;
}

.visibility-notice svg {
    flex-shrink: 0;
}

/* Responsive Post Styles */
@media (max-width: 768px) {
    .single-post {
        padding: 1.25rem;
        border-radius: 8px;
    }

    .post-title {
        font-size: 1.5rem;
    }

    .post-meta {
        flex-wrap: wrap;
    }
}

/* ===========================================
   WordPress Blog Post Layout (Single Pages)
   Centered single-column layout for /blog/posts/
   =========================================== */

.blog-post-layout {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 100vh;
    background: var(--bg-page);
}

.blog-post-layout article {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 2rem;
}

.blog-post-layout .post-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.blog-post-layout .post-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.blog-post-layout .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.blog-post-layout .post-separator {
    color: var(--border);
}

/* Comments Section Heading */
.comments-heading {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* Nested/Threaded Comments */
.comment-nested {
    margin-left: 1.5rem;
    border-left: 2px solid var(--border);
    padding-left: 1rem;
}

/* Post Footer */
.post-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.original-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.original-link:hover {
    color: var(--accent);
}

/* Empty Comments State */
.no-comments {
    color: var(--text-secondary);
    font-style: italic;
}

/* Responsive for Blog Post Layout */
@media (max-width: 640px) {
    .blog-post-layout {
        padding: 1rem;
    }

    .blog-post-layout article {
        padding: 1.25rem;
    }

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

    .comment-nested {
        margin-left: 0.75rem;
    }
}
