/* Blog Page Styles */

/* Blog Hero */
.blog-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: 
        linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="cyber" patternUnits="userSpaceOnUse" width="20" height="20"><rect width="20" height="20" fill="%23000"/><circle cx="10" cy="10" r="1" fill="%2300ff41"/><line x1="0" y1="10" x2="20" y2="10" stroke="%2300ff41" stroke-width="0.2" opacity="0.3"/><line x1="10" y1="0" x2="10" y2="20" stroke="%2300ff41" stroke-width="0.2" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23cyber)"/></svg>'),
        linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    background-size: cover, 50px 50px, cover;
    overflow: hidden;
    padding-top: 5rem;
}

.hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2px;
    opacity: 0.1;
}

.grid-item {
    background: rgba(255, 255, 255, 0.1);
    animation: gridPulse 4s ease-in-out infinite;
}

.grid-item:nth-child(1) { animation-delay: 0s; }
.grid-item:nth-child(2) { animation-delay: 0.5s; }
.grid-item:nth-child(3) { animation-delay: 1s; }
.grid-item:nth-child(4) { animation-delay: 1.5s; }
.grid-item:nth-child(5) { animation-delay: 2s; }
.grid-item:nth-child(6) { animation-delay: 2.5s; }

.blog-hero-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-left {
    color: white;
}

.typing-container {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #e2e8f0;
}

.typing-prefix {
    opacity: 0.8;
}

.typing-text {
    color: #fbbf24;
    font-weight: 600;
    margin: 0 0.5rem;
}

.cursor-blink {
    color: #fbbf24;
    animation: blink 1s infinite;
}

.hero-left h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-left p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #e2e8f0;
    margin-bottom: 2rem;
}



.blog-visual {
    position: relative;
    width: 100%;
    height: 500px;
}

.code-window {
    position: absolute;
    background: #1e293b;
    border: 1px solid #00ff41;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
    backdrop-filter: blur(10px);
}

.main-window {
    width: 320px;
    height: 250px;
    top: 0;
    right: 0;
    z-index: 2;
}

.overlay-window {
    width: 300px;
    height: 230px;
    top: 180px;
    right: 250px;
    z-index: 1;
    opacity: 0.9;
}

.window-header {
    background: #0f1419;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #00ff41;
}

.window-dots {
    display: flex;
    gap: 0.5rem;
}

.window-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.window-dots span:nth-child(1) { background: #ff0040; }
.window-dots span:nth-child(2) { background: #ffff00; }
.window-dots span:nth-child(3) { background: #00ff41; }

.window-title {
    color: #00ff41;
    font-size: 0.9rem;
    font-weight: 500;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
}

.code-content {
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    line-height: 1.6;
    background: rgba(0, 0, 0, 0.8);
}

.code-line {
    color: #e2e8f0;
    margin-bottom: 0.5rem;
}

.keyword { color: #ff0080; text-shadow: 0 0 3px rgba(255, 0, 128, 0.5); }
.variable { color: #00ffff; text-shadow: 0 0 3px rgba(0, 255, 255, 0.5); }
.property { color: #00ff41; text-shadow: 0 0 3px rgba(0, 255, 65, 0.5); }
.string { color: #ffff00; text-shadow: 0 0 3px rgba(255, 255, 0, 0.5); }

/* Animations */
@keyframes gridPulse {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.3; }
}

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

/* Quote Section */
.quote-section {
    padding: 4rem 0;
    background: #0f172a;
    text-align: center;
}

.main-quote {
    font-size: 2.5rem;
    font-weight: 300;
    color: #00ff41;
    font-style: italic;
    margin: 0;
    position: relative;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.main-quote::before,
.main-quote::after {
    content: '"';
    font-size: 4rem;
    color: rgba(0, 255, 65, 0.5);
    position: absolute;
    top: -1rem;
}

.main-quote::before {
    left: -2rem;
}

.main-quote::after {
    right: -2rem;
}

/* Timeline Section */
.timeline-section {
    padding: 6rem 0;
    background: #f8fafc;
    position: relative;
}

.timeline-header {
    text-align: center;
    margin-bottom: 4rem;
}

.timeline-header h2 {
    font-size: 3rem;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #0f172a, #00ff41);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.timeline-header p {
    font-size: 1.2rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #00ff41, #0f172a, #00ff41);
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.timeline-item.animate {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item:nth-child(even) {
    transform: translateX(-50px);
}

.timeline-item:nth-child(even).animate {
    transform: translateX(0);
}

.timeline-card {
    background: white;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    width: 400px;
    border: 2px solid transparent;
    transition: all 0.4s ease;
}

.timeline-card:hover {
    border-color: #00ff41;
    box-shadow: 0 15px 40px rgba(0, 255, 65, 0.2);
    transform: translateY(-5px);
}

.timeline-item:nth-child(odd) .timeline-card {
    margin-left: calc(50% + 2rem);
}

.timeline-item:nth-child(even) .timeline-card {
    margin-right: calc(50% + 2rem);
    margin-left: auto;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #00ff41;
    border-radius: 50%;
    top: 2rem;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
    z-index: 2;
}

.timeline-item:nth-child(odd) .timeline-dot {
    left: -3rem;
}

.timeline-item:nth-child(even) .timeline-dot {
    right: -3rem;
}

.timeline-arrow {
    position: absolute;
    width: 0;
    height: 0;
    top: 2rem;
}

.timeline-item:nth-child(odd) .timeline-arrow {
    left: -1rem;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 15px solid white;
}

.timeline-item:nth-child(even) .timeline-arrow {
    right: -1rem;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 15px solid white;
}

.timeline-year {
    display: inline-block;
    background: linear-gradient(135deg, #00ff41, #0f172a);
    color: white;
    padding: 0.5rem 1rem;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.timeline-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
}

.timeline-card p {
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* Dark Theme */
[data-theme="dark"] .quote-section {
    background: #000000;
}

[data-theme="dark"] .timeline-section {
    background: #0f172a;
}

[data-theme="dark"] .timeline-header h2 {
    color: #ffffff;
}

[data-theme="dark"] .timeline-card {
    background: #1e293b;
    border-color: #475569;
}

[data-theme="dark"] .timeline-card h3 {
    color: #ffffff;
}

[data-theme="dark"] .timeline-arrow {
    border-right-color: #1e293b;
    border-left-color: #1e293b;
}

/* Blog Posts */
.blog-posts {
    padding: 6rem 0;
    background: #f8fafc;
}

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

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 500px;
    margin: 0 auto;
}

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

/* Featured Post */
.featured-post {
    background: white;
    display: flex;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.featured-post:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.featured-post .post-image {
    width: 120px;
    height: 100px;
    flex-shrink: 0;
    overflow: hidden;
}

.featured-post .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.featured-post:hover .post-image img {
    transform: scale(1.1);
}

.post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.3));
}

.post-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #00ff41;
    color: #000;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.featured-post .post-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #64748b;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.post-author img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.featured-post h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.featured-post p {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: auto;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    background: #e5e7eb;
    color: #374151;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag:hover {
    background: #00ff41;
    color: #000;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #0f172a;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.read-more-btn:hover {
    background: #00ff41;
    color: #000;
    transform: translateX(5px);
}

/* Regular Posts */
.regular-posts {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.posts-showcase .regular-posts {
    gap: 2rem;
}

.post-card {
    background: white;
    display: flex;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.post-card .post-image {
    width: 120px;
    height: 100px;
    flex-shrink: 0;
}

.post-card .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.1);
}

.post-card .post-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card .post-meta {
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
}

.post-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.post-card p {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: auto;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.featured-post .post-footer {
    margin-top: auto;
}

.read-link {
    color: #0f172a;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.read-link:hover {
    color: #00ff41;
    transform: translateX(3px);
}

/* More Posts */
.more-posts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.modal-content {
    background-color: white;
    margin: 3% auto;
    width: 800px;
    height: 600px;
    overflow: hidden;
    position: relative;
    animation: modalSlideIn 0.4s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.modal-header {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.modal-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.7));
}

.modal-title {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    right: 4rem;
    color: white;
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.modal-meta {
    position: absolute;
    bottom: 0.5rem;
    left: 2rem;
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    font-weight: 500;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.5);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.close:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.modal-body {
    padding: 2rem;
    height: 400px;
    overflow-y: auto;
}

.modal-body h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 2rem 0 1rem;
}

.modal-body p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4b5563;
    margin-bottom: 1.5rem;
}

.modal-body hr {
    border: none;
    height: 1px;
    background: #e5e7eb;
    margin: 2rem 0;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-theme="dark"] .modal-content {
    background-color: #1e293b;
}

[data-theme="dark"] .modal-body {
    color: white;
}

[data-theme="dark"] .modal-body h3 {
    color: white;
}

[data-theme="dark"] .modal-body p {
    color: #cbd5e1;
}

[data-theme="dark"] .modal-body hr {
    background: #475569;
}

/* Footer Avatar */
.brand-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.footer-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

/* Dark Theme */
[data-theme="dark"] .blog-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

[data-theme="dark"] .blog-hero-content h1 {
    color: #ffffff;
}

[data-theme="dark"] .blog-hero-content p {
    color: #94a3b8;
}

[data-theme="dark"] .blog-posts {
    background: #0f172a;
}

[data-theme="dark"] .post-card {
    background: #1e293b;
    border-color: #475569;
}

[data-theme="dark"] .post-content h2 {
    color: #ffffff;
}

[data-theme="dark"] .post-content p {
    color: #cbd5e1;
}

[data-theme="dark"] .footer-avatar {
    border-color: #475569;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .blog-hero {
        padding: 6rem 0 4rem;
        min-height: 60vh;
    }
    
    .blog-hero-content h1 {
        font-size: 3rem;
    }
    
    .blog-hero-content p {
        font-size: 1.1rem;
    }
    
    .blog-hero-content {
        padding: 0 1rem;
    }
    
    .blog-hero-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .main-window {
        width: 280px;
        height: 200px;
        position: relative;
        margin: 0 auto;
    }
    
    .overlay-window {
        width: 260px;
        height: 180px;
        top: 140px;
        right: auto;
        left: 50%;
        transform: translateX(-30%);
    }
    
    .posts-showcase {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .post-card {
        flex-direction: column;
    }
    
    .post-card .post-image {
        width: 100%;
        height: 150px;
    }
    
    .featured-post h2 {
        font-size: 1.5rem;
    }
}

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

.article-card {
    background: white;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.article-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* Blog Detail Image */
#blog-content .article-image {
    height: 600px;
}

@media (max-width: 768px) {
    #blog-content .article-image {
        height: 500px;
    }
}

.article-category {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: #2563eb;
    color: white;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-content {
    padding: 1.25rem;
}

.article-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: #9ca3af;
}

.article-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.8rem;
}

.article-content p {
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 4.05rem;
}

.article-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.article-tags .tag {
    background: #f9fafb;
    color: #6b7280;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 500;
    border: 1px solid #e5e7eb;
}

.article-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.article-link:hover {
    text-decoration: underline;
}

.article-link i {
    font-size: 0.7rem;
}

[data-theme="dark"] .article-card {
    background: #1e293b;
    border-color: #475569;
}

[data-theme="dark"] .article-content h3 {
    color: #ffffff;
}

[data-theme="dark"] .article-content p {
    color: #cbd5e1;
}

[data-theme="dark"] .article-tags .tag {
    background: #374151;
    color: #d1d5db;
}

.cute-subtitle {
    position: relative;
    text-align: center;
    padding-left: 3rem;
}

.cute-subtitle::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 40px;
    height: 2px;
    background: #2563eb;
    transform: translateY(-50%);
}

@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .article-card {
        margin: 0 1rem;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}