/* Import custom font */
@font-face {
  font-family: "Cascadia Code";
  font-display: swap;
  src: url("/fonts/CascadiaCode.woff2") format("woff2");
}

/* Theme variables - Define colors for light and dark modes */
:root {
  --bg-color: #ffffff;
  --text-color: #000000;
  --toggle-bg: #f0f0f0;
  --toggle-color: #333333;
}

/* Dark mode color overrides */
[data-theme="dark"] {
  --bg-color: #181a1b;
  --text-color: #e3e3e3;
  --toggle-bg: #333333;
  --toggle-color: #ffffff;
}

/* Global styles */
* {
  font-family: Cascadia Code;
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
}

/* Page layout */
html,
body {
  margin: 0;
  padding: 0;
  border: 0;
  background-color: var(--bg-color);
  height: 100%;
}

main {
  height: 80%;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Logo */
.img-cogs {
  width: 150px;
  margin: 0;
  padding: 0;
  border: 0;
}

/* Dark mode logo adjustment - invert black to white and adjust brightness */
[data-theme="dark"] .img-cogs {
  filter: invert(1) brightness(0.89);
}

/* Typography */
h1 {
  font-size: 58px;
  margin-bottom: 0;
}

h2 {
  font-size: 20px;
  margin-top: 0;
}

/* Theme toggle button */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  padding: 10px;
  border: 0;
  border-radius: 50%;
  background-color: var(--toggle-bg);
  color: var(--toggle-color);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.theme-toggle:hover {
  transform: scale(1.1);
}

/* External links */
.external-links {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
}

.external-link {
  width: 40px;
  height: 40px;
  padding: 0px;
  border: 0;
  border-radius: 50%;
  background-color: var(--toggle-bg);
  color: var(--toggle-color);
  font-size: 20px;
  line-height: 1;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s;
}

.external-link:hover {
  transform: scale(1.1);
}

.external-link-img {
  width: 24px;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
}

/* Dark mode LinkedIn icon */
[data-theme="dark"] .external-link-img[src="images/in-black.png"] {
  content: url("images/in-white.png");
}

/* Light mode Brønnøysund Registry icon */
[data-theme="light"] .external-link-img[src="images/brreg.png"] {
  filter: invert(1);
}

/* Mobile responsive design */
@media only screen and (max-width: 600px) {
  main {
    flex-direction: column;
  }
  h1 {
    font-size: 40px;
  }
  h2 {
    font-size: 14px;
  }
}
