/* Minimal overrides for the "air" skin + toggle styling */
.theme-toggle {
  margin-left: 0.75rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid #d0d7de;
  background: #ffffff;
  color: #111111;
  border-radius: 6px;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}

.theme-toggle:focus {
  outline: 2px solid #5b9dd9;
  outline-offset: 2px;
}

.theme-toggle:hover {
  background: #f6f8fa;
}

/* --- Fix author sidebar overflow / clipping --- */
.author__avatar,
.author__content,
.author__urls {
  max-width: 100%;
}

.author__name,
.author__bio,
.author__content,
.author__urls,
.author__urls-wrapper,
.author__urls li,
.author__urls a {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Avoid any horizontal scroll in the sidebar */
.sidebar,
.sidebar__right,
.author__profile,
.author__inner-wrap {
  overflow-x: hidden !important;
}

/* Slightly tighter typography so long titles fit nicely */
.author__name {
  font-size: 1.35rem;
  line-height: 1.25;
}

.author__bio {
  font-size: 0.95rem;
  line-height: 1.45;
}

/* Ensure link labels don’t get cut */
.author__urls a {
  display: inline-block;
  max-width: 100%;
}

.case-study-grid .feature__wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.case-study-grid .feature__item {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 16px;
  padding: 18px 18px 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
  min-height: 240px;
}

.case-study-grid .feature__item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.10);
  border-color: rgba(0,0,0,0.14);
}

.case-study-grid .feature__item .archive__item-title {
  margin: 0 0 10px 0;
  line-height: 1.15;
  font-size: 1.45rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.case-study-grid .feature__item .archive__item-excerpt {
  margin: 0 0 14px 0;
  color: rgba(0,0,0,0.75);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.case-study-grid .feature__item .btn {
  margin-top: auto;
  align-self: flex-start;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 600;
}
