:root {
    /* Light Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f4f4f9;
    --text-primary: #121212;
    --text-secondary: #555555;
    --accent-color: #4f46e5;
    --accent-glow: rgba(79, 70, 229, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
    --blob-1: #c4b5fd;
    --blob-2: #818cf8;
}

body.dark-mode {
    --bg-primary: #0f1115;
    --bg-secondary: #161b22;
    --text-primary: #f8f9fa;
    --text-secondary: #a0aab2;
    --accent-color: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.4);
    --glass-bg: rgba(22, 27, 34, 0.5);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --blob-1: #4c1d95;
    --blob-2: #312e81;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Blobs for Visual Aesthetics */
.blob-bg {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: var(--blob-1);
    filter: blur(120px);
    border-radius: 50%;
    opacity: 0.3;
    z-index: -1;
    animation: drift 20s infinite alternate ease-in-out;
}

.blob-2 {
    top: 50%;
    left: 60%;
    background: var(--blob-2);
    animation-direction: alternate-reverse;
    animation-duration: 25s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(15%, 15%) scale(1.1);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glassmorphism utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
    padding: 2.5rem;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    line-height: 1.2;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.2rem 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.8rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.logo span {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-color);
}

/* Base Buttons */
.theme-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.theme-btn:hover {
    background-color: var(--glass-border);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #fff;
    box-shadow: 0 4px 14px 0 var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px 0 var(--accent-glow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

/* Sections Common */
section {
    padding: 7rem 0;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 8rem;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem; /* Brought name and picture closer */
}

.hero-text {
    max-width: 600px;
}

.hero-image {
    display: flex;
    justify-content: center;
}

.image-wrapper {
    width: 520px;
    height: 620px;
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    transition: transform 0.5s ease;
    z-index: 1;
}

.image-wrapper:hover {
    transform: translateY(-5px);
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 992px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 3rem;
    }

    .hero-text {
        flex: 1;
    }

    .hero-cta {
        justify-content: center;
    }

    .image-wrapper {
        width: 360px;
        height: 440px;
    }
}

.tagline {
    font-size: 1.25rem;
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.hero-title {
    font-size: clamp(3rem, 7vw, 5.5rem);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1.4rem, 3vw, 2.5rem);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 650px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.about-card h3 {
    margin-bottom: 1.8rem;
    font-size: 1.5rem;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    background: var(--glass-border);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    border-color: var(--accent-color);
}

.education-item {
    margin-bottom: 1.5rem;
}

.education-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
}

.education-item p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.education-item .date {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--accent-color);
    background: rgba(79, 70, 229, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    margin-top: 0.6rem;
    font-weight: 600;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.5rem;
}

.project-card {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card.hover-effect:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px -12px var(--glass-shadow);
}

.project-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: auto;
}

.project-tags span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-color);
    background: rgba(79, 70, 229, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
}

/* Contact Section */
.contact-card {
    padding: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

.contact-info-side {
    text-align: left;
}

.contact-info-side .section-title {
    font-size: 2.2rem;
    margin-bottom: 2rem;
}

.contact-form-side {
    text-align: left;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1.2rem;
    background: var(--glass-border);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--glass-bg);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.submit-btn {
    width: 100%;
    margin-top: 1rem;
}

.form-status {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    display: none;
}

.form-status.success {
    display: block;
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.form-status.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-info-side {
        text-align: center;
    }
    
    .contact-info-side .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .contact-card {
        padding: 2.5rem 1.5rem;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 2.5rem 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border-top: 1px solid var(--glass-border);
}

/* Animations */
.fade-in {
    opacity: 0;
    transition: opacity 1.2s ease-out;
}

.fade-in.appear {
    opacity: 1;
}

.slide-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.slide-up.appear {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 5px;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 28px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        transition: right 0.4s ease;
        z-index: 999;
    }

    .nav-links.active {
        right: 0;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .blob-bg {
        width: 100vw;
        height: 100vw;
    }
}
