@import url('https://fonts.googleapis.com/css2?family=Merriweather&family=Open+Sans&display=swap');
@import url(colors-dark.css);
@import url(normalize.css);

/* basic normalize. */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    width: 100%;
    line-height: 1.5;
    background-color: var(--nord0);
    color: var(--nord5);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: "Open Sans", sans-serif;
}

a {
  color: var(--nord7);
}

h1, h2, h3, strong {
  color: var(--nord6);
  font-family: Merriweather, serif;
}

#root {
    margin: 0 auto;
    width: 100%;
    max-width: 850px;
}

#header-wrapper {
    min-height: 60px;
}

header {
    display: flex;
    justify-content: space-between;
    padding: 4px 10px;
    border-bottom: 2px solid var(--nord1);
    line-height: 0;
}

header h1 {
    font-size: clamp(1rem, 4vw, 2rem);
    white-space: nowrap;
    text-decoration: none;
}

#left-header a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

#logo {
    height: 50px;
    width: 50px;
    border-radius: 50%;
    margin-right: 5px;
}

.right-header nav ul {
    list-style-type: none;
    display: flex;
}

.right-header nav ul li a {
    display: block;
    color: var(--nord6);
    text-align: center;
    text-decoration: none;
    font-weight: 900;
    margin-right: 16px;
}

.right-header nav ul li a:hover {
    color: var(--nord7);
}

.right-header nav ul li a .text {
    display: inline;
}

.right-header nav ul li a .icon {
    display: none;
    font-size: 1.2rem;
}

.right-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#language-switcher { /* Letting the OS handle most of it */
    padding: 5px 10px; /* Just making it look a little better */
    border-radius: 8px;
    cursor: pointer;
    min-width: 0;
    flex-shrink: 1;
}

#home-info {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 50%;
    margin: 0 auto;
    padding: 10px;
    margin-top: 20px;
}

#home-info h2 {
    font-weight: 100;
    font-size: 1.5rem;
    text-align: center;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 75vh;
    padding: 0 1rem;
}

.blogs {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 100px;
}

.blogs input {
    background-color: var(--nord1);
    border: none;
    border-radius: 5px;
    padding: 5px;
    width: 67%;
    color: var(--nord6);
    box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
    margin-bottom: 5px;
}

#blog-list {
    width: 67%;
}

.blogs article {
    background-color: var(--nord1);
    padding: 20px;
    border-radius: 5px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    margin-top: 15px;
}

.blogs article:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.blogs a {
    text-decoration: none;
}

.blogs input:focus {
    border: none;
}

#footer-wrapper {
    min-height: 100px;
}

footer {
    border-top: 2px solid var(--nord1);
    background-color: var(--nord0);
    padding: 1rem;
    text-align: center;
    margin-top: 50px;
}

footer ul {
    list-style: none;
    display: flex;
    justify-content: center;
}

footer ul li {
    margin: 0 10px;
}

footer ul li i {
    font-size: 30px;
}

/* 
** POSTS STYLING
*/

#post-page {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

#post-page img {
    max-width: 700px;
    width: 100%;
    margin-top: 8px;
    border-radius: 5px;
}

#post-page h2 {
    font-weight: 900;
    font-size: xx-large;
    padding-top: 50px;
}

#post-page h3 {
    font-weight: 800;
    font-size: x-large;
    padding-top: 20px;
}

#post-page h4 {
    font-weight: 700;
    font-size: larger;
    padding-top: 10px;
    padding-bottom: 10px;
}

#post-page h5 {
    font-weight: 700;
    font-size: large;
    padding: 10px 0;
}

#post-page a {
    display: inline-block;
    padding-bottom: 15px;
}

#post-page p > a {
    padding-bottom: 0;
}

#post-page ul li {
    margin-left: 25px;
    padding: 5px 0;
}

.post-date {
    display: block;
    font-size: 0.8em;
    color: lightgray;
    padding-bottom: 3px;
}

#ai-disclaimer {
    color: var(--nord11);
    font-weight: 600;
}

code {
    background-color: var(--nord1);
    padding: 3px;
    border-radius: 4px;
    display: inline-block;
    font-family: monospace;
}

.code-block {
    padding: 6px;
    border-radius: 13px;
    overflow-x: auto;
    white-space: pre;
    background-color: var(--nord1);
}

table {
    border: 0px none;
}

table, th, td {
    border: 1px solid;
    border-collapse: collapse;
}

th, td {
    padding: 5px;
    text-align: center;
}

/*
** EEROR PAGE
*/

#root-err {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#error {
    font-size: clamp(4rem, 30vw, 10rem);
}

/*
** RESPONSIVE DESIGN
*/

@media (max-width: 640px) { 
    .right-header nav ul li a .text {
        display: none;
    }

    .right-header nav ul li a .icon {
        display: inline;
    }
}

@media (max-width: 460px) {
    header h1 {
        display: none;
    }
}