/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables */
:root {
    --accent-color: #c0392b;
    --accent-light: #e74c3c;
    --bg-primary: #fefefe;
    --bg-warm: #f8f4ef;
    --text-primary: #111111;
    --text-secondary: #555;
    --text-tertiary: #888;
    --text-muted: #aaa;
    --separator-color: #e8e0d8;
}

html {
    scroll-behavior: smooth;
    font-size: 18px;
}

body {
    overflow-x: hidden;
}

#home {
    overflow: hidden;
    height: 100vh;
}

body {
    font-family: 'Crimson Text', serif;
    line-height: 1.8;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    font-weight: 400;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    margin-bottom: 1.2rem;
    line-height: 1.3;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

p {
    margin-bottom: 1.5rem;
}

blockquote {
    font-style: italic;
    font-size: 1.4rem;
    line-height: 1.6;
    margin: 2rem 0;
    padding-left: 2rem;
    border-left: 2px solid #e0e0e0;
}

code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    background-color: #f8f8f8;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-weight: 300;
}

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

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

.section {
    display: none;
    padding: 6rem 0 4rem 0;
}

.section.active {
    display: block;
}

.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(254, 252, 249, 0.82);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 50%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 2rem 3rem;
}

.digital-notebook-tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0 0 2rem 0;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-family: 'JetBrains Mono', monospace;
}

.hero-quote {
    font-family: 'DM Serif Display', serif;
    font-size: 3rem;
    max-width: 780px;
    border: none;
    padding: 0;
    margin: 0 0 3rem 0;
    color: var(--text-primary);
    line-height: 1.25;
    font-weight: 400;
    font-style: italic;
}

.error-message {
    color: #e74c3c;
    font-style: normal;
    font-size: 1.5rem;
}

.loading-indicator {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
    width: 100%;
}

.rotating-quotes {
    margin-top: 2rem;
}

.typewriter-container {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.8rem;
}

.typewriter-icon {
    font-size: 1.8rem;
    color: #666;
    opacity: 0.8;
    line-height: 1;
}

.rotating-quote {
    font-family: 'Crimson Text', serif;
    font-size: 1.1rem;
    color: #555;
    min-height: 2em;
    font-style: normal;
    position: relative;
}

.rotating-quote::after {
    content: '|';
    animation: blink 1s infinite;
    color: #666;
    font-weight: 400;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Search Controls */
.search-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

#search {
    padding: 0.5rem 0.8rem;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    font-family: 'Crimson Text', serif;
    font-size: 0.9rem;
    width: 100%;
    max-width: 300px;
    background-color: #fdfdfd;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#search:focus {
    outline: none;
    border-color: #d0d0d0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}


/* Articles and Notes */
/* Articles Grid Layout - Same as books */
.articles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-top: 1rem;
}

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

/* Thoughts Section Styles */
.section-description {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Thoughts Grid */
.thoughts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
    min-height: 200px; /* Give it some height to be visible */
}

/* Responsive Grid Adjustments */
@media (max-width: 768px) {
    .thoughts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filter-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .filter-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .thoughts-grid {
        gap: 0.75rem;
    }
    
    .filter-tabs {
        gap: 0.25rem;
    }
    
    .filter-tab {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Thought Cards */
.thought-card {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: block; /* Ensure visibility */
    margin-bottom: 1.5rem; /* Add spacing between cards */
}

.thought-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #d0d0d0;
}

/* Card Source Indicators */
/* Removing colored bars as requested */
/*
.thought-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-color);
}

.thought-card.linkedin::before { background: #0077b5; }
.thought-card.twitter::before { background: #1da1f2; }
.thought-card.substack::before { background: #ff6719; }
.thought-card.quote-reflection::before { background: #6b46c1; }
.thought-card.cross-platform::before { background: #059669; }
.thought-card.external::before { background: #dc2626; }
*/

/* Card Header */
.card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.source-icon {
    font-size: 1.2rem;
}

.source-label {
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.date {
    margin-left: auto;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

/* Card Content */
.thought-content {
    margin-bottom: 1rem;
}

.thought-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    line-height: 1.3;
    color: var(--text-primary);
}

.thought-content p {
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
    color: #555;
    font-size: 0.95rem;
}

/* Quote Styling */
.quote {
    font-style: italic;
    font-size: 1rem;
    color: var(--text-primary);
    border-left: 3px solid var(--accent-color);
    padding-left: 0.75rem;
    margin: 0 0 0.4rem 0;
}

.quote-author {
    font-weight: 500;
    color: var(--accent-color);
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.my-take {
    font-style: normal;
    color: #555;
    font-size: 0.9rem;
}

/* Platform Links (for cross-platform thoughts) */
.platform-links {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.platform-link {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.platform-link.linkedin {
    background: #0077b5;
    color: white;
}

.platform-link.twitter {
    background: #1da1f2;
    color: white;
}

.platform-link.substack {
    background: #ff6719;
    color: white;
}

.platform-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* External Source */
.external-source {
    margin-bottom: 0.75rem;
    padding: 0.6rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid var(--accent-color);
}

.external-source .source-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    display: block;
}

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

.external-source .source-link:hover {
    text-decoration: underline;
}

/* Card Footer */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(150, 150, 150, 0.08);
    color: #777;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.tag:hover {
    background: rgba(150, 150, 150, 0.15);
    color: #555;
    transform: translateY(-1px);
}

.source-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

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

/* No Results Message */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.no-results p {
    font-size: 1.1rem;
    margin: 0;
}

/* Loading State */
.thoughts-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Smooth Transitions */
.thought-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered Animation for Cards */
.thought-card:nth-child(1) { animation-delay: 0.1s; }
.thought-card:nth-child(2) { animation-delay: 0.2s; }
.thought-card:nth-child(3) { animation-delay: 0.3s; }
.thought-card:nth-child(4) { animation-delay: 0.4s; }

.books {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.books-intro {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    font-size: 1.05rem;
    color: #555;
    line-height: 1.7;
}

.article {
    padding: 1.5rem;
    border: 2px solid #d0d0d0;
    border-radius: 8px;
    background-color: #fafafa;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.note {
    padding: 2rem;
    border: 2px solid #d0d0d0;
    border-radius: 8px;
    background-color: #fafafa;
    transition: all 0.3s ease;
}

/* Books Layout with Sidebar */
.books-layout {
    display: grid;
    grid-template-columns: 1fr 250px;
    gap: 2rem;
    margin-top: 1.5rem;
}

.books-main {
    min-width: 0; /* Prevent grid overflow */
}

/* Books Grid Layout */
#books-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

/* Books Sidebar */
.books-sidebar {
    background: #f9f9f9;
    padding: 1.2rem;
    border-radius: 8px;
    border: 1px solid #eee;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.books-tags-section h3 {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#books-tags-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.book-tag-sidebar {
    background: none;
    border: none;
    padding: 0.3rem 0;
    font-size: 0.8rem;
    color: #666;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.book-tag-sidebar:hover {
    background: #f0f0f0;
    color: #444;
    padding-left: 0.5rem;
}

.book-tag-sidebar.active {
    background: #e8e8e8;
    color: #333;
    font-weight: 500;
    padding-left: 0.5rem;
}

.book {
    padding: 1.5rem;
    border: 2px solid #d0d0d0;
    border-radius: 8px;
    background-color: #fafafa;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.book:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.note:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Cover Images for Articles and Books */
.article-cover, .book-cover {
    margin-bottom: 1rem;
    border-radius: 6px;
    overflow: hidden;
}

.cover-image {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.cover-image:hover {
    transform: scale(1.02);
}

/* Post cover image styles */
.post-cover {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.post-cover-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    display: block;
}

.article-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.2;
    font-weight: 400;
}

.note-title {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.article-summary {
    color: #666;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    font-size: 0.9rem;
    flex-grow: 1;
}

.note-content {
    color: #555;
    margin-bottom: 1rem;
}

.article-tags,
.note-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.article-tag,
.note-tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    background-color: rgba(150, 150, 150, 0.08);
    color: #777;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.article-tag:hover,
.note-tag:hover {
    background-color: rgba(150, 150, 150, 0.15);
    color: #555;
    transform: translateY(-1px);
}

.article-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.article-link:hover {
    color: #666;
}

.article-date {
    font-size: 0.9rem;
    color: #888;
    font-family: 'Crimson Text', serif;
}

/* About Section */
.about-content {
    max-width: 600px;
    margin: 0 auto;
}

.bio {
    margin-bottom: 3rem;
}

/* Profile Section with Photo */
.profile-section {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.profile-photo {
    flex-shrink: 0;
}

.profile-photo img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e8e8e8;
}

.about-text {
    flex: 1;
    min-width: 0;
}

/* About Page Specific Styles */
.about-page {
    min-height: 100vh;
    padding: 6rem 0 2rem 0;
}

.about-text {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.9;
}

.about-text p {
    margin-bottom: 2rem;
    color: #333;
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* Responsive Profile Layout */
@media (max-width: 768px) {
    .profile-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }
    
    .profile-photo img {
        width: 150px;
        height: 150px;
    }
    
    .about-text {
        text-align: left;
    }
}

/* NEW MODERN ABOUT PAGE DESIGN */
.about-page {
    min-height: 100vh;
    padding: 0;
    background: none;
}

/* Hero Section */
.hero-section {
    background: none;
    padding: 7rem 0 4rem 0;
    border-bottom: 1px solid var(--separator-color);
    margin-bottom: 3rem;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.hero-photo {
    flex-shrink: 0;
}

.hero-photo img {
    width: 280px;
    height: 280px;
    object-fit: cover;
    object-position: center top;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 3px solid #ffffff;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-photo img:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 2.2rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #888;
    margin-bottom: 0;
}

/* Main Content Section */
.main-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.content-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 3rem;
}

.content-text p {
    margin-bottom: 2rem;
}

.content-text p:last-child {
    margin-bottom: 0;
}

.content-text h3 {
    font-size: 1.5rem;
    font-weight: 400;
    margin: 3rem 0 1.5rem 0;
    color: var(--text-primary);
    border-bottom: 2px solid var(--separator-color);
    padding-bottom: 0.5rem;
}

.content-text h3:first-child {
    margin-top: 2rem;
}

.feature-list {
    margin: 1.5rem 0 2rem 2rem;
    list-style: none;
}

.feature-list li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.7;
}

.feature-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--text-secondary);
    font-weight: bold;
}

.feature-list strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        gap: 3rem;
    }

    .hero-photo img {
        width: 240px;
        height: 240px;
    }

    .hero-text h1 {
        font-size: 2.1rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 5rem 1.5rem 3rem 1.5rem;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .hero-photo img {
        width: 160px;
        height: 160px;
    }

    .hero-text h1 {
        font-size: 1.85rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .main-content {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero-photo img {
        width: 180px;
        height: 180px;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
}

.highlight-box {
    background-color: #f9f9f9;
    border: 1px solid #e8e8e8;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 6px;
    display: inline-block;
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
    display: block;
    text-align: center;
}

.highlight-box p {
    margin: 0;
    font-size: 1.1rem;
    color: #555;
    font-style: italic;
    display: inline;
}

/* Curious Labs project cards on About page */
.labs-projects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}

.lab-card {
    display: block;
    padding: 1.25rem 1.4rem;
    background: var(--bg-warm);
    border: 1px solid var(--separator-color);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.lab-card:hover {
    border-color: #ccc;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.lab-card-name {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.lab-card-desc {
    display: block;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

@media (max-width: 600px) {
    .labs-projects {
        grid-template-columns: 1fr;
    }
}

.timeline {
    margin-top: 3rem;
}

.timeline-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    align-items: baseline;
    position: relative;
    padding-left: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 2px;
    height: calc(100% + 1.5rem);
    background-color: #d0d0d0;
}

.timeline-item:last-child::before {
    height: 0.5rem;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: -3px;
    top: 0.5rem;
    width: 8px;
    height: 8px;
    background-color: #888;
    border-radius: 50%;
}

.year {
    font-weight: 400;
    color: #666;
    min-width: 80px;
    font-family: 'Crimson Text', serif;
    font-size: 0.9rem;
}

.date {
    font-weight: 400;
    color: #666;
    min-width: 100px;
    font-family: 'Crimson Text', serif;
    font-size: 0.9rem;
}

/* Highlights Page Specific Styles */
.highlights-page {
    min-height: 100vh;
    padding: 6rem 0 2rem 0;
}

.highlights-content {
    max-width: 600px;
    margin: 0 auto;
}

.highlights-link-section {
    text-align: center;
    margin-top: 3rem;
}

.highlights-link {
    color: #666;
    text-decoration: none;
    font-size: 1rem;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.highlights-link:hover {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}

/* Blog Post and Note Pages */
.blog-post, .note-post, .book-review {
    min-height: 100vh;
    padding: 6rem 0 2rem 0;
}

.post-header {
    margin-bottom: 2rem;
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--separator-color);
}

.post-header h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.post-subtitle {
    font-family: 'Crimson Text', serif;
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--text-secondary);
    font-style: italic;
    max-width: 680px;
    margin: 0 auto 1.5rem auto;
    font-weight: 400;
}

.post-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.post-meta-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    font-family: 'Crimson Text', serif;
    font-size: 0.95rem;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

.post-meta-sep {
    color: var(--text-secondary);
    opacity: 0.4;
    font-size: 0.85rem;
}

.post-date {
    font-family: 'Crimson Text', serif;
    font-size: 0.95rem;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.post-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.9;
}

.post-content h2 {
    margin: 3rem 0 1.5rem 0;
    font-size: 1.8rem;
    color: var(--text-primary);
}

.post-content p {
    margin-bottom: 1.8rem;
    color: var(--text-primary);
}

.post-footer {
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.back-link,
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    min-height: 40px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    border: 1px solid #e0e0e0;
    background: #fafafa;
    color: #555;
}

.back-link:hover,
.share-btn:hover {
    background: #f0f0f0;
    border-color: #ccc;
    color: #222;
}

.share-btn .share-icon {
    flex-shrink: 0;
    transition: transform 0.15s;
}

.share-btn:hover .share-icon {
    transform: translateY(-1px);
}

/* Per-note share button */
.note-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.note-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: inherit;
    font-size: 0.78rem;
    color: #888;
    background: none;
    border: 1px solid transparent;
    padding: 0.4rem 0.65rem;
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
    line-height: 1;
    min-height: 32px;
}

.note-share-btn .share-icon {
    flex-shrink: 0;
    opacity: 0.85;
}

.note-share-btn:hover {
    color: #222;
    background: #f5f5f5;
    border-color: #e4e4e4;
}

.note-share-btn:hover .share-icon {
    opacity: 1;
}

@media (max-width: 640px) {
    .note-share-btn {
        min-height: 36px;
        padding: 0.45rem 0.7rem;
    }
}

.note-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.note-link:hover {
    color: #666;
}

/* Books Section Specific Styles */
.book-header {
    margin-bottom: 0.5rem;
}

.book-title {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: var(--text-primary);
    line-height: 1.2;
    font-weight: 400;
}

.book-author {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 0.4rem;
    font-style: italic;
}

.book-rating {
    font-size: 0.8rem;
    color: #f39c12;
    margin-bottom: 0.5rem;
}

.book-summary {
    color: #666;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    font-size: 0.9rem;
    flex-grow: 1;
}

.book-learning {
    background-color: #f9f9f9;
    padding: 0.8rem;
    border-radius: 4px;
    margin-bottom: 0.8rem;
    border-left: 2px solid #ddd;
}

.book-learning h4 {
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 0.3rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.book-learning p {
    font-size: 0.85rem;
    line-height: 1.3;
    color: #666;
    margin: 0;
}

.book-learning h4 {
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 0.6rem;
}

.book-learning p {
    color: #555;
    margin: 0;
    line-height: 1.5;
    font-style: italic;
    font-size: 0.9rem;
}

.book-tags {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    margin-top: 0.4rem;
}

.book-tag {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    background-color: #f8f8f8;
    color: #888;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #eee;
    text-decoration: none;
}

.book-tag:hover {
    background-color: #f0f0f0;
    color: #666;
}

/* Tag Filter Styles */
.tag-filter-container {
    margin-bottom: 1rem;
}

.tag-filter {
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
    margin-bottom: 0;
}

.tag-filter-header {
    display: none;
}

.tag-filter-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.clear-filter {
    color: #999;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: normal;
    margin-left: 0.5rem;
    padding: 0;
}

.clear-filter:hover {
    color: #666;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.book-tag-filter {
    display: inline-block;
    background-color: #f5f5f5;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    color: #777;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    margin-right: 0.4rem;
    margin-bottom: 0.3rem;
}

.book-tag-filter:hover {
    background-color: #eee;
    color: #666;
}

.book-tag-filter.active {
    background-color: #e0e0e0;
    color: #444;
}

.active-filter-indicator {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.3rem;
    padding: 0;
}

.active-tag {
    font-weight: 600;
    color: #333;
}

.no-books-message {
    padding: 2rem;
    text-align: center;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    border: 1px dashed #ddd;
}

.book-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.book-link:hover {
    color: #666;
}

/* Book Review Page Styles */
.book-author-detail {
    font-size: 1.2rem;
    color: #666;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.post-meta-info .book-rating {
    font-size: 0.9rem;
    color: #f39c12;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
}

.book-summary-section,
.key-insights,
.personal-application,
.favorite-quotes,
.reflection {
    margin-bottom: 3rem;
}

.post-content ul {
    margin: 1rem 0 1.5rem 2rem;
}

.post-content li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.post-content blockquote {
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background-color: #f9f9f9;
    border-left: 3px solid #d0d0d0;
    border-radius: 0 6px 6px 0;
}

/* ---------------------------------------------------------------------------
   Notion Rich Content Blocks
   --------------------------------------------------------------------------- */

/* Images */
.notion-image {
    margin: 2.5rem 0;
    text-align: center;
}

.notion-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.notion-image figcaption {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-style: italic;
    line-height: 1.4;
}

/* Callout cards */
.notion-callout {
    display: flex;
    gap: 0.75rem;
    padding: 1.1rem 1.25rem;
    margin: 1.5rem 0;
    background: var(--bg-warm);
    border-radius: 8px;
    border: 1px solid var(--separator-color);
    line-height: 1.6;
}

.notion-callout-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    line-height: 1.5;
}

.notion-callout-content {
    flex: 1;
    min-width: 0;
}

.notion-callout-content p {
    margin-bottom: 0.6rem;
}

.notion-callout-content p:last-child {
    margin-bottom: 0;
}

/* Toggle / Accordion */
.notion-toggle {
    margin: 1rem 0;
    border: 1px solid var(--separator-color);
    border-radius: 8px;
    overflow: hidden;
}

.notion-toggle summary {
    padding: 0.9rem 1.1rem;
    cursor: pointer;
    font-weight: 500;
    background: var(--bg-warm);
    transition: background 0.15s;
}

.notion-toggle summary:hover {
    background: #f0ebe4;
}

.notion-toggle-content {
    padding: 0.75rem 1.1rem 1rem;
}

/* Code blocks */
.notion-code {
    margin: 1.5rem 0;
    padding: 1.1rem 1.25rem;
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
}

.notion-code-figure {
    margin: 1.5rem 0;
}

.notion-code-figure .notion-code {
    margin: 0;
    border-radius: 8px 8px 0 0;
}

.notion-code-figure figcaption {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    padding: 0.4rem 1rem;
    background: #2d2d2d;
    border-radius: 0 0 8px 8px;
}

/* Bookmark / Link preview */
.notion-bookmark {
    display: block;
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border: 1px solid var(--separator-color);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.notion-bookmark:hover {
    border-color: #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.notion-bookmark-title {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.notion-bookmark-url {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Video embeds */
.notion-video {
    margin: 2rem 0;
}

.notion-video-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.notion-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Columns */
.notion-columns {
    display: grid;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.notion-columns-2 { grid-template-columns: 1fr 1fr; }
.notion-columns-3 { grid-template-columns: 1fr 1fr 1fr; }

@media (max-width: 640px) {
    .notion-columns-2,
    .notion-columns-3 {
        grid-template-columns: 1fr;
    }
}

/* Table */
.notion-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.notion-table th,
.notion-table td {
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--separator-color);
    text-align: left;
}

.notion-table th {
    background: var(--bg-warm);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-secondary);
}

/* Divider */
.notion-divider {
    border: none;
    border-top: 1px solid var(--separator-color);
    margin: 2.5rem 0;
}

/* To-do items */
.notion-todo {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0.4rem 0;
}

.notion-todo input[type="checkbox"] {
    margin-top: 0.35rem;
}

/* Embed */
.notion-embed iframe {
    width: 100%;
    min-height: 400px;
    border-radius: 8px;
    border: 1px solid var(--separator-color);
}

/* Notion text colors */
.notion-color-gray { color: #9b9a97; }
.notion-color-brown { color: #64473a; }
.notion-color-orange { color: #d9730d; }
.notion-color-yellow { color: #dfab01; }
.notion-color-green { color: #0f7b6c; }
.notion-color-blue { color: #0b6e99; }
.notion-color-purple { color: #6940a5; }
.notion-color-pink { color: #ad1a72; }
.notion-color-red { color: #e03e3e; }

.notion-color-gray_background { background: #ebeced; padding: 0.1rem 0.3rem; border-radius: 3px; }
.notion-color-brown_background { background: #e9e5e3; padding: 0.1rem 0.3rem; border-radius: 3px; }
.notion-color-orange_background { background: #faebdd; padding: 0.1rem 0.3rem; border-radius: 3px; }
.notion-color-yellow_background { background: #fbf3db; padding: 0.1rem 0.3rem; border-radius: 3px; }
.notion-color-green_background { background: #ddedea; padding: 0.1rem 0.3rem; border-radius: 3px; }
.notion-color-blue_background { background: #ddebf1; padding: 0.1rem 0.3rem; border-radius: 3px; }
.notion-color-purple_background { background: #eae4f2; padding: 0.1rem 0.3rem; border-radius: 3px; }
.notion-color-pink_background { background: #f4dfeb; padding: 0.1rem 0.3rem; border-radius: 3px; }
.notion-color-red_background { background: #fbe4e4; padding: 0.1rem 0.3rem; border-radius: 3px; }

.description {
    flex: 1;
}

/* Contact Section */
.contact-content {
    max-width: 700px;
    margin: 0 auto;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.5rem;
    background-color: #fafafa;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.contact-card:hover {
    border-color: #d0d0d0;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #f0f0f0;
    border-radius: 50%;
    color: #666;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.contact-card:hover .contact-icon {
    background-color: #e8e8e8;
    color: #333;
}

.contact-info h3 {
    font-size: 1.2rem;
    margin: 0 0 0.3rem 0;
    color: var(--text-primary);
}

.contact-info p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.email-section {
    text-align: center;
    padding-top: 2rem;
}

.email-divider {
    width: 80px;
    height: 1px;
    background-color: #d0d0d0;
    margin: 0 auto 1.5rem auto;
}

.email-text {
    font-size: 1rem;
    color: #555;
    margin: 0;
}

.email-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 400;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.email-link:hover {
    border-bottom-color: var(--text-primary);
}

/* Form */
.feedback-form {
    margin-top: 3rem;
}

.feedback-form h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: 400;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
    background-color: #fafafa;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #bbb;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background-color: #2c2c2c;
    color: white;
    border: none;
    border-radius: 6px;
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #1a1a1a;
}


/* Responsive Design */
@media (max-width: 768px) {
    html {
        font-size: 16px;
    }
    
    .hero-quote {
        font-size: 1.7rem;
    }

    .hero {
        min-height: auto;
        padding: 3rem 1.5rem 4rem;
    }
    
    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .contact-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .timeline-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .contact-cards {
        grid-template-columns: 1fr;
    }
    
    .contact-card {
        padding: 1.2rem;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
    }
    
    .contact-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .books {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .books-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .books-sidebar {
        order: -1; /* Show sidebar first on mobile */
        position: static;
        padding: 0.8rem;
    }

    #books-tags-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .book-tag-sidebar {
        background: #f0f0f0;
        padding: 0.2rem 0.5rem;
        border-radius: 12px;
        font-size: 0.7rem;
    }

    .articles,
    #books-list {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .article,
    .book {
        padding: 1.2rem;
    }
    
    .article-title,
    .book-title {
        font-size: 1rem;
    }
    
    .article-summary {
        font-size: 0.85rem;
    }
    
    .book-author {
        font-size: 0.7rem;
    }
    
    .book-summary {
        font-size: 0.75rem;
    }
    
    .book-learning {
        padding: 0.4rem;
    }
    
    .book-learning h4 {
        font-size: 0.65rem;
    }
    
    .book-learning p {
        font-size: 0.7rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Alternative Design Options */
.hero-photo.circular img {
    border-radius: 50%;
    object-fit: cover;
    background: none;
}

.hero-photo.natural img {
    width: auto;
    height: auto;
    max-width: 280px;
    max-height: 280px;
    object-fit: none;
    border-radius: 8px;
}

/* Card-Based Layout Option */
.hero-section.card-style {
    background: #ffffff;
    border-radius: 20px;
    margin: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.hero-section.card-style .hero-content {
    padding: 3rem;
}

/* Split-Screen Layout Option */
.hero-section.split-screen {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 80vh;
    align-items: center;
    gap: 0;
}

.hero-section.split-screen .hero-photo {
    justify-self: center;
    padding: 2rem;
}

.hero-section.split-screen .hero-text {
    padding: 2rem;
    background: #ffffff;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Category Cards Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.category-card {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-color);
}

.category-icon {
    color: var(--accent-color);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
}

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

.category-name {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 400;
}

.category-description {
    color: #666;
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.breadcrumb-link {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.breadcrumb-separator {
    color: #999;
}

.breadcrumb-current {
    color: #666;
    font-weight: 500;
}

/* Responsive Design for Category Grid */
@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .category-card {
        padding: 1.5rem;
    }
    
    .category-name {
        font-size: 1.2rem;
    }
    
    .category-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .category-card {
        padding: 1.25rem;
    }
    
    .category-icon {
        height: 50px;
    }
    
    .category-name {
        font-size: 1.1rem;
    }
}

/* ===== CONSISTENT TYPOGRAPHY & UX ===== */

/* Article Meta (Blog Cards) */
.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-family: 'Crimson Text', serif;
    line-height: 1.5;
}

.article-author, .post-author {
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.5;
    display: inline-flex;
    align-items: center;
}

.article-date, .post-date {
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.5;
    display: inline-flex;
    align-items: center;
}

.article-reading-time, .post-reading-time {
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.5;
    display: inline-flex;
    align-items: center;
}

.article-separator, .post-separator {
    color: var(--separator-color);
    font-weight: 300;
    margin: 0 0.2rem;
    display: inline-flex;
    align-items: center;
    line-height: 1.5;
}

/* Tags (Consistent across cards and posts) */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.article-tag, .post-tag {
    display: inline-block;
    background: rgba(150, 150, 150, 0.08);
    color: #777;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    text-decoration: none;
    border: none;
    font-family: 'Crimson Text', serif;
    transition: all 0.2s ease;
}

/* Clickable tags */
.clickable-tag {
    cursor: pointer;
}

.clickable-tag:hover {
    background: rgba(150, 150, 150, 0.15);
    color: #555;
    transform: translateY(-1px);
}

/* Blog Post Header - Styling defined above */

.post-title {
    font-size: 2.2rem;
    font-weight: 400;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: var(--text-primary);
    font-family: 'DM Serif Display', serif;
}

/* Article Title (Blog Cards) */
.article-title {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 1rem;
    line-height: 1.3;
    font-family: 'DM Serif Display', serif;
}

.article-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-link:hover {
    color: var(--accent-color);
}

/* Article Summary */
.article-summary {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-family: 'Crimson Text', serif;
}

/* Post Content Typography */
.post-content {
    font-family: 'Crimson Text', serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.post-content h2 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem 0;
    color: var(--text-primary);
    font-weight: 400;
}

.post-content h3 {
    font-size: 1.4rem;
    margin: 1.5rem 0 0.75rem 0;
    color: var(--text-primary);
    font-weight: 400;
}

.post-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.post-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.post-content em {
    font-style: italic;
    color: var(--text-secondary);
}

/* Normalize headings in book reviews so h2 and h3 render identically */
.book-review .post-content h2 {
    font-size: 1.4rem;
    margin: 2.5rem 0 0.75rem 0;
    font-weight: 400;
}

.book-review .post-content h3 {
    margin: 2.5rem 0 0.75rem 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .post-meta {
        gap: 0.6rem;
    }

    .post-meta-info {
        gap: 0.3rem;
        font-size: 0.88rem;
    }

    .article-separator, .post-separator {
        display: none;
    }

    .post-meta-sep {
        display: inline;
    }

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

    .article-title {
        font-size: 1.2rem;
    }
}

/* ============================================================
   Narrow content container
   ============================================================ */
.container-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================================
   Page header (blog, notes, books)
   ============================================================ */
.page-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e8e8e8;
}

.page-header h1 {
    font-size: 2.2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.page-description {
    color: #888;
    font-size: 1.05rem;
    margin: 0;
    line-height: 1.6;
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 3rem 0;
    font-style: italic;
}

/* ============================================================
   Notes list
   ============================================================ */
/* Notes category grid */
.notes-cat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--separator-color);
    border: 1px solid var(--separator-color);
    margin-bottom: 3rem;
}

.notes-cat-cell {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--bg-primary);
    padding: 1.4rem 1.6rem;
    position: relative;
    overflow: hidden;
    transition: background 0.2s;
    min-height: 6.5rem;
}

.notes-cat-cell::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 2px; height: 0;
    background: var(--accent-color);
    transition: height 0.25s ease;
}

.notes-cat-cell:hover {
    background: var(--bg-warm);
}

.notes-cat-cell:hover::before {
    height: 100%;
}

.cat-cell-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.cat-cell-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.cat-cell-arrow {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s, transform 0.2s;
}

.notes-cat-cell:hover .cat-cell-arrow {
    opacity: 1;
    transform: translateX(0);
}

.cat-cell-name {
    display: block;
    font-family: 'DM Serif Display', serif;
    font-size: 1.2rem;
    font-style: italic;
    font-weight: 400;
    margin-bottom: 0.25rem;
    transition: color 0.2s;
}

.notes-cat-cell:hover .cat-cell-name {
    color: var(--accent-color);
}

.cat-cell-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0 0 0.7rem;
    font-style: italic;
}

.cat-cell-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    color: var(--text-muted);
}

/* Notes recent strip */
.notes-section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.63rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.9rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notes-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--separator-color);
}

.notes-recent {
    margin-bottom: 2rem;
}

.notes-recent-row {
    display: grid;
    grid-template-columns: 4.5rem 1fr auto;
    align-items: baseline;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--separator-color);
    text-decoration: none;
    color: inherit;
}

.notes-recent-row:first-child {
    border-top: 1px solid var(--separator-color);
}

.notes-recent-row:hover .notes-recent-title {
    color: var(--accent-color);
}

.notes-recent-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    color: var(--text-muted);
}

.notes-recent-title {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.notes-recent-cat {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.58rem;
    color: var(--text-muted);
    border: 1px solid var(--separator-color);
    padding: 0.1em 0.5em;
    border-radius: 2px;
    white-space: nowrap;
}

/* ── Year timeline index ── */
.year-index {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    left: max(1.5rem, calc(50vw - 420px));
    width: 60px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    z-index: 50;
    border-right: 1px solid var(--separator-color); /* the vertical timeline line */
}

@media (max-width: 1020px) {
    .year-index { display: none; }
}

/* Mobile year pills — only visible below 1020px */
.year-pills {
    display: none;
}

@media (max-width: 1020px) {
    .year-pills {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 2rem;
    }
}

.year-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.25rem 0.65rem;
    border: 1px solid var(--separator-color);
    border-radius: 2px;
    letter-spacing: 0.04em;
    transition: color 0.2s, border-color 0.2s;
}

.year-pill:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.year-index-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0.5rem 0.85rem 0.5rem 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: color 0.2s;
    position: relative;
    width: 60px;
}

/* Dot sitting on the right-edge vertical line */
.year-index-item::after {
    content: '';
    position: absolute;
    right: -3px;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 1px solid var(--separator-color);
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.year-index-item:hover { color: var(--text-secondary); }

.year-index-item.active { color: var(--text-primary); }

.year-index-item.active::after {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-50%) scale(1.3);
}

/* ── Year section grouping ── */
.year-section + .year-section {
    margin-top: 2rem;
}

.year-header-row {
    display: none;
}

/* Breadcrumb */
.page-breadcrumb {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.page-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

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

@media (max-width: 480px) {
    .notes-cat-grid {
        grid-template-columns: 1fr;
    }
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.note-card {
    padding: 2rem 0;
    border-bottom: 1px solid #ebebeb;
}

.note-card:first-child {
    padding-top: 0;
}

.note-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.note-date {
    font-size: 0.82rem;
    color: #aaa;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
}

.note-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.note-tag {
    font-size: 0.72rem;
    padding: 0.15rem 0.5rem;
    background: #f0f0f0;
    color: #888;
    border-radius: 20px;
    text-transform: lowercase;
    letter-spacing: 0.3px;
}

.note-title {
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.note-learning {
    margin-bottom: 1rem;
}

.note-learning-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #bbb;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 0.3rem;
}

.note-learning p {
    color: #555;
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
    font-style: italic;
}

.note-source-link {
    font-size: 0.85rem;
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.note-source-link:hover {
    color: #555;
}

.note-source-unknown {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
    opacity: 0.6;
}

/* ============================================================
   Blog list
   ============================================================ */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.blog-entry {
    padding: 2rem 0;
    border-bottom: 1px solid #ebebeb;
}

.blog-entry:first-child {
    padding-top: 0;
}

.blog-entry-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.blog-entry-title {
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 0.6rem;
    line-height: 1.3;
}

.blog-entry-title a {
    text-decoration: none;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.blog-entry-title a:hover {
    color: #666;
}

.blog-entry-summary {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .container-narrow {
        padding: 0 1.2rem;
    }
    .note-card,
    .blog-entry {
        padding: 1.5rem 0;
    }
}

/* ============================================================
   PREMIUM DESIGN ADDITIONS
   ============================================================ */

/* DM Serif Display for all headings */
h1, h2, h3, h4, h5, h6,
.page-header h1, .post-header h1, .post-title {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: var(--accent-color);
    z-index: 1001;
    transition: width 0.08s linear;
}

/* Scroll Fade-In */
.fade-in {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Site Footer */
.site-footer {
    border-top: 1px solid var(--separator-color);
    padding: 3rem 2rem 3.5rem;
    text-align: center;
    margin-top: 5rem;
    background: var(--bg-warm);
}

.footer-inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    align-items: center;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
}

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

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-sep {
    color: var(--text-muted);
    font-size: 0.8rem;
    user-select: none;
}

.footer-email {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    transition: color 0.2s ease;
    letter-spacing: 0.3px;
}

.footer-email:hover {
    color: var(--text-secondary);
}

/* Hero responsive — mobile */
@media (max-width: 768px) {
    .hero-quote {
        font-size: 1.7rem;
    }
}

@media (max-width: 480px) {
    .hero-quote {
        font-size: 1.45rem;
        max-width: 100%;
    }
}

/* Article/book/note card hover — use warm shadow instead of border change */
.article:hover,
.book:hover,
.note:hover {
    border-color: transparent;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.10);
}

/* Section background for recent writing on home */
.section:nth-of-type(2) {
    background: var(--bg-warm);
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* Home page — full viewport, no scroll */
body.home-page {
    overflow: hidden;
    height: 100dvh;
}

body.home-page main {
    height: 100%;
    overflow: hidden;
}

body.home-page .hero {
    height: 100dvh;
    min-height: unset;
    padding: 0 2rem;
}

body.home-page .site-footer {
    display: none;
}

@media (max-width: 600px) {
    body.home-page .hero {
        padding: 0 1.5rem;
    }
}