/* Blog index — Zerodha.tech content layout + site topbar. */

* {
  box-sizing: border-box;
}

html,
body.blog-page {
  margin: 0;
  padding: 0;
}

body.blog-page {
  background: #f0f0f0;
  font-family: Inter, sans-serif;
  font-weight: 300;
  color: #141414;
  line-height: 1.6em;
  font-size: 18px;
}

/* Scope link styles to blog content only — do not override .topbar */
.blog-page .page-hero a,
.blog-page .posts a {
  color: #000;
  text-decoration: none;
  word-break: break-word;
  transition: color 0.2s;
}

.blog-page .page-hero a:hover,
.blog-page .posts a:hover {
  color: #035aa6;
}

.blog-page strong {
  font-weight: 600;
}

.blog-page h1,
.blog-page h2,
.blog-page h3 {
  font-weight: 400;
  line-height: 1.3;
  margin: 45px 0 20px;
}

.blog-page h1 {
  font-size: 2.75rem;
}

.blog-page h3 {
  font-size: 1.6rem;
}

.blog-page .wrap {
  margin: 0 auto;
  padding: 30px 75px 60px;
}

.blog-page .container {
  max-width: 950px;
  min-width: 320px;
}

.blog-page .page-hero {
  background-color: #e2e2d7;
}

.blog-page .page-hero .wrap {
  padding-top: 24px;
  padding-bottom: 36px;
}

.blog-page .page-hero--bottom .wrap {
  max-width: min(1320px, 100%);
  width: 100%;
  padding-top: clamp(1.5rem, 2.5vw, 2.25rem);
  padding-bottom: clamp(1.65rem, 2.8vw, 2.5rem);
  padding-left: clamp(1.25rem, 4vw, 3.5rem);
  padding-right: clamp(1.25rem, 4vw, 3.5rem);
}

.blog-page h1.intro,
.blog-page p.intro {
  margin: 56px 0 48px;
  font-weight: 300;
  font-size: 2.75rem;
  line-height: 1.3;
  color: inherit;
}

.blog-page .page-hero--bottom .intro {
  margin: 0 auto;
  max-width: none;
  width: 100%;
  font-size: clamp(1.2rem, 0.95rem + 0.9vw, 1.625rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.01em;
  text-align: center;
  text-wrap: balance;
}

.blog-page .page-hero--bottom .container {
  max-width: min(1320px, 100%);
  width: 100%;
}

.blog-page .blog-posts-wrap {
  max-width: min(1320px, 100%);
  width: 100%;
  /* Use half of the previous side padding so the tile expands into leftover space */
  padding-left: clamp(1rem, 2.2vw, 2.35rem);
  padding-right: clamp(1rem, 2.2vw, 2.35rem);
  padding-top: clamp(1.25rem, 2.5vw, 2rem);
}

.blog-page .intro .bold {
  font-weight: 500;
}

.blog-page .intro .highlight {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  padding-bottom: 12px;
}

/* Bottom hero: let the line wrap naturally across the full band */
.blog-page .page-hero--bottom .intro .highlight {
  display: inline;
  white-space: normal;
  padding-bottom: 0;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  border-bottom: 0.28em solid;
  border-image: linear-gradient(to right, #4184f3, #4eaf52) 1;
}

.blog-page .page-hero--bottom .intro .highlight::after {
  display: none;
}

.blog-page .intro .highlight::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 8px;
  background: linear-gradient(to right, #4184f3, #4eaf52);
}

.blog-page .posts {
  display: block;
  margin: 0 auto 48px;
  max-width: none;
  width: 100%;
}

.blog-page .blog-kit-panel {
  margin: 0;
  animation: none;
  width: 100%;
  /* Match Resume Summary (experience) rhythm + type scale */
  --surface-panel-padding: clamp(1.4rem, 3.2vw, 2.1rem);
  --role-list-gap: clamp(0.5rem, 1vw, 0.75rem);
  --role-title-list-gap: calc(clamp(0.65rem, 1.2vw, 0.9rem) * 1.25);
  --role-section-title-size: var(--kit-fs-title);
  --role-body-size: var(--kit-fs-body);
}

.blog-page .blog-kit-panel .kit-panel-header__placement {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  text-wrap: balance;
}

.blog-page .blog-kit-panel .kit-surface-panel__body.kit-role-detail > .kit-basics__guide:first-child {
  margin-top: 0;
}

.blog-page .blog-kit-panel .kit-surface-panel__body.kit-role-detail > .kit-basics__guide + .kit-role-detail__sections {
  padding-top: 1.55em;
}

/* Posts list — same section stack as “Where they’ll press” / “Matching this role” */
.blog-page .blog-kit-panel .kit-basics {
  padding-top: 0;
  gap: 0;
}

.blog-page .blog-kit-panel .blog-kit-list {
  gap: 0;
}

.blog-page .blog-kit-panel .kit-basics__card {
  /* Title → first content line (same as heading → “High-density…”) */
  gap: var(--role-title-list-gap);
}

.blog-page .blog-kit-panel .kit-basics__details-summary,
.blog-page .blog-kit-panel .kit-basics__question-text {
  font-family: var(--font-body);
  font-size: var(--role-body-size, var(--kit-fs-body));
  font-weight: var(--font-regular, 400);
  line-height: 1.65;
  letter-spacing: -0.01em;
}

.blog-page .blog-kit-panel .kit-basics__card:not(:last-child) {
  padding-bottom: 0;
  border-bottom: none;
}

.blog-page .blog-kit-panel .kit-basics__card + .kit-basics__card {
  margin-top: var(--role-rule-before, calc(clamp(0.7rem, 1.4vw, 1rem) + 0.55rem + 1.35em));
  padding-top: var(--role-rule-after, clamp(0.7rem, 1.4vw, 1rem));
  border-top: 1px solid var(
    --surface-border,
    var(--kit-tile-hairline, color-mix(in srgb, var(--surface-fg, #424242) 22%, transparent))
  );
}

/* Question titles = kit-role-detail__title (“Where they’ll press”) */
.blog-page .blog-kit-panel .blog-kit-question,
.blog-page .blog-kit-panel .kit-role-detail__title.blog-kit-question {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--role-section-title-size, var(--kit-fs-title));
  font-weight: var(--font-medium, 500);
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
  text-align: left;
  color: var(--kit-font-content-heading, var(--role-fg, #141414));
  text-wrap: pretty;
}

.blog-page .blog-kit-panel .kit-basics__card-head-main .blog-kit-question {
  flex: 1 1 12rem;
  min-width: 0;
}

.blog-page .blog-kit-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5ch;
  min-height: 1.4em;
  font-size: 0;
  line-height: 0;
  color: transparent;
}

.blog-page .blog-kit-dot::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: currentColor;
  color: var(--role-muted, #6b6b6b);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--role-muted, #6b6b6b) 35%, transparent);
}

.blog-page .blog-kit-posted {
  display: inline-block;
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--kit-fs-sm, 0.75rem);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--role-muted, #888);
  white-space: nowrap;
}

/* Answers = kit-role-detail__text (“High-density hyperscale…”) */
.blog-page .blog-kit-answer {
  display: flex;
  flex-direction: column;
  gap: var(--role-list-gap, clamp(0.5rem, 1vw, 0.75rem));
  width: 100%;
}

.blog-page .blog-kit-answer > p:not(.blog-kit-inline-cta) {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--role-body-size, var(--kit-fs-body));
  font-weight: var(--font-regular, 400);
  line-height: 1.65;
  letter-spacing: -0.01em;
  color: var(--kit-font-content-body, var(--role-muted, #5c5c5c));
  overflow-wrap: break-word;
}

.blog-page .blog-kit-answer > p strong {
  font-weight: var(--font-medium, 500);
  color: var(--kit-font-content-heading, var(--role-fg, #141414));
}

.blog-page .blog-kit-answer__lead {
  font-size: inherit;
}

[data-theme="dark"] .blog-page .blog-kit-answer > p:not(.blog-kit-inline-cta) {
  color: var(--kit-font-content-body, var(--role-muted, #b0b0b0));
}

[data-theme="dark"] .blog-page .blog-kit-answer > p strong {
  color: var(--kit-font-content-heading, var(--role-fg, #e8e8e8));
}

.blog-page .blog-kit-answer .post__section-title {
  color: var(--role-muted, #888);
}

.blog-page .blog-kit-answer .post__short,
.blog-page .blog-kit-answer .post__section p {
  margin: 0;
  color: var(--color-body, #0a0a0a);
  line-height: 1.5;
}

[data-theme="dark"] .blog-page .blog-kit-answer .post__short,
[data-theme="dark"] .blog-page .blog-kit-answer .post__section p {
  color: var(--color-body, #e8e8e8);
}

.blog-page .blog-kit-inline-cta {
  margin: 0.85rem 0 0;
}

.blog-page .blog-kit-inline-cta a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-body);
  font-size: var(--kit-fs-body);
  font-weight: 500;
  color: #141414;
  text-decoration: none;
}

.blog-page .blog-kit-inline-cta a::after {
  content: "→";
  font-weight: 400;
}

.blog-page .blog-kit-inline-cta a:hover {
  color: #035aa6;
}

[data-theme="dark"] .blog-page .blog-kit-inline-cta a {
  color: #e8e8e8;
}

[data-theme="dark"] .blog-page .blog-kit-inline-cta a:hover {
  color: #7eb6ff;
}

.blog-page .posts .post {
  margin: 32px auto;
}

.blog-page .post.blurb .post-header {
  margin: 0 0 15px;
}

.blog-page .post.blurb .title {
  margin: 0;
}

.blog-page .post.blurb .description {
  margin: 0;
}

.blog-page .post--rich .post-content {
  display: grid;
  gap: 14px;
}

.blog-page .post__short {
  margin: 0;
}

.blog-page .post__section {
  display: grid;
  gap: 6px;
}

.blog-page .post__section-title {
  margin: 0;
  font-size: 0.74em;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
}

.blog-page .post__section p {
  margin: 0;
}

.blog-page .post__cta {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 0.35rem;
  margin-top: 2px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-weight: 500;
  color: #141414;
}

.blog-page .post__cta::after {
  content: "→";
  font-weight: 400;
}

.blog-page .post__cta:hover {
  color: #141414;
  background: transparent;
}

[data-theme="dark"] .blog-page .post__cta {
  color: #e8e8e8;
}

[data-theme="dark"] .blog-page .post__cta:hover {
  color: #e8e8e8;
}

.blog-page .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid #c5c5c5;
  margin: 18px 0 80px;
  padding-top: 18px;
}

.blog-page .meta .tag {
  margin: 0;
  font-size: 0.875em;
  color: #888;
  font-weight: 400;
}

.blog-page .post.blurb .date {
  color: #888;
  font-size: 0.875em;
  margin: 0;
  white-space: nowrap;
}

@media (max-width: 940px) {
  .blog-page .wrap {
    padding: 30px;
  }

  .blog-page .posts .post {
    margin-bottom: 60px;
  }
}

@media (max-width: 550px) {
  body.blog-page {
    font-size: 15px;
    line-height: 1.55;
  }

  .blog-page h1 {
    font-size: 1.45rem;
  }

  .blog-page h3 {
    font-size: 1.15rem;
  }

  .blog-page h1,
  .blog-page h2,
  .blog-page h3 {
    margin: 24px 0 12px;
  }

  .blog-page .wrap {
    padding: 16px 16px 36px;
  }

  .blog-page .container {
    min-width: 0;
  }

  .blog-page h1.intro,
  .blog-page p.intro {
    margin: 36px 0 28px;
    line-height: 1.35;
  }

  .blog-page .page-hero--bottom .wrap {
    padding-top: 1.35rem;
    padding-bottom: 1.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .blog-page .page-hero--bottom .intro {
    margin: 0;
    font-size: clamp(1.05rem, 0.9rem + 1.6vw, 1.25rem);
    line-height: 1.4;
  }

  .blog-page .intro .highlight {
    display: inline;
    white-space: normal;
    padding-bottom: 0;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    border-bottom: 4px solid;
    border-image: linear-gradient(to right, #4184f3, #4eaf52) 1;
  }

  .blog-page .intro .highlight::after {
    display: none;
  }

  .blog-page .posts .blog-kit-panel {
    margin: 0;
  }

  .blog-page .blog-posts-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .blog-page .post.blurb .post-header {
    margin: 0 0 10px;
  }

  .blog-page .post--rich .post-content {
    gap: 10px;
  }

  .blog-page .post__section {
    gap: 4px;
  }

  .blog-page .post__section-title {
    font-size: 0.68em;
    letter-spacing: 0.06em;
  }

  .blog-page .post__cta {
    font-size: 0.92em;
  }

  .blog-page .meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    margin: 14px 0 44px;
    padding-top: 12px;
  }

  .blog-page .meta .tag,
  .blog-page .post.blurb .date {
    font-size: 0.8em;
  }
}
