/* Font imports */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap');

/* Global styles */
body {
    font-family: 'Lato', Verdana, Helvetica, sans-serif;
    font-size: 14px;
    background-color: #ffffff;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    width: 100%;
}

/* Navigation */
.navbar {
    background-color: #2a2a2a;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 10px;
    width: 100%;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
    padding: 5px 10px;
}

.nav-links a:hover {
    color: #f09228;
}

/* Name title */
.name {
    font-family: 'Lato', Verdana, Helvetica, sans-serif;
    font-size: 32px;
    font-weight: 700;
    margin: 5px 0 0 0;
    color: #2a2a2a;
}

/* Title below name */
.title {
    font-family: 'Lato', Verdana, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #666666;
    margin: 5px 0 10px 0;
    letter-spacing: 0.5px;
}

/* Social links below photo */
.social-links {
    display: flex;
    justify-content: center;
    gap: 8px 20px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 50%;
    background-color: #f5f5f5;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: #1772d0;
}

.social-link svg {
    width: 24px;
    height: 24px;
    stroke: #1772d0;
    transition: stroke 0.3s ease;
}

.social-link:hover svg {
    stroke: white;
}

.social-text-link {
    color: #1772d0;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 6px;
    flex-basis: 100%;
    display: block;
    text-align: center;
    margin-top: 2px;
}

.social-text-link:hover {
    color: #f09228;
}

.social-text-link svg {
    vertical-align: -3px;
    margin-right: 6px;
    stroke: currentColor;
}

.dark .social-text-link { color: #6ea8fe; }
.dark .social-text-link:hover { color: #ffd166; }

/* Contact links section */
.contact-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
    align-items: center;
    justify-content: center;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #1772d0;
    transition: color 0.3s ease;
}

.contact-link { line-height: 1.25; }

/* Small badge for primary indicators */
.badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
    color: #1772d0;
    background: #e9f2ff;
    border: 1px solid #cfe2ff;
    border-radius: 999px;
    vertical-align: middle;
}

.dark .badge {
    color: #6ea8fe;
    background: #1f2a44;
    border-color: #233055;
}

.contact-link:hover {
    color: #f09228;
}

.contact-link svg {
    transition: stroke 0.3s ease;
}

.contact-link:hover svg {
    stroke: #f09228;
}

/* Project titles */

.designation-title {
    font-family: 'Lato', Verdana, Helvetica, sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #2a2a2a;
}


.papertitle {
    font-family: 'Lato', Verdana, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #2a2a2a;
    font-style: italic;
}

/* Links */
a {
    color: #1772d0;
    text-decoration: none;
}

a:focus, a:hover {
    color: #f09228;
}

/* Headings */
h2 {
    font-family: 'Lato', Verdana, Helvetica, sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #2a2a2a;
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

/* Paragraphs */
p {
    line-height: 1.45;
    margin: 10px 0;
}

/* Images */
img {
    border-radius: 5px;
}

/* Profile image: show full image (no crop), allow square */
.profile-photo {
    width: 85%;
    max-width: 85%;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Mobile responsiveness */
@media only screen and (max-width: 600px) {
    body {
        font-size: 16px;
    }
    
    .name {
        font-size: 24px;
    }
    
    table {
        display: block;
        width: 100%;
    }
    
    td {
        display: block;
        width: 100% !important;
        padding: 10px !important;
    }
    svg {
        stroke: #1772d0;
        transition: stroke 0.3s ease;
        vertical-align: middle;
    }
    
    a:hover svg {
        stroke: #f09228;
    }
}

/* Education section */
.education-item {
    padding: 20px 0;
    margin: 20px 0;
    width: 100%;
}

.education-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.education-header h3 {
    margin: 0 0 5px 0;
    color: #2a2a2a;
    font-size: 20px;
    font-weight: 700;
}

.education-date {
    color: #666666;
    font-size: 14px;
    white-space: nowrap;
}

.education-degree {
    font-size: 16px;
    color: #1772d0;
    margin: 10px 0;
    font-weight: 500;
}

.education-grade {
    font-size: 15px;
    color: #2a2a2a;
    margin: 10px 0;
}

.education-courses {
    margin-top: 20px;
}

.education-courses h4 {
    color: #2a2a2a;
    font-size: 16px;
    margin-bottom: 10px;
}

.education-courses ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin: 0;
    padding-left: 20px;
}

.education-courses li {
    color: #444444;
    line-height: 1.5;
}

/* Bio text */
.bio-text {
    text-align: justify;
    line-height: 1.55;
    margin: 12px 0;
}

.bio-text a {
    display: inline;
}

/* Professional Experience */
.experience-item {
    padding: 20px 0;
    margin: 20px 0;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.experience-company {
    margin: 0;
}

.experience-company h3 {
    margin: 0;
    color: #2a2a2a;
    font-size: 20px;
    font-weight: 700;
}

.experience-company p {
    color: #666666;
    margin: 5px 0;
    font-size: 15px;
}

.experience-date {
    color: #666666;
    font-size: 14px;
    font-weight: 500;
}

.project-title {
    color: #1772d0;
    font-size: 17px;
    font-weight: 600;
    margin: 20px 0 15px 0;
}

.experience-list {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.experience-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    line-height: 1.5;
    color: #444444;
}

.experience-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #1772d0;
}

.skills-used {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    color: #666666;
    font-size: 14px;
}

.skills-used strong {
    color: #2a2a2a;
}

/* Tests (compact) */
.test-item { padding: 10px 0; margin: 10px 0; }
.test-item .experience-header { margin-bottom: 6px; }
.tests-summary { margin: 2px 0 0; color: #444444; font-size: 14px; }

/* Make the page responsive */
@media only screen and (max-width: 768px) {
    /* Force desktop-like view but scrollable */
    body {
        min-width: 1024px;
        overflow-x: auto;
        -webkit-text-size-adjust: 100%;
    }
    
    /* Ensure navbar stays full width */
    .navbar {
        width: 100%;
        min-width: 1024px;
    }
    
    .nav-links {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: center;
        gap: 20px;
    }
    
    /* Keep education section formatting intact */
    .education-header {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 10px;
    }
    
    /* Reset any mobile-specific changes */
    td {
        display: table-cell !important;
        width: auto !important;
        max-width: none !important;
    }
    
    /* Maintain table structure */
    table {
        display: table !important;
    }
    
    /* Ensure the entire desktop view is preserved */
    .education-courses ul {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    /* General layout */
    body {
        padding: 10px;
    }

    /* Name and title */
    .name {
        font-size: 28px;
    }

    .title {
        font-size: 14px;
    }

    /* Layout adjustments */
    table {
        width: 100% !important;
    }

    td {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px 0 !important;
    }

    /* Photo and social links */
    img {
        width: 60% !important;
        margin: 0 auto;
    }

    .social-links {
        margin: 15px 0;
    }

    /* Contact links */
    .contact-links { margin: 12px 0; justify-content: center; }

    .contact-link {
        font-size: 13px;
    }

    /* Experience section */
    .experience-header {
        flex-direction: column;
        gap: 5px;
    }

    .experience-date {
        margin-top: 5px;
    }

    .project-title {
        font-size: 16px;
        margin: 15px 0 10px 0;
    }

    .experience-list li {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .skills-used {
        font-size: 13px;
    }

    /* Education section */
    .education-header {
        flex-direction: column;
        gap: 5px;
    }

    .education-header h3 {
        font-size: 18px;
    }

    .education-date {
        margin-top: 5px;
    }

    .education-degree {
        font-size: 15px;
    }

    .education-grade {
        font-size: 14px;
    }

    .education-courses ul {
        grid-template-columns: 1fr;
    }

    .education-courses li {
        font-size: 14px;
    }
}

/* For very small screens - still maintain desktop view */
@media only screen and (max-width: 480px) {
    body {
        min-width: 1024px;
    }
    
    .navbar {
        min-width: 1024px;
    }
    
    .nav-links {
        flex-direction: row;
        gap: 20px;
        padding: 10px 0;
    }

    .name {
        font-size: 24px;
    }

    .title {
        font-size: 13px;
    }

    img {
        width: 80% !important;
    }

    .contact-links {
        gap: 8px;
    }

    .contact-link span {
        font-size: 12px;
    }

    h2 {
        font-size: 20px;
    }

    .experience-company h3 {
        font-size: 18px;
    }

    .project-title {
        font-size: 15px;
    }

    .experience-list li {
        font-size: 13px;
    }

    .skills-used {
        font-size: 12px;
    }
}

/* For tablets and medium screens */
@media only screen and (min-width: 769px) and (max-width: 1024px) {
    body {
        min-width: 1024px;
    }
}

/* Print styles */
@media print {
    .navbar {
        display: none;
    }

    body {
        font-size: 12px;
    }

    a {
        text-decoration: none;
        color: #2a2a2a;
    }

    .social-link svg {
        width: 20px;
        height: 20px;
    }

    .experience-item, .education-item {
        page-break-inside: avoid;
    }
}

/* Research Publications */
/* Research Publications */
.pubs { margin: 0; padding-left: 20px; }
.pubs .pub { margin: 6px 0; line-height: 1.5; color: #444444; }
.pubs .pub em { font-style: italic; }
.pubs .pub a { color: #1772d0; text-decoration: none; }
.pubs .pub a:hover { color: #f09228; }

/* Media Queries for Research Section */
@media only screen and (max-width: 768px) {
    .pubs .pub { font-size: 14px; }
}

@media only screen and (max-width: 480px) {
    .pubs .pub { font-size: 13px; }
}

/* Add smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Theme toggle button */
.theme-toggle {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.theme-toggle:hover {
    color: #f09228;
    border-color: #f09228;
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* Dark mode overrides */
.dark body {
    background-color: #0b1020;
    color: #e5e7eb;
}

.dark .navbar {
    background-color: #0f172a;
}

.dark a { color: #6ea8fe; }
.dark a:hover, .dark a:focus { color: #ffd166; }

.dark h2 {
    color: #e5e7eb;
    border-bottom-color: #233055;
}

.dark .name { color: #e5e7eb; }
.dark .title { color: #a8b3cf; }

.dark .education-degree,
.dark .project-title,
.dark .project-name,
.dark .research-title { color: #6ea8fe; }

.dark .experience-company h3,
.dark .designation-title,
.dark .author-highlight { color: #e5e7eb; }

.dark .experience-company p,
.dark .education-date,
.dark .experience-date,
.dark .education-grade,
.dark .research-conference,
.dark .skills-used,
.dark .project-date { color: #a8b3cf; }

.dark .experience-list li,
.dark .achievements-list li,
.dark .research-description,
.dark .bio-text,
.dark .skill-items,
.dark .education-courses li { color: #d1d5db; }

.dark .pubs .pub { color: #d1d5db; }

.dark .tests-summary { color: #d1d5db; }

.dark .experience-list li::before,
.dark .achievements-list li::before { color: #6ea8fe; }

.dark .skills-used { border-top-color: #233055; }

.dark .social-link { background-color: #1f2a44; }
.dark .social-link:hover { background-color: #1772d0; }
.dark .social-link svg { stroke: #6ea8fe; }
.dark .social-link:hover svg { stroke: #ffffff; }

.dark .contact-link { color: #6ea8fe; }
.dark .contact-link:hover { color: #ffd166; }
.dark .contact-link svg { stroke: #6ea8fe; }
.dark .contact-link:hover svg { stroke: #ffd166; }

.dark .education-courses h4,
.dark .papertitle { color: #e5e7eb; }

/* Technical Skills Section */
.skills-section {
    margin: 20px 0;
}

.skill-group {
    margin: 12px 0;
    line-height: 1.5;
}

.skill-label {
    font-weight: 700;
    color: #2a2a2a;
    margin-right: 8px;
}

.skill-items {
    color: #444444;
}

/* Projects Section */
.project-item {
    margin: 25px 0;
}

.project-header {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.project-name {
    font-size: 17px;
    font-weight: 700;
    color: #1772d0;
}

.project-name a {
    color: inherit;
    text-decoration: none;
}

.project-name a:hover {
    color: #f09228;
    text-decoration: underline;
}

.project-date {
    color: #666666;
    font-size: 14px;
}

/* Achievements Section */
.achievements-list {
    list-style-type: none;
    padding-left: 0;
    margin: 20px 0;
}

.achievements-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    line-height: 1.5;
    color: #444444;
}

.achievements-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #1772d0;
}

/* Academic Projects Section */
.project-subtitle {
    font-style: italic;
    color: #666666;
    margin: 5px 0;
    font-size: 15px;
}

.project-link {
    margin: 5px 0 10px 0;
}

.project-link a {
    color: #1772d0;
    text-decoration: none;
    font-size: 14px;
}

.project-link a:hover {
    color: #f09228;
}

/* Update existing media queries */
@media only screen and (max-width: 768px) {
    .skill-group {
        margin: 12px 0;
    }
    
    .project-header {
        flex-direction: column;
        gap: 5px;
    }
    
    .project-name {
        font-size: 16px;
    }
    
    .achievements-list li {
        font-size: 14px;
    }
}

@media only screen and (max-width: 480px) {
    .skill-group {
        margin: 10px 0;
    }
    
    .project-name {
        font-size: 15px;
    }
    
    .achievements-list li {
        font-size: 13px;
    }
}
