:root {
    /* Core Colors */
    --white: #ffffff;
    --black: #0f172a;
    /* Slate 900 */
    --gray-50: #1e293b;
    /* Dark Slate */
    --gray-100: #334155;
    --gray-200: #475569;
    --gray-500: #94a3b8;
    /* Lighter gray for text on dark bg */
    --gray-800: #e2e8f0;
    /* Light gray for main text */

    /* Theme Colors - Default (Neutral/Home) */
    --accent: #38bdf8;
    /* Sky 400 - brighter for dark mode */
    --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    /* Sky to Indigo */
    --accent-light: rgba(56, 189, 248, 0.1);
    --accent-glow: rgba(56, 189, 248, 0.4);
    --bg-color: #0f172a;
    /* Slate 900 - Dark Background */
    --bg-gradient: radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%), radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 0.3) 0, transparent 50%), radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 0.3) 0, transparent 50%);

    --nav-border: rgba(255, 255, 255, 0.05);
    --nav-bg: rgba(15, 23, 42, 0.8);
    /* Dark nav bg */
    --nav-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);

    /* Dimensions */
    --max-width: 1000px;
    --header-height: 70px;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
}

/* Theme: Software Engineer */
body.theme-dev {
    --accent: #818cf8;
    /* Indigo 400 */
    --accent-gradient: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
    /* Indigo to Purple */
    --accent-light: rgba(129, 140, 248, 0.1);
    --accent-glow: rgba(129, 140, 248, 0.4);
    --bg-color: #0f172a;
    --nav-border: rgba(129, 140, 248, 0.1);
}

/* Theme: Data Engineer */
body.theme-data {
    --accent: #34d399;
    /* Emerald 400 */
    --accent-gradient: linear-gradient(135deg, #34d399 0%, #2dd4bf 100%);
    /* Emerald to Teal */
    --accent-light: rgba(52, 211, 153, 0.1);
    --accent-glow: rgba(52, 211, 153, 0.4);
    --bg-color: #0f172a;
    --nav-border: rgba(52, 211, 153, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--gray-800);
    line-height: 1.6;
    transition: background-color 0.5s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Sticky Footer Setup */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    background-size: cover;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typeWriter {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blinkCursor {
    from {
        border-right-color: var(--accent);
    }

    to {
        border-right-color: transparent;
    }
}

main#app>* {
    animation: fadeInUp 0.4s ease-out forwards;
}

main#app {
    flex: 1;
}

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

/* Navbar */
.navbar {
    height: var(--header-height);
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--nav-border);
    box-shadow: var(--nav-shadow);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--gray-500);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
    position: relative;
    padding-bottom: 4px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    /* Use gradient */
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--white);
    /* Brighter on hover in dark mode */
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--white);
    /* White for dark mode */
}

/* Hero Section */
.hero {
    padding: 10px 0 20px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 24px;
    box-shadow: 0 0 15px var(--accent), 0 0 30px var(--accent-glow);
    /* Neon Shadow */
    border: 4px solid var(--white);
    /* White border for contrast */
    transition: box-shadow 0.3s ease;
}

.avatar:hover {
    box-shadow: 0 0 25px var(--accent), 0 0 50px var(--accent-glow);
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    color: var(--white);
    /* White text */
    margin-bottom: 16px;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tagline {
    font-size: 1.25rem;
    color: var(--gray-500);
    margin-bottom: 48px;
    font-weight: 400;
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--accent);
    animation: typeWriter 3s steps(40) 1s 1 normal both, blinkCursor 500ms steps(40) infinite normal;
    max-width: 100%;
}

/* Role Cards (Home) */
.role-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 20px;
    /* Reduced margin-top */
}

.role-card {
    background: rgba(30, 41, 59, 0.7);
    /* Darker glass background */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 32px;
    border-radius: 20px;
    text-align: left;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
    /* Stronger initial shadow */
    position: relative;
    overflow: hidden;
}

.role-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.role-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px var(--accent-glow), 0 10px 20px -5px rgba(0, 0, 0, 0.5);
    /* Very strong glow on hover */
    border-color: var(--accent);
}

.role-card:hover::before {
    opacity: 1;
}

.role-card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--white);
    /* White text */
}

.role-card p {
    color: var(--gray-500);
    margin-bottom: 24px;
    font-size: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--accent-gradient);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
    filter: brightness(1.1);
}

/* Section Headers */
h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    /* White text */
    margin: 60px 0 32px;
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.skill-category {
    background: rgba(30, 41, 59, 0.5);
    /* Dark background */
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skill-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2);
    border-color: var(--accent);
}

.skill-category h4 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--white);
    /* White text */
    font-weight: 700;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
}

.skill-tag {
    background: rgba(255, 255, 255, 0.05);
    /* Darker tag bg */
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.skill-tag:hover {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px var(--accent-glow);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 32px;
    border-left: 2px solid var(--gray-200);
}

.timeline-item {
    position: relative;
    margin-bottom: 48px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -39px;
    top: 6px;
    width: 12px;
    height: 12px;
    background: var(--bg-color);
    /* Match bg */
    border: 3px solid var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.timeline-item:hover::before {
    box-shadow: 0 0 0 6px var(--accent-glow);
    transform: scale(1.1);
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: var(--font-mono);
}

.timeline-role {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    /* White text */
    margin-bottom: 4px;
}

.timeline-company {
    font-size: 1rem;
    color: var(--gray-500);
    margin-bottom: 16px;
    font-weight: 500;
}

.timeline-details {
    list-style: none;
}

.timeline-details li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 8px;
    color: var(--gray-800);
}

.timeline-details li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* Projects */
.project-list {
    display: grid;
    gap: 24px;
    list-style: none;
}

.project-list li {
    background: rgba(30, 41, 59, 0.5);
    /* Dark background */
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--gray-200);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.project-list li:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 10px 20px -5px var(--accent-glow);
}

/* Contact Form */
.contact-section {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-details {
    margin: 32px 0;
    color: var(--gray-500);
}

.contact-details a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.contact-form {
    text-align: left;
    background: rgba(30, 41, 59, 0.5);
    /* Dark background */
    padding: 32px;
    border-radius: 20px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-800);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: rgba(15, 23, 42, 0.5);
    /* Dark input bg */
    color: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 0 0 4px var(--accent-light);
}

.form-status {
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 12px;
    display: none;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
}

.form-status.success {
    display: block;
    background-color: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.3);
    color: #34d399;
}

/* Footer */
.footer {
    margin-top: 60px;
    padding: 20px 0;
    background: var(--nav-bg);
    /* Match nav bg */
    border-top: 1px solid var(--nav-border);
    text-align: center;
    color: var(--gray-500);
    font-size: 0.9rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.footer p {
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--nav-bg);
        flex-direction: column;
        padding: 24px;
        gap: 24px;
        border-bottom: 1px solid var(--nav-border);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }

    h1 {
        font-size: 2.5rem;
    }

    .role-overview {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 40px 0;
    }
}