/* Profile Page Stylesheet */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--ic-font, -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', 'Fira Sans', Ubuntu, Oxygen, 'Oxygen Sans', Cantarell, 'Droid Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Lucida Grande', Helvetica, Arial, sans-serif);
  background-color: var(--ic-bg, #0d1117);
  color: var(--ic-text, rgba(255, 255, 255, 0.92));
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Layout Container */
.page-container {
  max-width: 1128px;
  margin: 0 auto;
  padding: 0 24px;
}

.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr) minmax(0, 3fr);
  gap: 24px;
  padding-top: 24px;
}

@media (max-width: 1200px) {
  .main-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }
  .right-sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
  .left-sidebar {
    order: -1;
  }
}

/* Card Base Style */
.card {
  background: var(--ic-surface, #1d2226);
  border-radius: 8px;
  border: 1px solid var(--ic-border, rgba(255, 255, 255, 0.10));
  overflow: hidden;
}

/* Profile Header Card */
.profile-header {
  margin-bottom: 8px;
}

.banner-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 1;
  background: #0b1422;
  overflow: hidden;
}

.banner-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.banner-image--active {
  opacity: 1;
}

.banner-carousel-dots {
  position: absolute;
  bottom: 12px;
  right: 16px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.32);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.banner-dot:hover {
  background: rgba(255,255,255,0.6);
}

.banner-dot--active {
  background: rgba(255,255,255,0.9);
  transform: scale(1.15);
}

.profile-info {
  padding: 0 24px 24px;
  position: relative;
}

.profile-photo-wrapper {
  margin-top: -150px;
  margin-bottom: 16px;
}

.profile-photo {
  width: 256px;
  height: 256px;
  border-radius: 50%;
  border: 5px solid #1d2226;
  object-fit: cover;
  background: #0d1117;
}

@media (max-width: 768px) {
  .profile-photo-wrapper { margin-top: -80px; margin-bottom: 12px; }
  .profile-photo { width: 152px; height: 152px; border-width: 4px; }
}

.profile-name {
  font-size: 24px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.25;
  margin-bottom: 4px;
}

.profile-headline {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.4;
  margin-bottom: 8px;
}

.profile-location {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 8px;
}

.profile-connections {
  font-size: 14px;
  color: var(--ic-accent, #70b5f9);
  font-weight: 600;
}

/* About Section */
.about-section {
  margin-bottom: 8px;
}

.section-header {
  padding: 16px 24px 8px;
  font-size: 20px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.about-content {
  padding: 0 24px 16px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.5;
  white-space: pre-wrap;
}

/* Unified link color for in-page bio links — kills the default purple/blue visited mishmash. */
.about-content a,
.about-content a:link,
.about-content a:visited,
.about-content a:active {
  color: var(--ic-accent, #70b5f9);
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--ic-accent-rgb, 112, 181, 249), 0.32);
}
.about-content a:hover {
  color: var(--ic-accent-hover, #a8d2fb);
  border-bottom-color: rgba(168, 210, 251, 0.7);
}

/* Activity/Feed Section */
.activity-section {
  margin-bottom: 8px;
}

.activity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px 8px;
}

.activity-title {
  font-size: 20px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.followers-count {
  font-size: 14px;
  color: var(--ic-accent, #70b5f9);
  font-weight: 600;
}

/* Post Card */
.post-card {
  margin-bottom: 8px;
}

.post-header {
  display: flex;
  padding: 12px 16px;
  gap: 8px;
}

.post-author-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.post-author-info {
  flex: 1;
  min-width: 0;
}

.post-author-name {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.3;
}

.post-author-headline {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-timestamp {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
}

.post-content {
  padding: 0 16px 16px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.5;
}

.post-content p {
  margin-bottom: 12px;
}

.post-content p:last-child {
  margin-bottom: 0;
}

.post-content h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 16px 0 8px;
  color: rgba(255, 255, 255, 0.92);
}

.post-content h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 14px 0 6px;
  color: rgba(255, 255, 255, 0.92);
}

.post-content ul, .post-content ol {
  margin: 8px 0 12px 20px;
}

.post-content li {
  margin-bottom: 4px;
}

.post-content em {
  font-style: italic;
}

.post-content strong {
  font-weight: 600;
}

/* Article Link in Post */
.article-preview {
  margin: 0 16px 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.article-preview:hover {
  background: rgba(255, 255, 255, 0.04);
}

.article-preview-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.article-preview-content {
  padding: 12px 16px;
}

.article-preview-title {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.3;
  margin-bottom: 4px;
}

.article-preview-author {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
}

/* Sidebar Cards */
.sidebar-card {
  margin-bottom: 8px;
  padding: 16px;
}

.sidebar-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 12px;
}

.sidebar-card p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.4;
}

/* Experience Section */
.experience-item {
  display: flex;
  padding: 16px 24px;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.experience-item:last-child {
  border-bottom: none;
}

.company-logo {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  background: #0d1117;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.company-logo-img {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  flex-shrink: 0;
  object-fit: contain;
  box-sizing: border-box;
}

/* Match the new size on the legacy text-emoji fallback */
.company-logo {
  width: 56px;
  height: 56px;
}

/* Text-based brand mark for companies without a standalone image asset (ThreatBack, VQ). */
.company-logo-text {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-family: system-ui, -apple-system, sans-serif;
  box-sizing: border-box;
}
.company-logo-text--threatback {
  background: #1a1a1a;
  color: #e63946;
  font-size: 18px;
  border: 1px solid rgba(230,57,70,0.55);
}
.company-logo-text--vq {
  background: linear-gradient(135deg, #0a1525 0%, #0d1a2d 50%, #0f1d35 100%);
  color: #06b6d4;
  font-size: 17px;
  border: 1px solid rgba(6,182,212,0.4);
}

.experience-details {
  flex: 1;
}

.experience-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.experience-company {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
}

.experience-duration {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.62);
}

/* Read More / Expand */
.read-more {
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px 16px;
  display: inline-block;
}

.read-more:hover {
  color: var(--ic-accent, #70b5f9);
}

/* Full Post Expansion */
.post-full-content {
  max-height: 300px;
  overflow: hidden;
  position: relative;
}

.post-full-content.expanded {
  max-height: none;
}

.post-full-content::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(transparent, white);
  pointer-events: none;
}

.post-full-content.expanded::after {
  display: none;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
  margin-top: 24px;
}

.site-footer a {
  color: var(--ic-accent, #70b5f9);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Article Cards Grid (Landing Page) */
.article-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 8px 24px 24px;
}

@media (max-width: 600px) {
  .article-cards {
    grid-template-columns: 1fr;
  }
}

.article-card {
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow 0.2s;
}

.article-card:hover {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10), 0 4px 8px rgba(0, 0, 0, 0.1);
}

.article-card-image {
  height: 120px;
  width: 100%;
  overflow: hidden;
  background: #0d1117;
}

.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card-content {
  padding: 12px;
}

.article-card-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.3;
  margin: 0 0 4px;
}

.article-card-subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
  margin: 0 0 8px;
}

.article-card-author {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
}

/* Services Section */
.services-section {
  margin-bottom: 8px;
}

.services-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px 16px;
}

.service-tag {
  background: #0d1117;
  color: rgba(255, 255, 255, 0.92);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 14px;
}

/* Experience Section */
.experience-section {
  margin-bottom: 8px;
}

.experience-details {
  display: flex;
  flex-direction: column;
}

/* Activity Header Link */
.activity-header a {
  text-decoration: none;
}

.activity-header a:hover {
  text-decoration: underline;
}

/* Posts Page - Compact Profile Header */
.profile-header-compact {
  display: flex;
  padding: 16px;
  margin-bottom: 8px;
}

.profile-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.profile-link:hover {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.profile-photo-small {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-info-compact {
  display: flex;
  flex-direction: column;
}

.profile-name-compact {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.profile-headline-compact {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
}

/* Activity Page Header */
.activity-page-header {
  padding: 16px 24px;
  margin-bottom: 8px;
}

.activity-page-title {
  font-size: 20px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 12px;
}

.activity-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  padding-bottom: 8px;
}

.activity-tab {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  padding-bottom: 8px;
  margin-bottom: -9px;
  text-decoration: none;
}

.activity-tab:hover {
  color: rgba(255, 255, 255, 0.92);
}

.activity-tab.active {
  color: var(--ic-accent, #70b5f9);
  font-weight: 600;
  border-bottom: 2px solid var(--ic-accent, #70b5f9);
}

/* Articles Grid Page */
.articles-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-preview-card {
  display: flex;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s;
}

.article-preview-card:hover {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10), 0 4px 8px rgba(0, 0, 0, 0.1);
}

.article-preview-image {
  width: 200px;
  min-width: 200px;
  height: 134px;
  overflow: hidden;
  flex-shrink: 0;
}

.article-preview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-preview-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-preview-title {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.3;
  margin-bottom: 8px;
}

.article-preview-excerpt {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-preview-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
  display: flex;
  gap: 8px;
}

.article-preview-author {
  font-weight: 600;
}

@media (max-width: 600px) {
  .article-preview-card {
    flex-direction: column;
  }

  .article-preview-image {
    width: 100%;
    height: 180px;
  }
}

/* Full Article Page */
.article-full {
  padding: 24px;
  margin-bottom: 8px;
}

.article-header {
  margin-bottom: 24px;
}

.article-title {
  font-size: 28px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.3;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.article-author-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.article-author-info {
  display: flex;
  flex-direction: column;
}

.article-author-name {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.article-date {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.62);
}

.article-cover {
  margin-bottom: 24px;
}

.article-body {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
}

.article-body p {
  margin-bottom: 16px;
}

.article-body blockquote {
  border-left: 3px solid rgba(var(--ic-accent-rgb, 112, 181, 249), 0.6);
  margin: 20px 0;
  padding: 4px 0 4px 20px;
  color: rgba(255, 255, 255, 0.78);
  font-style: italic;
  font-size: 1.05em;
  line-height: 1.6;
}
.article-body blockquote p { margin-bottom: 12px; }
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body blockquote cite {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.55);
}

.article-body h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 32px 0 16px;
  color: rgba(255, 255, 255, 0.92);
}

.article-body ul, .article-body ol {
  margin: 16px 0 16px 24px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body a {
  color: var(--ic-accent, #70b5f9);
  text-decoration: none;
}

.article-body a:hover {
  text-decoration: underline;
}

/* Article dek (subtitle italic line under the title) */
.article-dek {
  font-size: 17px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.4;
  margin: -8px 0 20px 0;
}

/* Homepage article feed: each <article class="article-full card article-feed-item"> */
.article-feed-item {
  margin-bottom: 8px;
}

/* Minimized teasers overflow into a 2-up grid below the full newest article.
   Falls back to a single column on narrow viewports (matches layout-3col breakpoint). */
.feed-post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}
@media (max-width: 600px) {
  .feed-post-grid { grid-template-columns: 1fr; }
}
.feed-post-grid > .post-block {
  margin-bottom: 0;
  height: 100%;
}
@media (max-width: 768px) {
  .feed-post-grid { grid-template-columns: 1fr; }
}

/* Compact post-block card (used in homepage feed for articles 2+, lazy-loaded teaser) */
.post-block {
  display: block;
  text-decoration: none;
  margin-bottom: 8px;
  overflow: hidden;
  transition: background 0.15s ease, border-color 0.15s ease;
}
/* Keep the gold pill visible on minimized cards */
.post-block-body .holo-pill-row {
  margin: 0 0 10px;
}
.post-block:hover {
  border-color: rgba(var(--ic-accent-rgb, 112, 181, 249), 0.35);
}
.post-block-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px 12px;
}
.post-block-author-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.post-block-author-info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.post-block-author-name {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}
.post-block-date {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}
.post-block-cover {
  width: 100%;
  background: #0b1422;
}
.post-block-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}
.post-block-body {
  padding: 16px 20px 20px;
}
.post-block-title {
  font-size: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.3;
  margin: 0 0 8px;
}
.post-block-excerpt {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
  margin: 0 0 12px;
}
.post-block-cta {
  font-size: 14px;
  font-weight: 600;
  color: var(--ic-accent, #70b5f9);
}
.post-block:hover .post-block-cta {
  text-decoration: underline;
}

.article-feed-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

.article-feed-footer .nav-link {
  color: var(--ic-accent, #70b5f9);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.article-feed-footer .nav-link:hover {
  text-decoration: underline;
}

/* Article Navigation */
.article-navigation {
  display: flex;
  justify-content: space-between;
  padding: 16px 24px;
  margin-bottom: 8px;
}

.nav-link {
  color: var(--ic-accent, #70b5f9);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

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

/* Post Feed */
.post-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Comment Section - Login Gated */
.comment-section {
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  padding: 12px 16px;
}

.comment-login-prompt {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
}

.comment-login-prompt a {
  color: var(--ic-accent, #70b5f9);
  text-decoration: none;
  font-weight: 600;
}

.comment-login-prompt a:hover {
  text-decoration: underline;
}

.comment-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0d1117;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.4);
  font-size: 16px;
}

/* Comments List */
.comments-list {
  margin-bottom: 12px;
}

.comment {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.comment:last-child {
  border-bottom: none;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ic-accent, #70b5f9);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment-avatar span {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}

.comment-author {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.comment-time {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.5);
}

.comment-edited {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.4);
  font-style: italic;
}

.comment-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-actions {
  margin-top: 4px;
}

.comment-delete-btn {
  background: none;
  border: none;
  color: rgba(0, 0, 0, 0.5);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 0;
}

.comment-delete-btn:hover {
  color: #c0392b;
  text-decoration: underline;
}

/* Comment Form */
.comment-form {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.comment-form form {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-form textarea {
  width: 100%;
  min-height: 60px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  line-height: 1.4;
}

.comment-form textarea:focus {
  outline: none;
  border-color: var(--ic-accent, #70b5f9);
  box-shadow: 0 0 0 1px var(--ic-accent, #70b5f9);
}

.comment-form textarea::placeholder {
  color: rgba(0, 0, 0, 0.5);
}

.comment-form button {
  align-self: flex-end;
  background: var(--ic-accent, #70b5f9);
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.comment-form button:hover {
  background: #004182;
}

.comment-form button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Article Images */
.article-hero-image {
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 4px;
}

.article-inline-image {
  width: 100%;
  height: auto;
  max-width: 500px;
  display: block;
  margin: 16px auto;
  border-radius: 8px;
}

.image-credit {
  text-align: center;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.5);
  margin-top: -12px;
  margin-bottom: 16px;
}

.article-byline {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 16px;
  font-style: italic;
}

.post-content a {
  color: var(--ic-accent, #70b5f9);
  text-decoration: none;
}

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

/* Experience Description */
.experience-description {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 4px;
  line-height: 1.4;
}

/* SEO Hidden Content */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Featured In / Press section (added 2026-04-28) ──────────────────
   Third-party press citations. New entries go on top of the press-list. */
.press-section {
  margin-bottom: 8px;
}
.press-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.press-item {
  display: block;
  padding: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
  overflow: hidden;
}
.press-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(var(--ic-accent-rgb, 112, 181, 249), 0.35);
}
.press-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  background: #0b1422;
}
.press-thumb--doc {
  aspect-ratio: 850 / 1100;
  object-fit: contain;
  object-position: center top;
  background: #ffffff;
}
.press-meta {
  padding: 12px 16px 14px;
}

/* Three-books cover row used inside the Abundance article body. */
.three-books-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.three-books-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  text-align: center;
  color: rgba(255,255,255,0.78);
}
.three-books-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.55);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.three-books-cover:hover img {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.7);
}
.three-books-cover span {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  line-height: 1.35;
}
.three-books-cover span em {
  display: block;
  font-style: italic;
  font-weight: 400;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-top: 2px;
}

/* Inline figure (used in apoplexy.html, book pages, etc.) for embedded document/letter images */
.apoplexy-figure,
.book-section-figure {
  margin: 28px auto 24px;
  max-width: 540px;
  text-align: center;
}
.apoplexy-figure-img,
.book-section-figure-img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.45);
}
.apoplexy-figure-caption,
.book-section-figure-caption {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
  font-style: italic;
}
.apoplexy-figure-caption a,
.book-section-figure-caption a {
  color: rgba(112,181,249,0.95);
  text-decoration: none;
}
.apoplexy-figure-caption a:hover,
.book-section-figure-caption a:hover {
  text-decoration: underline;
}
.press-publisher {
  font-size: 12px;
  font-weight: 600;
  color: rgba(var(--ic-accent-rgb, 112, 181, 249), 0.95);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.press-headline {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.92);
  margin-top: 4px;
  line-height: 1.4;
}
.press-date {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 4px;
}

/* ── Composer pill (LinkedIn-style start-a-post) ───────────────────── */
.composer-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.composer-pill:focus-visible { outline: 2px solid rgba(var(--ic-accent-rgb, 112, 181, 249), 0.7); outline-offset: 2px; }
.composer-pill:hover { border-color: rgba(var(--ic-accent-rgb, 112, 181, 249), 0.45); }
.composer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.composer-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s ease;
}
.composer-pill:hover .composer-input { background: rgba(255, 255, 255, 0.04); }
.composer-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}
.composer-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  font-weight: 600;
}
.composer-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}
@media (max-width: 640px) {
  .composer-actions { display: none; }
}

/* ── Composer overlay (post-builder modal) ─────────────────────────── */
.composer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 16px;
  background: rgba(5, 10, 20, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  overflow-y: auto;
}
.composer-overlay[hidden] { display: none; }
.composer-modal {
  width: 100%;
  max-width: 1200px;
  background: rgba(13, 26, 45, 0.80);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(var(--ic-accent-rgb, 112, 181, 249), 0.25);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  max-height: 92vh;
}
.composer-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.composer-close {
  background: none; border: none; color: rgba(255, 255, 255, 0.6);
  font-size: 1.7rem; line-height: 1; cursor: pointer; padding: 0 4px;
}
.composer-close:hover { color: #fff; }

/* toolbar (lives in the header, LinkedIn-style) */
.composer-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.composer-tool-sep {
  width: 1px; height: 22px; background: rgba(255, 255, 255, 0.14); margin: 0 4px;
}
.composer-tool {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  padding: 6px 9px;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.composer-tool:hover { background: rgba(var(--ic-accent-rgb, 112, 181, 249), 0.18); border-color: rgba(var(--ic-accent-rgb, 112, 181, 249), 0.45); }
.composer-style-select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.9);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 6px 10px;
  cursor: pointer;
}
.composer-style-select option { background: #0d1a2d; color: #fff; }
.composer-head-actions { display: flex; align-items: center; gap: 8px; }

.composer-modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* cover drop zone */
.composer-cover-drop {
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  overflow: hidden;
}
.composer-cover-drop:hover, .composer-cover-drop.is-drag {
  border-color: rgba(var(--ic-accent-rgb, 112, 181, 249), 0.6);
  background: rgba(var(--ic-accent-rgb, 112, 181, 249), 0.06);
}
.composer-cover-drop:focus-visible { outline: 2px solid rgba(var(--ic-accent-rgb, 112, 181, 249), 0.7); outline-offset: 2px; }
.composer-cover-empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: rgba(255, 255, 255, 0.55); text-align: center; padding: 24px;
}
.composer-cover-empty p { margin: 0; font-size: 0.92rem; }
.composer-cover-filled { position: relative; width: 100%; }
.composer-cover-filled img { display: block; width: 100%; height: auto; max-height: 320px; object-fit: cover; }
.composer-cover-remove {
  position: absolute; top: 10px; right: 10px;
  background: rgba(5, 10, 20, 0.78); border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff; font-size: 0.78rem; font-weight: 600; padding: 6px 12px; border-radius: 16px; cursor: pointer;
}
.composer-cover-remove:hover { background: rgba(5, 10, 20, 0.95); }

/* title / dek / body — borderless, document-like */
.composer-title-input, .composer-dek-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
  color: #fff;
  font-family: inherit;
  padding: 4px 2px;
}
.composer-title-input { font-size: 1.85rem; font-weight: 800; line-height: 1.2; }
.composer-dek-input { font-size: 1rem; color: rgba(255, 255, 255, 0.8); }
.composer-title-input:focus, .composer-dek-input:focus {
  outline: none; border-bottom-color: rgba(var(--ic-accent-rgb, 112, 181, 249), 0.45);
}
.composer-title-input::placeholder, .composer-dek-input::placeholder { color: rgba(255, 255, 255, 0.38); }

.composer-editor {
  min-height: 320px;
  max-height: 52vh;
  overflow-y: auto;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.92);
  padding: 6px 2px;
  font-size: 1.05rem;
  line-height: 1.7;
}
.composer-editor:focus { outline: none; }
.composer-editor:empty::before {
  content: attr(data-placeholder);
  color: rgba(255, 255, 255, 0.35);
}
.composer-editor h2 { font-size: 1.5rem; margin: 0.7em 0 0.3em; color: #fff; font-weight: 800; }
.composer-editor h3 { font-size: 1.25rem; margin: 0.7em 0 0.3em; color: #fff; font-weight: 700; }
.composer-editor h4 { font-size: 1.08rem; margin: 0.6em 0 0.3em; color: #fff; font-weight: 700; }
.composer-editor blockquote {
  border-left: 3px solid rgba(var(--ic-accent-rgb, 112, 181, 249), 0.6);
  margin: 0.7em 0; padding-left: 16px; color: rgba(255, 255, 255, 0.75); font-style: italic;
}
.composer-editor pre {
  background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px; padding: 12px 14px; font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.9rem; overflow-x: auto; white-space: pre-wrap;
}
.composer-editor hr { border: none; border-top: 1px solid rgba(255, 255, 255, 0.18); margin: 1.2em 0; }
.composer-editor ul, .composer-editor ol { padding-left: 1.4em; margin: 0.5em 0; }
.composer-editor img { max-width: 100%; border-radius: 8px; margin: 0.6em 0; }
.composer-editor a { color: var(--ic-accent, #70b5f9); }

.composer-modal-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 0;
}
.composer-modal-foot:empty, .composer-hint:empty { display: none; }
.composer-hint { font-size: 0.82rem; color: rgba(255, 255, 255, 0.6); }
.composer-hint code {
  background: rgba(255, 255, 255, 0.08); padding: 1px 5px; border-radius: 4px; font-size: 0.78rem;
}
.composer-btn {
  border-radius: 18px; padding: 8px 16px; font-size: 0.88rem; font-weight: 600;
  cursor: pointer; font-family: inherit; border: 1px solid transparent;
}
.composer-btn-ghost { background: transparent; border-color: rgba(255, 255, 255, 0.28); color: rgba(255, 255, 255, 0.9); }
.composer-btn-ghost:hover { border-color: rgba(255, 255, 255, 0.5); }
.composer-btn-primary { background: #1d6fd1; color: #fff; }
.composer-btn-primary:hover { background: #2a7fe0; }
.composer-cover-btn { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); color: #fff; }
.composer-cover-btn:hover { border-color: rgba(var(--ic-accent-rgb, 112, 181, 249), 0.5); }

/* ── "All articles" modal — same shell, tile-card grid (newest first) ── */
.articles-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.articles-modal-title { font-size: 1.15rem; font-weight: 800; color: #fff; }
.articles-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  padding: 20px;
  overflow-y: auto;
}
.articles-modal-tile {
  display: flex; flex-direction: column;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.articles-modal-tile:hover { border-color: rgba(var(--ic-accent-rgb, 112, 181, 249), 0.5); transform: translateY(-2px); }
.articles-modal-tile-cover { aspect-ratio: 16 / 9; background: #0b1422; overflow: hidden; }
.articles-modal-tile-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.articles-modal-tile-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.articles-modal-tile-title { font-size: 1rem; font-weight: 700; color: #fff; line-height: 1.3; }
.articles-modal-tile-date { font-size: 0.76rem; color: #22d3ee; letter-spacing: 0.3px; }
.articles-modal-tile-excerpt {
  font-size: 0.84rem; color: rgba(255, 255, 255, 0.65); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.articles-modal-empty { padding: 40px; text-align: center; color: rgba(255, 255, 255, 0.55); }
.articles-modal-empty a { color: var(--ic-accent, #70b5f9); }

@media (max-width: 640px) {
  .composer-head-actions { width: 100%; justify-content: flex-end; }
  .composer-title-input { font-size: 1.5rem; }
}

/* ════════════════════════════════════════════════════════════════════════
   PILL SYSTEM — SITE-WIDE AMANUENSIS BRAND LOCK (promoted here 2026-07-28)
   The tag/badge/button pill is a total-brand choice used across the apex
   theamanuensis.com, imran.theamanuensis.com (Home/Books/Apoplexy/
   Intelligensicus/Articles/Posts), AND every paid-tier user's provisioned
   author site (shared imran template). Lives in style.css because EVERY
   surface loads it → one definition, renders everywhere. Compose:
   .pill + one size (.pill-1..4) + one colour variant.
   Brand spec/lock: amanuensis_brand_assets_copy §3d.
   (apoplexy-styles.css keeps its own identical copy for the 85 HA pages;
   harmless duplicate — do NOT delete that without re-verifying those pages.)
   ════════════════════════════════════════════════════════════════════════ */
.pill {
  display: inline-block;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.35;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
}
.pill-1 { font-size: 11px; padding: 4px 12px; }
.pill-2 { font-size: 12px; padding: 5px 13px; }
.pill-3 { font-size: 13px; padding: 6px 15px; }
.pill-4 { font-size: 15px; padding: 8px 19px; letter-spacing: 0.05em; }
.pill-blue   { color: rgba(168,206,255,1); border-color: rgba(112,181,249,0.55); background: rgba(112,181,249,0.10); }
.pill-green  { color: rgba(190,230,190,1); border-color: rgba(160,210,160,0.55); background: rgba(160,210,160,0.10); }
.pill-violet { color: rgba(214,184,244,1); border-color: rgba(180,140,220,0.55); background: rgba(180,140,220,0.12); }
.pill-gold   { color: rgba(232,196,128,1); border-color: rgba(212,170,90,0.55); background: rgba(212,170,90,0.10); }
.pill-white  { color: rgba(255,255,255,0.96); border-color: rgba(255,255,255,0.60); background: rgba(255,255,255,0.07); }
/* Intelligensicus themology variant — green/beige/gold, reads on the dark hero.
   Fill + border kept strong enough to read over a busy hero image. */
.pill-intel  { color: #f4efe2; border-color: rgba(224,194,122,0.85); background: rgba(20,40,26,0.72); }
