body {
    font-family: Arial, sans-serif;
    background-color: #F0F0F0;
    color: #333333;
    margin: 0;
    padding: 0;
}

.container {
    width: 80%;
    margin: 0 auto;
}

/* For better text rendering on mobile */
body, p {
    font-size: 1em;
    line-height: 1.5em; /* Adjust for better readability */
    word-wrap: break-word; /* Prevents words from overflowing */
    text-align: justify; /* Helps to align text without big spaces */
}

/* Header Section */
header {
    background: linear-gradient(135deg, #1A1A2E 0%, #283c86 100%);
    color: white;
    padding: 50px 0;
    text-align: center; /* Centers all text inside the header */
    position: relative;
}

header h1 {
    font-size: 3em;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0;
    color: white; /* Set title color to white */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* Optional: Keep the shadow for depth */
}

header p {
    font-size: 1.5em;
    font-weight: 400;
    letter-spacing: 1px;
    margin: 10px 0 0 0; /* Removes default margin on the bottom */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    text-align: center; /* Ensure the text is centered */
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
    display: flex;
    justify-content: center; /* Ensures the nav items are centered */
    gap: 30px;
}

nav ul li {
    display: inline;
}

nav ul li a {
    color: #00ADB5;
    text-decoration: none;
    font-weight: bold;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #FF5722;
}

nav ul li a::after {
    content: '';
    display: block;
    height: 3px;
    width: 0;
    background-color: #FF5722;
    transition: width 0.3s ease;
    position: absolute;
    bottom: 0;
    left: 0;
}

nav ul li a:hover::after {
    width: 100%;
}



section {
    padding: 40px 0;
    background-color: white;
    margin-bottom: 20px;
}

section h2 {
    font-size: 2em;
    color: #1A1A2E;
}

/* Skills Section */
#skills ul {
    list-style: none;
    padding: 0;
}

#skills ul li {
    background-color: #00ADB5;
    color: white;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
}

/* Experience Section */
.experience-item {
    margin-bottom: 20px;
}

.experience-item h3 {
    margin: 0;
    color: #1A1A2E;
}

.experience-item p {
    margin: 5px 0;
    color: #333333;
}

/* Form Section */
form {
    display: flex;
    flex-direction: column;
}

form label {
    margin-bottom: 5px;
    font-weight: bold;
}

form input, form textarea {
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

form input[type="submit"] {
    background-color: #00ADB5;
    color: white;
    border: none;
    cursor: pointer;
}

form input[type="submit"]:hover {
    background-color: #FF5722;
}

footer {
    background-color: #1A1A2E;
    color: white;
    text-align: center;
    padding: 10px 0;
}

/* About Me Section */
#about {
    position: relative;
    background-color: #1A1A2E;
    color: white;
    padding: 60px 0;
    overflow: hidden;
}

#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.container {
    position: relative;
    z-index: 2; /* Ensures that content is above the particle background */
}

.about-content {
    display: block;
    animation: fadeInUp 1.5s ease-in-out;
    text-align: justify; /* Ensure content is justified */
}

.about-image {
    float: left; /* Floats the image to the left */
    margin-right: 15px; /* Margin between the image and text */
    margin-bottom: 15px; /* Adds bottom margin to ensure text flows naturally */
    max-width: 200px; /* Limits the image width */
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Ensure consistent line height and spacing */
.intro-text {
    font-size: 1.2em;
    line-height: 1.6; /* Control spacing between lines */
    word-spacing: 0.05em; /* Optional: to control word spacing */
}

/* Fix font size for highlighted text */
.highlight {
    color: #FF5722;
    font-weight: bold;
    font-size: inherit;
    position: relative; /* Ensure the underline is relative to the highlighted text */
}

/* Adjusted animated underline */
.highlight::before {
    content: '';
    position: absolute;
    bottom: -3px; /* Adjust the vertical position of the underline */
    left: 0;
    width: 0%;
    height: 2px;
    background-color: #00ADB5;
    transition: width 0.3s ease-in-out;
}

.highlight:hover::before {
    width: 100%; /* Underline animates across the entire width of the text */
}


/* Social Links Styling */
.social-links {
    margin-top: 20px;
}

.social-links a {
    color: white;
    font-size: 24px;
    margin-right: 15px;
    text-decoration: none;
    display: inline-block;
}

.social-links a:hover {
    color: #FF5722;
}

.social-links a i {
    margin-right: 8px;
}

/* FadeInUp animation */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .about-image {
        float: none; /* Disable float on smaller screens */
        display: block;
        margin: 0 auto 20px auto; /* Center the image */
        max-width: 100%; /* Scale the image on mobile */
    }

    .social-links a {
        font-size: 20px; /* Adjust icon size for mobile */
    }
}

/* Skills and Experience Section */
/* Skills Section */
#skills {
    background-color: #f9f9f9;
    padding: 60px 0;
    text-align: center;
}

#skills h2 {
    color: #1A1A2E;
    margin-bottom: 40px;
}

.skills-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.skill-item {
    background-color: #00ADB5;
    color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    min-width: 200px;
    text-align: center;
    flex: 1 1 200px; /* Ensures that the skills wrap properly */
}

.skill-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.skill-item span {
    display: block;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.skill-item i {
    font-size: 2em;
    margin-bottom: 10px;
    color: #FF5722;
    transition: color 0.3s ease;
}

.skill-item:hover i {
    color: #FFD700;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.skill-item {
    animation: fadeIn 1s ease-in-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.skill-item:nth-child(1) {
    animation-delay: 0.2s;
}

.skill-item:nth-child(2) {
    animation-delay: 0.4s;
}

.skill-item:nth-child(3) {
    animation-delay: 0.6s;
}

.skill-item:nth-child(4) {
    animation-delay: 0.8s;
}

.skill-item:nth-child(5) {
    animation-delay: 1s;
}


/* Contact Section */
#contact {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.contact-form, .contact-details {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centers content vertically */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-form {
    background-color: #ffffff; /* Light background for the form */
}

.contact-form:hover, .contact-details:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.contact-details {
    background-color: #1A1A2E;
    color: white;
}

.contact-details h2, .contact-form h2 {
    margin-bottom: 20px;
    font-size: 2em;
    text-align: center;
}

.contact-details h2 {
    color: #FF5722;
}

.contact-details p {
    display: flex;
    align-items: center;
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #ffffff;
}

.contact-details p i {
    margin-right: 10px;
    color: #00ADB5;
    font-size: 1.5em;
    transition: color 0.3s ease;
}

.contact-details p:hover i {
    color: #FFD700;
}

.contact-details p:hover {
    color: #FFD700;
}

/* Form Styling */
.contact-form form {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Ensures the form fills the column */
}

.contact-form form label {
    margin-bottom: 5px;
    font-weight: bold;
    color: #333333;
}

.contact-form form input, .contact-form form textarea {
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    flex-grow: 1;
}

.contact-form form input[type="submit"] {
    background-color: #00ADB5;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact-form form input[type="submit"]:hover {
    background-color: #FF5722;
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
    .contact-content {
        flex-direction: column;
    }

    .contact-form, .contact-details {
        margin-top: 20px;
        width: 100%;
    }
}


/* Responsive Design */
@media (max-width: 768px) {
    .contact-content {
        flex-direction: column;
    }

    .contact-form, .contact-details {
        margin-top: 20px;
    }
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    /* Remove or adjust justifications if it creates issues on small screens */
    .intro-text {
        text-align: left;
    }

    /* Adjust line heights and font sizes for smaller screens */
    body, p {
        font-size: 0.95em;
        line-height: 1.4;
    }
}
