@font-face {
  font-family: "Apercu Mono Pro";
  src: url("fonts/ApercuMonoPro-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Apercu Mono Pro";
  src: url("fonts/ApercuMonoPro-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Apercu Mono Pro";
  src: url("fonts/ApercuMonoPro-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --page-background: #ffffff;
  --text-color: #0000ff;
  --muted: #999999;
  --rule: #c8c8c8;
  --page-padding: clamp(1rem, 2.2vw, 2.25rem);
  --serif: "Times New Roman", Times, serif;
  --sans: "Apercu Mono Pro", Arial, Helvetica, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page-background);
  color: var(--text-color);
  font-family: var(--serif);
  font-size: clamp(15px, 1vw, 18px);
  line-height: 1.15;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}

button {
  font: inherit;
}

p,
h1,
h2,
figure {
  margin: 0;
}


/* ========================================
   LANDING PAGE
======================================== */

.landing {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
  padding: var(--page-padding);

  display: grid;
  grid-template-rows: auto 1fr auto;

  /* Everything on the landing page is sans */
  font-family: var(--sans);
}

.intro-grid,
.footer {
  position: relative;
  z-index: 2;
}

.intro-grid {
  display: grid;
  grid-template-columns:
    minmax(150px, 0.75fr)
    minmax(130px, 0.65fr)
    minmax(300px, 1.5fr);

  gap: clamp(1.5rem, 5vw, 6rem);
  align-items: start;
}

.site-title,
.project-meta a,
.footer-nav a {
  text-decoration: none;
}

/* Only "work" is serif italic */
.project-meta h1,
.project-meta h1 a {
  font-family: var(--serif);
  font-size: 1em;
  font-style: italic;
  font-weight: 400;
}

.project-meta h1 a {
  display: inline-block;

  transition:
      transform 0.25s ease,
      letter-spacing 0.25s ease;

      animation: workHint 20s cubic-bezier(.22,1,.36,1) infinite;
}

.project-meta h1 a:hover {
  transform: scale(1.08);
  letter-spacing: 0.04em;
}

@keyframes workHint {

  /* Idle */
  0%, 85%, 100% {
      transform: scale(1);
      letter-spacing: 0;
  }

  /* First pulse */
  2% {
      transform: scale(1.18);
      letter-spacing: 0.08em;
  }

  4% {
      transform: scale(1);
      letter-spacing: 0;
  }

  /* Second pulse */
  6% {
      transform: scale(1.18);
      letter-spacing: 0.08em;
  }

  8% {
      transform: scale(1);
      letter-spacing: 0;
  }
}

/* Everything else stays sans */
.site-title,
.project-description,
.project-description p,
.read-more,
.footer,
.footer-nav,
.footer-nav a,
.copyright {
  font-family: var(--sans);
  font-style: normal;
}

.project-description {
  justify-self: end;
  width: min(100%, 430px);

  font-size: 11px;   /* try 12px */
  line-height: 1.35;
}

.image-stage {
  position: absolute;
  inset: 0;
  z-index: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  pointer-events: none;
}

.image-stage img {
  display: block;
  width: min(21vw, 360px);
  aspect-ratio: 4 / 5;

  object-fit: cover;
  object-position: center;
}

.footer {
  align-self: end;

  display: flex;
  justify-content: space-between;
  align-items: flex-end;

  gap: 2rem;
  font-size: 0.8em;
}

.footer-nav {
  display: flex;
  gap: 1.1rem;
}


/* ========================================
   WORK PAGE
======================================== */

.work-body {
  background: #ffffff;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.25;
}

.work-page {
  width: 100%;
  padding: 18px 24px 40px;

  display: grid;
  grid-template-columns:
    minmax(190px, 220px)
    minmax(60px, 1fr)
    minmax(620px, 820px);

  align-items: start;
}


/* ========================================
   LEFT INFORMATION COLUMN
======================================== */

.work-information {
  grid-column: 1;

  position: sticky;
  top: 18px;
  align-self: start;

  max-height: calc(100svh - 36px);
  overflow-y: auto;
  overflow-x: hidden;

  padding-right: 8px;

  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.26;
}

/* Name stays sans */
.work-info-header {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1;
  font-weight: 400;
  text-transform: uppercase;
}

.work-info-header a {
  text-decoration: none;
}

.work-rule {
  height: 1px;
  margin: 10px 0 12px;
  background: var(--rule);
}

.work-info-grid {
  display: block;
  font-family: var(--serif);
}

.work-info-grid > div + div {
  margin-top: 18px;
}

.intro-info {
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.28;
}

.intro-info p + p {
  margin-top: 16px;
}

.resume-link {
  margin-top: 18px;
}

.current-info {
  margin: 52px 0 48px;

  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.28;
}

.current-info > div + div {
  margin-top: 12px;
}

.detail-info {
  padding: 0 0 30px;

  font-family: var(--serif);
  font-size: 12.5px;
  line-height: 1.28;
}

.detail-info + .detail-info {
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.detail-info > div + div {
  margin-top: 14px;
}

.detail-info div p + p {
  margin-top: 16px;
}


/* ========================================
   RIGHT PROJECT COLUMN
======================================== */

.projects-column {
  grid-column: 3;

  min-width: 0;
  width: 100%;
  max-width: 820px;

  justify-self: end;

  font-family: var(--sans);
}

.projects-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;

  gap: 24px;
  margin-bottom: 16px;

  font-family: var(--sans);
}

.projects-header h1,
.project-details h2 {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1;
  font-style: normal;
  font-weight: 600;
}

.projects-header a {
  color: var(--muted);
  text-decoration: none;
}

.project + .project {
  margin-top: 90px;
}


/* ========================================
   PROJECT SLIDER
======================================== */

.project-slider {
  position: relative;
  width: 100%;
  overflow: hidden;

  background: transparent;
  touch-action: pan-y;
}

.project-slides {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
}

.project-slide {
  position: absolute;
  inset: 0;

  visibility: hidden;
  opacity: 0;
  pointer-events: none;

  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.project-slide.is-active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.project-slide img {
  display: block;
  width: 100%;
  height: 100%;

  object-fit: contain;
  object-position: center;

  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}


/* ========================================
   SLIDER ARROWS
======================================== */

.slider-button {
  position: absolute;
  top: 50%;
  z-index: 10;

  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  background: transparent;
  color: #5f5f5f;

  font-family: var(--sans);
  font-size: 38px;
  font-weight: 300;
  line-height: 1;

  cursor: pointer;
  pointer-events: auto;

  transform: translateY(-50%);
}

.slider-button-previous {
  left: 18px;
}

.slider-button-next {
  right: 18px;
}

.slider-button:hover {
  color: #111111;
}

.slider-button:focus-visible {
  outline: 1px solid #111111;
  outline-offset: 3px;
}

.slider-button[hidden] {
  display: none;
}


/* ========================================
   IMAGE COUNTER
======================================== */

.slider-counter {
  position: absolute;
  right: 18px;
  bottom: 14px;
  z-index: 3;

  color: #777777;

  font-family: var(--sans);
  font-size: 12px;
  line-height: 1;
}

.slider-counter[hidden] {
  display: none;
}


/* ========================================
   PROJECT DETAILS
======================================== */

.project-details {
  width: 100%;
  max-width: 820px;
  margin-top: 17px;

  display: grid;
  grid-template-columns:
    minmax(150px, 0.72fr)
    minmax(320px, 1.28fr);

  gap: 32px;

  font-family: var(--sans);
}

.project-meta-grid {
  display: grid;
  grid-template-columns:
    minmax(110px, 0.45fr)
    minmax(200px, 1fr);

  gap: 28px;
}

/* Type and year stay sans */
.project-meta-grid > p:first-child {
  font-family: var(--sans);
}

/* Description is serif */
.project-description-text {
  color: var(--muted);

  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.3;
}


/* ========================================
   VIEW MORE / VIEW LESS
======================================== */

.description-full {
  display: none;
}

.project-description-text.is-expanded
.description-preview {
  display: none;
}

.project-description-text.is-expanded
.description-full {
  display: inline;
}

.description-toggle {
  display: block;
  margin-top: 12px;
  padding: 0;
  border: 0;

  background: transparent;
  color: var(--muted);

  font-family: var(--sans);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 1;

  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;

  cursor: pointer;
}

.description-toggle:hover {
  color: #111111;
}

.description-toggle:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}


/* ========================================
   LARGE / MEDIUM SCREEN ADJUSTMENTS
======================================== */

@media (max-width: 1250px) {
  .work-page {
    grid-template-columns:
      minmax(180px, 210px)
      minmax(48px, 1fr)
      minmax(540px, 720px);
  }

  .projects-column,
  .project-details {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 1050px) {
  .work-page {
    grid-template-columns:
      minmax(170px, 200px)
      minmax(36px, 1fr)
      minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .intro-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem 2rem;
  }

  .project-description {
    grid-column: 1 / -1;
  }

  .image-stage {
    padding-top: 5rem;
  }

  .image-stage img {
    width: min(34vw, 300px);
  }

  .work-page {
    grid-template-columns: 1fr;
    row-gap: 52px;
    padding: 18px;
  }

  .work-information,
  .projects-column {
    grid-column: 1;
  }

  .work-information {
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .projects-column {
    max-width: 100%;
    justify-self: stretch;
  }
}

@media (max-width: 650px) {
  .landing {
    overflow-y: auto;
    gap: 2rem;
  }

  .intro-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .project-description {
    grid-column: auto;
    max-width: 100%;
  }

  .image-stage {
    position: relative;
    inset: auto;
    min-height: 47vh;
    padding: 0;
  }

  .image-stage img {
    width: min(55vw, 240px);
  }

  .footer {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 1rem;
  }

  .work-page {
    padding: 14px;
  }

  .work-info-header {
    font-size: 16px;
  }

  .project-slides {
    aspect-ratio: 4 / 3;
  }

  .slider-button {
    width: 44px;
    height: 44px;
    font-size: 30px;
  }

  .slider-button-previous {
    left: 6px;
  }

  .slider-button-next {
    right: 6px;
  }

  .slider-counter {
    right: 10px;
    bottom: 10px;
  }

  .project-details,
  .project-meta-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .current-info {
    margin: 38px 0;
  }

  .project + .project {
    margin-top: 64px;
  }

  .project-details {
    width: 100%;
  }

  .description-toggle {
    margin-top: 10px;
  }
}


/* ========================================
   REDUCED MOTION
======================================== */

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

  .project-slide {
    transition: none;
  }
}