/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Roboto:wght@400;500&display=swap');

/* CSS Variables for easy theme management */
:root {
    --primary-color: #00a8ff; /* Vibrant Blue Accent */
    --background-color: #1a1a2e; /* Deep Navy Background */
    --card-background: #1f1f38; /* Slightly lighter navy for cards */
    --text-color: #e0e0e0; /* Light gray for text */
    --heading-color: #ffffff; /* White for headings */
    --shadow-color: rgba(0, 168, 255, 0.1);
    --border-color: #2a2a4a;
    
}

/* Global Styles & Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    background-image: url('data:image/svg+xml,%3Csvg width="6" height="6" viewBox="0 0 6 6" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="%239C92AC" fill-opacity="0.1" fill-rule="evenodd"%3E%3Cpath d="M5 0h1L0 6V5zm1 6v-1L1 0h1z"/%3E%3C/g%3E%3C/svg%3E');
    color: var(--text-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative; /* Ensure container is positioned for particle canvas */
    z-index: 2; /* Ensure content is above particles */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--heading-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.2rem; text-align: center; margin-bottom: 3rem; }
h3 { font-size: 1.5rem; color: var(--primary-color); }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #007bff;
}

section {
    padding: 6rem 0;
    border-bottom: 1px solid var(--border-color);
    position: relative; /* Needed for absolute positioning of particles */
    overflow: hidden; /* Hide overflowing particles */
}

/* Particles.js container */
.particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1; /* Behind the content */
}

/* Header & Navigation */
header {
    background-color: rgba(26, 26, 46, 0.85);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.8rem;
    margin: 0;
    margin-left: -20px; /* Move name slightly left */
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

nav a {
    color: var(--text-color);
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

nav a:hover, nav a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Hero/About Section */
.hero-section {
    text-align: left;
    padding-top: 4rem;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.hero-text {
    flex: 2;
}

.hero-text h2 {
    text-align: left;
    margin-bottom: 1rem;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    border-radius: 50%;
    border: 5px solid var(--primary-color);
    box-shadow: 0 0 20px var(--shadow-color);
}

#typed-text {
    color: var(--primary-color);
    font-weight: 600;
}

.typed-description {
    font-size: 1.2rem;
    margin-top: 1.5rem;
}



/* Card Layout */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    list-style: none;
    padding: 0;
}

.card {
    background-color: var(--card-background);
    border-radius: 10px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 30px var(--shadow-color);
}

.card h3 {
    margin-bottom: 0.5rem;
}

.card p {
    font-size: 0.95rem;
}

.publication-details, .certificate-details, .project-technologies {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.publication-link, .certificate-link, .project-link, .resume-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.2rem;
    background-color: var(--primary-color);
    color: var(--heading-color);
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.publication-link:hover, .certificate-link:hover, .project-link:hover, .resume-link:hover {
    background-color: #007bff;
    color: var(--heading-color);
}

/* What I Do Section */
#what-i-do .card .icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Skills Section */
.skills-category {
    margin-bottom: 2rem;
}

.skills-category h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--heading-color);
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    list-style: none; /* Ensure no bullets for skills list */
    padding: 0;
}

.skill {
    background-color: var(--card-background);
    color: var(--primary-color);
    padding: 0.7rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    border: 1px solid var(--primary-color);
    transition: background-color 0.3s, color 0.3s;
}

.skill:hover {
    background-color: var(--primary-color);
    color: var(--heading-color);
}

/* Resume Section */
#resume {
    background-color: var(--card-background);
    border-radius: 10px;
    text-align: center;
    padding: 3rem;
}

/* Contact Form */
#contact-form {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#contact-form input,
#contact-form textarea {
    width: 100%;
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    background-color: var(--card-background);
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

#contact-form button {
    padding: 1rem;
    border: none;
    border-radius: 5px;
    background-color: var(--primary-color);
    color: var(--heading-color);
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#contact-form button:hover {
    background-color: #007bff;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    background-color: var(--card-background);
    margin-top: 4rem;
}

.social-links {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-color);
    font-size: 38px; /* Slightly increased size for Font Awesome icons */
    transition: color 0.3s ease;
    display: flex; /* Use flex for better alignment */
    align-items: center; /* Center items vertically */
    justify-content: center; /* Center items horizontally */
    line-height: 1; /* Ensure consistent line height */
}

.social-links a:hover {
    color: var(--primary-color);
}

.social-icon {
    width: 38px; /* Match the new font-size of Font Awesome icons */
    height: 38px; /* Match the new font-size of Font Awesome icons */
    object-fit: contain; /* Ensure image scales properly within its bounds */
}

/* Scroll to top button */
#scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: var(--heading-color);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1000;
    transition: opacity 0.3s, transform 0.3s;
    opacity: 0;
    transform: translateY(20px);
}

#scroll-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animations */
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text h2 {
        text-align: center;
    }

    .hero-image {
        margin-top: 2rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    header .container {
        flex-direction: column;
        gap: 1rem;
    }
}
