/* ============================================
   Custom Sidebar Layout for sonas.github.io
   ============================================ */

html {
  scroll-behavior: smooth;
}

/* Reset some theme defaults */
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  color: #333;
  background-color: #fff;
}

/* Hide theme's default wrapper if present */
.wrapper {
  max-width: none;
  padding: 0;
  margin: 0;
}

/* ---- Two Column Layout ---- */
.site-wrapper {
  display: flex;
  max-width: 1100px;
  margin: 0 auto;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid #eaeaea;
  background-color: #fafafa;
}

.sidebar-inner {
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Avatar */
.avatar-wrapper {
  margin-bottom: 1.2rem;
}

.avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  background-color: #f0f0f0;
}

/* Name & Title */
.sidebar-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 0.3rem 0;
  color: #222;
}

.sidebar-position {
  font-size: 0.95rem;
  color: #666;
  margin: 0 0 0.2rem 0;
}

.sidebar-affiliation {
  font-size: 0.9rem;
  margin: 0 0 0.8rem 0;
}

.sidebar-affiliation a {
  color: #4a90d9;
  text-decoration: none;
}

.sidebar-affiliation a:hover {
  text-decoration: underline;
}

/* Location */
.sidebar-location {
  font-size: 0.85rem;
  color: #555;
  margin: 0 0 0.4rem 0;
}

.sidebar-location i {
  margin-right: 0.3rem;
  color: #888;
}

/* Email */
.sidebar-email {
  font-size: 0.85rem;
  color: #555;
  margin: 0 0 1rem 0;
  word-break: break-all;
}

.sidebar-email i {
  margin-right: 0.3rem;
  color: #888;
}

.sidebar-email a {
  color: #555;
  text-decoration: none;
}

.sidebar-email a:hover {
  color: #4a90d9;
}

/* Social Icons */
.social-icons {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.social-icons a {
  color: #555;
  text-decoration: none;
  transition: color 0.2s;
}

.social-icons a:hover {
  color: #4a90d9;
}

/* Sidebar Navigation */
.sidebar-nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  border-top: 1px solid #eaeaea;
  padding-top: 1rem;
}

.sidebar-nav a {
  display: block;
  padding: 0.45rem 0.8rem;
  margin: 0.1rem 0;
  font-size: 0.9rem;
  color: #444;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.2s, color 0.2s;
}

.sidebar-nav a:hover {
  background-color: #e8f0fe;
  color: #1a73e8;
}

/* ---- Main Content ---- */
.content {
  flex: 1;
  min-width: 0;
  padding: 2.5rem 3rem;
}

/* Section Headers */
.content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #222;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #eaeaea;
  margin-top: 2.5rem;
  margin-bottom: 1.2rem;
}

.content h2:first-child {
  margin-top: 0;
}

/* Paragraphs & Lists */
.content p {
  margin: 0.8rem 0;
  color: #444;
}

.content ul {
  padding-left: 1.2rem;
}

.content li {
  margin-bottom: 0.5rem;
  color: #444;
}

/* Links */
.content a {
  color: #4a90d9;
  text-decoration: none;
}

.content a:hover {
  text-decoration: underline;
}

/* News Items */
.news-list {
  list-style: none;
  padding-left: 0;
}

.news-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid #f0f0f0;
}

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

/* Research Interest Tags */
.research-item strong {
  color: #333;
}

/* Publication List */
.pub-list {
  list-style: none;
  padding-left: 0;
  counter-reset: pub-counter;
}

.pub-entry {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.pub-entry:last-child {
  border-bottom: none;
}

.pub-title {
  font-weight: 600;
  font-size: 0.93rem;
  color: #222;
  line-height: 1.4;
  margin-bottom: 0.2rem;
}

.pub-title a {
  color: #222;
  text-decoration: none;
}

.pub-title a:hover {
  color: #4a90d9;
}

.pub-authors {
  font-size: 0.82rem;
  color: #666;
  margin-bottom: 0.25rem;
}

.pub-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.pub-venue-tag {
  font-size: 0.78rem;
  color: #555;
  font-style: italic;
}

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: #4a90d9;
  text-decoration: none;
  padding: 0.1rem 0.45rem;
  border: 1px solid #d0ddf0;
  border-radius: 3px;
  transition: background-color 0.2s;
}

.pub-link:hover {
  background-color: #e8f0fe;
  text-decoration: none;
}

/* Awards Section */
.awards-list {
  list-style: none;
  padding-left: 0;
}

.awards-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid #f0f0f0;
}

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

/* Education Section */
.edu-list {
  list-style: none;
  padding-left: 0;
}

.edu-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid #f0f0f0;
}

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

.edu-date {
  font-size: 0.85rem;
  color: #888;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding-top: 0;
}

.site-footer hr {
  border: none;
  border-top: 1px solid #eaeaea;
}

.site-footer p {
  font-size: 0.8rem;
  color: #999;
  text-align: center;
}

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

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #eaeaea;
  }

  .sidebar-inner {
    padding: 1.5rem 1rem;
  }

  .avatar {
    width: 120px;
    height: 120px;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem;
  }

  .sidebar-nav a {
    padding: 0.3rem 0.6rem;
    font-size: 0.85rem;
  }

  .content {
    padding: 1.5rem 1.2rem;
  }

  .pub-entry {
    flex-direction: column;
  }

  .pub-thumbnail {
    width: 100%;
    max-width: 200px;
  }
}

/* ---- Dark Mode ---- */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #1e1e1e;
    color: #d4d4d4;
  }

  .sidebar {
    background-color: #252525;
    border-right-color: #3a3a3a;
  }

  .sidebar-name {
    color: #e0e0e0;
  }

  .sidebar-position {
    color: #aaa;
  }

  .sidebar-location {
    color: #aaa;
  }

  .sidebar-email,
  .sidebar-email a {
    color: #aaa;
  }

  .sidebar-email i {
    color: #777;
  }

  .social-icons a {
    color: #aaa;
  }

  .social-icons a:hover {
    color: #7dade2;
  }

  .sidebar-nav {
    border-top-color: #3a3a3a;
  }

  .sidebar-nav a {
    color: #bbb;
  }

  .sidebar-nav a:hover {
    background-color: #2d3748;
    color: #7dade2;
  }

  .content h2 {
    color: #e0e0e0;
    border-bottom-color: #3a3a3a;
  }

  .content p,
  .content li {
    color: #c0c0c0;
  }

  .content a {
    color: #7dade2;
  }

  .avatar {
    border-color: #444;
  }

  .news-list li,
  .awards-list li,
  .edu-list li {
    border-bottom-color: #333;
  }

  .pub-entry {
    border-bottom-color: #333;
  }

  .pub-title,
  .pub-title a {
    color: #e0e0e0;
  }

  .pub-authors {
    color: #aaa;
  }

  .pub-venue-tag {
    color: #999;
  }

  .pub-link {
    color: #7dade2;
    border-color: #444;
  }

  .pub-link:hover {
    background-color: #333;
  }

  .site-footer hr {
    border-top-color: #3a3a3a;
  }

  .site-footer p {
    color: #666;
  }
}
