:root {
    /* Brand Colors */
    --primary: #2c3e50;      
    --primary-light: #34495e; 
    --accent: #e74c3c;       
    --accent-hover: #c0392b;
    
    /* Neutrals */
    --bg-body: #f4f6f8;      
    --bg-card: #ffffff;
    --text-main: #2c3e50;
    --text-muted: #636e72;
    --border-light: #ecf0f1;
    
    /* Effects */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 16px rgba(0,0,0,0.08);
    --shadow-hover: 0 12px 24px rgba(0,0,0,0.12);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-main);
    line-height: 1.7;
    margin: 0;
    padding: 0;
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased; 
}

.container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 60px 50px;
    background-color: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

/* --- Header Section --- */
.site-header {
    margin-bottom: 60px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 40px;
}

.site-header h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0 0 20px 0;
    letter-spacing: -1px; 
}

.intro-text p {
    margin-bottom: 25px;
    color: var(--text-muted);
    font-size: 1.05rem;
    font-weight: 400;
}

.intro-text a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.intro-text a:hover {
    color: var(--accent-hover);
    border-bottom: 1px solid var(--accent-hover);
}

/* --- Dashboard Grid (The Cards) --- */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    padding: 30px;
    background-color: #f8fafc;
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

/* Filter Button Logic */
.card.filter-btn {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    padding: 20px 25px;
    border-radius: 10px;
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    user-select: none;
}

.card.filter-btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(44, 62, 80, 0.1);
}

/* Active State for Filter */
.card.filter-btn.active {
    border-color: var(--accent);
    background-color: #fff5f5;
    box-shadow: inset 0 0 0 1px var(--accent), var(--shadow-md);
    transform: translateY(-2px);
}

.card-icon {
    font-size: 1.8rem;
    color: var(--primary);
    background: #ecf0f1;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.card.filter-btn.active .card-icon {
    background: var(--accent);
    color: white;
}

.card.filter-btn:hover .card-icon {
    background: var(--primary);
    color: white;
}

.card.filter-btn.active:hover .card-icon {
    background: var(--accent); 
}

.card-info h3 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
}

.card.filter-btn.active .card-info h3 {
    color: var(--accent);
}

.card-info .count {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.divider {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, var(--border-light), transparent);
    margin: 60px 0;
}

/* --- Project List --- */
.table-header {
    display: grid;
    grid-template-columns: 3fr 2fr 1.5fr;
    font-weight: 700;
    color: var(--text-muted);
    padding: 0 20px 15px 20px;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 10px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.project-row {
    display: grid;
    grid-template-columns: 3fr 2fr 1.5fr;
    padding: 25px 20px;
    border-bottom: 1px solid var(--border-light);
    align-items: center; 
    transition: background-color 0.2s ease;
    border-radius: 8px;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.project-row:hover {
    background-color: #f8fafc;
}

.col-topic h4 {
    margin: 8px 0 0 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.badge {
    background-color: rgba(44, 62, 80, 0.1);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 50px; 
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.col-meta p {
    margin: 4px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Button Styling */
.btn-apply {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--accent);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 6px rgba(231, 76, 60, 0.25);
}

.btn-apply:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(231, 76, 60, 0.35);
}

.col-action small {
    display: block;
    margin-top: 8px;
    font-size: 0.75rem;
    color: #95a5a6;
    text-align: center;
    width: fit-content;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 40px;
    color: #b2bec3;
    font-size: 0.85rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }
    
    .table-header { display: none; }
    
    .project-row {
        grid-template-columns: 1fr;
        gap: 20px;
        background: white;
        border: 1px solid var(--border-light);
        margin-bottom: 20px;
        box-shadow: var(--shadow-sm);
    }

    .col-action {
        margin-top: 10px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
}

/* --- Single Project Detail Page --- */

.project-header h1 {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.project-detail-grid {
    display: grid;
    grid-template-columns: 250px 1fr; /* Sidebar width | Content width */
    gap: 50px;
    margin-top: 40px;
}

/* Sidebar Styling */
.meta-item {
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.meta-label {
    display: block;
    color: #999;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 3px;
}

.meta-value {
    color: var(--primary);
    font-weight: 500;
}

.contact-link {
    color: var(--accent); /* Red color */
    font-weight: 700;
    text-decoration: none;
}

.back-link-wrapper {
    margin-top: 40px;
}

.back-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

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

/* Content Styling */
.project-content {
    font-size: 1.05rem;
    color: #444;
    line-height: 1.8;
}

/* Headers inside the description (Goal, Requirements) */
.project-content h2, 
.project-content h3 {
    color: var(--primary);
    margin-top: 30px;
    font-size: 1.4rem;
}

.project-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.project-content li {
    margin-bottom: 10px;
}

.apply-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border-light);
}

/* Mobile Responsiveness for Detail Page */
@media (max-width: 768px) {
    .project-detail-grid {
        grid-template-columns: 1fr; /* Stack them on mobile */
        gap: 30px;
    }
    
    .project-sidebar {
        background: #f8fafc;
        padding: 20px;
        border-radius: 8px;
    }
}

.status-notice {
    background-color: #fff4e5;
    border-left: 5px solid #ffa117;
    padding: 15px 20px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    border-radius: 4px;
    display: none;
}
.status-notice i {
    font-size: 1.5rem;
    color: #ffa117;
    margin-right: 15px;
}

.status-notice p {
    margin: 0;
    color: #664d03;
}