/* Dark mode variables */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --accent: #2563eb;
    --border: #e5e7eb;
    --card-shadow: rgba(0, 0, 0, 0.03);
}

html.dark {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #60a5fa;
    --border: #404040;
    --card-shadow: rgba(0, 0, 0, 0.15);
}

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
}

/* Base styles */
body {
    font-family: "Geist","Geist Fallback",Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease;
    margin: 0;
    padding: 0;
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--accent);
    z-index: 1000;
    transition: width 0.1s ease-out;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

/* Navigation */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

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

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav a:hover {
    color: var(--accent);
}

.nav svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: color 0.2s ease, background-color 0.2s ease;
}

.theme-toggle:hover {
    color: var(--accent);
    background-color: var(--bg-secondary);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.theme-toggle .sun-icon { display: none; }
.theme-toggle .moon-icon { display: block; }
html.dark .theme-toggle .sun-icon { display: block; }
html.dark .theme-toggle .moon-icon { display: none; }

/* Header */
.header {
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.post-excerpt {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

/* Hero Image */
.hero-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.hero-image-top {
    object-position: top;
}

.hero-image-center {
    object-position: center;
}

.hero-image-bottom {
    object-position: bottom;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.categories-container {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

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

.categories-secondary {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.meta-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.date, .reading-time, .source-link, .last-updated {
    white-space: nowrap;
}

.source-link {
    color: var(--accent);
    font-weight: 500;
}

.last-updated {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Series Navigation */
.series-nav {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent);
}

.series-nav h4 {
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.series-nav p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.series-links {
    display: flex;
    gap: 1rem;
}

.series-links a {
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
}

.series-links a:hover {
    text-decoration: underline;
}

/* Table of Contents */
.toc {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

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

.toc-toggle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.toc-content {
    margin-top: 1rem;
}

.toc-content.collapsed {
    display: none;
}

.toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc li {
    margin-bottom: 0.5rem;
}

.toc li.toc-h3 {
    padding-left: 1rem;
}

.toc a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.toc a:hover {
    color: var(--accent);
}

.toc a.comment-link {
    color: var(--accent);
}

.toc a.comment-link:hover {
    opacity: 0.8;
}

/* Content */
.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 4rem;
}

.post-content h2 {
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.post-content h3 {
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.post-content p {
    margin-bottom: 1.5rem;
}

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

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

.post-content pre {
    background: #2d2d2d;
    padding: 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
}

html.light .post-content pre {
    background: #f6f8fa;
    color: #24292e;
}

.post-content code {
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    background: var(--bg-secondary);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    color: var(--text-primary);
}

.post-content pre code {
    background: none;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: inherit;
}


.post-content :not(pre) > code {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.post-content pre::-webkit-scrollbar { height: 8px; }
.post-content pre::-webkit-scrollbar-track { background: var(--bg-secondary); border-radius: 4px; }
.post-content pre::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.post-content pre::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

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

/* Image alt text note (GitHub style - matches [!NOTE]) */
.image-alt-note {
    border-left: 3px solid #0969da;
    padding: 12px 16px;
    margin: -1.5rem 0 2rem 0;
    background-color: rgba(9, 105, 218, 0.05);
    border-radius: 6px;
}

html.dark .image-alt-note {
    background-color: rgba(9, 105, 218, 0.1);
}

.image-alt-note-header {
    margin: 0;
    font-weight: 500;
    color: #0969da;
    font-size: 0.875rem;
}

.image-alt-note-content {
    margin: 8px 0 0 0;
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Markdown Alerts (GitHub-style [!NOTE], [!WARNING], etc.) */
.markdown-alert {
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 6px;
}

.markdown-alert-note {
    border-left: 3px solid #0969da;
    background-color: rgba(9, 105, 218, 0.05);
}

html.dark .markdown-alert-note {
    background-color: rgba(9, 105, 218, 0.1);
}

.markdown-alert-warning {
    border-left: 3px solid #9a6700;
    background-color: rgba(0, 0, 0, 0.05);
}

html.dark .markdown-alert-warning {
    background-color: rgba(154, 103, 0, 0.1);
}

.markdown-alert-important {
    border-left: 3px solid #8250df;
    background-color: rgba(0, 0, 0, 0.05);
}

html.dark .markdown-alert-important {
    background-color: rgba(130, 80, 223, 0.1);
}

.markdown-alert-tip {
    border-left: 3px solid #1a7f37;
    background-color: rgba(0, 0, 0, 0.05);
}

html.dark .markdown-alert-tip {
    background-color: rgba(26, 127, 55, 0.1);
}

.markdown-alert-caution {
    border-left: 3px solid #cf222e;
    background-color: rgba(0, 0, 0, 0.05);
}

html.dark .markdown-alert-caution {
    background-color: rgba(207, 34, 46, 0.1);
}

.markdown-alert > p:first-child {
    margin: 0;
    font-weight: 500;
}

.markdown-alert-note > p:first-child {
    color: #0969da;
}

.markdown-alert-warning > p:first-child {
    color: #9a6700;
}

.markdown-alert-important > p:first-child {
    color: #8250df;
}

.markdown-alert-tip > p:first-child {
    color: #1a7f37;
}

.markdown-alert-caution > p:first-child {
    color: #cf222e;
}

.markdown-alert > p:first-child > span:first-child {
    margin-right: 8px;
}

.markdown-alert > p:last-child {
    margin: 8px 0 0 0;
}

/* Collapsible code blocks */
.code-block-container {
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #2d2d2d;
}

html.light .code-block-container {
    background: #f6f8fa;
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #1a1a1a;
    cursor: pointer;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    color: #a0a0a0;
    user-select: none;
    transition: background-color 0.2s ease;
}

.code-block-header:hover {
    background: #252525;
}

html.light .code-block-header {
    background: #e9ecef;
    color: #666;
}

html.light .code-block-header:hover {
    background: #dee2e6;
}

.code-block-header .language-label {
    font-weight: 500;
    text-transform: uppercase;
    color: var(--accent);
}

.code-block-header .toggle-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    transition: color 0.2s ease;
}

.code-block-header:hover .toggle-button {
    color: var(--accent);
}

/* Copy button */
.copy-button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.copy-button:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.1);
}

.copy-button.copied {
    color: #22c55e;
}

.code-block-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.code-block-content.expanded {
    max-height: none;
    overflow: auto;
}

.code-block-container pre {
    margin: 0;
    border-radius: 0;
    border: none;
}

html.light .code-block-container pre[class*="language-"] {
    background: #f6f8fa;
}

html.light .code-block-container code[class*="language-"] {
    color: #333;
}

html.light .token.comment, html.light .token.prolog, html.light .token.doctype, html.light .token.cdata { color: #6a737d; }
html.light .token.punctuation { color: #24292e; }
html.light .token.property, html.light .token.tag, html.light .token.boolean, html.light .token.number, html.light .token.constant, html.light .token.symbol, html.light .token.deleted { color: #005cc5; }
html.light .token.selector, html.light .token.attr-name, html.light .token.string, html.light .token.char, html.light .token.builtin, html.light .token.inserted { color: #22863a; }
html.light .token.operator, html.light .token.entity, html.light .token.url, html.light .language-css .token.string, html.light .style .token.string { color: #d73a49; }
html.light .token.atrule, html.light .token.attr-value, html.light .token.keyword { color: #d73a49; }
html.light .token.function, html.light .token.class-name { color: #6f42c1; }

/* Related Posts */
.related-posts {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.related-posts h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.related-post-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.25rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--card-shadow);
}

.related-post-card h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.related-post-card span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Comments section */
.comments {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
}

.comments.disqus-comments {
    max-width: 800px;
    margin: 3rem auto 0;
    padding: 2rem 0;
}

.comments.disqus-comments h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.comments-note {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 2rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-left: 3px solid var(--text-secondary);
    border-radius: 4px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.comment {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px var(--card-shadow);
    transition: all 0.2s ease;
    position: relative;
}

.comment:hover {
    box-shadow: 0 4px 12px var(--card-shadow);
    border-color: var(--text-secondary);
}

.comment-reply {
    margin-left: 2.5rem;
    margin-top: 1.25rem;
    background: var(--bg-primary);
    border-left: 4px solid var(--accent);
    padding-left: 1.5rem;
}

.comment-reply:hover {
    background: var(--bg-secondary);
    border-left-color: var(--accent);
    filter: brightness(1.05);
}

.comment-max-depth {
    margin-left: 0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.comment-author-badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    background: var(--accent);
    color: white;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comment-author-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.comment-author-link:visited {
    color: var(--text-primary);
}

.comment-author-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.comment-author-link:visited:hover {
    color: var(--accent);
}

.comment-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.comment-body {
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 0.95rem;
}

.comment-body p {
    margin-bottom: 0.875rem;
}

.comment-body p:last-child {
    margin-bottom: 0;
}

.comment-body a {
    color: var(--accent);
    text-decoration: underline;
    font-weight: 500;
}

.comment-body a:hover {
    opacity: 0.8;
}

.comment-replies {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
    .comment-reply {
        margin-left: 1rem;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Custom Comments System Styles */
.custom-comments {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
}

.custom-comments h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.comments-auth {
    margin-bottom: 1.5rem;
}

.auth-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-status.logged-in {
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.auth-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-button:hover {
    background: var(--bg-secondary);
    border-color: var(--accent);
}

.auth-button.github {
    background: #24292e;
    color: white;
    border-color: #24292e;
}

.auth-button.github:hover {
    background: #2f363d;
}

.auth-button.logout {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 0.25rem 0.5rem;
}

.auth-button.logout:hover {
    color: var(--accent);
}

/* Comment Form */
.comment-form {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.comment-form-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.comment-username {
    font-weight: 500;
    color: var(--text-primary);
}

.comment-username.anonymous {
    color: var(--text-secondary);
    font-style: italic;
}

.comment-username-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.comment-username-link:visited {
    color: var(--text-primary);
}

.comment-username-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.comment-username-link:visited:hover {
    color: var(--accent);
}

/* Comment identity fields (name and email) */
.comment-identity-fields {
    margin-bottom: 1rem;
}

.comment-name-email-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.comment-input-group {
    display: flex;
    flex-direction: column;
}

.comment-input-group input[type="text"],
.comment-input-group input[type="email"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.comment-input-group input[type="text"]:focus,
.comment-input-group input[type="email"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.comment-input-group input[type="text"]:disabled,
.comment-input-group input[type="email"]:disabled {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.6;
}

.comment-input-group input[type="text"]::placeholder,
.comment-input-group input[type="email"]::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.comment-anonymous-option {
    margin-bottom: 0.5rem;
}

.anonymous-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
    user-select: none;
}

.anonymous-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
}

.email-help-text {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-top: 0.25rem;
}

.comment-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    box-sizing: border-box;
}

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

.comment-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.comment-submit {
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.comment-submit:hover:not(:disabled) {
    opacity: 0.9;
}

.comment-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.replying-to {
    display: none;
}

.replying-to.visible {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.cancel-reply {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0;
}

.cancel-reply:hover {
    text-decoration: underline;
}

/* Comments List */
.no-comments {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
    font-style: italic;
}

.comments-loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
}

.comments-error {
    text-align: center;
    color: #cf222e;
    padding: 2rem;
}

.comment-actions {
    margin-top: 0.75rem;
}

.reply-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.reply-button:hover {
    color: var(--accent);
    background: var(--bg-secondary);
}

.comment-highlight {
    animation: highlight-fade 2s ease-out;
}

@keyframes highlight-fade {
    0% {
        background: rgba(37, 99, 235, 0.2);
    }
    100% {
        background: var(--bg-secondary);
    }
}

/* Turnstile widget styling */
#turnstile-widget {
    min-height: 65px;
}

@media (max-width: 768px) {
    .comment-name-email-row {
        grid-template-columns: 1fr;
    }

    .comment-input-group input[type="text"],
    .comment-input-group input[type="email"] {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .comment-form-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .comment-submit {
        width: 100%;
    }

    .auth-status {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Footer */
.footer {
    margin-top: 4rem;
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    border-top: 1px solid var(--border);
}

.footer a {
    color: var(--accent);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.heart {
    color: #e11d48;
    display: inline-block;
    margin: 0 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 1rem 0.75rem;
    }

    .nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.5rem;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 1.25rem;
        padding: 0 0.5rem;
        justify-content: flex-start;
    }

    .back-link {
        margin-right: auto;
    }

    .nav a span {
        display: none;
    }

    .nav svg {
        display: block;
        width: 24px;
        height: 24px;
    }

    .nav a {
        font-size: 0.875rem;
        gap: 0;
    }

    .header {
        margin-bottom: 2rem;
        padding: 0.5rem 0;
    }

    .header h1 {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }

    .post-excerpt {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

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

    .meta-right {
        justify-content: flex-start;
        gap: 0.75rem;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .footer {
        margin-top: 2rem;
        padding: 1.5rem 0;
    }
}
