:root {
    /* Blue Theme Color */
    --primary-blue: #4da3ff;

    /* Dark Mode Colors */
    --surface-color: #1e1e1e;
    --background-color: #121212;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;

    /* M3 Elevations/States */
    --surface-container-high: #2b2b2b;
    --outline-color: #444444;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    padding-bottom: 80px;
    /* Space for bottom nav on mobile */
    margin: 0;
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- SIDEBAR (Desktop) --- */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 280px;
    /* Slight increase for better M3 spacing */
    background-color: var(--surface-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    border-right: 1px solid #333;
}

.sidebar h3 {
    margin-bottom: 32px;
    padding-left: 16px;
    color: var(--text-primary);
}

.sidebar a {
    color: var(--text-secondary);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 16px;
    border-radius: 28px;
    /* M3 Pill Shape */
    margin-bottom: 8px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.sidebar a:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    transform: translateX(4px);
}

.sidebar a.active {
    background-color: #2b3b4b;
    /* Dark Blue tint */
    color: var(--primary-blue);
    font-weight: 500;
}

.sidebar a i {
    font-size: 24px;
}

/* --- BOTTOM NAV (Mobile) --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--surface-color);
    display: flex;
    justify-content: space-evenly;
    /* Distribute evenly */
    padding: 12px 4px 16px 4px;
    /* Reduced side padding */
    z-index: 1000;
    border-top: 1px solid #333;
}

.nav-item {
    text-align: center;
    color: var(--text-secondary);
    font-size: 11px;
    /* Slightly smaller text */
    flex: 1;
    /* Grow to fill space */
    min-width: 0;
    /* Allow shrinking */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 2px;
}

.nav-item i {
    display: block;
    font-size: 24px;
    margin-bottom: 4px;
    padding: 4px 0;
    /* Removing large side padding */
    width: 48px;
    /* Fixed width pill */
    border-radius: 16px;
    transition: background-color 0.2s;
    margin-left: auto;
    margin-right: auto;
}

.nav-item.active i {
    background-color: #2b3b4b;
    color: var(--primary-blue);
}

.nav-item.active span {
    color: var(--text-primary);
    font-weight: 500;
}

/* --- MAIN CONTENT AREA --- */
.main-content {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- COMMON COMPONENTS --- */

/* Project Cards */
.card-custom {
    background-color: transparent;
    border: none;
    transition: transform 0.2s;
    cursor: pointer;
}

.card-custom:hover {
    transform: translateY(-4px);
}

.card-img-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1/1;
    background-color: var(--surface-container-high);
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-overlay {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Chips */
.chip-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.chip {
    background-color: var(--surface-container-high);
    color: var(--text-primary);
    /* Changed to primary for better contrast */
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--outline-color);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.chip:hover {
    background-color: #3b3b3b;
    border-color: #666;
}

/* Page Headers */
.page-header {
    margin-bottom: 32px;
    padding-top: 16px;
}

.page-header h2 {
    font-size: 32px;
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* --- ABOUT PAGE --- */
.about-card {
    background-color: var(--surface-container-high);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.about-card h4 {
    margin-bottom: 12px;
}

.about-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.about-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 999px;
    background-color: var(--surface-container-high);
}

.stat-pill i {
    color: var(--primary-blue);
}

.stat-pill strong {
    color: var(--primary-blue);
    font-size: 20px;
}

@media (max-width: 575px) {
    .about-card { padding: 20px; }
    .stat-pill { padding: 10px 14px; }
}

/* --- RIPPLE EFFECT --- */
.btn {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* --- MEDIA QUERIES --- */
@media (min-width: 992px) {
    body {
        padding-bottom: 0;
        padding-left: 280px;
        /* Match sidebar width */
    }

    .bottom-nav {
        display: none;
    }
}

@media (max-width: 991px) {
    .sidebar {
        display: none;
    }
}