:root {
    --bg-color: #f4f7f6;
    --text-color: #333333;
    --sidebar-bg: #ffffff;
    --sidebar-text: #555555;
    --accent-color: #0070f3;
    --accent-hover: #0050a0;
    --card-bg: #ffffff;
    --border-color: #eaeaea;
    --btn-text: #ffffff;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --sidebar-bg: #1e1e1e;
    --sidebar-text: #b0b0b0;
    --accent-color: #4da3ff;
    --accent-hover: #73b9ff;
    --card-bg: #2d2d2d;
    --border-color: #333333;
    --btn-text: #121212;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.6;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.sidebar-header {
    margin-bottom: 40px;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.nav-links {
    list-style: none;
    flex-grow: 1;
}

.nav-links li {
    margin-bottom: 15px;
}

.nav-links a {
    text-decoration: none;
    color: var(--sidebar-text);
    font-weight: 500;
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.2s, color 0.2s;
}

.nav-links a i {
    width: 25px;
    margin-right: 10px;
}

.nav-links a:hover, .nav-links a.active {
    background-color: var(--accent-color);
    color: var(--btn-text);
}

/* Theme Switcher */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    color: var(--sidebar-text);
}

.theme-switch {
    display: inline-block;
    height: 24px;
    position: relative;
    width: 44px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 16px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 16px;
}

input:checked + .slider {
    background-color: var(--accent-color);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Main Content Area */
.content {
    flex-grow: 1;
    margin-left: 250px;
    padding: 60px;
    max-width: 900px;
}

.content section {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.content section.active-section {
    display: block;
}

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

h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--sidebar-text);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--accent-color);
    color: var(--btn-text);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: var(--accent-hover);
}

/* Cards (Projects & Links) */
.card-grid, .links-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.3s, border-color 0.3s;
}

.card h3 {
    margin-bottom: 10px;
}

.card p {
    font-size: 1rem;
    margin-bottom: 20px;
}

.card-link {
    text-decoration: none;
    color: var(--accent-color);
    font-weight: 600;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

[data-theme="dark"] .card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* Link items */
.link-item {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
}

.link-item i {
    margin-bottom: 15px;
    color: var(--accent-color);
}

.link-item h3 {
    margin-bottom: 5px;
}

.link-item p {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 20px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .content {
        margin-left: 0;
        padding: 30px 20px;
    }
    .nav-links {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    .nav-links li {
        margin-bottom: 0;
    }
}