/* ============================================
   CODE SECTION - MODERN PROJECT PORTFOLIO
   ============================================ */

/* Minimal Header Navigation */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(109, 93, 71, 0.3);
}

.back-link {
    color: #6d5d47;
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-link:hover {
    color: #8b7355;
    transform: translateX(-3px);
}

.header-nav {
    display: flex;
    gap: 2rem;
}

.header-nav a {
    color: #6d5d47;
    text-decoration: none;
    font-family: 'IM Fell English', serif;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.header-nav a:hover {
    color: #8b7355;
}

/* Top Navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a0f08 0%, #2c1810 100%);
    border-bottom: 3px solid #6d5d47;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 0;
    padding: 0 2rem;
}

.nav-item {
    padding: 1rem 1.5rem;
    color: #d4b896;
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(212, 184, 150, 0.1);
    color: #ffffff;
}

.nav-item.active {
    background: rgba(212, 184, 150, 0.15);
    color: #ffffff;
    border-bottom-color: #8b0000;
}

/* Main Code Section */
.code-section {
    padding-top: 5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ink-black);
    margin-bottom: 0.5rem;
}

.section-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Two Column Layout */
.code-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

/* Sidebar Styles */
.code-sidebar {
    position: sticky;
    top: 5rem;
    align-self: start;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 2.5rem;
}

.sidebar-title {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink-black);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-list-item {
    padding: 0.8rem 1rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    border-radius: 5px;
    transition: all 0.2s ease;
    color: #333;
    border-left: 3px solid transparent;
}

.project-list-item:hover {
    background: rgba(139, 0, 0, 0.1);
    color: var(--accent-red);
    transform: translateX(5px);
    border-left-color: var(--accent-red);
}

.project-list-item.active {
    background: var(--accent-red);
    color: white;
    font-weight: 600;
    border-left-color: #1a0f08;
}

/* Project Content */
.project-content {
    min-height: 600px;
}

.project-detail {
    display: none;
    animation: slideIn 0.4s ease;
}

.project-detail.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.project-date {
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
    margin-bottom: 1rem;
}

.project-detail-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--ink-black);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

/* About Section */
.project-about {
    margin: 2rem 0;
}

.project-about h4 {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--ink-black);
}

.project-about p {
    margin-bottom: 1rem;
    line-height: 1.8;
    font-size: 1rem;
    color: #2a2a2a;
}

/* Tags/Badges */
.project-tags {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.tag {
    padding: 0.4rem 1rem;
    background: var(--border-gold);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: lowercase;
}

.tag.featured {
    background: var(--accent-red);
}

/* GitHub Info Card */
.github-card {
    background: rgba(0, 0, 0, 0.03);
    border: 2px solid var(--border-gold);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.github-card h4 {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--ink-black);
}

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

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.3rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    font-size: 1rem;
    color: #000;
    font-weight: 600;
}

.info-value a {
    color: var(--accent-red);
    text-decoration: none;
}

.info-value a:hover {
    text-decoration: underline;
}

/* Personal Comment Box */
.personal-comment {
    background: #fffef8;
    border-left: 4px solid var(--accent-red);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.personal-comment h4 {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--ink-black);
}

.personal-comment p {
    line-height: 1.7;
    font-size: 0.95rem;
    color: #333;
    font-style: italic;
}

/* Links */
.project-links {
    margin-top: 2rem;
}

.btn-primary {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background: var(--accent-red);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-family: 'Cinzel', serif;
}

.btn-primary:hover {
    background: var(--ink-black);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 992px) {
    .code-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .code-sidebar {
        position: static;
        max-height: none;
    }
    
    .nav-container {
        padding: 0 1rem;
        flex-wrap: wrap;
    }
    
    .nav-item {
        padding: 0.8rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .project-detail-title {
        font-size: 1.5rem;
    }
    
    .github-info {
        grid-template-columns: 1fr;
    }
}
