/* Base styles */
:root {
    --background-color: #f5f3ee; /* Light beige/off-white background */
    --text-color: #333;
    --link-color: #0066cc;
    --link-hover-color: #004080;
    --heading-color: #222;
    --border-color: #ddd;
}

/* Dark mode styles */
[data-theme="dark"] {
    --background-color: #1e1e1e; /* Dark gray instead of pure black */
    --text-color: #e0e0e0;
    --link-color: #88bbff;
    --link-hover-color: #aaccff;
    --heading-color: #f0f0f0;
    --border-color: #444;
}

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

body {
    font-family: 'PT Serif', 'Georgia', serif; /* PT Serif is closer to Tiempos Text */
    font-size: 18px; /* Increased for better readability */
    line-height: 1.25; /* Adjusted to exactly 1.25 as requested */
    color: var(--text-color);
    background-color: var(--background-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Header styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

header h1 a {
    text-decoration: none;
    color: var(--heading-color);
}

/* Theme toggle switch */
.theme-toggle {
    position: relative;
    display: inline-block;
}

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

.slider {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    background-color: #ccc;
    border-radius: 20px;
    transition: .4s;
    cursor: pointer;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Main content styles */
main {
    margin-bottom: 3rem;
}

section {
    margin-bottom: 2.5rem;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--heading-color);
}

p {
    margin-bottom: 1.2rem;
    line-height: 1.75;
}

.bio {
    margin-bottom: 2.5rem;
}

/* Link styles */
a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Post list styles */
.post-list {
    list-style-type: none;
    padding-left: 1rem;
}

.post-list li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1rem;
}

.post-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--link-color);
}

/* Table of contents styles */
.contents {
    position: fixed;
    left: 20px;
    top: 150px;
    width: 250px;
    padding: 20px;
}

.contents h2 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

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

.contents li {
    margin-bottom: 10px;
}

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

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

/* Blog post styles */
.post-title {
    font-size: 3rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.post-date {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.post-content {
    font-size: 18px; /* Consistent with body */
    line-height: 1.25; /* Exactly 1.25 as requested */
}

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

.post-content h2 {
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
}

.post-content h3 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

.post-content ul, .post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

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

.post-content blockquote {
    border-left: 3px solid var(--border-color);
    padding-left: 1rem;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 1.5rem;
    font-style: italic;
}

/* Footer styles */
footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.copyright {
    margin-top: 1rem;
    color: #666;
}

/* Responsive styles */
@media (max-width: 1200px) {
    .contents {
        position: static;
        width: 100%;
        margin-bottom: 2rem;
        padding: 0;
    }

    .container {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem;
    }

    header h1 {
        font-size: 1.6rem;
    }

    body {
        font-size: 17px; /* Slightly smaller on mobile but still readable */
    }

    .post-content {
        font-size: 17px; /* Match body font size */
    }

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

@media (max-width: 480px) {
    header h1 {
        font-size: 1.4rem;
    }

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