/* Load fonts */
@font-face {
  font-family: 'VG5000';
  src: url('/fonts/VG5000-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Abordage';
  src: url('/fonts/Abordage-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Consolas';
  src: url('/fonts/Consolas-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Consolas';
  src: url('/fonts/Consolas-Italic.ttf') format('truetype');
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: 'Consolas';
  src: url('/fonts/Consolas-Bold-Italic.ttf') format('truetype');
  font-weight: bold;
  font-style: italic;
}

/* Global reset and defaults */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  font-family: 'Consolas', monospace;
  font-size: 14px;
  line-height: 1.5;
  color: white;
  background: black;
  /* allow #background to show through */
}

a {
  color: white;
  text-decoration: underline;
}

a:visited {
  color: white;
}

a:hover {
  color: white;
  text-decoration: underline;
}

a:active {
  color: white;
}

.big-link-btn {
  font-family: 'VG5000', 'Abordage', 'Consolas', monospace !important;
  font-size: 2rem !important;
  text-decoration: underline !important;
  display: inline-block !important;
}

/* Background (Three.js container) */
#background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  /* keep it behind content but above body */
  background: black;
  /* fallback if WebGL fails */
}

/* Menu */
#menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 100%;
  padding: 20px;
  font-family: 'VG5000', monospace;
  font-size: 1.5rem;
  z-index: 10;
  /* make sure it sits above the 3D background */
}

#menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#menu>ul>li {
  margin-bottom: 30px;
}

#menu>ul>li>a {
  text-transform: uppercase;
  text-decoration: underline;
}

#menu li {
  margin-bottom: 10px;
}

#menu a {
  text-decoration: none;
  color: white;
  display: block;
}

#menu a:hover {
  text-decoration: underline;
}

/* Active menu item */
#menu a.active {
  font-weight: bold;
  font-family: 'VG5000', monospace;
}

/* Submenu */
#menu li ul {
  display: none;
  margin-top: 5px;
  margin-left: 0;
}

#menu li.open ul {
  display: block;
}

#menu li ul li {
  margin-bottom: 5px;
}

/* Content */
#content {
  margin-left: 300px;
  padding: 20px;
  max-width: 1200px;
  position: relative;
  z-index: 5;
  /* ensure content is above background */
}

#content h1,
#content h2,
#content h3,
#content h4,
#content h5,
#content h6 {
  font-weight: bold;
  font-family: 'VG5000', 'Abordage', 'Consolas', monospace;
  max-width: 800px;
  margin: 0 0 1em 0;
}

h1 {
  font-size: 4rem;
}

h2 {
  font-size: 3rem;
}

#content p {
  font-family: 'Consolas', monospace;
  font-weight: normal;
  max-width: 800px;
  margin: 0 0 1em 0;
}

#content img {
  display: block;
  max-width: 1200px;
  width: 100%;
  height: auto;
  margin-bottom: 1em;
}

/* Responsive */
@media (max-width: 800px) {
  #menu {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    flex-wrap: wrap;
    /* allows submenu to wrap and push content */
  }

  #menu ul {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
  }

  #menu>ul>li {
    margin-bottom: 0px;
  }

  #menu li {
    margin: 0;
    position: relative;
  }

  /* Submenu flows naturally, pushing content */
  #menu li ul {
    position: relative;
    top: auto;
    left: auto;
    background: transparent;
    padding: 10px 0 0 0;
  }

  #menu li ul li {
    margin: 5px 0;
  }

  #content {
    margin-left: 0;
    margin-top: 20px;
    padding: 20px;
    max-width: 100%;
  }

  #content img {
    max-width: 100%;
  }
}