body {
    font-family: 'Inter', sans-serif;
    background-color: #FFFFFF; /* Changed to white */
    color: #1a1a1a;
}
.nav-link {
    transition: color 0.3s, transform 0.2s ease-in-out;
    position: relative;
    padding-bottom: 8px;
    display: inline-block;
}
.nav-link:hover {
    color: #3b82f6; /* Changed hover color to blue */
    transform: scale(1.2);
}
.nav-link:active {
    transform: scale(1.05);
}
.nav-link.active {
    font-weight: 600;
    color: #2563eb;
}
.nav-link.active::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 2px;
    bottom: 0;
    left: 25%;
    background-color: #2563eb;
    transition: all 0.3s ease-in-out;
}
.social-icon {
    transition: transform 0.2s ease-in-out;
    display: inline-block;
}
.social-icon:hover {
    transform: scale(1.2);
}
.header-logo {
    transition: transform 0.2s ease-in-out;
}
.header-logo:hover {
    transform: scale(1.05);
}
.home-title {
    display: inline-block;
    transition: transform 0.2s ease-in-out, text-shadow 0.2s ease-in-out;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}
.home-title:hover {
    transform: scale(1.05);
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.2);
}
#about .leading-relaxed p {
    text-align: justify;
}
#projects-grid > div, #skills .grid > div, #education .relative > div {
    transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    padding: 1.5rem;
    border-radius: 0.75rem;
}
#projects-grid > div:hover, #skills .grid > div:hover, #education .relative > div:hover {
    transform: scale(1.05);
    background-color: #f3f4f6; /* light gray */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.chart-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    height: 250px;
    max-height: 300px;
}
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}
.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 10px;
}
.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.loader {
    border: 4px solid #f3f3f3;
    border-radius: 50%;
    border-top: 4px solid #3498db;
    width: 40px;
    height: 40px;
    -webkit-animation: spin 2s linear infinite; /* Safari */
    animation: spin 2s linear infinite;
    margin: 0 auto;
}

/* Safari */
@-webkit-keyframes spin {
  0% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Mobile Compatibility */
@media (max-width: 768px) {
    body {
        -webkit-text-size-adjust: 100%; /* Prevents iOS font scaling */
    }

    section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .home-title {
        font-size: 2.5rem; /* Smaller title on mobile */
        line-height: 1.2;
    }

    h2 {
        font-size: 2rem; /* Smaller section headings */
    }

    #projects-grid > div, #skills .grid > div, #education .relative > div {
        padding: 1rem; /* Less padding on cards */
    }

    .modal-content {
        width: 90%;
        margin: 25% auto;
    }

    .chart-container {
        height: 220px; /* Adjust chart height */
    }
}
