/*** Fonts ***/

@font-face {
    font-family: "Source Sans";
    font-style: normal;
    font-weight: 400;
    src: url(/static/fonts/SourceSans/SourceSans3-Regular.ttf.woff) format("woff");
}

@font-face {
    font-family: "Source Sans";
    font-style: normal;
    font-weight: 700;
    src: url(/static/fonts/SourceSans/SourceSans3-Bold.ttf.woff) format("woff");
}

@font-face {
    font-family: "Crete Round";
    font-style: normal;
    font-weight: 400;
    src: url(/static/fonts/CreteRound/CreteRound-Regular.woff) format("woff");
}

@font-face {
    font-family: "Crete Round";
    font-style: italic;
    font-weight: 400;
    src: url(/static/fonts/CreteRound/CreteRound-Italic.woff) format("woff");
}

/*** Reset ***/

*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
p,
h1, h2, h3, h4, h5, h6,
figure,
blockquote,
dl, dd, ul, ol {
    margin: 0;
    overflow-wrap: break-word;
}

a {
    text-decoration-skip-ink: auto;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding-inline-start: 0;
}

img,
picture {
    display: block;
    max-width: 100%;
    height: auto;
}

/*** Global styles ***/

:root {
    --font-plain: "Source Sans", "Helvetica", "Arial", sans-serif;
    --font-headline: "Crete Round", "Source Sans", "Helvetica", "Arial", sans-serif;

    font-size: calc(1rem + 0.2vw);

    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;

    --measure: 75ch;

    /* Scale */
    --ratio: 1.4;

    --s-5: calc(var(--s-4) / var(--ratio));
    --s-4: calc(var(--s-3) / var(--ratio));
    --s-3: calc(var(--s-2) / var(--ratio));
    --s-2: calc(var(--s-1) / var(--ratio));
    --s-1: calc(var(--s0)  / var(--ratio));
    --s0:  1rem;
    --s1:  calc(var( --s0) * var(--ratio));
    --s2:  calc(var( --s1) * var(--ratio));
    --s3:  calc(var( --s2) * var(--ratio));
    --s4:  calc(var( --s3) * var(--ratio));
    --s5:  calc(var( --s4) * var(--ratio));

    --color-neutral-200: #1d263b;
    --color-primary-200: #0c4767;
    --color-primary-300: hsl(201, 79%, 35%);

    --color-primary-800: hsl(208, 29%, 80%);
    --color-primary-900: hsl(208, 20%, 93%);

    color: var(--color-neutral-200);
    font-family: var(--font-plain);

    --stack--space: var(--s0);
}

/*** Basic styles ***/

p,
h1, h2, h3, h4, h5, h6,
li,
figcaption {
  max-inline-size: var(--measure);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-primary-200);
    line-height: 1.15;
    font-family: var(--font-headline);
    /* font-weight: 700; */
    font-weight: 400;
}

h1 { font-size: var(--s3); }
h2 { font-size: var(--s2); }

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding-inline-start: 0;
}

a {
    color: var(--color-primary-300);
    text-decoration: underline;
}

a:hover {
    color: var(--color-neutral-200);
}

.stack > * + * {
    margin-top: var(--stack--space);
}

.center {
    margin-inline: auto;
}

.rect {
    padding: var(--s3) var(--s1);
}

/* Specific styles */

.labels {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-3);
}

.labels li {
    font-size: 0.8em;
    padding: 0.1em 0.6em;
    border-radius: 1em;
    background-color: #566e3d;
    color: white;
}

.labels li.lang {
    background-color: #0c4767;
    color: white;
}

.description {
    padding: var(--s-1);
    background-color: #eee;
    border-radius: 0.5em;
}

.description > * {
    --stack--space: var(--s-3);
}

.header {
    background-color: var(--color-primary-900);
    padding: var(--s3) var(--s1);
}

.portrait {
    display: flex;
    gap: 2.5em;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
}

.portrait-image {
    max-width: 13em;
    aspect-ratio: 1/1;
    border-radius: 50%;
    border: thin solid grey;
}

.header-small {
    font-size: 0.7em;
    display: block;
}

.header-description {
    max-width: 27.5em;
    --stack--space: var(--s1);
}

.header-about-me > * {
    --stack--space: var(--s-1);
}

.header-intro {
    font-size: 1.2em;
}

.main-content {
    box-sizing: content-box;
    max-width: 43em;
    padding: var(--s3) var(--s1);
}

.stack-large {
    --stack--space: var(--s2);
}

.project-summary > * {
    --stack--space: var(--s-2);
}

.publication-list > li + li {
    margin-top: var(--s-1);
}

.publication-title {
    font-weight: 700;
}

.publication-authors {
    font-style: italic;
}

.footer {
    background-color: var(--color-primary-900);
    padding: var(--s0);
    text-align: center;
}
