/*--------------------------------------------------------------
# Academic Portfolio Layout
--------------------------------------------------------------*/
:root {
  --text-main: #2d2d2d;
  --text-muted: #666666;
  --text-soft: #8a8a8a;
  --link-color: #337ab7;
  --link-hover: #23527c;
  --border-color: #dddddd;
  --bg-body: #ffffff;
  --bg-soft: #f8f8f8;
  --sidebar-width: 280px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg-body);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

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

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

p {
  margin: 0 0 1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #222222;
  font-weight: 700;
  line-height: 1.25;
  margin: 1.5rem 0 0.65rem;
}

h1 {
  font-size: 2rem;
  margin-top: 0;
}

h2 {
  border-bottom: 1px solid var(--border-color);
  font-size: 1.45rem;
  padding-bottom: 0.35rem;
}

h3 {
  font-size: 1.15rem;
}

strong {
  font-weight: 700;
}

#header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  min-height: 58px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-container {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  min-height: 58px;
  padding: 0 1.5rem;
}

.site-brand {
  color: #222222;
  font-size: 1.05rem;
  font-weight: 700;
}

.site-brand:hover {
  color: #222222;
  text-decoration: none;
}

.nav-menu ul {
  align-items: center;
  display: flex;
  gap: 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: #555555;
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.25rem 0;
}

.nav-menu a:hover,
.nav-menu li.active a {
  color: #111111;
  text-decoration: none;
}

.mobile-nav-toggle {
  background: transparent;
  border: 0;
  color: #333333;
  cursor: pointer;
  display: none;
  font-size: 1.4rem;
  padding: 0.25rem;
}

.page-shell {
  display: grid;
  gap: 3rem;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1180px;
  padding: 2.5rem 1.5rem 3.5rem;
}

.profile-sidebar {
  align-self: start;
  position: sticky;
  top: 86px;
}

.profile-avatar {
  border-radius: 50%;
  display: block;
  height: 180px;
  margin: 0 0 1rem;
  object-fit: cover;
  width: 180px;
}

.profile-name {
  font-size: 1.25rem;
  margin: 0 0 0.25rem;
}

.profile-title {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
  margin-bottom: 1rem;
}

.profile-info-list {
  color: var(--text-muted);
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.profile-info-item {
  align-items: flex-start;
  display: flex;
  gap: 0.55rem;
  margin-bottom: 0.45rem;
}

.profile-info-item i {
  color: var(--text-soft);
  line-height: 1.6;
  width: 1rem;
}

.social-links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
  max-width: 254px;
}

.social-btn {
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: #555555;
  display: inline-flex;
  font-size: 0.9rem;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.social-btn:hover {
  background: var(--bg-soft);
  color: #111111;
  text-decoration: none;
}

.page-main {
  max-width: 820px;
  min-width: 0;
}

.content-section {
  margin-bottom: 2.25rem;
}

.section-heading {
  margin-top: 0;
}

.page-intro {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.news-list,
.entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-item {
  display: grid;
  gap: 1rem;
  grid-template-columns: 105px minmax(0, 1fr);
  padding: 0.55rem 0;
}

.news-date,
.entry-date {
  color: var(--text-soft);
  font-size: 0.9rem;
  white-space: nowrap;
}

.news-badge {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-right: 0.35rem;
  text-transform: uppercase;
}

.entry {
  border-bottom: 1px solid var(--border-color);
  padding: 1.2rem 0;
}

.entry:first-child {
  padding-top: 0;
}

.entry:last-child {
  border-bottom: 0;
}

.entry-title {
  font-size: 1.15rem;
  margin: 0 0 0.35rem;
}

.entry-meta {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 0.45rem;
}

.entry-desc {
  color: var(--text-main);
  font-size: 0.96rem;
  margin-bottom: 0.45rem;
}

.entry-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.author-me {
  color: #222222;
  font-weight: 700;
}

.talks-grid,
.projects-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr;
}

.talk-card,
.project-card {
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.talk-card:first-child,
.project-card:first-child {
  padding-top: 0;
}

.talk-card:last-child,
.project-card:last-child {
  border-bottom: 0;
}

.talk-meta {
  color: var(--text-soft);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.9rem;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.talk-event {
  color: #555555;
  font-weight: 700;
}

.talk-date::before {
  content: "| ";
}

.talk-title,
.project-title {
  align-items: baseline;
  color: #222222;
  display: flex;
  font-size: 1.1rem;
  font-weight: 700;
  gap: 0.45rem;
  line-height: 1.3;
  margin-bottom: 0.35rem;
}

.title-link {
  align-items: center;
  color: var(--text-soft);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.85rem;
  line-height: 1;
}

.title-link:hover {
  color: var(--link-hover);
  text-decoration: none;
}

.talk-desc,
.project-desc {
  color: var(--text-main);
  font-size: 0.95rem;
  margin-bottom: 0.45rem;
}

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

.talks-empty {
  color: var(--text-muted);
  margin: 0;
}

.hackathon-item {
  align-items: flex-start;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem 0;
}

.hackathon-item:last-child {
  border-bottom: 0;
}

.hackathon-icon {
  color: var(--text-soft);
  width: 1.25rem;
}

.hackathon-details h5 {
  font-size: 1rem;
  margin: 0 0 0.2rem;
}

.hackathon-details p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
}

.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.tech-pill {
  border: 1px solid var(--border-color);
  border-radius: 3px;
  color: #444444;
  display: inline-block;
  font-size: 0.88rem;
  padding: 0.18rem 0.5rem;
}

#footer {
  border-top: 1px solid var(--border-color);
  color: var(--text-soft);
  font-size: 0.85rem;
  margin-top: 1rem;
  padding: 1.25rem 0;
  text-align: center;
}

.back-to-top {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  bottom: 18px;
  color: #555555;
  display: none;
  height: 38px;
  justify-content: center;
  position: fixed;
  right: 18px;
  width: 38px;
  z-index: 999;
}

.back-to-top:hover {
  background: var(--bg-soft);
  color: #111111;
  text-decoration: none;
}

/* Collaboration Page */
.collab-role-tag {
  color: var(--link-color);
  font-weight: 600;
  font-size: 0.92rem;
}

.collab-group {
  margin-top: 1rem;
}

.collab-group-title {
  color: #333333;
  font-size: 0.98rem;
  font-weight: 700;
  margin: 1rem 0 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.collab-list {
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
}

.collab-list-item {
  align-items: baseline;
  border-bottom: 1px dotted var(--border-color);
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.6rem;
  padding: 0.5rem 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.collab-list-item:last-child {
  border-bottom: 0;
}

.collab-badge {
  background: var(--bg-soft);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  color: #555555;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.45rem;
  text-transform: uppercase;
  flex-shrink: 0;
}

.collab-badge.badge-blog {
  color: #1e6b52;
  border-color: #d1e7dd;
  background: #f0fdf4;
}

.collab-badge.badge-video {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}

.collab-badge.badge-talk {
  color: #1d4ed8;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.collab-badge.badge-workshop {
  color: #6d28d9;
  border-color: #ddd6fe;
  background: #f5f3ff;
}

.collab-badge.badge-report {
  color: #b45309;
  border-color: #fde68a;
  background: #fffbeb;
}

.collab-meta-note {
  color: var(--text-soft);
  font-size: 0.88rem;
}

@media (max-width: 860px) {
  .navbar-container {
    padding: 0 1rem;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .nav-menu {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: none;
    left: 0;
    padding: 0.85rem 1rem 1rem;
    position: absolute;
    right: 0;
    top: 58px;
  }

  .nav-menu.active {
    display: block;
  }

  .nav-menu ul {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.65rem;
  }

  .page-shell {
    display: block;
    padding: 1.5rem 1rem 2.5rem;
  }

  .profile-sidebar {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    position: static;
  }

  .profile-avatar {
    height: 132px;
    width: 132px;
  }

  .social-links-grid {
    max-width: none;
  }

  .news-item {
    display: block;
  }

  .news-date {
    display: block;
    margin-bottom: 0.1rem;
  }
}
