/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.6;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
    background-color: #fff;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Site wrapper */
.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
}

/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.logo-image {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    object-fit: contain;
    border-radius: 0 !important;
    clip-path: none !important;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    letter-spacing: -0.02em;
}

.site-navigation {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #333;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: #007acc;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Hero section */
.hero-section {
    padding: 60px 0;
    background: #f8f9fa;
    text-align: center;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
}

.hero-image {
    width: 120px;
    height: 120px;
    margin-bottom: 24px;
    object-fit: contain;
    border-radius: 0 !important;
    clip-path: none !important;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #333;
    letter-spacing: -0.03em;
}

.hero-description {
    font-size: 1.2rem;
    color: #666;
    line-height: 1.5;
}

/* Categories grid */
.categories-grid {
    padding: 60px 0;
}

.category-section {
    margin-bottom: 80px;
}

.category-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: #333;
    letter-spacing: -0.02em;
    text-align: center;
}

/* Posts grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
    margin-bottom: 40px;
}

.posts-list {
    display: grid;
    gap: 32px;
    padding: 40px 0;
}

/* Post card */
.post-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    border-color: #d0d0d0;
}

.post-card-content {
    padding: 32px;
}

/* Adjust padding for cards with images */
.post-card .post-card-image + .post-card-content {
    padding: 24px 32px 32px 32px;
}

.post-card-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.3;
}

.post-card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-card-title a:hover {
    color: #007acc;
}

.post-card-excerpt {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: #888;
}

.post-date {
    font-weight: 500;
}

.post-reading-time::before {
    content: '•';
    margin-right: 8px;
}

.post-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Tags and categories */
.tag, .category-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #f1f3f4;
    color: #666;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag:hover, .category-tag:hover {
    background: #e8f0fe;
    color: #007acc;
}

.category-tag {
    background: #007acc;
    color: #fff;
}

/* Single post */
.post {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}

.post-header {
    margin-bottom: 48px;
    text-align: center;
}

/* Featured Images */
.post-featured-image {
    margin-bottom: 32px;
}

.post-featured-image img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.post-card-image {
    margin: 0;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.post-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card-image a:hover img {
    transform: scale(1.05);
}

.post-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #333;
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #666;
    font-size: 0.95rem;
}

/* Post byline - author name and meta info */
.post-byline {
    margin: 24px 0;
    text-align: center;
}

.author-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e9ecef;
}

.author-name a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.author-name a:hover {
    color: #0066cc;
    text-decoration: underline;
}

.meta-separator {
    color: #999;
}

.post-categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* Table of Contents */
.post-toc {
    margin: 32px 0;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 24px;
}

.toc-wrapper {
    max-width: 100%;
}

.toc-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #333;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 8px;
}

.post-toc nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-toc nav ul ul {
    margin-left: 16px;
}

.post-toc nav li {
    margin-bottom: 8px;
}

.post-toc nav a {
    color: #007acc;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.post-toc nav a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.post-toc nav a.active {
    font-weight: 600;
    color: #0056b3;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin: 40px 0 20px 0;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
}

.post-content h2 {
    font-size: 2rem;
}

.post-content h3 {
    font-size: 1.5rem;
}

.post-content p {
    margin-bottom: 24px;
}

.post-content ul,
.post-content ol {
    margin-bottom: 24px;
    padding-left: 32px;
}

.post-content li {
    margin-bottom: 8px;
}

.post-content blockquote {
    border-left: 4px solid #007acc;
    padding-left: 24px;
    margin: 32px 0;
    font-style: italic;
    color: #666;
}

.post-content code {
    background: #f6f8fa;
    color: #1f2328;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Monaco', 'Courier New', monospace;
}

.post-content pre {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 32px 0;
    border: 1px solid #d0d7de;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 32px 0;
}

.post-footer {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e5e5e5;
}

.post-tags h4 {
    margin-bottom: 16px;
    font-size: 1rem;
    color: #666;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Page header */
.page-header {
    text-align: center;
    padding: 60px 0 40px 0;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #333;
}

.page-description {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Public Speaking Styles */
.speaking-events {
    max-width: 800px;
    margin: 40px auto 0;
}

.speaking-event {
    display: flex;
    gap: 32px;
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid #e5e5e5;
}

.speaking-event:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.speaking-event-image {
    flex: 0 0 200px;
}

.speaking-event-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.speaking-event-content {
    flex: 1;
}

.speaking-event-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.3;
}

.speaking-event-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.speaking-event-title a:hover {
    color: #007acc;
}

.speaking-event-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: #666;
}

.speaking-author a {
    color: #007acc;
    text-decoration: none;
    font-weight: 500;
}

.speaking-author a:hover {
    text-decoration: underline;
}

.speaking-date {
    font-weight: 500;
}

.speaking-event-excerpt {
    color: #666;
    line-height: 1.6;
}

/* Single Speaking Event Styles */
.speaking-event-single {
    max-width: 800px;
    margin: 0 auto;
}

.speaking-event-header {
    text-align: center;
    margin-bottom: 40px;
}

.speaking-event-featured-image {
    margin-bottom: 32px;
}

.speaking-event-featured-image img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
}

.speaking-event-single .speaking-event-title {
    font-size: 2.5rem;
    margin-bottom: 24px;
    color: #333;
}

.speaking-event-single .speaking-event-meta {
    justify-content: center;
    margin-bottom: 0;
}

.speaking-author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.speaking-author-info .author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.speaking-author-info .author-name a {
    color: #007acc;
    text-decoration: none;
    font-weight: 500;
}

.speaking-author-info .author-name a:hover {
    text-decoration: underline;
}

.speaking-event-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.speaking-event-content p {
    margin-bottom: 24px;
}

/* Image Gallery Styles */
.image-gallery {
    margin: 32px 0;
    max-width: 100%;
}

.gallery-container {
    position: relative;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gallery-images {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.gallery-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
}

.gallery-item.active {
    opacity: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px 24px 16px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.gallery-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
    pointer-events: none;
}

.gallery-prev,
.gallery-next {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.gallery-prev:hover,
.gallery-next:hover {
    background: white;
    transform: scale(1.05);
}

.gallery-prev:active,
.gallery-next:active {
    transform: scale(0.95);
}

.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.95);
}

.gallery-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: #ccc;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-dot.active {
    background: #007acc;
    transform: scale(1.2);
}

.gallery-dot:hover {
    background: #007acc;
}

/* Single Content Image Styles */
.content-image {
    margin: 32px 0;
    text-align: center;
}

.content-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.image-caption {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    line-height: 1.4;
}

/* 404 Error Page Styles */
.error-page {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    min-height: 60vh;
    padding: 60px 0;
    text-align: left;
}

.error-content {
    flex: 1;
    max-width: 500px;
}

.error-code {
    font-size: 8rem;
    font-weight: 700;
    color: #007acc;
    line-height: 1;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 122, 204, 0.1);
}

.error-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.2;
}

.error-description {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 40px;
}

.error-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: #007acc;
    color: white;
    border-color: #007acc;
}

.btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: #007acc;
    border-color: #007acc;
}

.btn-secondary:hover {
    background: #007acc;
    color: white;
    transform: translateY(-1px);
}

.error-suggestions {
    border-top: 1px solid #e5e5e5;
    padding-top: 32px;
}

.error-suggestions h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.error-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-suggestions li {
    margin-bottom: 8px;
}

.error-suggestions a {
    color: #007acc;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.error-suggestions a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.error-image {
    flex: 0 0 250px;
    text-align: center;
}

.error-logo {
    max-width: 200px;
    height: auto;
    opacity: 0.6;
    filter: grayscale(20%);
}

/* Footer */
.site-footer {
    background: #f8f9fa;
    border-top: 1px solid #e5e5e5;
    padding: 40px 0;
    margin-top: auto;
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.copyright,
.powered-by {
    color: #666;
    font-size: 0.9rem;
}

.powered-by a {
    color: #007acc;
    text-decoration: none;
}

.powered-by a:hover {
    text-decoration: underline;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-link {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #333;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .site-header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }
    
    .site-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 80px 24px 24px 24px;
        gap: 24px;
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1000;
        border-left: 1px solid #e5e5e5;
    }
    
    .site-navigation.active {
        right: 0;
    }
    
    .hamburger-menu {
        display: flex;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .category-title {
        font-size: 2rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .post-card {
        padding: 24px;
    }
    
    .post-card-content {
        padding: 24px;
    }
    
    .post-card .post-card-image + .post-card-content {
        padding: 20px 24px 24px 24px;
    }
    
    .post-card-image img {
        height: 160px;
    }
    
    .post-featured-image img {
        max-height: 250px;
    }
    
    .post-title {
        font-size: 2.2rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    /* Mobile Speaking Events */
    .speaking-event {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 32px;
        padding-bottom: 32px;
    }
    
    .speaking-event-image {
        flex: none;
    }
    
    .speaking-event-image img {
        height: 200px;
    }
    
    .speaking-event-single .speaking-event-title {
        font-size: 2rem;
    }
    
    .speaking-event-meta {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .speaking-event-single .speaking-event-meta {
        align-items: center;
    }
    
    /* Mobile Gallery Styles */
    .gallery-images {
        height: 250px;
    }
    
    .gallery-prev,
    .gallery-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .gallery-navigation {
        padding: 0 12px;
    }
    
    .gallery-caption {
        padding: 15px 16px 12px;
        font-size: 0.8rem;
    }
    
    .site-footer .container {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 8px;
    }
    
    /* Mobile 404 Page */
    .error-page {
        flex-direction: column;
        text-align: center;
        gap: 40px;
        padding: 40px 0;
        min-height: 50vh;
    }
    
    .error-code {
        font-size: 6rem;
    }
    
    .error-title {
        font-size: 2rem;
    }
    
    .error-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .error-image {
        flex: none;
        order: -1;
    }
    
    .error-logo {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .category-title {
        font-size: 1.6rem;
    }
    
    .post-title {
        font-size: 1.8rem;
    }
    
    .post-card {
        padding: 20px;
    }
    
    .post-card-content {
        padding: 20px;
    }
    
    .post-card .post-card-image + .post-card-content {
        padding: 16px 20px 20px 20px;
    }
    
    .post-card-image img {
        height: 140px;
    }
    
    .post-featured-image {
        margin-bottom: 24px;
    }
    
    .post-featured-image img {
        max-height: 200px;
    }
    
    .post {
        padding: 40px 16px;
    }
    
    /* Small screen 404 adjustments */
    .error-code {
        font-size: 4rem;
    }
    
    .error-title {
        font-size: 1.6rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Enhanced code block styling */
.highlight {
    background-color: #fff !important;
    border-radius: 8px;
    border: 1px solid #d0d7de;
}

/* Copy button for code blocks (if added later) */
.highlight-wrapper {
    position: relative;
}

/* Line numbers styling */
.chroma .lnt {
    color: #7f7f7f;
    user-select: none;
}

/* Scrollbar styling for code blocks */
.highlight pre::-webkit-scrollbar {
    height: 8px;
}

.highlight pre::-webkit-scrollbar-track {
    background: #f6f8fa;
}

.highlight pre::-webkit-scrollbar-thumb {
    background: #d0d7de;
    border-radius: 4px;
}

.highlight pre::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}