/* Professional Academic Website Styling v2 */

:root {
    --sidebar-width: 300px;
    --text-color: #2b2b2b;
    --heading-color: #111;
    --link-color: #0a58ca;
    --bg-color: #ffffff;
    --sidebar-bg: #fafafa;
    --border-color: #e5e7eb;
    --hover-bg: #eef2f7;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
        Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    font-size: 16px;
    line-height: 1.75;
    margin: 0;
    padding: 0;
    background: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.wrapper {
    display: flex;
    flex: 1;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
}
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    padding: 44px 36px;
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-sizing: border-box;
}
.profile-pic {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: block;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.sidebar h1 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.75em;
    color: var(--heading-color);
}

.sidebar h1 a {
    color: var(--heading-color);
    text-decoration: none;
}

.sidebar h1 a:hover {
    color: var(--link-color);
    text-decoration: underline;
}
.sidebar .description {
    text-align: center;
    font-size: 0.95em;
    color: #666;
    margin-bottom: 30px;
}
.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.nav-list li {
    margin-bottom: 6px;
}
.sidebar nav a {
    display: block;
    padding: 10px 14px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.02em;
    transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
}
.sidebar nav a:hover {
    background-color: var(--hover-bg);
}
.sidebar nav a.active {
    background-color: var(--link-color);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.skip-link {
    position: absolute;
    left: -999px;
    top: -999px;
}
.skip-link:focus {
    left: 8px;
    top: 8px;
    background: #000;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    z-index: 1000;
}
.main-content {
    margin-left: 0;
    flex: 1;
    padding: 28px 64px;
    width: 100%;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
    border-bottom: none;
}

.page-header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--heading-color);
}

.inline-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.inline-nav a {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.inline-nav a:hover {
    color: var(--link-color);
}

.nav-separator {
    color: #999;
    font-size: 1rem;
    margin: 0 3px;
}

.narrative-section {
    margin-bottom: 40px;
    padding: 0;
}

.narrative-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.narrative-text {
    flex: 1;
}

.narrative-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-color);
    margin: 0 0 20px 0;
}

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

.narrative-image {
    flex-shrink: 0;
}

.profile-pic-rect {
    width: 280px;
    height: 350px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bio-profile-pic {
    width: 240px !important;
    height: 300px !important;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.experience-section {
    margin-top: 20px;
}

.experience-item {
    background: #f8f9fa;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    outline: none;
}

.experience-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

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

.experience-org {
    font-size: 1.1em;
    color: #2c3e50;
    flex: 1;
    margin-right: 15px;
}

.experience-org a {
    color: #2c3e50;
    text-decoration: none;
}

.experience-org a:hover {
    color: #1a252f;
    text-decoration: underline;
}

.experience-date {
    color: #6c757d;
    font-weight: 500;
    font-size: 0.9em;
    white-space: nowrap;
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
}

.experience-position {
    font-size: 1em;
    color: #007bff;
    font-weight: 600;
    margin-bottom: 12px;
    font-style: italic;
}

.experience-details ul {
    margin: 0;
    padding-left: 20px;
}

.experience-details li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #495057;
}

.experience-details li:last-child {
    margin-bottom: 0;
}

.focus-areas-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.focus-block {
    background: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
}

.focus-block:hover {
    border-color: var(--link-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.focus-block h4 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--heading-color);
}

.focus-block p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-color);
}

.research-interests-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.interest-panel {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 50%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 24px 16px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(10px);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.interest-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(0, 123, 255, 0.05) 0%, 
        rgba(40, 167, 69, 0.05) 25%, 
        rgba(255, 193, 7, 0.05) 50%, 
        rgba(220, 53, 69, 0.05) 75%, 
        rgba(108, 117, 125, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 16px;
}

.interest-panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 16px 16px 0 0;
}

.interest-panel:hover {
    border-color: #007bff;
    box-shadow: 0 16px 40px rgba(0, 123, 255, 0.15), 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-6px) scale(1.03);
}

.interest-panel:hover::before {
    opacity: 1;
}

.interest-panel:hover::after {
    opacity: 1;
}

.interest-panel h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a202c;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 2;
    line-height: 1.2;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.interest-panel p {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.3;
    color: #4a5568;
    font-style: italic;
    font-weight: 500;
    position: relative;
    z-index: 2;
}
footer {
    text-align: center;
    padding: 25px;
    font-size: 0.9em;
    color: #6c757d;
    background-color: var(--sidebar-bg);
    border-top: 1px solid var(--border-color);
}
footer p {
    margin: 0;
}
footer a {
    color: var(--link-color);
    margin: 0 10px;
}

/* Embedded PDF container */
.pdf-embed {
    width: 100%;
    height: 900px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}
h1, h2, h3, h4, h5, h6 {
    font-family: ui-serif, Georgia, "Times New Roman", serif;
    color: var(--heading-color);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}
h1 { font-size: 2.1rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.35rem; margin-top: 0; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

/* Minimalist feel inspired by Lamport/Friston pages */
.main-content p {
    max-width: 70ch;
}
.main-content {
    line-height: 1.8;
}

a {
    color: var(--link-color);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
ul {
    padding-left: 20px;
}
li {
    margin-bottom: 10px;
}
/* Publication list styling */
.publications-list {
    list-style: none;
    padding-left: 0;
}
.publications-list li {
    padding-left: 1.5em;
    text-indent: -1.5em;
    margin-bottom: 0.85em;
}

/* Responsive Design */
@media (max-width: 992px) {
    .wrapper {
        flex-direction: column;
    }
    .main-content {
        padding: 22px 22px;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .inline-nav {
        margin-top: 10px;
        gap: 15px;
    }
    .inline-nav a {
        font-size: 1rem;
    }
    .nav-separator {
        font-size: 0.9rem;
        margin: 0 3px;
    }
    .narrative-content {
        flex-direction: column;
        gap: 20px;
    }
    .narrative-image {
        align-self: center;
    }
    .profile-pic-rect {
        width: 220px;
        height: 275px;
    }
    .focus-areas-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .research-interests-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    padding: 48px 40px;
    margin-bottom: 48px;
    border: 1px solid var(--border-color);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 12px;
    border: none;
    padding: 0;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--link-color);
    font-weight: 500;
    margin-bottom: 16px;
}

.hero-description {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--link-color);
    color: white;
}

.btn-primary:hover {
    background-color: #0d4a8a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(10, 88, 202, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--link-color);
    border-color: var(--link-color);
}

.btn-secondary:hover {
    background-color: var(--link-color);
    color: white;
    transform: translateY(-1px);
}

/* Bio Page Styling */
.bio-intro {
    margin-bottom: 40px;
}

.lead {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #475569;
    font-weight: 400;
}

.education-item {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.education-item h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--heading-color);
}

.degree {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.year {
    color: #64748b;
    font-weight: 400;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.skill-category {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.skill-category h4 {
    margin-top: 0;
    margin-bottom: 12px;
    color: var(--heading-color);
    font-size: 1.1rem;
}

.skill-category p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}

/* Content Improvements */
.main-content ul {
    padding-left: 24px;
}

.main-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.main-content strong {
    color: var(--heading-color);
    font-weight: 600;
}

/* Small informational note styling */
.fact-note {
    font-size: 0.9em;
    color: #64748b;
    font-style: italic;
    margin: 6px 0 10px;
}

/* Publications Styling */
.publications-list {
    list-style: none;
    padding-left: 0;
}

.publications-list li {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
}

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

.publication-title {
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 4px;
}

.publication-authors {
    color: #64748b;
    margin-bottom: 4px;
}

.publication-venue {
    color: var(--link-color);
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-section {
        padding: 32px 24px;
        margin-bottom: 32px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .hero-links {
        flex-direction: column;
        align-items: center;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1300px) {
    .main-content {
        padding-right: 96px;
    }
}

/* Project cards */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 12px;
}
.project-card {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}
.project-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 8px;
}

/* Hero tweaks */
.hero-contact {
  margin-top: 8px;
}

/* Widgets */
.widget {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 28px;
}

.widget-title {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.5rem;
    color: var(--heading-color);
}

.widget p:last-child,
.widget ul:last-child {
    margin-bottom: 0;
}

/* Name link styling - make it appear in black while keeping it hyperlinked */
.page-header h1 a {
    color: var(--heading-color) !important;
    text-decoration: none;
}

.page-header h1 a:hover {
    color: var(--link-color) !important;
    text-decoration: underline;
}
