/*----------------------------------------
  Variables: Centralized color & font settings
----------------------------------------*/
:root {
    /* Core palette */
    --bg: #121212;
    --surface: #1e1e1e;
    --text-primary: #e0e0e0;
    --text-secondary: #aaaaaa;
    --accent: #bb86fc;
    --accent-light: #03dac6;

    /* Typography */
    --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/*----------------------------------------
  Global resets & box model
----------------------------------------*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bg);
    color: var(--text-primary);
    font-family: var(--font-system);
    line-height: 1.6;
    text-align: center;
    position: relative;
}

/*----------------------------------------
  Headings & Typography
----------------------------------------*/
h1 {
    margin: 1.5rem 0 0.5rem;
    font-size: 2.5rem;
    font-weight: 700;
}

h3 {
    margin: 0.5rem 0;
    font-weight: 400;
    color: var(--text-secondary);
}

/*----------------------------------------
  Navigation icon bar
----------------------------------------*/
nav {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin: 1.5rem 0;
}

nav a img {
    width: 40px;
    height: 40px;
    filter: invert(100%);
    transition: filter 0.3s ease;
}

nav a:hover img,
nav a:focus img {
    filter: brightness(1.2) invert(100%);
}

/*----------------------------------------
  Links & Buttons
----------------------------------------*/
a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    color: var(--accent-light);
    text-decoration: underline;
}

/* Special “Go back” link positioning */
body > a:first-of-type {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/*----------------------------------------
  Content elements
----------------------------------------*/
pre {
    background-color: var(--surface);
    color: var(--text-secondary);
    padding: 1rem;
    margin: 1rem auto;
    border-radius: 8px;
    overflow: auto;
    text-align: left;
    max-width: 90%;
    font-family: Menlo, Consolas, 'Courier New', monospace;
}

dl {
    margin: 1rem auto;
    text-align: left;
    max-width: 700px;
}

dt {
    margin-top: 1.25rem;
    font-weight: 600;
}

dd {
    margin-left: 1rem;
    color: var(--text-secondary);
}

/*----------------------------------------
  Page structure
----------------------------------------*/
main {
    flex: 1;
}

/*----------------------------------------
  Footer
----------------------------------------*/
footer {
    background-color: var(--surface);
    color: var(--text-secondary);
    padding: 0.75rem 0;
    text-align: center;
}
