:root {
  /* ── Warm neutral palette (DESIGN.md) ── */
  --parchment:      #f4f7fc;   /* page background — barely-there light blue */
  --ivory:          #f8fafd;   /* card surface */
  --warm-sand:      #e8e6dc;   /* button bg, prominent surfaces */
  --near-black:     #141413;   /* primary text — warm near-black */
  --dark-surface:   #30302e;   /* warm charcoal — dark containers */

  /* Penn Blue — used only for institutional identity elements */
  --penn-blue:      #011F5B;

  /* Accent */
  --terracotta:     #c96442;   /* brand CTA — warm earthy orange */
  --coral:          #d97757;   /* lighter variant — hover / links on dark */

  /* Text hierarchy */
  --text-main:      #141413;   /* warm near-black body */
  --text-sub:       #5e5d59;   /* olive gray — secondary */
  --text-muted:     #87867f;   /* stone gray — tertiary */
  --text-warm-dark: #3d3d3a;   /* dark warm — links, emphasized secondary */

  /* Borders */
  --border-cream:   #f0eee6;   /* lightest containment — warm cream */
  --border-warm:    #e8e6dc;   /* section dividers, prominent */
  --border-dark:    #30302e;   /* warm charcoal borders */
  --ring-warm:      #d1cfc5;   /* button ring — warm */

  /* Aliases used in components */
  --bg:             var(--parchment);
  --surface:        var(--ivory);
  --surface-muted:  var(--warm-sand);
  --primary:        var(--terracotta);
  --accent:         var(--terracotta);
  --accent-light:   rgba(201, 100, 66, 0.10);
  --border:         var(--border-cream);

  /* Shadows — ring system */
  --shadow-sm:  0 0 0 1px var(--border-warm);
  --shadow-md:  rgba(0,0,0,0.05) 0px 4px 24px, 0 0 0 1px var(--border-warm);
  --shadow-lg:  rgba(0,0,0,0.05) 0px 4px 24px;
}

/* ── Sans utility — applied to UI chrome that stays compact ── */
.ui-sans,
.news-list__date,
.awards-list__year,
.post-category-tag,
.post-date, .post-read-time, .post-meta-sep,
.post-nav__label,
.blog-card__category, .blog-card__date, .blog-card__read-time, .blog-card__meta-sep,
.skill-tag, .pub-link,
.pub-filter__btn,
.blog-cta-btn, .cv-link,
.timeline-entry__time,
.footer-copy, .footer-updated,
.info-card__eyebrow,
.teaching-card__term,
.skill-group__label {
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

/* ── Base ── */
body {
  font-family: 'Lora', Georgia, serif;
  font-size: 16px;
  line-height: 1.60;
  letter-spacing: normal;
  color: var(--text-main);
  background: var(--bg);
}

/* ── Serif headline mixin ── */
.md-heading,
h1.md-heading,
h2.md-heading {
  font-family: 'Lora', Georgia, serif;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.20;
  letter-spacing: normal;
  color: var(--text-main);
  margin-top: 0;
  margin-bottom: 20px;
}

.md-heading i {
  font-family: 'Inter', sans-serif;
  margin-right: 10px;
  color: var(--text-muted);
  opacity: 0.75;
}

.text-hl  { color: #0A942F; }
.grey-hl  { color: var(--text-muted); }

/* ── Bio highlight ── */
.bio-highlight {
  margin-top: 14px;
  padding: 16px 20px;
  border-left: 3px solid var(--penn-blue);
  border-radius: 0 8px 8px 0;
  background: var(--warm-sand);
  color: var(--text-sub);
  line-height: 1.65;
}

.bio-highlight a      { color: var(--text-warm-dark); font-weight: 500; }
.bio-highlight strong { display: block; margin-bottom: 6px; color: var(--text-main); }

/* ── Header ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 59px;
  border-top: 3px solid var(--penn-blue) !important;
  border-bottom: 1px solid var(--border-warm) !important;
  background: var(--parchment) !important;
}

.site-header .wrapper {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-left {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 20px;
}

.nav-penn-link {
  display: flex;
  align-items: center;
}

.nav-penn-logo {
  height: 26px;
  width: auto;
  display: block;
}

.nav-social-icons {
  display: flex;
  align-items: center;
  gap: 28px;
  border-left: 1px solid var(--border-warm);
  padding-left: 20px;
}

.nav-social-icons .tab-link {
  font-size: 0.95rem;
}

@media screen and (max-width: 640px) {
  .nav-left { display: none; }
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border-warm) !important;
  background: var(--parchment) !important;
  padding: 20px 0 !important;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-copy,
.footer-updated {
  font-size: 0.8rem;
  color: var(--text-sub);
  white-space: nowrap;
}

.footer-icons {
  display: flex;
  gap: 18px;
  align-items: center;
}

.footer-icons a {
  color: var(--text-sub);
  font-size: 1.1rem;
  transition: color 0.2s;
  text-decoration: none;
}

.footer-icons a:hover {
  color: var(--dark-surface);
}

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
}

/* ── Hero / Profile cover — mountain background ── */
#profile-cover {
  padding: 0 !important;
  background: url('/images/background/rainer.JPG') center center / cover no-repeat !important;
  border-bottom: 1px solid var(--border-warm);
  position: relative;
}


#profile-cover .about-layout    { position: relative; padding: 28px 0; }
#profile-cover .about-main      { color: var(--text-main); line-height: 1.65; }
#profile-cover .about-main a    { color: var(--text-warm-dark); font-weight: 500; }
#profile-cover .about-main a:hover { color: var(--dark-surface); }

#profile-cover .about-profile #profile-avatar { border-color: var(--border-warm); }
#profile-cover .about-profile #profile-avatar:hover { border-color: var(--penn-blue); }
#profile-cover .about-profile #my-name  { color: var(--near-black) !important; }
#profile-cover .about-profile #my-title { color: var(--text-sub) !important; }

#profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--border-warm);
  transition: border-color 0.3s ease;
}
#profile-avatar:hover { border-color: var(--penn-blue); }

#my-name {
  color: var(--near-black) !important;
  font-family: 'Lora', Georgia, serif !important;
  font-size: 1.5rem !important;
  font-weight: 500 !important;
}

#my-title { color: var(--text-sub) !important; }


/* ── Section spacing ── */
.bio + .bio { margin-top: 80px; }
.bio-body { overflow: hidden; }

.page-section { padding: 52px 0 64px; }
#news { margin-top: 48px; }

/* ── Tab layout ── */
.page-section {
  display: none;
  animation: fadeUp 0.28s ease both;
}

.page-section.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tab-link {
  font-family: 'Lora', Georgia, serif;
  font-weight: 500;
  color: var(--text-sub);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.tab-link.active {
  color: var(--near-black);
  border-bottom-color: var(--penn-blue);
}

.tab-link:hover:not(.active) { color: var(--near-black); text-decoration: none; }
.tab-link:hover { text-decoration: none; }

/* ── Timeline ── */
.timeline {
  display: flex;
  flex-direction: column;
  margin-top: 20px;
  padding-left: 0;
  border-left: none;
}

.timeline-entry {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 22px 0;
  border-bottom: 1px solid var(--border-warm);
}
.timeline-entry:first-child { padding-top: 2px; }
.timeline-entry:last-child  { border-bottom: none; padding-bottom: 0; }
.timeline-entry::before     { display: none; }

.timeline-entry__meta {
  flex: 0 0 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 2px;
}

.timeline-entry__logo {
  width: 40px;
  max-height: 40px;
  height: auto;
  object-fit: contain;
  filter: grayscale(0.25) opacity(0.85);
  flex-shrink: 0;
}

.timeline-entry__time {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.timeline-entry__content          { flex: 1; min-width: 0; }
.timeline-entry__content h3       { margin: 0 0 4px; font-size: 1.05rem; font-family: 'Lora', Georgia, serif; font-weight: 500; color: var(--near-black); }
.timeline-entry__role             { margin: 0 0 5px; color: var(--text-sub); font-size: 0.92rem; font-weight: 500; }
.timeline-entry__role--plain      { font-weight: 400; }
.timeline-entry__content p        { margin: 0 0 4px; color: var(--text-muted); font-size: 0.90rem; }
.timeline-entry__content p:last-child { margin-bottom: 0; }

@media screen and (max-width: 640px) {
  .timeline-entry      { gap: 14px; }
  .timeline-entry__meta { flex: 0 0 44px; }
  .timeline-entry__logo { width: 32px; max-height: 32px; }
}

/* ── News ── */
.news-list { margin: 18px 0 0; padding: 0; list-style: none; }

.news-list__item {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-warm);
}

.news-list__item:first-child { padding-top: 0; }
.news-list__item:last-child  { border-bottom: none; padding-bottom: 0; }

.news-list__date {
  flex-shrink: 0;
  min-width: 80px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  white-space: nowrap;
  padding-top: 2px;
}

.news-list__text              { flex: 1 1 280px; color: var(--text-main); line-height: 1.60; }
.news-list__text a            { color: var(--text-warm-dark); font-weight: 500; }
.news-list__text a:hover      { color: var(--dark-surface); }

/* ── Publications ── */
.pub-meta-line { font-size: 0.85rem; color: var(--text-muted); margin-top: -4px; margin-bottom: 0; }

.pub-list { margin-top: 0; display: flex; flex-direction: column; gap: 0; }

.pub {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  padding: 32px 0;
  border-bottom: 1px solid var(--border-warm);
}

.pub:first-child { padding-top: 0; }
.pub:last-child  { border-bottom: none; padding-bottom: 0; }

.pub-left,
.pub-right { float: none !important; width: auto !important; }

.pub-left { flex: 0 0 192px; text-align: left; }

.pub-left > .intro-img {
  width: 100%;
  max-width: 192px;
  border-radius: 10px;
  border: 1px solid var(--border-warm);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  display: block;
}

.pub-img-placeholder {
  width: 192px;
  height: 128px;
  border-radius: 10px;
  border: 1px solid var(--border-warm);
  background: var(--warm-sand);
}

.pub-right {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.pub-right > .title {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.04rem;
  font-weight: 500;
  color: var(--near-black);
  margin: 0;
  line-height: 1.42;
}

.pub-right > .authors {
  color: var(--text-sub);
  line-height: 1.55;
  font-size: 0.87rem;
}

.pub-right > .authors .author { color: inherit; text-decoration: none; }
.pub-right > .authors .author:hover { color: var(--near-black); text-decoration: underline; }

.pub-right > .publish { display: flex; align-items: center; }

.pub-right > .publish > .publisher {
  display: inline-block;
  padding: 1px 9px 2px;
  border-radius: 5px;
  background: rgba(1,31,91,0.07);
  color: var(--penn-blue);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  font-family: 'Inter Tight', sans-serif;
  text-transform: uppercase;
}

/* publication link row */
.pub-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin-top: 2px;
}

.pub-link {
  font-size: 0.81rem;
  font-family: 'Inter Tight', sans-serif;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.13s;
}


.pub-link:hover { color: var(--near-black); }
.pub-link:visited { color: var(--text-muted); }

.pub-link-sep {
  color: var(--border-warm);
  font-size: 0.80rem;
  margin: 0 9px;
  user-select: none;
}

.pub-stars { height: 16px; opacity: 0.55; margin-left: 10px; vertical-align: middle; }

.pub-abstract {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.62;
  font-style: italic;
}

@media screen and (max-width: 960px) {
  .pub { flex-direction: column; gap: 16px; }
  .pub-left { flex: 0 0 auto; width: 100%; }
  .pub-left > .intro-img { max-width: 100%; border-radius: 8px; }
  .pub-right { width: 100%; }
}

/* ── Info cards (Service section) ── */
.info-card-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 20px;
}

.info-card {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-warm);
}
.info-card:last-child { border-bottom: none; padding-bottom: 0; }

.info-card__eyebrow {
  margin: 0 0 8px;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.info-card__text,
.info-card__list { margin: 0; color: var(--text-sub); line-height: 1.70; font-size: 0.93rem; }

.info-card__list { padding-left: 16px; }
.info-card__list li { margin-bottom: 5px; }
.info-card__list a { color: var(--text-warm-dark); }
.info-card__list a:hover { color: var(--near-black); }

/* ── Teaching card ── */
.teaching-card {
  margin-top: 20px;
  padding: 0;
}

.teaching-card__term {
  display: inline-flex;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.teaching-card__course { margin: 6px 0 4px; font-size: 1.05rem; font-family: 'Lora', Georgia, serif; color: var(--near-black); font-weight: 500; }
.teaching-card__meta   { margin: 0; color: var(--text-sub); font-size: 0.90rem; line-height: 1.6; }

/* ── Awards / Talks list ── */
.awards-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.awards-list li {
  display: flex;
  gap: 20px;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-warm);
}
.awards-list li:first-child { padding-top: 0; }
.awards-list li:last-child  { border-bottom: none; padding-bottom: 0; }

.awards-list__year {
  flex-shrink: 0;
  min-width: 60px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.80rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  font-family: 'Inter Tight', sans-serif;
}

.awards-list__text         { flex: 1; color: var(--text-main); font-weight: 400; line-height: 1.6; font-size: 0.93rem; }
.awards-list__text a       { color: var(--text-warm-dark); font-weight: 500; }
.awards-list__text a:hover { color: var(--near-black); }
.talk-venue                { margin-top: 3px; font-size: 0.86rem; color: var(--text-muted); font-weight: 400; }
.talk-slide-link           { font-size: 0.78rem; font-weight: 500; color: var(--text-muted); text-decoration: none; border-bottom: 1px solid var(--border-warm); font-style: normal; font-family: 'Inter Tight', sans-serif; }
.talk-slide-link:hover     { color: var(--near-black); border-bottom-color: var(--text-muted); }

/* ── Publication filter ── */
.publications { margin-top: 72px; }

.pub-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 20px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-warm);
}

.pub-filter__btn {
  padding: 8px 20px 10px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.83rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.13s;
}

.pub-filter__btn:hover { color: var(--text-main); }

.pub-filter__btn.active {
  color: var(--near-black);
  font-weight: 600;
  border-bottom-color: var(--near-black);
}

/* ── Blog CTA ── */
.blog-cta-btn {
  display: inline-block;
  margin-top: 18px;
  padding: 9.6px 20px;
  background: var(--terracotta);
  color: #f5f7fc;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 0 0 1px var(--terracotta);
  transition: opacity 0.2s;
}

.blog-cta-btn:hover { opacity: 0.85; color: #f5f7fc; }

/* ── Footer email popover ── */
.footer-email-wrap {
  position: relative;
  cursor: pointer;
  color: var(--text-sub);
  font-size: 1.1rem;
  transition: color 0.2s;
}

.footer-email-wrap:hover {
  color: var(--dark-surface);
}

.footer-email-popup {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  background: var(--parchment);
  border: 1px solid var(--border-warm);
  border-radius: 8px;
  padding: 10px 14px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  z-index: 100;
}

.footer-email-popup::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 14px;
  border: 6px solid transparent;
  border-top-color: var(--border-warm);
}

.footer-email-popup.open {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-email-popup a {
  font-size: 0.8rem;
  color: var(--text-main);
  text-decoration: none;
}

.footer-email-popup a:hover {
  color: var(--dark-surface);
  text-decoration: underline;
}

/* ── Pixel cat ── */
#cat-widget {
  position: fixed;
  bottom: 12px;
  right: 16px;
  z-index: 9000;
  cursor: pointer;
  pointer-events: auto;
}

#cat-widget img {
  width: 64px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ── About two-column layout ── */
#profile-cover {
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

#profile-cover .profile-wrapper {
  width: 92%;
  max-width: 900px;
  box-sizing: border-box;
  top: 0;
  padding: 0 36px;
  background-color: rgba(255,255,255,0.8);
}

.about-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  padding: 40px 0;
}

.about-profile {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  position: sticky;
  top: 96px;
}

.about-profile #profile-avatar {
  width: 160px !important;
  height: 160px !important;
  border-radius: 50%;
  border: 3px solid var(--border-warm);
  transition: border-color 0.3s ease;
  margin-bottom: 4px;
}

.about-profile #profile-avatar:hover { border-color: var(--penn-blue); }

.about-profile #my-name {
  font-family: 'Lora', Georgia, serif !important;
  font-size: 1.15rem !important;
  font-weight: 500 !important;
  color: var(--near-black) !important;
  line-height: 1.3;
}

.cv-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-sub);
  text-decoration: none;
  border: 1.5px solid var(--border-warm);
  border-radius: 8px;
  background: transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.cv-link::after {
  content: "↗";
  font-size: 0.78rem;
  opacity: 0.6;
}
.cv-link:hover {
  background: rgba(1, 31, 91, 0.06);
  border-color: rgba(1, 31, 91, 0.18);
  color: var(--near-black);
}

.about-profile #my-title {
  font-size: 0.88rem !important;
  color: var(--text-sub) !important;
  line-height: 1.4;
}

.about-profile .social-media {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  margin-top: 4px;
}

.about-main .social-media .icon-button {
  top: 0 !important;
}

.about-main .social-media {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 12px;
}

.about-main {
  flex: 1 1 0;
  min-width: 0;
  text-align: justify;
  color: var(--text-sub);
  line-height: 1.65;
}

.about-main a { color: var(--text-warm-dark); font-weight: 500; }
.about-main a:hover { color: var(--dark-surface); }

@media screen and (max-width: 768px) {
  .about-layout {
    flex-direction: column;
    align-items: center;
    gap: 28px;
  }
  .about-profile {
    flex: 0 0 auto;
    width: 100%;
    position: static;
  }
}

/* ── Research Overview ── */
.research-overview-lead {
  margin: 0 0 16px;
  color: var(--text-sub);
  line-height: 1.60;
}

.research-overview-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.research-overview-list li {
  padding-left: 16px;
  border-left: 3px solid var(--border-dark);
  color: var(--text-sub);
  line-height: 1.65;
}

.research-overview-list li strong {
  color: var(--text-main);
}

/* ── Research timeline diagram ── */
.research-timeline-wrap {
  margin-top: 16px;
  width: 100%;
  overflow-x: auto;
}

.research-timeline-svg {
  width: 100%;
  min-width: 600px;
  display: block;
}

/* ── Skill / Research Interest tags ── */
.skill-group {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.skill-group__label {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  min-width: 68px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1;
  transition: opacity 0.18s, transform 0.18s;
  cursor: default;
}

.skill-tag:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.skill-tag--blue {
  background: rgba(1, 31, 91, 0.07);
  color: var(--penn-blue);
  box-shadow: 0 0 0 1px rgba(1, 31, 91, 0.18);
}

.skill-tag--teal {
  background: rgba(2, 100, 110, 0.07);
  color: #02646e;
  box-shadow: 0 0 0 1px rgba(2, 100, 110, 0.18);
}

.skill-tag--grey {
  background: var(--warm-sand);
  color: var(--text-sub);
  box-shadow: 0 0 0 1px var(--ring-warm);
}

/* ── Profile two-col (Talks + Teaching side by side) ── */
.profile-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.profile-col { min-width: 0; }

@media screen and (max-width: 768px) {
  .profile-two-col {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .profile-col + .profile-col { margin-top: 40px; }
  .skill-group { flex-direction: column; gap: 8px; }
}

/* ── Legacy indented list ── */
li.indented              { position: relative; padding-left: 90px; }
li.indented::before      { content: attr(data-date); position: absolute; left: 0; top: 0; white-space: nowrap; }

/* ══════════════════════════════════════
   Post & Blog pages
══════════════════════════════════════ */

.post-page {
  background: var(--parchment);
  min-height: 100vh;
  padding-top: 59px;
}

.post-container {
  max-width: 740px;
  margin: 0 auto;
  padding: 52px 28px 100px;
}


/* ── Category tag pill ── */
.post-category-tag {
  display: inline-block;
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terracotta);
  background: rgba(201, 100, 66, 0.07);
  padding: 3px 9px;
  border-radius: 20px;
}

/* Header */
.post-header { margin-bottom: 0; }

.post-eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.post-meta-sep {
  color: var(--border-warm);
  font-size: 0.75rem;
}

.post-date {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.post-read-time {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.post-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 2.55rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: normal;
  color: var(--near-black);
  margin: 0 0 16px;
}

.post-subtitle {
  font-size: 1.12rem;
  color: var(--text-sub);
  line-height: 1.65;
  margin: 0 0 16px;
  font-weight: 400;
}

.post-tags { margin-top: 16px; }

.post-divider {
  border: none;
  border-top: 1px solid var(--border-cream);
  margin: 36px 0;
}

/* ── Prose body ── */
.post-body {
  color: #1a1a1a;
  font-size: 1.05rem;
  line-height: 1.75;
}

.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4 {
  font-family: 'Lora', Georgia, serif;
  font-weight: 500;
  color: var(--near-black);
  margin: 2.2em 0 0.6em;
  line-height: 1.20;
  letter-spacing: normal;
}
.post-body h1 { font-size: 1.70rem; }
.post-body h2 { font-size: 1.38rem; }
.post-body h3 { font-size: 1.14rem; }
.post-body h4 { font-size: 1rem; font-weight: 600; }

.post-body p { margin: 0 0 1.4em; }

.post-body a { color: var(--dark-surface); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--border-warm); }
.post-body a:hover { text-decoration-color: var(--dark-surface); }

.post-body ul,
.post-body ol {
  margin: 0 0 1.4em;
  padding-left: 1.5em;
}
.post-body li { margin-bottom: 0.5em; line-height: 1.70; }

.post-body blockquote {
  margin: 2em 0;
  padding: 18px 24px;
  border-left: 3px solid var(--terracotta);
  background: rgba(201, 100, 66, 0.04);
  color: var(--text-sub);
  font-style: italic;
  border-radius: 0 6px 6px 0;
}
.post-body blockquote p { margin: 0; }

.post-body code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.86em;
  background: #f4f4f5;
  color: var(--near-black);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #e4e4e7;
}

.post-body pre {
  background: #18181b;
  border-radius: 10px;
  padding: 22px 26px;
  overflow-x: auto;
  margin: 1.8em 0;
}
.post-body pre code {
  background: none;
  border: none;
  color: #d4d4d8;
  font-size: 0.875rem;
  padding: 0;
  border-radius: 0;
}

.post-body img {
  max-width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border-cream);
  margin: 1.4em 0;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8em 0;
  font-size: 0.93rem;
}
.post-body th {
  background: #f4f4f5;
  font-weight: 600;
  padding: 10px 16px;
  border: 1px solid #e4e4e7;
  text-align: left;
  color: var(--near-black);
}
.post-body td {
  padding: 9px 16px;
  border: 1px solid #e4e4e7;
  color: #3f3f46;
}
.post-body tr:nth-child(even) td { background: #fafafa; }

.post-body hr {
  border: none;
  border-top: 1px solid var(--border-cream);
  margin: 2.4em 0;
}

/* ── Post prev/next nav ── */
.post-nav {
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.post-nav__link {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 20px;
  border: 1px solid var(--border-cream);
  border-radius: 12px;
  background: var(--ivory);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.post-nav__link:hover { border-color: var(--border-warm); background: #fff; text-decoration: none; }
.post-nav__link--next { text-align: right; }

.post-nav__label {
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.post-nav__title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.40;
}

/* ── Post comments (Utterances) ── */
.post-comments {
  margin-top: 8px;
}
.post-comments__heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 20px;
  letter-spacing: 0.01em;
}

/* ── Blog listing grid (Claude-style cards) ── */
.blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.blog-card {
  background: var(--ivory);
  border: 1px solid var(--border-cream);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s;
}
.blog-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
  transform: translateY(-3px);
  text-decoration: none;
}

/* Warm placeholder — shown when no cover image is set */
.blog-card__cover {
  height: 158px;
  background: #2c2926;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
/* subtle highlight overlay — hidden when a real cover image is set */
.blog-card__cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 30%, rgba(255,255,255,0.07) 0%, transparent 65%);
}
.blog-card__cover[style*="background-image"]::after { display: none; }

/* vary warm placeholder tones so cards don't look identical */
.blog-card:nth-child(2) .blog-card__cover { background: #3a2f28; }
.blog-card:nth-child(3) .blog-card__cover { background: #2a2a22; }
.blog-card:nth-child(4) .blog-card__cover { background: #2e2622; }
.blog-card:nth-child(5) .blog-card__cover { background: #302b24; }

.blog-card__body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.blog-card__category {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.blog-card__title {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.30;
  letter-spacing: normal;
  color: var(--near-black);
  margin: 0;
  flex: 1;
}
.blog-card__title a { color: inherit; text-decoration: none; }
.blog-card:hover .blog-card__title a { color: var(--dark-surface); }

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.blog-card__meta-sep { color: var(--border-warm); font-size: 0.8rem; }
.blog-card__date     { font-size: 0.80rem; color: var(--text-muted); }
.blog-card__read-time { font-size: 0.80rem; color: var(--text-muted); }

@media screen and (max-width: 640px) {
  .post-container { padding: 36px 18px 72px; }
  .post-title { font-size: 1.85rem; }
  .post-nav { flex-direction: column; }
  .blog-list { grid-template-columns: 1fr; }
  .blog-card__cover { height: 130px; }
}
