:root {
  --background: #EEEEEE;
  --foreground: #444444;
  --header-link-border: #8a8475;

  --footer-border: #d4d1c8;
  --footer-foreground: #6b6b6b;

  --h1-color: #2c2c2c;
  --h2-color: #2f2f2f;

  --link-color: #e85a4f;
  --link-visited: #8e7d7c;

  --authors-color: #555555;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #1a1a1a;
    --foreground: #e0e0e0;
    --header-link-border: #6b6b6b;
    --footer-border: #333333;
    --footer-foreground: #a0a0a0;
    --h1-color: #f5f5f5;
    --h2-color: #e8e8e8;
    --link-color: #ff7a6b;
    --link-visited: #b8a5a4;
    --authors-color: #cccccc;
  }
}

body.dark-mode {
  --background: #1a1a1a;
  --foreground: #e0e0e0;
  --header-link-border: #6b6b6b;
  --footer-border: #333333;
  --footer-foreground: #a0a0a0;
  --h1-color: #f5f5f5;
  --h2-color: #e8e8e8;
  --link-color: #ff7a6b;
  --link-visited: #b8a5a4;
  --authors-color: #cccccc;
}

body.light-mode {
  --background: #fafafa;
  --foreground: rgb(51,51,51);
  --header-link-border: #8a8475;
  --footer-border: #d4d1c8;
  --footer-foreground: #6b6b6b;
  --h1-color: #2c2c2c;
  --h2-color: #2f2f2f;
  --link-color: #e85a4f;
  --link-visited: #8e7d7c;
  --authors-color: #555555;
}


@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  src: local('Open Sans'),local('OpenSans'),url(OpenSans-Regular.woff) format('woff')
}

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 700;
  src: local('Open Sans Bold'),local('OpenSans-Bold'),url(OpenSans-Bold.woff) format('woff')
}

@font-face {
  font-family: 'Open Sans';
  font-style: italic;
  font-weight: 400;
  src: local('Open Sans Italic'),local('OpenSans-Italic'),url(OpenSans-Italic.woff) format('woff')
}

@font-face {
  font-family: 'Open Sans';
  font-style: italic;
  font-weight: 700;
  src: local('Open Sans Bold Italic'),local('OpenSans-BoldItalic'),url(OpenSans-BoldItalic.woff) format('woff')
}

@font-face {
  font-family: 'Bitter';
  font-style: normal;
  font-weight: 400;
  src: local('Bitter-Regular'),url(Bitter-Regular.woff) format('woff')
}

body {
  margin: 40px auto;
  font-family: "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
  background-color: var(--background);
  color: var(--foreground);

  max-width: 650px;
  font-size: 18px;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  padding: 0 10px;
}

header {
  margin-top: 30px;
  margin-bottom: 20px;
}

header a {
  color: var(--foreground);
  text-decoration: none;
  border-bottom: 1px dotted var(--header-link-border);
  transition: color 0.3s ease;
}

header a:visited {
  color: var(--foreground);
  transition: color 0.3s ease;
}

header a:hover {
  border-bottom: 1px solid var(--header-link-border);
}

footer {
  border-top: 1px solid var(--footer-border);
  margin-top: 48px;
  padding-top: 24px;
  font-size: 14px;
  color: var(--footer-foreground);
  transition: color 0.3s ease;
}

h1, h2, h3 {
  line-height: 1.2;
  font-family: "Bitter";
}

h1 {
  font-size: 32px;
  font-weight: normal;
  margin-bottom: 20px;
  color: var(--h1-color);
  transition: color 0.3s ease;
}

h2 {
  margin-top: 40px;
  margin-bottom: 5px;

  font-size: 24px;
  font-weight: normal;

  color: var(--h2-color);
  transition: color 0.3s ease;
}

h3 {
  margin-top: 20px;
  margin-bottom: 5px;

  font-size: 20px;
  font-weight: bold;

  color: var(--h2-color);
  transition: color 0.3s ease;
}

img.avatar {
  background-size: 100%;
  display: block;
  height: 100px;
  overflow: hidden;
  border-radius: 100px;
  -moz-border-radius: 100px;
  -webkit-border-radius: 100px;
  width: 100px;
  margin-right: 15px;
}

@media screen and (max-width: 580px) {
  body {
    margin: 10px auto;
    padding: 0 20px 0 20px;
    width: auto;
    word-wrap: break-word;
  }

  pre {
    font-size: 14px;
    line-height: 16px;
  }

  img {
    max-width: 100%;
    width: auto;
    height: auto;
  }

  img.avatar {
    height: 110px;
    width: 110px;
  }
}

a {
  color: var(--link-color);
  transition: color 0.3s ease;
}

a:visited {
  color: var(--link-visited);
  transition: color 0.3s ease;
}

a.paper {
  font-weight: bold;
  color: var(--foreground);
  text-decoration: none;
  border-bottom: 1px dotted var(--header-link-border);
  transition: color 0.3s ease;
}

a.paper:visited {
  color: var(--foreground);
  transition: color 0.3s ease;
}

a.paper:hover {
  border-bottom: 1px solid var(--header-link-border);
  transition: color 0.3s ease;
}

p {
  margin: 0 0 2ex 0;
}

ul {
  margin: 0 0 2ex 0;
  padding: 0;
}

li {
  margin: 0 0 0 20px;
  padding: 0;
}

ul {
  list-style: none;
}

li {
  margin-bottom: 1.5em;
}

.authors {
  font-size: 16px;
  color: var(--authors-color);
  transition: color 0.3s ease;
}

.svg {
  fill: var(--foreground);
  transition: fill 0.3s ease;
}

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: none;
  color: var(--header-link-border);
  border: 1px dashed var(--header-link-border);
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  opacity: 0.8;
}

.thesis {
  display: flex;
  align-items: top;
  gap: 10px;
}

.thesis img {
  width: 100px;
  height: auto;
}

.thesis div {
  margin: 0;
}
