/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f9f9f9;
}

/* Layout */
.layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: #fff;
  border-right: 1px solid #e0e0e0;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.profile .avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  background: #ddd;
  margin-bottom: 1rem;
}
.profile h2 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}
.profile .bio {
  font-size: 0.9rem;
  text-align: left;
  color: #555;
  margin-bottom: 1.5rem;
}

/* Social Links */
.social-links {
  width: 100%;
}
.social-links a {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  color: #333;
  text-decoration: none;
  font-size: 0.9rem;
}
.social-links .icon {
  margin-right: 0.5rem;
}

/* Main Area */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Top Navigation */
.top-nav {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-title {
  font-size: 1.25rem;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

/* Content */
.content {
  padding: 2rem;
}
.content h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.content p {
  margin-bottom: 1rem;
}
.content a {
  color: #0066cc;
  text-decoration: underline;
}

/* Avatar Overrides */
.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Recent Updates List */
.updates {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}
.updates > li {
  position: relative;
  padding-left: 1.5em;
  margin-bottom: 0.75em;
}
.updates > li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1.25rem;
  line-height: 1;
  color: #0066cc;
}

/* Nested list */
.nested-updates {
  list-style: disc outside;
  margin: 0.5rem 0 0 1.5rem;
  padding: 0;
}
.nested-updates li {
  position: static;
  padding: 0;
  margin: 0.5rem 0;
  font-size: 0.95rem;
}
.nested-updates li::before {
  content: none;
}

/* Publications styling */
.pub-year {
  margin-bottom: 1.5rem;
}
.pub-year h3 {
  margin-bottom: 0.75rem;
  color: #444;
}
.publication-item {
  margin-bottom: 0.75rem;
}
.publication-item p {
  margin: 0.1rem 0;
}
.pub-title {
  font-size: 1.1rem;
  margin-bottom: 0.05rem;
}
.pub-authors {
  font-size: 0.95rem;
  color: #666;
  margin: 0.05rem 0;
}
.pub-venue {
  font-style: italic;
  margin-bottom: 0.1rem;
  color: #555;
}
.pub-links {
  margin: 0;
}
.pub-links a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.pub-links a:hover {
  border-color: #0066cc;
}

/* Photo Slideshow styling */
#photo-slideshow {
  margin-top: 2rem;
  text-align: center;
}
.slideshow-container {
  position: relative;
  max-width: 600px;
  margin: 1rem auto;
  overflow: hidden;
}
.slideshow-container img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
/* Navigation arrows */
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  border: none;
  color: white;
  font-size: 1.5rem;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  border-radius: 4px;
  user-select: none;
}
.nav-arrow.left  { left: 8px; }
.nav-arrow.right { right: 8px; }
.nav-arrow:hover {
  background: rgba(0,0,0,0.6);
}

/* Blog overview grid */
.blog-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  max-width: calc(5 * 200px + 4 * 1rem);
  margin: 0 auto;
  padding: 1rem 0;
}
.blog-item {
  width: 200px;
}
.blog-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #f0f0f0;
  border-radius: 0.5rem;
  display: block;
}
.blog-item h3 {
  margin: 0.5rem 0 0.25rem;
  font-size: 1.1rem;
}
.blog-item h3 a {
  text-decoration: none;
  color: #333;
}
.blog-item h3 a:hover {
  color: #0066cc;
}
.blog-meta {
  font-size: 0.9rem;
  color: #666;
}

/* ────────────────────────────────────────────────────────────── */
/* MOBILE‑FIRST & RESPONSIVE BREAKPOINTS                         */
/* ────────────────────────────────────────────────────────────── */

/* 1) Stack sidebar & main at tablet and below */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
    padding: 1.5rem;
  }
  body {
    font-size: 0.95rem;
    line-height: 1.4;
  }
  .content {
    padding: 1rem;
  }
}

/* 2) Collapse top‑nav links into vertical list */
@media (max-width: 600px) {
  .top-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .nav-links {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* 3) Collapse blog grid to 2 columns */
@media (max-width: 800px) {
  .blog-list {
    grid-template-columns: repeat(2, 1fr);
    max-width: calc(2 * 200px + 1 * 1rem);
  }
}

/* 4) Collapse blog grid to 1 column */
@media (max-width: 500px) {
  .blog-list {
    grid-template-columns: 1fr;
    max-width: 100%;
    gap: 0.5rem;
  }
}

/* 5) Make slideshow full‑width and smaller arrows */
@media (max-width: 600px) {
  .slideshow-container {
    max-width: 100%;
    margin: 1rem 0;
  }
  .nav-arrow {
    font-size: 1.25rem;
    padding: 0.2rem 0.5rem;
  }
}
