/*-- -------------------------- -->
<---        Core Styles         -->
<--- -------------------------- -*/
/* Mobile - 360px */
@media only screen and (min-width: 0em) {
  /* No font-size here: root.css scales html/body to 18-20px above 1400px, and
     this file loads after it. Resetting font-size pinned the blog back to 16px
     while every other page scaled up. */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  /* Matches the shared container in local.css (--pageMax / --pageGutter) so
     the blog's edges line up with every other page. The starter shipped its
     own 94% / 70em values, which sat inside the site's width. */
  .blog-container {
    width: 100%;
    max-width: var(--pageMax, 82.5rem);
    margin-inline: auto;
    padding-inline: var(--pageGutter, clamp(1rem, 3vw, 2.5rem));
    box-sizing: border-box;
  }
  .blog-link {
    font-size: 1rem;
    /* 46px - 56px */
    line-height: clamp(2.875em, 5.5vw, 3.5em);
    text-decoration: none;
    font-weight: 700;
    text-align: center;
    margin: auto;
    color: #fff;
    min-width: 9.375rem;
    padding: 0 1.5rem;
    background-color: var(--headerColor);
    border-radius: 0.25rem;
    display: inline-block;
    position: relative;
    /* prevents padding from adding to the width */
    box-sizing: border-box;
    z-index: 1;
    transition: color 0.3s;
  }
  .blog-link:before {
    content: "";
    position: absolute;
    height: 100%;
    width: 100%;
    background: #fff;
    opacity: 0;
    top: 0;
    left: 0;
    box-sizing: border-box;
    border-radius: 0.25rem;
    transition: opacity 0.3s;
    border: 1px solid var(--headerColor);
    z-index: -1;
  }
  .blog-link:hover {
    color: var(--headerColor);
  }
  .blog-link:hover:before {
    opacity: 1;
  }
}
/*-- -------------------------- -->
<---           Header           -->
<--- -------------------------- -*/
/* Mobile - 360px */
@media only screen and (min-width: 0em) {
  #header {
    position: relative;
    z-index: 1;
  }
  #header .blog-container {
    padding: clamp(100px, 14vw, 200px) 0 clamp(50px, 11vw, 100px);
  }
  #header .blog-header {
    font-size: clamp(24px, 4vw, 48px);
    color: #fff;
    font-weight: 700;
    line-height: 1.2em;
    margin: 0;
    width: 100%;
    text-align: left;
  }
  #header .blog-bg {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
  }
  #header .blog-bg:before {
    /* color overlay */
    content: "";
    width: 100%;
    height: 100%;
    background: #000;
    opacity: 0.6;
    position: absolute;
    display: block;
    top: 0;
    left: 0;
    z-index: 1;
  }
  #header .blog-bg img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
  }
}
/* #int-hero is styled in root.css/local.css for every page. The starter's
   duplicate block lived here and overrode it on blog pages only. */

/*-- -------------------------- -->
<---        Main Content        -->
<--- -------------------------- -*/
/* Mobile - 360px */
@media only screen and (min-width: 0em) {
  /* Vertical rhythm only — the width and gutter are set above. Matches the
     padding-block every other section carries. */
  .blog-container {
    padding-block: var(--sectionY, clamp(4rem, 8vw, 7rem));
  }
  .blog-empty {
    font-size: var(--bodyFontSize);
    color: var(--bodyTextColor);
    text-align: center;
  }
  body.dark-mode .blog-empty {
    color: #a9b0ac;
  }
  .main-content-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    row-gap: 3.125em;
  }
  .main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    row-gap: 3.125em;
    width: 100%;
  }
}
/* Tablet - 1024px */
@media only screen and (min-width: 64em) {
  .main-content-wrapper {
    flex-direction: row;
    align-items: flex-start;
    column-gap: 1.25em;
  }
}
/*-- -------------------------- -->
<---    Recent Blog Articles    -->
<--- -------------------------- -*/
/* Mobile - 360px */
@media only screen and (min-width: 0em) {
  /* The card itself is the <a>, so the whole surface is the click target. */
  .recent-articles {
    overflow: hidden;
    max-width: 49.6875em;
    flex: none;
    width: 100%;
    display: block;
    text-decoration: none;
    border-radius: 0.5em;
    transition:
      transform 0.3s,
      box-shadow 0.3s;
  }
  .recent-articles:hover {
    transform: translateY(-0.25rem);
    box-shadow: 0 12px 28px -10px rgba(var(--primaryRGB), 0.45);
  }
  .recent-articles:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
  }
  @media (prefers-reduced-motion: reduce) {
    .recent-articles,
    .recent-articles .blog-mainImage img {
      transition: none;
    }
    .recent-articles:hover {
      transform: none;
    }
  }
  .recent-articles .blog-mainImage {
    width: 100%;
    height: clamp(200px, 28vw, 320px);
    position: relative;
    display: block;
    border-radius: 0.5em 0.5em 0 0;
    overflow: hidden;
  }
  .recent-articles .blog-mainImage img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.4s;
  }
  .recent-articles:hover .blog-mainImage img {
    transform: scale(1.04);
  }
  .recent-articles .article-group {
    padding: clamp(30px, 5vw, 50px);
    border: 1px solid #e3e8e5;
    border-top: none;
    border-radius: 0 0 0.5em 0.5em;
    background-color: #fff;
    transition: border-color 0.3s;
  }
  .recent-articles:hover .article-group {
    border-color: rgba(var(--primaryRGB), 0.35);
  }
  .recent-articles .blog-author-img {
    width: 2em;
    height: 2em;
    position: relative;
    display: block;
    border-radius: 50%;
    overflow: hidden;
    flex: none;
  }
  .recent-articles .blog-author-img img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    /* contain by default so the icon is not cropped; an uploaded photo fills
       the circle instead via .has-photo */
    object-fit: contain;
  }
  .recent-articles .blog-author-img.has-photo img {
    object-fit: cover;
  }
  .recent-articles .blog-authorGroup {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    /* Row gap applies once the date wraps below the author on narrow cards. */
    gap: 0.5rem 0.625rem;
    flex-wrap: wrap;
  }
  .recent-articles .blog-author,
  .recent-articles .blog-date {
    font-size: 0.875rem;
    color: var(--bodyTextColor);
    line-height: 1.5em;
    /* Without this the flex row squeezes them into two-line wraps instead of
       letting the group wrap as a whole. */
    white-space: nowrap;
  }
  .recent-articles .blog-dot {
    width: 3px;
    height: 3px;
    background-color: var(--primary);
    border-radius: 50%;
    display: block;
    flex: none;
  }
  .recent-articles .blog-h1 {
    font-size: clamp(20px, 5vw, 32px);
    line-height: 1.4em;
    font-weight: 700;
    margin: 1rem 0;
    color: var(--headerColor);
    transition: color 0.3s;
  }
  .recent-articles .blog-desc {
    font-size: 1rem;
    line-height: 1.5em;
    margin: 1rem 0 0;
    color: var(--bodyTextColor);
  }
  /* The card title carries the affordance now — the whole card is the link,
     so there is no "Continue Reading" button to style. */
  .recent-articles:hover .blog-h1 {
    color: var(--primary);
  }
}
/* Mobile - 1024px */
@media only screen and (min-width: 64em) {
  .recent-articles .blog-h1 {
    max-width: 31.25rem;
  }
}
/* Dark Mode */
@media only screen and (min-width: 0em) {
  body.dark-mode .recent-articles .article-group {
    background-color: var(--medium);
    border-color: #2c322f;
  }
  body.dark-mode .recent-articles:hover .article-group {
    border-color: rgba(var(--primaryRGB), 0.5);
  }
  body.dark-mode .recent-articles .blog-h1,
  body.dark-mode .recent-articles .blog-author,
  body.dark-mode .recent-articles .blog-date {
    color: #f7f7f7;
  }
  /* Lighter than the heading so the hierarchy survives on a dark card. */
  body.dark-mode .recent-articles .blog-desc {
    color: #a9b0ac;
  }
  /* The dark surface makes #2f6b4f too low-contrast; lift it for hover. */
  body.dark-mode .recent-articles:hover .blog-h1 {
    color: #6aa886;
  }
  body.dark-mode .blog-sidebar .feature-h3,
  body.dark-mode .blog-sidebar .feature-date,
  body.dark-mode .blog-sidebar .blog-header {
    color: #f7f7f7;
  }
  body.dark-mode .blog-sidebar .blog-header:after {
    background: var(--primary);
  }
  body.dark-mode .blog-article .blog-h1,
  body.dark-mode .blog-article .blog-author,
  body.dark-mode .blog-article .blog-date {
    color: #f7f7f7;
  }
  body.dark-mode .blog-article #blog-content h2,
  body.dark-mode .blog-article #blog-content h3,
  body.dark-mode .blog-article #blog-content h4,
  body.dark-mode .blog-article #blog-content h5,
  body.dark-mode .blog-article #blog-content h6 {
    color: #f7f7f7;
  }
  body.dark-mode .blog-article #blog-content p,
  body.dark-mode .blog-article #blog-content li {
    color: #f7f7f7;
    opacity: 0.8;
  }
  body.dark-mode .blog-article #blog-content a {
    color: #9dafe5;
  }
}
/*-- -------------------------- -->
<---          Sidebar           -->
<--- -------------------------- -*/
/* Mobile - 360px */
@media only screen and (min-width: 0em) {
  .blog-sidebar {
    max-width: 49.6875em;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    box-sizing: border-box;
    row-gap: 3.125em;
  }
  .blog-sidebar .blog-featured-group {
    padding: 2.1875em 1.875em;
    border: 1px solid #ebebeb;
    border-radius: 0.5em;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    width: 100%;
  }
  .blog-sidebar .blog-header {
    display: block;
    font-size: 1.25em;
    color: var(--headerColor);
    font-weight: bold;
    text-align: center;
    position: relative;
    margin-bottom: 1.875rem;
  }
  .blog-sidebar .blog-header:after {
    content: "";
    position: relative;
    display: block;
    width: 3.125rem;
    height: 3px;
    background: var(--headerColor);
    border-radius: 0.25rem;
    margin: 1rem auto;
  }
  .blog-sidebar .blog-feature {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    column-gap: 1.5em;
    width: 100%;
    text-decoration: none;
    padding: 1.25rem 0;
    border-bottom: 1px solid #ebebeb;
  }
  .blog-sidebar .blog-feature:nth-of-type(1) {
    padding-top: 0;
  }
  .blog-sidebar .blog-feature:last-of-type {
    padding-bottom: 0;
    border: none;
  }
  .blog-sidebar .blog-featureImage {
    display: block;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    width: 3.75em;
    height: 3.75em;
    flex: none;
  }
  .blog-sidebar .blog-featureImage img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
  }
  .blog-sidebar .feature-h3 {
    font-size: 0.9375rem;
    line-height: 1.5em;
    color: var(--headerColor);
    margin: 0;
    margin-bottom: 0.25rem;
    font-weight: 700;
    display: block;
    text-decoration: none;
  }
  .blog-sidebar .feature-date {
    font-size: 0.875rem;
    line-height: 1.5em;
    color: var(--bodyTextColor);
    display: block;
  }
}
/* Tablet - 1024px */
@media only screen and (min-width: 64em) {
  .blog-sidebar {
    max-width: 22.5em;
  }
}
/*-- -------------------------- -->
<---        Blog Articles       -->
<--- -------------------------- -*/
/* Mobile - 360px */
@media only screen and (min-width: 0em) {
  .blog-article {
    max-width: 49.6875em;
    width: 100%;
    display: block;
  }
  /* No hero on posts, so the fixed two-bar nav would sit over the image.
     Mirrors #cs-navigation's --barHeight clamp (two stacked bars) plus a
     gap. Repeated rather than var()'d because --barHeight is scoped to the
     nav element, so it does not inherit down here. */
  body.blog-post .blog-container {
    padding-top: calc(clamp(2.75rem, 5.5vw, 3.25rem) * 2 + 4rem);
  }
  /* px, not em: the root font scales to 18-20px above 1400px, so an em cap
     grew with it and the photo filled the viewport before any text showed. */
  .blog-article .blog-mainImage {
    width: 100%;
    display: block;
    border-radius: 0.5em;
    overflow: hidden;
    margin-bottom: 1.75em;
    height: clamp(220px, 34vh, 340px);
  }
  .blog-article .blog-mainImage img {
    display: block;
    height: 100%;
    width: 100%;
    object-fit: cover;
  }
  .blog-article .blog-author-img {
    width: 2em;
    height: 2em;
    position: relative;
    display: block;
    border-radius: 50%;
    overflow: hidden;
    flex: none;
  }
  .blog-article .blog-author-img img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    /* see .recent-articles above — contain for the icon, cover for a photo */
    object-fit: contain;
  }
  .blog-article .blog-author-img.has-photo img {
    object-fit: cover;
  }
  .blog-article .blog-authorGroup {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.5rem 0.625rem;
    flex-wrap: wrap;
  }
  .blog-article .blog-author,
  .blog-article .blog-date {
    font-size: 0.875rem;
    color: var(--bodyTextColor);
    line-height: 1.5em;
    white-space: nowrap;
  }
  .blog-article .blog-dot {
    width: 3px;
    height: 3px;
    background-color: var(--primary);
    border-radius: 50%;
    display: block;
    flex: none;
  }
  .blog-article .blog-back {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    transition: color 0.3s;
  }
  .blog-article .blog-back:before {
    content: "←";
    font-size: 1.1em;
    line-height: 1;
    transition: transform 0.3s;
  }
  /* On the span, not the link, so the arrow stays clear of the underline. */
  .blog-article .blog-back:hover span {
    text-decoration: underline;
    text-underline-offset: 0.25rem;
  }
  .blog-article .blog-back:hover:before {
    transform: translateX(-0.25rem);
  }
  .blog-article .blog-back:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
  }
  @media (prefers-reduced-motion: reduce) {
    .blog-article .blog-back,
    .blog-article .blog-back:before {
      transition: none;
    }
    .blog-article .blog-back:hover:before {
      transform: none;
    }
  }
  body.dark-mode .blog-article .blog-back {
    color: #6aa886;
  }
  .blog-article .blog-h1 {
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.25em;
    font-weight: 700;
    margin: 0 0 0.75rem;
    max-width: 34ch;
    color: var(--headerColor);
  }
  .blog-article #blog-content {
    padding-top: 1.5rem;
    margin-top: 1.25rem;
    border-top: 1px solid #e3e8e5;
  }
  .blog-article #blog-content h2 {
    font-size: 1.75rem;
    line-height: 1.5em;
    color: var(--headerColor);
    font-weight: 700;
    margin-bottom: 1rem;
  }
  .blog-article #blog-content h3 {
    font-size: 1.5rem;
    line-height: 1.5em;
    color: var(--headerColor);
    font-weight: 700;
    margin-bottom: 1rem;
  }
  .blog-article #blog-content h4,
  .blog-article #blog-content h5,
  .blog-article #blog-content h6 {
    font-size: 1.25rem;
    line-height: 1.5em;
    color: var(--headerColor);
    font-weight: 700;
    margin-bottom: 1rem;
  }
  .blog-article #blog-content p {
    font-size: 1rem;
    line-height: 1.6em;
    margin: 0;
    margin-bottom: 1rem;
    color: var(--bodyTextColor);
  }
  .blog-article #blog-content a {
    text-decoration: underline;
    text-underline-offset: 0.125rem;
    font-size: inherit;
    color: var(--primary);
  }
  .blog-article #blog-content ul,
  .blog-article #blog-content ol {
    padding-left: 2.5rem;
    margin: 0;
    margin: 1rem 0;
  }
  .blog-article #blog-content ul li,
  .blog-article #blog-content ol li {
    font-size: 1rem;
    line-height: 1.6em;
    margin-bottom: 1rem;
    color: var(--bodyTextColor);
    list-style: circle;
  }
  .blog-article #blog-content img {
    width: 100%;
    height: auto;
    display: block;
    margin: 1rem 0;
    border-radius: 0.5rem;
  }
}
/*-- -------------------------- -->
<---           Footer           -->
<--- -------------------------- -*/
/* Mobile - 360px */
@media only screen and (min-width: 0em) {
  #cs-footer {
    font-family: "Roboto", "Arial", sans-serif;
    /* 60px - 100px top and bottom */
    padding: clamp(3.75em, 7.82vw, 6.25em) 1em;
    background-color: #1a1a1a;
  }
  #cs-footer .cs-container {
    width: 100%;
    max-width: 80em;
    margin: auto;
  }
  #cs-footer .cs-logo-group {
    /* takes up all the space, lets the other ul's wrap below it */
    width: 100%;
    position: relative;
  }
  #cs-footer .cs-logo {
    /* 210px - 240px */
    width: clamp(13.125em, 8vw, 15em);
    height: auto;
    display: block;
    /* 28px - 44px */
    margin-bottom: clamp(1.75em, 4.17vw, 2.75em);
  }
  #cs-footer .cs-logo-img {
    width: 100%;
    height: auto;
  }
  #cs-footer .cs-text {
    /* 14px - 16px */
    font-size: clamp(0.875rem, 2.5vw, 1rem);
    line-height: 1.5em;
    margin: 0;
    margin-bottom: 2.5rem;
    /* changes to 521px at desktop */
    max-width: 21.5rem;
    color: var(--bodyTextColorWhite);
  }
  #cs-footer .cs-nav {
    padding: 0;
    padding-left: 1em;
    margin: 0;
    /* 32px - 40px */
    margin-bottom: clamp(2em, 5.3vw, 2.5em);
  }
  #cs-footer .cs-nav-li {
    list-style: none;
    line-height: 1.5em;
  }
  #cs-footer .cs-nav-li:last-of-type {
    margin-bottom: 0;
  }
  #cs-footer .cs-header {
    font-size: 1rem;
    line-height: 1.5em;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--bodyTextColorWhite);
    position: relative;
    display: block;
  }
  #cs-footer .cs-nav-link {
    font-size: 1rem;
    text-decoration: none;
    line-height: 1.5em;
    color: var(--bodyTextColorWhite);
    position: relative;
  }
  #cs-footer .cs-nav-link:before {
    /* underline */
    content: "";
    width: 0%;
    height: 0.125rem;
    /* current color of the parent */
    background: currentColor;
    opacity: 1;
    position: absolute;
    display: block;
    bottom: -0.125rem;
    left: 0;
    transition: width 0.3s;
  }
  #cs-footer .cs-nav-link:hover:before {
    width: 100%;
  }
  #cs-footer .cs-bottom {
    width: 100%;
    position: relative;
    padding-left: 1em;
  }
  #cs-footer .cs-copyright {
    font-size: 1rem;
    line-height: 1.5em;
    color: #b4b2c7;
    display: block;
  }
  #cs-footer .cs-social {
    display: inline-flex;
    justify-content: flex-start;
    flex-direction: column;
    gap: 0.75em;
    position: absolute;
    right: 1em;
    bottom: 0;
  }
  #cs-footer .cs-social-link {
    width: 1.5rem;
    height: 1.5rem;
    background-color: #4e4b66;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    transition:
      transform 0.3s,
      background-color 0.3s;
  }
  #cs-footer .cs-social-link:hover {
    background-color: var(--primary);
    transform: translateY(-0.1875rem);
  }
  #cs-footer .cs-social-img {
    height: 0.8125rem;
    width: auto;
    display: block;
  }
}
/* Inbetween - 600px */
@media only screen and (min-width: 37.5em) {
  #cs-footer .cs-container {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-wrap: wrap;
    /* 48px - 60px */
    column-gap: clamp(3em, 5.9vw, 3.75em);
  }
}
/* Tablet - 768px */
@media only screen and (min-width: 48em) {
  #cs-footer .cs-logo-group {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* 20px - 60px */
    margin-bottom: clamp(1.25em, 4vw, 3.75em);
  }
  #cs-footer .cs-logo {
    margin: 0;
  }
  #cs-footer .cs-text {
    text-align: right;
    width: 50%;
    max-width: 32.5625rem;
    margin: 0;
  }
  #cs-footer .cs-nav {
    padding: 0;
  }
  #cs-footer .cs-bottom {
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  #cs-footer .cs-social {
    flex-direction: row;
    position: relative;
    /* reset these positions */
    bottom: auto;
    right: auto;
  }
}
