/* ===================================
   BASE STYLES
   =================================== */

body {
    font-family: 'Roboto Mono', monospace;
    font-weight: 300;
    margin: 0;
    padding: 20px;
    line-height: 1.6;
    background-color: #fff;
    color: #333;
    transition: background-color 0.3s, color 0.3s;
}

.dark-mode {
    background-color: #121212;
    color: #eee;
}

h1, h2, h3 {
    margin-bottom: 0.5em;
    font-family: 'Roboto Mono', monospace;
    font-weight: 400;
}

ul {
    padding-left: 20px;
    list-style: disc;
}

li {
    margin-bottom: 0.2em;
}

hr {
    border: 1px solid #ccc;
    margin: 20px 0;
}

/* ===================================
   LAYOUT
   =================================== */

.container {
    max-width: 800px;
    margin: auto;
}

section {
    margin-bottom: 30px;
}

/* Links in sections (including footer) */
section a {
    color: #0066cc;
    text-decoration: underline;
    transition: color 0.2s;
}

section a:hover {
    color: #004499;
}

.dark-mode section a {
    color: #66b3ff;
}

.dark-mode section a:hover {
    color: #99ccff;
}

/* ===================================
   COMPONENTS
   =================================== */

/* Profile Section */
.profile-pic-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 100px;
    margin-bottom: 20px;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 3px solid #555;
}

.profile-pic.dark-mode {
    border: 3px solid #fff;
}

.profile-info {
    text-align: center;
    margin-bottom: 10px;
}

.profile-info h1 {
    margin-bottom: 2px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.profile-info h2 {
    margin-top: 2px;
}

/* Verified Badge */
.verified-badge {
    width: 24px;
    height: 24px;
    display: inline-block;
    vertical-align: middle;
    margin-left: 4px;
}

/* Floating Buttons Container */
.floating-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

/* Mode Switcher Button */
.mode-switcher {
    background-color: #555;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.mode-switcher:hover {
    background-color: #333;
    transform: scale(1.05);
}

/* Floating Share Button (hidden on desktop, shown on mobile) */
.floating-share-btn {
    display: none;
    background-color: #555;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.floating-share-btn:hover {
    background-color: #333;
    transform: scale(1.05);
}

.dark-mode .floating-share-btn {
    background-color: #666;
}

.dark-mode .floating-share-btn:hover {
    background-color: #888;
}

/* Certifications Section */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 40px;
    margin-top: 20px;
}

.cert-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.cert-item i {
    font-size: 28px;
    color: #555;
    flex-shrink: 0;
}

.dark-mode .cert-item i {
    color: #eee;
}

/* Logo image styling - same size as icon */
.cert-item img.cert-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
    filter: grayscale(100%) brightness(0.7); /* Grayscale but lighter - motif still visible */
}

.dark-mode .cert-item img.cert-logo {
    filter: grayscale(100%) brightness(1.3); /* Lighter in dark mode */
}

.cert-item span {
    font-size: 15px;
    font-weight: 300;
    line-height: 1.3;
}

/* Clickable certificate title */
.cert-title-clickable {
    cursor: pointer;
    transition: opacity 0.2s;
}

.cert-title-clickable:hover {
    opacity: 0.7;
}

/* Certificate Modal */
.cert-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.cert-modal.show {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 80px 20px 80px;
    overflow-y: auto;
}

.cert-modal-content {
    display: block;
    max-width: 65%;
    max-height: 55vh;
    object-fit: contain;
    animation: zoomIn 0.3s;
    border: 3px solid #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    background: #fff;
    padding: 8px;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.cert-modal-close {
    position: fixed;
    top: 30px;
    right: 40px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.cert-modal-close:hover,
.cert-modal-close:focus {
    color: #fff;
    background: rgba(0, 0, 0, 0.8);
}

.cert-modal-caption {
    display: block;
    width: 85%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 25px 20px 40px;
    font-size: 16px;
    margin: 0 auto;
}

.cert-modal-title {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 12px;
    color: #fff;
}

.cert-modal-credential {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 10px;
}

.cert-modal-credential strong {
    color: #fff;
}

.cert-modal-verify {
    margin-top: 12px;
}

.cert-modal-verify a {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cert-modal-verify a:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.cert-modal-verify a i {
    margin-right: 6px;
}

/* Responsive modal */
@media (max-width: 768px) {
    .cert-modal.show {
        justify-content: center;
        padding: 60px 25px;
        box-sizing: border-box;
    }
    
    .cert-modal-content {
        max-width: 85%;
        max-height: 65vh;
        border-width: 2px;
        padding: 6px;
        margin: 0 auto;
    }
    
    .cert-modal-close {
        top: 25px;
        right: 25px;
        font-size: 28px;
        width: 44px;
        height: 44px;
    }
    
    .cert-modal-caption {
        font-size: 14px;
        padding: 20px 15px 30px;
        width: 90%;
        margin: 0 auto;
    }
    
    .cert-modal-title {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .cert-modal-credential {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .cert-modal-verify a {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Recommendations Section */
.recommendations-slider {
    position: relative;
    margin-top: 30px;
    min-height: 250px;
}

.recommendation-item {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.recommendation-item.active {
    display: block;
    opacity: 1;
}

.recommendation-text-wrapper {
    margin-bottom: 20px;
}

.recommendation-text {
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 8px;
    font-style: italic;
    transition: max-height 0.3s ease;
    overflow: hidden;
}

.recommendation-text.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more-btn {
    background: none;
    border: none;
    color: #555;
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    font-weight: 300;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    transition: color 0.2s;
}

.read-more-btn:hover {
    color: #333;
}

.dark-mode .read-more-btn {
    color: #aaa;
}

.dark-mode .read-more-btn:hover {
    color: #eee;
}

.recommender-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.recommender-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.recommender-details h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 400;
}

.recommender-details p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.dark-mode .recommender-details p {
    color: #aaa;
}

.slider-dots {
    text-align: left;
    margin-top: 25px;
}

.dot {
    height: 5px;
    width: 5px;
    margin: 0 4px 0 0;
    background-color: #ccc;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active,
.dot:hover {
    background-color: #555;
}

.dark-mode .dot {
    background-color: #444;
}

.dark-mode .dot.active,
.dark-mode .dot:hover {
    background-color: #eee;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    /* Profile name and title responsive */
    .profile-info h1 {
        font-size: 24px;
    }

    .profile-info h2 {
        font-size: 16px;
    }

    .verified-badge {
        width: 20px;
        height: 20px;
    }

    .certifications-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px 20px;
    }

    .cert-item i {
        font-size: 24px;
    }

    .cert-item span {
        font-size: 14px;
    }

    .recommendation-text {
        font-size: 16px;
    }

    .read-more-btn {
        font-size: 12px;
    }

    .recommender-photo {
        width: 50px;
        height: 50px;
    }

    .recommender-details h4 {
        font-size: 15px;
    }

    .recommender-details p {
        font-size: 13px;
    }
}

/* ====================================
   Blog Styles
   ==================================== */

/* Blog Grid - 2 column layout, flat design */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 30px;
    margin-top: 20px;
}

/* Blog Item - Flat, no border, no background */
.blog-item {
    display: block;
    text-decoration: none;
    transition: opacity 0.2s;
}

.blog-item:hover {
    opacity: 0.7;
}

/* Blog Item Content */
.blog-item-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Blog Item Date */
.blog-item-date {
    font-size: 12px;
    color: #999;
    display: block;
}

.dark-mode .blog-item-date {
    color: #777;
}

/* Blog Item Views */
.blog-item-views {
    font-size: 11px;
    color: #aaa;
}

.dark-mode .blog-item-views {
    color: #666;
}

/* Blog Item Title */
.blog-item-title {
    font-size: 15px;
    font-weight: 400;
    margin: 0;
    line-height: 1.4;
    color: #333;
}

.dark-mode .blog-item-title {
    color: #eee;
}

/* Blog View All Button */
.blog-view-all {
    text-align: left;
    margin-top: 30px;
}

.btn-read-more {
    color: #555;
    text-decoration: underline;
    font-size: 15px;
    font-weight: 400;
    transition: color 0.2s;
}

.btn-read-more:hover {
    color: #333;
}

.dark-mode .btn-read-more {
    color: #aaa;
}

.dark-mode .btn-read-more:hover {
    color: #eee;
}

/* ====================================
   Blog Archive Page Styles
   ==================================== */

/* Blog Archive Grid - Single column, horizontal layout */
.blog-archive-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 20px;
}

/* Blog Archive Card - Horizontal layout */
.blog-archive-card {
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding-bottom: 30px;
    border-bottom: 1px solid #ddd;
    transition: opacity 0.2s;
}

.blog-archive-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.blog-archive-card:hover {
    opacity: 0.9;
}

.dark-mode .blog-archive-card {
    border-bottom-color: #444;
}

/* Blog Archive Thumbnail - Fixed width on left */
.blog-archive-thumbnail {
    display: block;
    width: 250px;
    height: 180px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 4px;
}

.blog-archive-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.3s, transform 0.3s;
}

.blog-archive-card:hover .blog-archive-thumbnail img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.dark-mode .blog-archive-thumbnail img {
    opacity: 0.9;
}

/* Blog Archive Content - Flexible width on right */
.blog-archive-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

/* Blog Archive Meta */
.blog-archive-meta {
    font-size: 12px;
    color: #999;
}

.dark-mode .blog-archive-meta {
    color: #777;
}

.blog-archive-views {
    font-size: 12px;
    color: #999;
}

.dark-mode .blog-archive-views {
    color: #777;
}

.blog-archive-reading-time {
    font-size: 12px;
    color: #999;
}

.dark-mode .blog-archive-reading-time {
    color: #777;
}

/* Blog Archive Title */
.blog-archive-title {
    font-size: 18px;
    font-weight: 400;
    margin: 0;
    line-height: 1.4;
}

.blog-archive-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-archive-title a:hover {
    color: #555;
}

.dark-mode .blog-archive-title a {
    color: #eee;
}

.dark-mode .blog-archive-title a:hover {
    color: #aaa;
}

/* Blog Archive Excerpt */
.blog-archive-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dark-mode .blog-archive-excerpt {
    color: #aaa;
}

/* Blog Archive Link */
.blog-archive-link {
    color: #555;
    text-decoration: underline;
    font-size: 13px;
    font-weight: 300;
    transition: color 0.2s;
    display: inline-block;
    margin-top: 5px;
}

.blog-archive-link:hover {
    color: #333;
}

.dark-mode .blog-archive-link {
    color: #aaa;
}

.dark-mode .blog-archive-link:hover {
    color: #eee;
}

/* Responsive Blog Archive */
@media (max-width: 768px) {
    .blog-archive-card {
        flex-direction: column;
        gap: 15px;
        padding-bottom: 25px;
    }
    
    .blog-archive-thumbnail {
        width: 100%;
        height: 200px;
    }
    
    .blog-archive-title {
        font-size: 16px;
    }
    
    .blog-archive-excerpt {
        font-size: 13px;
    }
}

/* ====================================
   Blog Detail Page
   ==================================== */

/* Navigation / Breadcrumb */
.blog-nav {
    margin-top: 60px;
    margin-bottom: 20px;
    font-size: 14px;
}

.back-link {
    color: #555;
    text-decoration: underline;
    transition: color 0.2s;
}

.back-link:hover {
    color: #333;
}

.dark-mode .back-link {
    color: #aaa;
}

.dark-mode .back-link:hover {
    color: #eee;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: #999;
}

.breadcrumb-current {
    color: #999;
}

.dark-mode .breadcrumb-current {
    color: #777;
}

/* Blog Detail Container */
.blog-detail {
    margin-bottom: 40px;
}

/* Blog Detail Image - No grayscale filter, full color */
.blog-detail-image {
    margin-bottom: 20px;
}

.blog-detail-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
}

/* Blog Detail Title */
.blog-detail-title {
    font-size: 32px;
    font-weight: 400;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

/* Blog Detail Meta */
.blog-detail-meta {
    font-size: 13px;
    color: #999;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.dark-mode .blog-detail-meta {
    color: #777;
}

.blog-meta-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.meta-separator {
    color: #ccc;
}

.dark-mode .meta-separator {
    color: #555;
}

/* Blog Share Button */
.blog-share-wrapper {
    position: relative;
}

.blog-share-btn {
    background: none;
    border: 1px solid #ddd;
    color: #555;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 14px;
}

.blog-share-btn:hover {
    background: #f5f5f5;
    border-color: #555;
}

.dark-mode .blog-share-btn {
    border-color: #444;
    color: #aaa;
}

.dark-mode .blog-share-btn:hover {
    background: #2a2a2a;
    border-color: #666;
}

/* Share Menu Dropdown */
.blog-share-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
}

.blog-share-menu.show {
    display: flex;
}

/* Floating Share Menu (Mobile only) */
.floating-share-menu {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    display: none;
    flex-direction: column;
    z-index: 999;
    overflow: hidden;
}

.floating-share-menu.show {
    display: flex;
}

.dark-mode .floating-share-menu {
    background: #1a1a1a;
    border-color: #444;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Hide floating share menu on desktop */
@media (min-width: 769px) {
    .floating-share-menu {
        display: none !important;
    }
}

/* Share to Story button - only visible on mobile */
.share-story-item {
    display: none;
}

@media (max-width: 768px) {
    .share-story-item {
        display: flex;
    }
}

.dark-mode .blog-share-menu {
    background: #1a1a1a;
    border-color: #444;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.share-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    text-align: left;
    width: 100%;
}

.share-menu-item:hover {
    background: #f5f5f5;
}

.dark-mode .share-menu-item {
    color: #eee;
}

.dark-mode .share-menu-item:hover {
    background: #2a2a2a;
}

.share-menu-item i {
    width: 20px;
    font-size: 16px;
    text-align: center;
}

.share-menu-item:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

.dark-mode .share-menu-item:not(:last-child) {
    border-bottom-color: #333;
}

/* Blog Detail Content */
.blog-detail-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

/* Fix CKEditor images: Force responsive, maintain aspect ratio */
.blog-detail-content img {
    max-width: 100% !important;
    height: auto !important;
    width: auto !important; /* Override inline width attribute */
    display: block;
    margin: 1.5rem auto;
    object-fit: contain; /* Maintain aspect ratio */
}

/* Paragraph with image - center alignment */
.blog-detail-content p img {
    margin-left: auto;
    margin-right: auto;
}

/* CKEditor resized image container */
.blog-detail-content .image_resized {
    max-width: 100%;
}

.blog-detail-content .image_resized img {
    max-width: 100% !important;
    width: 100% !important; /* Fill container while maintaining aspect ratio */
    height: auto !important;
}

.dark-mode .blog-detail-content {
    color: #eee;
}

/* Recent Posts List */
.blog-recent-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.blog-recent-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    transition: background-color 0.2s;
}

.blog-recent-item a:hover {
    background-color: #f9f9f9;
}

.dark-mode .blog-recent-item a {
    border-bottom-color: #333;
}

.dark-mode .blog-recent-item a:hover {
    background-color: #1a1a1a;
}

.blog-recent-title {
    color: #333;
    font-size: 15px;
    flex: 1;
}

.dark-mode .blog-recent-title {
    color: #eee;
}

.blog-recent-date {
    color: #999;
    font-size: 12px;
    margin-left: 15px;
}

.dark-mode .blog-recent-date {
    color: #777;
}

/* ====================================
   Pagination
   ==================================== */

.pagination {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    font-size: 14px;
}

.pagination-numbers {
    display: flex;
    gap: 8px;
}

.pagination-link,
.pagination-current,
.pagination-prev,
.pagination-next {
    padding: 8px 12px;
    color: #555;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination-link:hover {
    color: #333;
    border-bottom: 2px solid #555;
}

.pagination-current {
    color: #333;
    font-weight: 400;
    border-bottom: 2px solid #333;
}

.pagination-prev,
.pagination-next {
    text-decoration: underline;
}

.pagination-prev:hover,
.pagination-next:hover {
    color: #333;
}

.dark-mode .pagination-link,
.dark-mode .pagination-prev,
.dark-mode .pagination-next {
    color: #aaa;
}

.dark-mode .pagination-link:hover {
    color: #eee;
    border-bottom-color: #aaa;
}

.dark-mode .pagination-current {
    color: #eee;
    border-bottom-color: #eee;
}

.dark-mode .pagination-prev:hover,
.dark-mode .pagination-next:hover {
    color: #eee;
}

/* ====================================
   Responsive Blog Styles
   ==================================== */

@media (max-width: 768px) {
    /* Blog Grid - Single column on tablet */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .blog-item-title {
        font-size: 14px;
    }

    /* Pagination responsive */
    .pagination {
        flex-wrap: wrap;
        gap: 10px;
    }

    .pagination-numbers {
        flex-wrap: wrap;
    }

    /* Blog detail meta responsive */
    .blog-detail-meta {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }
    
    .blog-meta-left {
        width: 100%;
    }
    
    /* Hide inline share button on mobile */
    .blog-share-wrapper {
        display: none;
    }
    
    /* Show floating share button on mobile */
    .floating-share-btn {
        display: flex;
    }

    /* Blog detail title smaller */
    .blog-detail-title {
        font-size: 24px;
    }

    /* Blog detail image max height */
    .blog-detail-image img {
        max-height: 300px;
    }

    /* Recent posts list more compact */
    .blog-recent-item a {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .blog-recent-date {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    /* Certifications 1 column on very small screens */
    .certifications-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Blog detail title even smaller */
    .blog-detail-title {
        font-size: 20px;
    }

    /* Breadcrumb more compact */
    .blog-nav {
        font-size: 12px;
    }

    .breadcrumb-separator {
        margin: 0 4px;
    }
}

/* ====================================
   Legacy Editor.js Block Styles
   ==================================== */

/* Headers in blog content */
.blog-detail-content h2,
.blog-detail-content h3,
.blog-detail-content h4 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    font-weight: 400;
    line-height: 1.3;
}

.blog-detail-content h2 {
    font-size: 24px;
}

.blog-detail-content h3 {
    font-size: 20px;
}

.blog-detail-content h4 {
    font-size: 18px;
}

/* Lists */
.blog-detail-content ul,
.blog-detail-content ol {
    margin: 1em 0;
    padding-left: 2em;
    line-height: 1.8;
}

.blog-detail-content li {
    margin-bottom: 0.5em;
}

/* Quote block */
.blog-detail-content blockquote {
    margin: 1.5em 0;
    padding: 1em 1.5em;
    border-left: 4px solid #555;
    background: #f9f9f9;
    font-style: italic;
}

.dark-mode .blog-detail-content blockquote {
    border-left-color: #aaa;
    background: #1a1a1a;
}

.blog-detail-content blockquote cite {
    display: block;
    margin-top: 0.75em;
    font-size: 14px;
    color: #666;
    font-style: normal;
}

.dark-mode .blog-detail-content blockquote cite {
    color: #999;
}

/* Code block */
.blog-detail-content pre {
    margin: 1.5em 0;
    padding: 1.2em 1.4em;
    background: #f7f9fb;
    color: #0f172a;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    overflow-x: auto;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.blog-detail-content pre code {
    display: block;
    font-family: "JetBrains Mono", "Fira Code", "Roboto Mono", Menlo, Monaco, Consolas, monospace;
    font-size: 14px;
    line-height: 1.7;
    tab-size: 2;
    white-space: pre;
}

.blog-detail-content pre code.hljs {
    background: transparent;
    color: inherit;
}

.dark-mode .blog-detail-content pre code.hljs {
    color: inherit;
}

.dark-mode .blog-detail-content pre {
    background: #0d1117;
    color: #e6edf3;
    border-color: #161b22;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

/* Inline code */
.blog-detail-content code {
    font-family: "JetBrains Mono", "Fira Code", "Roboto Mono", Menlo, Monaco, Consolas, monospace;
    font-size: 14px;
    line-height: 1.6;
}

.blog-detail-content p code {
    padding: 3px 7px;
    background: #eef2ff;
    color: #1f2937;
    border-radius: 5px;
    font-size: 90%;
}

.dark-mode .blog-detail-content p code {
    background: #1f2937;
    color: #dce6ff;
}

/* Warning block */
.blog-detail-content .warning-block {
    margin: 1.5em 0;
    padding: 1em 1.5em;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
}

.dark-mode .blog-detail-content .warning-block {
    background: #3a3200;
    border-left-color: #ffc107;
}

.blog-detail-content .warning-title {
    font-weight: 400;
    font-size: 16px;
    margin-bottom: 0.5em;
    color: #856404;
}

.dark-mode .blog-detail-content .warning-title {
    color: #ffc107;
}

.blog-detail-content .warning-message {
    font-size: 14px;
    color: #856404;
}

.dark-mode .blog-detail-content .warning-message {
    color: #ffdb7a;
}

/* Delimiter */
.blog-detail-content hr.delimiter {
    margin: 2em 0;
    border: none;
    border-top: 3px dotted #ccc;
}

.dark-mode .blog-detail-content hr.delimiter {
    border-top-color: #444;
}

/* Table */
.blog-detail-content .editorjs-table {
    width: 100%;
    margin: 1.5em 0;
    border-collapse: collapse;
}

.blog-detail-content .editorjs-table td {
    padding: 0.75em;
    border: 1px solid #ddd;
}

.dark-mode .blog-detail-content .editorjs-table td {
    border-color: #444;
}

/* Image block */
.blog-detail-content .image-block {
    margin: 1.5em 0;
    text-align: center;
}

.blog-detail-content .image-block img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.blog-detail-content figure.image,
.blog-detail-content figure.image-style-side,
.blog-detail-content figure.image-style-align-left,
.blog-detail-content figure.image-style-align-right,
.blog-detail-content figure.image_resized {
    margin: 1.5em auto;
    max-width: 100%;
}

.blog-detail-content figure.image img,
.blog-detail-content figure.image-style-side img,
.blog-detail-content figure.image-style-align-left img,
.blog-detail-content figure.image-style-align-right img,
.blog-detail-content figure.image_resized img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.blog-detail-content .image-block figcaption {
    margin-top: 0.5em;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.dark-mode .blog-detail-content .image-block img {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dark-mode .blog-detail-content .image-block figcaption {
    color: #999;
}

/* Embed block */
.blog-detail-content .embed-block {
    margin: 1.5em 0;
}

.blog-detail-content .embed-block iframe {
    width: 100%;
    height: 400px;
    border-radius: 4px;
}

.blog-detail-content .embed-caption {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-top: 0.5em;
}

.dark-mode .blog-detail-content .embed-caption {
    color: #999;
}

/* Paragraphs spacing */
.blog-detail-content > p {
    margin-bottom: 1em;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-detail-content h2 {
        font-size: 20px;
    }

    .blog-detail-content h3 {
        font-size: 18px;
    }

    .blog-detail-content h4 {
        font-size: 16px;
    }

    .blog-detail-content .embed-block iframe {
        height: 250px;
    }
}

/* ====================================
   COMMENT STYLES
   ==================================== */

/* Comments Section */
.comments-section {
    margin-top: 40px;
}

.comments-section h2 {
    margin-bottom: 30px;
}

.comments-section h3 {
    margin-bottom: 20px;
    font-size: 20px;
}

/* Flash Messages */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.dark-mode .alert-success {
    background: #064e3b;
    color: #6ee7b7;
}

.dark-mode .alert-error {
    background: #7f1d1d;
    color: #fca5a5;
}

/* Highlight animation for flash messages */
@keyframes highlight {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(16, 185, 129, 0);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    }
}

/* Fade out animation for flash messages */
@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.alert.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

/* Comment Form */
.comment-form-wrapper {
    background: #f9fafb;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 40px;
    overflow: hidden;
    box-sizing: border-box;
}

.dark-mode .comment-form-wrapper {
    background: #1f2937;
}

.comment-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.comment-form .form-group {
    margin-bottom: 16px;
    box-sizing: border-box;
    min-width: 0;
}

.comment-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.comment-form label small {
    font-weight: 400;
    color: #6b7280;
    font-size: 13px;
}

.dark-mode .comment-form label small {
    color: #9ca3af;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
    max-width: 100%;
}

.dark-mode .comment-form input[type="text"],
.dark-mode .comment-form input[type="email"],
.dark-mode .comment-form input[type="url"],
.dark-mode .comment-form textarea {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

.comment-form textarea {
    resize: vertical;
    min-height: 120px;
}

.char-count {
    display: block;
    text-align: right;
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

.dark-mode .char-count {
    color: #9ca3af;
}

.comment-form .btn {
    padding: 10px 24px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.comment-form .btn:hover {
    background: #2563eb;
}

/* Comments List */
.comments-list {
    margin-top: 40px;
}

.comment-item {
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 16px;
}

.dark-mode .comment-item {
    border-color: #374151;
    background: #1f2937;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.comment-author {
    font-weight: 600;
    font-size: 15px;
}

.comment-author a {
    color: inherit;
    text-decoration: none;
}

.comment-author a:hover {
    color: #3b82f6;
}

.comment-date {
    font-size: 13px;
    color: #6b7280;
}

.dark-mode .comment-date {
    color: #9ca3af;
}

.comment-body {
    line-height: 1.6;
    color: #374151;
}

.dark-mode .comment-body {
    color: #d1d5db;
}

.no-comments {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-style: italic;
}

.dark-mode .no-comments {
    color: #9ca3af;
}

/* Nested Comments (Replies) */
.comment-reply {
    margin-left: 40px;
    margin-top: 16px;
    padding-left: 20px;
    border-left: 2px solid #e5e7eb;
}

.dark-mode .comment-reply {
    border-left-color: #374151;
}

/* Verified Badge in Comments */
.verified-badge-comment {
    width: 14px;
    height: 14px;
    display: inline-block;
    vertical-align: middle;
    margin-left: 1px;
}

/* Comment Reply Button */
.comment-reply-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    padding: 8px 0;
    margin-top: 8px;
    transition: color 0.2s;
}

.comment-reply-btn:hover {
    color: #3b82f6;
}

.dark-mode .comment-reply-btn {
    color: #9ca3af;
}

.dark-mode .comment-reply-btn:hover {
    color: #60a5fa;
}

/* Inline Reply Form */
.comment-reply-form {
    margin-top: 16px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.dark-mode .comment-reply-form {
    background: #1f2937;
    border-color: #374151;
}

.comment-reply-form h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: #374151;
}

.dark-mode .comment-reply-form h4 {
    color: #d1d5db;
}

.comment-reply-form .btn-secondary {
    background: #6b7280;
    color: white;
}

.comment-reply-form .btn-secondary:hover {
    background: #4b5563;
}

/* Responsive */
@media (max-width: 768px) {
    .comment-form .form-row {
        grid-template-columns: 1fr;
    }

    .comment-form-wrapper {
        padding: 16px;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* ===================================
   BIO CONTENT (Rich Text Rendering)
   =================================== */

.bio-content p {
    margin-bottom: 1em;
    line-height: 1.6;
    text-align: justify;
}

.bio-content a {
    color: #0066cc;
    text-decoration: underline;
    transition: color 0.2s;
}

.bio-content a:hover {
    color: #004499;
}

.dark-mode .bio-content a {
    color: #66b3ff;
}

.dark-mode .bio-content a:hover {
    color: #99ccff;
}

.bio-content strong {
    font-weight: 400;
}

.bio-content em {
    font-style: italic;
}

.bio-content ul,
.bio-content ol {
    margin: 1em 0;
    padding-left: 2em;
}

.bio-content li {
    margin-bottom: 0.5em;
}

.bio-content figure,
.bio-content figure.image_resized {
    margin: 1.25em auto;
    max-width: 100%;
}

.bio-content figure img,
.bio-content figure.image_resized img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}
