:root {
    /* Set sans-serif & mono fonts */
  --font-accent: Avenir, Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif;
  --font-text: system-ui, sans-serif;
  --font-mono: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
  --font-serif: Iowan Old Style, Apple Garamond, Baskerville, Times New Roman, Droid Serif, Times, Source Serif Pro, serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;

  /* Nord palette */
  --aurora-1: #bf616a;
  --aurora-2: #d08770;
  --aurora-3: #ebcb8b;
  --aurora-4: #a3be8c;
  --aurora-5: #b48ead;
  --frost-1: #8fbcbb;
  --frost-2: #88c0d0;
  --frost-3: #81a1c1;
  --frost-4: #5e81ac;
  --snow-1: #d8dee9;
  --snow-2: #e5e9f0;
  --snow-3: #eceff4;
  --nord-1: #2e3440;
  --nord-2: #3b4252;
  --nord-3: #434c5e;
  --nord-4: #4c566a;
  
  /* Rainbow linear gradient */
  --rainbow: var(--bg-contrast), var(--bg-contrast) 10%, var(--frost-4) 10%, var(--frost-4) 20%, var(--frost-3) 20%, var(--frost-3) 30%, var(--aurora-5) 30%, var(--aurora-5) 40%, var(--aurora-1) 40%, var(--aurora-1) 50%, var(--aurora-2) 50%, var(--aurora-2) 60%, var(--aurora-3) 60%, var(--aurora-3) 70%, var(--aurora-4) 70%, var(--aurora-4) 80%, var(--frost-1) 80%, var(--frost-1) 90%, var(--frost-2) 90%, var(--frost-2);
  --rainbow-gradient: var(--bg-contrast), var(--frost-4), var(--frost-3), var(--aurora-5), var(--aurora-1), var(--aurora-2), var(--aurora-3), var(--aurora-4), var(--frost-1), var(--frost-2);

    /* Default (light) theme */
  color-scheme: light;
  --bg: var(--snow-3);
  --bg-contrast: var(--nord-1);
  --bg-light: var(--snow-2);
  --bg-contrast-light: var(--nord-3);
  --text: var(--nord-3);
  --text-contrast: var(--snow-2);
  --accent: var(--frost-2);
  --text-accent: var(--nord-1);
}

/* Childs */
:nth-of-type(1) {
  --nth-child: 1
}
:nth-of-type(2) {
  --nth-child: 2
}
:nth-of-type(3) {
  --nth-child: 3
}
:nth-of-type(4) {
  --nth-child: 4
}
:nth-of-type(5) {
  --nth-child: 5
}
:nth-of-type(6) {
  --nth-child: 6
}
:nth-of-type(7) {
  --nth-child: 7
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: var(--nord-1);
    --bg-contrast: var(--nord-4);
    --bg-light: var(--nord-2);
    --bg-contrast-light: var(--nord-2);
    --text: var(--snow-3);
    --text-contrast: var(--snow-1);
    --accent: var(--frost-2);
    --text-accent: var(--nord-1);
  }
}

/*** Global design ***/
body {
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-text);
  line-height: 1.33;
  background-color: var(--bg);
  margin: 0;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-accent);
  font-variant: small-caps;
  font-size: 1.5rem;
  letter-spacing: 2px;
  transform: scale(1, .8);
}
a {
  color: inherit;
}

/* Header */
header {
  margin-top: 2em;
}
header h1 {
  font-weight: 400;
  font-size: 1.6em;
  letter-spacing: 7px;
  line-height: .8;
  text-indent: .7em hanging;
  text-wrap: nowrap;
  white-space: nowrap;
  text-align: center;
}
header h1:first-line {
  overflow: hidden;
  font-size: 2.6em;
  font-weight: 600;
  letter-spacing: 1px;
}
header h2 {
  font-size: 2em;
  text-align: center;
  margin: .5em 1em;
}
header ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  gap: 1em;
  padding: 0;
}
header ul li {
  font-size: 1.1em;
  background: var(--bg-light);
  padding: .5em;
  border-radius: 5px;
}
header ul li::first-letter {
  padding-right: .5em;
}
header p {
  background-color: var(--accent);
  color: var(--text-accent);
  padding: 8px;
  font-weight: 400;
  font-size: 1.2em;
  line-height: 1.3;
  padding: 1em;
}

/* Body */
main {
  padding: 0 1em;
}
main h2 {
  position: relative;
  display: flex;
  font-size: 2em;
  margin-bottom: 0;
  white-space: nowrap;
}
main h2::before {
  filter: grayscale(0.8);
  margin-right: .5em;
  transform: scaleY(1.2);
}
main h2::after {
  content: "";
  display: inline-block;
  border-bottom: 5px solid var(--text);
  flex: 1 1 auto;
  height: calc(1em - 7px);
  margin-left: 5px;
}
h2#work::before {
  content: "💼";
}
h2#tech::before {
  content: "🔧";
}
h2#commu::before {
  content: "👥";
}
h2#ref::before {
  content: "💬";
}
h2#prof::before {
  content: "👤";
}
h2#perso::before {
  content: "🪪";
}
h2#edu::before {
  content: "🎓";
}
h2#core::before {
  content: "🧬";
}
h2#int::before {
  content: "🗡️";
}
h2#tech+p {
  margin: -1em 0 .5em;
  font-size: 0.8em;
  margin-left: 5.5em;
}
main article h3 {
  font-size: 1.5em;
  margin-top: .8em;
  margin-bottom: 0;
}
main article h3+p {
  margin-top: 0;
  line-height: 1;
}
main article div {
  display: flex;
  flex-wrap: wrap;
  gap: 1em .5em;
  font-size: .9em;
  padding: 0;
  justify-content: flex-start;
}
main article div hr {
  display: none;
}
main article div ul {
  position: relative;
  flex: 1 1 45%;
  min-width: 20em;
  border: 1px solid var(--bg-contrast);
  border-radius: 5px;
  --angle : calc(90deg + (45deg * var(--nth-child)));
  border-image: linear-gradient(var(--angle), var(--rainbow-gradient)) 1%;
  margin: 0;
  padding: 1em;
  list-style: "· ";
}
main article div ul li {
  margin-left: 1em;
}
main article div ul li:first-child {
  position: absolute;
  top: -.8em;
  left: .8em;
  list-style: none;
  margin-left: 0;
  padding: 0 .5em;
  background-color: var(--bg);
  font-weight: lighter;
  font-size: 10px;
}

main aside ul {
  list-style: none;
  padding-left: 1em;
}
main aside div {
  counter-reset: skillset;
}
main aside div>p {
  position: relative;
  font-size: 0.8em;
  font-weight: lighter;
  text-align: right;
  margin: 0 1em;
}
main aside div> p strong {
  background-color: var(--bg);
  padding: 0 .5em .2em;
}
main aside div>p:after {
  content: "";
  display: block;
  border-bottom: 1px solid var(--bg-contrast-light);
  margin-top: -.5em;
  margin-right: -1em;
}
main aside div ul {
  font-size: calc(1.3em - ( 0.1em * var(--nth-child)));
  display: flex;
  flex-wrap: wrap;
  justify-content: left;
  gap: .5em;
}
main aside div ul li {
  display: inline-block;
  text-align: center;
  background-color: var(--bg-light);
  line-height: .8;
  padding: .5em;
  border-radius: 5px;
}
main aside div ul li em {
  font-size: 0.5em;
}

/* Footer */
footer {
  margin: 2em;
  padding-top: 1em;
  text-align: center;
  border-top: 1px solid var(--accent);
}

/** Layout - wide  **/
@media only screen and (min-width:720px) {
  body {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
    "header header"
    "main main"
    "footer footer";
    font-size: 12px;
  }
  header {
    grid-area: header;
    display: grid;
    grid-template-columns: subgrid;
    grid-template-rows: repeat(3, auto);
  }
  header h1 {
    white-space: wrap;
  }
  header h2 {
    margin: 0em 1em;
  }
  header ul {
    grid-column: 2 / 3;
    grid-row: 1 / 4;
    flex-direction: column;
    margin-bottom: 1em;
    padding: 1em;
    justify-content: flex-end;
  }
  header p {
    padding: 1.8em 1em 1.2em;
    margin-bottom: 0;
  }
  main {
    grid-area: main;
    display: grid;
    grid-template-columns: subgrid;
    grid-template-rows: auto;
    padding: 0;
  }
  main h2 {
    white-space: wrap;
  }
  main article {
    grid-column: 1 / 2;
    padding: 10px 20px;
  }
  main aside {
    background-color: var(--bg-contrast);
    color: var(--text-contrast);
    grid-column: 2 / 3;
    padding: 10px 20px 50px;
  }
  
  main aside div> p strong {
    background-color: var(--bg-contrast);
  }
  main aside div ul li {
    background-color: var(--bg-contrast-light);
  }
  
  footer {
    grid-area: footer;
  }
  
  /*** ornaments ***/
  header p {
    position: relative;
    border-radius: 0 10px 0 0;
  }
  header p:after {
    content: "";
    display: block;
    position: absolute;
    width: 200px;
    height: 10px;
    background: linear-gradient(-90deg, var(--rainbow));
    top: -8px;
    right: -8px;
    border: 8px solid var(--bg);
    border-radius: 0px 200px 0 200px;
  }
  main aside {
    position: relative;
    border-radius:  0 0 0 10px;
  }
  main aside:after {
    content: "";
    display: block;
    position: absolute;
    width: 200px;
    height: 10px;
    background: linear-gradient(-90deg, var(--rainbow));
    bottom: -8px;
    left: -8px;
    border: 8px solid var(--bg);
    border-radius: 0 200px 0 200px;
  }
 
}
@media screen and (min-width:800px) {
  body {
    font-size: 14px
  }
}
@media screen and (min-width:1200px) {
  body {
    max-width: 1200px;
    margin: auto;
  }
}
