:root {
    --color-primary: #10b981;
    --color-primary-dark: #059669;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

* {
    font-family: var(--font-sans);
}

.hero-banner {
    background: linear-gradient(135deg, #1a2e35 0%, #0f1f24 100%);
}

.hero-banner-overlay {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1) 0%, transparent 100%);
}

.post-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    border: 1px solid #f3f4f6;
    transition: all 0.3s ease;
}

.post-card:hover {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    border-color: #e5e7eb;
    transform: translateY(-4px);
}

.post-card-featured {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.ranking-badge {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
}

.ranking-badge-1 {
    background-color: #fef3c7;
    color: #b45309;
}

.ranking-badge-2 {
    background-color: #f3f4f6;
    color: #374151;
}

.ranking-badge-3 {
    background-color: #ffedd5;
    color: #c2410c;
}

.ranking-badge-default {
    background-color: #f9fafb;
    color: #6b7280;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
}

.section-title i {
    color: var(--color-primary);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background-color: var(--color-primary);
    color: white;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-1px);
    color: white;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: white;
}

.sidebar-category {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    color: #4b5563;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.sidebar-category:hover,
.sidebar-category.active {
    background-color: #f3f4f6;
    color: #111827;
}

.newsletter-section {
    background: linear-gradient(to right, #f9fafb, white);
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
}

.newsletter-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.newsletter-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    border-color: var(--color-primary);
}

.footer-link {
    color: #6b7280;
    transition: color 0.2s ease;
    text-decoration: none;
}

.footer-link:hover {
    color: #111827;
}

.social-icon {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background-color: #f3f4f6;
    color: #4b5563;
    transition: all 0.2s ease;
    text-decoration: none;
}

.social-icon:hover {
    background-color: var(--color-primary);
    color: white;
}

.feature-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #d1d5db;
}

.feature-check i {
    color: var(--color-primary);
    font-size: 0.75rem;
}

.sticky-sidebar {
    position: sticky;
    top: 80px;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prose {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #374151;
}

.prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #111827;
}

.prose h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #111827;
}

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

.prose a {
    color: var(--color-primary);
    text-decoration: underline;
}

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

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

.prose blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    border-left: 4px solid var(--color-primary);
    background-color: #f9fafb;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: #4b5563;
}

.prose code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    padding: 0.2em 0.4em;
    background-color: #f3f4f6;
    border-radius: 0.25rem;
}

.prose pre {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #1f2937;
    border-radius: 0.75rem;
    overflow-x: auto;
    color: #e5e7eb;
}

.prose pre code {
    padding: 0;
    background: transparent;
    color: inherit;
}

.prose img {
    margin: 2rem auto;
    border-radius: 0.75rem;
}

.search-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
}

.search-overlay.active {
    display: flex;
}

.search-overlay input[type='search'] {
    width: 100%;
    max-width: 600px;
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    border: none;
    border-radius: 0.75rem;
    background: white;
    color: #111827;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.search-overlay input[type='search']:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.login-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.login-overlay.active {
    display: flex;
}

html[data-theme='dark'] .login-overlay .bg-white {
    background-color: #1e293b !important;
}

html[data-theme='dark'] .login-overlay input {
    background-color: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

html[data-theme='dark'] .login-overlay h2,
html[data-theme='dark'] .login-overlay label {
    color: #f1f5f9;
}

html[data-theme='dark'] .login-overlay p,
html[data-theme='dark'] .login-overlay .text-gray-500 {
    color: #94a3b8;
}

@media (max-width: 768px) {
    .hero-banner {
        padding: 2rem 1rem;
    }

    #mobile-menu.active {
        display: block;
    }
}

html[data-theme='dark'] {
    color-scheme: dark;
}

html[data-theme='dark'] body {
    background-color: #0f172a;
    color: #e2e8f0;
}

html[data-theme='dark'] #masthead {
    background-color: #1e293b;
    border-color: #334155;
}

html[data-theme='dark'] .post-card,
html[data-theme='dark'] .post-card-featured {
    background-color: #1e293b;
    border-color: #334155;
}

html[data-theme='dark'] .post-card h2,
html[data-theme='dark'] .post-card h3,
html[data-theme='dark'] .post-card-featured h3 {
    color: #f1f5f9;
}

html[data-theme='dark'] .bg-white {
    background-color: #1e293b !important;
}

html[data-theme='dark'] .bg-gray-50 {
    background-color: #0f172a !important;
}

html[data-theme='dark'] .text-gray-900 {
    color: #f1f5f9 !important;
}

html[data-theme='dark'] .text-gray-700 {
    color: #cbd5e1 !important;
}

html[data-theme='dark'] .text-gray-600 {
    color: #94a3b8 !important;
}

html[data-theme='dark'] .text-gray-500 {
    color: #64748b !important;
}

html[data-theme='dark'] .border-gray-100 {
    border-color: #334155 !important;
}

html[data-theme='dark'] .sidebar-category {
    color: #cbd5e1;
}

html[data-theme='dark'] .sidebar-category:hover,
html[data-theme='dark'] .sidebar-category.active {
    background-color: #334155;
    color: white;
}

html[data-theme='dark'] .newsletter-section {
    background: linear-gradient(to right, #1e293b, #0f172a);
    border-color: #334155;
}

html[data-theme='dark'] #colophon {
    background-color: #1e293b;
    border-color: #334155;
}

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

nav ul li {
    display: inline-block;
}

.theme-toggle .icon-sun {
    display: none;
}

.theme-toggle .icon-moon {
    display: inline;
}

html[data-theme='dark'] .theme-toggle .icon-moon {
    display: none;
}

html[data-theme='dark'] .theme-toggle .icon-sun {
    display: inline;
}

.nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    font-weight: 500;
    color: #374151;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-links .page-numbers:hover,
.nav-links .page-numbers.current {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

#comments {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.comments-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.comment {
    padding: 1.5rem;
    margin-bottom: 1rem;
    background-color: #f9fafb;
    border-radius: 0.75rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.comment-author img {
    border-radius: 9999px;
}

.comment-author .fn {
    font-weight: 600;
    color: #111827;
}

.comment-meta {
    font-size: 0.75rem;
    color: #6b7280;
}

.comment-content {
    color: #374151;
    line-height: 1.6;
}

.comment-content p {
    margin: 0;
}

#respond {
    margin-top: 2rem;
}

.comment-reply-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

.comment-notes {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.comment-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.comment-form input[type='text'],
.comment-form input[type='email'],
.comment-form input[type='url'],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background-color: white;
    color: #111827;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

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

.comment-form .submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background-color: var(--color-primary);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-form .submit:hover {
    background-color: var(--color-primary-dark);
}

.logged-in-as {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.logged-in-as a {
    color: var(--color-primary);
    text-decoration: none;
}

.logged-in-as a:hover {
    text-decoration: underline;
}

html[data-theme='dark'] #comments {
    border-color: #334155;
}

html[data-theme='dark'] .comments-title,
html[data-theme='dark'] .comment-reply-title {
    color: #f1f5f9;
}

html[data-theme='dark'] .comment {
    background-color: #1e293b;
}

html[data-theme='dark'] .comment-author .fn {
    color: #f1f5f9;
}

html[data-theme='dark'] .comment-content {
    color: #cbd5e1;
}

html[data-theme='dark'] .comment-form input,
html[data-theme='dark'] .comment-form textarea {
    background-color: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

html[data-theme='dark'] .comment-form label {
    color: #cbd5e1;
}

#toc-container .toc-nav .toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#toc-container .toc-nav .toc-list li {
    display: block;
    margin-bottom: 0;
}

#toc-container .toc-nav .toc-list li .toc-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #4b5563;
    text-decoration: none;
    border-left: 2px solid #e5e7eb;
    font-size: 0.875rem;
    line-height: 1.4;
    transition: all 0.2s ease;
}

#toc-container .toc-nav .toc-list li .toc-link:hover,
#toc-container .toc-nav .toc-list li .toc-link.active {
    color: var(--color-primary);
    border-left-color: var(--color-primary);
    background-color: rgba(16, 185, 129, 0.05);
}

#toc-container .toc-nav .toc-list li.toc-item-h2 .toc-link {
    font-weight: 500;
}

#toc-container .toc-nav .toc-list li.toc-item-h3 .toc-link {
    padding-left: 1.5rem;
    font-size: 0.8125rem;
    color: #6b7280;
}

html[data-theme='dark'] #toc-container .toc-nav .toc-list li .toc-link {
    color: #94a3b8;
    border-left-color: #334155;
}

html[data-theme='dark'] #toc-container .toc-nav .toc-list li .toc-link:hover,
html[data-theme='dark'] #toc-container .toc-nav .toc-list li .toc-link.active {
    color: var(--color-primary);
    border-left-color: var(--color-primary);
    background-color: rgba(16, 185, 129, 0.1);
}

html[data-theme='dark'] #toc-container .toc-nav .toc-list li.toc-item-h3 .toc-link {
    color: #64748b;
}

.rank-math-breadcrumb {
    font-size: 0.875rem;
    color: #6b7280;
}

.rank-math-breadcrumb a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
}

.rank-math-breadcrumb a:hover {
    color: var(--color-primary);
}

.rank-math-breadcrumb .separator {
    margin: 0 0.5rem;
    color: #d1d5db;
}

html[data-theme='dark'] .rank-math-breadcrumb,
html[data-theme='dark'] .rank-math-breadcrumb a {
    color: #94a3b8;
}

html[data-theme='dark'] .rank-math-breadcrumb a:hover {
    color: var(--color-primary);
}
