/* Import JetBrains Mono */
@import url('https://fonts.cdnfonts.com/css/jetbrains-mono');

/* Root variables */
:root {
  --font-family: "JetBrains Mono", monospace;
  --line-height: 1.5rem;
  --border-thickness: 2px;
  --text-color: #fff;
  --text-color-alt: #aaa;
  --background-color: #000;
  --background-color-alt: #111;
  --font-weight-normal: 500;
  --font-weight-bold: 800;
  --section-max-width: 90ch;
}

/* Reset & box-sizing */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Body styling with sticky footer and dynamic horizontal centering */
body {
  font-family: var(--font-family);
  font-weight: var(--font-weight-normal);
  background: var(--background-color);
  color: var(--text-color);
  line-height: var(--line-height);

  display: flex;
  flex-direction: column;
  align-items: center;        /* horizontally center content */
  min-height: 100vh;          /* full viewport height */
  margin: 0;
  padding: 2ch;
}

/* Header */
header.header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 2rem;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
}

header p.subtitle {
  color: var(--text-color-alt);
  margin-top: 0.5rem;
  font-size: 1rem;
}

/* Main container fills remaining space */
main {
  flex: 1;                     /* pushes footer down */
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  max-width: var(--section-max-width); /* constrain content width */
}

/* Sections */
section {
  border: var(--border-thickness) solid var(--text-color);
  padding: 2ch;
  width: 100%;
  box-sizing: border-box;
}

/* Section headings */
section h2 {
  font-size: 1rem;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  margin-bottom: 1ch;
  border-bottom: var(--border-thickness) solid var(--text-color-alt);
  padding-bottom: 0.5ch;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1ch;
}

th, td {
  border: var(--border-thickness) solid var(--text-color);
  padding: 0.75ch 1ch;
  text-align: left;
}

th {
  font-weight: var(--font-weight-bold);
}

/* Links in tables */
td a {
  color: var(--text-color);
  text-decoration: none;
}

td a:hover {
  text-decoration: underline;
}

/* Footer full-width */
footer {
  width: 100%;                 /* full body width */
  display: flex;
  justify-content: center;     /* center table horizontally */
  margin-top: auto;            /* push footer to bottom */
  padding: 2ch;
  box-sizing: border-box;
}

/* Footer table */
.footer-table {
  width: 100%;
  max-width: var(--section-max-width); /* same as main content */
  border-collapse: collapse;
}

.footer-table td {
  border: var(--border-thickness) solid var(--text-color);
  padding: 1ch;
  width: 50%;                  /* equal width */
}

.footer-table td:first-child {
  text-align: left;
}

.footer-table td:last-child {
  text-align: right;
}

/* Responsive tweaks */
@media screen and (max-width: 600px) {
  body {
    padding: 1ch;
  }

  section {
    padding: 1ch;
  }

  header h1 {
    font-size: 1.5rem;
  }

  header p.subtitle {
    font-size: 0.9rem;
  }

  .footer-table td {
    padding: 0.5ch;
  }
}
