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

:root {
  --accent:       #1a4a8a;      /* deep academic blue */
  --accent-light: #e8eef8;
  --text:         #1c1c1e;
  --text-muted:   #555;
  --text-light:   #888;
  --border:       #e2e4e9;
  --bg:           #ffffff;
  --bg-alt:       #f7f8fc;

  --sidebar-width: 300px;
  --content-max:   760px;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;

  --radius: 8px;
  --shadow: 0 1px 4px rgba(0,0,0,0.08);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 32px;
}

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

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

/* ============================================================
   Sidebar Navigation
   ============================================================ */
.sidebar-nav {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.sidebar-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav ul li a {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 5px 8px;
  border-radius: 5px;
  transition: background 0.15s, color 0.15s;
}
.sidebar-nav ul li a:hover,
.sidebar-nav ul li a.active {
  color: var(--accent);
  background: var(--accent-light);
  text-decoration: none;
}

/* ============================================================
   Page Layout  (sidebar + main)
   ============================================================ */
.page-wrapper {
  display: flex;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
}

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  padding: 76px 52px 40px 8px;
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

/* Profile Card */
.profile-card {
  text-align: center;
  margin-bottom: 24px;
}

.profile-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  margin-bottom: 14px;
}

.profile-placeholder {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 3px solid var(--border);
  margin: 0 auto 14px;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 600;
  color: var(--accent);
}

.profile-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 4px;
}

.profile-title {
  font-size: 13.5px;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 4px;
}

.profile-affiliation {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

/* Link buttons */
.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid #c5d5ef;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
}
.link-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  text-decoration: none;
}
.link-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* About Me in main content */
.about-text p {
  font-size: 15px;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 10px;
}
.about-text p:last-child { margin-bottom: 0; }

/* Research Interests */
.interests-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.interests-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.6;
}
.interests-list li:last-child { margin-bottom: 0; }
.interests-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-size: 13px;
}
.interest-name {
  font-weight: 600;
  color: var(--text);
}
.interest-desc {
  color: var(--text-muted);
}
.interest-desc::before {
  content: " — ";
  color: var(--text-light);
}

/* ============================================================
   Main Content
   ============================================================ */
.main-content {
  flex: 1;
  min-width: 0;
  padding: 48px 48px 80px;
  max-width: calc(var(--content-max) + 96px);
}

/* ============================================================
   Section Titles
   ============================================================ */
.section-title {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 6px;
  margin-bottom: 28px;
}

section {
  margin-bottom: 56px;
  scroll-margin-top: 24px;
}

/* News section removed */

/* ============================================================
   Publications Section
   ============================================================ */
.pub-item {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.pub-item:last-child {
  border-bottom: none;
}

.venue-note {
  font-size: 12.5px;
  color: var(--text-light);
}

.pub-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 5px;
}

.pub-authors {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.pub-venue {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  margin-bottom: 6px;
}

.venue-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 2px 9px;
  border-radius: 4px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}

.ccf-tag {
  font-size: 11px;
  font-weight: 600;
  color: #8a5a00;
  background: #fbf0d6;
  border: 1px solid #eccf8a;
  padding: 1px 7px;
  border-radius: 4px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}

.pub-link {
  font-size: 16px;
  opacity: 0.75;
  transition: opacity 0.15s, transform 0.15s;
  display: inline-block;
}
.pub-link:hover {
  opacity: 1;
  transform: scale(1.2);
  text-decoration: none;
}

.pub-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  font-style: italic;
}

.pub-link {
  font-size: 16px;
  opacity: 0.75;
  transition: opacity 0.15s;
}
.pub-link:hover {
  opacity: 1;
  text-decoration: none;
}

/* ============================================================
   Education Section
   ============================================================ */
.edu-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.edu-item:last-child { border-bottom: none; }

.edu-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.edu-school {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.edu-degree {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.edu-detail {
  font-size: 13px;
  color: var(--text-light);
}

.edu-date {
  font-size: 12.5px;
  color: var(--text-light);
  white-space: nowrap;
  padding-top: 2px;
}

/* ============================================================
   Experience Section
   ============================================================ */
.exp-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.exp-item:last-child { border-bottom: none; }

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.exp-role {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.exp-org {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 4px;
}

.exp-desc {
  font-size: 13.5px;
  color: var(--text-muted);
}

.exp-date {
  font-size: 12.5px;
  color: var(--text-light);
  white-space: nowrap;
  padding-top: 2px;
}

/* ============================================================
   Awards Section
   ============================================================ */
.awards-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.awards-list li {
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.awards-list li:last-child { border-bottom: none; }

.award-name {
  font-weight: 500;
  color: var(--text);
}
.award-org {
  font-size: 13px;
  color: var(--text-muted);
}
.award-year {
  font-size: 13px;
  color: var(--text-light);
  white-space: nowrap;
  margin-left: auto;
}

/* ============================================================
   Skills Section
   ============================================================ */
.skills-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill-row {
  display: flex;
  gap: 16px;
  font-size: 14px;
  line-height: 1.6;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.skill-row:last-child { border-bottom: none; }

.skill-label {
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  min-width: 100px;
  padding-top: 2px;
  flex-shrink: 0;
}

.skill-val {
  color: var(--text);
  flex: 1;
}

/* ============================================================
   Useful Links Section
   ============================================================ */
.links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.links-list li {
  font-size: 14px;
  padding: 4px 0;
}

.links-list li::before {
  content: "→ ";
  color: var(--accent);
  font-weight: 500;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 20px;
  font-size: 12.5px;
  color: var(--text-light);
  background: var(--bg-alt);
}

.site-footer p + p {
  margin-top: 4px;
}

.clustrmap-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 120px;
  overflow: hidden;
  line-height: 0;
  opacity: 0.85;
  z-index: 999;
}

/* ============================================================
   Responsive: Tablet / Mobile
   ============================================================ */
@media (max-width: 900px) {
  :root { --sidebar-width: 240px; }
  .main-content { padding: 36px 32px 60px; }
}

@media (max-width: 700px) {
  .page-wrapper { flex-direction: column; }

  .sidebar {
    width: 100%;
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 28px 24px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
  }

  .profile-card { text-align: left; flex-shrink: 0; }
  .profile-photo, .profile-placeholder { width: 90px; height: 90px; }
  .profile-links { justify-content: flex-start; }
  .sidebar-nav { margin-top: 12px; border-top: none; padding-top: 0; }
  .sidebar-nav ul { flex-direction: row; flex-wrap: wrap; gap: 4px; }

  .main-content { padding: 28px 20px 60px; }

  .edu-header,
  .exp-header { flex-direction: column; gap: 4px; }

  .skill-row { flex-direction: column; gap: 2px; }
  .skill-label { min-width: unset; }
}

@media (max-width: 480px) {
  .sidebar { flex-direction: column; }
}

/* ============================================================
   Academic CV Page
   ============================================================ */
.cv-page {
  background: var(--bg-alt);
}

.cv-sheet {
  width: min(100% - 40px, 900px);
  margin: 40px auto;
  padding: 56px 68px 42px;
  background: var(--bg);
  box-shadow: 0 8px 30px rgba(24, 39, 75, 0.08);
}

.cv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--accent);
}

.cv-kicker {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.cv-header h1 {
  font-family: var(--font-serif);
  font-size: 40px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.cv-role {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 2px;
}

.cv-affiliation,
.cv-note,
.cv-venue {
  color: var(--text-muted);
}

.cv-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  padding-top: 4px;
}

.cv-back {
  font-size: 13px;
  font-weight: 500;
}

.print-button {
  border: 1px solid #c5d5ef;
  border-radius: 5px;
  padding: 7px 11px;
  background: var(--accent-light);
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.print-button:hover {
  background: var(--accent);
  color: #fff;
}

.cv-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 9px;
  padding: 14px 0 4px;
  font-size: 12.5px;
  color: var(--text-light);
}

.cv-section {
  margin-top: 34px;
}

.cv-section h2 {
  margin-bottom: 16px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cv-summary p {
  max-width: 720px;
  font-size: 14px;
  line-height: 1.8;
}

.cv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cv-tags span {
  padding: 6px 10px;
  border: 1px solid #c5d5ef;
  border-radius: 4px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 13px;
}

.cv-entry {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 0 0 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.cv-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.cv-entry h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 3px;
}

.cv-entry p {
  font-size: 13.5px;
  color: var(--text-muted);
}

.cv-entry time {
  flex-shrink: 0;
  padding-top: 1px;
  color: var(--text-light);
  font-size: 12.5px;
  white-space: nowrap;
}

.cv-entry-compact {
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.cv-publications {
  list-style: none;
  counter-reset: cv-publication;
}

.cv-publications li {
  position: relative;
  counter-increment: cv-publication;
  padding: 0 0 18px 34px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.cv-publications li:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.cv-publications li::before {
  content: counter(cv-publication, decimal-leading-zero);
  position: absolute;
  top: 1px;
  left: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.cv-pub-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 4px;
}

.cv-publications li > p:not(.cv-pub-title) {
  font-size: 13px;
  color: var(--text-muted);
}

.cv-publications .cv-venue {
  margin-top: 5px;
  font-size: 12px;
  color: var(--accent);
}

.cv-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 44px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--text-light);
  font-size: 11.5px;
}

@media (max-width: 700px) {
  .cv-sheet {
    width: 100%;
    margin: 0;
    padding: 36px 24px 30px;
    box-shadow: none;
  }

  .cv-header {
    flex-direction: column;
    gap: 18px;
  }

  .cv-actions {
    width: 100%;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
  }

  .cv-header h1 {
    font-size: 34px;
  }

  .cv-entry {
    flex-direction: column;
    gap: 4px;
  }

  .cv-footer {
    flex-direction: column;
    gap: 4px;
  }
}

@media print {
  .cv-page {
    background: #fff;
  }

  .cv-sheet {
    width: 100%;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }

  .cv-actions,
  .print-button {
    display: none;
  }

  .cv-section {
    break-inside: avoid;
  }

  .cv-entry,
  .cv-publications li {
    break-inside: avoid;
  }
}
