/* ===================================
   CSS RESET AND BASE STYLES
   =================================== */

:root {
    --dark-gray: #272727;
    --warm-gold: #D4AA7D;
    --light-gold: #EFD09E;
    --text-primary: #FFFFFF;
    --text-secondary: #B8B8B8;
    
    /* Theme-specific variables */
    --bg-primary: #272727;
    --bg-secondary: #1a1a1a;
    --bg-card: rgba(212, 170, 125, 0.05);
    --bg-card-hover: rgba(212, 170, 125, 0.1);
    --border-color: rgba(212, 170, 125, 0.2);
    --border-hover: var(--warm-gold);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --navbar-bg: rgba(39, 39, 39, 0.95);
    --navbar-bg-scroll: rgba(39, 39, 39, 0.98);
}

/* Light theme variables */
[data-theme="light"] {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: rgba(39, 39, 39, 0.05);
    --bg-card-hover: rgba(39, 39, 39, 0.1);
    --text-primary: #272727;
    --text-secondary: #666666;
    --border-color: rgba(39, 39, 39, 0.15);
    --border-hover: var(--warm-gold);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --navbar-bg: rgba(248, 249, 250, 0.95);
    --navbar-bg-scroll: rgba(248, 249, 250, 0.98);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

.section {
    padding: 5rem 0;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--warm-gold);
}

/* ===================================
   NAVIGATION
   =================================== */

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--warm-gold);
    text-decoration: none;
}

/* Main Navigation Links */
.navbar .nav-links {
    display: flex !important;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
}

.navbar .nav-links li {
    white-space: nowrap;
}

.navbar .nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
    padding: 0.5rem 0;
}

.navbar .nav-links a:hover {
    color: var(--warm-gold);
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: 2px solid var(--warm-gold);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--warm-gold);
    font-size: 1.1rem;
    margin-left: 1rem;
}

.theme-toggle:hover,
.theme-toggle:focus {
    background: var(--warm-gold);
    color: var(--bg-primary);
    transform: rotate(180deg);
    outline: none;
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--warm-gold);
    outline-offset: 2px;
}

.theme-toggle i {
    transition: transform 0.3s ease;
}

/* Theme toggle animation */
.theme-toggle.switching {
    animation: themeSwitch 0.6s ease-in-out;
}

@keyframes themeSwitch {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

/* ===================================
   HERO SECTION
   =================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, var(--bg-card-hover) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, var(--bg-card-hover) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    z-index: 2;
    position: relative;
    max-width: 800px;
    padding: 0 2rem;
}

.avatar {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    border: 4px solid var(--warm-gold);
    padding: 10px;
    background: var(--bg-primary);
    animation: float 6s ease-in-out infinite;
}

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--warm-gold), var(--light-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.hero .quote {
    font-size: 1.1rem;
    color: var(--warm-gold);
    font-style: italic;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.tech-stack {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.tech-item {
    background: var(--bg-card);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    border: 1px solid var(--warm-gold);
    color: var(--warm-gold);
    font-weight: 500;
    transition: all 0.3s ease;
}

.tech-item:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

/* ===================================
   CONTENT SECTIONS
   =================================== */

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.education {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    border-left: 4px solid var(--warm-gold);
}

.education h3 {
    color: var(--warm-gold);
    margin-bottom: 1rem;
}

/* Experience Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--warm-gold);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    margin-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -3rem;
    top: 2rem;
    width: 12px;
    height: 12px;
    background: var(--warm-gold);
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 30px var(--shadow-color);
}

.project-card h3 {
    color: var(--warm-gold);
    margin-bottom: 1rem;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.project-links a {
    color: var(--warm-gold);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--warm-gold);
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.project-links a:hover {
    background: var(--warm-gold);
    color: var(--bg-primary);
}

/* GitHub Stats */
.github-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem;
    margin: 3rem 0;
}

.stat-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-number {
    font-size: 2.5rem;
    color: var(--warm-gold);
    font-weight: bold;
    display: block;
}

/* Blog Section */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem;
    margin-top: 2rem;
}

.article-card {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
}

.article-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.article-card h3 {
    color: var(--warm-gold);
    margin-bottom: 1rem;
}

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

.tag {
    background: rgba(239, 208, 158, 0.2);
    color: var(--light-gold);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 3rem 0;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--warm-gold);
    color: var(--warm-gold);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-link:hover {
    background: var(--warm-gold);
    color: var(--bg-primary);
    transform: translateY(-3px);
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--warm-gold);
    color: var(--bg-primary);
}

.btn-secondary {
    background: transparent;
    color: var(--warm-gold);
    border: 2px solid var(--warm-gold);
}

.btn:hover {
    transform: translateY(-3px);
}

.btn-primary:hover {
    background: var(--light-gold);
}

.btn-secondary:hover {
    background: var(--warm-gold);
    color: var(--bg-primary);
}

/* ===================================
   SEARCH FUNCTIONALITY
   =================================== */

.search-container {
    position: relative;
    margin-left: 1rem;
}

.search-toggle {
    background: none;
    border: 2px solid var(--warm-gold);
    border-radius: 25px;
    padding: 0.5rem 1rem;
    color: var(--warm-gold);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.search-toggle:hover,
.search-toggle:focus {
    background: var(--warm-gold);
    color: var(--bg-primary);
    outline: none;
}

.search-toggle:focus-visible {
    outline: 2px solid var(--warm-gold);
    outline-offset: 2px;
}

/* Search Modal */
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    backdrop-filter: blur(5px);
}

.search-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
}

.search-modal-content {
    background: var(--bg-primary);
    border-radius: 20px;
    border: 2px solid var(--warm-gold);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px var(--shadow-color);
}

.search-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.search-input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1rem 1rem 3rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--warm-gold);
    box-shadow: 0 0 0 3px rgba(212, 170, 125, 0.1);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-icon {
    position: absolute;
    left: 3rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.1rem;
    pointer-events: none;
}

.search-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--warm-gold);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-close:hover {
    background: var(--bg-card-hover);
    transform: rotate(90deg);
}

/* Search Results */
.search-results {
    max-height: 50vh;
    overflow-y: auto;
    padding: 0;
}

.search-result-item {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.search-result-item:hover,
.search-result-item.highlighted {
    background: var(--bg-card-hover);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--warm-gold);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-result-type {
    font-size: 0.8rem;
    background: var(--bg-card);
    color: var(--text-secondary);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    text-transform: uppercase;
    font-weight: 500;
}

.search-result-summary {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.search-result-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.search-result-date {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.search-result-tags {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.search-result-tag {
    background: rgba(239, 208, 158, 0.2);
    color: var(--light-gold);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
}

/* Search States */
.search-loading {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.search-no-results {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.search-no-results h3 {
    color: var(--warm-gold);
    margin-bottom: 1rem;
}

.search-suggestions {
    margin-top: 1rem;
}

.search-suggestion {
    display: inline-block;
    background: var(--bg-card);
    color: var(--warm-gold);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin: 0.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.search-suggestion:hover {
    background: var(--warm-gold);
    color: var(--bg-primary);
}

/* Search Keyboard Navigation */
.search-help {
    padding: 1rem 2rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-shortcuts {
    display: flex;
    gap: 1rem;
}

.search-shortcut {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.search-key {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: monospace;
    border: 1px solid var(--border-color);
}

/* Mobile Search */
@media (max-width: 768px) {
    .search-toggle {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .search-modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .search-header {
        padding: 1rem;
    }
    
    .search-icon {
        left: 2rem;
    }
    
    .search-close {
        top: 1rem;
        right: 1rem;
    }
    
    .search-result-item {
        padding: 1rem;
    }
    
    .search-help {
        padding: 0.8rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .search-shortcuts {
        justify-content: center;
    }
}

/* ===================================
   MODAL STYLES
   =================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-primary);
    padding: 3rem;
    border-radius: 20px;
    border: 2px solid var(--warm-gold);
    max-width: 500px;
    width: 90%;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--warm-gold);
    font-size: 1.5rem;
    cursor: pointer;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: var(--warm-gold);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--warm-gold);
}

.submit-btn {
    background: var(--warm-gold);
    color: var(--bg-primary);
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: var(--light-gold);
    transform: translateY(-2px);
}

/* ===================================
   BLOG/ARTICLES GRID STYLES
   =================================== */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem;
    margin-bottom: 2rem;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
}

.article-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 30px var(--shadow-color);
}

.article-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.article-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.article-card h3 a {
    color: var(--warm-gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-card h3 a:hover {
    color: var(--light-gold);
}

.article-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

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

.article-read-more {
    margin-top: 1rem;
}

.read-more-link {
    color: var(--warm-gold);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more-link:hover {
    color: var(--light-gold);
    transform: translateX(5px);
}

.read-more-link i {
    transition: transform 0.3s ease;
}

.read-more-link:hover i {
    transform: translateX(3px);
}

/* Section Header with View All Link */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    margin-bottom: 0;
}

.view-all-link {
    color: var(--warm-gold);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-all-link:hover {
    color: var(--light-gold);
    transform: translateX(5px);
}

.view-all-link i {
    transition: transform 0.3s ease;
}

.view-all-link:hover i {
    transform: translateX(3px);
}

/* View All Articles Button */
.view-all-articles {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 2rem;
}

.view-all-articles .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

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

@media (max-width: 768px) {
    .navbar .nav-links {
        display: none !important;
    }
    
    .theme-toggle {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        margin-left: 0.5rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .github-stats {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    /* Blog Grid Responsive */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .section-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .section-header h2 {
        margin-bottom: 0;
    }
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Smooth animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

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

/* Loading animation for GitHub stats */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--warm-gold);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Tablet responsive design */
@media (min-width: 769px) and (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .github-stats {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Homepage specific overrides */
body.homepage .projects-grid {
    grid-template-columns: repeat(3, 1fr) !important;
}

body.homepage .blog-grid {
    grid-template-columns: repeat(3, 1fr) !important;
}

body.homepage .github-stats {
    grid-template-columns: repeat(3, 1fr) !important;
}

/* Tablet responsive for homepage */
@media (min-width: 769px) and (max-width: 1024px) {
    body.homepage .projects-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    body.homepage .blog-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    body.homepage .github-stats {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Mobile responsive for homepage */
@media (max-width: 768px) {
    body.homepage .projects-grid,
    body.homepage .blog-grid,
    body.homepage .github-stats {
        grid-template-columns: 1fr !important;
    }
}

/* ===================================
   IMAGE OPTIMIZATION AND PERFORMANCE
   =================================== */

/* Base image styles for performance */
img {
    max-width: 100%;
    height: auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: optimizeQuality;
}

/* Lazy loading image states */
.lazy-image {
    transition: opacity 0.4s ease, filter 0.4s ease, transform 0.3s ease;
    filter: blur(8px);
    opacity: 0.6;
    transform: scale(1.02);
}

.lazy-image.image-loading {
    position: relative;
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.lazy-image.image-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--warm-gold);
    animation: spin 1s ease-in-out infinite;
    z-index: 2;
}

.lazy-image.image-loaded {
    filter: none;
    opacity: 1;
    transform: scale(1);
}

.lazy-image.image-error {
    filter: grayscale(100%) brightness(0.7);
    opacity: 0.5;
    position: relative;
}

.lazy-image.image-error::before {
    content: '⚠️ Image failed to load';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 2;
}

/* Background image lazy loading */
.lazy-bg {
    transition: opacity 0.4s ease;
    opacity: 0.7;
    position: relative;
}

.lazy-bg.bg-loading {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.lazy-bg.bg-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--warm-gold);
    animation: spin 1s ease-in-out infinite;
    z-index: 1;
}

.lazy-bg.bg-loaded {
    opacity: 1;
}

.lazy-bg.bg-error {
    opacity: 0.5;
    background: var(--bg-secondary);
}

/* Avatar optimizations */
.avatar {
    position: relative;
    overflow: hidden;
}

.avatar-optimized {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(212, 170, 125, 0.2);
}

.avatar-optimized:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(212, 170, 125, 0.3);
}

/* Responsive image utilities */
.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
}

.img-cover {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.img-contain {
    object-fit: contain;
    width: 100%;
    height: 100%;
}

.img-rounded {
    border-radius: 12px;
    overflow: hidden;
}

.img-circle {
    border-radius: 50%;
    overflow: hidden;
}

/* Image placeholder styles */
.image-placeholder {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-hover) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    min-height: 200px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Shimmer animation for loading states */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Performance optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .lazy-image,
    .lazy-bg,
    .avatar-optimized {
        transition: none;
        animation: none;
    }
    
    .lazy-image.image-loading,
    .lazy-bg.bg-loading {
        animation: none;
        background: var(--bg-card);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .lazy-image.image-loading::after,
    .lazy-bg.bg-loading::before {
        border-color: currentColor;
        border-top-color: var(--warm-gold);
    }
}

/* Print styles for images */
@media print {
    .lazy-image,
    .lazy-bg {
        opacity: 1 !important;
        filter: none !important;
        transform: none !important;
    }
    
    .lazy-image.image-loading::after,
    .lazy-bg.bg-loading::before {
        display: none;
    }
}
/* =
==================================
   ARTICLE SYSTEM STYLES
   =================================== */

/* Articles List Page */
.articles-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 2rem 5rem;
}

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

.articles-header h1 {
    font-size: 3rem;
    color: var(--warm-gold);
    margin-bottom: 1rem;
}

.articles-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.article-card {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.article-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 30px var(--shadow-color);
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.article-card-title {
    margin-bottom: 1rem;
}

.article-card-title a {
    color: var(--warm-gold);
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.article-card-title a:hover {
    color: var(--light-gold);
}

.article-summary {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.article-author {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.read-more-link {
    color: var(--warm-gold);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more-link:hover {
    color: var(--light-gold);
    transform: translateX(5px);
}

/* No Articles State */
.no-articles {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.no-articles-content {
    text-align: center;
    max-width: 500px;
}

.no-articles-content h3 {
    color: var(--warm-gold);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.no-articles-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

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

/* Single Article Page */
.article-single {
    max-width: 800px;
    margin: 0 auto;
    padding: 8rem 2rem 5rem;
}

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

.article-title {
    font-size: 2.5rem;
    color: var(--warm-gold);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.article-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

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

/* Article Content Typography */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: var(--warm-gold);
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-content h1 { font-size: 2rem; }
.article-content h2 { font-size: 1.7rem; }
.article-content h3 { font-size: 1.4rem; }
.article-content h4 { font-size: 1.2rem; }

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid var(--warm-gold);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
}

.article-content code {
    background: var(--bg-card-hover);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--light-gold);
    font-size: 0.9em;
}

.article-content pre {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
}

.article-content pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
}

.article-content a {
    color: var(--warm-gold);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.article-content a:hover {
    color: var(--light-gold);
    border-bottom-color: var(--light-gold);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
}

.article-content th,
.article-content td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.article-content th {
    background: var(--bg-card-hover);
    color: var(--warm-gold);
    font-weight: 600;
}

/* Article Footer */
.article-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.article-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.article-navigation .nav-link {
    display: block;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-navigation .nav-link:hover {
    border-color: var(--warm-gold);
    transform: translateY(-2px);
}

.nav-prev {
    text-align: left;
}

.nav-next {
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.nav-title {
    display: block;
    color: var(--warm-gold);
    font-weight: 600;
    font-size: 1.1rem;
}

.back-to-articles {
    text-align: center;
}

/* Responsive Design for Articles */
@media (max-width: 768px) {
    .articles-list,
    .article-single {
        padding: 6rem 1rem 3rem;
    }
    
    .articles-header h1,
    .article-title {
        font-size: 2rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .article-navigation {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .nav-next,
    .nav-prev {
        text-align: center;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .article-content pre {
        padding: 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .article-content table {
        font-size: 0.9rem;
    }
    
    .article-content th,
    .article-content td {
        padding: 0.5rem;
    }
}
/* =
==================================
   ANALYTICS & CONSENT BANNER STYLES
   =================================== */

/* Consent Banner */
.consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 2px solid var(--warm-gold);
    box-shadow: 0 -4px 20px var(--shadow-color);
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    backdrop-filter: blur(10px);
}

.consent-banner.visible {
    transform: translateY(0);
}

.consent-banner.hiding {
    transform: translateY(100%);
}

.consent-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.consent-message {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.consent-message i {
    color: var(--warm-gold);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.consent-message p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.5;
}

.consent-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.consent-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.consent-accept {
    background: var(--warm-gold);
    color: var(--dark-gray);
}

.consent-accept:hover {
    background: var(--light-gold);
    transform: translateY(-2px);
}

.consent-decline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.consent-decline:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.consent-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.consent-link:hover {
    color: var(--warm-gold);
}

/* Analytics Debug Panel (for development) */
.analytics-debug {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.8rem;
    max-width: 300px;
    z-index: 9999;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.analytics-debug:hover {
    opacity: 1;
}

.analytics-debug h4 {
    color: var(--warm-gold);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.analytics-debug .debug-item {
    margin-bottom: 0.25rem;
    color: var(--text-secondary);
}

.analytics-debug .debug-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* Privacy Notice Styles */
.privacy-notice {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin: 2rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.privacy-notice h4 {
    color: var(--warm-gold);
    margin-bottom: 0.5rem;
}

.privacy-notice a {
    color: var(--warm-gold);
    text-decoration: none;
}

.privacy-notice a:hover {
    text-decoration: underline;
}

/* Loading states for analytics */
.analytics-loading {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--warm-gold);
    animation: spin 1s ease-in-out infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive design for consent banner */
@media (max-width: 768px) {
    .consent-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 1.5rem 1rem;
    }
    
    .consent-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .consent-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .analytics-debug {
        right: 10px;
        left: 10px;
        max-width: none;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .consent-message {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .consent-actions {
        width: 100%;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .consent-btn {
        width: 100%;
        justify-content: center;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .consent-banner {
        border-top-width: 3px;
    }
    
    .consent-btn {
        border-width: 2px;
    }
    
    .consent-accept {
        background: var(--text-primary);
        color: var(--bg-primary);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .consent-banner {
        transition: none;
    }
    
    .consent-btn {
        transition: none;
    }
    
    .analytics-loading {
        animation: none;
    }
}/* 
=============================================================================
   PROJECT SYSTEM STYLES
   ============================================================================= */

/* Project Page Layout */
.projects-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--warm-gold);
    margin-bottom: 1rem;
}

.page-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Project Filters */
.project-filters {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.filter-select {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    min-width: 120px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--warm-gold);
    box-shadow: 0 0 0 2px rgba(212, 170, 125, 0.2);
}

.filter-checkbox {
    margin-right: 0.5rem;
}

/* Featured Projects Section */
.featured-projects {
    margin-bottom: 3rem;
}

.featured-projects h2 {
    color: var(--warm-gold);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.featured-project-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.featured-project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--warm-gold);
}

.featured-project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem 0;
}

.featured-badge {
    background: linear-gradient(135deg, var(--warm-gold), var(--light-gold));
    color: var(--dark-gray);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.project-image {
    height: 200px;
    overflow: hidden;
    margin: 1rem 1.5rem;
    border-radius: 8px;
    background: var(--background-color);
}

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

.featured-project-card:hover .project-image img {
    transform: scale(1.05);
}

/* All Projects Section */
.all-projects {
    margin-top: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    color: var(--warm-gold);
    font-size: 1.8rem;
}

.project-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem;
}

.project-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--warm-gold);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-production {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.status-active {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.status-maintenance {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.status-archived {
    background: rgba(107, 114, 128, 0.2);
    color: #6b7280;
}

.project-type {
    color: var(--text-secondary);
    font-size: 0.8rem;
    background: var(--background-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.project-date {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.featured-indicator {
    color: var(--warm-gold);
    font-size: 0.9rem;
}

.project-content {
    flex: 1;
    margin-bottom: 1rem;
}

.project-content h3 {
    margin-bottom: 0.75rem;
}

.project-content h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.project-content h3 a:hover {
    color: var(--warm-gold);
}

.project-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.detail-item i {
    color: var(--warm-gold);
    width: 12px;
}

.project-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-tag {
    background: var(--background-color);
    color: var(--text-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: var(--warm-gold);
    color: var(--dark-gray);
    border-color: var(--warm-gold);
}

.tech-tag.more {
    background: var(--warm-gold);
    color: var(--dark-gray);
    font-weight: 600;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.project-links {
    display: flex;
    gap: 0.5rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--background-color);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: var(--warm-gold);
    color: var(--dark-gray);
    border-color: var(--warm-gold);
    transform: translateY(-1px);
}

.read-more-link {
    color: var(--warm-gold);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.3s ease;
}

.read-more-link:hover {
    color: var(--light-gold);
    gap: 0.5rem;
}

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

.no-results i {
    font-size: 3rem;
    color: var(--warm-gold);
    margin-bottom: 1rem;
}

.no-results h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Project Single Page */
.project-single {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.project-single .project-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.project-single .project-meta {
    justify-content: center;
    margin-bottom: 1rem;
}

.project-title {
    font-size: 2.5rem;
    color: var(--warm-gold);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.project-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.project-details {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.project-single .detail-item {
    font-size: 0.9rem;
    gap: 0.5rem;
}

.project-single .detail-item i {
    width: 16px;
}

.project-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.project-single .project-link {
    padding: 0.75rem 1.5rem;
    width: auto;
    height: auto;
    font-size: 0.9rem;
    font-weight: 500;
    gap: 0.5rem;
}

.github-link {
    background: var(--dark-gray);
    color: var(--text-primary);
    border-color: var(--dark-gray);
}

.github-link:hover {
    background: #333;
    border-color: #333;
}

.demo-link {
    background: var(--warm-gold);
    color: var(--dark-gray);
    border-color: var(--warm-gold);
}

.demo-link:hover {
    background: var(--light-gold);
    border-color: var(--light-gold);
}

.project-single .project-technologies {
    justify-content: center;
    margin-bottom: 0;
}

/* Project Gallery */
.project-gallery {
    margin-bottom: 3rem;
}

.project-gallery h2 {
    color: var(--warm-gold);
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    background: var(--card-background);
    border: 1px solid var(--border-color);
}

.gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.05);
}

/* Lightbox */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: var(--warm-gold);
}

/* Project Content */
.project-content {
    line-height: 1.8;
    margin-bottom: 3rem;
}

.project-content h2 {
    color: var(--warm-gold);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.project-content h3 {
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.project-content ul, .project-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.project-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.project-content code {
    background: var(--card-background);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}

.project-content pre {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.project-content pre code {
    background: none;
    border: none;
    padding: 0;
}

/* Project Footer */
.project-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    margin-top: 3rem;
}

.project-tags h3 {
    color: var(--warm-gold);
    margin-bottom: 1rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tag-link {
    background: var(--background-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.tag-link:hover {
    background: var(--warm-gold);
    color: var(--dark-gray);
    border-color: var(--warm-gold);
}

/* Project Navigation */
.project-navigation {
    margin-bottom: 2rem;
}

.project-navigation .nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.project-navigation .nav-link {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    gap: 1rem;
}

.project-navigation .nav-link:hover {
    border-color: var(--warm-gold);
    background: var(--background-color);
}

.project-navigation .nav-link.next-project {
    justify-content: flex-end;
    text-align: right;
}

.nav-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-title {
    font-weight: 500;
    color: var(--text-primary);
}

.back-to-projects {
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .project-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        justify-content: space-between;
    }
    
    .filter-select {
        min-width: auto;
        flex: 1;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-single .project-details {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .project-links {
        flex-direction: column;
        align-items: center;
    }
    
    .project-navigation .nav-links {
        grid-template-columns: 1fr;
    }
    
    .project-navigation .nav-link.next-project {
        justify-content: flex-start;
        text-align: left;
    }
    
    .project-title {
        font-size: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .projects-page {
        padding: 1rem 0.5rem;
    }
    
    .project-card {
        padding: 1rem;
    }
    
    .project-single {
        padding: 1rem 0.5rem;
    }
    
    .project-title {
        font-size: 1.75rem;
    }
    
    .project-description {
        font-size: 1rem;
    }
}