/* ============================================
   Naman Taneja - Portfolio Website
   Master Stylesheet (Verified & Consolidated)
   ============================================ */

/* ------------------------------------------------------------------
   1. VARIABLES & THEME
   ------------------------------------------------------------------ */
:root {
    --primary-blue: #2563eb;
    --primary-blue-dark: #1e40af;
    --primary-blue-light: #3b82f6;
    --accent-orange: #FF6B35;

    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-gray: #f1f5f9;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #5a6575;
    --text-inverse: #ffffff;

    --success-green: #22C55E;
    --error-red: #EF4444;

    --border-light: #e2e8f0;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);

    --font-primary: 'Open Sans', sans-serif;
    --font-display: 'Poppins', sans-serif;

    --section-padding: 100px 0;
    --container-width: 1200px;

    /* Motion System - Unified Transitions */
    --ease-standard: cubic-bezier(0.4, 0.0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0.0, 0.6, 1);
    --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --duration-fast: 150ms;
    --duration-mid: 250ms;
    --duration-slow: 400ms;
}

[data-theme="dark"] {
    --bg-white: #0f172a;
    /* Slate 900 */
    --bg-light: #1e293b;
    /* Slate 800 */
    --bg-gray: #334155;
    /* Slate 700 */
    --text-primary: #f1f5f9;
    /* Slate 100 */
    --text-secondary: #cbd5e1;
    /* Slate 300 */
    --text-muted: #94a3b8;
    /* Slate 400 */
    --border-light: #334155;
    --primary-blue: #3b82f6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
}

/* ------------------------------------------------------------------
   2. RESET & BASE STYLES
   ------------------------------------------------------------------ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    transition: background-color var(--duration-mid) var(--ease-standard);
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    background-color: var(--bg-white);
    line-height: 1.7;
    padding-top: 80px;
    /* Header height */
    overflow-x: hidden;
    max-width: 100vw;
    position: relative;
}

/* Styled scrollbars for supported browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--duration-fast) var(--ease-standard);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Skip to main content - Accessibility */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    z-index: 9999;
    padding: 12px 20px;
    background: var(--primary-blue);
    color: white;
    font-weight: 600;
    border-radius: 0 0 8px 0;
    transition: top var(--duration-mid) var(--ease-standard);
}

.skip-to-content:focus {
    top: 0;
    outline: 3px solid var(--accent-orange);
    outline-offset: 2px;
}

/* Screen Reader Only - Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    overflow-x: hidden;
}

.section {
    padding: var(--section-padding);
    position: relative;
    z-index: 1;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ------------------------------------------------------------------
   3. COMPONENTS (Buttons, Cards, Etc.)
   ------------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-standard);
    border: 2px solid transparent;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-ghost {
    border-color: var(--border-light);
    color: var(--text-secondary);
    background: transparent;
}

.btn-ghost:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: var(--bg-light);
    transform: translateY(-2px);
}

/* Button Loading State */
.btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bx-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Focus States - Accessibility (High-contrast ring for both Light/Dark modes) */
.btn:focus-visible,
.nav-link:focus-visible,
.social-link:focus-visible,
.social-button:focus-visible,
.theme-toggle:focus-visible,
.menu-toggle:focus-visible,
.copy-email:focus-visible,
.footer-socials a:focus-visible,
.chat-toggle:focus-visible,
.chat-send:focus-visible,
.prompt-chip:focus-visible,
.filter-btn:focus-visible {
    outline: 3px solid var(--accent-orange);
    outline-offset: 2px;
    box-shadow:
        0 0 0 2px var(--bg-white),
        0 0 0 5px var(--text-primary);
}

.project-card:focus-within,
.blog-card:focus-within,
.skill-card:focus-within {
    border-color: var(--primary-blue);
    box-shadow:
        0 0 0 2px var(--bg-white),
        0 0 0 5px var(--primary-blue);
}

/* ------------------------------------------------------------------
   4. HEADER & NAVIGATION
   ------------------------------------------------------------------ */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
    transition: all var(--duration-mid) var(--ease-standard);
}

[data-theme="dark"] .header {
    background: rgba(15, 23, 42, 0.9);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.nav-logo:hover {
    color: var(--primary-blue-dark);
}

.nav {
    display: flex;
    align-items: center;
}

.nav-link {
    margin: 0 15px;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 4px 0;
    transition: color var(--duration-fast) var(--ease-standard);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-blue);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: width var(--duration-mid) var(--ease-standard);
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-primary);
    padding: 8px;
    border-radius: 50%;
    display: flex;
    transition: all var(--duration-fast) var(--ease-standard);
}

.theme-toggle:hover {
    background: var(--bg-light);
    color: var(--primary-blue);
    transform: rotate(15deg);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.75rem;
    color: var(--text-primary);
    z-index: 1100;
    padding: 8px;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: all var(--duration-mid) var(--ease-standard);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    left: 0;
    transition: all var(--duration-mid) var(--ease-standard);
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    bottom: -7px;
}

.menu-toggle.active .hamburger {
    background: transparent;
}

.menu-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* ------------------------------------------------------------------
   5. HERO SECTION
   ------------------------------------------------------------------ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--bg-white);
    position: relative;
    overflow: hidden;
    padding-top: 100px;
    padding-bottom: 80px;
}

#heroCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-greeting {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 500;
    animation: fadeInUp 0.6s ease-out;
}

.hero-label {
    display: inline-block;
    background: var(--bg-gray);
    color: var(--primary-blue);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--text-primary);
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

.hero-description strong {
    color: var(--text-primary);
    font-weight: 600;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease-out 0.4s backwards;
}

.metric-card {
    background: var(--bg-light);
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-light);
    transition: all var(--duration-fast) var(--ease-standard);
}

.metric-card:hover {
    border-color: var(--primary-blue);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.metric-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    display: block;
    margin-bottom: 8px;
    line-height: 1;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.hero-cta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease-out 0.5s backwards;
}

.hero-social {
    display: flex;
    gap: 16px;
    animation: fadeInUp 0.6s ease-out 0.6s backwards;
}

.social-link {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all var(--duration-fast) var(--ease-standard);
}

.social-link:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-4px);
}

.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image {
    width: 350px;
    height: 350px;
    object-fit: cover;
    border-radius: 50%;
    border: 8px solid var(--bg-white);
    box-shadow: var(--shadow-xl);
    z-index: 2;
    position: relative;
}

.hero-image-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.2), transparent 70%);
    border-radius: 50%;
    animation: pulse 4s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* ------------------------------------------------------------------
   6. ABOUT SECTION
   ------------------------------------------------------------------ */
.about {
    background: var(--bg-light);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.about-text strong {
    color: var(--text-primary);
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 40px 0;
}

.highlight-card {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.highlight-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    margin: 0 auto 20px;
}

.highlight-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.highlight-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.tech-stack-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tech-badge-pro {
    background: var(--bg-white);
    color: var(--primary-blue);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    border: 2px solid var(--border-light);
    transition: all var(--duration-fast) var(--ease-standard);
    cursor: pointer;
}

.tech-badge-pro:hover {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
}

.about-meta {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}

.meta-item i {
    font-size: 1.25rem;
    color: var(--primary-blue);
}

/* Read More Button */
.read-more-btn {
    display: none;
    margin: 16px 0 24px;
    padding: 10px 20px;
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--duration-mid) var(--ease-standard);
    align-items: center;
    gap: 6px;
}

.read-more-btn:hover {
    background: var(--primary-blue);
    color: white;
}

.read-more-btn.show {
    display: inline-flex;
}

/* ------------------------------------------------------------------
   7. EXPERIENCE SECTION
   ------------------------------------------------------------------ */
.experience {
    background: var(--bg-white);
}

.experience-timeline {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.experience-card {
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 32px;
    display: flex;
    gap: 24px;
    transition: all var(--duration-mid) var(--ease-standard);
}

.experience-card:hover {
    border-color: var(--primary-blue);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.experience-logo {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.company-logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
}

.timeline-line {
    width: 2px;
    flex: 1;
    background: linear-gradient(to bottom, var(--primary-blue), transparent);
    min-height: 40px;
}

.experience-content {
    flex: 1;
}

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

.company-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.current-badge {
    background: var(--accent-orange);
    color: white;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.job-title {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.duration {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.experience-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.achievement-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.achievement-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-green);
    font-weight: bold;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    background: var(--bg-light);
    color: var(--primary-blue);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--border-light);
}

/* ------------------------------------------------------------------
   8. CAPABILITIES (SKILLS & EDUCATION)
   ------------------------------------------------------------------ */
.skills {
    background: var(--bg-light);
}

.skills-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 48px;
    align-items: start;
}

/* Education Side */
.education {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.education-item {
    background: var(--bg-white);
    padding: 24px;
    border-radius: 12px;
    border: 2px solid var(--border-light);
    display: flex;
    gap: 16px;
    transition: all var(--duration-fast) var(--ease-standard);
    box-shadow: var(--shadow-sm);
}

.education-item:hover {
    border-color: var(--primary-blue);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.edu-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.edu-info {
    flex: 1;
}

.edu-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.edu-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Skills Grid Side */
.skills-grid-wrapper {
    position: relative;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.skill-card {
    background: var(--bg-white);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    text-align: center;
    transition: all var(--duration-fast) var(--ease-standard);
    display: none;
    /* Hidden by default for pagination */
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.skill-card.active {
    display: flex;
    animation: fadeIn 0.4s ease-out;
}

.skill-card:hover {
    border-color: var(--primary-blue);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.skill-icon {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 5px;
}

.skill-name {
    font-weight: 600;
    color: var(--text-primary);
}

.skill-level {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: auto;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-light);
}

.dot.filled {
    background: var(--primary-blue);
}

/* Skills Filter */
.skills-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.filter-btn {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    padding: 8px 24px;
    border-radius: 20px;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-standard);
    font-size: 0.95rem;
}

.filter-btn:hover {
    background: var(--bg-light);
    color: var(--primary-blue);
    border-color: var(--primary-blue-light);
}

.filter-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-md);
}

/* Skills Grid (Filtered) */
.skills-grid {
    transition: opacity var(--duration-mid) var(--ease-standard);
}

.skill-card {
    background: var(--bg-white);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    text-align: center;
    transition: all var(--duration-fast) var(--ease-standard);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: fadeIn var(--duration-slow) var(--ease-out) backwards;
}

.skill-card.active {
    display: flex;
}

/* ------------------------------------------------------------------
   9. PROJECTS SECTION
   ------------------------------------------------------------------ */
.projects {
    background: var(--bg-white);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--duration-mid) var(--ease-standard);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-blue);
}

.project-visual {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.9);
    transition: transform var(--duration-mid) var(--ease-standard);
}

.project-card:hover .project-icon {
    transform: scale(1.15) rotate(5deg);
}


.energy-theme {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.pharma-theme {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
}

.ai-theme {
    background: linear-gradient(135deg, #4f46e5 0%, #818cf8 100%);
}

.project-content {
    padding: 28px 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.project-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex: 1;
    line-height: 1.6;
}



.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.project-tech span {
    font-size: 0.75rem;
    background: var(--bg-light);
    color: var(--primary-blue);
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.project-links {
    margin-top: auto;
    border-top: 1px solid var(--border-light);
    padding-top: 15px;
}

.link-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.link-item:hover {
    color: var(--primary-blue);
}

.link-item.disabled {
    color: var(--text-muted);
    cursor: default;
}

/* ------------------------------------------------------------------
   10. BLOG SECTION
   ------------------------------------------------------------------ */
.blog {
    background: var(--bg-white);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.blog-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--duration-mid) var(--ease-standard);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-blue);
}

.blog-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg-gray);
    overflow: hidden;
}

.blog-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-mid) var(--ease-standard);
}

.blog-card:hover .blog-thumbnail img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.blog-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.blog-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    flex: 1;
}

.blog-link {
    color: var(--primary-blue);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.blog-cta {
    text-align: center;
    margin-top: 40px;
}

/* ------------------------------------------------------------------
   11. CONTACT SECTION
   ------------------------------------------------------------------ */
.contact {
    background: var(--bg-light);
}

.contact-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-form-wrapper {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 14px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-white);
    color: var(--text-primary);
    transition: all var(--duration-fast) var(--ease-standard);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.contact-form .btn {
    margin-top: 8px;
}

.contact-info-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.response-time {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 28px;
    font-style: italic;
}

.contact-socials {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.social-button {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all var(--duration-mid) var(--ease-standard);
    box-shadow: var(--shadow-sm);
}

.social-button:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-lg);
}

.social-button.schedule {
    border-color: #6366f1;
    color: #6366f1;
}

.social-button.schedule:hover {
    background: #6366f1;
    color: white;
}

.social-button.linkedin {
    border-color: #0A66C2;
}

.social-button.linkedin:hover {
    background: #0A66C2;
    color: white;
}

.social-button.medium {
    border-color: #00AB6C;
}

.social-button.medium:hover {
    background: #00AB6C;
    color: white;
}

.social-button.twitter {
    border-color: #000000;
}

.social-button.twitter:hover {
    background: #000000;
    color: white;
}

.contact-details {
    background: var(--bg-white);
    padding: 24px;
    border-radius: 12px;
    border: 2px solid var(--border-light);
}

.email-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.email-link {
    flex: 1;
    font-weight: 500;
    word-break: break-all;
}

.copy-email {
    width: 44px;
    height: 44px;
    border: 2px solid var(--primary-blue);
    background: var(--bg-white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--duration-mid) var(--ease-standard);
    font-size: 1.1rem;
    color: var(--primary-blue);
    flex-shrink: 0;
}

.copy-email:hover {
    background: var(--primary-blue);
    color: white;
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* ------------------------------------------------------------------
   12. FOOTER
   ------------------------------------------------------------------ */
.footer {
    background: var(--bg-white);
    padding: 80px 0 40px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

[data-theme="dark"] .footer {
    background: #0b1120;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: inline-block;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 300px;
    margin: 0 auto 32px;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 48px;
}

.footer-socials a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: all var(--duration-mid) var(--ease-standard);
}

.footer-socials a:hover {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
    color: white;
    transform: translateY(-5px);
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.heart {
    color: var(--accent-orange);
    display: inline-block;
    animation: heartBeat 1.5s infinite;
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    14% {
        transform: scale(1.1);
    }

    28% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.1);
    }

    70% {
        transform: scale(1);
    }
}

/* ------------------------------------------------------------------
   13. UTILITIES & WIDGETS (Chat, Back to Top)
   ------------------------------------------------------------------ */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: var(--primary-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--duration-mid) var(--ease-standard);
    opacity: 0;
    pointer-events: none;
    z-index: 999;
    border: none;
    box-shadow: var(--shadow-lg);
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

.back-to-top:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-4px);
}

/* Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 24px;
    right: 90px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chat-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    transition: transform var(--duration-mid) var(--ease-standard);
    position: relative;
}

.chat-toggle:hover {
    transform: scale(1.1);
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--error-red);
    color: white;
    font-size: 0.75rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-white);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-5px);
    }

    60% {
        transform: translateY(-3px);
    }
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transform: scale(0);
    opacity: 0;
    transition: all var(--duration-mid) var(--ease-bounce);
    visibility: hidden;
}

.chat-window.active {
    transform: scale(1);
    opacity: 1;
    visibility: visible;
}

.chat-header {
    background: var(--gradient-primary);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-title h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.status-indicator {
    font-size: 0.75rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-indicator::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #4ade80;
    border-radius: 50%;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.8;
}

.chat-close:hover {
    opacity: 1;
}

.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--bg-light);
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.message.bot {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
}

.message-content {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.95rem;
}

.message.bot .message-content {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-top-left-radius: 2px;
}

.message.user .message-content {
    background: var(--primary-blue);
    color: white;
    border-top-right-radius: 2px;
}

.message-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
    padding: 0 4px;
}

.chat-input-area {
    padding: 12px;
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 8px;
}

#chatInput {
    flex: 1;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 10px 16px;
    background: var(--bg-light);
    color: var(--text-primary);
    outline: none;
}

#chatInput:focus {
    border-color: var(--primary-blue);
    background: var(--bg-white);
}

.chat-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-fast) var(--ease-standard);
}

.chat-send:hover {
    background: var(--primary-blue-dark);
    transform: scale(1.05);
}

/* Chat Prompts */
.chat-prompts {
    padding: 8px 12px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    border-top: 1px solid var(--border-light);
    background: var(--bg-gray);
    -webkit-overflow-scrolling: touch;
}

.chat-prompts::-webkit-scrollbar {
    height: 4px;
}

.chat-prompts::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

.prompt-chip {
    background: var(--bg-white);
    border: 1px solid var(--primary-blue-light);
    color: var(--primary-blue);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-standard);
    white-space: nowrap;
}

.prompt-chip:hover {
    background: var(--primary-blue);
    color: white;
}

/* Chat Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px;
    background: var(--bg-white);
    border-radius: 12px;
    width: fit-content;
    border: 1px solid var(--border-light);
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0s;
}

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}



/* ------------------------------------------------------------------
   14. MOBILE RESPONSIVE OVERRIDES
   ------------------------------------------------------------------ */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-greeting {
        font-size: 1.25rem;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-image-wrapper {
        width: 320px;
        height: 320px;
    }

    .hero-image {
        width: 290px;
        height: 290px;
    }
}

@media (max-width: 768px) {
    .header .container {
        padding: 0 20px;
    }

    /* Full Screen Mobile Menu */
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right var(--duration-slow) var(--ease-bounce);
        z-index: 1050;
        padding: 40px;
    }

    [data-theme="dark"] .nav {
        background: rgba(15, 23, 42, 0.98);
    }

    .nav.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.75rem;
        margin: 15px 0;
        width: auto;
        text-align: center;
    }

    /* Hide Desktop Actions */
    .header-actions {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    /* Hero */
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-content {
        align-items: center;
    }

    .hero-visual {
        order: -1;
        margin-bottom: 20px;
    }

    .hero-image-wrapper {
        width: 280px;
        height: 280px;
    }

    .hero-image {
        width: 250px;
        height: 250px;
    }

    .hero-cta {
        justify-content: center;
        flex-direction: column;
        width: 100%;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-social {
        justify-content: center;
    }

    .hero-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .metric-card {
        padding: 20px;
    }

    .metric-number {
        font-size: 2.25rem;
    }

    /* About Section Mobile */
    .about-text {
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 16px;
    }

    .about-text:nth-of-type(2),
    .about-text:nth-of-type(3) {
        display: none;
    }

    .read-more-btn.show {
        display: inline-block;
    }

    .about-story.expanded .about-text {
        display: block !important;
    }

    .highlight-card {
        padding: 20px 16px;
    }

    .highlight-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }

    .highlight-title {
        font-size: 1.125rem;
    }

    .tech-badge-pro {
        padding: 8px 14px;
        font-size: 0.875rem;
        min-height: 44px;
    }

    /* Grids */
    .about-highlights,
    .projects-grid,
    .blog-grid,
    .contact-content {
        grid-template-columns: 1fr;
    }

    /* Blog - Show only 3 articles on mobile */
    .blog-card:nth-child(n+4) {
        display: none;
    }

    /* Experience Cards */
    .experience-card {
        flex-direction: column;
    }

    .experience-logo {
        flex-direction: row;
        width: 100%;
        justify-content: flex-start;
    }

    .timeline-line {
        width: 100%;
        height: 2px;
        min-height: 0;
    }

    .experience-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .company-name {
        font-size: 1.25rem;
        flex-wrap: wrap;
    }

    .duration {
        font-size: 0.85rem;
    }

    /* Education & Skills */
    .skills-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .education-item {
        flex-direction: column;
        align-items: center;
        padding: 24px 20px;
        width: 100%;
    }

    .edu-icon {
        margin: 0 0 12px;
    }

    .edu-info {
        text-align: center;
    }

    .edu-title {
        font-size: 1rem;
    }

    .edu-description {
        font-size: 0.875rem;
    }

    /* Fixed Skills Grid (Mobile) - Using flex-wrap to prevent overflow */
    .skills-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 12px;
        padding-bottom: 0;
        overflow-x: hidden;
        min-height: auto;
        width: 100%;
    }

    .skills-grid .skill-card {
        flex: 0 0 calc(50% - 6px);
        max-width: calc(50% - 6px);
        box-sizing: border-box;
    }

    .skills-grid::-webkit-scrollbar {
        display: none;
    }

    .skill-card {
        display: flex !important;
        min-width: 0;
        max-width: none;
        padding: 16px 10px;
    }

    .skill-icon {
        font-size: 1.75rem;
    }

    .skill-name {
        font-size: 0.85rem;
    }

    .skills-pagination {
        display: none;
    }

    /* Contact Section */
    .contact-content {
        gap: 30px;
    }

    .contact-form-wrapper {
        padding: 28px 20px;
    }

    .email-card {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .email-link {
        font-size: 0.85rem;
        word-break: normal;
        overflow-wrap: break-word;
        text-align: center;
        width: 100%;
    }

    .copy-email {
        margin-top: 8px;
    }

    /* Chat Widget Mobile */
    .chat-widget {
        right: 20px;
        bottom: 20px;
    }

    .chat-window {
        position: fixed;
        left: 20px;
        right: 20px;
        width: auto;
        max-width: none;
        bottom: 90px;
        height: 60vh;
        max-height: 500px;
        transform: scale(0);
        /* Ensure initial state matches desktop for animation */
    }

    .chat-window.active {
        transform: scale(1);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-greeting {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-metrics {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .metric-card {
        padding: 16px;
    }

    .metric-number {
        font-size: 1.75rem;
    }

    .hero-image-wrapper {
        width: 220px;
        height: 220px;
    }

    .hero-image {
        width: 190px;
        height: 190px;
    }
}

@media (max-width: 375px) {
    .hero-title {
        font-size: 1.5rem;
    }
}

/* Prevent Sticky Hovers on Touch Devices */
@media (hover: none) {

    .project-card:hover,
    .blog-card:hover,
    .skill-card:hover,
    .chat-send:hover {
        transform: none;
        box-shadow: none;
        /* Optional: keep shadow if desired, but good to reset */
    }

    .project-card:hover {
        border-color: var(--border-light);
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .cursor-dot,
    .cursor-outline {
        display: none !important;
    }
}