/* Theme tokens and dark mode (from minimal-dark-theme, adapted) */

* {
  --primary: #448aff;
}

:root {
  /*
   * Desktop width — edit these three values in css/style.css (:root).
   * Keep --layout-page at least roughly (--layout-sidebar + --layout-main + 40px)
   * so the two columns fit comfortably inside the wrapper.
   */
  --layout-page: 1040px;
  --layout-sidebar: 300px;
  --layout-main: 700px;

  --primary-container: #005ecb;

  --surface: #fafafa;
  --surface-container: #f5f5f5;
  --surface-container-high: #c2c2c2;

  --on-surface: #212121;
  --on-surface-variant: #424242;
  --outline: #616161;
  --outline-variant: #757575;

  --border: #e0e0e0;
  --button-text1: #9e9e9e;
  --button-text1-hover: #707070;
  --button-text2: #212121;
  --button-text2-hover: #000000;

  --theme-toggle-image: "dark_mode";
}

:root.theme-dark {
  --primary-container: #83b9ff;

  --surface: #212121;
  --surface-container: #424242;
  --surface-container-high: #6d6d6d;

  --on-surface: #fafafa;
  --on-surface-variant: #f5f5f5;
  --outline: #bdbdbd;
  --outline-variant: #9e9e9e;

  --border: #616161;
  --button-text1: #bdbdbd;
  --button-text1-hover: #8d8d8d;
  --button-text2: #fafafa;
  --button-text2-hover: #ffffff;

  --theme-toggle-image: "light_mode";
}

p small {
  color: var(--outline-variant);
}

blockquote p {
  color: var(--outline-variant);
}

code {
  padding: 2px 4px;
  border-radius: 0.3rem;
}

code,
pre {
  background-color: var(--surface-container);
}

pre code {
  padding: 0;
}

header li:last-child {
  border-right: 0;
}

footer button,
.theme-icon-button {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0;
  background: var(--surface-container);
  border-radius: 5px;
  border: 1px solid var(--border);
  width: 40px;
  color: var(--button-text2);
  justify-content: center;
  cursor: pointer;
  font-size: 22px;
}

footer button:hover,
.theme-icon-button:hover {
  color: var(--button-text2-hover);
}

footer button:active,
.theme-icon-button:active {
  background-color: var(--surface-container-high);
}

#theme-toggle::after,
#theme-toggle-404::after {
  content: var(--theme-toggle-image);
}

/* Base typography (theme) */

body {
  background-color: var(--surface);
  padding: 50px;
  font:
    14px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Fira Sans",
    "Droid Sans",
    "Helvetica Neue",
    Arial,
    sans-serif,
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Segoe UI Symbol";
  color: var(--outline);
  font-weight: 400;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--on-surface);
  margin: 0 0 20px;
}

p,
ul,
ol,
table,
pre,
dl {
  margin: 0 0 20px;
}

h1,
h2,
h3 {
  line-height: 1.1;
}

h1 {
  font-size: 28px;
  font-weight: 500;
}

h2 {
  color: var(--on-surface);
  font-weight: 500;
}

h3,
h4,
h5,
h6 {
  color: var(--on-surface);
  font-weight: 500;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-container);
}

a small {
  font-size: 11px;
  color: var(--outline-variant);
  margin-top: -0.3em;
  display: block;
}

a:hover small {
  color: var(--on-surface-variant);
}

.wrapper {
  width: var(--layout-page);
  margin: 0 auto;
}

.wrapper::after {
  content: "";
  display: table;
  clear: both;
}

blockquote {
  border-left: 4px solid var(--border);
  margin: 0;
  padding: 0 0 0 20px;
  font-style: italic;
}

code,
pre {
  font-family:
    Monaco,
    Bitstream Vera Sans Mono,
    "Lucida Console",
    Terminal,
    Consolas,
    "Liberation Mono",
    "DejaVu Sans Mono",
    "Courier New",
    monospace;
}

pre {
  padding: 8px 15px;
  background: var(--surface-container);
  border-radius: 5px;
  border: 1px solid var(--border);
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 5px 10px;
  border-bottom: 1px solid var(--border);
}

dt {
  color: var(--on-surface-variant);
  font-weight: 500;
}

th {
  color: var(--on-surface-variant);
}

img {
  max-width: 100%;
}

header {
  width: var(--layout-sidebar);
  float: left;
  position: fixed;
  -webkit-font-smoothing: subpixel-antialiased;
}

header .profile-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 0 20px;
  /* margin-left: auto; */
  /* margin-right: auto; */
  border: 1px solid var(--border);
}

header .site-name {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 16px;
}

header .contact-block {
  font-size: 13px;
  color: var(--on-surface-variant);
  margin-bottom: 16px;
  line-height: 1.5;
}

header .contact-block .email-line {
  margin: 0 0 6px;
}

header .contact-block .social-line {
  margin: 0;
}

header .contact-block .social-line a {
  color: var(--primary);
}

header .contact-block .sep {
  margin: 0 6px;
  color: var(--outline-variant);
}

header .bio {
  font-size: 14px;
  color: var(--on-surface);
}

header .bio p {
  margin: 0 0 14px;
}

header .bio p:last-child {
  margin-bottom: 0;
}

header .bio a {
  color: var(--primary);
}

strong {
  color: var(--on-surface);
  font-weight: 500;
}

section {
  width: var(--layout-main);
  float: right;
  padding-bottom: 50px;
}

.section-title {
  margin: 0 0 24px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.cv-section {
  margin-top: 36px;
}

.cv-section[hidden] {
  display: none !important;
}

.cv-entry + .cv-entry {
  margin-top: 28px;
}

.cv-heading {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--on-surface);
}

.cv-emphasis {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--on-surface);
}

.cv-emphasis strong {
  font-weight: 500;
}

.cv-emphasis em {
  font-style: italic;
  font-weight: 500;
}

.cv-bullets {
  margin: 0 0 0 1.15em;
  padding: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--on-surface);
}

.cv-bullets li {
  margin: 0 0 6px;
}

.cv-bullets li:last-child {
  margin-bottom: 0;
}

.service-category + .service-category {
  margin-top: 22px;
}

.service-category-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--on-surface);
}

.service-items a,
.cv-bullets a {
  color: var(--primary);
}

.publication {
  margin-bottom: 36px;
}

.publication:last-child {
  margin-bottom: 0;
}

.pub-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--on-surface);
}

.pub-authors {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--on-surface);
}

.pub-authors em {
  font-style: italic;
  font-weight: 500;
}

.pub-links {
  margin: 0 0 10px;
  font-size: 13px;
}

.pub-links a {
  white-space: nowrap;
}

.pub-links .sep {
  margin: 0 6px;
  color: var(--outline-variant);
  user-select: none;
}

.pub-note {
  margin: 0;
  font-size: 13px;
  color: var(--outline-variant);
}

.pub-note p {
  margin: 0 0 8px;
}

.pub-note p:last-child {
  margin-bottom: 0;
}

small {
  font-size: 11px;
}

hr {
  border: 0;
  background: var(--border);
  height: 1px;
  margin: 0 0 20px;
}

footer {
  width: var(--layout-sidebar);
  float: left;
  position: fixed;
  bottom: 50px;
  -webkit-font-smoothing: subpixel-antialiased;
}

footer p {
  margin: 0 0 12px;
}

.site-footer-meta {
  font-size: 11px;
  color: var(--outline-variant);
  line-height: 1.45;
}

.site-footer-meta a {
  color: var(--outline-variant);
}

.site-footer-meta a:hover {
  color: var(--primary);
}

@media print, screen and (max-width: 960px) {
  div.wrapper {
    width: auto;
    margin: 0;
  }

  header,
  section,
  footer {
    float: none;
    position: static;
    width: auto;
  }

  section {
    border: 1px solid var(--border);
    border-width: 1px 0;
    padding: 20px 0;
    margin: 0 0 20px;
  }

  button.theme-icon-button {
    position: fixed;
    right: 50px;
    bottom: 52px;
  }
}

@media print, screen and (max-width: 720px) {
  body {
    word-wrap: break-word;
  }

  pre,
  code {
    word-wrap: normal;
  }
}

@media print, screen and (max-width: 480px) {
  body {
    padding: 15px;
  }

  button.theme-icon-button {
    position: fixed;
    right: 25px;
    bottom: 26px;
  }
}

@media print {
  body {
    padding: 0.4in;
    font-size: 12pt;
  }
}
