@import url("https://fonts.googleapis.com/css2?family=Spectral&family=Nunito&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Roboto&display=swap");

/* Use the fonts included with code*/
@font-face {
    font-family: DroidSansMono;
    src: url(/fonts/DroidSansMono.ttf);
}

@font-face {
    font-family: Anta;
    src: url(/fonts/Anta-Regular.ttf);
}

@font-face {
    font-family: FiraMono;
    src: url(/fonts/FiraMono-Regular.ttf);
}

@font-face {
    font-family: RobotoCondensed;
    src: url(/fonts/RobotoCondensed-Regular.ttf);
}

@font-face {
    font-family: JetBrainsMono;
    src: url(/fonts/JetBrainsMono-Regular.ttf);
}

@font-face {
    font-family: DMMono;
    src: url(/fonts/DMMono-Regular.ttf);
}

html {
    scroll-behavior: smooth;
}

:root {
    --charcoal-black: #424c55;
    --delta-blue: #40476d;
    --violet-blue: #4357ad;
    --white: #f8f8ff;
    --yellow: #ffbc00;
    --dark-blue: #003049cc;
    --font-black: #333333;

    --font-color: var(--font-black);
    --heading-bg-color: var(--violet-blue);
    --page-bg-color: #f8f8ff;
    --heading-color: var(--violet-blue);
    --table-data-font-color: var(--font-black);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    box-shadow: none !important;
}

body {
    font-family: "Roboto Condensed", sans-serif;
    line-height: 1.4;
    font-size: 1.2rem;
    background-color: var(--page-bg-color);
    color: var(--font-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Roboto Condensed", sans-serif;
    font-weight: 400;
    margin: 1rem 0;
    color: var(--heading-color);
}

h1 {
    font-size: 4rem;
}

p {
    margin: 0.5rem 0;
}

/* If we do this, Images won't go outside of their parent. */
/* img {
    width: 100%;
} */

img {
    /* Assuming your blog post content has a class 'blog-post-content' */
    max-width: 1024px; /* Max width of 600px */
    height: auto; /* Maintain aspect ratio */
    display: block; /* Good practice for images, removes inline spacing */
}

pre,
code {
    font-family: "DMMono", DroidSansMono, sans-serif !important;
    font-size: 1.1rem;
}

pre {
    border-radius: 8px;
}

h5 {
    color: var(--heading-color);
    font-size: 1rem;
}

ul,
ol {
    margin-left: 2rem;
}

ul li {
    margin-left: 1rem;
    padding-top: 0.5rem;
}

aside ul {
    margin-left: 0.5rem;
}

aside ul li {
    margin-left: 1rem;
}

blockquote {
    margin: 1rem 0;
    padding: 1rem;
    border-left: 5px solid #f99500;
    background-color: #f995001a;
    border-radius: 6px;
}

li code {
    background-color: #daeeff;
    padding: 0.2rem;
    border-radius: 4px;
    font-size: 1.1rem;
}

a {
    font-family: "Roboto Condensed", sans-serif;
    font-weight: 200;
    color: var(--violet-blue);
    text-decoration: none;
    padding: 4px;
    display: inline-block;
    border-radius: 6px;
    background-image: linear-gradient(
        to top,
        #b5c0ef 50%,
        transparent 50%
    ) !important;
    background-size: 100% 200%;
    background-position: top;
    transition: background-position 0.3s ease;
    /*vertical-align: middle;*/
}

a:hover {
    background-position: bottom;
}

hr {
    margin: 1rem 0;
    border-bottom: 0.27em solid transparent;
    border-image-slice: 1;
    line-height: 0.6em;
    transition-duration: 0.3s;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    vertical-align: 0;
}

.page-tags {
    margin: 0.5rem 0;
}

.page-tags .tag {
    background-color: #e9e2ff;
    color: black;
    padding: 0.3rem;
    margin: 0 0.5rem;
    border-radius: 0.6rem;
    font-size: 1.1rem;
    font-family: "Roboto Condensed", sans-serif;
    text-decoration: none;
}

/* -------------------------- */
/* Style tables               */
/* -------------------------- */
table {
    border-collapse: collapse;
    width: 100%;
    border: 1px solid #ddd;
    overflow: scroll;
}

tr {
    border: 1px solid #ddd;
}

table thead th {
    background-color: var(--violet-blue);
    color: white;
    font-weight: bold;
    padding: 10px;
    text-align: left;
    font-family: "Roboto Condensed", sans-serif;
    font-size: 17.6px;
}

table tbody td {
    background-color: #f8f8ff;
    color: var(--table-data-font-color);
    padding: 1.2rem;
    font-size: 1.1rem;
    max-width: 100%;
}

.my-footer {
    margin-bottom: 10px;
    height: 100px;
}

/* -------------------------- */
/* Navbar                     */
/* -------------------------- */
#main-nav {
    background-color: var(--nav-bar-bg-color);
    position: sticky;
    top: 0;
    z-index: 1;
}

#main-nav .container {
    display: flex;
    padding: 1rem;
    align-items: center;
    justify-content: space-between;
}

#main-nav .logo {
    font-size: 1.5rem;
    color: var(--white);
    padding-left: 5rem;
}

#main-nav ul {
    display: flex;
    justify-self: end;
    list-style: none;
}

#main-nav li {
    padding: 0.5rem 1.5rem;
}

#main-nav a {
    text-decoration: none;
    color: var(--white);
    border-bottom: 3px solid transparent;
    padding-bottom: 0.5rem;
    transition: border-color 0.3s;
}

#main-nav a:hover {
    border-color: #ccc;
}

#main-nav a.current {
    border-color: var(--yellow);
}

/* -------------------------- */
/* Content section            */
/* -------------------------- */
.content-section {
    background-color: var(--white);
    border-radius: 12px;
}

.heading-section {
    margin: 0;
    padding: 5rem 0;
    text-align: center;
    color: var(--white);
    background-color: var(--violet-blue);
}

.heading-section ul {
    list-style: none;
}

.heading-section h1 {
    color: var(--white);
}

.container-1 {
    margin: 1rem auto;
    max-width: 55vw;
    min-height: 85vh;
    background-color: var(--white);
    border-radius: 12px;
    padding: 0 3rem 3rem 3rem;
}

/* -------------------------- */
/* Sidebar                    */
/* -------------------------- */
#toc-container {
    padding: 1rem;
    column-count: 2;
    border-radius: 8px;
    max-height: 50%;
    /* overflow-y: scroll; */
}

/* -------------------------- */
/* Footer                     */
/* -------------------------- */
#main-footer .footer-container {
    background-color: #e3e7f7;
    display: grid;
    grid-template-columns: repeat(4, auto);
    grid-gap: 1.5rem;
    align-items: center;
    justify-items: center;
    padding: 1rem;
    color: #333;
}

#main-footer .footer-element {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: center;
    border-radius: 8px;
    height: 300px;
    max-height: 300px;
    padding: 1rem;
    border: 1px solid #fff;
}

#main-footer .footer-container img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
}

#main-footer .footer-container > *:last-child {
    grid-column: 1 / span 4;
    padding: 1rem;
    text-align: center;
}

#main-footer .footer-element .footer-header {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 1rem;
}

/* Adds space above each paragraph except the first one */
p + p {
    margin-top: 1em;
}
/* Blog listing page styling */
.blog-listing {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.blog-listing h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--violet-blue);
}

.blog-entries {
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-entry {
    border-bottom: 1px solid #e0e0e0;
    /* padding: 1rem 0.5rem; */
    margin-bottom: 0.5rem;
    transition: background-color 0.2s ease;
}

.blog-entry:hover {
    background-color: #f9f9ff;
}

.blog-entry:last-child {
    border-bottom: none;
}

.blog-entry li {
    margin: 0;
    padding: 0;
    list-style-type: none;
}

.blog-entry a {
    font-weight: 500;
    font-size: 1.15rem;
    display: inline-block;
    padding: 0.25rem 0;
    background-image: none;
    display: inline-block;
    border-radius: 6px;
    background-image: linear-gradient(to top, #b5c0ef 50%, transparent 50%);
    background-size: 100% 200%;
    background-position: top;
    transition: background-position 0.3s ease;
}

.blog-entry a:hover {
    color: var(--heading-color);
    background-position: bottom;
}

.blog-entry .page-tags {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blog-entry .tag {
    font-size: 0.8rem;
    padding: 0.15rem 0.5rem;
    margin: 0;
    background-color: #e9e2ff;
    color: var(--violet-blue);
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.blog-entry .tag:hover {
    background-color: #d9d0ff;
}

@media (max-width: 767px) {
    .blog-entry .page-tags {
        display: none; /* Hide .page-tags on mobile */
    }
}

/* Media query for tablets (and larger mobiles in landscape) */
@media (min-width: 768px) and (max-width: 991px) {
    .blog-entry .page-tags {
        display: none; /* Hide .page-tags on tablets */
    }
}

/* Media query for mobile devices (and smaller tablets in portrait) */
@media (max-width: 767px) {
    body {
        font-family: "Roboto Condensed", sans-serif; /* Replace "YourMobileFont" with your desired mobile font */
        font-size: 1.1rem; /* Optional: Adjust font size for mobile if needed */
        line-height: 1.5; /* Optional: Adjust line-height for mobile if needed */
    }
}

/* Media query for tablets (and larger mobiles in landscape) */
@media (min-width: 768px) and (max-width: 991px) {
    body {
        font-family: "Roboto Condensed", sans-serif; /* Replace "YourTabletFont" with your desired tablet font */
        font-size: 1.15rem; /* Optional: Adjust font size for tablets if needed */
        line-height: 1.45; /* Optional: Adjust line-height for tablets if needed */
    }
}

@media (min-width: 2000px) {
    .container-1 {
        margin: 1rem auto;
        max-width: 40vw;
        min-height: 85vh;
        background-color: var(--white);
        border-radius: 12px;
        padding: 0 3rem 3rem 3rem;
    }
}
