/* Ensure tag badges in posts are always white text, not blue */
.post-tags .tag-badge {
  color: #fff !important;
}
body.theme-dark .content-main tr {
  background: #000 !important;
  color: #918d8d !important;
}
/* Center and add moderate margins for post pages */
.post {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
@font-face {
  font-family: 'Inter Tight';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/intertight/v9/NGSyv5HMAFg6IuGlBNMjxLsCwadkRFe9.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

:root {
  --heading-font-color: #0f1720;
}

/* Remove underlines from all links */
a,
a:visited,
a:hover,
a:active {
  text-decoration: none !important;
}

/* Blog card styles */
.content-main .blog-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media screen and (min-width: 768px) {
  .content-main .blog-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (min-width: 1200px) {
  .content-main .blog-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.content-main .blog-cards > li.post-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem;
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.content-main .blog-cards > li.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 32, 0.08);
  border-color: #d1d5db;
}

.content-main .blog-cards > li.post-card .post-meta {
  display: block;
  margin: 0 0 0.55rem;
  color: #6b7280;
  font-size: 0.9rem;
}

.content-main .blog-cards > li.post-card h3 {
  margin: 0;
}

.content-main .blog-cards > li.post-card .post-card-desc {
  margin: 0.65rem 0 0;
  color: #6b7280;
  font-size: 0.96rem;
  line-height: 1.55;
}

.site-title,
.site-title:hover,
.site-title:active,
.site-title:visited {
  text-decoration: none !important;
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 26px;
  font-weight: 300;
  line-height: 54px;
  letter-spacing: -1px;
  margin-bottom: 0;
}

body {
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  background-color: #fdfdfd !important;
  overflow-x: hidden;
}

.site-header .container-fluid,
.page-content .container-fluid,
.site-footer .container-fluid {
  padding-left: 2rem !important;
  padding-right: 2rem !important;
}

/* Keep link colors consistent with minima theme */
a:hover {
  color: #111 !important;
}


/* Header styles */
.site-header .container-fluid {
  display: flex;
  align-items: center;
}

.site-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
  line-height: normal;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-nav .page-link,
.site-nav .page-link:hover,
.site-nav .page-link:active,
.site-nav .page-link:visited {
  text-decoration: none !important;
}

.site-nav .page-link {
  font: 400 16px/1.5 'Inter Tight', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  color: #111;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  -webkit-text-size-adjust: 100%;
  -webkit-font-feature-settings: "kern" 1;
  -moz-font-feature-settings: "kern" 1;
  -o-font-feature-settings: "kern" 1;
  font-feature-settings: "kern" 1;
  font-kerning: normal;
}

.theme-toggle {
  font: 400 14px/1 'Inter Tight', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #111;
  background: transparent;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
}

.theme-toggle:hover {
  background: #f1f5f9;
}

.content-sidebar {
  background-color: #111;
  color: #fdfdfd;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  min-height: calc(100vh - 180px);
}

.content-main {
  padding: 0 0 0 2rem;
}

.content-main-full {
  padding-left: 0;
}

.about-sidebar-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background-color: #111;
  min-height: 100%;
  padding: 1.25rem;
  border-radius: inherit;
}

.about-sidebar-title {
  margin: 0;
  color: #fdfdfd;
}

.about-sidebar-image {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 30%;
  align-self: center;
}

.about-sidebar-text {
  margin: 0;
  color: #fdfdfd;
}

.about-sidebar-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #fdfdfd;
  width: fit-content;
  margin-top: auto;
  align-self: center;
}

.about-sidebar-linkedin:hover {
  color: #d9d9d9 !important;
}

.about-sidebar-linkedin:visited,
.about-sidebar-linkedin:active,
.about-sidebar-linkedin:focus {
  color: #fdfdfd !important;
}

.about-page-hero {
  text-align: center;
  padding: 2rem 0 1.5rem;
}

.about-page-image {
  display: block;
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.about-page-hero .about-page-tagline {
  font-size: 1.1rem;
  color: #666;
  margin-top: 0.25rem;
  font-style: italic;
}

.about-page-body {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}

.about-page-body h2 {
  margin-top: 2rem;
}

.about-page-layout .post-header {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* Baleon-inspired content styling */
.content-main,
.content-main .post-content,
.content-main article {
  color: #1f2933;
  font: 400 18px/1.8 'Inter Tight', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

/* Post images: constrained width, consistent margins.
   :not([class]) ensures named images (about-page-image etc.) keep their own styles. */
.content-main article img:not([class]) {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
  border-radius: 6px;
}

.post-link,
.post-link:visited,
.post-link:hover,
.post-link:active {
  color: #111 !important;
}

.content-main h1,
.content-main h2,
.content-main h3,
.content-main h4,
.content-main h5,
.content-main h6 {
  color: #0f1720;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-top: 1.5rem;
  margin-bottom: 0.9rem;
}

.content-main h1 { font-size: 2.4rem; }
.content-main h2 { font-size: 2rem; }
.content-main h3 { font-size: 1.6rem; }
.content-main h4 { font-size: 1.3rem; }
.content-main h5 { font-size: 1.1rem; }
.content-main h6 { font-size: 1rem; }

.content-main p,
.content-main li,
.content-main td,
.content-main th {
  color: #2d3748;
}

.content-main a,
.content-main a:visited {
  color: #2563eb;
}

.content-main a:hover,
.content-main a:active {
  color: #1d4ed8 !important;
}

.content-main ul,
.content-main ol {
  margin: 0 0 1.25rem 1.5rem;
  padding: 0;
}

.content-main li {
  margin-bottom: 0.45rem;
}

.content-main blockquote {
  margin: 1.6rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid #2563eb;
  background: #f8fafc;
  color: #334155;
  font-style: normal;
}

.content-main table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  border: 1px solid #e2e8f0;
}

.content-main th,
.content-main td {
  border: 1px solid #e2e8f0;
  padding: 0.65rem 0.8rem;
  text-align: left;
}

.content-main th {
  background: #f8fafc;
  color: #0f1720;
  font-weight: 600;
}

.content-main pre,
.content-main code {
  border-radius: 6px;
}

.content-main pre {
  background: #0f172a;
  color: #e2e8f0;
  border: 0;
  padding: 0.95rem 1rem;
}

.content-main code {
  background: #f1f5f9;
  border: 0;
  color: #1e293b;
  padding: 0.1rem 0.35rem;
}

.content-main pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.content-main .note,
.content-main .tip,
.content-main .important,
.content-main .warning,
.content-main .caution {
  margin: 1.25rem 0;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  border: 1px solid transparent;
}

.content-main .note {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.content-main .tip {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.content-main .important {
  background: #fefce8;
  border-color: #fde68a;
}

.content-main .warning {
  background: #fff7ed;
  border-color: #fdba74;
}

.content-main .caution {
  background: #fef2f2;
  border-color: #fca5a5;
}

.showcase-section {
  margin-bottom: 1.25rem;
}

.showcase-titleline {
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
}

.content-main .projects-title {
  margin-bottom: 12px;
  font-family: "Inter Tight", Helvetica Neue, Helvetica, Arial, sans-serif;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: normal;
  color: var(--heading-font-color);
}

.showcase-separator {
  color: var(--heading-font-color);
}

.content-main .showcase-title {
  font-family: "Old Standard TT", "Times New Roman", Georgia, serif;
  font-style: italic;
  font-weight: normal;
  color: #707070 !important;
  margin: 0;
}

.content-main .post-list-heading {
  font-family: "Inter Tight", Helvetica Neue, Helvetica, Arial, sans-serif;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: normal;
  color: var(--heading-font-color);
}

.content-main .post-link,
.content-main .post-link:visited,
.content-main .post-link:hover,
.content-main .post-link:active {
  font-family: "Inter Tight", Helvetica Neue, Helvetica, Arial, sans-serif;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: normal;
  color: var(--heading-font-color) !important;
}

.content-main .home .post-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.content-main .home .post-list > li {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem;
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.content-main .home .post-list > li:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 32, 0.08);
  border-color: #d1d5db;
}

.content-main .home .post-list > li .post-meta {
  display: block;
  margin: 0 0 0.55rem;
  color: #6b7280;
  font-size: 0.9rem;
}

.content-main .home .post-list > li h3 {
  margin: 0;
}

.content-main .home .post-list > li .post-card-desc {
  margin: 0.65rem 0 0;
  color: #6b7280;
  font-size: 0.96rem;
  line-height: 1.55;
}

body.theme-dark {
  background-color: #000000 !important;
  color: #d4d4d4;
}

body.theme-dark {
  --heading-font-color: #d4d4d4;
}

body.theme-dark .site-title,
body.theme-dark .site-nav .page-link,
body.theme-dark .footer-meta p,
body.theme-dark .content-main,
body.theme-dark .content-main p,
body.theme-dark .content-main li,
body.theme-dark .content-main td,
body.theme-dark .content-main th,
body.theme-dark .content-main h1,
body.theme-dark .content-main h2,
body.theme-dark .content-main h3,
body.theme-dark .content-main h4,
body.theme-dark .content-main h5,
body.theme-dark .content-main h6 {
  color: #d4d4d4 !important;
}

body.theme-dark .content-main a,
body.theme-dark .content-main a:visited {
  color: #d4d4d4;
}

body.theme-dark .content-main a:hover,
body.theme-dark .content-main a:active {
  color: #f0f0f0 !important;
}


body.theme-dark .content-main blockquote,
body.theme-dark .content-main code,
body.theme-dark .content-main th {
  background: #252526;
  color: #918d8d;
  border-color: #3c3c3c;
}

body.theme-dark .content-main table,
body.theme-dark .content-main td,
body.theme-dark .content-main th {
  border-color: #3c3c3c;
}

body.theme-dark .content-main pre {
  background: #1e1e1e;
  color: #918d8d;
}

body.theme-dark .theme-toggle {
  color: #d4d4d4;
  border-color: #3c3c3c;
  background: #2d2d30;
}

body.theme-dark .theme-toggle:hover {
  background: #3e3e42;
}

body.theme-dark .content-sidebar,
body.theme-dark .about-sidebar-card {
  background-color: #000000;
}

body.theme-dark .about-sidebar-title,
body.theme-dark .about-sidebar-text,
body.theme-dark .about-sidebar-linkedin,
body.theme-dark .about-sidebar-linkedin:visited,
body.theme-dark .about-sidebar-linkedin:active,
body.theme-dark .about-sidebar-linkedin:focus {
  color: #d4d4d4 !important;
}

body.theme-dark .about-page-copy {
  color: #d4d4d4 !important;
}

body.theme-dark .content-main .showcase-title {
  color: #9e9e9e !important;
}

body.theme-dark .site-header {
  border-top-color: #1a1a1a;
  border-bottom-color: #1f1f1f;
}

/* Light mode: extend navbar bg across the full header width */
body:not(.theme-dark) .site-header {
  background-color: #f8f9fa;
}

body.theme-dark .navbar {
  background-color: #000000 !important;
}

body.theme-dark .navbar .navbar-brand,
body.theme-dark .navbar .nav-link {
  color: #ffffff !important;
}

body.theme-dark .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.navbar-toggler:focus {
  box-shadow: none !important;
  outline: none !important;
}

body.theme-dark .navbar-toggler-icon {
  filter: invert(1);
}

.navbar-nav .nav-item,
.navbar-nav .nav-link {
  text-align: center;
}

.navbar-nav .nav-item.d-flex {
  justify-content: center;
}

body.theme-dark .site-footer {
  border-top-color: #1f1f1f;
}

body.theme-dark #tag-filter-banner {
  color: #d4d4d4;
}

body.theme-dark #tag-filter-banner .btn-outline-secondary {
  color: #d4d4d4;
  border-color: #3c3c3c;
}

body.theme-dark #tag-filter-banner .btn-outline-secondary:hover {
  background: #2d2d30;
}

body.theme-dark .content-main .home .post-list > li {
  background: #1a1a1a;
  border-color: transparent;
}

body.theme-dark .content-main .home .post-list > li:hover {
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

body.theme-dark .content-main .home .post-list > li .post-meta {
  color: #a1a1aa;
}

body.theme-dark .content-main .home .post-list > li .post-card-desc {
  color: #a1a1aa;
}

body.theme-dark .content-main .blog-cards > li.post-card {
  background: #1a1a1a;
  border-color: transparent;
}

body.theme-dark .content-main .blog-cards > li.post-card:hover {
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

body.theme-dark .content-main .blog-cards > li.post-card .post-meta {
  color: #a1a1aa;
}

body.theme-dark .content-main .blog-cards > li.post-card .post-card-desc {
  color: #a1a1aa;
}

.footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.footer-meta p {
  margin: 0;
}

.footer-credit {
  font-size: 0.75rem;
  opacity: 0.55;
}

@media screen and (min-width: 1200px) {
  .site-header .container-fluid,
  .page-content .container-fluid,
  .site-footer .container-fluid {
    padding-left: 3rem !important;
    padding-right: 3rem !important;
  }

  .content-main {
    padding-left: 2.5rem;
  }

  /* Full-width variant never gets the sidebar indent */
  .content-main-full {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

@media screen and (max-width: 991.98px) {
  .content-sidebar {
    min-height: auto;
  }

  .content-main {
    padding: 1.25rem 0 0 0;
  }

  .content-main-full {
    padding-top: 0;
  }
}

@media screen and (min-width: 768px) {
  .content-main .home .post-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (min-width: 1200px) {
  .content-main .home .post-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

body.theme-dark .post-date,
body.theme-dark .post-tags,
body.theme-dark .post-tags strong {
  color: #d4d4d4 !important;
}
body.theme-dark .post-tags .badge.bg-secondary {
  background-color: #252526 !important;
  color: #d4d4d4 !important;
  border-color: #3c3c3c !important;
}

/* Footer Flex Layout - Corrected */
.footer-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  width: 100%;
}
.footer-left {
  order: 1;
  flex: 0 0 auto;
  text-align: left;
  min-width: 120px;
}
.footer-center {
  order: 2;
  flex: 1 1 0;
  text-align: center;
  min-width: 200px;
}
.footer-right {
  order: 3;
  flex: 0 0 auto;
  text-align: right;
  min-width: 120px;
}
.footer-tags {
  display: inline-block;
}
@media (max-width: 600px) {
  .footer-flex {
    flex-direction: column;
    align-items: stretch;
  }
  .footer-left {
    text-align: left;
    width: 100%;
    margin-bottom: 0.5em;
  }
  .footer-center {
    text-align: center;
    width: 100%;
    margin-bottom: 0.5em;
  }
  .footer-right {
    text-align: right;
    width: 100%;
    margin-bottom: 0.5em;
  }
}


/* ── Hero Section ─────────────────────────────────────────── */
/* Hero image is set via --hero-bg-image on the element in index.markdown
   using Jekyll's relative_url filter, so it works at any deploy path. */
.hero-section {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: 520px;
  background-image: var(--hero-bg-image);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
}

.hero-credit {
  position: absolute;
  bottom: 0;
  right: 0.4rem;
  margin-bottom: 7em;
  writing-mode: vertical-rl;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff !important;
  opacity: 0.4;
  white-space: nowrap;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}

.hero-titleline {
  position: relative;
  z-index: 1;
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  text-align: center;
}

.hero-projects-title {
  font-family: "Inter Tight", Helvetica Neue, Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 2.2rem;
  line-height: 1.3;
  letter-spacing: normal;
  color: #ffffff;
}

.hero-separator {
  color: rgba(255, 255, 255, 0.6);
  font-size: 2.2rem;
}

.hero-showcase-title {
  font-family: "Old Standard TT", "Times New Roman", Georgia, serif;
  font-style: italic;
  font-weight: normal;
  font-size: 2.2rem;
  color: rgba(255, 255, 255, 0.88);
}

/* Blinking cursor appended to whichever span is actively typing */
.typing-cursor::after {
  content: '|';
  display: inline-block;
  margin-left: 2px;
  font-style: normal;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.8);
  animation: blink-cursor 0.7s step-start infinite;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@media (max-width: 768px) {
  .hero-section {
    height: 260px;
    width: 100vw;
    margin-left: calc(50% - 50vw);
  }
  .hero-projects-title,
  .hero-separator,
  .hero-showcase-title {
    font-size: 1.4rem;
  }
  /* Mobile: horizontal, small font, fully opaque in light mode */
  .hero-credit {
    writing-mode: horizontal-tb;
    bottom: 0.4rem;
    right: 0.5rem;
    margin: 0;
    font-size: 0.5rem;
    opacity: 1;
  }

  /* Mobile dark mode: 50% transparent */
  body.theme-dark .hero-credit {
    opacity: 0.5;
  }
}

/* ── Warm Tag Colors ──────────────────────────────────────── */
.tag-badge.bg-primary   { background-color: #c2691a !important; color: #fff !important; }
.tag-badge.bg-secondary { background-color: #a0522d !important; color: #fff !important; }
.tag-badge.bg-success   { background-color: #b45309 !important; color: #fff !important; }
.tag-badge.bg-danger    { background-color: #9a3412 !important; color: #fff !important; }
.tag-badge.bg-warning   { background-color: #92400e !important; color: #fff !important; }
.tag-badge.bg-info      { background-color: #c07428 !important; color: #fff !important; }
.tag-badge.bg-dark      { background-color: #7c3a1e !important; color: #fff !important; }

body.theme-dark .tag-badge.bg-primary   { background-color: #d97706 !important; }
body.theme-dark .tag-badge.bg-secondary { background-color: #b45309 !important; }
body.theme-dark .tag-badge.bg-success   { background-color: #c2691a !important; }
body.theme-dark .tag-badge.bg-danger    { background-color: #a0522d !important; }
body.theme-dark .tag-badge.bg-warning   { background-color: #a16207 !important; }
body.theme-dark .tag-badge.bg-info      { background-color: #d4862a !important; }
body.theme-dark .tag-badge.bg-dark      { background-color: #92400e !important; }

/* ── Home About Section ───────────────────────────────────── */
.home-about-section {
  margin-bottom: 2rem;
}

.home-about-section .about-sidebar-card {
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  padding: 1.75rem 2rem;
  border-radius: 10px;
  min-height: unset;
}

.home-about-section .about-sidebar-image {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  align-self: center;
}

.home-about-section .about-sidebar-title {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.home-about-section .about-text-block {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.home-about-section .about-sidebar-linkedin {
  margin-top: 0.5rem;
  align-self: flex-start;
}

@media (max-width: 600px) {
  .home-about-section .about-sidebar-card {
    flex-direction: column;
    text-align: center;
  }
  .home-about-section .about-sidebar-linkedin {
    align-self: center;
  }
}


/* ── Force white text in about section (dark mode) ── */
.home-about-section .about-sidebar-title,
.home-about-section .about-sidebar-text,
.home-about-section .about-sidebar-linkedin,
.home-about-section .about-sidebar-linkedin:visited,
.home-about-section .about-sidebar-linkedin:active,
.home-about-section .about-sidebar-linkedin:focus {
  color: #fdfdfd !important;
}

/* ── Light mode about section ── */
body:not(.theme-dark) .home-about-section .about-sidebar-card {
  background-color: #ffffff !important;
}

body:not(.theme-dark) .home-about-section .about-sidebar-title,
body:not(.theme-dark) .home-about-section .about-sidebar-text {
  color: #6b7280 !important;
}

body:not(.theme-dark) .home-about-section .about-sidebar-linkedin,
body:not(.theme-dark) .home-about-section .about-sidebar-linkedin:visited,
body:not(.theme-dark) .home-about-section .about-sidebar-linkedin:active,
body:not(.theme-dark) .home-about-section .about-sidebar-linkedin:focus {
  color: cornflowerblue !important;
}

body:not(.theme-dark) .home-about-section .about-sidebar-linkedin:hover {
  color: #4169e1 !important;
}

/* ── Homepage: hero extends behind navbar ─────────────────── */
body.home-page .site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent !important;
  border: none !important;
}

body.home-page .site-header .navbar {
  background: transparent !important;
}

body.home-page .site-header .navbar .navbar-brand,
body.home-page .site-header .navbar .nav-link,
body.home-page .site-header .navbar .navbar-toggler-icon,
body.home-page .site-header .navbar #theme-toggle {
  color: #ffffff !important;
  filter: brightness(0) invert(1);
}

body.home-page .site-header .navbar .navbar-toggler {
  border-color: rgba(255,255,255,0.4) !important;
}

body.home-page .page-content {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

body.home-page .hero-section {
  margin-top: 0;
  padding-top: 0;
}

/* Light mode: subtle dark scrim on top only for text legibility */
body.home-page .hero-overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.40) 0%,
    rgba(0, 0, 0, 0.10) 40%,
    rgba(0, 0, 0, 0.00) 65%
  );
}

/* Dark mode: dark overlay + gradient fades to black */
body.home-page.theme-dark .hero-overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.35) 40%,
    rgba(0, 0, 0, 0.65) 75%,
    rgba(0, 0, 0, 1.00) 100%
  );
}

/* ── Mobile Nav: Hamburger → X & Backdrop ────────────────── */
.hamburger-btn {
  border: none !important;
  background: transparent !important;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: none !important;
}

.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #111;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

/* X state */
.hamburger-btn.is-open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-btn.is-open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger-btn.is-open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Always white when open (over black backdrop) */
.hamburger-btn.is-open .hamburger-line {
  background-color: #ffffff !important;
}

/* White lines on homepage (over hero image) */
body.home-page .hamburger-line {
  background-color: #ffffff;
}

/* Dark mode */
body.theme-dark .hamburger-line {
  background-color: #ffffff;
}

/* Backdrop */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, background 0.35s ease;
}
.nav-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Light mode: white backdrop */
body:not(.theme-dark) .nav-backdrop.is-visible {
  background: #fdfdfd;
}

/* ── Mobile menu open: navbar above backdrop, white text ──── */
.site-header {
  position: relative;
  z-index: 100;
}

/* Navbar must sit above the backdrop (z-index 99) within the header stacking context */
.navbar {
  position: relative;
  z-index: 101;
}

/* ── Nav open: transparent bg, white text ────────────────── */
.navbar.nav-open,
.navbar.nav-open .navbar-collapse,
#navbarNav.show {
  background: transparent !important;
  box-shadow: none !important;
}

.navbar.nav-open .nav-link,
.navbar.nav-open .navbar-brand,
.navbar.nav-open #navbarNav .nav-link,
#navbarNav.show .nav-link,
#navbarNav.show a.nav-link {
  color: #ffffff !important;
}

/* Ensure the brand stays white and the toggler focus outline is invisible */
.navbar.nav-open .navbar-toggler:focus {
  box-shadow: none;
}

/* Theme toggle icon white and always clickable above the backdrop */
.navbar.nav-open #theme-toggle,
.navbar.nav-open #theme-toggle .bi {
  color: #ffffff !important;
}

/* Light mode overrides: dark text and lines on white backdrop */
body:not(.theme-dark) .navbar.nav-open .nav-link,
body:not(.theme-dark) .navbar.nav-open .navbar-brand,
body:not(.theme-dark) #navbarNav.show .nav-link,
body:not(.theme-dark) .navbar.nav-open #theme-toggle,
body:not(.theme-dark) .navbar.nav-open #theme-toggle .bi {
  color: #111111 !important;
  filter: none !important;
}

body:not(.theme-dark) .hamburger-btn.is-open .hamburger-line {
  background-color: #111111 !important;
}

/* Home page: toggle sits over dark hero, must be white */
body.home-page #theme-toggle {
  position: relative;
  z-index: 110;
  color: #ffffff !important;
}

/* Non-home light mode: match nav-link color */
body:not(.home-page):not(.theme-dark) #theme-toggle {
  color: rgba(0, 0, 0, 0.55) !important;
}

/* Non-home dark mode: match dark nav-link color */
body:not(.home-page).theme-dark #theme-toggle {
  color: #ffffff !important;
}

/* ── RSS Link: match LinkedIn link colors ─────────────────── */
.footer-rss a,
.footer-rss a:visited {
  color: cornflowerblue !important;
}

.footer-rss a:hover,
.footer-rss a:active {
  color: #4169e1 !important;
}

body.theme-dark .footer-rss a,
body.theme-dark .footer-rss a:visited {
  color: #d4d4d4 !important;
}

body.theme-dark .footer-rss a:hover,
body.theme-dark .footer-rss a:active {
  color: #f0f0f0 !important;
}

body.theme-dark .about-sidebar-linkedin:hover {
  color: #60a5fa !important;
}

/* ── Subtle dot-grid texture (light mode, non-home pages) ─── */
body:not(.theme-dark):not(.home-page) {
  background-image:
    linear-gradient(
      to bottom,
      rgba(253, 253, 253, 0)   0,
      rgba(253, 253, 253, 0) 420px,
      rgba(253, 253, 253, 1) 520px,
      rgba(253, 253, 253, 1) 100%
    ),
    radial-gradient(circle, rgba(0, 0, 0, 0.12) 1px, transparent 1px);
  background-size: 100% 100%, 24px 24px;
}

/* ── Subtle dot-grid texture (dark mode, non-home pages) ──── */
body.theme-dark:not(.home-page) {
  background-image:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0)   0,
      rgba(0, 0, 0, 0) 420px,
      rgba(0, 0, 0, 1) 520px,
      rgba(0, 0, 0, 1) 100%
    ),
    radial-gradient(circle, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
  background-size: 100% 100%, 24px 24px;
}


/* -- Post figure + photo credit --------------------------- */
.post-figure {
  margin: 1.5rem auto;
  display: block;
  position: relative;
}

.post-figure img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 6px;
}

.post-photo-credit {
  position: absolute;
  bottom: 0.4rem;
  right: 0.4rem;
  writing-mode: vertical-rl;
  font-size: 0.6rem;
  color: #fff;
  opacity: 0.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 2;
}
