:root {
    --bg-light: #e8f5e9;
    --bg-dark: #0d0d0d;
    --text-light: #0d0d0d;
    --text-dark: #e8f5e9;
    --text-muted: #757575;
    --accent: #1b5e20;
    --accent-light: #4caf50;
    --accent-dark: #388e3c;
    --card-bg-light: #ffffff;
    --card-bg-dark: #1e1e1e;
    --nav-link-dark: #f1f1f1;
    --nav-link-dark-hover: #1976D2;
    --border-radius: 12px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --link-light: #1976D2;
    --link-dark: #2196f3;
    --link-muted: #757575;
    --link-hover: #03a9f4;
    --link-active: #1b5e20;
    --link-focus: #1b5e20;
    --link-decoration: none;
    --link-decoration-hover: underline;
    --link-decoration-active: underline;
    --link-decoration-visited: none;
    --link-decoration-focus: underline;
    --link-font-weight: 500;
    --link-font-size: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-light);
    transition: var(--transition);
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-light);
    padding: .5rem 10%;
    margin: auto;
    height: 5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.desktop-nav a {
    margin: 0 1rem;
    text-decoration: none;
    color: var(--accent);
    font-weight: 500;
    transition: color 0.3s;
}

.desktop-nav a:hover {
    color: var(--accent-dark);
}

.mobile-nav {
    display: none;
    flex-direction: column;
    background-color: var(--bg-light);
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 999;
    padding: 1rem;
    box-shadow: var(--shadow);
}

.mobile-nav a {
    margin: 0.5rem 0;
    text-decoration: none;
    color: var(--accent);
    font-weight: 500;
}

.mobile-nav.hidden {
    display: none;
}

.mobile-nav:not(.hidden) {
    display: flex;
}

.actions {
    gap: 1rem;
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--accent);
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle .theme-icon {
    font-size: 1.2rem;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--accent);
}

.alert-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.alert-box {
    background: #fff;
    padding: 20px 30px;
    border-radius: 12px;
    text-align: center;
    max-width: 90%;
    width: 320px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.alert-icon {
    font-size: 2rem;
}

/* Alert types */
.alert-box.success {
    border-left: 6px solid #28a745;
    background-color: #e6f9ec;
}

.alert-box.error {
    border-left: 6px solid #dc3545;
    background-color: #fdecea;
}

.alert-box.info {
    border-left: 6px solid #007bff;
    background-color: #e8f0fe;
}

.alert-box button {
    margin-top: 10px;
    padding: 8px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.alert-box button:hover {
    background-color: #0056b3;
}


.main-content {
    padding-top: 6rem;
    /* Adjust based on header height */
}

h1 {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-dark);
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;

}

p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

a {
    color: var(--link-light);
    text-decoration: var(--link-decoration);
    font-weight: var(--link-font-weight);
    font-size: var(--link-font-size);
    transition: color 0.3s, text-decoration 0.3s;
}

a:hover {
    color: var(--link-hover);
    text-decoration: var(--link-decoration-hover);
}

a:active {
    color: var(--link-active);
    text-decoration: var(--link-decoration-active);
}

a:focus {
    color: var(--link-focus);
    text-decoration: var(--link-decoration-focus);
}

a:focus-visible {
    outline: 2px solid var(--link-focus);
    outline-offset: 2px;
}

a:focus:not(:focus-visible) {
    outline: none;
}


section {
    padding: 2rem 10%;
    margin: auto;
}

ul {
    padding-left: 1.2rem;
}

/* Default visibility for larger screens */
.large-screen {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.small-screen {
    display: none;
    /* Hidden by default */
}

.profile-intro {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    justify-content: center;
    align-items: start;
    margin-top: 1rem;
}

.profile-image {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
}

.profile-image img {
    width: 100%;
    max-width: 26rem;
    height: auto;
    object-fit: cover;
    background-origin: padding-box;
    border-radius: 50%;
    box-shadow: var(--shadow);
    z-index: 10;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-image img:hover {
    transform: scale(1.05);
    /* Slight zoom effect on hover */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    /* Enhanced shadow on hover */
}

.download-cv {
    margin-top: 1.5rem;
    display: inline-block;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-dark);
    background-color: var(--accent);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.download-cv:hover {
    background-color: var(--accent-dark);
    color: var(--text-dark);
    transform: scale(1.05);
}

.project,
.service,
.card {
    background-color: var(--card-bg-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.project h3,
.service h3 {
    color: var(--accent-light);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    gap: 1.5rem;
    width: 100%;
}



.grid ul li::marker {
    color: var(--accent);
}


.card:hover,
.service:hover,
.project:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);

    transform: translateY(-5px);
}

#sih h3,
#sih h4 {
    color: var(--accent-light);
    margin-bottom: 0.5rem;
}

.skill-category {
    margin-bottom: 1.5rem;
}

.skill-category h4 {
    font-size: 1.2rem;

    margin-bottom: 0.5rem;
}

.skill-category ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    line-height: 1.8;
}

.skill-category ul li {
    margin-bottom: 0.5rem;
    font-size: 1rem;

}
.contact-intro {
    text-align: start;
    padding: 0 2rem;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    
  }
  
.contact-info {
    padding: .5rem 2rem;
    margin: auto;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.form-content {
    width: 80%;
    padding: 1rem .5rem;
    margin: auto;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.form-content input {
    background: var(--bg-light);
    border: 1px solid var(--card-bg-light);
    padding: .75rem 1.5rem;
    border-radius: .75rem;
    min-height: 2.75rem;
    color: var(--text-light);
    width: 100%;
    outline: none;
}

.email-content {
    margin-top: 1rem;
    display: flex;
    color: var(--text-light);
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.form-content textarea {
    background: var(--bg-light);
    border: 1px solid var(--card-bg-light);
    color: var(--text-light);
    padding: .75rem 1.5rem;
    min-height: 2.75rem;
    border-radius: .75rem;
    width: 100%;
    outline: none;
    resize: none;
}

.button-container {
    display: flex;
    justify-content: end;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.button-container button {
    background: var(--accent);
    border: 1px solid var(--accent-light);
    padding: .75rem 1.5rem;
    border-radius: .75rem;
    outline: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.button-container button:hover {
    background: var(--accent-light);
    color: var(--text-dark);
    transition: var(--transition);
}


footer {
    background-color: var(--bg-light);
    color: var(--text-light);
    box-shadow: 12px 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 500;
    transition: var(--transition);
    padding: .5rem 10%;
}

.footer-content {
    text-align: center;
    font-size: 0.9rem;
    margin: 0 auto;
    padding: 0 10%;
    display: flex;
    gap: .5rem;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.copyrights {
    text-align: center;
    font-size: 0.9rem;
    gap: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.social-media {
    display: flex;
    gap: 1rem;

}

.social-media a {
    text-decoration: none;
    transition: color 0.3s ease;
    flex-wrap: wrap;
}

.social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
    border-radius: 50%;
    font-size: 1.3rem;
    color: var(--text-dark);
    background-color: var(--accent);
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.social-icon:hover {
    transform: scale(1.1);
    background-color: var(--accent-dark);
}



/* Dark Theme */
body.dark-mode {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

body.dark-mode .card,
body.dark-mode .service,
body.dark-mode .project {
    background-color: var(--card-bg-dark);
    color: var(--text-dark);
}

body.dark-mode .header {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

body.dark-mode .mobile-nav {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

body.dark-mode footer {
    background-color: var(--card-bg-dark);
    color: var(--text-dark)
}

body.dark-mode .form-content input,
body.dark-mode .form-content textarea {
    background: var(--bg-dark);
    border: 1px solid var(--card-bg-dark);
    color: var(--text-dark);
}

body.dark-mode header img {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

body.dark-mode .desktop-nav a {

    color: var(--nav-link-dark);

}

body.dark-mode .desktop-nav a:hover {
    color: var(--nav-link-dark-hover);
}

body.dark-mode .mobile-nav a {

    color: var(--nav-link-dark);

}

body.dark-mode .mobile-nav a:hover {

    color: var(--nav-link-dark-hover);

}

body.dark-mode .menu-icon,
body.dark-mode .theme-icon {
    color: var(--nav-link-dark);
}

body.dark-mode #sih h3,
body.dark-mode #sih h4 {
    color: var(--link-dark);
}

body.dark-mode h1,
body.dark-mode h2 {
    color: var(--link-light);
}

body.dark-mode .project h3,
body.dark-mode .card h3,
body.dark-mode .service h3 {
    color: var(--link-hover);

}


body.dark-mode .download-cv,
body.dark-mode .social-icon,
body.dark-mode .button-container button {
    background-color: var(--link-dark);
}

body.dark-mode .download-cv:hover,
body.dark-mode .social-icon:hover,
body.dark-mode .button-container button:hover {
    background-color: var(--link-hover);
    color: var(--text-dark);
}

/* Responsive Adjustments */

@media (min-width: 900px) {

    #sih .grid,
    #services .grid {
        grid-template-columns: repeat(3, 1fr);
    }

    #projects .grid,
    #experience .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1440px) {

    #services .grid,
    #sih .grid {
        grid-template-columns: repeat(4, 1fr);
    }

    #projects .grid,
    #experience .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    p,
    a {
        font-size: 1.1rem;
    }


    .grid {
        grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    }
}


@media (max-width: 768px) {
    header img {
        width: 120px;
        height: 120px;
    }



    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.4rem;
    }

    p,
    a,input,textarea {
        font-size: 1rem;
    }

    .skill-category h4 {
        font-size: 1.2rem;
    }

    .skill-category ul {
        padding-left: 1rem;
    }

    .skill-category ul li {
        font-size: 1rem;
        margin-bottom: 0.4rem;
    }

    .grid {
        grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    }

    .large-screen {
        display: none;
        /* Hide the large-screen structure */
    }

    .small-screen {
        display: flex;
        /* Show the small-screen structure */
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }


    .profile-image img {
        max-width: 80%;
    }

    .social-media {
        justify-content: center;
        gap: .5rem;

    }

    .social-icon {
        width: 30px;
        height: 30px;
        font-size: 1.1rem;
    }

    .social-icon:hover {
        transform: scale(1.05);
        background-color: var(--accent-dark);
        color: var(--text-dark);
    }

    .download-cv {
        margin-top: 1rem;
    }

    .project,
    .card {
        padding: 1rem;
    }

    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: inline-block;
    }

    .contact-info {
        padding: .5rem 1rem;
        gap: .8rem;
    }

    .contact-intro {
        padding: 0 1rem;
       
    }
    
    .form-content {
        width: 100%;
        padding: 1rem .5rem;
        gap: .8rem;
    }
}

@media (min-width: 769px) {
    .mobile-nav {
        display: none;
    }

    .menu-toggle {
        display: none;
    }
}

@media (max-width: 520px) {
    .profile-image img {
        max-width: 70%;
    }

    h1 {
        font-size: 1.8rem;
        word-wrap: break-word;
    }

    h2 {
        font-size: 1.5rem;
        word-wrap: break-word;
    }

    h3 {
        font-size: 1.2rem;
        word-wrap: break-word;
    }

    p,
    a,input,textarea {
        font-size: 0.9rem;
        word-wrap: break-word;
        word-break: break-all;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .project,
    .card {
        padding: 0.8rem;
        margin-bottom: 0.5rem;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
        transform: translateY(0);
    }

    .skill-category h4 {
        font-size: 1.1rem;
    }

    .skill-category ul {
        padding-left: 0.8rem;
    }

    .skill-category ul li {
        font-size: 0.9rem;
        margin-bottom: 0.2rem;
    }
    .copyrights {
        font-size: 0.8rem;
        gap: 0.5rem;
        flex-direction: column;
    }
    .social-media {
        justify-content: center;
        gap: 0.5rem;
    }
    
    .download-cv {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    .button-container button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        font-weight: 500;
    }
}

@media (max-width: 375px) {
    .profile-image img {
        max-width: 60%;
    }

    .social-media {
        align-items: center;
        flex-wrap: wrap;
    }

    nav a {
        font-size: 0.9rem;
        display: block;
        margin: 0.5rem 0;
    }

    section {
        padding: 1rem 3%;
    }

    h1,
    .card h1,
    .project h1 {
        font-size: 1.5rem;

    }

    h2,
    .card h2,
    .project h2 {
        font-size: 1.3rem;

    }

    h3 {
        font-size: 1.1rem;

    }

    p,
    a,input,textarea, .contact-intro, .copyrights {
        font-size: 0.8rem;

    }

    .card,
    .project {
        padding: 0.5rem;
    }

    .card li,
    .project li {
        font-size: 0.8rem;
    }

}