/* ==========================================================================
   Material Design 3 CSS Design System & Theme Tokens
   ========================================================================== */

:root {
    /* Fonts */
    --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-code: 'Courier New', Courier, monospace;

    /* Gemini Advertising / Google AI Studio Glow Gradient */
    --gemini-gradient: linear-gradient(135deg, #1A73E8 0%, #6F42C1 33%, #D946EF 66%, #FF7E40 100%);

    /* Light Theme Palette (Material Design 3 Spec) */
    --md-sys-color-primary: #5856D6;
    --md-sys-color-primary-rgb: 88, 86, 214;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #E0E0FF;
    --md-sys-color-on-primary-container: #100E52;
    
    --md-sys-color-secondary: #006A6A;
    --md-sys-color-on-secondary: #FFFFFF;
    --md-sys-color-secondary-container: #CCEBE9;
    --md-sys-color-on-secondary-container: #002020;
    
    --md-sys-color-tertiary: #B80063;
    --md-sys-color-on-tertiary: #FFFFFF;
    --md-sys-color-tertiary-container: #FFD9E2;
    --md-sys-color-on-tertiary-container: #3E001D;
    
    --md-sys-color-background: #FAF9FD;
    --md-sys-color-on-background: #1B1B22;
    
    --md-sys-color-surface: #FAF9FD;
    --md-sys-color-on-surface: #1B1B22;
    --md-sys-color-surface-variant: #E4E1EC;
    --md-sys-color-on-surface-variant: #47464F;
    
    /* Surface Containers for MD3 Elevation-by-Color */
    --md-sys-color-surface-container-lowest: #FFFFFF;
    --md-sys-color-surface-container-low: #F5F3F9;
    --md-sys-color-surface-container: #F0EDF4;
    --md-sys-color-surface-container-high: #EAE7EE;
    --md-sys-color-surface-container-highest: #E4E1E8;
    
    --md-sys-color-outline: #777680;
    --md-sys-color-outline-variant: #C8C5D0;
    --md-sys-color-outline-variant-rgb: 200, 197, 208;
    
    --md-sys-color-error: #BA1A1A;
    --md-sys-color-on-error: #FFFFFF;
    --md-sys-color-error-container: #FFDAD6;
    --md-sys-color-on-error-container: #410002;
    
    /* Layout Constants */
    --navbar-bg-rgb: 250, 249, 253;
    --glass-blur: 24px;
    --glass-border: rgba(200, 197, 208, 0.4);

    /* Rounded Corners */
    --radius-xs: 4px;
    --radius-s: 8px;
    --radius-m: 12px;
    --radius-l: 16px;
    --radius-xl: 24px;
    --radius-xxl: 28px;
    --radius-full: 9999px;
    
    /* Elevations (Shadow styles) */
    --elevation-1: 0px 1px 3px 1px rgba(0, 0, 0, 0.04), 0px 1px 2px 0px rgba(0, 0, 0, 0.08);
    --elevation-2: 0px 2px 6px 2px rgba(0, 0, 0, 0.04), 0px 1px 2px 0px rgba(0, 0, 0, 0.08);
    --elevation-3: 0px 4px 12px 4px rgba(0, 0, 0, 0.05), 0px 2px 4px 0px rgba(0, 0, 0, 0.08);
    --elevation-4: 0px 8px 24px 8px rgba(0, 0, 0, 0.06), 0px 4px 8px 0px rgba(0, 0, 0, 0.1);
    
    /* Premium Spring Transition curve */
    --transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Code Editor Specific Light Colors */
    --code-editor-bg: #1E1E24;
    --code-editor-on: #D4D4D8;
}

/* ==========================================================================
   Dark Theme Palette
   ========================================================================== */

[data-theme="dark"] {
    --md-sys-color-primary: #BEC2FF;
    --md-sys-color-primary-rgb: 190, 194, 255;
    --md-sys-color-on-primary: #1F218C;
    --md-sys-color-primary-container: #3E41C4;
    --md-sys-color-on-primary-container: #E0E0FF;
    
    --md-sys-color-secondary: #82D3D0;
    --md-sys-color-on-secondary: #003737;
    --md-sys-color-secondary-container: #004F4F;
    --md-sys-color-on-secondary-container: #CCEBE9;
    
    --md-sys-color-tertiary: #FFB2BE;
    --md-sys-color-on-tertiary: #660033;
    --md-sys-color-tertiary-container: #8D0047;
    --md-sys-color-on-tertiary-container: #FFD9E2;
    
    --md-sys-color-background: #0E0D12;
    --md-sys-color-on-background: #E4E1E8;
    
    --md-sys-color-surface: #0E0D12;
    --md-sys-color-on-surface: #E4E1E8;
    --md-sys-color-surface-variant: #47464F;
    --md-sys-color-on-surface-variant: #C8C5D0;
    
    --md-sys-color-surface-container-lowest: #08080C;
    --md-sys-color-surface-container-low: #17161C;
    --md-sys-color-surface-container: #1C1B22;
    --md-sys-color-surface-container-high: #27262E;
    --md-sys-color-surface-container-highest: #32313A;
    
    --md-sys-color-outline: #91909A;
    --md-sys-color-outline-variant: #47464F;
    --md-sys-color-outline-variant-rgb: 71, 70, 79;
    
    --md-sys-color-error: #FFDAD6;
    --md-sys-color-on-error: #690005;
    --md-sys-color-error-container: #93000A;
    --md-sys-color-on-error-container: #FFDAD6;
    
    --navbar-bg-rgb: 14, 13, 18;
    --glass-border: rgba(71, 70, 79, 0.4);
    
    --elevation-1: 0px 1px 3px 1px rgba(0, 0, 0, 0.25), 0px 1px 2px 0px rgba(0, 0, 0, 0.40);
    --elevation-2: 0px 2px 6px 2px rgba(0, 0, 0, 0.25), 0px 1px 2px 0px rgba(0, 0, 0, 0.40);
    --elevation-3: 0px 4px 12px 4px rgba(0, 0, 0, 0.30), 0px 2px 4px 0px rgba(0, 0, 0, 0.40);
    --elevation-4: 0px 8px 24px 8px rgba(0, 0, 0, 0.35), 0px 4px 8px 0px rgba(0, 0, 0, 0.45);
    
    /* Code Editor Specific Dark Colors */
    --code-editor-bg: #0B0A0E;
    --code-editor-on: #E2E2E9;
}

/* ==========================================================================
   Reset & Core Layout Settings
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for floating navbar */
}

body {
    font-family: var(--font-body);
    background-color: var(--md-sys-color-background);
    color: var(--md-sys-color-on-surface);
    line-height: 1.6;
    transition: var(--transition);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--md-sys-color-on-surface);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

/* Ambient glow particles */
.ambient-glow {
    position: absolute;
    border-radius: var(--radius-full);
    filter: blur(140px);
    opacity: 0.35;
    z-index: 1;
    pointer-events: none;
    transition: var(--transition);
}

[data-theme="dark"] .ambient-glow {
    opacity: 0.22;
}

.glow-1 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, var(--md-sys-color-primary) 0%, transparent 80%);
    top: 15%;
    right: -10%;
    animation: drift 25s infinite alternate ease-in-out, pulse-glow 6s infinite alternate ease-in-out;
}

.glow-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--md-sys-color-tertiary) 0%, transparent 85%);
    top: 55%;
    left: -10%;
    animation: drift 20s infinite alternate-reverse ease-in-out, pulse-glow 8s infinite alternate-reverse ease-in-out;
}

.glow-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--md-sys-color-secondary) 0%, transparent 80%);
    bottom: 5%;
    right: 15%;
    animation: drift 28s infinite alternate ease-in-out, pulse-glow 7s infinite alternate ease-in-out;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, -40px) scale(1.1); }
    100% { transform: translate(-30px, 60px) scale(0.9); }
}

@keyframes pulse-glow {
    0% { opacity: 0.25; }
    50% { opacity: 0.45; }
    100% { opacity: 0.25; }
}

/* Interactive Cursor Glow Element */
.cursor-glow {
    position: fixed;
    border-radius: var(--radius-full);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 1;
    top: -1000px;
    left: -1000px;
    mix-blend-mode: normal;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                height 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                background 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.15s ease-out;
}

.primary-glow {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(var(--md-sys-color-primary-rgb), 0.08) 0%, transparent 70%);
}

.secondary-glow {
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(184, 0, 99, 0.05) 0%, transparent 70%); /* Rose-pink trailing tint */
}

[data-theme="dark"] .cursor-glow {
    mix-blend-mode: screen;
}

[data-theme="dark"] .primary-glow {
    background: radial-gradient(circle, rgba(var(--md-sys-color-primary-rgb), 0.12) 0%, transparent 70%);
}

[data-theme="dark"] .secondary-glow {
    background: radial-gradient(circle, rgba(255, 178, 190, 0.08) 0%, transparent 70%);
}

/* Hover expansion states */
.cursor-glow.hovering.primary-glow {
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(var(--md-sys-color-primary-rgb), 0.14) 0%, transparent 70%);
}

.cursor-glow.hovering.secondary-glow {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(255, 178, 190, 0.12) 0%, transparent 70%);
}

/* Click squeeze states */
.cursor-glow.clicking {
    transform: translate(-50%, -50%) scale(0.55);
}

/* Custom Selection Highlight */
::selection {
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--md-sys-color-background);
}
::-webkit-scrollbar-thumb {
    background: var(--md-sys-color-surface-container-high);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--md-sys-color-outline);
}

/* ==========================================================================
   Header & Floating Navigation Bar
   ========================================================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background-color: rgba(var(--navbar-bg-rgb), 0.85);
    backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--elevation-1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 72px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--md-sys-color-primary);
    position: relative;
    display: flex;
    align-items: center;
}

.logo::after {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background-color: var(--md-sys-color-tertiary);
    border-radius: 50%;
    margin-left: 2.5px;
    animation: pulse-dot 2.5s infinite ease-in-out;
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(var(--md-sys-color-primary-rgb), 0.4);
    }
    50% {
        transform: scale(1.35);
        opacity: 0.8;
        box-shadow: 0 0 8px 2px rgba(var(--md-sys-color-primary-rgb), 0.2);
    }
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    font-size: 14px;
    color: var(--md-sys-color-on-surface-variant);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    position: relative;
}

.nav-links a:hover {
    color: var(--md-sys-color-primary);
    background-color: rgba(var(--md-sys-color-primary-rgb), 0.08);
}

/* MD3 Pill Indicator style for active page */
.nav-links a.active {
    color: var(--md-sys-color-primary);
    background-color: var(--md-sys-color-primary-container);
}

.theme-toggle {
    background: var(--md-sys-color-surface-container-high);
    border: none;
    cursor: pointer;
    color: var(--md-sys-color-on-surface);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--elevation-1);
}

.theme-toggle:hover {
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.theme-toggle .material-symbols-outlined {
    font-size: 20px;
    transition: var(--transition);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
    padding: 140px 0 100px 0;
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 64px;
    width: 100%;
}

.hero-content {
    flex: 1;
}

.badge {
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 24px;
    border: 1px solid rgba(var(--md-sys-color-primary-rgb), 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.hero-content h1 {
    font-size: 54px;
    line-height: 1.15;
    margin-bottom: 16px;
    font-weight: 800;
    letter-spacing: -1.5px;
}

.highlight {
    color: var(--md-sys-color-primary);
    background: linear-gradient(120deg, var(--md-sys-color-primary) 0%, var(--md-sys-color-tertiary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content h3 {
    font-size: 22px;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 24px;
    font-weight: 500;
    letter-spacing: -0.2px;
}

.hero-content p {
    margin-bottom: 40px;
    font-size: 17px;
    color: var(--md-sys-color-on-surface-variant);
    max-width: 580px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
}

/* M3 Buttons */
.btn {
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--elevation-1);
}

.btn-primary {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--elevation-3);
    background-color: rgba(var(--md-sys-color-primary-rgb), 0.95);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--elevation-1);
}

.btn-secondary {
    background-color: transparent;
    color: var(--md-sys-color-primary);
    border: 1px solid var(--md-sys-color-outline);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--elevation-2);
    background-color: rgba(var(--md-sys-color-primary-rgb), 0.06);
    border-color: var(--md-sys-color-primary);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Profile Photo Section (DO NOT CHANGE PROFILE OR BACKDROP ANIMATION) */
.hero-image-container {
    position: relative;
    flex: 0 0 340px;
    height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-img {
    width: 320px;
    height: 320px;
    object-fit: cover;
    z-index: 2;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morphing-blob 12s ease-in-out infinite alternate;
    box-shadow: var(--elevation-3);
    border: 4px solid var(--md-sys-color-surface-container-highest);
    transition: border-color 0.5s ease;
}

.profile-img:hover {
    border-color: var(--md-sys-color-primary);
}

.img-backdrop {
    position: absolute;
    width: 330px;
    height: 330px;
    background: linear-gradient(135deg, var(--md-sys-color-primary-container) 0%, var(--md-sys-color-secondary-container) 100%);
    border-radius: 40% 60% 70% 30% / 50% 60% 30% 70%;
    z-index: 1;
    animation: morphing-blob 16s ease-in-out infinite alternate-reverse;
    opacity: 0.75;
}

@keyframes morphing-blob {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

/* ==========================================================================
   Section & Standard Card Styling (With Premium Gradient Outline on Hover)
   ========================================================================== */

.section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-size: 32px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--md-sys-color-primary);
    font-weight: 800;
    letter-spacing: -0.8px;
}

.section-title .material-symbols-outlined {
    font-size: 32px;
    color: var(--md-sys-color-primary);
    background-color: var(--md-sys-color-primary-container);
    padding: 10px;
    border-radius: var(--radius-m);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}

/* Elegant Material Card Styling */
.card {
    background-color: transparent !important;
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-bottom: 16px;
    box-shadow: var(--elevation-1);
    transition: var(--transition);
    border: 1px solid rgba(var(--md-sys-color-outline-variant-rgb), 0.4);
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: inherit;
    background-color: var(--md-sys-color-surface-container-low);
    background-image: linear-gradient(135deg, rgba(var(--md-sys-color-primary-rgb), 0.03) 0%, transparent 100%);
    z-index: -1;
    pointer-events: none;
    transition: var(--transition);
}

/* Specific card background overrides for ::before pseudo-elements */
.about-card::before,
.skill-group-card::before,
.research-paper-card::before,
.contact-form::before {
    background-color: var(--md-sys-color-surface-container-lowest);
}

.timeline-terminal-card::before {
    background-color: var(--code-editor-bg);
}

/* High-tech gradient outline overlay */
.card::after {
    content: '';
    position: absolute;
    top: -1.5px; left: -1.5px; right: -1.5px; bottom: -1.5px;
    border-radius: inherit;
    background: var(--gemini-gradient);
    z-index: -2; /* Render behind ::before to keep the card body opaque */
    opacity: 0;
    transition: opacity 0.4s ease, box-shadow 0.4s ease;
}

.card:hover {
    border-color: transparent;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(155, 114, 203, 0.2), 
                0 5px 15px rgba(66, 133, 244, 0.15), 
                0 20px 40px rgba(217, 101, 112, 0.1);
}

.card:hover::after {
    opacity: 1;
    box-shadow: 0 0 20px rgba(155, 114, 203, 0.4), 
                0 0 40px rgba(66, 133, 244, 0.25), 
                0 0 60px rgba(217, 101, 112, 0.15);
}

/* ==========================================================================
   Refined About Section (JSON Editor + Dev Stats)
   ========================================================================== */

.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 36px;
    align-items: start;
}

.about-card {
    font-size: 16.5px;
    line-height: 1.8;
    color: var(--md-sys-color-on-surface-variant);
    border-left: 5px solid var(--md-sys-color-primary);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    margin-bottom: 0;
    background-color: var(--md-sys-color-surface-container-lowest);
}

.stat-item h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--md-sys-color-on-surface-variant);
}

.stat-item p {
    font-size: 14px;
    font-weight: 700;
    color: var(--md-sys-color-primary);
}

.stat-icon {
    font-size: 24px;
    color: var(--md-sys-color-primary);
    background-color: rgba(var(--md-sys-color-primary-rgb), 0.08);
    padding: 8px;
    border-radius: var(--radius-m);
}

/* Code Editor Window */
.code-editor {
    background-color: var(--code-editor-bg);
    color: var(--code-editor-on);
    padding: 0;
    border: 1px solid var(--md-sys-color-outline-variant);
    box-shadow: var(--elevation-2);
}

.editor-header {
    height: 40px;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    padding: 0 16px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.editor-dots {
    display: flex;
    gap: 8px;
}

.editor-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.dot-red { background-color: #FF5F56; }
.dot-yellow { background-color: #FFBD2E; }
.dot-green { background-color: #27C93F; }

.editor-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    color: var(--md-sys-color-outline);
}

.editor-body {
    padding: 24px;
    overflow-x: auto;
}

.editor-body pre {
    margin: 0;
}

.editor-body code {
    font-family: var(--font-code);
    font-size: 14.5px;
    line-height: 1.6;
}

/* Blinking live terminal cursor details */
.terminal-cursor {
    font-weight: 700;
    color: var(--md-sys-color-primary);
    animation: blink-cursor 1s step-end infinite;
    display: inline-block;
    margin-left: 2px;
}

@keyframes blink-cursor {
    from, to { opacity: 0; }
    50% { opacity: 1; }
}

/* Syntax Token Colors (Visual Studio-like) */
.token.brace { color: #FFD700; font-weight: 700; }
.token.property { color: #9CDCFE; }
.token.string { color: #CE9178; }
.token.bracket { color: #DA70D6; font-weight: 700; }
.token.keyword { color: #C586C0; }

/* ==========================================================================
   Education & Git Log Terminal Timeline
   ========================================================================== */

.timeline {
    position: relative;
    border-left: 2px solid var(--md-sys-color-surface-container-highest);
    padding-left: 32px;
    margin-left: 16px;
}

/* Branch connector branch visuals */
.timeline::before {
    content: '';
    position: absolute;
    top: 42px;
    bottom: 42px;
    left: -2px;
    width: 2px;
    background: linear-gradient(to bottom, var(--md-sys-color-primary) 0%, var(--md-sys-color-tertiary) 100%);
}

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

.timeline-item:last-child {
    margin-bottom: 0;
}

/* Git Commit Node circle style */
.timeline-dot {
    position: absolute;
    left: -42px;
    top: 42px; /* Centered with the commit hash log line */
    width: 18px;
    height: 18px;
    background-color: var(--md-sys-color-background);
    border: 4px solid var(--md-sys-color-primary);
    border-radius: var(--radius-full);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.timeline-dot .dot-inner {
    width: 6px;
    height: 6px;
    background-color: var(--md-sys-color-tertiary);
    border-radius: var(--radius-full);
    display: inline-block;
    transition: var(--transition);
}

.timeline-item:hover .timeline-dot {
    background-color: var(--md-sys-color-background);
    box-shadow: 0 0 0 10px rgba(var(--md-sys-color-primary-rgb), 0.15);
    border-color: var(--md-sys-color-tertiary);
    transform: scale(1.15);
}

.timeline-item:hover .timeline-dot .dot-inner {
    background-color: var(--md-sys-color-tertiary);
    transform: scale(1.2);
}

/* Terminal style log card */
.timeline-terminal-card {
    background-color: var(--code-editor-bg);
    color: var(--code-editor-on);
    padding: 0 !important;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(var(--md-sys-color-outline-variant-rgb), 0.2);
    box-shadow: var(--elevation-2);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    z-index: 2;
}



.terminal-header {
    height: 38px;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    padding: 0 16px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-code);
    font-size: 11px;
    color: var(--md-sys-color-outline);
}

.terminal-body {
    padding: 20px 24px;
}

.git-log-meta {
    font-family: var(--font-code);
    font-size: 13.5px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.git-log-meta p {
    margin-bottom: 2px;
}

.git-log-meta p:last-child {
    margin-bottom: 0;
}

/* Git Log tokens colors */
.log-keyword {
    color: #E5C07B;
    font-weight: 700;
}

.log-hash {
    color: #98C379;
    font-weight: 700;
}

.log-label {
    color: var(--md-sys-color-outline);
}

.git-log-message {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 16px;
}

.git-log-message h3 {
    font-size: 17.5px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 4px;
}

.git-log-message .institution {
    font-family: var(--font-body);
    font-size: 14.5px;
    color: #ABB2BF;
    font-style: oblique;
    font-weight: 500;
}

/* ==========================================================================
   Modernized Technical Skills Section Layout
   ========================================================================== */

.skills-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 32px;
}

.skills-categories {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.skill-group-card {
    background-color: var(--md-sys-color-surface-container-lowest);
    margin-bottom: 0 !important;
}

.group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--md-sys-color-surface-container-high);
    padding-bottom: 12px;
}

.group-icon {
    font-size: 24px;
    color: var(--md-sys-color-primary);
    background-color: var(--md-sys-color-primary-container);
    padding: 8px;
    border-radius: var(--radius-m);
}

.group-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
}

.skill-prog-wrapper {
    margin-bottom: 20px;
}

.skill-prog-wrapper:last-child {
    margin-bottom: 0;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}

.skill-info span:first-child {
    color: var(--md-sys-color-on-surface);
}

.skill-info span:last-child {
    color: var(--md-sys-color-primary);
}

.progress-bar {
    background-color: var(--md-sys-color-surface-container-high);
    height: 8px;
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

/* Glowing progress indicators */
.progress {
    background: linear-gradient(90deg, var(--md-sys-color-primary) 0%, var(--md-sys-color-tertiary) 100%);
    box-shadow: 0 0 8px rgba(var(--md-sys-color-primary-rgb), 0.5);
    height: 100%;
    border-radius: var(--radius-full);
    width: 0;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Data Science frameworks right panel details */
.frameworks-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--md-sys-color-surface-container-low);
}

.frameworks-desc {
    font-size: 14.5px;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.6;
    margin-bottom: 28px;
}

.library-subsection {
    margin-bottom: 24px;
}

.library-subsection:last-child {
    margin-bottom: 0;
}

.library-subsection h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 12px;
    font-weight: 700;
    border-left: 3px solid var(--md-sys-color-primary);
    padding-left: 8px;
}

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    background-color: var(--md-sys-color-surface-container-lowest);
    color: var(--md-sys-color-on-surface);
    padding: 8px 14px;
    border-radius: var(--radius-m);
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid rgba(var(--md-sys-color-outline-variant-rgb), 0.4);
    cursor: default;
}

/* Specific colored chip accents on hover */
.chip[data-category="manipulation"]:hover {
    background-color: rgba(255, 126, 64, 0.08);
    color: #FF7E40;
    border-color: #FF7E40;
    box-shadow: 0 4px 10px rgba(255, 126, 64, 0.15);
    transform: translateY(-2px);
}

.chip[data-category="visuals"]:hover {
    background-color: rgba(184, 0, 99, 0.08);
    color: var(--md-sys-color-tertiary);
    border-color: var(--md-sys-color-tertiary);
    box-shadow: 0 4px 10px rgba(184, 0, 99, 0.1);
    transform: translateY(-2px);
}

.chip[data-category="ml"]:hover {
    background-color: rgba(88, 86, 214, 0.08);
    color: var(--md-sys-color-primary);
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 4px 10px rgba(88, 86, 214, 0.1);
    transform: translateY(-2px);
}

/* ==========================================================================
   Projects Section (VS Code Document Tab + Slide-Up Simulated Console)
   ========================================================================== */

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 48px 32px 32px 32px; /* Top padding expanded to accommodate tabs */
    position: relative;
    overflow: hidden;
}

/* Mock IDE Tab styled header */
.ide-tab {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 36px;
    background-color: rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid rgba(var(--md-sys-color-outline-variant-rgb), 0.4);
}

[data-theme="dark"] .ide-tab {
    background-color: rgba(0, 0, 0, 0.25);
}

.tab-icon {
    font-size: 15px !important;
    color: var(--md-sys-color-primary);
    margin-right: 6px;
}

.tab-name {
    font-family: var(--font-code);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface-variant);
    flex-grow: 1;
}

.tab-close {
    font-size: 14px !important;
    color: var(--md-sys-color-outline);
    cursor: pointer;
    transition: var(--transition);
}

.tab-close:hover {
    color: var(--md-sys-color-error);
}

.project-card p {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 15px;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 16px;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.proj-icon {
    color: var(--md-sys-color-primary);
    font-size: 28px;
    background-color: var(--md-sys-color-primary-container);
    padding: 8px;
    border-radius: var(--radius-m);
}

.project-tag {
    font-size: 12px;
    font-weight: 700;
    color: var(--md-sys-color-secondary);
    background-color: var(--md-sys-color-secondary-container);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.project-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

/* Card Console Drawer slide-up overlay */
.card-console {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #0E0D12;
    padding: 20px 24px;
    border-top: 1px solid var(--md-sys-color-primary);
    transform: translateY(101%);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 5;
}

/* Live CRT TV Monitor overlay effects on hover */
.card-console::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.04), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.04));
    z-index: 6;
    background-size: 100% 2.5px, 3px 100%;
    pointer-events: none;
    opacity: 0.8;
}

.project-card:hover .card-console {
    transform: translateY(0);
}

.console-output {
    font-family: var(--font-code);
    font-size: 12.5px;
    line-height: 1.65;
}

.console-line {
    margin-bottom: 4px;
}

.console-line:last-child {
    margin-bottom: 0;
}

.console-line.command {
    color: #D4D4D8;
}

.console-line.system {
    color: #71717A;
}

.console-line.success {
    color: #4ADE80;
    font-weight: 700;
}

/* ==========================================================================
   Modernized Research Publications Section (Academic Papers style)
   ========================================================================== */

.research-paper-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--md-sys-color-surface-container-lowest);
    border: 1.5px solid rgba(var(--md-sys-color-outline-variant-rgb), 0.4);
    border-radius: var(--radius-xl);
    padding: 32px;
    transition: var(--transition);
    position: relative;
    z-index: 2;
}



.paper-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.paper-tag-name {
    font-family: var(--font-code);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--md-sys-color-secondary);
    background-color: var(--md-sys-color-secondary-container);
    padding: 4px 10px;
    border-radius: var(--radius-s);
}

.research-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--md-sys-color-on-surface-variant);
    background-color: var(--md-sys-color-surface-container-low);
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

/* Pulsating status markers */
.dot-pulse {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    display: inline-block;
}

.dot-pulse.yellow {
    background-color: #E28900;
    box-shadow: 0 0 0 0 rgba(226, 137, 0, 0.4);
    animation: pulse 1.6s infinite ease-in-out;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(226, 137, 0, 0.6); }
    70% { box-shadow: 0 0 0 8px rgba(226, 137, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(226, 137, 0, 0); }
}

.research-paper-card h3 {
    font-size: 20px;
    line-height: 1.35;
    margin-bottom: 12px;
    color: var(--md-sys-color-on-surface);
}

.paper-abstract {
    font-size: 14.5px;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.65;
    margin-bottom: 24px;
}

/* Bullet list contributions block */
.paper-contributions {
    background-color: var(--md-sys-color-surface-container-low);
    padding: 20px;
    border-radius: var(--radius-m);
    margin-bottom: 24px;
    border: 1px solid rgba(var(--md-sys-color-outline-variant-rgb), 0.3);
}

.paper-contributions h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--md-sys-color-primary);
    margin-bottom: 12px;
    font-weight: 700;
}

.paper-contributions ul {
    list-style: none;
    padding-left: 0;
}

.paper-contributions li {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--md-sys-color-on-surface-variant);
    position: relative;
    padding-left: 18px;
    margin-bottom: 8px;
}

.paper-contributions li:last-child {
    margin-bottom: 0;
}

.paper-contributions li::before {
    content: "▫";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--md-sys-color-secondary);
    font-weight: 900;
}

/* Paper card footer details */
.paper-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(var(--md-sys-color-outline-variant-rgb), 0.3);
    padding-top: 16px;
    margin-top: auto;
    flex-wrap: wrap;
    gap: 12px;
}

.academic-meta {
    display: flex;
    align-items: center;
}

.meta-tag {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface-variant);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meta-tag .material-symbols-outlined {
    font-size: 16px;
    color: var(--md-sys-color-secondary);
}

.method-stack {
    display: none; /* Removed methodology tags at user request */
}

/* Research Call To Action Button Container */
.research-cta-container {
    display: flex;
    justify-content: center;
    margin-top: 48px;
    position: relative;
    z-index: 10;
}

.research-cta-btn {
    padding: 16px 32px;
    font-size: 16px;
    border: none;
    box-shadow: 0 4px 15px rgba(var(--md-sys-color-primary-rgb), 0.2);
}

.research-cta-btn:hover {
    box-shadow: 0 8px 25px rgba(var(--md-sys-color-primary-rgb), 0.45);
    transform: translateY(-3px);
}

.research-cta-btn:active {
    transform: translateY(0);
}

/* ==========================================================================
   Contact Section & Interactive SVG Icons
   ========================================================================== */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 32px;
}

.contact-info-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.contact-info-card h3, .social-links-card h3 {
    font-size: 22px;
    margin-bottom: 24px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.contact-item .material-symbols-outlined {
    font-size: 24px;
    color: var(--md-sys-color-primary);
    background-color: var(--md-sys-color-primary-container);
    padding: 12px;
    border-radius: var(--radius-m);
}

.contact-item p {
    font-weight: 600;
    font-size: 15px;
}

.contact-item a:hover {
    color: var(--md-sys-color-primary);
}

.social-icons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

/* SVG Social Buttons */
.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface-variant);
    border: 1px solid rgba(var(--md-sys-color-outline-variant-rgb), 0.3);
    padding: 12px 16px;
    border-radius: var(--radius-m);
    font-weight: 600;
    font-size: 13.5px;
    transition: var(--transition);
}

.social-btn svg {
    transition: fill 0.3s ease, transform 0.3s ease;
    fill: var(--md-sys-color-on-surface-variant);
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--elevation-2);
    color: #FFFFFF !important;
}

.social-btn:hover svg {
    fill: #FFFFFF !important;
    transform: scale(1.1);
}

/* GitHub Color Customizations */
.social-btn.github:hover {
    background-color: #24292E;
    border-color: #24292E;
    box-shadow: 0 4px 15px rgba(36, 41, 46, 0.4);
}

/* LinkedIn Color Customizations */
.social-btn.linkedin:hover {
    background-color: #0077B5;
    border-color: #0077B5;
    box-shadow: 0 4px 15px rgba(0, 119, 181, 0.4);
}

/* X (Twitter) Color Customizations */
.social-btn.x-twitter:hover {
    background-color: #0F1419;
    border-color: #0F1419;
    box-shadow: 0 4px 15px rgba(15, 20, 25, 0.4);
}

/* Facebook Color Customizations */
.social-btn.facebook:hover {
    background-color: #1877F2;
    border-color: #1877F2;
    box-shadow: 0 4px 15px rgba(24, 119, 242, 0.4);
}

/* Instagram Color Customizations */
.social-btn.instagram:hover {
    background: linear-gradient(45deg, #F09433 0%, #E6683C 25%, #DC2743 50%, #CC2366 75%, #BC1888 100%);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(220, 39, 67, 0.4);
}

/* Reddit Color Customizations */
.social-btn.reddit:hover {
    background-color: #FF4500;
    border-color: #FF4500;
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.4);
}

/* M3 Outlined Form Styles */
.contact-form {
    background-color: var(--md-sys-color-surface-container-lowest);
}

.contact-form h3 {
    font-size: 22px;
    margin-bottom: 28px;
}

.form-group {
    position: relative;
    margin-bottom: 24px;
}

.form-input {
    width: 100%;
    padding: 16px;
    font-family: var(--font-body);
    font-size: 15px;
    border: 1.5px solid var(--md-sys-color-outline-variant);
    border-radius: var(--radius-m);
    background-color: transparent;
    color: var(--md-sys-color-on-surface);
    outline: none;
    transition: var(--transition);
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
}

.form-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: var(--md-sys-color-on-surface-variant);
    pointer-events: none;
    transition: var(--transition);
    background-color: transparent;
    padding: 0 4px;
    border-radius: var(--radius-xs);
}

textarea ~ .form-label {
    top: 24px;
    transform: none;
}

.form-input:focus {
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 1px var(--md-sys-color-primary);
}

.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
    top: 0;
    transform: translateY(-50%) scale(0.85);
    color: var(--md-sys-color-primary);
    font-weight: 600;
    background-color: var(--md-sys-color-surface-container-lowest);
}

.contact-form .btn {
    width: 100%;
    justify-content: center;
    border: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.main-footer {
    text-align: center;
    padding: 48px 24px;
    background-color: var(--md-sys-color-surface-container-low);
    font-size: 14px;
    color: var(--md-sys-color-on-surface-variant);
    margin-top: 80px;
    border-top: 1px solid var(--md-sys-color-surface-container-high);
}

.main-footer p {
    font-weight: 500;
}

/* ==========================================================================
   Scroll-Reveal Animations CSS Definition
   ========================================================================== */

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.active-scroll {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Responsive & Adaptive Layouts
   ========================================================================== */

@media (max-width: 992px) {
    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 40px;
    }
    
    .hero-content h1 {
        font-size: 42px;
    }
    
    .hero-content p {
        margin: 0 auto 32px auto;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .skills-layout {
        grid-template-columns: 1fr;
    }
    
    .skills-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline {
        padding-left: 24px;
        margin-left: 8px;
    }
    
    .timeline-dot {
        left: -34px;
    }
}

@media (max-width: 768px) {
    .navbar {
        background-color: rgba(var(--navbar-bg-rgb), 0.85);
        backdrop-filter: blur(var(--glass-blur));
        border-bottom: 1px solid var(--glass-border);
        box-shadow: var(--elevation-1);
    }
    
    .nav-links {
        display: none;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 26px;
    }
    
    .hero-image-container {
        flex: 0 0 260px;
        height: 260px;
    }
    
    .profile-img {
        width: 240px;
        height: 240px;
    }
    
    .img-backdrop {
        width: 250px;
        height: 250px;
    }
}

/* Loading Spinner Keyframes */
.rotating {
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}