/* ========================================
   Sai Surya Duvvuri — Academic Website
   ======================================== */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Titillium Web', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #1772d0;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #f09228;
}

/* Top Navigation */
.topnav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 100;
    padding: 14px 24px;
    display: flex;
    gap: 20px;
    font-size: 14px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom-left-radius: 6px;
}

.topnav a {
    color: #555;
}

.topnav a:hover {
    color: #1772d0;
}

/* Container */
.container {
    max-width: 850px;
    margin: 0 auto;
    padding: 50px 24px 40px;
}

/* ---- Header / Profile ---- */
.header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}

.profile-section {
    display: flex;
    align-items: flex-start;
    gap: 32px;
}

.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.profile-info h1 {
    font-size: 36px;
    font-weight: 700;
    color: #111;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.affiliation {
    font-size: 17px;
    color: #555;
    margin-bottom: 1px;
    line-height: 1.5;
}

.advisor {
    font-size: 15px;
    color: #666;
    margin-top: 6px;
    margin-bottom: 14px;
}

.email {
    font-size: 15px;
    color: #666;
    margin-bottom: 10px;
    font-family: monospace;
}

/* Social icon links */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 12px;
}

.icon-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #555;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 5px;
    background: #f5f5f5;
    transition: background 0.2s, color 0.2s;
}

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

.icon-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ---- About ---- */
.about {
    margin-bottom: 36px;
    padding: 0;
}

.about p {
    margin-bottom: 14px;
    font-size: 15.5px;
    line-height: 1.75;
}

.about p:last-child {
    margin-bottom: 0;
}

/* ---- Section Headers ---- */
h2 {
    font-size: 24px;
    font-weight: 700;
    color: #222;
    margin-bottom: 18px;
    padding-bottom: 8px;
    border-bottom: 2px solid #1772d0;
}

h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1772d0;
    margin-top: 22px;
    margin-bottom: 10px;
}

/* ---- News Section ---- */
.news {
    margin-bottom: 40px;
}

.news-year h3 {
    margin-top: 18px;
    margin-bottom: 6px;
}

.news-year:first-of-type h3 {
    margin-top: 0;
}

.news-list {
    list-style: none;
    padding: 0;
}

.news-list li {
    display: flex;
    align-items: baseline;
    padding: 6px 0;
    font-size: 15px;
    line-height: 1.6;
    border-bottom: 1px solid #f5f5f5;
}

.news-list li:last-child {
    border-bottom: none;
}

.news-date {
    min-width: 42px;
    font-weight: 700;
    color: #888;
    font-size: 14px;
    flex-shrink: 0;
    margin-right: 12px;
}

.news-text em {
    color: #555;
}

.oral-badge {
    display: inline-block;
    background: #d32f2f;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    vertical-align: middle;
    letter-spacing: 0.3px;
}

/* Scrollable news container */
.news-scroll {
    max-height: 250px;
    overflow-y: scroll;
    padding-right: 8px;
    -webkit-overflow-scrolling: touch;
}

.news-scroll::-webkit-scrollbar {
    -webkit-appearance: none;
    width: 6px;
}

.news-scroll::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.news-scroll::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 3px;
    min-height: 30px;
}

.news-scroll::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ---- Publications ---- */
.publications {
    margin-bottom: 40px;
}

.pub-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 22px;
    padding-left: 14px;
    border-left: 3px solid transparent;
    transition: border-color 0.2s ease;
}

.pub-item:hover {
    border-left-color: #1772d0;
}

.pub-thumb {
    width: 250px;
    height: auto;
    border-radius: 6px;
    flex-shrink: 0;
    object-fit: contain;
    margin-top: 2px;
    border: 1px solid #eee;
}

.pub-text {
    flex: 1;
    min-width: 0;
}

.pub-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 3px;
}

.pub-title a {
    color: #1772d0;
}

.pub-title a:hover {
    color: #f09228;
}

.pub-authors {
    font-size: 14px;
    color: #555;
    margin-bottom: 3px;
    line-height: 1.5;
}

.pub-authors strong {
    color: #222;
}

.pub-venue {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
}

.pub-links {
    font-size: 13px;
}

.pub-links a {
    margin-right: 8px;
    font-weight: 600;
}

/* ---- Blog Listing (Homepage) ---- */
.blog-posts {
    margin-bottom: 40px;
}

.blog-item {
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}

.blog-item:last-child {
    border-bottom: none;
}

.blog-item-title {
    font-size: 16px;
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}

.blog-item-date {
    font-size: 13px;
    color: #888;
    font-weight: 600;
}

.blog-item-desc {
    font-size: 14.5px;
    color: #555;
    margin-top: 4px;
    line-height: 1.6;
}

/* ---- Blog Post Page ---- */
.blog-article {
    max-width: 720px;
    margin: 0 auto;
}

.blog-header {
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.blog-title {
    font-size: 30px;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    font-size: 14px;
    color: #666;
}

.blog-meta .blog-date {
    font-weight: 600;
    color: #888;
}

.blog-meta .blog-links a {
    font-weight: 600;
}

.blog-section {
    margin-bottom: 32px;
}

.blog-section h2 {
    font-size: 22px;
    margin-bottom: 14px;
}

.blog-section h3 {
    font-size: 17px;
    margin-top: 20px;
    margin-bottom: 8px;
}

.blog-section p {
    font-size: 15.5px;
    line-height: 1.8;
    margin-bottom: 14px;
}

.blog-section ul {
    margin: 0 0 14px 20px;
    font-size: 15.5px;
    line-height: 1.8;
}

.blog-section ul li {
    margin-bottom: 4px;
}

.blog-figure {
    margin: 24px 0;
    text-align: center;
}

.blog-figure img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid #eee;
}

.blog-figure figcaption {
    font-size: 13px;
    color: #888;
    margin-top: 8px;
    line-height: 1.5;
}

.blog-takeaway {
    background: #eef5ff;
    border: 1px solid #7ba3d7;
    border-radius: 4px;
    padding: 12px 16px;
    margin-top: 18px;
    font-size: 15px;
    line-height: 1.7;
    color: #333;
}

.blog-takeaway strong {
    color: #1a5276;
}

.blog-references {
    font-size: 14px;
    line-height: 1.7;
    padding-left: 24px;
    color: #444;
}

.blog-references li {
    margin-bottom: 6px;
    padding-left: 4px;
}

.blog-references li a {
    font-size: 13px;
}

.blog-back {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.blog-back a {
    font-weight: 600;
    font-size: 15px;
}

/* ---- Footer ---- */
footer {
    margin-top: 50px;
    padding-top: 18px;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 13px;
    color: #aaa;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .topnav {
        position: static;
        justify-content: center;
        border-bottom-left-radius: 0;
        border-bottom: 1px solid #eee;
        padding: 10px 16px;
    }

    .container {
        padding: 20px 16px;
    }

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

    .profile-photo {
        width: 160px;
        height: 160px;
    }

    .profile-info h1 {
        font-size: 28px;
    }

    .social-links {
        justify-content: center;
    }

    .news-list li {
        flex-direction: column;
    }

    .news-date {
        margin-bottom: 2px;
    }

    .pub-item {
        flex-direction: column;
    }

    .pub-thumb {
        width: 100%;
        max-width: 200px;
    }

    h2 {
        font-size: 21px;
    }

    h3 {
        font-size: 16px;
    }

    .blog-title {
        font-size: 24px;
    }

    .blog-meta {
        flex-direction: column;
        gap: 4px;
    }
}

/* ---- Print ---- */
@media print {
    .topnav {
        display: none;
    }

    .news-scroll {
        max-height: none;
        overflow-y: visible;
    }

    .container {
        max-width: 100%;
    }

    a {
        color: #000;
    }

    .pub-item {
        border-left: none;
    }
}
