@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #003366;
    --secondary-color: #555;
    --background-color: #f9f9f9;
    --card-background: #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: 'Inter', system-ui, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background-color);
    -webkit-text-size-adjust: 100%; /* Prevent font scaling on iOS */
}

header {
    background: var(--background-color);
    color: var(--text-color);
    padding: 2rem 1rem 1rem;
    text-align: center;
    border-bottom: 1px solid #eee;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 0 0 0.25rem 0;
    color: var(--primary-color);
}

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);
    text-decoration: none;
    padding: 8px 4px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

nav a:hover, nav a:active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

nav a.active {
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
}

nav a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

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

.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;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.profile-image {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    header {
        padding-top: 4.5rem;
    }

    .about-container {
        flex-direction: column;
        align-items: center;
    }
    
    .profile-image {
        width: 200px;
        height: 200px;
        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;
    }

    .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 {
        display: block;
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }

}

.research-section {
    padding: 0 20px;
    max-width: 1000px;
    margin: 0;
}
  
.research-section h2 {
    text-align: left;
    font-size: 1.75rem;
    margin-bottom: 40px;
    color: var(--primary-color);
    padding: 10px 16px;
    background: var(--hover-background);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 4px 4px 0;
}
  
/* Grid layout for cards */
.research-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 0;
}
  
.research-card {
    background: var(--card-background);
    border-left: 3px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 30px;
}

.research-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-light);
}
  
.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;
}

.loading-research,
.no-research,
.research-error {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.1rem;
}

.research-error {
    color: #c0392b;
}

.awards-section {
    padding: 0 20px;
    max-width: 1000px;
    margin: 0;
}

.awards-section h2 {
    text-align: left;
    font-size: 1.75rem;
    margin-bottom: 40px;
    color: var(--primary-color);
    padding: 10px 16px;
    background: var(--hover-background);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 4px 4px 0;
}

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

.award-card {
    background: var(--card-background);
    border-left: 3px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 30px;
}

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

.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;
}

.loading-awards,
.no-awards,
.awards-error {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.1rem;
}

.awards-error {
    color: #c0392b;
}

.publications-section {
    padding: 0 20px;
    max-width: 1000px;
    margin: 0;
}

.publications-section h2 {
    text-align: left;
    font-size: 1.75rem;
    margin-bottom: 40px;
    color: var(--primary-color);
    padding: 10px 16px;
    background: var(--hover-background);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 4px 4px 0;
}

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

.publication-card {
    background: var(--card-background);
    border-left: 3px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 30px;
}

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

.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 {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--hover-background);
    padding: 2px 10px;
    border-radius: 20px;
    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);
}

.loading-publications,
.no-publications,
.publications-error {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.1rem;
}

.publications-error {
    color: #c0392b;
}

.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;
    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: 3px;
    background: linear-gradient(90deg, #001f3f 0%, #0074D9 50%, #7FDBFF 100%);
    margin: 8px auto;
    width: 100%;
    max-width: none;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 12px;
    margin: 0;
    width: fit-content;
    position: absolute;
    right: 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;
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

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

    nav {
        display: none !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        box-sizing: border-box;
        background: var(--card-background);
        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(--card-background);
        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;
    }

    .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 {
        display: block;
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }

}

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

.social-icon {
    color: var(--secondary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

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

.social-icon:hover, .social-icon:active {
    color: var(--primary-color);
}

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

footer {
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 4rem;
    border-top: 1px solid #eee;
    color: var(--secondary-color);
    font-size: 0.875rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* News Section Styles */
.news-section {
    max-width: 1000px;
    margin: 0;
    padding: 0 20px;
}

.news-section h2 {
    text-align: left;
    font-size: 1.75rem;
    margin-bottom: 40px;
    color: var(--primary-color);
    padding: 10px 16px;
    background: var(--hover-background);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 4px 4px 0;
}

.news-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-card {
    display: flex;
    background: var(--card-background);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-light);
}

.news-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 20px 12px;
    background: var(--primary-color);
    color: #fff;
    text-align: center;
    gap: 2px;
    border-radius: 8px 0 0 8px;
}

.news-month {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-weight: 600;
    opacity: 0.85;
}

.news-day {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    padding-top: 6px;
    margin-top: 4px;
    width: 100%;
    text-align: center;
}

.news-year {
    font-size: 0.85rem;
    opacity: 0.6;
    letter-spacing: 1px;
}

.news-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-image {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    margin-bottom: 15px;
    background-color: var(--background-color);
    border-radius: 8px;
}

.news-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.news-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.news-card:hover .news-image img {
    transform: scale(1.02);
}

.news-content {
    flex: 1;
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-title {
    margin: 0 0 12px 0;
    font-size: 1.3rem;
    color: var(--text-color);
    line-height: 1.4;
}

.news-description {
    margin: 0 0 15px 0;
    color: var(--secondary-color);
    line-height: 1.7;
    font-size: 0.95rem;
}

.news-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: auto;
}

.news-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: var(--background-color);
    color: var(--primary-color);
    text-decoration: none;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.news-link .link-arrow {
    display: inline-block;
    font-style: normal;
    line-height: 1;
}

.news-link:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

.loading-news,
.no-news,
.news-error {
    text-align: center;
    padding: 60px 20px;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.news-error {
    color: #c0392b;
}

@media (max-width: 768px) {
    .news-card {
        flex-direction: column;
    }

    .news-date {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        min-width: auto;
        padding: 14px 20px;
        justify-content: flex-start;
        border-radius: 8px 8px 0 0;
    }

    .news-day {
        font-size: 2rem;
        border-top: none;
        border-left: 1px solid rgba(255, 255, 255, 0.25);
        padding-top: 0;
        padding-left: 12px;
        margin-top: 0;
        margin-left: 4px;
        width: auto;
    }

    .news-month,
    .news-year {
        font-size: 0.85rem;
    }

    .news-image {
        max-height: 200px;
    }

    .news-content {
        padding: 18px 20px;
    }

    .news-title {
        font-size: 1.15rem;
    }

    .news-links {
        flex-direction: column;
    }

    .news-link {
        text-align: center;
    }
}
