/* ==========================================================================
   CSS Variables & Theme Definitions
   ========================================================================== */
:root {
    /* Color Palette - Dark Theme (Modern Sleek Glass) */
    --bg-main: #09090b;
    --bg-alt: #18181b;
    --bg-card: rgba(39, 39, 42, 0.4);
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --accent-primary: #8b5cf6;
    --accent-secondary: #06b6d4;
    --accent-hover: #7c3aed;
    --border-color: rgba(255, 255, 255, 0.08);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #38b2ac 0%, #f1a982 100%);
    --gradient-text: linear-gradient(to right, #38b2ac, #f1a982);
    
    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-secondary: 'Poppins', sans-serif;
    
    /* Spacing & Layout */
    --nav-height: 80px;
    --container-padding: 2rem;
    --section-padding: 6rem 0;
    
    /* Effects */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    /* Premium Dark Theme (Unified) */
    --bg-main: #0D0D0D;
    --bg-alt: #0D0D0D; /* Removed color difference between sections */
    --bg-card: rgba(21, 21, 21, 0.7);
    --text-primary: #EDEDED;
    --text-secondary: #A0A0A0;
    --accent-primary: #38b2ac;
    --accent-secondary: #f1a982;
    --accent-hover: #2c8c87;
    --border-color: rgba(255, 255, 255, 0.05);
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    --shadow-accent: 0 0 20px rgba(56, 178, 172, 0.4);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    /* Extra Accents for Colorful Name */
    --accent-glow: #38b2ac;
    --accent-glow-alt: #f1a982;
}

[data-theme="light"] {
    --bg-main: #fafafa;
    --bg-alt: #fafafa;
    --bg-card: rgba(255, 255, 255, 0.6);
    --text-primary: #09090b;
    --text-secondary: #52525b;
    --accent-primary: #6366f1;
    --accent-secondary: #ec4899;
    --accent-hover: #4f46e5;
    --border-color: rgba(0, 0, 0, 0.08);
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.12);
    --shadow-accent: 0 0 20px rgba(99, 102, 241, 0.3);

    --accent-glow: #6366f1;
    --accent-glow-alt: #ec4899;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

@media (pointer: fine) {
    /* Removed cursor: none for native cursor */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

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

ul {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--section-padding);
    background: transparent; /* Ensure background elements show through */
}

.bg-alt {
    background: transparent; /* Unified background */
}

/* Typography Utility */
.highlight {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-family: var(--font-secondary);
    font-weight: 600;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    outline: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--accent-primary);
}

.btn-secondary:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    padding: 20px 0;
}

.header.scrolled {
    background: rgba(13, 13, 13, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.nav-menu {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-normal);
    position: relative;
    letter-spacing: 0.02em;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: transform var(--transition-fast), color var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

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

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-primary);
    transition: all var(--transition-normal);
    border-radius: 3px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--nav-height);
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 4rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.hero-role {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

/* Hero Visual Refined */
.hero-visual {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

.hero-visual {
    position: relative;
    width: 100%;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.visual-blob {
    width: 350px;
    height: 350px;
    background: var(--gradient-primary);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: morph-blob 8s ease-in-out infinite, pulse-blob 4s ease-in-out infinite;
    opacity: 0.8;
    filter: blur(20px);
    position: absolute;
    z-index: 1;
}

.visual-dots {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(var(--text-secondary) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.1;
    z-index: 0;
}

.hero-image {
    width: 380px;
    height: auto;
    max-height: 480px;
    object-fit: contain;
    position: relative;
    z-index: 10; /* Increased to ensure it's in front */
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 25px 35px rgba(0,0,0,0.8)) brightness(1.05);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes morph-blob {
    0%, 100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    34% { border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%; }
    67% { border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%; }
}

@keyframes pulse-blob {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Reveal Text Animation */
.reveal-text-wrapper {
    overflow: hidden;
    display: block;
}

.reveal-text {
    display: block;
    transform: translateY(100%);
    opacity: 0;
}

/* Global Background Elements */
.global-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

/* Preloader Gradient Animation */
.gradient-text-anim {
    background: linear-gradient(to right, #38b2ac 0%, #38b2ac 33%, #f1a982 66%, #f1a982 100%);
    background-size: 300% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: gradientFlow 4s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 15px rgba(56, 178, 172, 0.4));
}

@keyframes gradientFlow {
    0% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

.float-item {
    position: absolute;
    opacity: 0.5; /* Increased opacity */
    pointer-events: none;
    z-index: -1;
    filter: blur(1px);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3.2rem; /* Larger */
    font-weight: 800;
    color: var(--accent-primary);
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
    animation: floatAnim 30s infinite ease-in-out alternate;
}

.float-item.blur {
    filter: blur(8px);
    opacity: 0.25;
}



@keyframes floatAnim {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    33% { transform: translate(50px, -30px) rotate(10deg) scale(1.1); }
    66% { transform: translate(-30px, 50px) rotate(-10deg) scale(0.9); }
    100% { transform: translate(20px, -20px) rotate(5deg) scale(1.05); }
}



@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: var(--text-secondary);
    animation: bounce 2s infinite;
    transition: color var(--transition-fast);
}

.scroll-down:hover {
    color: var(--accent-primary);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-15px) translateX(-50%); }
    60% { transform: translateY(-7px) translateX(-50%); }
}

/* ==========================================================================
   Career Objective
   ========================================================================== */
.objective-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.objective-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.objective-icon {
    font-size: 3rem;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
}

.objective .section-title {
    margin-bottom: 1.5rem;
}

.objective .section-title::after {
    display: none;
}

.objective-text {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    font-style: italic;
    line-height: 1.8;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
}

.about-image {
    border-radius: var(--radius-lg);
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.image-backdrop {
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    z-index: 1;
    opacity: 0.5;
}

.about-text h3 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border-color);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-secondary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================================================
   Skills Section
   ========================================================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(59, 130, 246, 0.3);
}

.category-title {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--accent-primary);
}

.skill-list li {
    margin-bottom: 1.5rem;
}

.skill-list li:last-child {
    margin-bottom: 0;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.skill-header i {
    color: var(--text-secondary);
    opacity: 0.7;
}

.skill-bar {
    height: 8px;
    background-color: var(--border-color);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.skill-progress.animate {
    transform: scaleX(1);
}

/* ==========================================================================
   Experience Section
   ========================================================================== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 3rem;
}

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

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 5px;
    width: 20px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 50%;
    border: 4px solid var(--bg-main);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.timeline-content {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-normal);
}

.timeline-content:hover {
    transform: translateX(5px);
    border-color: rgba(59, 130, 246, 0.3);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-header h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.timeline-date {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
}

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

.timeline-text {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-tags span {
    background-color: var(--bg-alt);
    color: var(--text-primary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(59, 130, 246, 0.3);
}

.project-img-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.placeholder-img {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-alt) 0%, var(--border-color) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.1);
    transition: transform var(--transition-slow);
}

.project-card:hover .placeholder-img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.project-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tech span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-secondary);
    background-color: rgba(59, 130, 246, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   Project Image Slider
   ========================================================================== */
.project-slider {
    position: relative;
    height: 220px;
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: var(--bg-alt);
}

.slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-img {
    height: 100%;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
    background-color: #000; /* Dark background for letterboxing */
}

/* Expand (fullscreen) button */
.slider-expand {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
    z-index: 5;
    backdrop-filter: blur(4px);
}

.project-card:hover .slider-expand {
    opacity: 1;
}

.slider-expand:hover {
    background: var(--accent-primary);
    transform: scale(1.1);
}

/* Dot indicators */
.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
}

.slider-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255,255,255,0.3);
    transition: background var(--transition-fast), transform var(--transition-fast);
    cursor: pointer;
}

.slider-dots .dot.active {
    background: #fff;
    transform: scale(1.3);
}

/* ==========================================================================
   Lightbox Modal
   ========================================================================== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 10, 25, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.lightbox-content {
    position: relative;
    z-index: 2;
    max-width: 95vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lightboxIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: auto;
    scrollbar-width: none; /* Hide scrollbars for cleaner look */
}

.lightbox-content::-webkit-scrollbar {
    display: none;
}

@keyframes lightboxIn {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.8);
    display: block;
    cursor: zoom-in;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.lightbox-content img.zoomed {
    max-width: 180%;
    max-height: 180%;
    transform: scale(1.05);
    cursor: zoom-out;
    border-radius: 4px;
}

/* X close button */
.lightbox-close {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast), transform var(--transition-fast);
    backdrop-filter: blur(6px);
}

.lightbox-close:hover {
    background: rgba(239, 68, 68, 0.8);
    transform: rotate(90deg) scale(1.1);
}

/* Prev / Next arrows */
.lightbox-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast), transform var(--transition-fast);
    backdrop-filter: blur(6px);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-arrow:hover {
    background: var(--accent-primary);
    transform: translateY(-50%) scale(1.12);
}

/* Hide arrows when only 1 image */
.lightbox-arrow.hidden {
    display: none;
}

/* Image counter  e.g. "1 / 2" */
.lightbox-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0.9rem;
    border-radius: var(--radius-full);
    letter-spacing: 1px;
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--bg-card);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background: var(--gradient-primary);
    border-color: transparent;
}

.service-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.75rem;
    color: var(--accent-primary);
    transition: all var(--transition-normal);
}

.service-card:hover .service-icon {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.service-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    transition: color var(--transition-normal);
}

.service-card:hover .service-title,
.service-card:hover .service-desc {
    color: white;
}

.service-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color var(--transition-normal);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.centered-contact {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.centered-contact .contact-details {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
}

.centered-contact .contact-item {
    flex: 1;
    min-width: 250px;
    justify-content: center;
    text-align: left;
}

.contact-info h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem;
    background-color: var(--bg-main);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.contact-item:hover {
    transform: translateX(5px);
    border-color: var(--accent-primary);
}

.icon-box {
    width: 50px;
    height: 50px;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
}

.contact-item h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.contact-item span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.contact-form {
    background-color: var(--bg-main);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    background-color: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-control::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

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

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: rgba(15, 23, 42, 1);
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .footer {
    background-color: var(--bg-main);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-logo {
    font-family: var(--font-secondary);
    font-size: 2rem;
    font-weight: 800;
}

.footer-logo span {
    color: var(--accent-primary);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-alt);
    border-radius: 50%;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    border: 1px solid var(--border-color);
}

.footer-social a:hover {
    background-color: var(--accent-primary);
    color: white;
    transform: translateY(-3px);
    border-color: var(--accent-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.back-to-top {
    width: 40px;
    height: 40px;
    background-color: var(--bg-alt);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.back-to-top:hover {
    background-color: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

.fade-delay-1 { transition-delay: 0.2s; }
.fade-delay-2 { transition-delay: 0.4s; }
.fade-delay-3 { transition-delay: 0.6s; }

/* ==========================================================================
   Modern Ambient Background Glow
   ========================================================================== */
.ambient-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, rgba(6, 182, 212, 0.03) 40%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

[data-theme="light"] .ambient-glow {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, rgba(236, 72, 153, 0.03) 40%, transparent 70%);
}

/* Glassmorphism utility for modern cards */
.project-card, .service-card, .objective-card, .timeline-content, .contact-item, .skill-category {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background-color: var(--bg-card);
}

.header {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--gradient-primary);
    z-index: 10000;
    transition: width 0.1s;
}

/* ==========================================================================
   Premium Preloader
   ========================================================================== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-main);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    transition: opacity 0.8s ease, visibility 0.8s;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
}

.preloader-logo {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    font-family: var(--font-secondary);
}

.preloader-bar {
    width: 240px;
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    margin: 0 auto 20px;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-full);
}

[data-theme="light"] .preloader-bar {
    background: rgba(0, 0, 0, 0.05);
}

.preloader-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--gradient-primary);
    animation: preloaderAnim 2.5s ease-in-out forwards;
}

@keyframes preloaderAnim {
    0% { width: 0%; }
    20% { width: 30%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.preloader-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 500;
}

/* ==========================================================================
   Colorful Name Animation
   ========================================================================== */
.colorful-name {
    background: linear-gradient(90deg, var(--accent-glow), var(--accent-glow-alt), var(--accent-glow), var(--accent-glow-alt));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 6s ease infinite, pulseGlow 2s ease-in-out infinite alternate;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulseGlow {
    0% { filter: drop-shadow(0 0 2px rgba(139, 92, 246, 0.2)); }
    100% { filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.5)); }
}

[data-theme="light"] .colorful-name {
    animation: gradientShift 6s ease infinite, pulseGlowLight 2s ease-in-out infinite alternate;
}

@keyframes pulseGlowLight {
    0% { filter: drop-shadow(0 0 2px rgba(99, 102, 241, 0.2)); }
    100% { filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.4)); }
}

/* ==========================================================================
   Glass Panel Utilities
   ========================================================================== */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.glass-panel:hover {
    border-color: rgba(139, 92, 246, 0.3);
}

/* ==========================================================================
   Timeline Progress Line
   ========================================================================== */
.timeline-progress {
    position: absolute;
    top: 0;
    left: 20px;
    width: 2px;
    height: 0%;
    background: var(--gradient-primary);
    box-shadow: 0 0 15px var(--accent-primary);
    z-index: 1;
    transition: height 0.3s ease-out;
}


.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background-color: var(--accent-primary);
    margin-left: 5px;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.btn, .contact-item {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s linear;
    background-color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.project-card, .service-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.magnetic {
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.service-card:hover .service-icon i {
    animation: bounce-icon 0.5s ease;
}

.contact-item:hover .icon-box i {
    animation: spin-icon 0.5s ease;
}

@keyframes bounce-icon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes spin-icon {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 992px) {
    .hero-container,
    .about-content,
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-content {
        text-align: center;
        order: 2;
    }

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

    .hero-visual {
        order: 1;
        height: auto;
        min-height: 350px;
        max-width: 450px;
        margin: 0 auto;
    }
    
    .hero-image {
        width: 100%;
        max-width: 320px;
        height: auto;
    }
    
    .about-image-wrapper {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--nav-height);
        flex-direction: column;
        background-color: var(--bg-main);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 1.5rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .section-title {
        font-size: 2rem;
    }

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

    .timeline::before {
        left: 0;
    }

    .timeline-item {
        padding-left: 30px;
    }

    .project-slider {
        height: 200px;
    }

    .about-image {
        max-width: 100%;
    }

    .timeline-dot {
        left: -9px;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        min-height: 280px;
    }

    .hero-image {
        max-width: 260px;
    }

    .project-slider {
        height: 180px;
    }

    .footer-content, .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}
