:root {
  color-scheme: light;
  --ink: #2b2b2b;
  --muted: #666;
  --link: #2b2b2b;
  --rule: #e7e7e7;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Raleway", "Helvetica Neue", Arial, sans-serif;
}

@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/playfair-display-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/raleway-latin-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Raleway";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/raleway-latin-italic-400.woff2") format("woff2");
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover,
a:focus-visible {
  color: #666;
}

.skip-link {
  position: absolute;
  z-index: 20;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  transform: translateY(-160%);
  background: #fff;
  color: var(--ink);
}

.skip-link:focus {
  transform: translateY(0);
}

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

.site-header {
  position: relative;
  padding: 28px 5.5% 0;
  text-align: center;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1160px;
  min-height: 38px;
  margin: 0 auto;
  text-align: left;
}

.primary-navigation,
.social-navigation {
  display: flex;
  align-items: center;
  gap: 25px;
}

.primary-navigation a,
.social-navigation a {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
  text-transform: uppercase;
}

.primary-navigation a:hover,
.primary-navigation a:focus-visible,
.primary-navigation .current,
.social-navigation a:hover,
.social-navigation a:focus-visible {
  color: var(--ink);
}

.primary-navigation .current {
  padding: 12px 24px;
  border: 1px solid currentColor;
}

.social-navigation {
  gap: 17px;
}

.social-navigation a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-transform: none;
}

.social-icon {
  display: block;
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.menu-toggle {
  display: none;
  width: 38px;
  height: 32px;
  padding: 5px 2px;
  border: 0;
  background: transparent;
  color: #666;
  cursor: pointer;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 35px;
  height: 2px;
  background: currentColor;
}

.menu-icon {
  position: relative;
  margin: 0 auto;
}

.menu-icon::before,
.menu-icon::after {
  position: absolute;
  left: 0;
  content: "";
}

.menu-icon::before {
  top: -9px;
}

.menu-icon::after {
  top: 9px;
}

.branding {
  margin: 27px auto 0;
}

.site-title {
  display: inline-block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 2.375rem;
  font-weight: 400;
  line-height: 1.34;
  text-decoration: none;
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  text-transform: uppercase;
}

.main {
  width: min(100% - 48px, 760px);
  margin: 88px auto 0;
}

.entry-content {
  color: var(--ink);
}

.entry-content p {
  margin: 0 0 1.45em;
}

.home-main {
  margin-top: 88px;
}

.portrait {
  width: min(70%, 222px);
  margin: 0 auto 34px;
}

.portrait img {
  display: block;
  width: 100%;
  height: auto;
}

.publications .year {
  margin: 1.5em 0 0.25em;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 400;
}

.publication-list {
  margin: 0 0 1.25em;
  padding-left: 1.25em;
}

.publication-list > li {
  margin: 0 0 0.95em;
  padding-left: 0.1em;
}

.publication-list ul {
  margin: 0.15em 0 0.4em;
  padding-left: 1.3em;
  color: var(--muted);
  font-size: 0.94em;
}

.publication-list ul li {
  margin: 0;
}

.publication-list p {
  margin: 0.55em 0 0.2em;
}

.projects section {
  margin: 0 0 2.3em;
}

.projects h1 {
  margin: 0 0 0.55em;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.45;
}

.projects h1 a {
  text-decoration: none;
}

.github-star-widget {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  line-height: 16px;
  vertical-align: middle;
}

.github-star-button,
.github-star-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 27px;
  padding: 4px 8px;
  border: 1px solid #d0d7de;
  border-radius: 5px;
  color: #24292e;
  font-weight: 600;
  text-decoration: none;
}

.github-star-button {
  background: #f6f8fa;
}

.github-star-count {
  position: relative;
  background: #fff;
  font-weight: 500;
}

.github-star-count::before,
.github-star-count::after {
  position: absolute;
  top: 50%;
  right: 100%;
  width: 0;
  height: 0;
  border: 5px solid transparent;
  content: "";
  transform: translateY(-50%);
}

.github-star-count::before {
  border-right-color: #d0d7de;
}

.github-star-count::after {
  margin-right: -1px;
  border-right-color: #fff;
}

.github-star-button:hover,
.github-star-button:focus-visible,
.github-star-count:hover,
.github-star-count:focus-visible {
  border-color: #afb8c1;
  background: #f3f4f6;
  color: #24292e;
}

.github-star-widget svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.photography-main {
  width: min(100% - 48px, 960px);
}

.gallery {
  position: relative;
}

.gallery-slide {
  position: relative;
  display: none;
  width: 100%;
  margin: 0;
  text-align: center;
}

.gallery-slide.is-active {
  display: grid;
  place-items: center;
}

.gallery-slide img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(70vh, 700px);
  object-fit: contain;
}

.gallery-slide figcaption:not(:empty) {
  padding: 12px 16px 18px;
  color: var(--muted);
}

.gallery-slide h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1.3;
}

.gallery-slide p {
  margin: 0;
  font-size: 0.9rem;
}

.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 12px 0;
  background: #fff;
}

.gallery-controls button {
  width: 35px;
  height: 35px;
  border: 1px solid #d5d5d5;
  border-radius: 50%;
  background: #fff;
  color: #555;
  font-family: Georgia, serif;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.gallery-controls button:hover,
.gallery-controls button:focus-visible {
  border-color: #777;
  color: #111;
}

.gallery-counter {
  min-width: 52px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.site-footer {
  margin: 90px auto 0;
  padding: 22px 24px 27px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 700px) {
  .site-header {
    padding: 33px 24px 0;
  }

  .topbar {
    display: block;
    min-height: 32px;
    text-align: center;
  }

  .menu-toggle {
    display: inline-block;
  }

  .primary-navigation,
  .social-navigation {
    display: none;
  }

  .primary-navigation.is-open {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 18px auto 0;
  }

  .primary-navigation.is-open a {
    width: 100%;
    padding: 10px 0;
    border-top: 1px solid var(--rule);
  }

  .primary-navigation.is-open .current {
    border: 1px solid currentColor;
  }

  .branding {
    margin-top: 25px;
  }

  .main,
  .photography-main {
    width: min(100% - 42px, 760px);
    margin-top: 90px;
  }

  .home-main {
    margin-top: 53px;
  }

  .portrait {
    width: min(100%, 222px);
    margin-bottom: 30px;
  }

  .entry-content {
    font-size: 15px;
  }

  .projects h1 {
    font-size: 1.35rem;
  }

  .gallery-slide figcaption:not(:empty) {
    padding: 10px 12px 16px;
  }

  .site-footer {
    margin-top: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
