/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

/* Global Styles */
body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(120deg, #87CEEB, #E0FFFF); /* Vibrant, colorful background */
    color: #333;
    margin: 0;
    padding: 0;
}

/* Container */
.container {
    width: 70%;
    max-width: 900px;
    margin: auto;
    background: rgba(255, 255, 255, 0.9);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2);
    animation: fadeIn 2.5s ease-out; /* Slower fade-in */
}

/* Fade-in Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
header {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 30px; /* Adds space below the header */
    background: linear-gradient(45deg, #005f73, #0a9396);
    color: white;
    border-radius: 15px 15px 10px 10px; /* Rounded bottom corners */
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 2.5em;
    margin-bottom: 5px;
}

h2 {
    color: #005f73;
    border-bottom: 2px solid #0a9396;
    padding-bottom: 5px;
}

/* List Styling */
ul {
    list-style-type: disc;
    padding-left: 20px;
}

li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Section Styling for Key Skills, Experience, Education, Certifications */
.skills, .experience, .education, .certifications, .objective {
    max-height: 120px; /* Show 3-5 lines initially */
    overflow: hidden;
    transition: max-height 1.5s ease-in-out, transform 0.5s ease-out;
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.1);
}

/* Ensure Key Skills and Certifications sections show at least 1-2 lines */
.skills, .certifications {
    max-height: 100px; /* Ensuring 1-2 lines show */
}

/* Section after hover */
.skills::after, .experience::after, .education::after, .certifications::after, .objective::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
}

/* Hover Effects for All Sections (Skills, Experience, Education, Certifications, Objective) */
.skills:hover, .experience:hover, .education:hover, .certifications:hover, .objective:hover {
    max-height: 1000px; /* Expand the section */
    transform: scale(1.03); /* Smooth scale */
}

/* Reveal each list item with a delay for Skills, Experience, Education, and Certifications */
.skills li, .experience li, .education li, .certifications li {
    opacity: 0;
    transform: translateY(10px); /* Initially move items slightly down */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

/* When hovered, reveal each list item */
.skills:hover li, .experience:hover li, .education:hover li, .certifications:hover li {
    opacity: 1;
    transform: translateY(0);
}

/* Add a delay for each list item to make them appear one by one */
.skills li:nth-child(1), .experience li:nth-child(1), .education li:nth-child(1), .certifications li:nth-child(1) {
    transition-delay: 0.1s;
}

.skills li:nth-child(2), .experience li:nth-child(2), .education li:nth-child(2), .certifications li:nth-child(2) {
    transition-delay: 0.2s;
}

.skills li:nth-child(3), .experience li:nth-child(3), .education li:nth-child(3), .certifications li:nth-child(3) {
    transition-delay: 0.3s;
}

.skills li:nth-child(4), .experience li:nth-child(4), .education li:nth-child(4), .certifications li:nth-child(4) {
    transition-delay: 0.4s;
}

.skills li:nth-child(5), .experience li:nth-child(5), .education li:nth-child(5), .certifications li:nth-child(5) {
    transition-delay: 0.5s;
}

/* Typing Effect */
.typing-container {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    border-right: 2px solid;
    animation: typing 2.5s steps(30, end), blink-caret 1s step-end infinite; /* Slow typing and blinking */
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: black; }
}

/* Footer */
footer {
    text-align: center;
    padding: 15px;
    background: linear-gradient(45deg, #005f73, #0a9396);
    color: white;
    border-radius: 0 0 15px 15px;
}

/* Objective Section: Fix alignment */
.objective {
    background-color: rgba(255, 255, 255, 0.95);
    transition: background 0.5s ease-in-out, box-shadow 0.5s ease-in-out;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: justify; /* Fixed alignment */
}

/* Hover Effect for Objective */
.objective:hover {
    background-color: rgba(0, 95, 115, 0.1);
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2);
}

/* Remove extra space for <p> tags and align with <li> in Key Skills & Certifications */
.skills p, .certifications p {
    list-style-type: disc;
    margin: 0; /* Remove margin */
    padding: 0; /* Remove padding */
    line-height: 1.5; /* Maintain readability */
}

.skills p::before, .certifications p::before {
    content: "•";
    margin-right: 10px;
    font-weight: bold;
    font-size: 1.2em;
    color: #005f73;
}

/* Ensure first list item is always visible */
.skills .always-visible, .certifications .always-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}