/* style.css */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url("../fonts/cormorant-garamond-700.woff2") format("woff2");
}

:root {
  --font-family: "Cormorant Garamond", Baskerville, Georgia, serif;
  --font-weight: 700;
  --font-size-base: 1.125rem;
  --color-bg: #fff;
  /* Brighter navy */
  --color-text: #2a5a82;
  --color-text-muted: #7b97ad;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  background-color: var(--color-bg);
}

body {
  min-height: 100vh;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight);
  font-synthesis: none;
  line-height: 1.45;
  color: var(--color-text);
  background-color: var(--color-bg);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

.masthead {
  text-align: center;
  line-height: 1.2;
  padding-top: 30px;
}

.masthead__name {
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.masthead__cap {
  font-size: 1.75rem;
}

.links {
  width: 90%;
  max-width: 52rem;
  margin: 0 auto;
  padding-top: 35px;
  text-align: center;
}

.links a,
.links span {
  display: block;
  width: fit-content;
  margin: 0 auto 1.4em;
}

.birdie {
  text-align: center;
  padding: 30px 0 40px;
}

.birdie img {
  display: block;
  max-width: 280px;
  width: 70%;
  height: auto;
  margin: 0 auto;
  user-select: none;
  -webkit-user-drag: none;
}

.links .birdie--nav {
  display: block;
  width: fit-content;
  margin: 0 auto 0.75em;
  padding: 0;
}

.links a.birdie--nav:hover,
.links a.birdie--nav:focus-visible {
  text-decoration: none;
}

.birdie--nav img {
  max-width: 64px;
  width: 64px;
}

/* Experiences — project list */

.projects {
  width: 90%;
  max-width: 52rem;
  margin: 0 auto;
  padding: 0.5rem 0 2.5rem;
  text-align: center;
}

.projects__list {
  list-style: none;
  position: relative;
  z-index: 2;
}

.project {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 1.85em;
  cursor: default;
  line-height: 1.4;
  font-size: 0.875rem;
  user-select: none;
  text-decoration: none;
}

.project:hover,
.project:focus-visible {
  text-decoration: underline;
}

.project__title {
  color: var(--color-text);
}

.project__subtitle {
  color: var(--color-text-muted);
}

.project__title::after {
  content: " ";
}

.project-preview {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 28rem;
  height: 280px;
  margin: 1.25rem auto 0;
  overflow: hidden;
  pointer-events: none;
}

.project-preview__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: translateX(100%);
  transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
  user-select: none;
  -webkit-user-drag: none;
  z-index: 0;
}

/* Sitting off-screen right, no animation when moved here */
.project-preview__img.is-parked {
  transition: none;
  transform: translateX(100%);
  z-index: 0;
}

/* Locked on the right, about to slide in */
.project-preview__img.is-enter {
  transition: none;
  transform: translateX(100%);
  z-index: 2;
}

.project-preview__img.is-shown {
  transform: translateX(0);
  z-index: 2;
}

.project-preview__img.is-leaving {
  transform: translateX(-100%);
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .project-preview__img {
    transition: none;
  }
}

@media (hover: hover) and (pointer: fine) {
  .project {
    cursor: pointer;
  }
}

@media (max-width: 720px) {
  .projects {
    max-width: none;
    padding-top: 0.25rem;
  }
}

/* Project detail pages */

.project-page {
  width: 90%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 0.5rem 0 4rem;
  text-align: center;
}

.project-page__header {
  margin-bottom: 1.75rem;
  line-height: 1.3;
}

.project-page__title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight);
  color: var(--color-text);
}

.project-page__subtitle {
  margin-top: 0.25em;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight);
  color: var(--color-text-muted);
}

.project-page__body {
  margin: 0 auto 2.5rem;
  max-width: 34rem;
  text-align: left;
}

.project-page__body p {
  margin: 0 0 1.1em;
  font-size: 1rem;
  line-height: 1.55;
  font-weight: var(--font-weight);
}

.project-page__body p:last-child {
  margin-bottom: 0;
}

.project-page__gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.project-page__gallery img {
  display: block;
  width: 100%;
  max-width: 36rem;
  height: auto;
}
