:root {
    --bg-dark: #0a0a0f;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --accent-primary: #8b5cf6;
    --accent-secondary: #3b82f6;
    --glass-bg: rgba(30, 41, 59, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --nav-bg: rgba(10, 10, 15, 0.8);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

[data-theme="light"] {
    --bg-dark: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-primary: #7c3aed;
    --accent-secondary: #2563eb;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --nav-bg: rgba(248, 250, 252, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.5;
    border-radius: 50%;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, rgba(139, 92, 246, 0) 70%);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0) 70%);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.1) 0%, rgba(236, 72, 153, 0) 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    transition: color 0.3s ease;
}

/* =========================================
   Split Layout Structure
   ========================================= */

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.split-layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
}

/* =========================================
   Left Panel (Fixed Sidebar)
   ========================================= */

.left-panel {
    width: 40%;
    padding: 4rem 2rem 4rem 4rem;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.left-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.hero-intro {
    margin-bottom: 2rem;
}

.greeting {
    color: var(--accent-secondary);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: block;
}

.name {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 0.8rem;
    font-weight: 800;
}

.title {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
    font-weight: 600;
}

.summary {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 400px;
}

.sidebar-nav {
    margin-top: 3rem;
    flex-grow: 1;
}

.sidebar-nav .nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-line {
    display: inline-block;
    width: 2rem;
    height: 1px;
    background-color: var(--text-secondary);
    margin-right: 1rem;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: var(--text-primary);
}

.sidebar-nav a:hover .nav-line,
.sidebar-nav a.active .nav-line {
    width: 4rem;
    background-color: var(--text-primary);
}

.left-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.contact-links {
    display: flex;
    gap: 1.5rem;
}

.contact-links a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.contact-links a:hover {
    color: var(--text-primary);
}

.theme-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.theme-btn:hover {
    color: var(--accent-primary);
    background: var(--glass-border);
}

.icon-sun,
.icon-moon,
.icon-system {
    transition: transform 0.3s ease;
}

.theme-btn:hover svg {
    transform: scale(1.1);
}

/* =========================================
   Right Panel (Scrolling Content)
   ========================================= */

.right-panel {
    width: 60%;
    padding: 4rem 4rem 4rem 2rem;
}

/* Base Component Styles inside Right Panel */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: var(--font-heading);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    border: none;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    border-color: var(--accent-secondary);
    color: var(--text-primary);
}

.section {
    padding-bottom: 6rem;
}

.mobile-about {
    margin-bottom: 2rem;
}

.section-header {
    display: block;
    /* Removed flex layout for simpler headers */
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-primary);
}

/* The line inside section-header is no longer needed since the header is simpler, but if kept, we hide it or tone it down. */
.section-header .line {
    display: none;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-20px) translateX(-50%);
    }

    60% {
        transform: translateY(-10px) translateX(-50%);
    }
}

.code-window {
    background: #0f111a;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transform: rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.code-window:hover {
    transform: rotateY(0) rotateX(0);
}

.window-header {
    background: #1a1d27;
    padding: 10px 15px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--glass-border);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.code-window pre {
    padding: 1.5rem;
    font-family: 'Consolas', monospace;
    font-size: 0.95rem;
    overflow-x: auto;
    color: #a9b7c6;
}

.keyword {
    color: #cc7832;
}

.variable {
    color: #9876aa;
}

.property {
    color: #e8bf6a;
}

.string {
    color: #6a8759;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--glass-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -2.4rem;
    top: 1.5rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 4px solid var(--bg-dark);
}

.timeline-header {
    margin-bottom: 1rem;
}

.timeline-header h3 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    transition: color 0.3s ease;
}

.company-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
    flex-wrap: wrap;
}

.company-name {
    color: var(--accent-secondary);
    font-weight: 500;
    font-family: var(--font-heading);
}

.company-location {
    color: var(--text-secondary);
    font-size: 0.85rem;
    position: relative;
    padding-left: 0.8rem;
}

.company-location::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--glass-border);
}

.date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.role-group {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
}

.role-group::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 1.5rem;
    bottom: 1.5rem;
    width: 2px;
    background: var(--glass-border);
}

.role-item {
    position: relative;
    padding-left: 2rem;
}

.role-item::before {
    content: '';
    position: absolute;
    left: 1px;
    top: 0.4rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
}

.role-header {
    margin-bottom: 0.8rem;
}

.role-header h4 {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.role-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.5rem;
}

.achievements {
    list-style-type: none;
}

.achievements li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

.achievements li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-primary);
    transition: all 0.2s;
}

.tag:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
}

.tag.small {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    color: var(--accent-secondary);
    border-color: rgba(59, 130, 246, 0.3);
}

.two-col {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 4rem;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-tags {
    margin-bottom: 1rem;
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}

.project-link:hover {
    text-decoration: underline;
}

.education-card {
    margin-bottom: 1.5rem;
}

.education-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.education-card .institution {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
}

.contact-card {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.contact-card h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.contact-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4rem;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1024px) {
    .left-panel {
        width: 45%;
        padding: 4rem 2rem;
    }

    .right-panel {
        width: 55%;
        padding: 4rem 2rem 4rem 1rem;
    }
}

@media (max-width: 900px) {
    .split-layout {
        flex-direction: column;
    }

    .left-panel {
        width: 100%;
        height: auto;
        position: static;
        padding: 4rem 2rem 2rem 2rem;
    }

    .right-panel {
        width: 100%;
        padding: 2rem;
    }

    .sidebar-nav {
        display: none;
        /* Hide internal nav on mobile */
    }

    .left-footer {
        margin-top: 2rem;
    }

    .two-col {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .mobile-about {
        margin-bottom: 4rem;
    }
}