/* Base styles with a refined color palette */
:root {
    --text-color: #1a1a1a;
    --background-color: #ffffff;
    --accent-color: #0066cc;
    --muted-color: #6e6e6e;
    --border-color: #e0e0e0;
    --subtle-bg: #f8f8f8;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Nunito Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    
    /* Typography scale */
    --font-size-xs: 0.8rem;
    --font-size-sm: 0.9rem;
    --font-size-base: 1rem;
    --font-size-md: 1.1rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 1.75rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    
    /* Spacing scale */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
}

[data-theme="dark"] {
    --text-color: #f0f0f0;
    --background-color: #121212;
    --accent-color: #3b82f6;
    --muted-color: #a0a0a0;
    --border-color: #2a2a2a;
    --subtle-bg: #1e1e1e;
}

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

html {
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    line-height: 1.65;
    color: var(--text-color);
    background-color: var(--background-color);
    padding: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-weight: 400;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}

body.loaded {
    opacity: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

h2:after {
    content: "";
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 2rem;
    height: 2px;
    background-color: var(--accent-color);
}

p, ul, ol {
    margin-bottom: 1.75rem;
}

a {
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: color 0.2s ease, border-color 0.2s ease;
    font-weight: 500;
    padding-bottom: 1px;
}

a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* Creative minimal layout */
.container {
    width: 90%;
    max-width: 680px;
    margin: 0 auto;
    padding: 6rem 0;
    flex: 1;
}

/* Elegant header */
header {
    margin-bottom: 4rem;
    position: relative;
}

.subtitle {
    color: var(--muted-color);
    font-size: 1.2rem;
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    margin-bottom: 0;
}

/* Refined bio section */
.bio {
    margin-bottom: 4rem;
    font-size: 1.1rem;
}

.bio p {
    position: relative;
}

.bio strong {
    position: relative;
    font-weight: 600;
}

.bio strong:after {
    content: "";
    position: absolute;
    bottom: 0.1em;
    left: 0;
    right: 0;
    height: 0.3em;
    background-color: rgba(90, 103, 216, 0.15);
    z-index: -1;
}

/* Refined Now section */
.now {
    margin-bottom: 4rem;
    background-color: var(--subtle-bg);
    padding: 2rem;
    border-radius: 6px;
}

.now h2 {
    font-size: 1.3rem;
    margin-bottom: 1.75rem;
}

.now h2:after {
    width: 1.5rem;
}

.now-intro {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    color: var(--muted-color);
    font-style: italic;
    font-family: var(--font-serif);
}

.now-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.now-item {
    display: flex;
    flex-direction: column;
}

.now-label {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.now-content {
    font-size: 1rem;
    line-height: 1.5;
}

.now-updated {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--muted-color);
    font-style: italic;
}

/* Refined, minimal blog list with subtle hover */
.blog-preview ul, .blog-list ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.blog-preview li, .blog-list li {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.blog-preview li:first-child, .blog-list li:first-child {
    border-top: 1px solid var(--border-color);
}

.blog-preview a, .blog-list a {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-color);
    transition: color 0.2s ease;
    border-bottom: none;
    font-family: var(--font-serif);
}

.blog-preview a:hover, .blog-list a:hover {
    color: var(--accent-color);
}

.blog-preview .date, .blog-list .date {
    color: var(--muted-color);
    font-size: 0.95rem;
    font-family: var(--font-sans);
}

/* Simplified view all link */
.view-all {
    display: inline-block;
    margin-top: 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent-color);
    border-bottom: none;
}

.view-all:hover {
    opacity: 0.9;
}

/* Minimal footer */
footer {
    margin-top: 4rem;
    color: var(--muted-color);
    font-size: 0.9rem;
    text-align: center;
}

.footer-signature {
    font-family: 'Caveat', cursive;
    font-size: 1.3rem;
    display: block;
    margin-top: 0.5rem;
    color: var(--text-color);
}

/* Minimal social links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    color: var(--muted-color);
    transition: color 0.2s ease, transform 0.2s ease;
    border-bottom: none;
    opacity: 1;
    visibility: visible;
}

.social-links a svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: currentColor;
    display: block;
}

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

/* Subtle theme toggle */
.theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--subtle-bg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.theme-toggle:hover {
    background-color: var(--border-color);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    fill: var(--text-color);
}

.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
}

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

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

/* Scroll progress indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    z-index: 1000;
    transition: width 0.1s ease;
}

/* Distinctive quote styling */
blockquote {
    margin: 2rem 0;
    padding: 0 0 0 2rem;
    border-left: 2px solid var(--accent-color);
    position: relative;
}

blockquote p {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-style: italic;
    line-height: 1.6;
}

blockquote cite {
    font-family: var(--font-sans);
    font-style: normal;
    font-size: 0.9rem;
    color: var(--muted-color);
    display: block;
    margin-top: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 4rem 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .now-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .blog-preview li {
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* Blog post styling */
.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--muted-color);
    border-bottom: none;
    font-size: 0.9rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.back-link:hover {
    color: var(--accent-color);
    transform: translateX(-3px);
}

.post {
    margin-bottom: 3rem;
}

.post-header {
    margin-bottom: 2.5rem;
}

.post-title {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--space-sm);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    font-family: var(--font-serif);
}

.post-title:after {
    display: none;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: var(--muted-color);
    font-size: 0.95rem;
    max-width: 42rem;
    margin: 0 auto 2rem;
}

.reading-time {
    display: flex;
    align-items: center;
}

.reading-time:before {
    content: "•";
    margin-right: 1.5rem;
    font-size: 1.2rem;
}

.post-content {
    max-width: 42rem;
    margin: 3rem auto 0;
    font-size: 1.125rem;
    line-height: 1.8;
}

.post-content p {
    margin-bottom: var(--space-md);
    color: var(--text-color);
    font-size: var(--font-size-md);
    line-height: 1.75;
    font-family: var(--font-sans);
}

.post-content h1, .post-content h2, .post-content h3 {
    font-family: var(--font-serif);
    color: var(--text-color);
    font-weight: 600;
}

.post-content h1 {
    font-size: var(--font-size-3xl);
    margin: var(--space-xl) 0 var(--space-md);
    font-weight: 700;
    line-height: 1.2;
}

.post-content h2 {
    font-size: var(--font-size-2xl);
    margin: var(--space-lg) 0 var(--space-md);
    line-height: 1.3;
}

.post-content h3 {
    font-size: var(--font-size-xl);
    margin: var(--space-lg) 0 var(--space-sm);
}

.post-content ul, .post-content ol {
    margin: 0 0 1.75rem 1.5rem;
    padding-left: 0.5rem;
}

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

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

.post-content blockquote {
    margin: 2.5rem 0;
    padding: 1.5rem 2rem;
    border-left: 3px solid var(--accent-color);
    background-color: var(--subtle-bg);
    border-radius: 0 4px 4px 0;
}

.post-content blockquote p {
    font-family: var(--font-serif);
    font-style: italic;
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
}

.post-content blockquote cite {
    font-family: var(--font-sans);
    font-style: normal;
    font-size: 0.9rem;
    color: var(--muted-color);
}

/* Code blocks in blog posts */
.post-content pre {
    background-color: var(--subtle-bg);
    padding: 1.5rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 2rem 0;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.post-content code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9em;
    background-color: var(--subtle-bg);
    padding: 0.2em 0.4em;
    border-radius: 3px;
}

.post-content pre code {
    background-color: transparent;
    padding: 0;
}

/* Blog list page */
.blog-list {
    margin-bottom: 3rem;
}

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

.blog-list li {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.blog-list li:first-child {
    border-top: 1px solid var(--border-color);
}

.blog-list .date {
    color: var(--muted-color);
    font-size: 0.95rem;
}

.blog-list a {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-color);
    transition: color 0.2s ease;
    border-bottom: none;
}

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

/* Hide the first h1 since we already show the title */
.post-content h1:first-child {
    display: none;
}

/* Add some spacing between sections */
.post-content {
    margin-top: 2rem;
}

/* Improve list styling */
.post-content ul {
    margin-left: 1.5rem;
    margin-bottom: 2rem;
}

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

/* Add the following code block styles at the end of the file */

pre {
    background-color: #f6f8fa;
    border-radius: 6px;
    padding: 16px;
    overflow: auto;
    margin: 1.5em 0;
}

pre code {
    background-color: transparent;
    padding: 0;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9em;
    line-height: 1.5;
    color: #24292e;
    white-space: pre;
    word-wrap: normal;
}

.dark-mode pre {
    background-color: #1e1e1e;
    border: 1px solid #2d2d2d;
}

.dark-mode pre code {
    color: #e6e6e6;
}

/* Inline code */
code {
    background-color: rgba(175, 184, 193, 0.2);
    border-radius: 4px;
    padding: 0.2em 0.4em;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9em;
}

.dark-mode code {
    background-color: rgba(110, 118, 129, 0.4);
}

/* Add these styles for the year-based blog organization */

.year-header {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    font-family: var(--font-serif);
    color: var(--accent-color);
    position: relative;
    display: inline-block;
}

.year-header:after {
    content: "";
    position: absolute;
    bottom: -0.4rem;
    left: 0;
    width: 2.5rem;
    height: 2px;
    background-color: var(--accent-color);
}

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

/* Adjust existing blog list styles */
.blog-list h3:first-of-type {
    margin-top: 0;
}

.blog-list .year-posts:last-of-type {
    margin-bottom: 2rem;
}

.blog-list .year-posts li:first-child {
    border-top: none;
} 