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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
}

.logo i {
    margin-right: 10px;
    color: #3498db;
}

.nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background-color: #3498db;
}

/* Main Content Layout */
.main-content {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 60px;
}

.content-area {
    flex: 3;
}

.sidebar {
    flex: 1;
    min-width: 250px;
}

/* Current Post Styles */
.current-post-container {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.post-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

.post-date {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Post type badges */
.post-type-badge {
    background-color: #3498db;
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 10px;
    text-transform: uppercase;
    font-weight: bold;
}

.post-file-type {
    background-color: #95a5a6;
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 10px;
    text-transform: uppercase;
}

.post-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Allow HTML posts to have their own styling */
.post-body.html-content {
    font-size: inherit;
    line-height: inherit;
}

.post-body.html-content h1,
.post-body.html-content h2,
.post-body.html-content h3,
.post-body.html-content h4 {
    color: #2c3e50;
    margin-top: 30px;
    margin-bottom: 15px;
}

.post-body.html-content p {
    margin-bottom: 20px;
}

.post-body.html-content ul,
.post-body.html-content ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.post-body.html-content blockquote {
    border-left: 4px solid #3498db;
    padding-left: 20px;
    margin: 25px 0;
    font-style: italic;
    color: #555;
}

.post-body.html-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 20px 0;
}

.post-body.html-content code {
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

.post-body.html-content pre {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 20px 0;
    font-family: 'Courier New', Courier, monospace;
}

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

/* Archive Section */
.archive-section {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.archive-posts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.archive-post {
    padding: 15px;
    border-radius: 6px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.archive-post:hover {
    background-color: #eef5ff;
    border-left-color: #3498db;
    transform: translateX(5px);
}

.archive-post-title {
    font-size: 1.1rem;
    color: #2c3e50;
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.archive-post-title:hover {
    color: #3498db;
}

.archive-post-badge {
    background-color: #3498db;
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    font-weight: bold;
}

.archive-post-date {
    color: #7f8c8d;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Sidebar Styles */
.sidebar-widget {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-widget p {
    margin-bottom: 15px;
    color: #555;
}

.blog-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.blog-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #3498db;
    font-size: 0.9rem;
}

.blog-stat i {
    width: 20px;
}

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

.recent-post-item {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.recent-post-item:last-child {
    border-bottom: none;
}

.recent-post-link {
    color: #2c3e50;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recent-post-link:hover {
    color: #3498db;
}

.recent-post-title {
    flex: 1;
}

.recent-post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.recent-post-badge {
    background-color: #3498db;
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: bold;
}

.recent-post-link i {
    opacity: 0.7;
    font-size: 0.8rem;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background-color: #e3f2fd;
    color: #3498db;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: #3498db;
    color: white;
    cursor: pointer;
}

/* Main Content Author Section */
.main-author-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4efe9 100%);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
    border-left: 6px solid #3498db;
}

.author-section-header {
    text-align: center;
    margin-bottom: 40px;
}

.author-section-header .section-title {
    font-size: 2rem;
    color: #2c3e50;
    justify-content: center;
}

.author-profile {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    align-items: flex-start;
}

.author-avatar-large {
    flex-shrink: 0;
}

.author-avatar-large i {
    font-size: 120px;
    color: #2c3e50;
    opacity: 0.9;
    transition: transform 0.5s ease;
}

.author-avatar-large:hover i {
    transform: scale(1.05);
}

.author-details-expanded {
    flex: 1;
}

.author-name-large {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 5px;
    background: linear-gradient(45deg, #3498db, #2ecc71);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.author-title {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 25px;
    font-weight: 500;
}

.author-bio-expanded {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 30px;
}

.author-expertise h4 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.expertise-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.expertise-tag {
    background-color: #3498db;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.expertise-tag:nth-child(2) {
    background-color: #2ecc71;
}

.expertise-tag:nth-child(3) {
    background-color: #9b59b6;
}

.expertise-tag:nth-child(4) {
    background-color: #e74c3c;
}

.expertise-tag:nth-child(5) {
    background-color: #f39c12;
}

.author-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.author-stat-item {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.author-stat-item:hover {
    transform: translateY(-5px);
}

.author-stat-item .stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 8px;
}

.author-stat-item .stat-label {
    font-size: 0.95rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.author-social-expanded {
    margin-bottom: 40px;
}

.author-social-expanded h4 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.social-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.social-link-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.social-link-large:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.social-link-large i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.social-link-large span {
    font-size: 0.9rem;
    font-weight: 500;
}

.social-link-large:nth-child(1) {
    color: #5764EF;
    border-top: 4px solid #5764EF;
}

.social-link-large:nth-child(2) {
    color: #1da1f2;
    border-top: 4px solid #1da1f2;
}

.social-link-large:nth-child(3) {
    color: #0077b5;
    border-top: 4px solid #0077b5;
}

.social-link-large:nth-child(4) {
    color: #d44638;
    border-top: 4px solid #d44638;
}

.social-link-large:nth-child(5) {
    color: #6f42c1;
    border-top: 4px solid #6f42c1;
}

.author-quote {
    background: linear-gradient(135deg, #fff9c4 0%, #ffecb3 100%);
    padding: 30px;
    border-radius: 10px;
    position: relative;
    border-left: 5px solid #f39c12;
}

.quote-icon {
    font-size: 2.5rem;
    color: #f39c12;
    opacity: 0.3;
    position: absolute;
    top: 20px;
    left: 20px;
}

.quote-text {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #2c3e50;
    font-style: italic;
    margin-left: 40px;
    margin-bottom: 0;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-size: 1.1rem;
}

.loading i {
    margin-right: 10px;
}

/* Footer Styles */
.footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 40px 0;
    text-align: center;
    margin-top: 40px;
}

.footer p {
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.footer-links a {
    color: #ecf0f1;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #3498db;
}

/* Back to Home Button */
.back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.back-home:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* Archive View */
.archive-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.archive-view-post {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.archive-view-link {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.archive-view-link:hover {
    color: #3498db;
}

.archive-view-date {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Error State */
.error {
    padding: 30px;
    background-color: #ffeaea;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.error h2 {
    color: #c0392b;
    margin-bottom: 15px;
}

.error p {
    margin-bottom: 10px;
    color: #7f8c8d;
}

/* Responsive Design */
@media (max-width: 992px) {
    .author-profile {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .author-avatar-large i {
        font-size: 100px;
    }
    
    .author-expertise h4 {
        justify-content: center;
    }
    
    .expertise-tags {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav {
        width: 100%;
        justify-content: center;
    }
    
    .post-title {
        font-size: 1.8rem;
    }
    
    .author-profile {
        gap: 20px;
    }
    
    .author-name-large {
        font-size: 1.8rem;
    }
    
    .author-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .social-links-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .archive-post-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .archive-post-badge {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .author-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .social-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .author-section-header .section-title {
        font-size: 1.5rem;
    }
    
    .main-author-section {
        padding: 25px;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #3498db;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 999;
}

.back-to-top:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top i {
    font-size: 20px;
}

/* Add active state for navigation links */
.nav-link.active {
    background-color: #3498db;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #3498db;
}

/* Smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}

/* Responsive adjustments for back to top button */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .back-to-top i {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .back-to-top i {
        font-size: 16px;
    }
}