: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;
  
  
    /* Default (light) theme */
  color-scheme: light;
  --bg: var(--snow-3);
  --bg-contrast: var(--nord-1);
  --bg-light: var(--snow-2);
  --text: var(--nord-3);
  --text-contrast: var(--snow-2);
  --accent: var(--frost-2);
  --text-accent: var(--nord-1);
}

/* Light theme */
@media (prefers-color-scheme: dark) {
    :root {
    color-scheme: dark;
    --bg: var(--nord-1);
    --bg-contrast: var(--nord-4);
    --bg-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(1);
  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#perso::before {
  content: "🪪";
}
h2#edu::before {
  content: "🎓";
}
h2#core::before {
  content: "🧬";
}
h2#int::before {
  content: "🗡️";
}

main article h3 {
  font-size: 1.5em;
  margin-top: 0;
  margin-bottom: 0;
}

main article h3+p {
  margin-top: 0;
  line-height: 1;
}

main article ul {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
  gap: .5em .5em;
  padding: 0;
  justify-content: flex-start;
}

main article ul li {
  border: 1px solid var(--bg-contrast);
  padding: .3em;
  border-radius: 5px;
}

/* 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-top: 30px;
    padding: 1em;
    justify-content: flex-start;
  }
  
  header p {
    padding: 3em 1em;
    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;
  }
  
  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: 20px;
    background: linear-gradient(-90deg, 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));
    top: -10px;
    right: -10px;
    border: 10px solid var(--bg);
    border-radius: 0px 200px 0 200px;
  }
  
  main aside {
    position: relative;
  }
  
  
  main aside {
    position: relative;
    border-radius:  0 0 0 10px;
  }
  
  main aside:after {
    content: "";
    display: block;
    position: absolute;
    width: 200px;
    height: 20px;
    background: linear-gradient(-90deg, 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));
    bottom: -10px;
    left: -10px;
    border: 10px 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;
  }
}
