:root {
    /* Color Palette - Dark Mode Primary */
    --bg-color: #0d1117;
    --card-bg: rgba(22, 27, 34, 0.7);
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --accent-color: #58a6ff;
    --accent-glow: rgba(88, 166, 255, 0.3);
    --nav-bg: rgba(13, 17, 23, 0.8);
    --border-color: #30363d;
    --gradient-primary: linear-gradient(135deg, #58a6ff 0%, #1d4ed8 100%);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.light-theme {
    --bg-color: #f1f5f9;
    --card-bg: rgba(255, 255, 255, 0.8);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-color: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.2);
    --nav-bg: rgba(241, 245, 249, 0.9);
    --border-color: #cbd5e1;
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

/* Professional Image Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* AI & Tech Background - Dark Mode */
    background-image: url('https://images.unsplash.com/photo-1677442136019-21780ecad995?q=80&w=2000&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Stronger overlay for better text contrast */
    background: radial-gradient(circle, rgba(13, 17, 23, 0.8) 0%, rgba(13, 17, 23, 0.98) 100%);
    z-index: -1;
}

.light-theme::before {
    /* AI & Tech Background - Light Mode */
    background-image: url('https://images.unsplash.com/photo-1485827404703-89b55fcc595e?q=80&w=2000&auto=format&fit=crop');
    filter: grayscale(0.2) brightness(1.2);
}

.light-theme::after {
    /* Extra opacity for light mode to make dark text readable */
    background: radial-gradient(circle, rgba(241, 245, 249, 0.9) 0%, rgba(241, 245, 249, 0.97) 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

/* Navbar */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    background-color: var(--nav-bg);
}

#navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo span {
    color: var(--accent-color);
}

#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

#theme-toggle:hover {
    background: var(--card-bg);
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 30px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: var(--transition);
}

.sun {
    display: none;
}

.light-theme .sun {
    display: block;
}

.light-theme .moon {
    display: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
    animation: fadeIn 1s ease-out;
}

.greeting {
    color: var(--accent-color);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0.5rem 0;
}

.static-title {
    font-size: 2.2rem;
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.typing-container {
    font-size: 1.6rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    min-height: 2.4rem;
}

#typing-text {
    color: var(--accent-color);
    border-right: 3px solid var(--accent-color);
    padding-right: 5px;
    animation: blink 0.7s infinite;
}

@keyframes blink {

    0%,
    100% {
        border-color: transparent;
    }

    50% {
        border-color: var(--accent-color);
    }
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

.btn.primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 10px 20px var(--accent-glow);
}

.btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px var(--accent-glow);
}

.btn.secondary {
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn.secondary:hover {
    background: var(--card-bg);
}

.btn.outline {
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.btn.outline:hover {
    background: var(--accent-glow);
    transform: translateY(-3px);
}

.hero-visual {
    position: absolute;
    right: 5%;
    width: 40%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.image-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    border: 4px solid var(--accent-color);
    box-shadow: 0 0 50px var(--accent-glow);
    z-index: 2;
    animation: morph 8s ease-in-out infinite;
}

.blob {
    position: absolute;
    width: 120%;
    height: 120%;
    background: var(--gradient-primary);
    filter: blur(80px);
    opacity: 0.2;
    border-radius: 50%;
    z-index: 1;
    animation: float 10s infinite ease-in-out;
}

@keyframes morph {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    50% {
        border-radius: 50% 50% 30% 70% / 50% 60% 40% 50%;
    }

    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-20px, 30px) scale(1.1);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Achievements */
.achievements-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.achievement-item {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
}

.achievement-item:hover {
    transform: scale(1.02);
    border-color: var(--accent-color);
}

.ach-icon {
    font-size: 2rem;
    background: var(--accent-glow);
    padding: 1rem;
    border-radius: 50%;
}

.achievement-item p {
    font-weight: 600;
}

/* Generic Section Styles */
.section {
    padding: 100px 10%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.skill-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

/* Testimonials Slider */
.testimonial-slider {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
    padding: 2rem 0;
}

.testimonial-container {
    position: relative;
    min-height: 350px;
}

.testimonial-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.testimonial-slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
    position: relative;
}

.test-quote {
    font-size: 5rem;
    line-height: 1;
    color: var(--accent-color);
    opacity: 0.3;
    font-family: serif;
    position: absolute;
    top: 1rem;
    left: 2rem;
}

.testimonial-slide h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.testimonial-slide p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-style: italic;
    line-height: 1.8;
}

.test-author {
    font-weight: 800;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.slider-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.slider-btn:hover {
    background: var(--accent-color);
    color: white;
    transform: scale(1.1);
}

.slider-dots {
    display: flex;
    gap: 0.8rem;
}

.dot {
    width: 10px;
    height: 10px;
    background: var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--accent-color);
    transform: scale(1.3);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.skill-card h3 {
    margin-bottom: 0;
    font-size: 1.5rem;
}

.percentage {
    color: var(--accent-color);
    font-weight: 800;
    font-size: 1.1rem;
}

.skill-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Scroll Top Button */
.capsule-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 70px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 10px 20px var(--accent-glow);
    animation: bounce 2s infinite ease-in-out;
}

.capsule-btn.visible {
    opacity: 1;
    visibility: visible;
}

.capsule-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--accent-glow);
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.progress-container {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    box-shadow: 0 0 10px var(--accent-glow);
    transition: width 1.5s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: -2.4rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-date {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.timeline-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.timeline-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.4rem;
}

.company {
    display: block;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-content ul {
    list-style: none;
    color: var(--text-secondary);
}

.timeline-content li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.timeline-content li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* Contact */
.contact-container {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    max-width: 800px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.contact-item a {
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.social-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--accent-color);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 2.5rem;
}

.blog-card {
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.blog-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.1);
}

.blog-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.blog-content h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.btn.sm {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    align-self: flex-start;
}

/* Page Transitions */
.fade-in-page {
    animation: fadePageIn 0.8s ease-out;
}

@keyframes fadePageIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* Footer */
footer {
    padding: 3rem 10%;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--card-bg);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transition: 0.4s ease-in-out;
        z-index: 1000;
        border-left: 1px solid var(--border-color);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li a {
        font-size: 1.5rem;
    }

    .hero {
        flex-direction: column-reverse;
        padding-top: 160px;
        padding-bottom: 60px;
        text-align: center;
        gap: 3rem;
        height: auto;
        min-height: auto;
    }

    .hero-content {
        max-width: 100%;
        padding: 0 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-btns {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .hero-visual {
        position: relative;
        right: auto;
        width: 100%;
        height: auto;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 0;
        z-index: 1;
    }

    .image-wrapper {
        width: 280px;
        height: 280px;
        margin: 0 auto;
        position: relative;
    }

    #hero-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .section {
        padding: 60px 5%;
    }

    .about-container {
        flex-direction: column;
        grid-template-columns: 1fr;
    }

    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .skill-grid {
        grid-template-columns: 1fr;
    }

    .contact-container {
        padding: 2rem;
    }
}

/* Mobile Toggle Animation */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 480px) {
    .hero {
        padding-top: 140px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .image-wrapper {
        width: 220px;
        height: 220px;
    }
}