/* Global style */ 
@font-face {
    font-family: 'Rubik';
    src: url('/fonts/Rubik-Regular.ttf') format('truetype'),
         url('http://localhost:8080/src/fonts/Rubik-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Rubik';
    src: url('/fonts/Rubik-Italic.ttf') format('truetype'),
         url('http://localhost:8080/src/fonts/Rubik-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Rubik';
    src: url('/fonts/Rubik-Bold.ttf') format('truetype'),
         url('http://localhost:8080/src/fonts/Rubik-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Rubik';
    src: url('/fonts/Rubik-BoldItalic.ttf') format('truetype'),
         url('http://localhost:8080/src/fonts/Rubik-BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
}

:root {
    --text-color: #030201;
    --background-color: #fcfcfc;

    --font-size: 17px;

    --right-column: 400px;
}

@media screen and (max-width: 1000px) {
    :root {
        --right-column: 200px;
    }
}

html, body {
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: var(--font-size);
    font-family: "Rubik", sans-serif;

    font-weight: 400;
    line-height: 1.4;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 300;
    margin: 0;
}

p {
    margin: 0;
}

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

main {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
    min-height: 100vh;
    max-width: 1200px;
    margin: auto;
}

main>section, main>article  {
    flex-grow: 1;
}

/* Header */

header {
    display: flex;
    flex-direction: row-reverse;
    align-items: start;
    gap: 4rem;
}

@media screen and (max-width: 700px) {
    header {
        flex-wrap: wrap;
        flex-direction: row;
        gap: 2rem;
    }
}

header a {
    text-decoration: none;
}

header a:hover {
    text-decoration: underline;
}

header div:first-child {
    min-width: var(--right-column);
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

header div:first-child a {
    width: 24px !important;
    height: 24px !important;
}

header div:first-child h1 {
    font-size: 1.3rem;
    font-weight: 400;
}

header p { 
    flex-grow: 1;
}

/* Footer */

footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

@media screen and (max-width: 700px) {
    footer {
        display: flex;
        flex-direction: column;
        text-align: center;
    }
}

footer span {
    flex-grow: 1;
}

footer div {
    min-width: var(--right-column);
}


/* Article */

#article article {
    display: flex;
    border-top: 2px solid var(--text-color);
    padding-top: 1rem;
}

#article article>div:first-child {
    display: flex;
    flex-direction: column;
    gap: 1rem
}

#article article>div:last-child {
    min-width: var(--right-column);
}

@media screen and (max-width: 700px) {
    #article article>div:last-child {
        display: none;
    }
}

#article article section {
    line-height: 1.6;
    margin-top: 1rem;
}

#article article figure {
    margin: 0;
}

#article article h2 {
    font-size: 1.5rem;
}

#article article h3 {
    font-size: 1.3rem;
}

#article article h4 {
    font-size: 1.2rem;
}

#article article h5 {
    font-size: 1.1rem;
}

#article article h6 {
    font-size: 1rem;
}

#article article section h1, #article article section h2, #article article section h3, #article article section h4, #article article section h5, #article article section h6 {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

#article img {
    max-width: 100%;
}

#article article section p {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

/* Index */

#index section>a {
    text-decoration: none;
}

#index section>a:hover {
    text-decoration: underline;
}

#index section>a article {
    border-top: 2px solid var(--text-color);
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

#index section>a article>div {
    display: flex;
    gap: 3rem;
}


@media screen and (max-width: 700px) {
    #index section>a article>div {
        flex-wrap: wrap;
        gap: 1rem
    }
}

#index section>a article>div h3 {
    line-height: 1.2;
    font-size: 2rem;
    flex-grow: 1;
}

#index section>a article>div div {
    min-width: var(--right-column);
    display: flex;
    flex-direction: column;
    gap: .25rem;
    flex-shrink: 0;
    text-transform: capitalize;
}

#index section>a article div p {
    display: none;
}

#index section>a article figure {
    display: none;
}