:root {
    /* Light Theme Variables */
    --bg-body: #ffffff;
    --bg-surface: #f9fafb;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --accent: #2563eb; /* Professional Blue */
    --accent-hover: #1d4ed8;
    --border: #e5e7eb;
    --radius: 8px;
    --container-width: 768px; /* Compact width */
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html.dark-theme {
    /* Dark Theme Variables */
    --bg-body: #111111;
    --bg-surface: #1a1a1a;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --accent: #60a5fa;
    --accent-hover: #93c5fd;
    --border: #262626;
}

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

body { 
    font-family: var(--font-stack);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 15px; /* Compact base font */
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 24px 16px; /* Compact padding */
}

/* Loading Screen - Minimal */
#loading-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-body);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}
.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Typography Styles */
h1, h2, h3 {
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
h1 { font-size: 2rem; margin-bottom: 0.25rem; }
h2 { font-size: 1.35rem; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
h3 { font-size: 1.1rem; margin-bottom: 0.25rem; }
p { margin-bottom: 1rem; color: var(--text-secondary); font-size: 1rem; line-height: 1.5; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* Header / Nav */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: -1px; /* Sticks right at the top */
    background-color: var(--bg-body);
    z-index: 1000;
}
.logo { font-weight: 700; font-size: 1.125rem; letter-spacing: -0.03em; display: flex; align-items: center; gap: 8px; }

.search-bar {
    position: relative;
}
.search-input {
    background: transparent;
    border: 1px solid var(--border);
    padding: 6px 12px 6px 32px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--text-primary);
    width: 200px;
    transition: all 0.2s ease;
}
.search-input:focus {
    outline: none;
    border-color: var(--accent);
    width: 240px;
}
.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.75rem;
    pointer-events: none;
}

/* Profile Section */
.profile-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
@media (min-width: 640px) {
    .profile-layout { flex-direction: row; align-items: flex-start; }
}

.profile-img {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-surface);
}
.profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-details { flex-grow: 1; }
.role { font-size: 1.125rem; color: var(--text-secondary); margin-bottom: 0.5rem; font-weight: 400; }
.meta-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}
.meta-item i { color: var(--text-muted); }

/* Sections */
section { margin-bottom: 2.5rem; opacity: 0; transform: translateY(10px); transition: opacity 0.6s ease, transform 0.6s ease; }
section.active { opacity: 1; transform: translateY(0); }

/* Timeline (Experience) */
.timeline { display: flex; flex-direction: column; gap: 2rem; }
.job-card { display: grid; grid-template-columns: 1fr; gap: 0.5rem; }
@media (min-width: 500px) {
    .job-card { grid-template-columns: 120px 1fr; }
}
.job-date { font-size: 0.875rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.job-info h3 { margin-bottom: 0.25rem; color: var(--text-primary); }
.company { font-size: 0.95rem; color: var(--text-secondary); font-style: italic; display: block; margin-bottom: 0.5rem; }

/* Education Grid */
.edu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
.edu-card {
    background: var(--bg-surface);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: border-color 0.2s ease;
}
.edu-card:hover { border-color: var(--text-muted); }
.edu-degree { font-weight: 600; color: var(--text-primary); margin-bottom: 0.25rem; }
.edu-school { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.edu-year { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* Skills */
.skills-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.skill-tag {
    font-size: 0.875rem;
    padding: 4px 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-secondary);
}

/* Footer */
footer {
    margin-top: 6rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Blog specific styles */
.post-card { padding: 1.5rem 0; border-bottom: 1px solid var(--border); }
.post-date { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.meta { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 2rem; }
