@font-face {
  font-family: "Mozilla Text";
  src: url("/fonts/MozillaText.ttf") format("truetype-variations");
  font-weight: 200 700;
  font-display: swap;
}

html {
  background: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-family);
  font-size: var(--font-size-body);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* --- reusable patterns (mixin-like via classes) --- */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-s);
}

.link,
footer button {
  color: currentColor;
  text-decoration: none;
  display: inline-block;
  line-height: 1;
  padding: 2px 0.05em 2px;
  border-bottom: 0.1em solid currentColor;
  background-image: linear-gradient(var(--color-accent), var(--color-accent));
  background-repeat: no-repeat;
  background-origin: border-box;
  background-position: 0 100%;
  background-size: 100% 0;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition: background-size 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.link:hover,
.link:focus-visible,
footer button:hover,
footer button:focus-visible {
  color: var(--color-bg);
  border-color: var(--color-accent);
  background-size: 100% 100%;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* --- layout --- */

main,
footer {
  padding-block: var(--space-m);
}

section {
  margin-top: var(--space-l);
}

h2,
.section-title {
  font-size: 0.9rem;
  font-weight: normal;
  color: var(--color-fg-muted);
  margin-bottom: var(--space-s);
}

p {
  max-width: 50ch;
}


/* --- hero --- */

.logo-img-wrap {
  position: relative;
  width: 5rem;
  height: 5rem;
  transition: transform 0.25s ease;
}

@media (hover: hover) {
  .logo-img-wrap:hover,
  .hero-top:has(.logo-link:hover) .logo-img-wrap {
    transform: scale(2);
  }
}

.logo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: var(--color-fg-lighted);
  border-radius: 100%;
  transition: opacity 0.5s ease;
}

.logo-img-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  border-radius: 100%;
  transition: opacity 0.5s ease;
}

@media (hover: hover) {
  .logo-img-wrap:hover .logo-img-bg,
  .hero-top:has(.logo-link:hover) .logo-img-bg {
    opacity: 0.75;
  }
}

.hero-top {
  display: flex;
  justify-content: space-between;
  /* align-items: flex-start; */
  gap: var(--space-s);
}

.hero-text {
  min-width: 0;
  padding-top: 0.75rem;
}

.page-header .hero-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo-link {
  color: currentColor;
  display: inline-block;
  font-weight: bold;
  line-height: 1;
  padding: 2px 0.05em 2px;
}

.hero:not(.page-header) .hero-top {
  @media screen and (min-width: 640px) {
    margin-top: var(--space-l);
  }
}

.hero-title {
  font: inherit;
  max-width: 50ch;
}

/* .wavy {
  text-decoration: underline wavy color-mix(in srgb, var(--color-accent) 50%, transparent);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1.5px;
  transition: text-decoration-color 0.2s ease;
}

.wavy:hover {
  text-decoration-color: var(--color-accent);
} */

.hover-float-img {
  position: fixed;
  top: 0;
  left: 0;
  max-width: 350px;
  max-height: 350px;
  border-radius: var(--radius);
  pointer-events: none;
  opacity: 0;
  z-index: 999;
  transition: opacity 0.15s ease;
}

/* --- projects --- */

.project-list {
  list-style: none;
  line-height: 1.5;
}

.project-list li {
  display: flex;
  align-items: baseline;
  gap: var(--space-s);
  min-height: 1lh;
}

.project-list .project-links {
  display: flex;
  align-items: baseline;
  gap: var(--space-s);
}

/* --- talks --- */

.talk-list {
  list-style: none;
}

.talk-title {
  font-size: 1rem;
  font-weight: normal;
  margin-bottom: var(--space-s);
}

.talk-events {
  list-style: none;
}

.talk-date {
  display: inline-block;
  min-width: 6.5em;
  font-variant-numeric: tabular-nums;
}

/* --- pictures --- */

.picture-list {
  list-style: none;
  margin-top: var(--space-l);
  margin-inline: calc(50% - 50vw);
  padding-inline: var(--space-s);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-l);
}

.picture-list figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-s);
}

.picture-list img {
  display: block;
  max-width: min(1200px, 100%);
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
}

.picture-list figcaption {
  color: var(--color-fg-muted);
  font-size: 0.9rem;
}

.back-to-top {
  margin-top: var(--space-l);
  text-align: center;
}

/* --- footer --- */

footer {
  display: flex;
  justify-content: space-between;
  gap: var(--space-s);
  color: var(--color-fg-muted);
  font-size: 0.9rem;
}

.footer-toggles {
  display: flex;
  gap: var(--space-s);
}

