/* ==========================================================================
   CSS Variables & Tokens
   ========================================================================== */
:root {
    --bg-color: #f3f4f6;
    --text-color: #1a1a1a;
    --text-muted: #6b7280;
    --primary-color: #F67112;
    --secondary-color: #10b981;
    --accent-color: #00d2ff;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(0, 0, 0, 0.06);
    --card-hover-bg: rgba(255, 255, 255, 0.95);
    --nav-height: 80px;
    --max-width: 1200px;
}



/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

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

body {
    background-color: #f3f4f6;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    /* Faint 'sudipta' watermark pattern */
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='50' viewBox='0 0 100 50'%3E%3Cg font-family='sans-serif' font-size='8' fill='rgba(0,0,0,0.06)' font-weight='600' letter-spacing='1'%3E%3Ctext x='5' y='20'%3Esudipta%3C/text%3E%3Ctext x='55' y='45'%3Esudipta%3C/text%3E%3C/g%3E%3C/svg%3E");
    background-attachment: fixed;
}


a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1,
h2,
h3,
h4 {
    line-height: 1.2;
}

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

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

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* ==========================================================================
   Layout & Reusables
   ========================================================================== */
.section-padding {
    padding: 6rem 2rem;
}

main {
    max-width: var(--max-width);
    margin: 0 auto;
}

/* ==========================================================================
   Stacked Card Scroll Effect
   ========================================================================== */
section {
    position: sticky;
    top: 0;
    min-height: 100vh;
    background: #fdfdfd; /* Solid background for performance */
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 30px 30px 0 0;
    box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.04);
    will-change: transform;
    transform: translateZ(0); /* Hardware acceleration */
}

#home { z-index: 1; border-radius: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; border-top: none; }
#about { z-index: 2; }
#skills { z-index: 3; }
#experience { z-index: 4; }
#projects { z-index: 5; }
#education { z-index: 6; }
#contact { z-index: 7; }

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    background: var(--glass-bg-hover);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border-color: rgba(246, 113, 18, 0.3);
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.primary-btn {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.5);
}

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

.secondary-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
    transform: translateY(-3px);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(215, 215, 215, 0.35);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 65px;
    width: auto;
}

.logo-text {
    font-family: 'Dancing Script', cursive;
    font-size: 2.2rem;
    font-weight: 700;
    color: #000;
}

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-cta {
    background: #000000;
    color: #ffffff !important;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-cta:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(246, 113, 18, 0.3);
}

.nav-links li a {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    transition: color 0.3s ease;
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(to right, #f97316, #10b981);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--primary-color);
}

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

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

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    padding-top: var(--nav-height);
}

.hero-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    width: 100%;
}

.hero-content {
    flex: 1;
    max-width: 650px;
}

.hero-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    max-width: 380px;
    aspect-ratio: 1;
}

.image-glow {
    position: absolute;
    width: 105%;
    height: 105%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--primary-color), var(--accent-color), var(--secondary-color), var(--primary-color));
    filter: blur(15px);
    z-index: 0;
    opacity: 0.8;
    animation: spin 5s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hero-image-wrapper:hover .image-glow {
    filter: blur(25px);
    opacity: 1;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 6px solid var(--bg-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 1;
    transition: all 0.4s ease;
    background: var(--glass-bg);
}

.profile-img.img-top {
    position: absolute;
    top: 0;
    left: 0;
    animation: crossfade 6s infinite alternate ease-in-out;
}

@keyframes crossfade {

    0%,
    30% {
        opacity: 1;
    }

    70%,
    100% {
        opacity: 0;
    }
}

.hero-image-wrapper:hover .profile-img {
    transform: scale(1.03) rotate(-3deg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 210, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.05);
}

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

.name {
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(90deg,
            var(--text-color) 0%,
            var(--primary-color) 25%,
            #8b5cf6 50%,
            var(--primary-color) 75%,
            var(--text-color) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: flowColor 6s linear infinite;
    transition: transform 0.3s ease, letter-spacing 0.3s ease;
    display: inline-block;
}

.name:hover {
    transform: scale(1.02);
    letter-spacing: 2px;
}

@keyframes flowColor {
    to {
        background-position: 200% center;
    }
}

.title {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-muted);
    min-height: 3rem;
    /* Prevents layout shift during typing */
}

/* Typing cursor */
.typewrite>.wrap {
    border-right: 0.08em solid var(--primary-color);
    padding-right: 5px;
    animation: blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: var(--primary-color);
    }
}

.summary {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: #fff;
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 210, 255, 0.4);
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

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

.about-text p {
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.personal-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.info-item span {
    font-weight: 600;
    color: var(--text-color);
    margin-right: 0.5rem;
}

.info-item {
    color: var(--text-muted);
}

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

.skill-category h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-color);
}

.skill-category h3 i {
    color: var(--primary-color);
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-list li {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.95rem;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.skill-list li:hover {
    background: rgba(0, 210, 255, 0.1);
    color: var(--text-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* ==========================================================================
   Timeline (Experience & Education)
   ========================================================================== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    width: 2px;
    background: var(--glass-border);
    border-radius: 2px;
}


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

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

.timeline-dot {
    position: absolute;
    left: -37px;
    /* 50px - 20px - offset */
    top: 30px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid var(--bg-color);
    box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.2);
}

.timeline-content h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

.timeline-content .date {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.timeline-content ul {
    list-style-type: disc;
    padding-left: 1.2rem;
    color: var(--text-muted);
}

.timeline-content ul li {
    margin-bottom: 0.5rem;
}

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

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.tech-stack {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

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

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--primary-color);
}

.project-link i {
    transition: transform 0.3s ease;
}

.project-link:hover i {
    transform: translateX(5px);
}

/* ==========================================================================
   Education & Certifications Section
   ========================================================================== */
.edu-cert-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.col-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-color);
}

.col-title i {
    color: var(--primary-color);
}

.cert-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.cert-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.cert-item p {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
}

@media (max-width: 900px) {
    .edu-cert-container {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

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

.info-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-items .item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-items .item i {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: rgba(0, 210, 255, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}

.info-items .item p {
    color: var(--text-muted);
    font-size: 1rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
}

.submit-btn {
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 800px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background: #111827;
    /* Deep slate dark background */
    padding: 4rem 2rem;
    border-top: 4px solid var(--primary-color);
    text-align: center;
    position: relative;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.footer-logo img {
    height: 80px;
    width: auto;
    filter: grayscale(1) invert(1) brightness(2);
}

.footer-logo .logo-text {
    font-family: 'Dancing Script', cursive;
    font-size: 2.8rem;
    font-weight: 700;
    color: #ffffff;
}

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

.footer-content p {
    color: #9ca3af;
    font-size: 0.95rem;
}

footer .social-links a {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

footer .social-links a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(246, 113, 18, 0.3);
}

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

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

/* ==========================================================================
   Responsive Design (Mobile)
   ========================================================================== */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        background: rgba(5, 5, 5, 0.95);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2.5rem;
        transition: left 0.4s ease;
    }

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

    .nav-links li a {
        font-size: 1.2rem;
    }

    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
        padding-top: 2rem;
    }

    .hero-image-wrapper {
        margin-bottom: 2rem;
        max-width: 300px;
    }

    .hero-cta {
        flex-direction: column;
        justify-content: center;
    }

    .hero-cta .btn {
        width: 100%;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}