@font-face {
  font-family: "HoeflerText";
  src: url("../assets/fonts/HoeflerTextRegular/Hoefler Text Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PlayfairDisplay";
  src: url("../assets/fonts/PlayfairDisplay/PlayfairDisplay-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PlayfairDisplay";
  src: url("../assets/fonts/PlayfairDisplay/PlayfairDisplay-Italic-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "HoeflerText", Georgia, "Times New Roman", serif;
  color: #2a2a2a;
  background: #fdfdfd;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px;
}

.hero {
  display: flex;
  align-items: center;
  gap: clamp(48px, 6vw, 96px);
  max-width: 1100px;
  width: calc(100% - 96px);
  margin: 0 auto;
}

.placeholder {
  width: 240px;
  height: 320px;
  background: #d6d6d6;
}

.sectionBox {
  max-width: 420px;
}

.greeting {
  margin: 0 0 20px;
  font-size: 24px;
  line-height: 1.4;
}

.greeting strong {
  font-family: "PlayfairDisplay", "HoeflerText", Georgia, serif;
  font-weight: 600;
}

.bio {
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.5;
}

.bio.latex-paragraph {
  font-size: 16px;
  /* line-height: 1.; */
  /* text-align: justify; */
  text-indent: 1.8em;
}

.paragraph-label {
  display: inline-block;
  margin-left: -1.8em;
  padding-right: 0.75em;
  font-family: "PlayfairDisplay", "HoeflerText", Georgia, serif;
  font-weight: 700;
  text-indent: 0;
}

.locale-switch {
  margin: 0 0 16px;
  font-size: 14px;
  color: #7a7a7a;
}

.page-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}

.page-top .back-link {
  font-size: 14px;
  color: #7a7a7a;
  text-decoration: none;
}

.page-top .back-link:hover,
.page-top .back-link:focus-visible {
  text-decoration: underline;
}

.page-top .locale-switch {
  margin: 0;
}

.locale-switch a {
  color: inherit;
  text-decoration: none;
}

.locale-switch a:hover,
.locale-switch a:focus-visible,
.locale-switch a.active {
  text-decoration: underline;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "PlayfairDisplay", "HoeflerText", Georgia, serif;
}

.links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  column-gap: 32px;
  row-gap: 8px;
  align-items: start;
}

.links-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #b0b0b0;
  font-size: 16px;
  font-style: italic;
}

.link:hover,
.link:focus-visible {
  color: #4B47E5;
  text-decoration: none;
}

.link[data-state="pending"] {
  position: relative;
  /* cursor: default; */
  /* color: #9a9a9a; */
  /* text-decoration-color: #d0d0d0; */
}

.link[data-state="pending"]:hover,
.link[data-state="pending"]:focus-visible {
  color: #9a9a9a;
  text-decoration: underline;
}

.pending-tooltip {
  position: fixed;
  padding: 8px 12px;
  background: #f5f5f5;
  color: #1f1f1f;
  font-family: "HoeflerText", Georgia, "Times New Roman", serif;
  font-size: 14px;
  line-height: 1.35;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  pointer-events: none;
  opacity: 0;
  transform: translate(0, -8px);
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 999;
  white-space: nowrap;
}

.pending-tooltip[data-visible="true"] {
  opacity: 1;
  transform: translate(0, -12px);
}

.footer-links {
  width: calc(100% - 96px);
  max-width: 1100px;
  margin: 32px auto 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #2a2a2a;
}

.footer-links svg {
  width: 24px;
  height: 24px;
  filter: grayscale(1);
  opacity: 0.5;
  transition: opacity 160ms ease, filter 160ms ease, color 160ms ease;
}

.footer-links a:hover svg,
.footer-links a:focus-visible svg {
  filter: none;
  opacity: 1;
  color: #4B47E5;
}

.sectionBox {
  flex: 1;
}

.slider-card {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.slider-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slider-title {
  margin: 0;
  font-size: 22px;
  font-family: "PlayfairDisplay", "HoeflerText", Georgia, serif;
}

.slider-subtitle {
  margin: 0;
  font-size: 14px;
  color: #666;
}

.image-slider {
  --slider-width: 384px;
  --slider-height: 384px;
  --slider-aspect: calc(var(--slider-width) / var(--slider-height));
  --slider-image-padding: 14px;
  width: min(100%, var(--slider-width));
  display: grid;
  gap: 14px;
}

.slider-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: var(--slider-aspect);
  border-radius: 8px;
  overflow: hidden;
  border: 0.75px solid #e6e6e6;
  background: #f4f4f4;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.slider-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 320ms ease;
  will-change: transform;
}

.slider-frame {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 160ms ease;
  cursor: zoom-in;
  padding: var(--slider-image-padding);
  background: #fff;
  border-radius: 12px;
}

.slider-image:focus-visible {
  outline: 2px solid #2a2a2a;
  outline-offset: 4px;
}

.image-slider:hover .slider-image {
  transform: scale(1.01);
}

.slider-caption {
  margin: 2px 0 0;
  font-size: 14px;
  color: #4a4a4a;
  text-align: right;
  line-height: 1.4;
}

.slider-caption.top-caption {
  margin-bottom: 8px;
}

.slider-caption.bottom-caption {
  margin-top: 10px;
}

.slider-caption .caption-body {
  display: block;
  margin-top: 10px;
  font-style: normal;
}

.slider-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10%;
  border: none;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.24), transparent);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 140ms ease, background 140ms ease;
  outline: none;
  padding: 0;
}

.slider-nav.next {
  right: 0;
  left: auto;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.24), transparent);
}

.slider-viewport:hover .slider-nav,
.slider-nav:focus-visible {
  opacity: 1;
}

.slider-nav::after {
  content: "‹";
  position: absolute;
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
  font-size: 34px;
  font-family: "PlayfairDisplay", "HoeflerText", Georgia, serif;
}

.slider-nav.next::after {
  content: "›";
  left: auto;
  right: 18px;
}

.slider-nav:hover {
  background-color: rgba(0, 0, 0, 0.18);
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.slider-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid #6c6c6c;
  background: #fff;
  cursor: pointer;
  padding: 0;
  transition: transform 120ms ease, background 120ms ease;
}

.slider-dot:hover,
.slider-dot:focus-visible {
  transform: scale(1.15);
  background: #dedede;
}

.slider-dot.active {
  background: #2a2a2a;
}

.slider-zoom {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  padding: 24px;
}

.slider-zoom.open {
  opacity: 1;
  pointer-events: all;
}

.slider-zoom__backdrop {
  position: absolute;
  inset: 0;
}

.slider-zoom__frame {
  position: relative;
  max-width: 960px;
  width: min(90vw, 960px);
  max-height: 90vh;
  background: #fff;
  border-radius: 16px;
  padding: 16px 16px 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.24);
  display: grid;
  gap: 12px;
  z-index: 1;
}

.slider-zoom__frame img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 10px;
}

.slider-zoom__frame figcaption {
  margin: 0;
  font-size: 14px;
  color: #4a4a4a;
  text-align: center;
}

.slider-zoom__close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  z-index: 2;
}

.slider-zoom__nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 16%;
  border: none;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.24), transparent);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 140ms ease, background 140ms ease;
  padding: 0;
  z-index: 1;
}

.slider-zoom__nav.prev {
  left: 0;
}

.slider-zoom__nav.next {
  right: 0;
  left: auto;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.24), transparent);
}

.slider-zoom__frame:hover .slider-zoom__nav,
.slider-zoom__nav:focus-visible {
  opacity: 1;
}

.slider-zoom__nav::after {
  content: "‹";
  position: absolute;
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
  font-size: 34px;
  font-family: "PlayfairDisplay", "HoeflerText", Georgia, serif;
}

.slider-zoom__nav.next::after {
  content: "›";
  left: auto;
  right: 18px;
}

.slider-zoom__nav:hover {
  background-color: rgba(0, 0, 0, 0.18);
}

@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .slider-card {
    max-width: 100%;
  }
}

@media (max-width: 1200px) {
  .hero {
    gap: 40px;
    align-items: center;
  }
}
