
:root {
    --color-text-primary: #111111;
    --color-text-secondary: #333333;
    --color-text-muted: #595959;
    --color-border-light: #e6e6e6;
    --color-link: #1a5fb4;
    --color-link-hover: #0b4a8b;
    --color-background: #ffffff;
    
    --font-serif: "Lora", Georgia, "Times New Roman", serif;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    --container-width: 1100px;
}

[data-theme="dark"] {
    --color-text-primary: #ffffff;
    --color-text-secondary: #d4d4d4;
    --color-text-muted: #b0b0b0;
    --color-border-light: #404040;
    --color-link: #80b3ff;
    --color-link-hover: #a3c9ff;
    --color-background: #0f0f0f;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-serif);
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
    color: var(--color-text-secondary);
    background-color: var(--color-background);
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] body {
    color: var(--color-text-secondary);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-text-primary);
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: var(--color-text-primary);
}

h1 {
    font-size: 36px;
    margin-bottom: 32px;
}

h2 {
    font-size: 24px;
    margin-bottom: 24px;
}

h3 {
    font-size: 20px;
    margin-bottom: 16px;
}

p {
    margin-bottom: 24px;
}

a {
    color: var(--color-link);
    text-decoration: none;
}

a:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

blockquote {
    font-style: italic;
    color: var(--color-text-secondary);
    border-left: 3px solid var(--color-border-light);
    padding-left: 16px;
    margin: 32px 0;
}

.container{
    max-width:var(--container-width);
    margin:0 auto;
    padding:0 24px;
    min-height:0px;
}

.main-content{
    padding:24px 0;
    min-height:0px;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 70% 30%;
    gap: 48px;
    align-items: start;
}

.content-main {
    min-width: 0;
}

@media (max-width: 900px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: 2;
    }
}

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

.site-header {
    text-align: center;
    padding: 48px 0 0;
    margin-bottom: 64px;
}

.header-content {
    display: block;
    text-align: center;
}

.logo {
    margin-bottom: 24px;
    text-align: center;
}

.logo a {
    font-family: var(--font-serif);
    font-size: 6em;
    font-weight: 400;
    line-height: 1.3;
    color: var(--color-text-primary);
    text-decoration: none;
    display: inline-block;
    border-bottom: 1px dotted var(--color-border-light);
    padding-bottom: 8px;
}

.logo a:hover {
    text-decoration: none;
    color: #111;
}

.site-tagline {
    font-family: var(--font-serif);
    font-size: 14px;
    color: var(--color-text-muted);
    margin-top: 8px;
    margin-bottom: 24px;
}

.main-nav {
    border-top: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
    padding: 12px 0;
    margin-top: 24px;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    gap: 24px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-nav li {
    display: inline;
}

.main-nav a {
    font-family: var(--font-serif);
    font-size: 14px;
    font-weight: 400;
    color: #333;
    text-decoration: none;
}

.main-nav a:hover {
    text-decoration: none;
    color: #111;
}

.main-nav a.active {
    font-weight: 600;
}

.mobile-menu-toggle {
    display: none;
}

@media (max-width: 600px) {
    .logo a {
        font-size: 32px;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        gap: 12px;
        justify-content: center;
    }
}

.site-footer {
    border-top: 1px solid var(--color-border-light);
    margin-top: 80px;
    padding-top: 16px;
    padding-bottom: 32px;
}

.footer-content {
    text-align: center;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.footer-nav a {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--color-text-muted);
}

.footer-info,
.footer-social {
    display: flex;
    justify-content: flex-end;
}

.footer-social a {
    color: white;
    opacity: 0.8;
}

.footer-social a:hover {
    opacity: 1;
}

.post-article {
    max-width: 100%;
}

.post-header {
    margin-bottom: 32px;
}

.post-meta {
    font-family: var(--font-serif);
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.post-meta > * {
    margin-right: 16px;
}

.post-title {
    font-size: 32px;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
}

.post-content {
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
}

.post-content p {
    margin-bottom: 24px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 32px 0;
}

.post-content figure.size-large img,
.post-content figure.size-full img {
    width: 100%;
}

.post-content .locked-content {
    width: 100%;
}

.post-content iframe {
    max-width: 100%;
    margin: 32px 0;
    border: 1px solid var(--color-border-light);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; 
    height: 0;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    margin: 2rem 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    border: none;
}

.post-content ul,
.post-content ol {
    margin-left: 24px;
    margin-bottom: 24px;
}

.post-content li {
    margin-bottom: 8px;
}

.post-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border-light);
    display: none; 
}

.toc-widget {
    margin: 32px 0;
    padding: 12px 0;
    border-top: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
}

.toc-widget h3 {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 400;
    color: var(--color-text-primary);
    margin-bottom: 10px;
}

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

.toc-list li {
    margin-bottom: 8px;
}

.toc-list li:last-child {
    margin-bottom: 0;
}

.toc-list a {
    font-family: var(--font-serif);
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-link);
    display: block;
    padding: 4px 0;
    text-decoration: none;
}

.toc-list a:hover {
    color: var(--color-link-hover);
    text-decoration: none;
}

.toc-level-2 { padding-left: 0; }
.toc-level-3 { padding-left: 16px; }
.toc-level-4 { padding-left: 28px; }
.toc-level-5 { padding-left: 40px; }

.post-content table,
.page-content table {
    width: 100%;
    margin: 32px 0;
    border-collapse: collapse;
    font-family: var(--font-serif);
    font-size: 14px;
    line-height: 1.6;
}

.post-content thead th,
.page-content thead th {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 2px solid var(--color-text-primary);
    color: var(--color-text-primary);
    vertical-align: bottom;
}

.post-content tbody td,
.page-content tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border-light);
    color: var(--color-text-secondary);
    vertical-align: top;
}

.post-content tbody tr:last-child td,
.page-content tbody tr:last-child td {
    border-bottom: 2px solid var(--color-text-primary);
}

.post-content figure,
.page-content figure {
    margin: 32px 0;
}

.post-content figcaption,
.page-content figcaption {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 8px;
    font-style: italic;
}

@media (max-width: 768px) {
    .post-content table,
    .page-content table {
        font-size: 13px;
    }
    
    .post-content thead th,
    .page-content thead th,
    .post-content tbody td,
    .page-content tbody td {
        padding: 10px 12px;
    }
}

.page-content {
    max-width: 100%;
}

.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 36px;
    font-weight: 400;
    line-height: 1.3;
}

.page-subtitle {
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-top: 12px;
}

.page-body {
    font-size: 16px;
    line-height: 1.8;
}

.hero-section {
    margin-bottom: 48px;
}

.section-title {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border-light);
}

.posts-grid {
    display: block; 
}

.post-card {
    margin-bottom: 48px;
    border: none;
    background: #f8f8f8;
    padding: 24px;
    box-shadow: none;
}

.post-card h3 {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 8px;
    transition: color 0.2s ease;
}

.post-card-link:hover h3 {
    color: var(--color-link);
}

.post-card-meta {
    font-family: var(--font-serif);
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.post-card-date {
    font-family: var(--font-serif);
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.post-card-excerpt {
    font-family: var(--font-serif);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
}

.post-card-link {
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--color-link);
    text-decoration: none;
}

.post-card-link:hover {
    text-decoration: none;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border-light);
}

.pagination a,
.pagination-current {
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--color-text-primary);
}

.pagination-current {
    font-weight: 600;
}

.sidebar {
    font-size: 14px;
}

.sidebar-widget {
    margin-bottom: 48px;
    background: none;
    border: none;
    padding: 0;
}

.widget-title {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-border-light);
    color: var(--color-text-primary);
}

.widget-search {
    display: none;
}

.widget-about p {
    font-family: var(--font-serif);
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text-muted);
}

.widget-button {
    display: none; 
}

.recent-posts-list {
    list-style: none;
}

.recent-posts-list li {
    margin-bottom: 16px;
}

.recent-posts-list a {
    font-family: var(--font-serif);
    font-size: 14px;
    color: var(--color-link);
    display: block;
}

.recent-post-date {
    font-family: var(--font-serif);
    font-size: 13px;
    color: var(--color-text-muted);
    display: block;
    margin-top: 4px;
}

.categories-list {
    list-style: none;
}

.categories-list li {
    margin-bottom: 8px;
}

.categories-list a {
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--color-link);
}

.categories-list .count {
    font-size: 13px;
    color: var(--color-text-muted);
}

.widget-social,
.widget-tags {
    display: none;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-top: 32px;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.contact-form-section,
.contact-info-section {
    background: none;
    padding: 0;
    border: none;
}

.contact-form-section h2,
.contact-info-section h2 {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 8px;
    color: var(--color-text-primary);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-border-light);
    font-family: var(--font-serif);
    font-size: 16px;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-link);
}

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

.newsletter-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--color-border-light);
    border-radius: 0;
    font-family: var(--font-serif);
    font-size: 16px;
}

.newsletter-input::placeholder {
    color: var(--color-text-muted);
}

.checkbox-label {
    display: flex;
    align-items: start;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label span {
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--color-text-secondary);
}

.btn-submit {
    padding: 12px 24px;
    background: var(--color-text-primary);
    color: var(--color-background);
    border: none;
    border-radius: 0;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-submit:hover {
    background: var(--color-text-secondary);
}

.widget-subscribe .btn-submit,
.newsletter-subscribe .btn-submit,
input[type="submit"].newsletter-btn,
.newsletter-button {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 0;
    margin-top: 12px;
    background: var(--color-text-primary);
    color: var(--color-background);
    border: none;
    cursor: pointer;
}

.newsletter-button:hover {
    background: var(--color-text-secondary);
}

.contact-info-block {
    margin-bottom: 32px;
}

.contact-info-block h3 {
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 12px;
}

.contact-info-block p {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

.contact-social {
    display: none; 
}

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

.dark-mode-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-background);
    border: 2px solid var(--color-border-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.dark-mode-toggle:active {
    transform: scale(0.95);
}

.dark-mode-toggle .icon {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dark-mode-toggle .sun-icon {
    display: none;
}

.dark-mode-toggle .moon-icon {
    display: block;
}

[data-theme="dark"] .dark-mode-toggle .sun-icon {
    display: block;
}

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

@media (max-width: 600px) {
    .dark-mode-toggle {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}

[data-theme="dark"] .logo a {
    color: var(--color-text-primary);
    border-bottom-color: var(--color-border-light);
}

[data-theme="dark"] .logo a:hover {
    color: var(--color-text-primary);
}

[data-theme="dark"] .main-nav a {
    color: var(--color-text-primary);
}

[data-theme="dark"] .site-tagline {
    color: var(--color-text-muted);
}

[data-theme="dark"] .form-control {
    background: #1a1a1a;
    border-color: var(--color-border-light);
    color: var(--color-text-primary);
}

[data-theme="dark"] .btn-submit {
    background: var(--color-text-primary);
    color: var(--color-background);
    font-weight: 600;
}

[data-theme="dark"] .btn-submit:hover {
    background: var(--color-text-secondary);
}

[data-theme="dark"] img {
    opacity: 0.9;
}

[data-theme="dark"] .post-content img,
[data-theme="dark"] .page-content img {
    opacity: 0.95;
}

[data-theme="dark"] .post-card {
    background: #1a1a1a;
}

[data-theme="dark"] blockquote {
    color: var(--color-text-secondary);
    border-left-color: var(--color-border-light);
}

[data-theme="dark"] .post-card-excerpt {
    font-family: var(--font-serif);
    color: var(--color-text-secondary);
}

[data-theme="dark"] .post-card-link:hover h3 {
    color: var(--color-link);
}

[data-theme="dark"] .post-card-date {
    font-family: var(--font-serif);
    color: var(--color-text-muted);
}

[data-theme="dark"] .newsletter-button {
    background: var(--color-text-primary);
    color: var(--color-background);
}

[data-theme="dark"] .newsletter-button:hover {
    background: var(--color-text-secondary);
}

[data-theme="dark"] .newsletter-input {
    background: #1a1a1a;
    border-color: var(--color-border-light);
    color: var(--color-text-primary);
}

[data-theme="dark"] table {
    color: var(--color-text-secondary);
}

[data-theme="dark"] thead th {
    color: var(--color-text-primary);
    border-bottom-color: var(--color-text-primary);
}

[data-theme="dark"] tbody td {
    border-bottom-color: var(--color-border-light);
    color: var(--color-text-secondary);
}

[data-theme="dark"] .dark-mode-toggle {
    background: #1a1a1a;
    border-color: var(--color-border-light);
}
