@import './syntax.css';
@import './markdown.css';

:root {
  /* Spacing */
  --gap-quarter: 0.25rem;
  --gap-half: 0.5rem;
  --gap: 1rem;
  --gap-double: 2rem;
  --small-gap: 2rem;
  --big-gap: 4rem;
  --main-content: 48rem;
  --radius: 8px;
  --inline-radius: 5px;
  --header-height: 48px;

  /* Typography */
  --font-sans: var(--font-geist-sans), -apple-system, BlinkMacSystemFont, 'Roboto',
    'Helvetica Neue', sans-serif;
  --font-mono: var(--font-geist-mono), 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo',
    monospace;

  /* Transitions */
  --transition: 0.1s ease-in-out;
  --transition-slow: 0.3s ease-in-out;

  /* Dark Mode Colors */
  --bg: hsl(0, 0%, 7%);
  --bg-alpha: hsla(0, 0%, 7%, 0.9);
  --fg: #fafbfc;
  --gray: #999;
  --light-gray: #444;
  --lighter-gray: #222;
  --lightest-gray: #1a1a1a;
  --article-color: #eaeaea;
  --gray-alpha: rgba(255, 255, 255, 0.5);
  --selection: rgba(255, 255, 255, 0.88);
  --link: #579dff;
  --green: #2ecc71;
  --red: #e74c3c;

  /* Syntax Highlighting */
  --token: #999;
  --comment: #999;
  --keyword: #fff;
  --name: #fff;
  --highlight: #2e2e2e;

  /* Fading */
  --timing: 0.3s;
  --fade-in: var(--timing) ease-in-out;
}

[data-theme='light'] {
  --bg: #fff;
  --bg-alpha: hsla(0, 0%, 100%, 0.9);
  --fg: #444;
  --gray: rgb(100, 100, 100);
  --light-gray: rgb(222, 222, 222);
  --lighter-gray: rgb(240, 240, 240);
  --lightest-gray: rgb(245, 245, 245);
  --article-color: #212121;
  --header-bg: rgba(255, 255, 255, 0.8);
  --gray-alpha: rgba(19, 20, 21, 0.5);
  --selection: rgba(0, 0, 0, 0.99);
  --link: #6669ff;

  --token: #666;
  --comment: #999;
  --keyword: #000;
  --name: #333;
  --highlight: #eaeaea;
}

* {
  box-sizing: border-box;
}

::selection {
  text-shadow: none;
  background: var(--selection);
  color: var(--bg);
}

html,
body {
  padding: 0;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 110%;
  font-size: 16px;
  line-height: 1.55em;
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  display: flex;
  flex-direction: column;
  position: relative;
}

p,
li {
  font-size: 1.1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.25;
}

h1 {
  font-size: 2.3rem;
  font-weight: 600;
}

h2 {
  font-size: 1.6rem;
}

h3 {
  font-size: 1.4rem;
}

h4 {
  font-size: 1.2rem;
}

h5 {
  font-size: 1.15rem;
}

hr {
  border: none;
  border-bottom: 1px solid var(--light-gray);
}

blockquote {
  font-style: italic;
  margin: 0;
  padding-left: 1rem;
  border-left: 3px solid var(--light-gray);
}

button {
  border: none;
  padding: 0;
  margin: 0;
  line-height: inherit;
  font-size: inherit;
}

p a,
article a,
a.reset {
  outline: none;
  color: var(--link);
  text-decoration: none;
  transition: background-color var(--transition), color var(--transition);
}

p a:hover,
article a:hover,
a.reset:hover {
  color: var(--link);
}

pre,
code {
  font-family: var(--font-mono);
}

summary {
  outline: none;
}

details {
  border-radius: var(--radius);
  background: var(--lightest-gray);
  padding: 1rem;
  border-radius: var(--radius);
  cursor: pointer;
}

table {
  border: 1px solid gray;
}

td,
th {
  border: 1px solid gray;
}

@media print {
  :root {
    --bg: #fff;
    --fg: #000;
    --gray: #888;
    --light-gray: #dedede;
    --lighter-gray: #f5f5f5;
    --lightest-gray: #fafafa;
    --article-color: #212121;
    --gray-alpha: rgba(19, 20, 21, 0.5);
    --selection: rgba(0, 0, 0, 0.99);

    --token: #666;
    --comment: #999;
    --keyword: #000;
    --name: #333;
    --highlight: #eaeaea;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
