/* Light Theme Variables (Default) */
:root {
    --primary-color: #0f172a;
    --accent-color: #3b82f6;
    --bg-color: #edeff1;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --btn-text: #ffffff;
}

/* Dark Theme Variables (Triggered by body class) */
body.dark-mode {
    --primary-color: #f8fafc;
    --accent-color: #60a5fa;
    --bg-color: #020617;
    --card-bg: #0f172a;
    --text-main: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #1e293b;
    --btn-text: #0f172a;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
}

/* Fixed Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}
.theme-toggle:hover {
    background: var(--border-color);
    transform: scale(1.05);
}
/* Prevents the SVG from stealing the click event */
.theme-toggle * { pointer-events: none; }

#sunIcon { display: none; }

.layout-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    max-width: 1200px;
    margin: 40px auto;
    gap: 32px;
    padding: 0 20px;
}

/* Sidebar Styling */
.sidebar {
    position: sticky;
    top: 40px;
    height: fit-content;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 40px 24px 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: background-color 0.3s ease;
}

.profile-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
    border: 3px solid #eceff3;
}

.sidebar h1 { font-size: 1.5rem; color: var(--primary-color); margin-bottom: 8px; }
.sidebar .headline { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 16px; }
.sidebar .location { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); margin-bottom: 24px; }

.btn {
    display: inline-block;
    width: 100%;
    padding: 10px 0;
    background: var(--accent-color);
    color: var(--btn-text);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: opacity 0.2s;
    margin-bottom: 16px;
}
.btn:hover { opacity: 0.9; }

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}
.social-links a {
    color: var(--text-muted);
    transition: color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.skills-container { margin-top: 16px; text-align: left; border-top: 1px solid var(--border-color); padding-top: 24px; transition: border-color 0.3s ease;}
.skills-container h3 { font-size: 1rem; margin-bottom: 12px; color: var(--primary-color); }
.skill-tag {
    display: inline-block;
    background: var(--bg-color);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin: 0 4px 8px 0;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Main Content Styling */
.main-content { display: flex; flex-direction: column; gap: 24px; }

.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease;
}

.card h2 { font-size: 1.25rem; color: var(--primary-color); margin-bottom: 16px; border-bottom: 2px solid var(--bg-color); padding-bottom: 8px; transition: border-color 0.3s ease;}

.timeline-item { margin-bottom: 24px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item h3 { font-size: 1.1rem; color: var(--primary-color); }
.timeline-item .meta { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px; font-weight: 500; }

/* Project Grid */
.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.project-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    background: var(--bg-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.project-card h4 { margin-bottom: 8px; color: var(--accent-color); }

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .layout-container { grid-template-columns: 1fr; margin: 60px auto 20px; }
    .sidebar { position: relative; top: 0; }
    .project-grid { grid-template-columns: 1fr; }
    .theme-toggle { top: 16px; right: 16px; width: 40px; height: 40px; }
}
