:root {
    --bg-deep: #0A1224;
    --accent-teal: #1ccab9;
    --text-main: #F5F7FB;
    --text-muted: #A3B3C9;
    --border: rgba(163, 179, 201, 0.35);
    --glass: rgba(10, 18, 36, 0.92);
    --content-width: 1125px;
    --frontpage-width: 1238px;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0;
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* --- Navigation Styling --- */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 15px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-weight: 600;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-links a.active {
    color: var(--text-main);
    font-weight: 600;
    border: 1px solid var(--text-main);
    padding: 6px 12px;
    border-radius: 4px;
}

/* Contact Button Style */
.nav-links .nav-btn {
    background: var(--accent-teal);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    transition: background 0.3s ease;
}

.nav-links .nav-btn:hover {
    background: #2a5f73;
}

/* --- Header & Profile Styling --- */
.container {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 120px 32px 60px;
}

body.frontpage .container {
    max-width: var(--frontpage-width);
}

.profile-area {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
}

body.frontpage .profile-area {
    width: 115%;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
}

body.frontpage .profile-area .hero-text {
    text-align: center;
}

body.frontpage .profile-area .bio-intro {
    text-align: left;
}

.profile-img {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

h1 {
    font-family: 'Newsreader', serif;
    font-size: 3rem;
    margin: 5px 0;
}

.subtitle {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
}

.bio-intro {
    color: #B8D4E0;
    font-size: 1.1rem;
    max-width: 500px;
}

/* --- Paper Cards --- */
.label {
    
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.paper-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 2px 15px;
    border-radius: 12px;
    margin-bottom: 5px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 10px;
}

.paper-card.frontpage-card {
    grid-template-columns: minmax(0, 2fr) 1fr;
    column-gap: 20px;
    padding: 2px 15px;
}

.paper-card.frontpage-card .card-content {
    justify-self: start;
}

.paper-card.frontpage-card .frontpage-thumb-frame {
    justify-self: center;
    align-self: center;
}

.card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.paper-thumbnail {
    width: 160px;
    height: 120px;
    border-radius: 0px;
    overflow: hidden;
    object-fit: contain;
    object-position: center;
    flex-shrink: 0;
    justify-self: center;
    border: none;
    background: transparent;
    box-sizing: border-box;
    display: block;
}

.paper-thumbnail.frontpage {
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: contain;
    object-position: center;
    display: block;
}

.frontpage-thumb-frame {
    width: 321px;
    height: 215px;
    border: 2px solid var(--border);
    border-radius: 13px;
    overflow: hidden;
    justify-self: center;
    box-sizing: border-box;
    background: transparent;
}

.frontpage-thumb-frame-1 {
    width: 215px;
    height: 215px;
}

.frontpage-thumb-frame-2 {
    width: 321px;
    height: 215px;
}

.paper-card h3 {
    margin: 0;
    font-family: 'Newsreader', serif;
    font-size: 1.4rem;
}

.authors {
    color: #B8D4E0; /* Brighter color for better visibility */
    margin: 5px 0;
    font-size: 0.9rem;
}

.authors-line {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin: 5px 0;
    gap: 10px;
}

.card-footer {
    display: flex;
    gap: 8px;
    align-items: center;
}

.card-footer a {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.card-footer a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-color: var(--text-main);
}

.abstract-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.abstract-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-color: var(--text-main);
}

.abstract {
    margin-top: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.02);
    border-left: 3px solid var(--accent-teal);
    border-radius: 4px;
}

.abstract p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* --- Education Timeline --- */
.timeline {
    position: relative;
    margin-top: 20px;
    padding-left: 8px;
    --timeline-padding-left: 8px;
    --timeline-marker-size: 16px;
    --timeline-marker-left: 2px;
    --timeline-line-left: calc(var(--timeline-padding-left) + var(--timeline-marker-left) + (var(--timeline-marker-size) / 2));
}

.timeline::before {
    content: "";
    position: absolute;
    left: var(--timeline-line-left);
    top: calc(8px + (var(--timeline-marker-size) / 2));
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-left: 40px;
    margin-bottom: 24px;
}

.timeline-marker {
    position: absolute;
    left: var(--timeline-marker-left);
    top: 8px;
    width: var(--timeline-marker-size);
    height: var(--timeline-marker-size);
    border-radius: 50%;
    background: var(--accent-teal);
    border: 2px solid var(--bg-deep);
    box-shadow: 0 0 0 2px var(--border);
}

.timeline-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 12px 16px;
    border-radius: 12px;
}

.timeline-content h3 {
    margin: 0;
    font-family: 'Newsreader', serif;
    font-size: 1.2rem;
}

.timeline-meta {
    margin: 6px 0 4px;
    color: #B8D4E0;
    font-size: 0.9rem;
}

.timeline-date {
    display: inline-block;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .profile-area { flex-direction: column; text-align: center; }
    .timeline { padding-left: 0; --timeline-padding-left: 0px; --timeline-marker-left: 0px; }
    .timeline-item { padding-left: 32px; }
}

/* Section Heading Styles */
#publications h2,
#education h2,
#expository h2,
#awards h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #B8D4E0;
    margin: 40px 0 20px 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.journal {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
    margin: 5px 0;
}