﻿:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: #30363d;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79c0ff;
  --sidebar: 260px;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  height: 100%;
  padding-top: 56px;
  overflow: hidden;
  background: var(--bg);
  color: var(--text-primary);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  line-height: 1.65;
}

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

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

h1,
h2,
h3 {
  margin: 0;
  font-family: "DM Serif Display", "Times New Roman", serif;
  line-height: 1.2;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
}

.topbar-name {
  font-family: "DM Serif Display", serif;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.tab-nav {
  display: flex;
  gap: 0;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-family: "DM Sans", sans-serif;
  font-size: 0.95rem;
  padding: 16px 18px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  height: calc(100vh - 56px);
}

.sidebar {
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  padding: 0 20px 26px;
  background: var(--surface);
  border-right: 1px solid var(--border);
}

.profile {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  display: block;
  margin: 26px auto 14px;
  background: #0f141a;
}

.name {
  text-align: center;
  font-size: 1.7rem;
  margin-bottom: 6px;
}

.role {
  text-align: center;
  color: var(--text-secondary);
  font-weight: 500;
  margin: 0 0 14px;
}

.meta {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin: 0 0 8px;
}

.meta i {
  width: 16px;
  text-align: center;
  color: var(--accent);
}

.social {
  display: grid;
  gap: 8px;
  margin: 18px 0 24px;
}

.social-link {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 0.93rem;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.social-link:hover {
  background: rgba(88, 166, 255, 0.08);
  border-color: var(--border);
  text-decoration: none;
  color: var(--accent);
}

.social-placeholder {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

.subnav-block {
  margin-top: 6px;
}

.subnav-title {
  margin: 0 0 10px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.subnav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.subnav-list li {
  margin-bottom: 6px;
}

.nav-link {
  display: inline-block;
  width: 100%;
  color: var(--text-secondary);
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.subnav-btn {
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
}

.nav-link:hover {
  color: var(--accent-hover);
  text-decoration: none;
  background: rgba(88, 166, 255, 0.08);
}

.nav-link.active {
  color: var(--accent);
  font-weight: 600;
  background: rgba(88, 166, 255, 0.14);
}

.content {
  height: calc(100vh - 56px);
  overflow-y: auto;
  scroll-behavior: smooth;
}

.sidebar,
.content {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar::-webkit-scrollbar,
.content::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.sidebar::-webkit-scrollbar-track,
.content::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.content::-webkit-scrollbar-thumb {
  background: #2d333b;
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.content::-webkit-scrollbar-thumb:hover {
  background: #3a434d;
  background-clip: padding-box;
}

.panel {
  display: none;
  padding: 40px min(7vw, 78px) 72px;
}

.panel.active {
  display: block;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.section-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0 0 28px;
}

.subsection-title {
  font-size: 1.2rem;
  margin-bottom: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 16px;
}

.project-subtitle {
  color: var(--text-secondary);
  margin: 8px 0 10px;
}

.bullets {
  margin: 0;
  padding-left: 20px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.tag-wrap {
  margin-top: 12px;
}

.pill,
.tag,
.badge {
  display: inline-block;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 0.75rem;
  margin: 2px;
  border: 1px solid;
}

.pill,
.tag {
  color: var(--accent);
  background: rgba(88, 166, 255, 0.1);
  border-color: rgba(88, 166, 255, 0.2);
}

.project-links {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  background: rgba(88, 166, 255, 0.08);
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
}

.project-link:hover {
  background: rgba(88, 166, 255, 0.16);
  text-decoration: none;
  color: var(--accent-hover);
}

.placeholder-btn {
  opacity: 0.45;
  cursor: default !important;
  pointer-events: none;
}

.pub-title {
  font-size: 1.03rem;
  margin-bottom: 8px;
}

.pub-meta,
.pub-auth {
  color: var(--text-secondary);
}

.pub-meta {
  font-size: 0.9rem;
}

.pub-auth {
  font-size: 0.88rem;
  margin: 6px 0 10px;
}

.badge {
  font-weight: 600;
}

.accepted {
  color: #3fb950;
  background: rgba(63, 185, 80, 0.15);
  border-color: rgba(63, 185, 80, 0.35);
}

.review {
  color: #d29922;
  background: rgba(210, 153, 34, 0.16);
  border-color: rgba(210, 153, 34, 0.4);
}

.published {
  color: var(--accent);
  background: rgba(88, 166, 255, 0.16);
  border-color: rgba(88, 166, 255, 0.35);
}

.abstract-toggle {
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  margin-top: 8px;
  display: inline-block;
}

.abstract-body {
  display: none;
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}

.abstract-body.open {
  display: block;
}

.cv-subsection {
  margin-bottom: 66px;
  scroll-margin-top: 16px;
}

.head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.period {
  color: var(--text-secondary);
  font-size: 0.88rem;
  white-space: nowrap;
}

.org {
  color: var(--text-secondary);
  margin: 0 0 10px;
  font-size: 0.93rem;
}

.skills-grid {
  display: grid;
  gap: 10px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
}

.skill-card h3 {
  font-size: 1.02rem;
  margin-bottom: 8px;
}

.awards {
  list-style: none;
  padding: 0;
  margin: 0;
}

.awards li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.awards i {
  margin-top: 3px;
  color: #d29922;
  width: 14px;
}

.btns {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(88, 166, 255, 0.08);
  color: var(--accent);
  font-weight: 600;
}

.btn:hover {
  text-decoration: none;
  background: rgba(88, 166, 255, 0.16);
}

.muted {
  color: var(--text-secondary);
}

@media (max-width: 1040px) {
  :root {
    --sidebar: 230px;
  }

  .panel {
    padding: 32px 24px 56px;
  }
}

@media (max-width: 780px) {
  :root {
    --sidebar: 210px;
  }

  .profile {
    width: 106px;
    height: 106px;
  }

  .name {
    font-size: 1.38rem;
  }

  .role {
    font-size: 0.9rem;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 0;
  }

  .topbar-name {
    display: none;
  }

  .tab-nav {
    width: 100%;
  }

  .tab-btn {
    flex: 1;
    text-align: center;
    font-size: 0.84rem;
    padding: 16px 8px;
  }
}
