/* ======================================================= */
/* 1. COLOR VARIABLES & THEME SETUP */
/* ======================================================= */

/* LIGHT MODE */
:root {
    --primary-color: #3498db; 
    --primary-hover: #2980b9;
    --background-color: #f4f6f7;
    --text-color: #2c3e50;
    --secondary-text-color: #7f8c8d;
    --card-background-light: rgba(255, 255, 255, 0.6); 
    --border-color: #ecf0f1;
    --shadow-color: rgba(44, 62, 80, 0.2); 
    --glass-blur: blur(10px); 
    --skill-fill-color: var(--primary-color);
    --bg-animation-start: #e9eff1; /* Animation color 1 */
    --bg-animation-end: #f4f6f7;   /* Animation color 2 */
}

/* DARK MODE */
body.dark-mode {
    --primary-color: #5dade2; 
    --primary-hover: #8ac0ff;
    --background-color: #1a202c; 
    --text-color: #ecf0f1;
    --secondary-text-color: #b0c4de;
    --card-background-light: rgba(39, 55, 74, 0.6); 
    --border-color: #34495e;
    --shadow-color: rgba(0, 0, 0, 0.7);
    --skill-fill-color: var(--primary-color);
    --bg-animation-start: #1c2833; 
    --bg-animation-end: #1a202c; 
}


/* ======================================================= */
/* 2. GLOBAL & ANIMATED BACKGROUND */
/* ======================================================= */

/* Subtle background animation */
@keyframes breathing-bg {
    0% { background-color: var(--bg-animation-start); }
    50% { background-color: var(--bg-animation-end); }
    100% { background-color: var(--bg-animation-start); }
}

body.animate-bg {
    animation: breathing-bg 60s ease infinite;
    font-family: 'Roboto Mono', monospace;
    transition: color 0.5s;
}

/* Glassmorphism Card Style */
.glassmorphism-card {
    background: var(--card-background-light);
    border: 1px solid var(--border-color);
    backdrop-filter: var(--glass-blur); 
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 12px;
    box-shadow: 0 8px 32px var(--shadow-color);
    transition: all 0.3s ease;
}


/* ======================================================= */
/* 3. DYNAMIC NAVIGATION BAR */
/* ======================================================= */

.navbar {
    /* Base styles (same as before) */
    padding: 20px 5%; 
    transition: all 0.4s ease;
    background: var(--card-background-light); 
    backdrop-filter: var(--glass-blur); 
    z-index: 1000;
}

/* New: Styles applied when scrolled */
.navbar.scrolled {
    padding: 10px 5%; /* Shrink height */
    box-shadow: 0 4px 15px var(--shadow-color);
    background: var(--card-background-light); /* Ensure solid background when sticky */
}

.navbar .logo {
    font-size: 1.6em;
    transition: font-size 0.4s ease;
}

.navbar.scrolled .logo {
    font-size: 1.4em; /* Shrink logo */
}

/* ======================================================= */
/* 4. SKILLS SECTION (Iconic Grid) */
/* ======================================================= */

.skill-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.icon-card {
    text-align: center;
    padding: 25px 15px;
    border: 2px solid transparent; /* Used for the hover effect */
    position: relative;
    overflow: hidden;
}

.icon-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px var(--shadow-color);
}

.icon-card i {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.icon-card:hover i {
    transform: scale(1.1);
}

.icon-card h3 {
    font-size: 1.1em;
    margin-bottom: 5px;
}

/* Animated Border Effect (A professional touch) */
.icon-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent 0deg, var(--primary-color) 30deg, transparent 60deg);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.icon-card:hover::before {
    opacity: 0.5;
    animation: rotate 4s linear infinite; /* Subtle continuous rotation */
}

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

/* ======================================================= */
/* 5. PROJECTS & HOVER EFFECTS (Same) */
/* ======================================================= */

/* ... (Project styles and advanced 3D hover remain the same) ... */

/* ======================================================= */
/* 6. RESPONSIVENESS (Mobile Menu) */
/* ======================================================= */

@media (max-width: 992px) {
    /* ... (Mobile Menu styles remain the same) ... */
    .icon-card {
        padding: 20px 10px;
    }
}
/* ======================================================= */
/* 6. Styles */
/* ======================================================= */

:root {
    /* Light Theme */
    --primary-light: #3b82f6;
    --secondary-light: #10b981;
    --accent-light: #f59e0b;
    --background-light: #ffffff;
    --surface-light: #f8fafc;
    --text-primary-light: #1e293b;
    --text-secondary-light: #64748b;
    --border-light: #e2e8f0;
    --shadow-light: rgba(0, 0, 0, 0.05);
    
    /* Dark Theme */
    --primary-dark: #60a5fa;
    --secondary-dark: #34d399;
    --accent-dark: #fbbf24;
    --background-dark: #0f172a;
    --surface-dark: #1e293b;
    --text-primary-dark: #f1f5f9;
    --text-secondary-dark: #cbd5e1;
    --border-dark: #334155;
    --shadow-dark: rgba(0, 0, 0, 0.3);
    
    /* Common */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 30px;
}

.light-mode {
    --primary: var(--primary-light);
    --secondary: var(--secondary-light);
    --accent: var(--accent-light);
    --background: var(--background-light);
    --surface: var(--surface-light);
    --text-primary: var(--text-primary-light);
    --text-secondary: var(--text-secondary-light);
    --border: var(--border-light);
    --shadow: var(--shadow-light);
}

.dark-mode {
    --primary: var(--primary-dark);
    --secondary: var(--secondary-dark);
    --accent: var(--accent-dark);
    --background: var(--background-dark);
    --surface: var(--surface-dark);
    --text-primary: var(--text-primary-dark);
    --text-secondary: var(--text-secondary-dark);
    --border: var(--border-dark);
    --shadow: var(--shadow-dark);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    transition: var(--transition-slow);
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 120px 0;
}

h1, h2, h3, h4 {
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

h2:after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

p {
    margin-bottom: 15px;
    color: var(--text-secondary);
}

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

ul {
    list-style: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--primary);
    color: white;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition);
}

.btn:hover:before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.btn-secondary {
    background: var(--secondary);
}

.btn-secondary:hover {
    background: var(--secondary);
}

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

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

.section-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.theme-toggle:hover {
    transform: rotate(30deg);
}

.theme-toggle i {
    font-size: 1.2rem;
    color: var(--text-primary);
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px var(--shadow);
    transition: var(--transition);
}

.dark-mode header {
    background: rgba(15, 23, 42, 0.8);
}

header.scrolled {
    padding: 10px 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

.nav-links {
    display: flex;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

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

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--surface) 0%, var(--background) 100%);
}

.hero-content {
    max-width: 700px;
    z-index: 1;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 10px;
    animation: fadeInUp 1s ease;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease 0.2s both;
    text-align: left;
    color: var(--text-secondary);
}

.hero h2:after {
    display: none;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-btns {
    display: flex;
    gap: 15px;
    animation: fadeInUp 1s ease 0.6s both;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    animation: fadeIn 1s ease 0.8s both;
}

.hero-badge i {
    color: var(--primary);
}

.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    opacity: 0.1;
    background: var(--primary);
    border-radius: 50%;
    animation: float 15s infinite linear;
}

.shape:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 80%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 60%;
    left: 70%;
    animation-delay: 2s;
    animation-duration: 20s;
}

.shape:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 30%;
    left: 60%;
    animation-delay: 4s;
    animation-duration: 25s;
}

.shape:nth-child(4) {
    width: 100px;
    height: 100px;
    top: 70%;
    left: 20%;
    animation-delay: 1s;
    animation-duration: 18s;
}

.shape:nth-child(5) {
    width: 50px;
    height: 50px;
    top: 20%;
    left: 10%;
    animation-delay: 3s;
    animation-duration: 22s;
}

/* About Section */
.about {
    background: var(--surface);
    border-radius: var(--border-radius-xl);
    margin: 0 20px;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    text-align: center;
    position: relative;
}

.profile-img-container {
    position: relative;
    display: inline-block;
}

.profile-img {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--background);
    box-shadow: 0 20px 40px var(--shadow);
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 5rem;
}

.profile-img-bg {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.2;
    z-index: 1;
    animation: pulse 3s infinite;
}

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

.skill-category {
    background: var(--surface);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.skill-category:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--shadow);
}

.skill-category h3 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category h3 i {
    font-size: 1.2rem;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-item {
    background: var(--background);
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 0.9rem;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.skill-item:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

/* Experience Section */
.experience {
    background: var(--surface);
    border-radius: var(--border-radius-xl);
    margin: 0 20px;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline:before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--primary);
}

.timeline-item {
    margin-bottom: 50px;
    position: relative;
    width: 50%;
    padding-right: 40px;
}

.timeline-item:nth-child(even) {
    margin-left: 50%;
    padding-right: 0;
    padding-left: 40px;
}

.timeline-content {
    background: var(--background);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow);
}

.timeline-date {
    display: inline-block;
    padding: 5px 15px;
    background: var(--primary);
    color: white;
    border-radius: 30px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.timeline-item:nth-child(even) .timeline-date {
    background: var(--secondary);
}

.timeline-marker {
    position: absolute;
    top: 0;
    right: -10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    border: 4px solid var(--background);
    box-shadow: 0 0 0 4px var(--primary);
}

.timeline-item:nth-child(even) .timeline-marker {
    right: auto;
    left: -10px;
    background: var(--secondary);
    box-shadow: 0 0 0 4px var(--secondary);
}

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

.project-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--shadow);
}

.project-img {
    height: 200px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.project-img:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.1);
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.project-tag {
    background: var(--background);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid var(--border);
}

/* Contact Section */
.contact {
    background: var(--surface);
    border-radius: var(--border-radius-xl);
    margin: 0 20px;
}

.contact-container {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--background);
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.contact-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px var(--shadow);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: white;
    font-size: 1.2rem;
}

.contact-form {
    flex: 1;
}

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

.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    background: var(--background);
    color: var(--text-primary);
}

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

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

/* Footer */
footer {
    background: var(--surface);
    color: var(--text-primary);
    padding: 70px 0 20px;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border: 1px solid var(--border);
}

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

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

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

/* Particles Background */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

/* Responsive Design */
@media (max-width: 1100px) {
    .about-content {
        flex-direction: column;
    }
    
    .contact-container {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    section {
        padding: 80px 0;
    }
    
    h1 {
        font-size: 2.8rem;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--surface);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 50px;
        transition: var(--transition);
        box-shadow: 0 10px 20px var(--shadow);
        z-index: 998;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .timeline:before {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        padding-right: 0;
        padding-left: 70px;
    }
    
    .timeline-item:nth-child(even) {
        margin-left: 0;
        padding-left: 70px;
    }
    
    .timeline-marker {
        left: 20px;
        right: auto;
    }
    
    .timeline-item:nth-child(even) .timeline-marker {
        left: 20px;
    }
    
    .about, .experience, .contact {
        margin: 0;
        border-radius: 0;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero h2 {
        font-size: 1.4rem;
    }
    
    .hero-btns {
        flex-direction: column;
    }
    
    .profile-img {
        width: 250px;
        height: 250px;
    }
    
    .profile-img-bg {
        width: 250px;
        height: 250px;
    }
}

