/* ——————————————————————————————————————— */
/* Import IBM Plex Sans (300–700) for a thinner, modern look */
/* ——————————————————————————————————————— */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=Instrument+Serif:ital@0;1&family=Space+Grotesk:wght@400;500;700&display=swap');

html {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 300; /* default to a light weight */
  line-height: 1.6;
}

/* 1. Base reset + light-blue background */
html, body {
  margin: 0;
  padding: 0;
  background-color: #fff;
}
/* 2. Only Home gets light-blue */
/* Home page base — keep scrolling, no background image here */
body.home {
  margin: 0;
  color: #fff;
  background: #000; /* optional: black behind the art */
  font-family: 'Space Grotesk', sans-serif;
}

:root { --main-nav-h: 4.5rem; }

/* Make sure the fixed nav doesn't overlap page content */
body:not(.home) .main-nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 100;
}

body:not(.home) main.page-content {
  margin-top: var(--main-nav-h);
}


/* Hero fills the whole viewport */
/* Hero below navbar */
/* Hero below navbar (navbar is in flow, so no manual gap needed) */
.hero {
  position: relative;
  width: 100vw;
  min-height: 180vh;
  margin: 0;
}

/* Image drives height & scrolls naturally */
.hero-wrap {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100%;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: calc(100% + 140px);
  object-fit: cover;
  image-rendering: pixelated;
  transform: translate3d(0, 0, 0) scale(1.08);
  transform-origin: center top;
  will-change: transform;
}

/* Welcome text stays centered */
.welcome-text {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 3rem);
  will-change: transform;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 7, 12, 0.08) 0%, rgba(6, 7, 12, 0.2) 45%, rgba(6, 7, 12, 0.62) 100%),
    radial-gradient(circle at 20% 25%, rgba(0, 255, 255, 0.14), transparent 24%),
    radial-gradient(circle at 78% 18%, rgba(255, 0, 153, 0.16), transparent 26%);
  z-index: 2;
  pointer-events: none;
}

.home-overlay {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 420px);
  gap: 1.25rem;
  align-items: center;
}

.home-intro-card,
.home-nav-card {
  background: rgba(10, 14, 24, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.35);
  border-radius: 28px;
}

.home-intro-card {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  color: #f5f7ff;
  text-align: left;
}

.home-kicker {
  margin: 0 0 0.8rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #80f0ff;
}

.home-intro-card h1 {
  margin: 0;
  font-family: 'Instrument Serif', serif;
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.home-intro-card p:last-child {
  margin: 1rem 0 0;
  max-width: 36rem;
  color: rgba(244, 247, 255, 0.84);
  font-size: 1rem;
  line-height: 1.8;
}

.home-card-grid {
  display: grid;
  gap: 1rem;
}

.home-nav-card {
  display: block;
  padding: 1.35rem;
  color: #f5f7ff;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.home-nav-card:hover,
.home-nav-card:focus {
  transform: translateY(-2px);
  background: rgba(14, 18, 30, 0.52);
  border-color: rgba(128, 240, 255, 0.4);
}

.home-card-label {
  display: inline-block;
  margin-bottom: 0.7rem;
  color: #80f0ff;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.home-nav-card strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.15;
}

.home-nav-card p {
  margin: 0.8rem 0 0;
  color: rgba(244, 247, 255, 0.78);
  line-height: 1.65;
}


/* ————————————————————————————
   Default nav (Home/About): centered links
   ———————————————————————————— */
.main-nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  background: rgba(0,0,30,0.8);
  z-index: 100;
  padding: 1rem 0;
}
.main-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 6rem;
}
.main-nav a {
  color: #eef;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 4px;
  transition: background 0.3s;
}
.main-nav a:hover {
  background: rgba(255,255,255,0.1);
}

/* hover/focus effect */
.main-nav a:hover,
.main-nav a:focus {
  background: rgba(255, 255, 255, 0.1);
}

/* ————————————————————————————
   Blog nav (only on /blog/ & posts)
   ———————————————————————————— */
.blog-nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  padding: 0 0.5rem;
  background: #fff;
  z-index: 100;
}
.blog-nav .nav-brand a {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.blog-nav .nav-brand img {
  height: 3rem;
  width: 3rem;
  margin-right: 0.5rem;
}
.blog-nav .brand-name {
  color: #000;
  font-size: 1.25rem;
  font-weight: 600;
}
.blog-nav .nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  margin-right: 1rem;
  padding: 0;
}
.blog-nav .nav-links a {
  color: #000;
  text-decoration: none;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  transition: background 0.2s;
}
.blog-nav .nav-links a:hover {
  background: rgba(0,0,0,0.05);
}

.blog-nav + main,
.blog-nav + main.page-content,
.blog-nav + main.post-content {
  margin-top: 4rem;
}

/* Nav links a bit bolder for readability */
.main-nav a,
.blog-nav .nav-links a {
  font-weight: 500;
}

:root {
  --page-bg: #f4efe6;
  --page-surface: rgba(255, 252, 247, 0.82);
  --page-surface-strong: #fffaf2;
  --page-text: #1a2230;
  --page-muted: #5b6472;
  --page-accent: #b44f2a;
  --page-accent-soft: #f0c9a8;
  --page-line: rgba(26, 34, 48, 0.12);
  --page-shadow: 0 24px 80px rgba(30, 36, 46, 0.12);
}

body:not(.home) {
  background:
    radial-gradient(circle at top left, rgba(232, 180, 132, 0.38), transparent 30%),
    radial-gradient(circle at top right, rgba(113, 141, 183, 0.2), transparent 24%),
    linear-gradient(180deg, #f6f1e8 0%, #efe6d7 100%);
  color: var(--page-text);
  font-family: 'Space Grotesk', sans-serif;
}

body:not(.home) .page-content {
  padding: 3rem 1.25rem 5rem;
}

.main-nav {
  backdrop-filter: blur(18px);
  background: rgba(250, 245, 236, 0.78);
  border-bottom: 1px solid rgba(26, 34, 48, 0.08);
  padding: 1rem 0;
}

.main-nav ul {
  gap: 1rem;
}

.main-nav a {
  color: var(--page-text);
  font-size: 0.92rem;
  letter-spacing: 0.14em;
  border: 1px solid transparent;
}

.main-nav a:hover,
.main-nav a:focus {
  background: rgba(255, 255, 255, 0.45);
  border-color: rgba(26, 34, 48, 0.08);
}

.profile-shell,
.subpage-shell {
  max-width: 1120px;
  margin: 0 auto;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.8fr);
  gap: 2rem;
  align-items: start;
}

.profile-copy,
.profile-aside,
.info-panel,
.paper-card {
  background: var(--page-surface);
  border: 1px solid var(--page-line);
  border-radius: 28px;
  box-shadow: var(--page-shadow);
}

.profile-copy {
  padding: 2.6rem;
}

.profile-kicker,
.section-label {
  margin: 0 0 0.8rem;
  color: var(--page-accent);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.profile-copy h1,
.subpage-header h1,
.section-heading h2,
.info-panel h2 {
  margin: 0;
  color: var(--page-text);
}

.profile-copy h1,
.subpage-header h1,
.section-heading h2 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(3.2rem, 6vw, 5.6rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.profile-lead,
.subpage-header p,
.info-panel p,
.paper-card p,
.profile-facts dd,
.interest-list li {
  color: var(--page-muted);
  font-size: 1.02rem;
  line-height: 1.8;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.75rem;
}

.profile-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.75rem;
}

.social-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(26, 34, 48, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  color: var(--page-text);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.social-icon-button:hover,
.social-icon-button:focus-visible {
  transform: translateY(-2px);
  background: #fff;
  border-color: var(--page-accent);
}

.social-icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.social-icon-button.icon-filled svg {
  fill: currentColor;
  stroke: none;
}

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.1rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--page-text);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button-primary {
  background: var(--page-accent);
  color: #fffaf5;
  cursor: pointer;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(26, 34, 48, 0.08);
}

.button-primary:hover,
.button-secondary:hover,
.paper-links a:hover {
  transform: translateY(-1px);
}

.profile-aside {
  padding: 1.2rem;
}

.portrait-card {
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(180deg, #d7d1c7 0%, #f5ecdf 100%);
}

.portrait-card img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.profile-facts {
  display: grid;
  gap: 1rem;
  margin: 1.2rem 0 0;
}

.profile-facts div {
  padding-top: 1rem;
  border-top: 1px solid var(--page-line);
}

.profile-facts dt {
  margin-bottom: 0.2rem;
  color: var(--page-text);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-facts dd {
  margin: 0;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.subpage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.info-panel,
.paper-card {
  padding: 1.8rem;
}

.interest-list {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

.paper-section {
  margin-top: 4.5rem;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 1.6rem;
}

.section-heading h2 {
  font-size: clamp(2.6rem, 4vw, 4.2rem);
}

.paper-card + .paper-card {
  margin-top: 1.2rem;
}

.paper-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.4rem;
  align-items: start;
}

.paper-thumb {
  display: block;
  overflow: hidden;
  width: 220px;
  max-width: 100%;
  border-radius: 18px;
  background: rgba(26, 34, 48, 0.06);
  border: 1px solid var(--page-line);
}

.paper-thumb img {
  display: block;
  width: 100%;
  height: 150px;
  max-width: 220px;
  object-fit: contain;
  object-position: center;
  background: rgba(255, 250, 242, 0.92);
}

.paper-body {
  min-width: 0;
}

.paper-meta {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.paper-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 0.8rem;
  border-radius: 999px;
  background: rgba(180, 79, 42, 0.1);
  color: var(--page-accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.paper-card h3 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.2;
}

.paper-authors,
.paper-venue {
  margin-top: 0.6rem;
}

.paper-author-highlight {
  color: var(--page-text);
  font-weight: 700;
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.2rem;
}

.paper-links a,
.info-panel a {
  color: var(--page-accent);
  font-weight: 700;
  text-decoration: none;
}

.profile-contact-line {
  margin: 1rem 0 0;
  color: var(--page-muted);
  font-size: 0.95rem;
}

.obfuscated-email {
  display: inline-block;
  margin-left: 0.35rem;
  color: var(--page-text);
  font-weight: 500;
}

.subpage-header {
  max-width: 760px;
  margin-bottom: 1.5rem;
}

.philosophy-note {
  margin-top: 1.5rem;
  background: var(--page-surface-strong);
}

@media (max-width: 900px) {
  .home-overlay,
  .profile-hero,
  .profile-grid,
  .subpage-grid {
    grid-template-columns: 1fr;
  }

  .profile-copy {
    padding: 2rem;
  }

  .paper-layout {
    grid-template-columns: 1fr;
  }

  .paper-thumb {
    width: min(220px, 100%);
  }

  .profile-copy h1,
  .subpage-header h1,
  .section-heading h2 {
    line-height: 1;
  }
}

@media (max-width: 640px) {
  :root {
    --main-nav-h: 5.25rem;
  }

  .welcome-text {
    align-items: center;
    padding: 1rem;
  }

  .home-intro-card,
  .home-nav-card {
    border-radius: 22px;
  }

  .home-nav-card strong {
    font-size: 1.15rem;
  }

  body:not(.home) .page-content {
    padding-top: 2rem;
  }

  .main-nav ul {
    gap: 0.2rem;
    padding: 0 0.4rem;
  }

  .main-nav a {
    padding: 0.65rem 0.8rem;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
  }

  .profile-copy,
  .profile-aside,
  .info-panel,
  .paper-card {
    border-radius: 22px;
  }

  .profile-lead,
  .subpage-header p,
  .info-panel p,
  .paper-card p,
  .profile-facts dd,
  .interest-list li {
    font-size: 0.96rem;
    line-height: 1.7;
  }
}

/* Site title/brand */
.brand-name {
  font-weight: 600;
}

/* Blog card titles */
.card-title {
  font-weight: 500;
}

/* ——————————————————————————————— */
/* 2. Under Construction badge       */
/* ——————————————————————————————— */
.under-construction {
  text-align: center;
  margin-bottom: 4rem;
  font-size: 2rem;
  font-weight: bold;
  color: #ff8c00;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  /* optional pixel-art background behind emoji/text */
  /* background: url('{{ "/assets/images/under_construction_pixel.png" | relative_url }}') no-repeat center bottom; */
}

.construction-gif {
  display: block;
  margin: 1.5rem auto 4rem;
  width: 256px;          /* adjust size as needed */
  image-rendering: pixelated; /* keeps it crisp if it’s low-res */
}

.blog-index-shell {
  max-width: 1120px;
  min-width: 0;
  padding: 1rem 1.25rem 4rem;
}

.blog-layout {
  width: min(1400px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.blog-sidebar {
  position: sticky;
  top: 5.25rem;
  align-self: start;
}

.blog-sidebar-card {
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 24px;
  background: rgba(255, 251, 245, 0.78);
  box-shadow: 0 18px 40px rgba(60, 38, 24, 0.08);
  backdrop-filter: blur(12px);
  padding: 18px 16px;
}

.blog-sidebar-nav {
  display: grid;
  gap: 8px;
}

.blog-sidebar-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--page-muted);
  font-weight: 600;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.blog-sidebar-nav a:hover {
  background: rgba(182, 84, 45, 0.1);
  color: var(--page-accent);
  transform: translateX(2px);
}

.blog-featured {
  margin-bottom: 3rem;
}

.blog-secondary {
  margin-top: 2.5rem;
}

.blog-section-head {
  max-width: 760px;
  margin-bottom: 1.4rem;
}

.blog-kicker {
  margin: 0 0 0.65rem;
  color: var(--page-accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.blog-section-head h1,
.blog-section-head h2 {
  margin: 0;
  color: var(--page-text);
  font-family: 'Instrument Serif', serif;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.blog-section-head h1 {
  font-size: clamp(2.8rem, 5vw, 4.6rem);
}

.blog-section-head h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.blog-section-head p {
  color: var(--page-muted);
  line-height: 1.8;
}

.featured-list {
  display: grid;
  gap: 1rem;
}

.featured-post {
  background: var(--page-surface);
  border: 1px solid var(--page-line);
  border-radius: 26px;
  box-shadow: var(--page-shadow);
}

.featured-post-link {
  display: block;
  padding: 1.5rem 1.6rem;
  color: inherit;
  text-decoration: none;
}

.featured-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.featured-post-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 0.8rem;
  border-radius: 999px;
  background: rgba(180, 79, 42, 0.1);
  color: var(--page-accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.featured-post h2 {
  margin: 0;
  color: var(--page-text);
  font-size: 1.8rem;
  line-height: 1.15;
}

.featured-post p {
  margin: 0.8rem 0 0;
  color: var(--page-muted);
  line-height: 1.8;
}

/* ————————————————————————
   Blog grid: 3 columns
   ———————————————————————— */
.blog-grid {
  display: grid;
  gap: 1.5rem;                     /* space between cards */
  padding: 0;                 /* padding from left/right page borders */
  max-width: 1200px;               /* cap overall width so cards don’t stretch too wide */
  margin: 0;                  /* center the grid container */
  grid-template-columns: 
    repeat(auto-fit, minmax(280px, 1fr)); /* shrink cards to min 280px */
}
@media (min-width: 600px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .blog-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ————————————————————————
   Blog card styling
   ———————————————————————— */
.blog-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.blog-card a {
  color: inherit;
  text-decoration: none;
  display: block;
}

/* image container to keep aspect ratio */
.card-image {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* title and date */
.card-title {
  font-size: 1.25rem;
  margin: 1rem;
}
.card-date {
  display: block;
  font-size: 0.875rem;
  color: #666;
  margin: 0 1rem 1rem;
}

/* video container keeps same 16:9 ratio */
.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #000;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* video fills the container */
.card-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}

.card-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 2;
  transition: opacity 180ms ease;
}

.card-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}

.blog-card:hover .card-poster {
  opacity: 0;
  pointer-events: none;
}

/* smooth, padded blog cards like Perplexity.ai */
.blog-card {
  border-radius: 12px;          /* more rounded than before */
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  background: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}
.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* keep media full-width */
.card-media {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #000;
}

/* add space around title & date */
.card-content {
  padding: 1rem;                /* your padding inside each card */
}

/* you can tweak these too */
.card-title {
  margin: 0 0 0.5rem;
}
.card-date {
  margin: 0;
}

/* Side padding for individual blog posts */
.post-page {
  width: min(1400px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  padding: 1rem 1.25rem 4rem;
}

.post-page.sidebar-hidden {
  grid-template-columns: 52px minmax(0, 1fr);
}

.post-sidebar-shell {
  position: sticky;
  top: 5.25rem;
  align-self: start;
  width: 180px;
  max-height: calc(100vh - 6rem);
  display: flex;
  flex-direction: column;
}

.post-sidebar {
  width: 100%;
  min-height: 0;
}

.post-page.sidebar-hidden .post-sidebar-shell {
  width: 52px;
  max-height: none;
}

.post-page.sidebar-hidden .post-sidebar {
  display: none;
}

.post-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 0 0.7rem;
  min-height: 40px;
  padding: 0 0.95rem;
  border: 1px solid rgba(26, 34, 48, 0.08);
  border-radius: 999px;
  background: rgba(255, 251, 245, 0.9);
  color: var(--page-text);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(60, 38, 24, 0.08);
}

.post-page.sidebar-hidden .post-sidebar-toggle {
  width: 52px;
  padding: 0;
  color: transparent;
  position: relative;
}

.post-page.sidebar-hidden .post-sidebar-toggle::after {
  content: '>';
  color: var(--page-text);
  font-size: 1rem;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-sidebar-card {
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 24px;
  background: rgba(255, 251, 245, 0.78);
  box-shadow: 0 18px 40px rgba(60, 38, 24, 0.08);
  backdrop-filter: blur(12px);
  padding: 15px 13px;
  max-height: calc(100vh - 8.7rem);
  overflow-y: auto;
}

.post-sidebar-nav {
  display: grid;
  gap: 8px;
}

.post-sidebar-nav > a,
.post-toc-subnav a,
.post-toc-group summary {
  display: block;
  padding: 8px 10px;
  border-radius: 14px;
  color: var(--page-muted);
  font-weight: 600;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
  font-size: 0.92rem;
}

.post-sidebar-nav > a:hover,
.post-toc-subnav a:hover,
.post-toc-group summary:hover,
.post-toc-group[open] summary {
  background: rgba(182, 84, 45, 0.1);
  color: var(--page-accent);
  transform: translateX(2px);
}

.post-toc-group {
  border-radius: 14px;
  background: rgba(32, 26, 23, 0.03);
}

.post-toc-group[data-depth='1'] {
  margin-left: 0.35rem;
}

.post-toc-group[data-depth='2'] {
  margin-left: 0.8rem;
}

.post-toc-group summary {
  cursor: pointer;
  list-style: none;
}

.post-toc-group summary::-webkit-details-marker {
  display: none;
}

.post-toc-group summary a {
  color: inherit;
  text-decoration: none;
}

.post-toc-subnav {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0 8px 10px;
}

.post-toc-subnav a.is-subsection {
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 0.84rem;
  line-height: 1.35;
}

.post-toc-subnav a[data-depth='2'] {
  padding-left: 1.25rem;
}

.post-toc-subnav a[data-depth='3'] {
  padding-left: 1.8rem;
}

.post-toc-subnav a[data-depth='4'] {
  padding-left: 2.3rem;
}

.post-article {
  min-width: 0;
  background: rgba(255, 252, 247, 0.9);
  border: 1px solid var(--page-line);
  border-radius: 28px;
  box-shadow: var(--page-shadow);
  padding: 2rem clamp(1.2rem, 3vw, 2.75rem) 2.25rem;
}

.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--page-line);
}

.post-title {
  margin: 0;
  color: var(--page-text);
  font-family: 'Instrument Serif', serif;
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.post-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  margin-top: 1rem;
}

.post-date {
  color: var(--page-muted);
  font-weight: 600;
}

.post-tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.post-tag-pills span,
.post-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 0.8rem;
  border-radius: 999px;
  background: rgba(180, 79, 42, 0.1);
  color: var(--page-accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.post-content {
  max-width: 780px;
  margin: 0 auto;
  color: var(--page-text);
  font-size: 1.06rem;
  line-height: 1.9;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  color: var(--page-text);
  line-height: 1.15;
}

.post-content h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 2rem 0 1rem;
}

.post-content h2 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin: 2.6rem 0 0.9rem;
  scroll-margin-top: 6rem;
}

.post-content h3 {
  font-size: 1.25rem;
  margin: 1.8rem 0 0.75rem;
  scroll-margin-top: 6rem;
}

.post-content p,
.post-content ul,
.post-content ol {
  margin: 0 0 1.1rem;
}

.post-content li + li {
  margin-top: 0.55rem;
}

.post-content blockquote {
  margin: 1.4rem 0;
  padding: 0.2rem 1rem;
  border-left: 3px solid rgba(180, 79, 42, 0.28);
  color: var(--page-muted);
}

.post-content code {
  background: rgba(26, 34, 48, 0.06);
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
}

.post-content pre {
  overflow-x: auto;
  padding: 1rem;
  border-radius: 14px;
  background: #f3ede3;
}

.post-tags {
  max-width: 780px;
  margin: 2rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--page-line);
}

.post-tags h4 {
  margin: 0 0 0.75rem;
  color: var(--page-text);
}

.post-tags ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* You can tighten padding on smaller screens if you like */
@media (max-width: 600px) {
  .post-page {
    padding: 1rem 1rem 3rem;
    grid-template-columns: 1fr;
  }

  .blog-index-shell {
    padding: 1rem 1rem 3rem;
  }

  .featured-post-link {
    padding: 1.2rem;
  }
}

@media (max-width: 920px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }

  .post-page {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
  }

  .post-sidebar-shell,
  .post-sidebar {
    position: static;
    width: 100%;
  }

  .post-sidebar-toggle {
    margin-bottom: 0.5rem;
  }

  .blog-sidebar-nav {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }

  .post-sidebar-nav {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

/* Push down content on any page with body.blog */
body.blog main.page-content,
body.blog main.post-content,
body.blog main.post-page {
  margin-top: 4rem; /* matches your nav height; adjust if you change it */
}

/* smooth-hide for both navs */
.main-nav,
.blog-nav {
  transition: transform 0.3s ease;
}

/* apply the hide */
.nav-hidden {
  transform: translateY(-100%);
}


/* ——— About page ——— */
.page .page-content { max-width: 1000px; margin: 0 auto; padding: 2rem 1.25rem; }

/* Hero */
.about-hero { text-align: center; margin-bottom: 2.5rem; }
.about-name {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(1.8rem, 2.6vw, 2.6rem);
  color: #0ff;
  text-shadow: 0 0 6px rgba(0,255,255,0.5);
  letter-spacing: 0.04em;
  margin: 0 0 0.5rem;
}
.about-subtitle { color: #bbb; margin: 0.25rem 0 1rem; }
.about-cta { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.btn-ghost {
  border: 1.5px solid #0ff;
  color: #0ff; text-decoration: none;
  padding: 0.5rem 0.9rem; border-radius: 10px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  box-shadow: 0 0 8px rgba(0,255,255,0.2);
}
.btn-ghost:hover { background: rgba(0,255,255,0.1); color: #fff; transform: translateY(-1px); }

/* Two-column intro */
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.25rem; align-items: start; margin-bottom: 2.25rem; }
.about-photo img { width: 100%; border-radius: 12px; display: block; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* Media grid */
.about-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem; margin: 2rem 0 2.5rem;
}
.media-card { background: #0b0b0b; border: 1px solid #222; border-radius: 12px; overflow: hidden; }
.media { width: 100%; height: 100%; display: block; object-fit: cover; }
.media-card figcaption { padding: 0.6rem 0.8rem; color: #cfcfcf; font-size: 0.95rem; }

/* Sections */
.about-section { margin: 2rem 0; }
.about-section h2 {
  font-family: 'Press Start 2P', monospace; color: #0ff; font-size: 1.2rem;
  margin: 0 0 0.75rem; letter-spacing: 0.04em;
}

/* Publications */
.pub-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.8rem; }
.pub-title { font-weight: 600; }
.pub-venue { color: #9ad; margin-left: 0.5rem; }
.pub-links a { color: #0ff; text-decoration: none; }
.pub-links a:hover { text-decoration: underline; }

/* News */
.news-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.25rem; }
.news-list time { color: #9aa; margin-right: 0.5rem; }

/* Dark page background (inherited from your body.blog default) */
body:not(.home) {
  background: #fff;
  color: #000;
}
