/* ============================================================
   Custom Theme — Minimalist Academic (Phase 2)
   Font: Linux Libertine (headings) + Inter (body)
   ============================================================ */

/* ── Self-hosted Linux Libertine (Libertinus Serif) ── */
@font-face {
  font-family: "Linux Libertine";
  src: url("/fonts/LibertinusSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Linux Libertine";
  src: url("/fonts/LibertinusSerif-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Linux Libertine";
  src: url("/fonts/LibertinusSerif-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Linux Libertine";
  src: url("/fonts/LibertinusSerif-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Linux Libertine Display";
  src: url("/fonts/LibertinusSerifDisplay-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Linux Libertine Display";
  src: url("/fonts/LibertinusSerif-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Linux Libertine Display";
  src: url("/fonts/LibertinusSerif-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* No external font @import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

/* ── Design Tokens (override PaperMod theme-vars) ── */
:root {
  --theme: #ffffff !important;
  --entry: #ffffff !important;
  --code-bg: #f5f5f5;
  --code-block-bg: rgb(28, 29, 33);
  --bg: #ffffff;
  --bg-card: #ffffff;
  --primary: #1e1e1e;
  --secondary: #888888;
  --tertiary: #aaaaaa;
  --content: #333333;
  --border: #eaeaea;
  --link: #333333;
  --link-hover: #000000;
  --accent-featured: #2563eb;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Libertinus Serif", "Libre Baskerville", Georgia, serif;
  --max-width: 860px;
  --nav-width: 1024px;
  --main-width: 860px;
  --transition: 0.2s ease;
}

/* Dark mode — use PaperMod defaults, no overrides */

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #ffffff !important;
}

body {
  font-family: var(--font-body);
  color: var(--content);
  background: #ffffff !important;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 1000px) {
  body.home-list-page .main {
    max-width: 1100px;
  }
}

/* ── Consistent BG on ALL containers — force white ── */
.main,
.post-single,
article,
.archive-entry,
.terms-tags,
.pagination,
.nav,
header,
footer,
.header,
.footer,
[class*="wrapper"],
[class*="container"] {
  background: transparent !important;
  background-color: transparent !important;
}

/* ── PaperMod .list bg override — force white ── */
.list {
  background: transparent !important;
}

img {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.footer,
.footer span,
.footer a {
  font-size: 13px !important;
}

/* ── Typography ── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--primary);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

h1 {
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 0.5em;
}

h2 {
  font-weight: 600;
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}



h3 {
  font-weight: 600;
  font-size: 1.15rem;
  margin-top: 1.5rem;
}

.logo a {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--primary) !important;
}

/* ── Links — graceful color fade on hover only ── */
a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  text-decoration: none;
  opacity: 0.7;
}

/* Content links: elegant color fade */
.post-content a,
.entry-content a,
.distill-article a {
  text-decoration: underline !important;
  text-decoration-color: var(--tertiary) !important;
  text-underline-offset: 3px;
  color: var(--primary);
  font-weight: 500;
  border-bottom: none;
  transition: all var(--transition);
}

.post-content a:hover,
.entry-content a:hover,
.distill-article a:hover {
  text-decoration-color: var(--primary) !important;
  opacity: 1;
}

/* ── Navigation — minimal, NO double underlines ── */
.nav {
  min-height: 56px;
  border-bottom: none;
}

#menu a {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--secondary);
  padding: 0.3rem 0;
  margin: 0 0.8rem;
  transition: color var(--transition);
  background: none !important;
  border-radius: 0;
  border-bottom: none !important;
  text-decoration: none !important;
}

#menu a:hover,
#menu .active {
  color: var(--primary);
  background: none !important;
  text-decoration: none !important;
  border-bottom: none !important;
  opacity: 1;
}

/* Kill PaperMod's native active indicator */
#menu a.active::after,
#menu a.active::before {
  display: none !important;
}

/* ── Max width ── */
.main {
  max-width: var(--max-width);
}

/* ── Back link ── */
.back-link {
  display: none !important;
  /* Globally disable all back buttons */
}

.back-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

body {
  position: relative;
  z-index: 0;
}

body::before {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0) 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: light-ripple 8s ease-out infinite;
  z-index: -1;
  pointer-events: none;
}

/* ── Home Hero ── */
@keyframes light-ripple {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }

  100% {
    transform: translate(-50%, -50%) scale(40);
    opacity: 0;
  }
}

.home-hero {
  padding: 1.75rem 0 0 !important;
}

.home-layout {
  display: block;
}

.home-page-content {
  min-width: 0;
  width: 100%;
}

@media (min-width: 1000px) {
  .home-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 4rem;
    align-items: start;
  }

  .home-page-content {
    max-width: 860px;
    margin: 0 auto;
  }
}

.home-hero h1 {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 400;
  margin-bottom: 0.6rem;
  letter-spacing: -0.02em;
}

.home-hero-copy,
.home-hero-copy p {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.home-hero-copy {
  font-size: 1.03rem;
  font-weight: 500;
  color: var(--primary);
  max-width: 760px;
  margin-right: 0;
  line-height: 1.45;
}

.home-hero-copy p {
  margin: 0 0 1rem;
}

.home-hero-copy p:last-child {
  margin-bottom: 1rem;
}

.home-hero-copy a {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--primary);
}

.hero-links {
  margin-top: 1.2rem;
  display: flex;
  gap: 2rem;
}

.hero-links a {
  font-size: 0.9rem;
  color: var(--secondary);
  text-decoration: none;
}

.hero-links a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.hero-links a::after {
  content: ' →';
}

.home-hero {
  margin-bottom: 0;
}

.home-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
  align-items: start;
}

.home-identity-rail {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.home-identity-name {
  margin: 0;
  font-family: var(--home-name-font, var(--font-heading));
  color: var(--home-name-color, var(--primary));
  font-size: 2.05rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  white-space: normal;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
  display: block;
  transform-origin: left top;
  transition: font-family 320ms ease, letter-spacing 320ms ease, font-weight 320ms ease, opacity 320ms ease;
}

.home-identity-name .name-line {
  display: block;
}

.home-hero .home-identity-name {
  font-family: var(--home-name-font, var(--font-heading)) !important;
  color: var(--home-name-color, var(--primary)) !important;
  font-weight: 700 !important;
}

.home-identity-name.font-morphing {
  opacity: 0.9;
}

.home-identity-name .float-letter {
  display: inline-block;
}

.home-identity-name .float-letter.is-space {
  width: 0.3em;
}

@keyframes home-name-hover-letter-float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-5px);
  }

  100% {
    transform: translateY(0px);
  }
}

.home-identity-name:hover .float-letter:not(.is-space):not(.font-morph-letter) {
  animation: home-name-hover-letter-float 2s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.06s);
  will-change: transform;
}

@keyframes letter-font-morph {
  0% {
    transform: translateY(10px) scale(0.94);
    opacity: 0.2;
  }
  60% {
    transform: translateY(-2px) scale(1.02);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.home-identity-name .float-letter.font-morph-letter {
  animation: letter-font-morph 420ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.home-identity-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.home-identity-actions .social-icons {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem;
}

.home-identity-actions .social-icons a {
  padding: 6px;
}

.home-identity-art {
  margin-top: 0.55rem;
  margin-left: -12px;
  width: 100%;
  max-width: 185px;
}

@keyframes cube-hover-float {
  0% {
    transform: translate3d(0, 0, 0) rotate(var(--cube-rot, 0deg));
  }

  50% {
    transform: translate3d(0, -10px, 0) rotate(calc(var(--cube-rot, 0deg) - 1.2deg));
  }

  100% {
    transform: translate3d(0, 0, 0) rotate(var(--cube-rot, 0deg));
  }
}

.home-identity-art img {
  display: block;
  width: 100%;
  height: auto;
  transform: rotate(var(--cube-rot, 0deg));
  transform-origin: 50% 50%;
  transition: filter 0.25s ease, transform 0.25s ease;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.home-identity-art:hover img {
  animation: cube-hover-float 1.8s ease-in-out infinite;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.12));
}

.home-identity-email {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--secondary);
  line-height: 1.5;
  max-width: 22ch;
}

.home-hero h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

@media (min-width: 1000px) {
  .home-hero-grid {
    grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
    gap: 2.2rem;
  }

  .home-identity-rail {
    position: static;
  }

  .home-hero-copy {
    max-width: 760px;
  }
}

/* ── Home Sections — compact ── */
.home-section {
  margin: 2.4rem 0;
}

.home-toc {
  display: none;
}

@media (min-width: 1000px) {
  .home-toc {
    display: block;
    width: 220px;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    scrollbar-width: none;
    padding-right: 1.5rem;
    font-family: system-ui, -apple-system, sans-serif;
  }

  .home-toc::-webkit-scrollbar {
    display: none;
  }
}

.home-toc #TableOfContents {
  margin: 0 !important;
  padding: 0 !important;
}

.home-toc #TableOfContents ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.home-toc #TableOfContents li {
  margin-bottom: 0.3rem;
}

.home-toc #TableOfContents a {
  font-size: 0.95rem;
  color: var(--secondary);
  text-decoration: none;
  line-height: 1.4;
  display: block;
}

.research-page .distill-toc #TableOfContents a {
  font-size: 0.95rem !important;
}

.home-toc #TableOfContents a:hover {
  color: var(--primary);
}

.home-hero+.home-section {
  margin-top: 1.1rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3rem;
  margin-bottom: 0.8rem;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

.section-header .view-all {
  font-size: 0.82rem;
  color: var(--secondary);
  text-decoration: none;
}

.section-header .view-all:hover {
  text-decoration: underline;
  color: var(--primary);
}

.featured-pills {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  margin: 0;
}

.featured-pills .pill-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 100px;
  border: none !important;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: #000 !important;
  background: #f3f4f6 !important;
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: none !important;
}

.featured-pills .pill-btn:hover {
  background: #d1d5db !important;
  transform: none;
  color: #000 !important;
  opacity: 1;
}

.pill-icon {
  font-size: 1.1rem;
}

/* ── Recent Updates (Two-Column) ── */
.updates-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.update-entry {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.5rem;
  align-items: baseline;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
}

.update-entry:last-child {
  border-bottom: none;
}

.update-date {
  font-size: 0.9rem;
  color: var(--tertiary);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}


/* ── Blog-style post list (date | title) ── */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-list li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.pub-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pub-entry {
  display: block;
  padding: 1rem 1.2rem;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-decoration: none;
  border: 1px solid transparent;
  /* Prepare for hover */
  transition: all 0.25s ease;
}

.pub-entry:hover {
  background: transparent;
  transform: none;
  box-shadow: none;
  opacity: 1 !important;
}

.pub-entry-static {
  cursor: default;
}

.pub-entry-static:hover {
  background: transparent;
  border-color: transparent;
  transform: none;
  box-shadow: none;
}

.pub-entry .entry-title {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--primary);
  margin-bottom: 0.25rem;
  margin-top: 0;
}

.pub-entry .entry-meta {
  color: var(--secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

.pub-page-entry {
  cursor: default;
  /* Remove pointer since links are inside */
}

.pub-page-entry:hover {
  transform: none;
}

.pub-links-bar {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}

.pub-link-pill {
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
  background: white;
}

/* ── Cards / Entries: elegant interactive rows ── */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.25s ease;
}

.post-entry:hover {
  background: #fbfbfb;
  border-color: rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  opacity: 1 !important;
  /* Override standard link hover */
}

.post-entry .entry-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0;
}

.post-entry .entry-date {
  font-size: 0.9rem;
  color: var(--tertiary);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.post-content,
.entry-content,
.post-single .post-content {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--content);
}

/* ── Research / Publication page ── */
.pub-line {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.pub-line:last-child {
  border-bottom: none;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.pub-links a {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--secondary);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color var(--transition);
}

.pub-links a:hover {
  color: var(--primary);
  text-decoration-color: currentColor;
}

/* ── Meta ── */
.post-meta,
.post-description,
.breadcrumbs,
.entry-footer {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--tertiary);
}

.post-title {
  font-family: var(--font-heading);
  font-weight: 400;
}

/* ── Code ── */
code {
  font-size: 0.875em;
  background: var(--code-bg);
  padding: 0.15em 0.35em;
  border-radius: 4px;
}

pre {
  background: var(--code-bg) !important;
  border-radius: 8px;
  padding: 1rem 1.2rem;
  overflow-x: auto;
}

pre code {
  background: none;
  padding: 0;
}

/* ── Footnote Popup System ── */
.footnote-ref {
  font-size: 0.75em;
  vertical-align: super;
  line-height: 0;
  color: var(--secondary);
  cursor: pointer;
  text-decoration: none !important;
  position: relative;
  font-family: var(--font-body);
  font-weight: 500;
  padding: 0 2px;
}

.footnote-ref:hover {
  color: var(--primary);
  text-decoration: none !important;
}

.footnote-popup {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  max-width: 90vw;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.8rem 1rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--content);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  z-index: 100;
  font-family: var(--font-body);
  font-weight: 400;
}

:root[data-theme="dark"] .footnote-popup {
  background: var(--bg-card);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.footnote-popup.show {
  display: block;
}

.footnote-popup::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--border);
}

.footnote-popup .fn-num {
  font-weight: 600;
  color: var(--primary);
  margin-right: 0.3em;
}

/* ── Entrance Animations (subtle) ── */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.35s ease both;
}

.stagger-1 {
  animation: fadeIn 0.35s ease 0.05s both;
}

.stagger-2 {
  animation: fadeIn 0.35s ease 0.1s both;
}

.stagger-3 {
  animation: fadeIn 0.35s ease 0.15s both;
}

.stagger-4 {
  animation: fadeIn 0.35s ease 0.2s both;
}

/* ── Page header ── */
.page-header h1 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 2.2rem;
}

/* ── Responsive ── */
@media (max-width: 680px) {
  h1 {
    font-size: 1.8rem;
  }

  .home-hero h1 {
    font-size: 2.2rem;
  }

  .home-hero-copy {
    margin-right: 0;
  }

  .home-identity-name {
    font-size: 1.8rem;
  }

  .home-identity-actions {
    flex-wrap: nowrap;
    gap: 0.45rem;
  }

  .home-identity-art {
    max-width: 145px;
  }

  .home-identity-email {
    max-width: none;
  }

  .featured-pills {
    flex-wrap: wrap;
  }

  .post-list li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .featured-essays {
    grid-template-columns: 1fr;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ── Blog Topic Cards ── */
.blog-topics {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.topic-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: inherit;
  text-decoration: none !important;
  transition: all 0.25s ease;
}

.topic-card:hover {
  background: #fbfbfb;
  border-color: rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  opacity: 1 !important;
}

.topic-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

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

.topic-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 0.15rem;
}

.topic-desc {
  font-size: 0.88rem;
  color: var(--secondary);
  margin: 0;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-arrow {
  font-size: 1rem;
  color: var(--tertiary);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.topic-card:hover .topic-arrow {
  transform: translateX(3px);
}

/* ── Blog Group Headers ── */
.blog-group {
  margin-bottom: 2rem;
}

.blog-group-header {
  margin-bottom: 0;
}

.blog-group-header h2 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--primary);
}

@media (max-width: 680px) {
  .topic-desc {
    white-space: normal;
  }
}

/* ── Elegant List Layout (Date | Title) ── */
.elegant-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 1rem;
}

#top .home-section .elegant-list .home-research-entry {
  grid-template-columns: 220px 1fr !important;
}

.elegant-entry {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: baseline;
  gap: 1.5rem;
  color: var(--primary);
  text-decoration: none !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0.35rem 0;
  border-bottom: none !important;
}

.elegant-entry:last-child {
  border-bottom: none;
}

.blog-group .elegant-entry:hover .elegant-date,
.blog-group .elegant-entry:hover .elegant-title,
.vision-header~.elegant-list .elegant-entry:hover .elegant-date,
.vision-header~.elegant-list .elegant-entry:hover .elegant-title,
.home-update-entry[data-kind="blog"]:hover .home-update-date,
.home-update-entry[data-kind="blog"]:hover .home-update-category,
.home-update-entry[data-kind="blog"]:hover .home-update-title {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.home-updates-heading {
  margin: 0 0 0.45rem;
}

.home-updates-heading h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.home-updates-list {
  margin-top: 0.5rem;
  gap: 0;
  border-top: none;
  width: 100%;
  max-width: 100%;
}

.home-updates-heading,
.home-updates-filter,
.home-updates-list {
  max-width: 100%;
}

.home-updates-filter {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin: 0.55rem 0 0.52rem !important;
}

.home-updates-filter-btn {
  border: none;
  background: transparent;
  color: #666;
  font-family: var(--font-body);
  font-size: 1.04rem !important;
  font-weight: 500;
  padding: 0;
  cursor: pointer;
}

.home-updates-filter-btn.is-active {
  color: var(--primary);
}

.home-updates-filter-btn:hover {
  color: var(--primary);
  opacity: 1;
}

.home-update-entry {
  grid-template-columns: 160px 120px minmax(0, 1fr);
  align-items: start;
  gap: 1.2rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border) !important;
}

.home-update-entry:last-child {
  border-bottom: none !important;
}

.home-update-date {
  font-size: 0.92rem;
  color: var(--secondary);
}

.home-update-category {
  font-size: 0.92rem;
  color: var(--secondary);
  font-weight: 600;
}

.home-update-category.is-blog {
  color: var(--accent-featured);
}

.home-update-category.is-news {
  color: #f97316;
}

.home-update-title {
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
  white-space: normal;
}

@media (min-width: 601px) {
  .home-update-title {
    margin-left: -29px;
  }
}

.home-update-entry.is-news {
  cursor: default;
}

.home-update-entry.is-news:hover {
  opacity: 1;
}

@media (min-width: 1200px) {
  .home-updates-heading,
  .home-updates-filter,
  .home-updates-list {
    max-width: calc(100% - clamp(340px, 28vw, 460px));
  }
}

/* ── Pagination Buttons (Sleek Grey) ── */
#top .pagination a {
  background: #f3f4f6 !important;
  color: var(--primary) !important;
  border: none !important;
  border-radius: 100px;
  padding: 0.6rem 1.2rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

#top .pagination a:hover {
  background: var(--entry) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.elegant-date {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--secondary);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.elegant-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--primary);
  line-height: 1.4;
  transition: color 0.2s ease;
}


@media screen and (max-width: 600px) {
  .elegant-entry {
    grid-template-columns: 100px 1fr;
    gap: 1rem;
  }

  .home-update-entry {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding: 0.75rem 0;
  }

  .home-updates-list {
    max-width: 100%;
    width: 100%;
  }

  .home-updates-filter {
    gap: 1.2rem;
    margin-bottom: 0.75rem;
  }
}

@media screen and (max-width: 450px) {
  .elegant-entry {
    grid-template-columns: 90px 1fr;
    gap: 0.5rem;
  }

  .elegant-date {
    font-size: 0.85rem;
  }
}
