/* ============================================================
   Variables
   ============================================================ */
:root {
  --color-bg:         #ffffff;
  --color-text:       #333333;
  --color-muted:      #666666;
  --color-accent:     #1565c0;   /* navy-blue links */
  --color-accent-hover: #0d47a1;
  --color-border:     #e0e0e0;
  --color-sidebar-bg: #f8f9fa;
  --font-body:        Georgia, "Times New Roman", Times, serif;
  --font-sans:        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                      Helvetica, Arial, sans-serif;
  --sidebar-width:    240px;
  --max-content-width: 860px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover { color: var(--color-accent-hover); text-decoration: underline; }

ul { list-style: disc; padding-left: 1.4rem; }
ul li { margin-bottom: 0.4rem; }

h1, h2, h3 { font-family: var(--font-sans); }
h3 { font-size: 1.3rem; margin-bottom: 1rem; border-bottom: 1px solid var(--color-border); padding-bottom: 0.4rem; }

/* ============================================================
   Layout: sidebar + main
   ============================================================ */
.wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--color-sidebar-bg);
  border-right: 1px solid var(--color-border);
  padding: 2rem 1.25rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Profile block */
.profile { text-align: center; }

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  border: none;
  padding: 0;
}
.site-title a { color: var(--color-text); }
.site-title a:hover { color: var(--color-accent); text-decoration: none; }

.profile-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-border);
  margin: 0.75rem auto;
  display: block;
}

.position {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.2rem;
}

.affiliation {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-bottom: 0.15rem;
}
.affiliation a { color: var(--color-muted); }
.affiliation a:hover { color: var(--color-accent); }

.contact-email {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.social-links {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.social-links a {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  background: var(--color-accent);
  color: #fff;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
}
.social-links a:hover {
  background: var(--color-accent-hover);
  text-decoration: none;
  color: #fff;
}

/* Navigation */
.site-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--color-border);
  padding-top: 1rem;
}
.site-nav li { margin-bottom: 0; }
.site-nav a {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 0.45rem 0.6rem;
  border-radius: 4px;
  color: var(--color-muted);
  transition: background 0.15s, color 0.15s;
}
.site-nav a:hover,
.site-nav a.active {
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
}

/* Main content */
.main-content {
  flex: 1;
  padding: 2.5rem 3rem;
  max-width: calc(var(--max-content-width) + 6rem);
}

/* ============================================================
   Home page: two-column hero
   ============================================================ */
.home-hero {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}
.home-hero img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-border);
  flex-shrink: 0;
}
.home-intro p { margin-bottom: 0.75rem; }

/* ============================================================
   Publication list
   ============================================================ */
.pub-list { list-style: none; padding: 0; }
.pub-list li {
  margin-bottom: 1.1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.97rem;
}
.pub-list li:last-child { border-bottom: none; }
.pub-year-heading {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-muted);
  margin: 1.5rem 0 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pub-links { font-size: 0.85rem; }
.pub-links a {
  margin-right: 0.4rem;
  background: #e8f0fe;
  color: var(--color-accent);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-family: var(--font-sans);
}
.pub-links a:hover { background: var(--color-accent); color: #fff; text-decoration: none; }

/* ============================================================
   Teaching list
   ============================================================ */
.teaching-list { list-style: none; padding: 0; }
.teaching-list li {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}
.teaching-list li:last-child { border-bottom: none; }
.course-name {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
}
.course-terms {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-top: 0.2rem;
}
.course-terms a { color: var(--color-muted); }
.course-terms a:hover { color: var(--color-accent); }

/* ============================================================
   Software list
   ============================================================ */
.software-list { list-style: none; padding: 0; }
.software-list li {
  margin-bottom: 1.1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--color-border);
}
.software-list li:last-child { border-bottom: none; }
.software-name {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
}
.software-desc { font-size: 0.95rem; margin-top: 0.2rem; }

/* ============================================================
   Blog list
   ============================================================ */
.post-list { list-style: none; padding: 0; }
.post-list li {
  margin-bottom: 1.4rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--color-border);
}
.post-list li:last-child { border-bottom: none; }
.post-list h4 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}
.post-meta {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-bottom: 0.4rem;
}
.post-excerpt { font-size: 0.95rem; }

/* Post article */
.post { max-width: 760px; }
.post-header { margin-bottom: 1.5rem; }
.post-header h3 { font-size: 1.5rem; }
.post-content p { margin-bottom: 1rem; }
.post-content h2, .post-content h3 { margin: 1.5rem 0 0.75rem; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  text-align: center;
  padding: 1.25rem;
  background: var(--color-sidebar-bg);
  border-top: 1px solid var(--color-border);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--color-muted);
}
.site-footer a { color: var(--color-muted); }
.site-footer a:hover { color: var(--color-accent); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .wrapper { flex-direction: column; }

  .sidebar {
    width: 100%;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
  }

  .profile { text-align: left; display: flex; align-items: center; gap: 1rem; }
  .profile-photo { width: 60px; height: 60px; margin: 0; }
  .social-links { justify-content: flex-start; }

  .site-nav ul { display: flex; flex-wrap: wrap; gap: 0.4rem; border-top: none; padding-top: 0; }

  .main-content { padding: 1.5rem 1.25rem; }

  .home-hero { flex-direction: column; }
  .home-hero img { width: 120px; height: 120px; }
}
