:root {
    --background-color: #f7f9fc;
    --light-text-color: #ffffff;
    --font-family: 'Arial', sans-serif;
    --max-width: 1200px;
    --padding-section: 60px 20px;
    --border-radius: 8px;
}

body {
    margin: 0;
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.hero-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--padding-section);
    min-height: 70vh;
}

.hero-content {
    flex: 1;
    padding-right: 40px;
}

.hero-title {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.hero-tagline {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-top: 0;
    margin-bottom: 2rem;
    font-weight: 300;
}

.hero-summary {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

/* 4. Image Styling */
.hero-image-container {
    flex-shrink: 0;
    width: 25%;
    min-width: 230px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease;
}

.hero-image-container:hover{
    transform: scale(1.05);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: #1a4d85;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    transform: translateY(-2px);
}


.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 40px;
    padding-top: 20px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 8px auto 0;
    border-radius: 2px;
}

/* My Skill's Section Layout */
.skills-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--padding-section);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid */
    gap: 30px;
}

.skill-category {
    background-color: #ffffff;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    border-left: 5px solid var(--primary-color);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.skill-category h3 {
    color: var(--secondary-color);
    font-size: 1.4rem;
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.skill-item {
    padding: 8px 15px;
    background-color: #e0eaf4;
    color: var(--text-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
    cursor: default;
}

.skill-item:hover {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    transform: scale(1.05);
}

/* Highlight for Key Skills (e.g., Django) */
.skill-focus {
    background-color: var(--primary-color);
    color: var(--light-text-color);
}

.skill-focus:hover {
    background-color: var(--secondary-color);
}



/* 1. Certification Section Layout */
.certificates-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--padding-section);
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.cert-card {
    display: flex;
    background-color: #ffffff;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s, transform 0.3s;
    text-align: center;
    border-top: 3px solid var(--secondary-color);
    flex-direction: column;
    justify-content: space-between;
}

.cert-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.cert-card h3 {
    color: var(--primary-color);
    margin-top: 0;
    font-size: 1.25rem;
}

.cert-card p {
    margin: 5px 0;
    font-size: 0.95rem;
}

.view-cert-btn {
    background-color: var(--secondary-color);
    color: var(--light-text-color);
    border: none;
    padding: 10px 20px;
    margin-top: 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.view-cert-btn:hover {
    background-color: #2e5988;
}

/* 2. Modal (Image Pop-up) Styling */
.modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.modal.open {
    opacity: 1;
    visibility: visible;
}

.modal-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 900px;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal.open .modal-wrapper {
    transform: scale(1);
}

.modal-content {
    display: block;
    width: 100%;
    max-height: 85vh;
    object-fit: contain;
}

#caption {
    width: 100%;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
}

.close-btn {
    position: absolute;
    top: -30px;
    right: -30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: #bbb;
    text-decoration: none;
}

@keyframes zoom {
    from {transform: scale(0)}
    to {transform: scale(1)}
}

@media only screen and (max-width: 700px){
    .modal-content {
        width: 95%;
    }
}


/* profile section layout */
.coding-profile-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--padding-section);
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.profile-card {
    display: block;
    background-color: #ffffff;
    padding: 30px;
    border-radius: var(--border-radius);
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border-bottom: 5px solid var(--primary-color);
}


.profile-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.profile-card h3 {
    margin-top: 0;
    font-size: 1.6rem;
    color: var(--primary-color);
    border-bottom: 2px dashed #eee;
    padding-bottom: 10px;
}

.total-solved {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 15px 0 10px 0;
}

.total-solved span {
    color: var(--secondary-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.details-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.95rem;
}

.details-list li {
    padding: 5px 0;
    border-bottom: 1px dotted #e0e0e0;
}

.details-list li:last-child {
    border-bottom: none;
}

.card-link {
    margin-top: 20px;
    font-weight: bold;
    color: var(--secondary-color);
    transition: color 0.3s;
}

.profile-card.hackerrank { border-color: #00cd62; }
.profile-card.hackerrank h3 { color: #00cd62; }

.profile-card.gfg { border-color: #2da44e; }
.profile-card.gfg h3 { color: #2da44e; }

.profile-card.leetcode { border-color: #ffc01f; }
.profile-card.leetcode h3 { color: #ffc01f; }

.profile-card.github { border-color: #161b22; }
.profile-card.github h3 { color: #161b22; }


/* contact section layout */
.contact-section-simple {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--padding-section);
    text-align: center;
}

.contact-section-simple .section-title {
    margin-bottom: 50px;
}

.contact-item-simple {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 5px 0;
}

.contact-item-simple:hover {
    color: var(--primary-color);
}

.icon-simple {
    font-size: 1.5rem;
    margin-right: 15px;
    color: var(--secondary-color);
    width: 20px;
    text-align: center;
}

.contact-item-simple:hover .icon-simple {
    color: var(--primary-color);
}

@media (max-width: 600px) {
    .contact-item-simple {
        font-size: 1.1rem;
    }
}

/* Projects Section layout */
.projects-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--padding-section);
}

.projects-row-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.project-card {
    flex: 1;
    min-width: 280px;
    background-color: #ffffff;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 5px solid; /* Theme color will be set by JS */
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card h3 {
    margin: 0;
    font-size: 1.4rem;
}

.project-tagline {
    margin: 5px 0 15px 0;
    color: var(--text-color);
    font-size: 0.95rem;
}

.card-toggle-btn {
    align-self: flex-end;
    margin-top: auto;
    font-size: 1.5rem;
    transition: transform 0.3s;
    color: var(--text-color);
}

.project-card.active {
    box-shadow: 0 0 0 3px currentColor; /* Highlight active card using JS-set theme color */
}

.project-card.active .card-toggle-btn {
    transform: rotate(180deg);
}

.project-details-expanded {
    height: 0;
    overflow: hidden;
    transition: height 0.6s ease-in-out, padding 0.6s ease-in-out;
    background-color: #fcfcfc;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-top: 5px solid rgb(0, 176, 82); /* Theme color will be set by JS */
}

.project-details-expanded.open {
    padding: 30px;
}

.details-content {
    display: flex;
    gap: 40px;
    padding-bottom: 20px;
}

.details-left {
    flex: 2;
}

.details-right {
    flex: 1.5;
    min-width: 350px;
}

.project-details-expanded h4 {
    color: var(--secondary-color);
    margin-top: 0;
    font-size: 1.3rem;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 10px;
}

.project-description {
    margin-bottom: 20px;
}

.features-block {
    margin: 20px 0;
}

.features-block h5 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 8px;
}

.features-list {
    list-style: disc;
    margin-left: 20px;
}

.features-list li {
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.tech-stack {
    font-weight: 500;
    margin: 10px 0;
}

.project-links {
    margin-top: 32px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 17px;
}

.link-btn {
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s;
    border: 2px solid;
}

.github-btn {
    background-color: #161b22;
    color: var(--light-text-color);
    border-color: #161b22;
}
.github-btn:hover { background-color: #333; }

.live-btn {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    border-color: var(--primary-color);
}
.live-btn:hover { background-color: var(--secondary-color); }

.demo-btn {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.demo-btn:hover {
    background-color: var(--primary-color);
    color: var(--light-text-color);
}

.image-gallery {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.gallery-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.gallery-image {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    object-fit: cover;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 10;
    transition: background 0.3s;
}

.gallery-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.prev-btn { left: 0; border-radius: 0 5px 5px 0; }
.next-btn { right: 0; border-radius: 5px 0 0 5px; }

.gallery-caption {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-color);
    margin-top: 10px;
    font-weight: 500;
}

@media (max-width: 900px) {
    .details-content {
        flex-direction: column;
    }

    .details-right {
        order: -1;
        min-width: 100%;
    }
}

@media (max-width: 900px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        min-height: auto;
    }

    .hero-content {
        order: 2;
        padding-right: 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-tagline {
        font-size: 1.2rem;
    }

    .hero-image-container {
        order: 1;
        margin-bottom: 30px;
    }

    .hero-links {
        justify-content: center;
    }
}
