:root {
  /* Colours */

  --red: rgb(71, 32, 34);

  --blue: rgb(11, 60, 73);

  --yellow: rgb(255, 213, 4);

  --cyan: rgb(102, 127, 125);

  --grey: rgb(185, 197, 193);

  --green: rgb(88, 85, 50);

  --lgreen: rgb(144, 169, 89);

  --pink: rgb(252, 211, 222);

  --flickr: rgb(255, 0, 136);

  --work2: rgb(255, 0, 136);

  --eth: rgb(32, 92, 175);

  --design: rgb(185, 197, 193);

  --eden: rgb(88, 85, 50);

  --text-light: rgb(255, 255, 255);
  --text-dark: rgb(0, 0, 0);

  --text-offlight: rgb(255, 255, 255);
  --text-offdark: rgb(19, 19, 19);
  
  --background-light: rgb(255, 255, 255);
  --background-dark: rgb(19, 19, 19);

  --background-offlight: rgb(249, 249, 249);
  --background-offdark: rgb(26, 26, 26);
  
  --hover-light: rgb(236, 236, 236);
  --hover-dark: rgb(36, 36, 36);

  --gold: rgb(219, 187, 119);
  --silver: rgb(192, 192, 192);

  --features-light: rgb(204, 204, 204);
  --features-softlight: rgb(236, 236, 236);
  --features-dark: rgb(51, 51, 51);
  --features-softdark: rgb(19, 19, 19);
  
  /* Colour-Assignments */
  --index: var(--red);
  --consulting: var(--grey);
  --contact: var(--cyan);
  --cv: var(--red);
  --ducks: var(--yellow);
  --dykwia: var(--lgreen);
  --quotes: var(--red);
  --heart: var(--heart);
  --research: var(--eth);
  --stl: var(--green);
  --work: var(--work2);
  
  --bg_col_2: color-mix(in srgb, var(--bg_col_1) 80%, white);
  --bg_col_3: color-mix(in srgb, var(--bg_col_1) 20%, white);
  --bg_col_4: color-mix(in srgb, var(--bg_col_1) 50%, white);
  
  /* Spacing & Sizes */
  --max_width: 1000px;
  --switch_width: 1015px;

  /* Font Sizes */
  

  /* Settings for light mode */
  --text: var(--text-dark);
  --text-off: var(--text-offdark);
  --text-r: var(--text-light);
  --background: var(--background-light);
  --background-off: var(--background-offlight);
  --hover: var(--hover-light);
  --features: var(--features-light);
  --features-soft: var(--features-softlight);
  --features-r: var(--features-dark);
  --features-soft-r: var(--features-softdark);

  --14: rgb(64, 64, 64);
  --24: rgb(128, 128, 128);
  --34: rgb(192, 192, 192);
}

/* Settings for dark mode */
[data-theme="dark"] {
  --text: var(--text-light);
  --text-off: var(--text-offlight);
  --text-r: var(--text-offdark);
  --background: var(--background-dark);
  --background-off: var(--background-offdark);
  --hover: var(--hover-dark);
  --features: var(--features-dark);
  --features-soft: var(--features-softdark);
  --features-r: var(--features-light);
  --features-soft-r: var(--features-softlight);

  --14: rgb(192, 192, 192);
  --24: rgb(128, 128, 128);
  --34: rgb(64, 64, 64);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background-color: var(--background-off);
  color: var(--text);
}
html {
  overflow-y: scroll;
  scrollbar-width: none;
}
html::-webkit-scrollbar {
  width: 0;
  background: transparent;
}
.header-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 56px;
  z-index: 8;
  background-color: var(--bg_col_1);
}
header, header a {
  color: var(--text-light);
}
.main-header,
.subheader {
  width: 100%;
  height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
}
.subheader {
  position: relative;
  margin-top: 56px;
  z-index: 6;
  background-color: var(--bg_col_2);
}
.header-left, .header-right {
  display: flex;
  flex: 1;
  height: 100%;
  align-items: center;
}
.header-left {
  padding: 1rem 0 1rem 3rem;
}
.header-right {
  padding: 0 3rem 0 0;
}
.logo {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text-light);
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  z-index: 11;
}
.menu-container {
  flex: 1;
  display: flex;
  width: 100%;
  height: 56px;
  align-items: center;
  position: relative;
}
.menu {
  display: flex;
  margin-left: 0;
  height: 100%;
  align-items: center;
}
.menu a {
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 0 1rem;
}
.menu-item {
  display: flex;
  cursor: pointer;
  padding: 0;
  height: 100%;
  align-items: center;
  color: var(--text-light);
}
.menu-item a {
  width: 100%;
  padding: 1rem 0.9rem 1rem 1rem;
  z-index: 11;
  color: var(--text-light);
}
.menu-item.active {
  border-bottom: 2px solid var(--text-light);
}
.menu-item.active a {
  transform: translateY(1px);
}
.menu-item:hover, .submenu-parent:has(+ .submenu:hover) {
  background: var(--bg_col_2);
  cursor: pointer;
  transition: background-color 0.5s ease;
}
.menu-item.active:hover {
  background: inherit;
  color: inherit;
  cursor: default;
  transition: none;
}
.light-box {
  position: absolute;
  top: 0;
  right: 3rem;
  z-index: 9;
  height: 100%;
  width: auto;
  align-content: center;
}
#light-toggle {
  width: auto;
  height: auto;
  font-size: 1.3rem;
  color: var(--text-light);
  background-color: transparent;
  border: none;
  cursor: pointer;
}
#light-toggle * {
  display: none;
}
.subheader-item {
  display: flex;
  padding: 0;
  height: 100%;
  align-items: center;
}
.subheader-item a {
  width: 100%;
  padding: 1rem;
}
.submenu {
  position: fixed;
  top: 56px;
  right: 0;
  width: 50%;
  height: calc(100vh - 56px);
  background-color: color-mix(in srgb, var(--background-offdark) 80%, transparent 20%);
  border-left: 1px solid var(--14);
  padding: 1rem 0;
  border-top: 1px solid var(--14);
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s ease, opacity 0.3s ease;
  z-index: 7;
  display: flex;
  flex-direction: column;
}
.submenu .atext {
  padding: 0 0.5rem;
}
.submenu .tag {
  background-color: var(--silver);
}
.submenu-item {
  padding: 1rem;
  text-decoration: none;
  font-size: 1rem;
  align-items: center;
  transition: background-color 0.5s ease, color 0.5s ease;
}
.submenu-item:hover,
.submenu-item:focus-within {
  cursor: pointer;
  background: var(--bg_col_2);
}
.submenu-parent:hover + .submenu,
.submenu-parent:focus-within + .submenu, 
.submenu:hover {
  opacity: 1;
  transform: translateX(0) translateY(0px);
  pointer-events: auto;
}
.submenu-parent-arrow {
  font-size: 0.9em;
  transition: transform 0.3s ease;
  display: inline-block;
}
.submenu-parent:hover .submenu-parent-arrow,
.submenu-parent:focus-within .submenu-parent-arrow,
.submenu-parent:has(+ .submenu:hover) .submenu-parent-arrow {
  transform: rotate(90deg);
}
.tags {
  gap: 1rem;
}
.tag {
  display: inline-block;
  border-radius: 30px;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  background-color: var(--14);
  color: var(--text-light);
}
.main-text .tag {
  margin: 0.4rem 0 0 0;
}
.submenu-item .tags {
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.submenu-item:hover .tags {
  opacity: 1;
  pointer-events: auto;
}
.submenu-item .tag {
  display: inherit;
  margin-left: 0.5rem;
}
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-light);
  cursor: pointer;
  padding-bottom: 5px;
  align-self: center;
  height: 100%;
  overflow: hidden;
  z-index: 11;
}
.tree {
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.95rem;
}
.tree a {
  color: var(--text-light);
  text-decoration: underline;
}
.main-body {
  background-color: var(--background);
  overflow-y: auto;
  /*transition: color 0.6s ease, background-color 0.6s ease, border 0.6s ease;*/
}
.footer {
  border-top: 1px solid var(--features);
  padding: 1rem 3rem;
  margin-top: auto;
  background-color: var(--background-off);
  z-index: 5;
  text-align: left;
  font-size: 0.9rem;
  color: var(--features);
}

@media (min-width: 1016px) {
  html, body {
    min-width: var(--max_width);
  }
}

@media (max-width: 1015px) {
  .header-left {
    padding-left: 1.5rem;
  }
  .header-right {
    padding-right: 1.5rem;
    border: none;
  }
  .menu-container {
    position: absolute;
    top: 56px;
    right: 0;
    width: 100%;
    background-color: var(--bg_col_4);
    display: none;
    flex-direction: column;
    height: auto;
  }
  .menu-container.active {
    display: flex;
  }
  .menu {
    flex-direction: column;
    width: 100%;
  }
  .menu-item {
    width: 100%;
    z-index: 9;
  }
  .menu-item a {
    width: 100%;
    padding: 1rem 1.5rem;
  }
  .menu-item:hover, .menu-item.active {
    border-bottom: none;
  }
  .menu-item:hover a {
    transform: translateY(0px);
  }
  #light-toggle {
    display: none;
  }
  .submenu-parent:hover .submenu-parent-arrow,
  .submenu-parent:focus-within .submenu-parent-arrow {
    transform: rotate(0);
  }
  .submenu-parent.expanded .submenu-parent-arrow {
    transform: rotate(90deg);
  }
  .submenu {
    padding: 0 !important;
    position: inherit;
    margin: 0 !important;
    width: 100%;
    height: auto;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    border: none;
    display: none;
    flex-direction: column;
    background-color: var(--bg_col_3);
  }
  .submenu-item:hover {
    color: inherit;
  }
  .submenu-parent.expanded + .submenu {
    display: flex;
  }
  .submenu-item {
    width: 100%;
    padding: 0.75rem 1.5rem;
  }
  .submenu a {
    padding: 0;
  }
  .submenu-item .tags {
    opacity: 1;
  }
  .submenu-item .tag {
    border-radius: 19px;
    height: 19px;
    padding: 0.3rem .75rem;
    font-size: 0.45rem;
  }
  .hamburger {
    display: block;
    margin-left: auto;
  }
  .footer {
    padding: 1rem 1.5rem;
  }
}

#page-transition {
  position: fixed;
  top: 100%;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--red);
  z-index: 10;
  transition: transform 0.6s ease, opacity 1s ease, visibility 1s ease;
  pointer-events: none;
  display: none;
  opacity: 1;
  visibility: visible;
  justify-content: center;
  align-items: center;
}
#page-transition.default {
  display: block;
  top: 0;
}
#page-transition.fade-out {
  opacity: 0;
  visibility: hidden;
}
.page-intro-container {
  width: 240px;
}
#page-intro {
  display: none;
  transform: scale(6);
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  animation: typing 2.25s steps(1, end) 0s infinite alternate, blink 1s step-end infinite;
  border-right: 0.15em solid currentColor;
  transform-origin: left;
}
@keyframes typing {
  0%   { width: 0; }
  15%  { width: 16.5px; }
  30%  { width: 29.5px; }
  60%  { width: 39.5px; }
  100% { width: 39.5px; }
}
@keyframes blink {
  50% { border-color: transparent; }
}
._ {
  display: inline-block;
  visibility: hidden;
  animation: underscore-blink 4.5s steps(1, end) infinite;
}
@keyframes underscore-blink {
  0%    { visibility: hidden; }
  30%   { visibility: visible; }
  70%   { visibility: hidden; }
  100%  { visibility: hidden; }
}
.T {
  display: inline-block;
  visibility: hidden;
  animation: t-blink 4.5s steps(1, end) infinite;
}
@keyframes t-blink {
  0%    { visibility: hidden; }
  15%   { visibility: visible; }
  85%   { visibility: hidden; }
  100%  { visibility: hidden; }
}

