/*
* LittleLink
* https://littlelink.io
* Free to use under the MIT license
* http://www.opensource.org/licenses/mit-license.php
*/

/* Base Typography Settings
-------------------------------------------------- */
:root {
  font-size: 16px;

  /* Using a 1.25 modular scale for typography */
  --scale-0: 1rem;           /* 16px */
  --scale-1: 1.25rem;        /* 20px */
  --scale-2: 1.563rem;       /* 25px */
  --scale-3: 1.953rem;       /* 31px */
  --scale-4: 2.441rem;       /* 39px */
  --scale-5: 3.052rem;       /* 49px */

  /* Spacing units */
  --spacing-xs: 0.5rem;      /* 8px */
  --spacing-s: 1rem;         /* 16px */
  --spacing-m: 1.5rem;       /* 24px */
  --spacing-l: 2rem;         /* 32px */
  --spacing-xl: 3rem;        /* 48px */
  --spacing-xxl: 4rem;       /* 64px */

  /* Light theme colors (default) */
  --bg-color: #ffffff;
  --text-color: #000000;
  --link-color: #2563eb;
  --link-hover: #1d4ed8;
  --code-bg: #f1f1f1;
  --code-border: #e1e1e1;
  --code-text: #000000;
  --hr-color: #2563eb;
  --focus-color: #2563eb;
}

/* Dark theme colors */
:root.theme-dark {
  --bg-color: #0C0C0C;
  --text-color: #ffffff;
  --link-color: #7983F5;
  --link-hover: #9BA3F7;
  --code-bg: #1a1a1a;
  --code-border: #333;
  --code-text: #7983F5;
  --hr-color: #7983F5;
  --focus-color: #7983F5;
}

/* Auto theme - follows system preference */
@media (prefers-color-scheme: dark) {
  :root.theme-auto {
    --bg-color: #0C0C0C;
    --text-color: #ffffff;
    --link-color: #7983F5;
    --link-hover: #9BA3F7;
    --code-bg: #1a1a1a;
    --code-border: #333;
    --code-text: #7983F5;
    --hr-color: #7983F5;
    --focus-color: #7983F5;
  }
}

/* Light theme explicit */
:root.theme-light {
  --bg-color: #ffffff;
  --text-color: #000000;
  --link-color: #2563eb;
  --link-hover: #1d4ed8;
  --code-bg: #f1f1f1;
  --code-border: #e1e1e1;
  --code-text: #000000;
  --hr-color: #2563eb;
  --focus-color: #2563eb;
}

/* Grid
-------------------------------------------------- */
.container {
  position: relative;
  width: 100%;
  max-width: 37.5rem;        /* 600px */
  text-align: center;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-m) 0 var(--spacing-m);
  box-sizing: border-box;
}

.container-left {
  position: relative;
  width: 100%;
  max-width: 37.5rem;
  text-align: left;
  margin: 0 auto;
  padding: 0 1.25rem;
  box-sizing: border-box;
}

.container-left p {
  margin-bottom: 1rem;       /* 16px space between paragraphs */
}

.column {
  position: center;
  width: 100%;
  float: center;
  box-sizing: border-box;
}

/* For devices larger than 400px */
@media (min-width: 25rem) {  /* 400px */
  .container {
    width: 85%;
    padding-left: 0;
    padding-right: 0;
  }
}

/* For devices larger than 550px */
@media (min-width: 34.375rem) {  /* 550px */
  .container {
    width: 80%;
  }
  .column,
  .columns {
    margin-left: 0;
  }
  .column:first-child,
  .columns:first-child {
    margin-left: 0;
  }
}

/* Base Styles
-------------------------------------------------- */
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.125rem;          /* 18px */
  font-weight: 400;
  line-height: 1.6;
}

/* Typography
-------------------------------------------------- */
h1 {
  margin: 0 0 var(--spacing-m) 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--scale-4);  /* ~39px */
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

h2 {
  margin: 0 0 var(--spacing-s) 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--scale-2);
  font-weight: 700;
  line-height: 1.3;
}

h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--scale-1);
  font-weight: 700;
  margin: var(--spacing-l) 0 var(--spacing-s) 0;
}

.container p {
  margin: 0 0 var(--spacing-xl) 0;
  font-size: 1.125rem;           /* 18px */
  line-height: 1.7;
}

/* Links
-------------------------------------------------- */
a {
  color: var(--link-color);
  text-decoration: underline;
}

a:hover {
  color: var(--link-hover);
}

/* Buttons
-------------------------------------------------- */
.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18.75rem;           /* 300px */
  min-height: 3rem;          /* 48px */
  padding: 0.75rem 1rem;     /* 12px ; 16px */
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;           /* 16px */
  font-weight: 700;
  text-decoration: none;
  white-space: normal;
  background-color: var(--button-background, transparent);
  color: var(--button-text, #000000);
  border: var(--button-border, none);
  border-radius: 0.5rem;
  cursor: pointer;
  box-sizing: border-box;
  hyphens: auto;
  margin-bottom: 1rem;
  text-align: center;
  line-height: 1.4;
}

/* Button Stack */
.button-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Icons
-------------------------------------------------- */
.icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

/* Custom icon variants for gaming site */
.icon-no-pad {
  padding: 0;
  vertical-align: middle;
  width: 1.5rem;
  height: 1.5rem;
}

.icon-right-pad {
  padding: 0 0.75rem 0 0;
  vertical-align: middle;
  width: 1.5rem;
  height: 1.5rem;
}

.icon-larger {
  padding: 0 0 0.375rem 0;
  vertical-align: middle;
  width: 2rem;
  height: 2rem;
}

/* Avatar
-------------------------------------------------- */
.avatar {
  width: 8rem;               /* 128px */
  height: 8rem;
  object-fit: cover;
  background-position: center;
  margin-bottom: var(--spacing-l);
  margin-left: auto;
  margin-right: auto;
  display: block;
}

/* Modifier for no avatar rounding */
.avatar--none {
  border-radius: 0%;
}

/* Modifier for rounded avatar */
.avatar--rounded {
  border-radius: 50%;
}

/* Modifier for slightly rounded corners */
.avatar--soft {
  border-radius: 0.5rem;     /* 8px rounded corners */
}

/* Footer
-------------------------------------------------- */
footer {
  margin: var(--spacing-xxl) 0;  /* 4rem (64px) top and bottom */
  font-size: var(--scale-0);
}

/* Focus Styles
-------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
}

/* Button Text Color Override
-------------------------------------------------- */
.button:hover,
button:hover {
  color: var(--button-text);
}

/* Responsive Typography
-------------------------------------------------- */
@media (max-width: 34.375rem) {  /* 550px */
  h1 {
    font-size: var(--scale-3);
  }
  body {
    font-size: 1rem;
  }
  .container p {
    font-size: 1rem;
  }
  .button,
  button {
    font-size: 0.9375rem;  /* 15px */
  }
  .avatar {
    margin-bottom: var(--spacing-m);
  }
  footer {
    margin: var(--spacing-xl) 0;  /* 3rem (48px) top and bottom */
  }
}

/* Privacy Page Styles
-------------------------------------------------- */
nav {
  margin: var(--spacing-l) 0;
  text-align: left;
}

section {
  margin: var(--spacing-xl) 0;
  text-align: left;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--spacing-m) 0;
}

ul li {
  margin-bottom: var(--spacing-xs);
}

/* Privacy page specific responsive adjustments */
@media (max-width: 34.375rem) {
  h2 {
    font-size: var(--scale-2);
  }
  h3 {
    font-size: var(--scale-1);
  }
  section {
    margin: var(--spacing-l) 0;
  }
}

/* Code Blocks
-------------------------------------------------- */
code {
  padding: 0.25rem 0.5rem;
  margin: 0 0.2rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  color: var(--code-text);
  white-space: nowrap;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 4px;
}

pre > code {
  display: block;
  padding: 1rem 1.5rem;
  white-space: pre;
}

/* Utilities
-------------------------------------------------- */
.u-full-width {
  width: 100%;
  box-sizing: border-box;
}

.u-max-full-width {
  max-width: 100%;
  box-sizing: border-box;
}

.u-pull-right {
  float: right;
}

.u-pull-left {
  float: left;
}

/* Misc
-------------------------------------------------- */
hr {
  margin-top: 3rem;
  margin-bottom: 3.5rem;
  border-width: 0;
  border-top: 1px solid var(--hr-color);
}
