/* ========================================= */
/* === 1. Base and Global Styles === */
/* ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

html, body {
    background: #f5f8ff;
    color: #333;
    overflow-x: hidden;
}

a, .btn, .project-card, .skills-box img, .contact-item, .content-box {
    cursor: pointer;
}

/* ========================================= */
/* === 2. Navigation Bar (Modified) === */
/* ========================================= */
nav {
    position: fixed;
    top: 20px;
    right: 30px;
    z-index: 999;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

nav a {
    margin-left: 20px;
    text-decoration: none;
    font-weight: 500;
    color: #3a63f0;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 5px;
}

nav a:hover {
    color: #2c4fd8;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    transform: none;
    width: 0;
    height: 3px;
    background-color: #3a63f0;
    border-radius: 5px;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* ========================================= */
/* === 3. Hero Section (Home) === */
/* ========================================= */
header {
    background: #f5f8ff;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.content-box {
    background: #f9fbff;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 900px;
    width: 100%;
    gap: 30px;
    flex-wrap: wrap;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

.hero-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 50px;
}

.hero-text {
    flex: 1;
    min-width: 300px;
}

.name-container {
    display: inline-block;
    position: relative;
    padding-bottom: 5px;
}

.hero-text h1 {
    font-size: 2.5rem;
    color: #222;
    white-space: nowrap;
}

.name-container .blue-text {
    color: #3a63f0;
}

.name-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: #3a63f0;
    border-radius: 5px;
}

.hero-text span {
    color: #3a63f0;
}

.hero-text p {
    margin-top: 10px;
    color: #555;
}

.hero-buttons {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-buttons a {
    padding: 10px 24px;
    background: #3a63f0;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.hero-buttons a:hover {
    background: #2c4fd8;
}

.hero-img {
    padding: 0;
    flex-shrink: 0;
}

.hero-img img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

#main-typing-container {
    margin-top: 5px;
    min-height: 30px;
    font-size: 1.5rem;
    color: #3a63f0;
    font-weight: 700;
}

#main-typing-text {
    display: inline-block;
}

#main-typing-text b {
    font-weight: 700;
}

.typed-cursor {
    display: inline-block;
    width: 3px;
    background-color: #3a63f0;
    margin-left: 3px;
    animation: blink 0.7s infinite;
    vertical-align: bottom;
    height: 1.5em;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ========================================= */
/* === 4. General Section Styles === */
/* ========================================= */
section {
    width: 100vw;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 30px 20px;
}

section h2 {
    font-size: 2.2rem;
    color: #222;
    margin-bottom: 25px;
}

/* ========================================= */
/* === 5. About Section === */
/* ========================================= */
#about {
    background: #eaf3ff;
}

#about .content-box p {
    max-width: 700px;
    font-size: 1.1rem;
    color: #444;
    line-height: 1.8;
    padding: 20px;
    text-align: justify;
}

/* ========================================= */
/* === 6. Education Section === */
/* ========================================= */
#education {
    background: #fff;
}

.education-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
    max-width: 700px;
    width: 100%;
    padding: 20px;
}

.education-item {
    background: #f9f9f9;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border-left: 5px solid #3a63f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.education-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.education-item h3 {
    color: #3a63f0;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.education-item p {
    color: #555;
    font-size: 1rem;
}

.education-item span {
    font-size: 0.9rem;
    color: #777;
}

/* ========================================= */
/* === 7. Experience Section === */
/* ========================================= */
#experience {
    background: #eaf3ff;
}

.experience-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
    max-width: 700px;
    width: 100%;
    padding: 20px;
}

.experience-item {
    background: #f9f9f9;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border-left: 5px solid #3a63f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.experience-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.experience-item h3 {
    color: #3a63f0;
    margin-bottom: 5px;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 5px;
    display: inline-block;
}

.experience-item h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: #3a63f0;
    border-radius: 5px;
    transition: width 0.3s ease;
}

.experience-item:hover h3::after {
    width: 100%;
}

.experience-item h4 {
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 5px;
}

.experience-item p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 5px;
}

.experience-item ul.responsibilities {
    list-style: disc;
    margin-left: 20px;
    padding-left: 0;
    margin-top: 10px;
}

.experience-item ul.responsibilities li {
    border-bottom: none;
    margin-bottom: 5px;
    padding-bottom: 0;
    font-size: 0.9rem;
    color: #555;
}

/* ========================================= */
/* === 8. Projects Section === */
/* ========================================= */
#projects {
    background: #fff;
}

.project-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    max-width: 1000px;
    width: 100%;
    padding-bottom: 10px;
}

.project-card {
    flex-basis: calc(33.333% - 14px);
    min-width: 300px;
    max-width: 320px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background 0.3s ease;
    text-align: left;
    flex-shrink: 0;
    box-sizing: border-box;
}

.project-card h3 {
    color: #3a63f0;
    margin-bottom: 10px;
    font-size: 1.3rem;
    position: relative;
    padding-bottom: 5px;
}

.project-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: #3a63f0;
    border-radius: 5px;
    transition: width 0.3s ease;
}

.project-card:hover h3::after {
    width: 100%;
}

.project-card p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

.project-card .details-inline {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin-top: 10px;
    margin-right: 10px;
    display: block;
    white-space: normal;
}

.project-card .details-inline:last-child {
    margin-right: 0;
}

.project-card:hover {
    transform: translateY(-5px);
    background: #e6f0ff;
}

/* ========================================= */
/* === 9. Skills Section === */
/* ========================================= */
#skills {
    background: #f0f8ff;
}

.skills-category {
    margin-bottom: 30px;
    width: 100%;
    max-width: 800px;
}

.skills-category h3 {
    font-size: 1.6rem;
    color: #3a63f0;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.skills-category h3::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 60px;
    height: 3px;
    background-color: #3a63f0;
    border-radius: 5px;
}

.skills-box {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    padding: 10px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease;
    background: #f9f9f9;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.skill-item:hover {
    transform: translateY(-5px);
}

.skill-item img {
    width: 60px;
    height: 60px;
    margin-bottom: 8px;
}

.skill-item i {
    font-size: 60px;
    color: #3a63f0;
    margin-bottom: 8px;
}

.skill-item span {
    font-size: 0.9rem;
    color: #555;
    font-weight: 500;
}

/* ========================================= */
/* === 10. Contact Section === */
/* ========================================= */
#contact {
    background: #ffffff;
    padding-bottom: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-size: 1.1rem;
    align-items: center;
}

.contact-info > p {
    max-width: 700px;
    text-align: center;
    color: #444;
    line-height: 1.8;
    margin-bottom: 10px;
}

.contact-items-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    padding: 10px;
    margin-top: 20px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #f9f9f9;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-decoration: none;
    color: inherit;
    min-width: 140px;
    position: relative;
    padding-bottom: 25px;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.contact-item i {
    font-size: 4rem;
    color: #3a63f0;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.contact-item:hover i {
    font-size: 4.2rem;
    color: #2c4fd8;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.contact-item::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: #3a63f0;
    border-radius: 5px;
    transition: width 0.3s ease;
}

.contact-item:hover::after {
    width: 60px;
}

.contact-item span {
    font-size: 1rem;
    color: #555;
    font-weight: 500;
}

.note-separator {
    width: 80%;
    max-width: 300px;
    height: 1px;
    background-color: #ddd;
    margin-top: 30px;
    margin-bottom: 15px;
}

.small-note {
    font-size: 0.85rem;
    color: #777;
    max-width: 600px;
    text-align: center;
    padding: 0 10px;
    position: relative;
    padding-bottom: 15px;
    margin-top: 5px;
}

.small-note::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background-color: #3a63f0;
    border-radius: 50%;
    display: block;
}

/* ========================================= */
/* === 11. Responsive Design === */
/* ========================================= */
/* Large Screens */
@media (max-width: 1000px) {
    .project-grid {
        max-width: 640px;
    }

    .project-card {
        flex-basis: calc(50% - 15px);
        min-width: 280px;
    }
    .name-container::after {
        height: 2px;
    }
}

/* Tablets and Phones */
@media (max-width: 768px) {
    nav {
        right: 10px;
        top: 10px;
        padding: 8px 15px;
    }

    nav a {
        margin-left: 10px;
        font-size: 0.9rem;
    }
    
    nav a::after {
        height: 2px;
    }

    .hero-content {
        flex-direction: column;
        padding: 30px;
        gap: 30px;
    }

    .hero-text {
        text-align: center;
    }
    
    .name-container {
        display: block;
    }

    .hero-text h1 {
        font-size: 2rem;
        white-space: normal;
    }

    #main-typing-container {
        font-size: 1.3rem;
    }

    .hero-img {
        padding: 15px;
    }

    .hero-img img {
        width: 150px;
        height: 150px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .hero-buttons a {
        width: 100%;
    }

    section {
        padding: 25px 15px;
    }

    section h2 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .content-box {
        padding: 20px;
        gap: 20px;
    }

    #about .content-box p {
        font-size: 1rem;
        padding: 10px;
    }

    .education-list, .experience-list {
        gap: 15px;
        max-width: 100%;
        padding: 10px;
    }

    .education-item, .experience-item {
        padding: 12px 15px;
    }

    .education-item h3, .experience-item h3 {
        font-size: 1.1rem;
    }

    .experience-item h3::after {
        height: 2px;
    }

    .education-item p, .experience-item h4 {
        font-size: 0.95rem;
    }

    .education-item span, .experience-item p {
        font-size: 0.85rem;
    }

    .experience-item ul.responsibilities li {
        font-size: 0.8rem;
    }

    .project-grid {
        max-width: 100%;
        overflow-x: hidden;
        padding-bottom: 0;
    }

    .project-card {
        flex-basis: 90%;
        max-width: 300px;
        min-width: unset;
        padding: 20px;
    }

    .project-card h3 {
        font-size: 1.3rem;
        padding-bottom: 5px;
    }

    .project-card:hover h3::after {
        width: 100%;
    }

    .project-card p {
        font-size: 0.95rem;
    }

    .project-card .details-inline {
        font-size: 0.9rem;
        margin-top: 7px;
    }

    .skills-category {
        margin-bottom: 20px;
        max-width: 100%;
    }

    .skills-category h3 {
        font-size: 1.4rem;
        margin-bottom: 15px;
        padding-bottom: 8px;
    }

    .skills-category h3::after {
        width: 50px;
        height: 2px;
    }

    .skills-box {
        gap: 20px;
        padding: 5px;
    }

    .skill-item {
        padding: 8px 12px;
    }

    .skill-item img {
        width: 50px;
        height: 50px;
    }

    .skill-item i {
        font-size: 50px;
    }

    .skill-item span {
        font-size: 0.8rem;
    }

    .contact-info > p {
        font-size: 1rem;
        padding: 0 10px;
    }

    .contact-items-grid {
        gap: 15px;
    }

    .contact-item {
        min-width: 120px;
        padding: 10px 15px;
        padding-bottom: 20px;
    }

    .contact-item i {
        font-size: 3rem;
    }

    .contact-item:hover i {
        font-size: 3.2rem;
        transform: scale(1.1) rotate(5deg);
    }

    .contact-item span {
        font-size: 0.85rem;
    }

    .contact-item::after {
        bottom: 5px;
        width: 0;
        height: 2px;
    }

    .contact-item:hover::after {
        width: 40px;
    }

    .small-note {
        padding-bottom: 10px;
    }

    .small-note::after {
        height: 1px;
    }
}

/* Smaller Phones */
@media (max-width: 480px) {
    nav {
        top: 5px;
        right: 5px;
        padding: 5px 10px;
    }

    nav a {
        margin-left: 8px;
        font-size: 0.8rem;
    }

    .hero-text h1 {
        font-size: 1.8rem;
    }

    #main-typing-container {
        font-size: 1.1rem;
    }

    .hero-img img {
        width: 120px;
        height: 120px;
    }

    section h2 {
        font-size: 1.6rem;
    }
    
    /* Further reduce padding on content boxes for very small screens */
    .content-box {
        padding: 15px;
    }
}