:root {
  --paper: #fdfcf9;
  --ink: #20201d;
  --muted: #77756e;
  --line: #deddd7;

  --serif: "Newsreader", serif;
  --mono: "IBM Plex Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;

  background: var(--paper);
  color: var(--ink);

  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button {
  font: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

/* Header */

.site-header {
  position: fixed;
  z-index: 100;

  top: 0;
  left: 0;
  right: 0;

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

  padding: 27px 55px;

  pointer-events: none;
  backdrop-filter: blur(30px);
}

.site-header a {
  pointer-events: auto;
}

.site-title {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  gap: 42px;
  padding-top: 3px;
}

.main-nav a,
.eyebrow,
.date,
.counter,
.back-link,
.contact-row .label,
.quote-author {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.main-nav a {
  color: #85837d;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--ink);
}

/* General */

#app {
  min-height: 100vh;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Homepage */

.home-page {
  min-height: 100vh;

  display: grid;
  place-items: center;

  padding: 105px 30px 70px;
}

.home-photo {
  display: block;

  width: min(1000px, 86vw);
  max-height: calc(100vh - 220px);

  object-fit: contain;
}

/* General page layout */

.page {
  width: min(100%, 1080px);

  margin: 0 auto;

  padding: 124px 30px 80px;
}

.page-heading {
  text-align: center;
  margin: 0 auto 43px;
}

.eyebrow {
  color: #777b7b;
  margin-bottom: 3px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.page-heading h1 {
  margin: 0;

  font-family: var(--serif);
  font-size: clamp(58px, 5.3vw, 80px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

/* Album archive */

.album-list {
  width: min(630px, 100%);
  margin: 0 auto;

  border-top: 1px solid var(--line);
}

.album-list .list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;

  min-height: 62px;

  border-bottom: 1px solid var(--line);

  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.25;
}

.list-row .arrow {
  opacity: 0;
  font-size: 18px;

  transition: opacity 0.2s ease;
}

.list-row:hover .arrow {
  opacity: 1;
}

/* Single photo page */

.album-page {
  height: 100dvh;
  min-height: 0;

  display: flex;
  flex-direction: column;

  padding: 96px 30px 38px;

  overflow: hidden;
}

.album-heading {
  flex-shrink: 0;

  width: min(100%, 760px);

  text-align: center;
  margin: 0 auto 24px;
}

.album-heading h1 {
  margin: 0 0 10px;

  font-family: var(--serif);
  font-size: clamp(42px, 4.5vw, 64px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.05em;
}

.album-description {
  width: 100%;
  max-width: none;
  margin: 0 auto;

  color: var(--muted);

  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.35;

  white-space: normal;
}

/* Photo viewer */

.viewer {
  position: relative;

  width: min(100%, 1200px);

  flex: 1;
  min-height: 0;
  margin: 0 auto;

  display: flex;
  flex-direction: column;
}

.viewer-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;

  width: min(900px, 80vw);

  height: auto;
  flex: 1;
  min-height: 0;

  margin: 0 auto;
}

.image-open-button {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;

  padding: 0;
  border: 0;

  background: transparent;

  cursor: zoom-in;
}

.viewer-image {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;
}

/* Navigation arrows */

.viewer-button {
  position: absolute;
  top: 50%;

  transform: translateY(-50%);

  border: 0;
  padding: 12px;

  background: transparent;

  color: #c8c6bf;

  cursor: pointer;

  font-family: var(--serif);
  font-size: 40px;
  font-weight: 300;
}

.viewer-button.prev {
  left: 0;
}

.viewer-button.next {
  right: 0;
}

/* Photo footer */

.viewer-bottom {
  display: grid;

  grid-template-columns: 1fr 1fr;

  align-items: end;
  gap: 40px;

  width: min(100%, 1200px);

  margin: 14px auto 0;
  padding: 0 25px;

  flex-shrink: 0;
}

.counter {
  color: #64635d;
}

.viewer-caption {
  text-align: right;

  color: #74736d;

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

.viewer-caption em {
  font-size: 16px;
}

/* Fullscreen overlay */

.fullscreen-overlay {
  position: fixed;
  z-index: 1000;

  inset: 0;

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

  padding: 40px;

  background: rgba(8, 8, 8, 0.98);
}

.fullscreen-overlay.is-visible {
  display: flex;
}

.fullscreen-image {
  display: block;

  width: auto;
  height: auto;

  max-width: 100%;
  max-height: 100%;

  object-fit: contain;
}

/* Fullscreen close button */

.fullscreen-close {
  position: absolute;
  z-index: 2;

  top: 24px;
  right: 30px;

  padding: 0;
  border: 0;

  background: transparent;
  color: #ffffff;

  cursor: pointer;

  font-family: var(--serif);
  font-size: 58px;
  font-weight: 300;
  line-height: 1;
}

/* Fullscreen navigation */

.fullscreen-navigation {
  position: absolute;
  z-index: 2;

  top: 50%;
  left: 0;
  right: 0;

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

  padding: 0 28px;

  transform: translateY(-50%);

  pointer-events: none;
}

.fullscreen-nav-button {
  pointer-events: auto;

  padding: 10px;

  border: 0;

  background: transparent;
  color: #ffffff;

  cursor: pointer;

  font-family: var(--serif);
  font-size: 46px;
  font-weight: 300;
  line-height: 1;
}

.fullscreen-nav-button.prev,
.fullscreen-nav-button.next {
  margin: 0;
}

/* Blog archive page */

.blog-list {
  width: min(630px, 100%);
  margin: 0 auto;

  border-top: 1px solid var(--line);
}

.blog-list .list-row {
  display: grid;

  grid-template-columns:
    minmax(175px, 0.8fr)
    minmax(0, 1.6fr);

  column-gap: 28px;

  align-items: center;

  min-height: 62px;

  border-bottom: 1px solid var(--line);

  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
}

.blog-list .date {
  color: #77756e;

  line-height: 1.5;
  white-space: normal;
}

.blog-list .title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
}

/* Chi sono page */

.text-page {
  width: min(100%, 600px);

  padding-top: 124px;
}

.text-page .page-heading {
  margin-bottom: 44px;
}

.text-page .text-content {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.55;
}

.text-content section {
  padding: 18px 0 20px;

  border-top: 1px solid var(--line);
}

.text-content h2 {
  margin-bottom: 20px;

  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.2;
}

.text-content section > p,
.text-content section > .quotes,
.text-content section > blockquote,
.text-content section > div {
  margin-left: 30px;
}

.text-content p {
  margin-bottom: 15px;

  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.55;
}

.text-content p:last-child {
  margin-bottom: 0;
}

/* Critical notes */

.quotes {
  margin-top: 8px;
}

.quote {
  position: relative;

  margin: 0 0 36px;
  padding-left: 24px;

  border-left: 1px solid #bdbbb3;
}

.quote:last-child {
  margin-bottom: 0;
}

.quote p {
  margin: 0 0 16px;

  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.6;
}

.quote-author {
  display: inline;

  color: var(--ink);

  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.12em;
}

.quote-role {
  display: inline;

  margin: 0;

  color: #77756e;

  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.5;
  letter-spacing: 0.12em;
}

/* Biography photo */

.biography-photo {
  display: block;

  width: calc(100% - 60px);
  max-width: none;
  height: auto;

  margin: 32px 0 0 30px;
}

/* Single blog posts */

.article-page {
  width: min(100%, 600px);
}

.article-page .page-heading {
  margin-bottom: 45px;
}

.article-page .page-heading h1 {
  font-family: var(--serif);
  font-size: clamp(48px, 5.3vw, 72px);
  font-weight: 500;
}

.article-page .article-body {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
}

.article-page .article-body p,
.article-page .article-body li,
.article-page .article-body blockquote {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
}

.article-body p {
  margin-bottom: 21px;
}

.back-link {
  display: inline-block;

  margin-top: 16px;
}

/* Contacts */

.contact-intro {
  margin-bottom: 36px;

  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.55;
}

.contact-details {
  padding-top: 16px;

  border-top: 1px solid var(--line);
}

.contact-row {
  display: grid;

  grid-template-columns: 108px 1fr;

  margin-bottom: 20px;

  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
}

.contact-row .label {
  color: #77756e;
}

/* Mobile */

@media (max-width: 700px) {
  .site-header {
    padding: 22px 20px;
  }

  .site-title {
    font-size: 18px;
  }

  .main-nav {
    gap: 18px;
  }

  .main-nav a {
    font-size: 9px;
    letter-spacing: 0.09em;
  }

  .home-page {
    padding: 95px 20px 45px;
  }

  .home-photo {
    width: min(100%, 620px);
    max-height: 72vh;
  }

  .page,
  .text-page,
  .article-page {
    padding: 110px 20px 60px;
  }

  .page-heading h1 {
    font-size: clamp(48px, 11vw, 68px);
  }

  .album-list .list-row {
    min-height: 60px;
    font-size: 24px;
  }

  /* Mobile album page */

  .album-page {
    height: 100dvh;
    min-height: 0;

    padding: 90px 20px 28px;
  }

  .album-heading {
    width: 100%;
    margin-bottom: 16px;
  }

  .album-heading h1 {
    font-size: clamp(38px, 9vw, 54px);
    margin-bottom: 8px;
  }

  .album-description {
    font-size: 14px;
    line-height: 1.35;
  }

  /* Mobile photo viewer */

  .viewer {
    width: 100%;
  }

  .viewer-image-wrap {
    width: 100%;

    flex: 1;
    min-height: 0;
  }

  .viewer-button {
    font-size: 32px;
  }

  .viewer-button.prev {
    left: -12px;
  }

  .viewer-button.next {
    right: -12px;
  }

  /* Mobile photo footer */

  .viewer-bottom {
    grid-template-columns: 1fr 1fr;

    width: 100%;

    gap: 16px;

    margin-top: 12px;
    padding: 0;
  }

  .counter {
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  .viewer-caption {
    text-align: right;
    font-size: 14px;
  }

  .viewer-caption em {
    font-size: 14px;
  }

  /* Mobile fullscreen overlay */

  .fullscreen-overlay {
    padding: 20px;
  }

  .fullscreen-close {
    top: 14px;
    right: 16px;

    font-size: 48px;
  }

  .fullscreen-navigation {
    padding: 0 10px;
  }

  .fullscreen-nav-button {
    padding: 8px;

    font-size: 34px;
  }

  /* Mobile blog list */

  .blog-list .list-row {
    grid-template-columns:
      minmax(125px, 0.8fr)
      minmax(0, 1.2fr);

    column-gap: 20px;

    align-items: start;

    min-height: 0;
    padding: 15px 0;

    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.5;
  }

  .blog-list .date {
    line-height: 1.6;
  }

  .blog-list .title {
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.5;
  }

  /* Mobile Chi sono page */

  .text-page .text-content {
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.55;
  }

  .text-content h2 {
    margin-bottom: 18px;

    font-size: 18px;
  }

  .text-content section > p,
  .text-content section > .quotes,
  .text-content section > blockquote,
  .text-content section > div {
    margin-left: 18px;
  }

  /* Mobile biography photo */

  .biography-photo {
    width: calc(100% - 36px);
    max-width: none;

    margin: 28px 0 0 18px;
  }

  /* Mobile critical notes */

  .quote {
    padding-left: 18px;
    margin-bottom: 30px;
  }

  .quote p {
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.6;
  }

  .quote-author,
  .quote-role {
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  /* Mobile blog posts */

  .article-page .article-body,
  .article-page .article-body p,
  .article-page .article-body li,
  .article-page .article-body blockquote {
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.6;
  }

  /* Mobile contacts */

  .contact-intro {
    font-size: 17px;
  }

  .contact-row {
    grid-template-columns: 85px 1fr;

    font-size: 17px;
  }
}
