:root {
    /* Colors */
    --bs-primary: #0d6efd;
    --primary-soft: rgba(13, 110, 253, 0.08);
    --accent: #6f42c1;
    --neutral-900: #0f1724;
    --neutral-800: #1a2332;
    --surface: #f8f9fb;
    --muted: #e9ecef;
    --text-main: #343a40;
    --text-light: #6c757d;

    /* Spacing */
    --section-padding-desktop: 100px;
    --section-padding-mobile: 60px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-main);
    background-color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--neutral-900);
}

/* Typography Scale */
.fw-extra-bold {
    font-weight: 800;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
}

h2 {
    font-size: 2.25rem;
    margin-bottom: 2rem;
    position: relative;
    font-weight: 700;
}

h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: var(--bs-primary);
    margin-top: 0.5rem;
}

/* Sticky Nav */
.navbar {
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
}

.nav-link {
    font-weight: 500;
    color: var(--text-main);
    margin-left: 1rem;
    transition: color 0.3s ease;
}

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

/* Hero Section */
.hero {
    padding: 160px 0 100px;
    background:
        radial-gradient(circle at 90% 10%, rgba(13, 110, 253, 0.08), transparent 40%),
        radial-gradient(circle at 10% 90%, rgba(111, 66, 193, 0.08), transparent 40%),
        linear-gradient(135deg, #ffffff 0%, #f9fbff 100%);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 40%;
    height: 60%;
    background: url('data:image/svg+xml,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><path fill="%230D6EFD" fill-opacity="0.03" d="M44.7,-76.4C58.2,-69.2,69.7,-57.4,77.1,-43.9C84.5,-30.5,87.8,-15.2,85.6,-0.3C83.5,14.7,75.8,29.4,66.1,42.4C56.4,55.5,44.7,66.8,31.2,73.4C17.7,80,2.4,81.9,-12.9,79.5C-28.2,77,-43.5,70.2,-55.8,59.9C-68.1,49.6,-77.3,35.8,-82.4,20.6C-87.5,5.4,-88.4,-11.2,-83.5,-25.9C-78.6,-40.6,-67.9,-53.4,-54.8,-60.8C-41.7,-68.2,-26.2,-70.2,-11.2,-73.9C3.8,-77.6,18.8,-82.9,44.7,-76.4Z" transform="translate(100 100)" /></svg>') no-repeat;
    background-size: contain;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    background: linear-gradient(90deg, var(--neutral-900), var(--bs-primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-tagline {
    font-size: 1.25rem;
    line-height: 1.6;
    max-width: 540px;
}

.hero-img-container {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.hero-img-container::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    border: 4px solid var(--muted);
    border-radius: 16px;
    z-index: -1;
}

.hero-img {
    border-radius: 16px;
    border: 8px solid #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Sections */
section {
    padding: var(--section-padding-desktop) 0;
}

@media (max-width: 768px) {
    section {
        padding: var(--section-padding-mobile) 0;
    }

    h1 {
        font-size: 2rem;
    }
}

/* Buttons */
.btn {
    padding: 0.8rem 1.8rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3);
}

/* Portfolio Cards */
.project-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.project-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .card-img-top {
    transform: scale(1.1);
}

.project-img-wrapper {
    position: relative;
    border-radius: 12px 12px 0 0;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 110, 253, 0.9);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 2;
}

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

.bg-soft-primary {
    background-color: var(--primary-soft);
}

/* About & Stats */
.stat-item h3 {
    font-size: 2rem;
    color: var(--bs-primary);
}

.design-philosophy {
    border-left: 4px solid var(--bs-primary);
}

/* Testimonials */
.testimonial-card {
    background: #fff;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin: 1rem;
}

.quote-icon {
    font-size: 2rem;
    color: var(--primary-soft);
    margin-bottom: 1rem;
}

/* Section Headings */
.section-title {
    margin-bottom: 3rem;
    font-weight: 800;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--muted);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.25rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--bs-primary);
    border: 4px solid #fff;
    box-shadow: 0 0 0 4px var(--muted);
}

/* Skills */
.skill-item {
    margin-bottom: 1.5rem;
}

.progress {
    height: 8px;
    border-radius: 4px;
    background-color: var(--muted);
}

.progress-bar {
    border-radius: 4px;
    background: linear-gradient(90deg, var(--bs-primary), var(--accent));
}

/* Contact Form */
.form-control {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--muted);
}

.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.1);
    border-color: var(--bs-primary);
}

/* Footer */
footer {
    background-color: var(--neutral-900);
    color: #fff;
    padding: 4rem 0 2rem;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

footer a:hover {
    color: #fff;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--bs-primary);
    transform: translateY(-3px);
}

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

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

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Mobile Responsiveness & Refinement */
@media (max-width: 991px) {
    .hero {
        padding: 120px 0 60px;
        text-align: center;
    }

    .hero-tagline {
        margin: 0 auto 2rem;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2.5rem;
    }

    .hero-tagline {
        font-size: 1.1rem;
    }

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

    .btn-lg {
        width: 100%;
    }
}

.avatar {
    flex-shrink: 0;
}

.bg-soft-primary {
    background-color: var(--primary-soft);
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: none;
    border-radius: 50% !important;
    padding: 0 !important;
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
}

#backToTop:hover {
    transform: translateY(-5px);
    background-color: var(--accent);
}