/* Global styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
    cursor: cell;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    user-select: none;
}

body {
    background-color: #0c0c0c;
    color: white;
    min-height: 100vh;
}

/* Index page styles */
body:not(.about-page) {
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1.5rem;
    padding: 2rem;
}

/* Navigation */
.nav-links {
    display: flex;
    gap: 3rem;
    margin-bottom: 1.2rem;
}

.nav-link {
    background-color: #202020;
    color: #ffffff;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 1.4rem;
    font-size: 1rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: normal;
    letter-spacing: -0.02rem;
    transition: all 0.3s ease;
}

.nav-link:hover {
    outline: 1px solid #8a8a8a;
    transform: translateY(-2px);
}

/* Sections */
.section {
    background-color: #202020;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.8rem;
    transition: all 0.3s ease;
}

.section:hover {
    outline: 1px solid #8a8a8a;
}

.section h2 {
    font-weight: 600;
    font-size: 19px;
    margin-bottom: 0.5rem;
}

.section p {
    font-size: 15px;
    color: #e2e2e2;
}

/* Profile section */
.profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-link {
    text-decoration: none;
    color: #ffffff;
    display: block;
}

.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-info h1 {
    font-weight: 700;
    margin-bottom: 0.1rem;
    font-size: 19px;
}

.subtitle {
    color: #ffffff;
    font-size: 12px;
    font-weight: 100;
    margin-bottom: 1rem;
}

.profile-info p {
    font-weight: 400;
    color: #e2e2e2;
    font-size: 14px;
}

.experience-text {
    margin-top: 0.5rem;
    font-size: 14px;
}

/* Case studies */
.case-studies {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.2rem;
}

.case-study-link {
    display: block;
    overflow: hidden;
    border-radius: 0.5rem;
    transition: transform 0.3s ease;
}

.case-study-link:hover {
    transform: scale(1.05);
}

.case-study-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.5rem;
    transition: transform 0.3s ease;
}

/* Experiments */
.experiments {
    border: 1.8px dashed #575757;
    border-radius: 1rem;
    padding: 1.5rem;
    transition: border-color 0.3s ease-in;
}

.experiments:hover {
    border: 1.8px dashed #929292;
}

.experiments h2 {
    font-size: 18px;
    margin-bottom: 0.5rem;
}

.experiments p {
    font-size: 15px;
    color: #929292;
    margin-bottom: 1rem;
}

.experiments-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.experiment-link {
    display: block;
    overflow: hidden;
    border-radius: 0.5rem;
    transition: transform 0.3s ease;
}

.experiment-link:hover {
    transform: scale(1.05);
}

.experiment-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 0.5rem;
    transition: transform 0.3s ease;
}

/* Contact */
.contact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #202020;
    border-radius: 1.4rem;
    padding: 0.5rem 1.5rem;
    margin-top: 1.6rem;
    height: 60px;
    transition: all 0.3s ease;
}

.contact:hover {
    outline: 1px solid #8a8a8a;
}

.contact h2 {
    font-weight: 600;
    font-size: 18px;
    margin-left: 25px;
}

.contact-button {
    background-color: white;
    color: black;
    border-radius: 5px;
    text-decoration: none;
    padding: 5px 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.contact-button:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

/* Web Project */
.web-project {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    margin-top: 1rem;
}

.web-project img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.project-link {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background-color: rgba(255, 255, 255, 0.9);
    color: #000000;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.project-link:hover {
    background-color: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
}

/* About page styles */
.about-page {
    padding: 2rem 4.5rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.about-container {
    display: grid;
    grid-template-columns: minmax(auto, 2fr) auto;
    padding: 0;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.top-section {
    display: flex;
    gap: 1.25rem;
    position: relative;
}

.profile-image {
    width: 320px;
    height: 380px;
    background-color: #202020;
    border-radius: 1rem;
    flex-shrink: 0;
    background-image: url("Images/kunal.jpg");
    background-size: cover;
    transition: all 0.3s ease;
}

.profile-image:hover {
    outline: 1px solid #8a8a8a;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-self: flex-end;
    margin-bottom: 0.5rem;
}

.name-section {
    background-color: #2a2a2a;
    padding: 0.875rem 1.5rem;
    border-radius: 1rem;
    display: inline-block;
    transition: all 0.3s ease;
}

.name-section:hover {
    outline: 1px solid #8a8a8a;
}

.name-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    white-space: nowrap;
}

.home-button {
    position: absolute;
    right: 1rem;
    top: 1rem;
    width: 38px;
    height: 38px;
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.home-button:hover {
    transform: rotate(10deg) scale(1.1);
    background-color: rgba(255, 255, 255, 0.1);
}

.home-button::after {
    content: "⛺︎";
    font-size: 1.4rem;
    color: #fff;
}

.about-box {
    background-color: #2a2a2a;
    padding: 1.25rem 1.75rem;
    border-radius: 1rem;
    max-width: 600px;
    transition: all 0.3s ease;
}

.about-box:hover {
    outline: 1px solid #8a8a8a;
}

.about-box h2 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.about-box h2::after {
    content: ".";
    color: #009dff;
    margin-left: 2px;
}

.about-box p {
    color: #e0e0e0;
    line-height: 1.3;
    font-size: 1rem;
    font-weight: 500;
}

.description-box {
    background-color: #2a2a2a;
    padding: 2rem;
    border-radius: 1rem;
    width: 100%;
    transition: all 0.3s ease;
}

.description-box:hover {
    outline: 1px solid #8a8a8a;
}

.description-box p {
    color: #e0e0e0;
    line-height: 1.3;
    font-size: 1.1rem;
    font-weight: 400;
}

.skills-section {
    background-color: #2a2a2a;
    padding: 2.25rem;
    border-radius: 1rem;
    width: 340px;
    transition: all 0.3s ease;
}

.skills-section:hover {
    outline: 1px solid #8a8a8a;
}

.skills-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.75rem;
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: #e0e0e0;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.skill-item:hover {
    transform: translateX(5px);
    color: #ffffff;
}

.skill-item::before {
    content: "⦿";
    color: #fff;
    font-size: 1.3rem;
}

.loading {
    color: #808080;
    margin-top: 1.25rem;
    font-size: 1.1rem;
}

.highlight {
    color: #fff;
    font-size: 2.8rem;
    background-color: #2a2a2a;
    padding: 1.25rem 1.75rem;
    border-radius: 1rem;
    font-weight: 800;
    transition: all 0.3s ease;
}

.highlight:hover {
    outline: 1px solid #8a8a8a;
    transform: translateY(-3px);
}

/* Responsive Styles */
/* Large screens (1025px - 1240px) */
@media screen and (max-width: 1240px) {
    body {
        padding: 2rem;
    }

    .container {
        padding: 1.5rem;
        gap: 1rem;
        max-width: 1200px;
    }

    /* Index page adjustments */
    .nav-links {
        gap: 1.5rem;
    }

    .case-studies {
        grid-template-columns: repeat(2, 1fr);
    }

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

    /* About page adjustments */
    .about-page {
        padding: 2rem;
    }

    .main-content {
        gap: 1.25rem;
    }

    .skills-section {
        width: 300px;
    }

    .profile-image {
        width: 340px;
        height: 340px;
    }
}

/* Medium screens (768px - 1024px) */
@media screen and (max-width: 1024px) {
    body {
        padding: 1.5rem;
    }

    .container {
        grid-template-columns: 1fr !important;
        padding: 1rem;
        gap: 2rem;
    }

    /* Index page adjustments */
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }

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

    /* About page adjustments */
    .about-page {
        padding: 1.5rem;
    }

    .main-content {
        max-width: 800px;
        margin: 0 auto;
        gap: 1.5rem;
    }

    .skills-section {
        width: 100%;
        padding: 1.75rem;
        max-width: 800px;
        margin: 0 auto;
    }

    .profile-image {
        width: 300px;
        height: 300px;
    }

    .header-content {
        flex: 1;
    }

    .name-section h1 {
        font-size: 2rem;
    }

    .highlight {
        font-size: 2.2rem;
        padding: 1.25rem;
        text-align: center;
    }

    .top-section {
        justify-content: center;
    }
}

/* Small screens (up to 767px) */
@media screen and (max-width: 767px) {
    body {
        padding: 1rem;
    }

    .container {
        padding: 0.5rem;
        gap: 1rem;
    }

    /* Index page adjustments */
    .nav-links {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0.25rem;
        margin-bottom: 1rem;
    }

    .nav-link {
        padding: 0.6rem 0.75rem;
        font-size: 0.9rem;
        justify-content: center;
        width: 100%;
    }

    .case-studies {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .experiments-grid {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .case-study-img,
    .experiment-img {
        height: 220px;
        width: 100%;
    }

    .case-study-link,
    .experiment-link {
        width: 100%;
    }

    .contact {
        flex-direction: column;
        height: auto;
        min-height: 90px;
        padding: 0.75rem 1rem;
        gap: 0.75rem;
        align-items: center;
        justify-content: center;
    }

    .contact h2 {
        margin: 0;
        text-align: center;
        font-size: 1.1rem;
    }

    .profile {
        flex-direction: column;
        text-align: center;
    }

    .profile-info {
        text-align: center;
        margin-top: 1rem;
    }

    /* About page adjustments */
    .about-page {
        padding: 1rem;
    }

    .main-content {
        gap: 1rem;
    }

    .top-section {
        flex-direction: column;
        align-items: center;
        padding-top: 4rem;
        gap: 1.25rem;
    }

    .profile-image {
        width: 100%;
        max-width: 280px;
        height: 320px;
        margin: 0 auto;
    }

    .header-content {
        width: 100%;
        margin: 0;
        gap: 1rem;
        align-items: center;
    }

    .name-section,
    .about-box {
        width: 100%;
        text-align: center;
    }

    .name-section h1 {
        font-size: 2rem;
        white-space: normal;
    }

    .about-box h2 {
        justify-content: center;
        font-size: 1.5rem;
    }

    .about-box p {
        text-align: center;
    }

    .description-box {
        padding: 1.25rem;
    }

    .description-box p {
        font-size: 1rem;
        line-height: 1.4;
        text-align: center;
    }

    .highlight {
        font-size: 1.6rem;
        padding: 1rem;
        text-align: center;
    }

    .skills-section {
        padding: 1.5rem;
        margin-top: 1rem;
    }

    .skills-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
        text-align: center;
    }

    .skills-list {
        gap: 1rem;
    }

    .skill-item {
        font-size: 1rem;
    }

    .home-button {
        position: fixed;
        top: 1rem;
        right: 50%;
        transform: translateX(50%);
        z-index: 1000;
        background-color: rgba(42, 42, 42, 0.95);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        width: 42px;
        height: 42px;
    }
}
