:root {
  --color-background: #fff;
  --color-text-action: #a0591d;
  --color-text-base: #283753;
  --color-button: #527F8A;
  --font-family-sans: Urbanist, system-ui, sans-serif;
  --font-family-mono: Consolas, "Lucida Console", monospace;
  --font-size-root: 24px;
  --line-height-root: 32px;
  --font-weight-root: 400;
  --font-size-xl: 40px;
  --line-height-xl: 48px;
  --font-size-lg: 32px;
  --line-height-lg: 38px;
  --font-size-md: 24px;
  --font-size-sm: 20px;
  --line-height-sm: 28px;

  --color-highlight-home: #324467;
  --color-highlight-other: #324467;
  --color-reverse: #fff;
  --border-radius: 10px;
}
* {
  margin: 0;
}
html {
  box-sizing: border-box;
}
*,
:after,
:before {
  box-sizing: inherit;
}
html {
  font-size: var(--font-size-root);
}
body {
  background: var(--color-background);
  color: var(--color-text-base);
  font: var(--font-weight-root) var(--font-size-root) / var(--line-height-root)
    var(--font-family-sans);
  min-height: 100%;
  max-width: 860px;
  text-size-adjust: none;
  margin: 0 auto;
  padding: 25px 0;

  display: grid;
  grid-template-areas:
    "header"
    "main"
    "footer";
  row-gap: 60px;
  justify-content: space-evenly;
  justify-items: center;
}

body.full {
  max-width: 100%;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: inherit;
  font-weight: 600;
  line-height: 1em;
}
h2 {
  font-size: var(--font-size-lg);
}
h3 {
  font-size: var(--font-size-md);
}
h4 {
  font-size: var(--font-size-sm);
}
h5 {
  font-size: var(--font-size-xs);
}
dt {
  font-weight: var(--font-weight-bold);
}
dd + dt {
  margin-top: var(--rhythm, var(--size-space-md));
}
code,
kbd,
pre,
samp,
var {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-mono);
}
pre > code {
  display: block;
  overflow-x: auto;
  padding: var(--size-space-md);
  tab-size: 2;
}

header {
  grid-area: header;
  display: grid;
}
header h1 {
  justify-self: center;
  margin-bottom: -5px;
}
header h1 svg {
  display: inline-block;
  width: 480px;
  transition: height 0.1s;
}

nav ul {
  display: grid;
  grid-template-columns: auto auto auto;
  padding-bottom: 5px;
  justify-content: center;
  list-style: none;
  gap: 25px;
  padding: 0 15px 0 0;
}

nav li {
  color: var(--color-highlight-other);
  justify-self: right;
  align-content: center;
}

nav .home {
  box-sizing: border-box;
  justify-self: center;
  height: 64px;
  width: 64px;
}

nav .home ~ li {
  justify-self: right;
}

nav a {
  display: grid;
  color: var(--color-button);
  font-size: var(--font-size-xl);
  font-weight: 700;
  text-decoration: none;
  vertical-align: middle;
  align-content: center;
  padding: 0 15px;
  height: 100%;
  border-radius: 10px;
  transition: all 0.1s;
}

nav .about,
nav .work {
  color: var(--color-highlight-other);
}

.about nav .about,
.work nav .work {
  color: var(--color-reverse);
  background: var(--color-highlight-other);
}

nav a img {
  transition: all 0.1s;
}

nav .home a {
  padding: 0;
  border-radius: 10px;
  outline: none;
  overflow: hidden;
}

.home nav .home a {
  outline: 5px solid #324467;
}

main {
  grid-area: main;
}

footer {
  grid-area: footer;
}

body.home header h1 svg path {
  fill: var(--color-highlight-home);
}
body.about header h1 svg path {
  fill: var(--color-highlight-other);
}
body.work header h1 svg path {
  fill: var(--color-highlight-other);
}

main {
  display: grid;
  gap: 20px;
  max-width: 900x;
  padding: 0 20px;
}

.home main,
.work main {
  gap: 60px;
}

main .intro {
  font-size: var(--font-size-xl);
  line-height: var(--line-height-xl);
  background: var(--color-highlight-home);
  color: var(--color-reverse);
  padding: 20px 30px;
  transform: rotate(-2deg);
  text-wrap: balance;
  border-radius: var(--border-radius);
  font-weight: 300;
  scale: 1.1;
  transition: all 0.1s;
}
main .activities {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
main .activities a,
main .button,
main ul.contact a {
  background: var(--color-button);
  color: var(--color-reverse);
  padding: 15px 20px;
  text-wrap: balance;
  border-radius: var(--border-radius);
  line-height: 1em;
  text-decoration: none;
  text-align: center;
  height: fit-content;
  transition: all 0.1s;
}

nav a:hover {
  scale: 1.1;
}

.home nav .home a:hover,
.work nav .work:hover,
.about nav .about:hover {
  scale: 1;
}

main .activities a:hover,
main .button:hover,
main ul.contact a:hover {
  scale: 1.05;
  filter: brightness(1.1)
}

main .button {
  width: fit-content;
}

main .contact p {
  text-align: center;
  text-wrap: balance;
}

main ul.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
}

main ul.contact a {
  display: block;
}

.portrait,
.icon {
  border-radius: var(--border-radius);
  width: 30%;
  height: auto;
  float: right;
  margin: 10px;
}

.portrait {
  transform: rotate(-2deg);
  width:40%;
}

footer {
  text-align: center;
  font-size: var(--font-size-sm);
  padding: 20px;
}

.timeline {
  background: #1c263a;
  color: var(--color-reverse);
  padding: 20px;
  margin: 0 -20px;
  
  display: grid;
  grid-template-areas:
    "title    icon"
    "subtitle icon";
  column-gap: 10px;
}

.timeline p {
  font-size: var(--font-size-sm);
}

main section .item {
  display: grid;
  gap: 20px;
}

main section h3 {
  font-size: var(--font-size-md);
  line-height: var(--line-height-md);
  margin-top: 30px;
}

.timeline h2 {
  grid-area: title;
  align-self: end;
}
.timeline p {
  grid-area: subtitle;
  align-self: end;
}
.timeline .timeframe {
  white-space: nowrap;
}
.timeline img {
  grid-area: icon;
  max-width: 72px;
  justify-self: end;
}

/* Gallery */

carou-scroll {
  border-radius: var(--border-radius);
  scroll-snap-type: x mandatory;
  overflow-x: scroll;
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
	overflow-y: hidden;
  counter-reset: items;
  scroll-behavior: smooth;
}

.light carou-scroll {
  outline: 2px solid rgba(0, 0, 0, .2);
}

.gallery {
  position:relative;
}

.gallery img {
  border-radius: var(--border-radius);
  display:block;
  height: auto;
	max-width: 100%;
  scroll-snap-align: start;
  flex-basis: 100%;
  flex-shrink: 0;
  counter-increment: items;
  position: relative;
} 

.gallery button.previous,
.gallery button.next {
  position:absolute;
  bottom: 2em;
  left: 1em;
  margin:0;
  padding:0;
  height: 4em;
  width: 4em;
  cursor:pointer;
  visibility: hidden;
}

.gallery button.next {
  left:initial;
  right: 1em;
}

.gallery button.previous:after,
.gallery button.next:after {
  visibility: visible;
  display: block;
  content: " ";
  width:4em;
  height:4em;
  background: url(/images/gallery-button.svg);
  background-size: 100%;
  opacity:.75;
  position:absolute;
  top:0;
  left:0;
}

.gallery button.next:after {
  transform:scaleX(-1);
}

.gallery button.previous:disabled,
.gallery button.next:disabled {
  opacity: .25;
  cursor: default;
}

.gallery ::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}
.gallery ::-webkit-scrollbar-thumb {
 background: #888;
 border-radius: 10px;
 border: 4px solid transparent;
 background-clip: padding-box;  
}

.addons {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 30px;
}

.addons li {
  display: grid;
  grid-template-columns: 64px auto;
  grid-template-areas:
    "icon title"
    "icon description";
  column-gap: 20px;
  justify-items: start;
}

.addons img {
  grid-area: icon;
  max-width: 64px;
  height: auto;
  border-radius: var(--border-radius);
}

.addons a {
  grid-area: title;
}
.addons p {
  grid-area: description
}

@media (max-width: 500px) {
  .portrait {
    float: none;
    width: 100%;
    margin: 0 0 20px 0;
  }
}

@media (max-width: 960px) {
  main .intro {
    scale: 1;
    font-size: var(--font-size-lg);
    line-height: var(--line-height-lg);
    padding: 20px;
  }
}

@media (min-width: 860px) {
  html {
    margin-left: calc(100vw - 100%);
    margin-right: 0;
  }
  .timeline {
    border-radius: var(--border-radius);
  }
}

@media  (max-width: 800px) {
  .gallery button.previous,
  .gallery button.next,
  .gallery button.previous:after,
  .gallery button.next:after {
    height: 3em;
    width: 3em;
  }
}

@media (max-width: 600px) {
  body {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-sm);
  }
  body,
  header {
    width: 100%;
    max-width: none;
  }
  body,
  main {
    gap: 40px;
  }
  main .intro {
    border-radius: 0;
    transform: rotate(0deg);
  }
  main {
    padding: 0 20px;
  }
  .home main {
    padding: 0;
  }
  header h1 svg {
    width: 100%;
  }
  nav ul {
    padding: 0 10px 0 0;
    gap: 10px;
  }

  nav a {
    font-size: var(--font-size-md);
    padding: 0 10px;
  }
  nav .home {
    width: 48px;
    height: 48px;
  }
  main {
    width: 100%;
    max-width: none;
  }

  main .activities {
    gap: 10px;
    margin: 0 20px;
    grid-template-columns: 1fr;
  }
  .home main .contact {
    margin: 0 20px;
  }
  main .activities a {
    width: 56%;
    max-width: 300px;
    margin: 0 auto;
  }
}