/* ========================= */
/* LAYOUT                   */
/* ========================= */

.blog-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2vw;
    width: 100%;
}

/* ========================= */
/* SIDEBAR                 */
/* ========================= */

.blog-nav {
    position: sticky;
    top: 0;
    height: 100vh;

    display: flex;
    flex-direction: column;

    padding-left:0rem;
    padding-top: 1.2rem;
    margin: 0;

    overflow: hidden;
}

.blog-nav a {
    padding: 0.5rem 0.8rem;
    opacity: 0.8;
    transition: 0.35s ease;
    text-decoration: none;
    color: #e8e3dc;
}

.blog-nav a.active {
    opacity: 1;
    color: #c6a972;
    background: rgba(198,169,114,0.12);

    border-radius: 6px;
}

.blog-nav a:hover {
  cursor: pointer;

  transform: scale(1.2);
  transform-origin: left center;



  /* gradient text effect */
  background-image: repeating-linear-gradient(
    45deg,
    hwb(44 33% 23%),
    #a9884b,
    #ffecc0,
    #fabb45
  );

  background-size: 20% 20%;
  background-clip: text;
  -webkit-text-fill-color: transparent;

  animation: rainbow 5s linear infinite;
}

/* ========================= */
/* BLOG AREA                */
/* ========================= */

.blog {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* ========================= */
/* ARTICLES                 */
/* ========================= */

.blog-post {
    min-height: 0vh;
    margin-bottom: 5vh;

    display: flex;
    flex-direction: column;
    justify-content: flex-start;

    padding: 2rem 2rem;

    transition: opacity 2s ease;
}


.blog-post:first-child {
    padding-top: 2rem;
}


.blog-post.active {
    opacity: 1;
}

/* effet “cinéma périphérique” */
.blog-post:not(.active) {
    opacity: 0.1;
}


/* ========================= */
/* TYPO                      */
/* ========================= */

.blog-post header {
    margin-bottom: 1.5rem;
}

.blog-post h2 {
    font-size: 2rem;
    line-height: 1.1;

    margin: 0.3rem 0 0 0;

    letter-spacing: -0.02em;
    font-weight: 700;

    color: rgba(255,255,255,0.95);
}

.blog-post h2::after {
    content: "";
    display: block;
    width: 20vw;
    height: 2px;
    background: linear-gradient(90deg, #fff, transparent);
    opacity: 0.4;
}

.blog-post h3 {
    font-size: 1.5rem;
    line-height: 1.2;

    margin: 0.8rem 0 0 0;

    letter-spacing: -0.015em;
    font-weight: 650;

    color: rgba(255,255,255,0.88);
}

.blog-post h3::after {
    content: "";
    display: block;
    width: 14vw;
    height: 2px;
    margin-top: 6px;

    background: linear-gradient(90deg, #fff, transparent);
    opacity: 0.25;
}

.blog-post h4 {
    font-size: 1.2rem;
    line-height: 1.3;

    margin: 0.6rem 0 0 0;

    letter-spacing: -0.01em;
    font-weight: 600;

    color: rgba(255,255,255,0.75);
}

.blog-post h4::after {
    content: "";
    display: block;
    width: 8vw;
    height: 1px;
    margin-top: 5px;

    background: linear-gradient(90deg, #fff, transparent);
    opacity: 0.18;
}

.blog-post time {
    font-family: monospace;
    font-size: 0.8rem;

    opacity: 0.4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


.blog-post p {
    font-size: 1.05rem;
    line-height: 1.7;

    color: rgba(255,255,255,0.78);

    max-width: 75ch;
}

.blog-post p + p {
    margin-top: 1rem;
}













/* ========================= */
/* MOBILE                   */
/* ========================= */

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

    .blog-nav {
        display: none;
    }
}

.blog-nav a::after {
    content: " ›";
    opacity: 1;
    margin-left: 0rem;
      /* gradient text effect */
    background-image: repeating-linear-gradient(
    45deg,
    hwb(44 33% 23%),
    #a9884b,
    #ffecc0,
    #fabb45
    );

    background-size: 500% 10%;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow 5s linear infinite;
}
