/* Default variables */
:root {
  /* Sizes */
  --header-height: 50px;
  --control-size: 32px;

  /* Colours (dark) */
  --bg-color: #111;
  --text-color: #eee;
  --panel-color: #181818;
  --border-color: #333;
  --link-bg: #111;
  --link-hover: #222;
}

/* Default to device (colours light) */
@media (prefers-color-scheme: light) {
  :root {
    --bg-color: #ffffff;
    --text-color: #111111;
    --panel-color: #f3f3f3;
    --border-color: #cccccc;
    --link-bg: #ffffff;
    --link-hover: #eeeeee;
  }
}

/* Light theme */
body.light {
  --bg-color: #ffffff;
  --text-color: #111111;
  --panel-color: #f3f3f3;
  --border-color: #cccccc;
  --link-bg: #ffffff;
  --link-hover: #eeeeee;
}

/* Dark theme */
body.dark {
  --bg-color: #111;
  --text-color: #eee;
  --panel-color: #181818;
  --border-color: #333;
  --link-bg: #111;
  --link-hover: #222;
}

/* Global styles */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* transition: cubic-bezier(1, 0, 0, 1)  background 2.3s, color 2.3s, border-color 0.3s; */
}

/* Topbar styles */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);

  background: var(--panel-color);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 16px;
  box-sizing: border-box;

  z-index: 1000;
}

.site-title {
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

.theme-btn {
  width: var(--control-size);
  height: var(--control-size);

  background: transparent;
  color: var(--text-color);

  border: 1px solid var(--border-color);
  border-radius: 4px;

  cursor: pointer;
  font-size: 1rem;

  display: flex;
  align-items: center;
  justify-content: center;
  /* transition: cubic-bezier(1, 0, 0, 1)  background 2.3s, color 2.3s, border-color 0.3s; */
}

.theme-btn:hover {
  background: var(--link-hover);
}

/* Main content area styles */
.main {
  height: calc(100vh - var(--header-height));
  padding-top: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  overflow: hidden;
}


/* Titles styles */
h1 {
  font-size: 3rem;
  margin-bottom: 10px;
}

.subtitle {
  opacity: 0.8;
  margin-bottom: 30px;
}

/* Navigation styles */
.nav {
  display: flex;
  gap: 20px;
}

.nav a {
  text-decoration: none;
  color: var(--text-color);

  padding: 12px 20px;

  border: 1px solid var(--border-color);
  border-radius: 6px;

  background: var(--link-bg);
}

.nav a:hover {
  background: var(--link-hover);
}