/* Google fonts */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,400;1,300&display=swap');

/* ---------- Global stylings ---------- */
a {
    text-decoration: none;
    color: inherit;
}

body {
    background-color: #f5f5f5;
}

body.night-mode {
    background-color: #1E1E1E;
}

h2 {
    font-family: "Poppins", "Arial", "Helvetica", sans-serif;
    color: #001F5C;
    text-align: center;
    margin: 1rem auto;
}

body.night-mode h2 {
    color: #FFD700;
}

dfn {
    font-style: normal;
    font-weight: bolder;
}

dfn:hover {
    cursor: help;
}

abbr {
    font-style: normal;
    font-weight: bolder;
    text-decoration: none !important;
}

abbr:hover {
    cursor: default;
}


code {
    font-family: "JetBrains Mono", "Courier New", monospace;
    color: inherit;
}

kbd {
    color: #f5f5f5;
    background-color: #001F5C;
}

body.night-mode kbd {
    color: #1E1E1E;
    background-color: #FFD700;
}

.site-button {
    background-color: #f5f5f5;
    color: #001F5C;
}

body.night-mode .site-button {
    background-color: #FFD700;
    color: #1E1E1E;
}

/* Images */
.site-image-container {
    margin: 0 auto;
    margin-top: 1rem;
    width: 95%;
}

.site-image {
    width: 100%;
    border: 1px solid #001F5C;
    border-radius: 1rem;
}

body.night-mode .site-image {
    border: 1px solid #FFD700;
    filter: brightness(70%);
}

/* In page single line terminal code */
.bash-container code{
    padding: 0 !important;
}

.bash-container {
    height: fit-content;
    line-height: 1.1rem;
    margin: 0;
}

/* ---------- Navigation bar ---------- */
/* Bar */
.nav-wrapper {
    border-bottom: 0.3rem solid #001F5C;
    height: 6rem;
    display: flex;
    align-items: center;
    padding-top: 0.3rem;
}

body.night-mode .nav-wrapper {
    border-bottom: 0.3rem solid #FFD700;
}

/*Website title */
.nav-wrapper h1 {
    margin: 0;
}

.site-logo-title {
    font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
    color: #001F5C;
    font-size: 5rem;
    margin-left: 1rem;
    padding: 0;
}

body.night-mode .site-logo-title {
    color:#FFD700;
}

/* ----------- Search Bar ----------- */
.top-search-bar {
    text-align: center;
    margin: 0 auto;
    position: relative;
    right: 99px;
}

.algolia-logo {
    height: 1.75rem;
    border-radius: 50%;
    border: 1px solid #333A3F;
    margin-bottom: 3px;
}

.top-search-bar {
    margin-top: 1rem;
    margin-bottom: 1rem;
    max-width: 100%;
}

.top-search-bar .site-search-form {
    margin: 0 auto;
}

.top-search-bar .site-search-form-input {
    font-family: "Montserrat", Helvetica, Arial, sans-serif;
}

.top-search-bar .site-seach-form-button {
    font-family: "Montserrat", Helvetica, Arial, sans-serif;
    border-radius: 0.5rem;
    background-color: #001F5C;
    color: #f5f5f5;
}

body.night-mode .top-search-bar .site-seach-form-button {
    border-radius: 0.5rem;
    background-color: #FFD700;
    color: #1E1E1E;
}


/* ----------- Day/Night ----------- */
/* Dropdown button */
.day-night-toggle-sun {
    font-size: 1rem;
    margin-right: 0.5rem;
}

.day-night-toggle-moon {
    font-size: 1rem;
    margin-left: 0.5rem;
}

#day-night-toggle {
    position: absolute;
    top: 1.5rem;
    right: 1rem;
}

#day-mode-toggle-dropdown {
    background-color: #001F5C;
    color: #f5f5f5;
}

body.night-mode #day-mode-toggle-dropdown {
    background-color: #FFD700;
    color: #1E1E1E;
}

/* Dropdown menu */
.day-mode-dropdown-menu {
    background-color: #f5f5f5;
    text-align: center;
    border: 1px solid #001F5C;
}

body.night-mode  .day-mode-dropdown-menu {
    background-color: #1E1E1E;
    text-align: center;
    border: 1px solid #FFD700;
}

.day-mode-dropdown-menu a {
    color: #001F5C;
}

.day-mode-dropdown-menu a:hover {
    font-weight: bolder;
}

body.night-mode .day-mode-dropdown-menu a:hover {
    font-weight: bolder;
    background-color: inherit;
}

.day-mode-dropdown-menu a:active {
    font-weight: bolder;
    background-color: inherit;
    color: inherit;
}

body.night-mode .day-mode-dropdown-menu a:active {
    font-weight: bolder;
    background-color: inherit;
    color: inherit;
}

body.night-mode .day-mode-dropdown-menu a{
    color: #FFD700 !important;
}

/* Active dropdown */
.day-night-dropdown.active {
    background-color: #001F5C;
    color: #f5f5f5 !important;
}

body.night-mode .day-night-dropdown.active {
    background-color: #FFD700 !important;
    color: #1E1E1E !important;
}

/* ---------- Site footer ----------*/
/* Body size and fixed footer */
body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 4rem;
    background-color: #001F5C;
    text-align: center;
    position: relative;
    /* Gives offset on smaller page heights */
    top: 2rem;
}

body.night-mode .site-footer {
    background-color: #FFD700;
}

.site-footer a {
    margin: 0;
}

#github-link {
    font-size: 2rem;
    color: #F5f5f5;
}

body.night-mode #github-link {
    color: #1E1E1E;
}

/* ---------- Media Queries ---------- */
@media (max-width: 992px) {
    /* Move day/night toggle under header */
    #day-night-toggle {
        top: 7rem;
    }
    /* Recentre search bar */
    .top-search-bar {
        right: 0;
    }
}

@media (max-width: 900px) {
    /* Remove search bar from top */
    .top-search-bar {
        display: none;
    }
}


@media (max-width: 400px) {
    /* Reduce site title size */
    .site-logo-title {
        font-size: 4rem;
        margin: 0 auto;
    }
}

@media (max-width: 310px) {
    /* Reduce site title size */
    .site-logo-title {
        font-size: 3rem;
        margin: 0 auto;
    }
}