ul ul {
  margin: 0 0 0.5em 0;
}

/* Social links */
.social-links {
  list-style: none;
  padding-left: 0;
  margin-top: 1em;
  display: flex;
  gap: 1.5rem;
}

.social-links li {
  margin-bottom: 0;
}

.social-links a {
  display: flex;
  align-items: center;
  gap: 0.4em;
}

.social-links .icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

.subscribe-post-bottom {
  background-color: #ffc;
  margin: 1em 1em 2em 1em;
  padding: 1em;
  padding-right: 2.5em;
  border: 2px solid #eeb;
  box-shadow: 5px 5px 5px #ccc;
  position: relative;
}

.subscribe-post-bottom .content {
  display: block;
}

.subscribe-post-bottom .close-box a:link,
.subscribe-post-bottom .close-box a:visited {
  color: #dda !important;
}

.subscribe-post-bottom .close-box a:hover {
  color: #cc9 !important;
}

.subscribe-post-bottom .close-box {
  position: absolute;
  top: 0.5em;
  right: 0.5em;
}

.warning-box {
  background-color: #ffe4c4;
  margin: 1em 1em 2em 1em;
  padding: 1em;
  border: 2px solid #dda;
  box-shadow: 5px 5px 5px #ccc;
}

.clearfix:after {
  visibility: hidden;
  display: block;
  font-size: 0;
  content: ' ';
  clear: both;
  height: 0;
}
.clearfix {
  display: inline-block;
}
/* start commented backslash hack \*/
* html .clearfix {
  height: 1%;
}
.clearfix {
  display: block;
}
/* close commented backslash hack */

th,
td {
  padding: 0.25em 0.5em;
}

/* Override button-style Read more link to be a simple text link */
a.read-more,
a.read-more:visited {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  text-shadow: none !important;
  color: #f15555 !important;
  font-size: 18px !important;
  font-weight: normal !important;
}

a.read-more:hover {
  background: none !important;
  color: #44c144 !important;
}

/* Mastodon embed: add padding to fallback */
.mastodon-embed > div {
  padding: 20px;
}

/* Hide fallback div only after iframe has loaded */
.mastodon-embed.iframe-loaded > div {
  display: none;
}

header {
  margin-bottom: 20px;
}

blockquote {
  border-left: 3px solid #ddd;
  padding-left: 1em;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  margin: 1em 0 0 0;
}

blockquote + blockquote {
  margin-top: -0.5em;
}

blockquote p {
  margin: 0 0 0.5em 0;
}

blockquote p:last-child {
  margin-bottom: 0;
}

p code,
li code {
  vertical-align: baseline;
  line-height: 1;
}

/* Inline code in titles and links: blend with surrounding text */
a code,
h1 code,
h2 code,
h3 code,
h4 code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

#main-container a:visited code {
  color: #c1448b;
}

pre,
.highlight code {
  font-size: 13px;
}

/* Lightbox: zoom cursor hint on images */
.lightbox-link {
  cursor: zoom-in;
  display: inline-block;
}

.lightbox-link img {
  transition: opacity 0.2s ease;
}

.lightbox-link:hover img {
  opacity: 0.9;
}

/* SimpleLightbox overrides */
.sl-overlay {
  background: rgba(0, 0, 0, 0.9) !important;
}

.sl-wrapper .sl-image .sl-caption.pos-outside {
  position: relative !important;
  background: rgba(0, 0, 0, 0.8);
  padding: 8px 10px;
  font-size: 14px;
  text-align: center;
  margin-top: 0;
}

@media handheld, only screen and (max-width: 767px) {
  header nav,
  #subtitle {
    display: none;
  }
  header {
    margin-bottom: 10px;
  }
  #main-container {
    padding-top: 10px;
  }
  h1 {
    font-size: 28px;
  }
  h2 {
    font-size: 22px;
  }
  p,
  li {
    font-size: 16px;
    line-height: 24px;
  }
  pre,
  .highlight code {
    font-size: 12px;
  }
}

/* Apple-style keyboard keys */
kbd {
  display: inline-block;
  margin: 0;
  padding: 0.1em 0.4em;
  font:
    normal 0.85em/1 'SF Mono',
    'Menlo',
    'Monaco',
    'Consolas',
    monospace;
  color: #555;
  background: #fafafa;
  border: 1px solid #ccc;
  border-radius: 3px;
  box-shadow: 0 1px 0 #bbb;
  vertical-align: baseline;
  white-space: nowrap;
}

/* Collapsible sections */
details {
  margin: 1em 0;
  font-size: 18px;
  line-height: 27px;
  font-family: Helvetica, Arial, sans-serif;
  padding-left: 1.25em;
}

details summary {
  cursor: pointer;
  margin-left: -1.25em;
}

/* Expandable code snippets */
.code-expandable {
  position: relative;
  margin-bottom: 24px;
}

.code-expandable > div.highlight {
  transition: max-height 250ms ease-out;
  margin-bottom: 0;
}

.code-expandable > div.highlight pre {
  margin-bottom: 0;
}

.code-expandable.collapsed > div.highlight {
  overflow: hidden;
  position: relative;
}

.code-expandable.collapsed > div.highlight pre {
  border-radius: 0.4em 0.4em 0 0;
}

/* Remove highlight wrapper's background to avoid double corners */
div.highlight {
  background: none !important;
  border: none !important;
  margin-bottom: 8px;
}

.code-expandable.collapsed > div.highlight::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1px;
  right: 1px;
  height: 3em;
  background: linear-gradient(to bottom, transparent, #fdf6e3);
  pointer-events: none;
}

.code-expand-btn,
.code-collapse-btn {
  display: block;
  width: 100%;
  padding: 0.5em;
  margin-top: 0;
  background: #f5edd8;
  border: 1px solid #e7dec3;
  border-top: 1px solid #d5cbb0;
  border-radius: 0 0 0.4em 0.4em;
  color: #586e75;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
}

.code-expand-btn:hover,
.code-collapse-btn:hover {
  background: #efe5cc;
  color: #073642;
}

.code-expandable.collapsed .code-collapse-btn {
  display: none;
}

.code-expandable:not(.collapsed) .code-expand-btn {
  display: none;
}

/* RSS Preview link - development only */
.entry-title-wrapper {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
}

.entry-title-wrapper .entry-title {
  margin: 0;
}

.rss-preview-link {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.entry-title-wrapper:hover .rss-preview-link {
  opacity: 1;
}

.rss-icon {
  width: 1em;
  height: 1em;
  color: #f15555;
  position: relative;
  top: 0.55em;
}

.rss-preview-link:hover .rss-icon {
  color: #44c144;
}

/* Align sidebar with main content on desktop */
aside section:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

aside section:first-child h3 {
  margin-top: 7px;
}

/* ── Claude session embed (used in blog posts via iframe) ────────────────── */

.claude-session-embed {
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  margin: 20px 0;
  background: #f7f7f7;
}

@media (min-width: 768px) {
  .claude-session-embed {
    width: 100%;
  }
}

.claude-session-embed-bar {
  background: #eee;
  border-bottom: 1px solid #ddd;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family:
    'SF Mono', 'Cascadia Code', 'Fira Code', 'JetBrains Mono', 'Menlo',
    'Consolas', monospace;
  font-size: 13px;
  line-height: 1.4;
}

.claude-session-embed-title {
  color: #555;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: none;
}

#main-container .claude-session-embed .claude-session-embed-link,
#main-container .claude-session-embed .claude-session-embed-link:visited,
.claude-session-embed .claude-session-embed-link,
.claude-session-embed .claude-session-embed-link:visited {
  color: #666;
  text-decoration: none;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 3px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-shadow: none;
  background: transparent;
}

#main-container .claude-session-embed .claude-session-embed-link:hover,
#main-container .claude-session-embed .claude-session-embed-link:visited:hover,
.claude-session-embed .claude-session-embed-link:hover,
.claude-session-embed .claude-session-embed-link:visited:hover {
  color: #333;
  border-color: #999;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.03);
}

.claude-session-embed iframe {
  width: 100%;
  border: none;
  display: block;
}
