@font-face {
    font-family: "Roboto";
    src: url("../assets/fonts/Roboto/Roboto-Italic.woff2") format("woff2"),
         url("../assets/fonts/Roboto/Roboto-Italic.woff") format("woff");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

:root {
    --background-container_overview: #f0efef;
    --img-bg-color: #211931;
    --code-font-color: #000;
    --code-bg-color: #F0EFEF;
    --pre-code-block-bg-color: #f0efef;
    --pre-code-block-border-color: #dfd9de;
    --span-code-font-color-red: #d30038;
}
.dark-mode {
    --background-container_overview: #24252d;
    --img-bg-color: rgba(128, 128, 128, 0.05);
    --code-font-color: #fff;
    --code-bg-color: #2f303a;
    --pre-code-block-bg-color: #24252D;
    --pre-code-block-border-color: #35363e;
    --span-code-font-color-red: #ff8f99;
}

h1 {
    font-size: 4rem;
    font-weight: 700;
    margin: 0;
}
h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
}
h3 {
    font-size: 1.9rem;
    font-weight: 700;
    margin: 30px 0 10px 0;
}

article {
    display: flex;
    flex-direction: column;
    width: calc(100% - 40px);
    max-width: 900px;
    margin: 50px auto;
    text-align: left;
    overflow-wrap: anywhere;
}
article > p {
    margin: 15px 0;
}

section {
    margin: 15px 0;
}
section > p,
dt, dd {
    font-size: 1.7rem;
    margin: 0;
}

dl {
    margin: 0;
}
dt, dd {
    display: inline;
    line-height: 1.6;
}
dt {
    font-weight: 700;
}

a[target="_blank"]::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 5px;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M304.5-.5h186c10.667 3.333 17.667 10.333 21 21v186c-9.916 20.806-25.249 25.972-46 15.5-5.153-4.477-8.653-9.977-10.5-16.5-.333-35.667-.667-71.333-1-107L218.5 334c-11.902 9.031-24.235 9.697-37 2-14.021-13.191-15.521-27.691-4.5-43.5L412.5 57l-107-1c-16.539-5.559-23.705-17.059-21.5-34.5 3.259-10.756 10.092-18.089 20.5-22Z'/%3E%3Cpath d='M382.5 511.5h-311c-39.004-9.004-63.004-33.004-72-72v-311C6.92 93.577 27.587 70.41 61.5 59c6.547-1.777 13.214-2.777 20-3 39.667-.667 79.333-.667 119 0 16.388 2.553 25.388 12.053 27 28.5-.375 14.874-7.708 24.374-22 28.5l-124 1c-13.941 2.941-22.108 11.441-24.5 25.5-.667 96.333-.667 192.667 0 289 2.5 14.5 11 23 25.5 25.5 96.333.667 192.667.667 289 0 14.059-2.392 22.559-10.559 25.5-24.5l1-124c5.567-16.55 17.067-23.717 34.5-21.5 12.806 3.806 20.306 12.306 22.5 25.5.667 40.333.667 80.667 0 121-3.103 35.746-20.936 60.913-53.5 75.5-6.335 2.289-12.669 4.123-19 5.5Z'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M304.5-.5h186c10.667 3.333 17.667 10.333 21 21v186c-9.916 20.806-25.249 25.972-46 15.5-5.153-4.477-8.653-9.977-10.5-16.5-.333-35.667-.667-71.333-1-107L218.5 334c-11.902 9.031-24.235 9.697-37 2-14.021-13.191-15.521-27.691-4.5-43.5L412.5 57l-107-1c-16.539-5.559-23.705-17.059-21.5-34.5 3.259-10.756 10.092-18.089 20.5-22Z'/%3E%3Cpath d='M382.5 511.5h-311c-39.004-9.004-63.004-33.004-72-72v-311C6.92 93.577 27.587 70.41 61.5 59c6.547-1.777 13.214-2.777 20-3 39.667-.667 79.333-.667 119 0 16.388 2.553 25.388 12.053 27 28.5-.375 14.874-7.708 24.374-22 28.5l-124 1c-13.941 2.941-22.108 11.441-24.5 25.5-.667 96.333-.667 192.667 0 289 2.5 14.5 11 23 25.5 25.5 96.333.667 192.667.667 289 0 14.059-2.392 22.559-10.559 25.5-24.5l1-124c5.567-16.55 17.067-23.717 34.5-21.5 12.806 3.806 20.306 12.306 22.5 25.5.667 40.333.667 80.667 0 121-3.103 35.746-20.936 60.913-53.5 75.5-6.335 2.289-12.669 4.123-19 5.5Z'/%3E%3C/svg%3E");
    mask-repeat: no-repeat;
    mask-size: contain;
}

figure {
    margin: 30px 0 10px 0;
}
figcaption {
    font-size: 1.7rem;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.room-link {
    color: #FF5A5A;
    text-decoration: underline;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    overflow-wrap: anywhere;
}
.room-link:hover {
    color: #ff8a8a;
}

.main_writeup {
    margin: 50px 0;
}

.posted_date {
    font-size: 1.5rem;
}


.container_overview {
    background: var(--background-container_overview);
    padding: 10px;
    border-radius: 6px;
}

.span-italic {
    font-style: italic;
}

.img_writeups {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.img-bg {
    background-color: var(--img-bg-color);
    border-radius: 8px;
}
.img-article {
    max-width: 50%;
    height: auto;
    margin-bottom: 15px;
}

.h2-over-img {
    margin-bottom: 20px;
}
.ul_li {
    font-size: 1.7rem;
    line-height: 30px;
    padding-inline-start: 30px;
}

.inline-code {
    font-family: "Consolas", "Monaco", "Courier New", monospace;
    font-size: 1.5rem;
    color: var(--code-font-color);
    background-color: var(--code-bg-color);
    padding: 0.3rem;
    border-radius: 3px;
}

.code-block {
    font-family: "Consolas", "Monaco", "Courier New", monospace;
    font-size: 1.5rem;
    overflow-x: auto;
    background-color: var(--pre-code-block-bg-color);
    border: 1px solid var(--pre-code-block-border-color);
    border-radius: 3px;
    margin: 10px 0;
    padding: 15px;
}
.span-code-color-red {
    color: var(--span-code-font-color-red);
}


/* Margin rule for p and img */
/* p is standard 0 */
.content-text {
    margin: 0;
}
/* p1 p2 then p2 margin */
.content-text + .content-text {
    margin-top: 10px;
}
/* p img then p margin */
.content-text:has(+ img) {
    margin-bottom: 10px;
}
/* img p then p margin */
img + .content-text {
    margin-top: 10px;
}



@media screen and (min-width: 1024px) {
    .img-article {
        max-width: 35%;
    }
}
