

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

header #theme-toggle {
  margin-left: 1rem;
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
}

/* === Shared Footer Styles (JS-injected) === */
.site-footer {
  padding: 2rem 1rem;
  border-top: 1px solid #e5e7eb;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}
.site-footer .container {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}
.site-footer p {
  margin: 0 0 .5rem 0;
  font-size: .95rem;
}
.site-footer .footer-nav a {
  text-decoration: none;
  margin: 0 .5rem;
  font-size: .95rem;
}
.site-footer .footer-nav a:hover {
  text-decoration: underline;
}
.site-footer .footer-nav span {
  color: #9ca3af;
  margin: 0 .25rem;
}


/* === Center Footer Social Icons === */
.footer-social {
  margin-top: 0.75rem;
  font-size: 1.25rem;
  text-align: center;
}
.footer-social a {
  margin: 0 0.5rem;
  color: inherit;
}
.footer-social a:hover {
  color: #2563eb; /* Tailwind blue-600 */
}/* === Footer Social Icons Enhanced === */
.footer-social {
  margin-top: 0.75rem;
  font-size: 1.5rem; /* enlarged */
  text-align: center;
}
.footer-social a {
  margin: 0 0.75rem;
  color: inherit;
  display: inline-block;
  transition: transform 0.2s ease, color 0.2s ease;
}
.footer-social a:hover {
  color: #2563eb; /* Tailwind blue-600 */
  transform: scale(1.2);
}/* Tailwind blue-600 */
}


/* === Custom Footer Tooltips === */
.footer-social .has-tooltip {
  position: relative;
}
.footer-social .has-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(17, 24, 39, 0.95); /* gray-900 */
  color: #fff;
  white-space: nowrap;
  font-size: 0.8rem;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 6px 14px rgba(0,0,0,0.18);
}
.footer-social .has-tooltip::before {
  content: "";
  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  border-width: 6px;
  border-style: solid;
  border-color: rgba(17, 24, 39, 0.95) transparent transparent transparent;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.footer-social .has-tooltip:hover::after,
.footer-social .has-tooltip:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* === Added by ChatGPT on 2025-08-29: tighten article size and add spacing === */
:where(article){
  /* Slightly reduce overall size inside each article */
  font-size: 0.95em;
  /* Add some internal breathing room (not too much) */
  padding: 0.75rem;
  /* Provide vertical and horizontal spacing between articles */
  margin: 1.25rem;
  box-sizing: border-box;
}

/* If the page uses any grid or masonry layout, the margin above creates horizontal gaps. */
:where(article) + :where(article){
  margin-top: 2rem;
}

/* Ensure images inside articles don’t dominate height */
:where(article) img{
  max-width: 100%;
  height: auto;
  display: block;
}

/* On wider screens, give a touch more separation */
@media (min-width: 768px){
  :where(article){
    margin: 1.5rem;
    padding: 0.75rem;
    font-size: 0.94em;
  }
}

/* If there is an articles/posts grid container, increase gaps by leveraging article margin */
:where(.articles) :where(article),
:where(.posts) :where(article),
:where([class*="grid"]) :where(article){
  margin: 1.5rem;
}
/* === End overrides === */

/* === Added by ChatGPT on 2025-08-29: smaller badges so they fit in one row === */
:where(.badge){
  font-size: 0.75rem;   /* smaller text */
  padding: 0.25rem 0.5rem;
  margin: 0.2rem;
  white-space: nowrap;
}
:where(.badge) + :where(.badge){
  margin-left: 0.4rem;
}
/* === End overrides === */


/* === ChatGPT update: keep header fixed and Home visible on mobile (2025-09-01) === */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: var(--surface, #ffffff);
  /* subtle shadow for separation */
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* ensure body content doesn't hide behind fixed header */
:root {
  --header-height: 56px;
}
@media (min-width: 768px){
  :root { --header-height: 64px; }
}
body {
  padding-top: var(--header-height);
}

/* nav layout: keep items in one row and allow horizontal scroll on very small screens */
header .nav {
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow: hidden; /* contain */
}

header .nav .brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-right: .25rem;
  flex: 0 0 auto;
}

header .nav .menu {
  display: flex;
  align-items: center;
  gap: .75rem;
  white-space: nowrap;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}
header .nav .menu::-webkit-scrollbar { display: none; }

/* Make sure links don't wrap and the 'Home' link stays flush left */
header .nav .menu a {
  text-decoration: none;
  flex: 0 0 auto;
  padding: .35rem .5rem;
  border-radius: .5rem;
}

/* keep the first link (Home) always visible by giving the menu its own scroll area to the right */
@media (max-width: 640px){
  header .nav {
    padding-right: .5rem;
  }
  header .nav .menu {
    margin-left: auto; /* brand on left, menu takes remaining space */
  }
}

/* Optional: keep theme toggle aligned without overlapping header */
#theme-toggle {
  position: fixed;
  top: .5rem;
  right: .5rem;
  z-index: 1100;
}
/* === End ChatGPT update === */


/* === Mobile Image Centering Fix === */
@media (max-width: 768px) {
  img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 90%;
    height: auto;
  }
}


/* === ChatGPT: Mobile image centering & responsiveness (2025-09-03) === */
@media (max-width: 768px) {
  /* Ensure containers for images center their contents */
  picture, figure, .image, .image-wrap, .post-image, .media, .thumb {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  /* Center all images and prevent overflow */
  picture img,
  figure img,
  :where(article) img,
  img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    height: auto;
    max-width: 100%;
  }
}



/* === ChatGPT: Force hero profile image to center in all browsers (2025-09-03) === */
.hero img[src*="AkshayProfile"] {
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.pdf-viewer {
  width: 100%;
  aspect-ratio: 8.5 / 11; /* standard letter page */
  border: none;
}