:root {
  --sidebar-w: 280px;

  --bg: #ffffff;
  --text: #111111;

  --border: #e6e6e6;

  --sidebar-bg: #b0b0b0;
  --topnav-bg: #808080;
  --topnav-text: #ffffff;

  --link: #0b57d0;
}


* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.main {
  min-width: 0;
}

/* Sidebar styles ------------------------------------------------------------------------------- */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  /* border-right: 1px solid var(--border); */
  padding: 24px;
  background: var(--sidebar-bg);
}

.sidebar-inner {
  display: grid;
  gap: 16px;
  align-content: start;

  justify-items: center;
  /* centers items horizontally */
  text-align: center;
  /* centers text inside */
}

.sidebar-name {
  font-size: 30px;
  font-weight: 700;
}

.sidebar-title {
  font-size: 18px;
  color: var(--text);
}

.sidebar-location {
  font-size: 14px;
  color: var(--text);
}

.sidebar-email {
  font-size: 12px;
  color: var(--text);
}

.sidebar-avatar {
  width: 160px;
  height: 160px;
  border-radius: 12px;
  object-fit: cover;
}

.sidebar-icons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  /* if you want them centered */
}

.sidebar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;

  padding: 0;
  margin: 0;

  border: none;
  /* removes the box */
  background: transparent;
  border-radius: 0;
  text-decoration: none;
}

/* image sizing + hover grow */
.sidebar-icon-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;

  transition: transform 180ms ease;
  transform-origin: center;
}

.sidebar-icon:hover .sidebar-icon-img {
  transform: scale(1.25);
}

/* Contribution styles -------------------------------------------------------------------------- */
.contribution-list {
  display: grid;
  gap: 14px;
}

.contribution {
  display: grid;
  grid-template-columns: 1fr 170px;
  gap: 14px;

  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;

  background: var(--bg);
}

.contribution-main {
  min-width: 0;
}

.contribution-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.contribution-authors {
  margin: 0 0 6px;
  font-size: 13px;
}

.contribution-meta {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
}

.contribution-description {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
}

.contribution-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.contribution-link {
  display: inline-flex;
  gap: 6px;
  align-items: center;

  font-size: 13px;
  text-decoration: none;
  color: var(--link);
}

.contribution-link:hover {
  text-decoration: underline;
}

.contribution-link-logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}

.contribution-figure {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.contribution-illustration {
  width: 170px;
  height: auto;
  object-fit: contain;
  border-radius: 0;
}

.contribution-description-text {
  margin: 0;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;

  overflow: hidden;
}

.contribution.is-expanded .contribution-description-text {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.contribution-toggle {
  margin-top: 6px;
  padding: 0;
  border: none;
  background: transparent;

  color: var(--link);
  font-size: 13px;
  cursor: pointer;
}

.contribution-toggle:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
  .contribution {
    grid-template-columns: 1fr;
  }

  .contribution-illustration {
    width: 100%;
    height: 160px;
  }
}

/* Clickable illustration */
.contribution-illustration-btn {
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
}

/* Optional hover zoom (desktop) */
@media (hover: hover) and (pointer: fine) {
  .contribution-illustration-btn:hover .contribution-illustration {
    transform: scale(1.03);
  }
}

.contribution-illustration {
  width: 170px;
  height: 110px;
  object-fit: contain;
  border-radius: 0;

  /* smooth hover */
  transition: transform 160ms ease;
}

/* Lightbox overlay */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-inner {
  max-width: min(1100px, 95vw);
  max-height: 92vh;
  width: 100%;
  position: relative;
}

.lightbox-img {
  width: 100%;
  height: 100%;
  max-height: 92vh;
  object-fit: contain;
  /* never crop */
  background: #fff;
}

/* Close button */
.lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;

  border: none;
  border-radius: 10px;
  padding: 8px 10px;

  cursor: pointer;
}

/* News styles ---------------------------------------------------------------------------------- */
.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.news-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: baseline;
}

.news-date {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.news-link {
  font-size: 13px;
  color: var(--link);
  text-decoration: none;
}

.news-link:hover {
  text-decoration: underline;
}

.news-item-hidden {
  display: none;
}

.news.is-expanded .news-item-hidden {
  display: grid;
}

.news-toggle {
  margin-top: 10px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--link);
  font-size: 13px;
  cursor: pointer;
}

.news-toggle:hover {
  text-decoration: underline;
}

/* Posters styles ------------------------------------------------------------------------------- */

.poster-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  /* centers the row when fewer than 3 */
}

/* Each poster takes ~30% of the content width */
.poster-frame {
  width: calc(33% - 14px);
}

.poster-img {
  width: 100%;
  height: auto;
  /* height follows image ratio */
  display: block;
  object-fit: contain;
}

/* Responsive fallbacks */
@media (max-width: 900px) {
  .poster-frame {
    width: calc(48% - 14px);
  }
}

@media (max-width: 600px) {
  .poster-frame {
    width: 100%;
  }
}

.poster-btn {
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  width: 100%;
  display: block;
}

@media (hover: hover) and (pointer: fine) {
  .poster-btn:hover .poster-img {
    transform: scale(1.01);
  }
}

.poster-img {
  transition: transform 160ms ease;
}

/* Top nav styles ------------------------------------------------------------------------------- */

.topnav {
  position: sticky;
  top: 0;
  z-index: 10;
  /* border-bottom: 1px solid var(--border); */
  background: var(--topnav-bg);
  color: var(--topnav-text);
}

.topnav-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  max-width: 980px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.topnav-tab {
  text-decoration: none;
  color: inherit;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.topnav-tab.is-active {
  border-color: #111;
}

.content {
  padding: 24px 16px 80px;

  max-width: 980px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}


.section {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.section h2 {
  margin: 0 0 12px;
}

.sections-paragraphs {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.media {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* Basic small-screen behavior */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    border-right: none;
    /* border-bottom: 1px solid var(--border); */
  }
}