:root {
    --bg-color: #0a0a1a;
    --primary-color: #00bfff; /* Deep Sky Blue */
    --secondary-color: #1a1a2e;
    --text-color: #e0e0e0;
    --header-text: #ffffff;
    --font-family: 'Poppins', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1;
}

/* Header & Navigation */
header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    padding: 1rem 5%;
    background-color: rgba(10, 10, 26, 0.8);
    backdrop-filter: blur(10px);
    transition: background-color 0.3s ease;
    border-bottom: 1px solid rgba(0, 191, 255, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--header-text);
    text-decoration: none;
}

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

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--header-text);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: color 0.3s ease;
}

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

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

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

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

/* General Section Styling */
section {
    padding: 6rem 5%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    color: var(--header-text);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

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

/* Hero Section */
.hero {
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--header-text);
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

.hero .subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.social-links-hero i {
    font-size: 2rem;
    margin: 0 1rem;
    color: var(--text-color);
    transition: color 0.3s, transform 0.3s;
}

.social-links-hero i:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
}

.cta-button {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.8rem 2.5rem;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
    box-shadow: 0 0 20px var(--primary-color);
}

/* Profile Picture (DP Circle) */
.profile-picture {
    width: 150px;
    height: 150px;
    /* IMPORTANT: Replace this placeholder with your own image */
    background: url('souvick-dp.JPG') center center / cover no-repeat;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 25px rgba(0, 191, 255, 0.4);
    margin: 0 auto 2rem auto;
    animation: pulseBorder 2s infinite alternate ease-in-out, fadeInScale 1s ease-out;
}

@keyframes pulseBorder {
    from {
        box-shadow: 0 0 15px rgba(0, 191, 255, 0.3), 0 0 0 0px rgba(0, 191, 255, 0.2);
    }
    to {
        box-shadow: 0 0 35px rgba(0, 191, 255, 0.6), 0 0 0 10px rgba(0, 191, 255, 0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
}

.about-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

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

.skill-category {
    background: var(--secondary-color);
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.skill-category:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 191, 255, 0.1);
}

.skill-category h3 {
    font-size: 1.5rem;
    color: var(--header-text);
    margin-bottom: 1rem;
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.skill-category i {
    color: var(--primary-color);
    margin-right: 0.8rem;
    width: 20px;
}

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

.project-card {
    background: var(--secondary-color);
    padding: 2rem;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
    border-bottom: 3px solid transparent;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-bottom: 3px solid var(--primary-color);
}

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

.project-card p {
    flex-grow: 1;
    margin-bottom: 1rem;
}

.project-tags span {
    display: inline-block;
    background-color: rgba(0, 191, 255, 0.1);
    color: var(--primary-color);
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-top: 0.5rem;
}

/* Experience Section - Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--secondary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-dot {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: -8px;
    background-color: var(--primary-color);
    border: 3px solid var(--secondary-color);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -8px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: var(--secondary-color);
    position: relative;
    border-radius: 8px;
}

/* Contact Section */
#contact {
    text-align: center;
}
.contact-content p {
    max-width: 600px;
    margin: 1rem auto;
    font-size: 1.1rem;
}

/* Footer */
footer {
    padding: 2rem 5%;
    background-color: var(--secondary-color);
    text-align: center;
}

.footer-socials i {
    font-size: 1.5rem;
    margin: 0 1rem;
    color: var(--text-color);
    transition: color 0.3s, transform 0.3s;
}

.footer-socials i:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
}

footer p {
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Animations on Scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 60%;
        height: 100vh;
        background-color: var(--secondary-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.5s ease-in-out;
    }

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

    .nav-links li {
        margin: 2rem 0;
    }

    .hamburger {
        display: block;
        z-index: 101;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .subtitle {
        font-size: 1.2rem;
    }
    
    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-dot {
        left: 23px;
    }
}