:root {
    --primary-color: #003366;
    --secondary-color: #555;
    --background-color: #ffffff;
    --text-color: #333;
    --hover-background: rgba(0, 51, 102, 0.1);
    --shadow-light: 0 2px 5px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 12px 24px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Arial', sans-serif; /* Standardize font */
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-color);
    -webkit-text-size-adjust: 100%; /* Prevent font scaling on iOS */
}

header {
    background: var(--background-color);
    color: var(--text-color);
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #eee;
    position: relative;  /* Add this */
}

nav {
    margin: 1rem 0;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0;
    gap: 1rem;
}

nav a {
    color: var(--text-color);
    background: var(--background-color);
    border: 1px solid transparent;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

nav a:hover, nav a:active {
    background: none;
    border: none;
    box-shadow: var(--shadow-light);
    color: var(--primary-color);
    transform: translateY(-2px);
}

nav a:focus,
.cv-download-button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Update download button to match new style */
.cv-download-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--background-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid var(--primary-color);
    transition: all 0.3s ease;
}

.cv-download-button:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.about-container {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin: 2rem 0;
}

.about-content {
    flex: 1;
    padding: 0 1rem;
}

.name-heading {
    color: var(--primary-color);
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.profile-image {
    width: 300px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .about-container {
        flex-direction: column;
        align-items: center;
    }
    
    .profile-image {
        width: 100%;
        max-width: 250px;
        margin-bottom: 1rem;
    }

    .research-grid,
    .publications-grid,
    .awards-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }

    main {
        padding: 0 1rem;
        margin: 1rem auto;
    }

    .hamburger-menu {
        display: flex;
        position: absolute;
        left: 20px;
        top: 20px;
        z-index: 1001;
        background: var(--background-color);
        padding: 12px;
        border-radius: 5px;
        box-shadow: var(--shadow-light);
    }

    nav {
        display: none !important; /* Always hidden unless .show is present */
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 80px 1rem 1rem;
        box-shadow: var(--shadow-light);
        z-index: 1000;
    }

    nav.show {
        display: flex !important; /* Force show when toggled */
    }

    nav a {
        color: var(--text-color);
        background: var(--background-color);
        border: 1px solid transparent;
        text-decoration: none;
        padding: 12px 24px;
        border-radius: 5px;
        transition: all 0.3s ease;
        width: auto;
        margin: 5px 0;
        font-size: 1.1rem;
    }

    nav a:hover, nav a:active {
        background: var(--hover-background);
        color: var(--primary-color);
        transform: translateY(-2px);
        box-shadow: var(--shadow-light);
    }

    .research-card,
    .publication-card,
    .award-card,
    .conference-card {
        padding: 20px;
    }

    .contact-form {
        padding: 1rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevent zoom on input focus in iOS */
    }

    .name-heading {
        font-size: 1.75rem;
    }

    .research-section h2,
    .publications-section h2,
    .awards-section h2 {
        font-size: 2rem;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    nav a {
        width: 100%;
        text-align: center;
    }

    .name-heading {
        font-size: 1.5rem;
    }

    .research-card h3,
    .publication-card h3,
    .award-card h3 {
        font-size: 1.1rem;
    }

    .pub-link,
    .cv-download-button {
        display: block;
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }

    .contact-form {
        padding: 1rem;
    }
}

.research-section {
    padding: 0;  /* Remove the padding */
    max-width: 1200px;  /* Increased from previous value */
    margin: auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
  
.research-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--text-color);
}
  
/* Grid layout for cards */
.research-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;  /* Reduced gap between cards */
    max-width: 1000px;  /* Increased from 800px */
    margin: 0 auto;
}
  
.research-card {
    background: var(--background-color);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 30px;  /* Increased padding for better spacing */
    width: 100%;
}
  
.research-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}
  
.research-card img {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    border-radius: 0;
    background-color: #ffffff;
    display: block;
    margin: 0 auto;
}
  
.research-card h3 {
    font-size: 1.3rem;
    margin: 0 0 20px 0;
    color: #222;
    text-align: center;
}
  
.image-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px auto;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 15px;
}
  
.research-card p {
    font-size: 0.95rem;
    margin: 20px 0 0 0;
    color: var(--secondary-color);
    line-height: 1.5;
}

.research-card .citation {
    font-size: 0.85rem;
    font-style: italic;
    color: #666;
    margin-top: 15px;
    padding: 10px;
    border-left: 3px solid var(--primary-color);
    border-radius: 0 4px 4px 0;
}

.pdf-container {
    width: 100%;
    height: 800px;
    margin: 20px 0;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.pdf-container object {
    width: 100%;
    height: 100%;
}

.contact-section {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.contact-info {
    margin-bottom: 2rem;
    text-align: center;
}

.contact-info h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-form {
    background: var(--background-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 51, 102, 0.1);
}

.form-status {
    margin: 1rem 0;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.submit-button {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.submit-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.awards-section {
    padding: 0;
    max-width: 1200px;
    margin: auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.awards-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--text-color);
}

.awards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.award-card {
    background: var(--background-color);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 30px;
    width: 100%;
}

.award-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.award-card h3 {
    font-size: 1.0rem;
    margin: 0 0 15px 0;
    color: #222;
}

.award-card .award-date {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    display: block;
}

.award-card .award-description {
    font-size: 0.95rem;
    color: var(--secondary-color);
    line-height: 1.5;
    margin: 0;
}

.award-card .award-organization {
    font-weight: 500;
    color: var(--primary-color);
    margin: 10px 0;
}

.publications-section {
    padding: 0;
    max-width: 1200px;
    margin: auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.publications-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--text-color);
}

.publications-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.publication-card {
    background: var(--background-color);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 30px;
    width: 100%;
}

.publication-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.publication-card h3 {
    font-size: 1.2rem;
    margin: 0 0 15px 0;
    color: var(--text-color);
}

.publication-card .pub-authors {
    font-size: 0.95rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.publication-card .pub-journal {
    font-style: italic;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.publication-card .pub-year {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.publication-card .pub-links {
    margin-top: 15px;
}

.pub-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--background-color);
    color: var(--primary-color);
    text-decoration: none;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.pub-link:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.conference-card {
    background: var(--background-color);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 30px;
    width: 100%;
    border-left: 4px solid var(--primary-color);
}

.conference-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.conference-card h3 {
    font-size: 1.2rem;
    margin: 0 0 15px 0;
    color: var(--text-color);
}

.conference-card .conf-details {
    font-size: 0.95rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.conference-card .conf-location {
    font-weight: 500;
    color: var(--primary-color);
    margin: 10px 0;
    font-size: 0.95rem;
}

.conference-card .conf-date {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.conference-card .conf-links {
    margin-top: 15px;
}

.color-bar {
    height: 20px;
    background: linear-gradient(90deg, #001f3f 0%, #0074D9 50%, #7FDBFF 100%);
    margin: 15px auto;
    border-radius: 4px;
    width: 100%; /* Full width */
    max-width: none; /* Remove max-width constraint */
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 12px;
    position: absolute;
    left: 20px;
    top: 20px;
    background: var(--background-color);
    border: none;
    border-radius: 5px;
    box-shadow: var(--shadow-light);
    z-index: 1001;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }

    nav {
        display: none !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: var(--background-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 1rem;
        z-index: 1000;
       }

    nav.show {
        display: flex !important;
    }

    nav a {
        color: var(--text-color);
        background: var(--background-color);
        border: 1px solid transparent;
        text-decoration: none;
        padding: 12px 24px;
        border-radius: 5px;
        transition: all 0.3s ease;
        width: auto;
        margin: 5px 0;
        font-size: 1.1rem;
    }

    nav a:hover, nav a:active {
        background: var(--hover-background);
        color: var(--primary-color);
        transform: translateY(-2px);
        box-shadow: var(--shadow-light);
    }

    .research-card,
    .publication-card,
    .award-card,
    .conference-card {
        padding: 20px;
    }

    .contact-form {
        padding: 1rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevent zoom on input focus in iOS */
    }

    .name-heading {
        font-size: 1.75rem;
    }

    .research-section h2,
    .publications-section h2,
    .awards-section h2 {
        font-size: 2rem;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    nav a {
        width: 100%;
        text-align: center;
    }

    .name-heading {
        font-size: 1.5rem;
    }

    .research-card h3,
    .publication-card h3,
    .award-card h3 {
        font-size: 1.1rem;
    }

    .pub-link,
    .cv-download-button {
        display: block;
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }

    .contact-form {
        padding: 1rem;
    }
}

.social-links {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-icon {
    color: var(--text-color);
    background: var(--background-color);
    border: 1px solid transparent;
    text-decoration: none;
    padding: 12px;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.social-icon:hover, .social-icon:active {
    background: none;
    border: none;
    box-shadow: var(--shadow-light);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.social-icon:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
