body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(45deg, #5a5a5c 45%, #000000 100%);
    color: white;
    text-align: center;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    min-height: 100vh; /* Ensure full height */
}

@media (min-width: 768px) {
    body {
        font-size: 18px; /* slightly larger font on tablets and above */
    }
}

@media (min-width: 992px) {
    body {
        font-size: 20px; /* comfortable reading size on desktops */
    }
}

.container {
    width: 90%;
    max-width: 960px;
    margin: auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    border-radius: 8px;
    position: relative; /* Added to ensure proper stacking context */
    z-index: 1; /* Ensures the container is above the background but below the navbar */
}


.profile-pic {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: url('./profile-photo.png') center center no-repeat;
    background-size: cover;
    margin: auto;
}

h1 {
    font-weight: 500;
    margin: 20px 0;
}

.subtitle {
    font-weight: 400;
    margin-bottom: 20px;
}

.social-icons {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.social-icons li {
    display: inline;
    margin: 0 10px;
}

.social-icons a {
    color: white;
    text-decoration: none;
    font-size: 24px;
}

.navigation {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    font-weight: 400;
    text-align: center;
}

.navigation li {
    display: inline-block;
    margin: 0 10px;
}

.navigation a {
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    display: block; /* Make the anchor element a block-level element */
    padding: 10px 20px; /* Move padding to the <li> element */
}

.navigation a.active,
.navigation a:hover {
    background-color: #4CA1AF;
}


.footer {
    font-size: 14px;
    margin-top: 50px;
}

.about-profile-pic {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-size: cover;
    margin: auto;
}

h1, h2, h3 {
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}



.bio{
    background-color: rgba(255, 255, 255, 0.1); 
    color: white;
    padding: 20px;
    margin: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}
.bio p{
    text-align: justify;
}


.timeline {
    position: relative;
    padding: 20px 0;
    margin-top: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    width: 2px;
    height: 100%;
    background: #fff;
    display: none; /* Initially hide the timeline on all screens */
}

.timeline-item {
    position: relative;
    width: 100%; /* Full width on small screens */
    padding: 10px 40px; /* Padding applied on all screen sizes */
    box-sizing: border-box;
}

.timeline-icon {
    display: inline-block;
    width: 30px;
    height: 30px;
    background: #4CA1AF;
    border-radius: 50%;
    line-height: 30px;
    text-align: center;
    color: #fff;
    box-shadow: 0 0 0 4px #2C3E50;
    position: absolute;
    left: 50%; /* Center icons on the timeline */
    transform: translateX(-50%); /* Correctly center the icon */
    z-index: 2;
}

.timeline-content {
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 10px 20px;
    color: #fff;
    text-align: left;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    width: 100%;
     /* Adjust width to account for padding */
}

@media (min-width: 992px) {
    .timeline::before {
        display: block; /* Only display the timeline on larger screens */
    }

    .timeline-item {
        width: 50%; /* Set width to 50% for larger screens */
    }

    .timeline-item:nth-child(odd) {
        left: 0;
    }

    .timeline-item:nth-child(even) {
        left: 50%;
    }

    .timeline-icon {
        left: auto; /* Remove specific left positioning on larger screens */
    }

    .timeline-content.right {
        text-align: right;
    }
}


.active {
    background-color: #4CA1AF;
    border-radius: 6px;
    padding: 2px;
}

.projects-section, .certificates-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 3%;
    border-radius: 8px;
    margin: 20px 0;
}

.project-card, .certificate-card {
    background: rgba(0, 0, 0, 0.2);
    margin: 10px 0;
    padding: 10px;
    display: flex;
    flex-direction: column;
    width: 100%; /* Full width on smaller screens */
    height: auto;
    border-radius: 8px;
    align-items: center;
}

@media (min-width: 768px) {
    .project-card, .certificate-card {
        flex-direction: row; /* revert to horizontal layout on larger screens */
    }
}

.project-card img, .certificate-card img {
    width: 200px;
    height: auto;
    border-radius: 8px;
    margin-right: 15px;
}

.project-info, .certificate-info {
    flex-grow: 1;
}


.skills-section h2{
    color: #000000;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.skills-gallery {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

@media (min-width: 768px) {
    .skills-gallery {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
        justify-content: center; /* Centers the grid items horizontally */
    }
}

@media (min-width: 992px) {
    .skills-gallery {
        grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); 
    }
}

.skills-section {
    background: #f8f8f1;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 8px;
    display: flex; /* Makes the section a flex container */
    flex-direction: column; /* Stacks the h2 and canvas vertically */
    align-items: center; /* Centers the items horizontally */
    text-align: center; /* Centers the text */
}

.chart-container {
    width: 100%; /* Full width of its parent to maintain responsiveness */
    height: 300px; /* Fixed height for canvas */
    display: flex; /* Flexbox for centering content */
    justify-content: center; /* Center the canvas horizontally */
    align-items: center; /* Center the canvas vertically */
}

canvas {
    max-width: 100%; /* Ensures the canvas is responsive and does not overflow its container */
    height: auto; /* Maintains aspect ratio */
}

.chart-container {
    width: 100%;
    height: 300px; /* Adjust based on your preference */
}

.contact-section, .social-section, .map-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.contact-form input, .contact-form textarea, .contact-form button {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 6px;
    border: none;
}

.contact-form button {
    background-color: #4CA1AF;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact-form button:hover {
    background-color: #357f8a;
}

.social-icons {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.social-icons li {
    display: inline;
    margin: 0 10px;
}

.social-icons a {
    color: white;
    text-decoration: none;
    font-size: 24px;
}

.map {
    text-align: center;
}

@media (max-width: 768px) {
    .container {
        padding: 0; /* Remove padding from the container */
    }

    .bio {
        width: 100%; /* Set the width to 100% */
        margin: 0; /* Remove any margin */
        padding: 10px; /* Optional: Add padding inside the .bio for better text readability */
        background-color: transparent;
    }

    .bio-about-me {
        padding: 0; /* Remove padding around the .bio-about-me section */
        padding-right: 15px;
    }
}