/* Averia Serif Libre gives the page its soft editorial character. */
:root {
  --ink: #090909;
  --paper: #fff;
  --soft-gray: #d6d6d6;
  --line: 1px solid var(--ink);
  --page-padding: clamp(1.25rem, 3.2vw, 3.5rem);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}
body {
  margin: 0;
  overflow-x: hidden;

  color: var(--ink);
  background: var(--paper);
  font-family: "Averia Serif Libre", Georgia, serif;
  font-size: 1rem;
  line-height: 1.15;
}
a { color: inherit; }
.page-width { width: min(100%, 1440px); margin-inline: auto; padding-inline: var(--page-padding); }

.site-header {
  min-height: 3.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: clamp(1.1rem, 2vw, 1.65rem);
  font-style: italic;
}
.site-title { text-decoration: none; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: .65rem; }
.site-nav a { text-decoration: none; }
.language-switcher { display: inline-flex; align-items: center; gap: .2rem; white-space: nowrap; font-size: .82em; font-style: normal; }
.language-switcher button { border: 0; padding: 0; color: inherit; background: transparent; font: inherit; cursor: pointer; }
.language-switcher button[aria-pressed="true"] { text-decoration: underline; text-underline-offset: .15em; }
.language-switcher button:hover { opacity: .6; }
.site-nav a:hover, .contact a:hover, .about a:hover { text-decoration-thickness: 2px; }
.menu-toggle { display: none; }

.hero { padding-top: 1rem; }
.hero-inner {
  min-height: clamp(29rem, calc(100svh - 4.75rem), 55rem);
  display: flex;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 4rem);
  border: var(--line);
  background: url("assets/floral-hero.png") center / cover no-repeat;
}
.hero h1 {
  /* Large enough to make the introduction the main visual on the first screen. */
  max-width: 22ch;
  margin: 0;
  font-size: clamp(3.4rem, 8vw, 8.5rem);
  font-weight: 400;
  -webkit-text-stroke: .55px var(--paper);
  paint-order: stroke fill;
  letter-spacing: -.055em;
  line-height: .91;
}
.hero h1 span { font-weight: 400; }
.hero h1 small { font-size: .43em; letter-spacing: -.04em; white-space: nowrap; -webkit-text-stroke: 0; }

.work { padding-top: clamp(2.5rem, 5vw, 5rem); }
.section-kicker, .about-title, .contact h2 {
  margin: 0 0 clamp(1.5rem, 3vw, 3rem);
  font-size: clamp(2.2rem, 4.8vw, 5rem);
  font-weight: 400;
  font-style: italic;
  line-height: .95;
}
.project-carousel {
  margin-inline: calc(var(--page-padding) * -1);
  padding-inline: var(--page-padding);
  overflow: hidden;
  background: #f2f2f2;
}
.project-carousel-track {
  display: flex;
  gap: clamp(.55rem, 1.1vw, 1rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--ink) transparent;
  padding-bottom: .65rem;
}
.project-carousel-track::-webkit-scrollbar { height: .45rem; }
.project-carousel-track::-webkit-scrollbar-thumb { background: var(--ink); }
.project-card {
  position: relative;
  flex: 0 0 min(25vw, 24rem);
  aspect-ratio: 1 / 1;
  min-height: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: var(--soft-gray);
  scroll-snap-align: start;
  cursor: pointer;
  overflow: hidden;
  text-decoration: none;
  opacity: .7;
  transition: opacity .2s ease, filter .2s ease, transform .2s ease, box-shadow .2s ease;
}
.project-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-carousel-track.has-hovered-card .project-card:not(.is-hovered) {
  opacity: .38;
  filter: grayscale(.35);
}
.project-card:hover,
.project-card.is-hovered,
.project-card:focus-visible {
  opacity: 1;
  filter: contrast(1.08) brightness(1.04);
  transform: translateY(-4px);
  box-shadow: 0 0 0 2px var(--ink);
}
.project-card:focus { outline: 0; }
.project-card.is-active { opacity: 1; }
.project-card--one { background: #d7d7d7; }
.project-card--two { background: #d0d0d0; }
.project-card--three { background: #d8d8d8; }
.project-card--four { display: grid; place-items: center; padding: .65rem; background: #f5f5f5; }
.project-card--four img,
.project-card--five img { position: static; width: 100%; height: 100%; min-height: 0; object-fit: contain; border: 1px solid var(--ink); background: var(--paper); }
.project-card--five { display: grid; place-items: center; padding: .65rem; background: #f5f5f5; }
.project-card-number { font-size: clamp(1.2rem, 2vw, 1.7rem); }
.project-card-note { align-self: end; font-size: clamp(.9rem, 1.4vw, 1.2rem); font-style: italic; }
.project-list { padding-top: clamp(1.5rem, 3vw, 3rem); }
.project-row {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: clamp(6rem, 8vw, 8rem);
  padding: 1rem 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: opacity .2s ease, padding-left .2s ease;
}
.project-row:first-child { border-top: 1px solid var(--ink); }
.project-row:not(.is-active) { opacity: .62; }
.project-row.is-active { padding-left: clamp(.5rem, 1.3vw, 1.25rem); opacity: 1; }
.project-row > span:first-child { display: flex; flex-direction: column; align-items: flex-start; }
.project-row-number { margin-bottom: .25rem; font-size: clamp(.85rem, 1.1vw, 1rem); }
.project-row-title { font-size: clamp(1.65rem, 3vw, 3.2rem); line-height: .95; }
.project-row-theme { margin-top: .4rem; font-size: clamp(.95rem, 1.45vw, 1.25rem); font-style: italic; }
.project-year { padding-top: .15rem; font-size: clamp(.95rem, 1.45vw, 1.25rem); font-style: italic; }

.about {
  position: relative;
  overflow: hidden;
  margin-top: clamp(2rem, 6vw, 6rem);
  padding-top: 0;
  padding-bottom: clamp(3rem, 8vw, 8rem);
}
.about::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 12rem -8rem 0 0;
  background: url("assets/lace-texture.png") left center / 94% auto no-repeat;
  opacity: .7;
  pointer-events: none;
}
.floral-strip {
  height: clamp(8rem, 18vw, 16rem);
  border: var(--line);
  background: url("assets/floral-strip.png") center / cover no-repeat;
}
.about-title { margin-top: 2rem; }
.about-intro {
  display: flex;
  align-items: center;
  gap: clamp(2rem, 7vw, 7rem);
  max-width: 1120px;
  margin: 0 auto clamp(5rem, 10vw, 9rem);
}
.about-intro img { width: clamp(8.5rem, 20vw, 17rem); flex: 0 0 auto; }
.about-intro p { max-width: 42rem; margin: 0; font-size: clamp(1.25rem, 2.5vw, 2.5rem); font-weight: 400; line-height: 1.05; }
.about-intro a { text-underline-offset: .12em; }
.details-panel {
  position: relative;
  border: var(--line);
  padding: clamp(2rem, 4vw, 4rem) clamp(1.5rem, 3vw, 3.5rem) clamp(1.75rem, 3vw, 3rem);
}
.details-panel h3 {
  position: absolute;
  top: 0;
  left: clamp(1.5rem, 4vw, 5rem);
  transform: translateY(-55%);
  margin: 0;
  padding-inline: .55rem;
  background: var(--paper);
  font-size: clamp(1.8rem, 3vw, 3.5rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1;
}
.details-panel--education h3 { left: auto; right: clamp(1.5rem, 4vw, 5rem); }
.details-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3rem; }
.details-item { min-width: 0; }
.details-item h4 { margin: 0 0 .4rem; font-size: clamp(1.35rem, 2.5vw, 2.25rem); line-height: .98; }
.details-item p { margin: .1rem 0; font-size: clamp(1rem, 1.65vw, 1.5rem); line-height: 1.08; }
.status { display: inline-block; margin-bottom: 1rem; padding: .3rem .6rem; border: var(--line); font-size: clamp(.95rem, 1.5vw, 1.3rem); font-style: italic; }
.status--placeholder { visibility: hidden; }
.details-divider { margin: 2.5rem auto; text-align: center; font-size: 2rem; letter-spacing: .4em; }

.contact { position: relative; overflow: hidden; padding-top: clamp(2rem, 6vw, 6rem); padding-bottom: clamp(3rem, 7vw, 7rem); }
.contact::before { content: ""; position: absolute; z-index: -1; inset: -4rem -10rem 0 0; background: url("assets/lace-texture.png") right bottom / 75% auto no-repeat; opacity: .35; }
.contact h2 { margin-bottom: 1.2rem; }
.contact-links { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; padding-left: clamp(1rem, 3vw, 3.5rem); font-size: clamp(1.3rem, 2.5vw, 2.3rem); font-weight: 700; }
.contact-links a { text-underline-offset: .15em; }

.pointer-star {
  position: fixed;
  z-index: 30;
  width: var(--star-size);
  height: var(--star-size);
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(var(--star-angle));
  opacity: 0;
  background: var(--ink);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  animation: pointer-star-fade .85s ease-out forwards;
}

@keyframes pointer-star-fade {
  0% { opacity: .72; transform: translate(-50%, -50%) rotate(var(--star-angle)) scale(.55); }
  45% { opacity: .5; transform: translate(-50%, -58%) rotate(calc(var(--star-angle) + 18deg)) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -78%) rotate(calc(var(--star-angle) + 42deg)) scale(.35); }
}

@media (pointer: coarse), (prefers-reduced-motion: reduce) {
  .pointer-star { display: none; }
}

@media (max-width: 700px) {
  .site-header { position: relative; align-items: flex-start; padding-top: 1rem; padding-bottom: 1rem; }
  .site-title { white-space: normal; max-width: 13rem; }
  .menu-toggle { display: block; border: 0; padding: .25rem 0; color: inherit; background: transparent; font: inherit; font-size: 1.1rem; font-style: italic; cursor: pointer; }
  .site-nav { display: none; position: absolute; top: 100%; right: var(--page-padding); z-index: 2; flex-direction: column; align-items: flex-end; gap: .15rem; padding: .8rem 1rem; border: var(--line); background: var(--paper); }
  .site-nav.is-open { display: flex; }
  .site-nav span { display: none; }
  .hero-inner { min-height: calc(100svh - 5.5rem); align-items: flex-end; padding: 1.25rem; background-position: 54% center; }
  .hero h1 { max-width: 11ch; font-size: clamp(3.2rem, 14.5vw, 6.8rem); }
  .project-carousel-track { gap: .5rem; }
  .project-card { flex-basis: 78vw; min-height: 0; aspect-ratio: 1 / 1; }
  .project-carousel-track.has-hovered-card .project-card:not(.is-hovered) { opacity: 1; filter: none; }
  .project-card:hover { opacity: 1; filter: none; transform: none; box-shadow: none; }
  .project-row { min-height: 7.25rem; padding-block: 1rem; }
  .project-row-title { font-size: clamp(1.8rem, 9vw, 3rem); }
  .project-row-theme, .project-year { font-size: 1.1rem; }
  .about::before { inset: 13rem -12rem 0 -3rem; background-size: 130% auto; }
  .about-intro { align-items: flex-start; gap: 1.25rem; margin-bottom: 5rem; }
  .about-intro img { width: 7.3rem; }
  .about-intro p { font-size: 1.16rem; }
  .details-grid { grid-template-columns: 1fr; gap: 2rem; }
  .details-item h4 { font-size: 1.6rem; }
  .details-item p { font-size: 1.1rem; }
  .status--placeholder { display: none; }
  .details-panel--education h3 { right: 1rem; }
  .floral-strip { background-size: auto 100%; }
  .contact::before { inset: -2rem -18rem 0 -5rem; background-size: 160% auto; }
}

@media (pointer: coarse) {
  .project-carousel-track.has-hovered-card .project-card:not(.is-hovered) {
    opacity: 1;
    filter: none;
  }

  .project-card:hover,
  .project-card.is-hovered,
  .project-card:focus-visible {
    opacity: 1;
    filter: none;
    transform: none;
    box-shadow: none;
  }
}

/* Invitation to the extended archive, after Education. */
.archive-callout { padding-block: clamp(2rem, 5vw, 5rem); }
.archive-callout-inner { border-top: var(--line); border-bottom: var(--line); padding-block: clamp(2rem, 5vw, 4.5rem); }
.archive-callout-kicker { margin: 0 0 1.5rem; font-size: clamp(1rem, 1.6vw, 1.4rem); font-style: italic; }
.archive-callout h2 { max-width: 15ch; margin: 0 0 1.5rem; font-size: clamp(2.8rem, 6.5vw, 6rem); font-weight: 400; letter-spacing: -.045em; line-height: .95; }
.archive-callout-description { max-width: 42rem; margin: 0 0 2rem; font-size: clamp(1.2rem, 2.3vw, 2rem); line-height: 1.12; }
.archive-callout-link { display: inline-block; font-size: clamp(1.4rem, 2.8vw, 2.5rem); font-style: italic; text-underline-offset: .18em; }
.archive-callout-link:hover { text-decoration-thickness: 2px; }
.archive-callout-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }

/* Archive preview beside the invitation, stacked on smaller screens. */
.archive-callout-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(2rem, 4vw, 4rem); }
.archive-callout-copy { min-width: 0; }
.archive-callout-preview { display: block; min-width: 0; border: var(--line); }
.archive-callout-preview img { display: block; width: 100%; height: auto; }
.archive-callout-preview:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }
@media (max-width: 800px) { .archive-callout-inner { grid-template-columns: 1fr; } }
