:root {
  --bg: #ffffff;
  --text: #191817;
  --muted: #686868;
  --line: #e5e5e5;
  --accent: #2548a5;
  --thumb-a: #22201f;
  --thumb-b: #7f1d3d;
  --thumb-c: #c6b06f;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Lato", Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

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

a:hover,
a:focus-visible {
  color: var(--accent);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.brand {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 22px;
  font-weight: 400;
}

nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
}

main,
.site-footer {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.intro {
  min-height: 58vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 70px 0 56px;
  border-bottom: 1px solid var(--line);
}

.kicker {
  margin: 0 0 18px;
  color: var(--muted);
}

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

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(38px, 5.4vw, 68px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0;
}

.intro p:last-child {
  max-width: 610px;
  color: var(--muted);
  font-size: 20px;
}

.section {
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}

.page-intro {
  padding: 88px 0 42px;
}

.page-intro h1 {
  max-width: 720px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-head h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 30px;
  font-weight: 400;
}

.section-head p {
  color: var(--muted);
}

.section-arrow {
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.work-card {
  min-width: 0;
  display: block;
}

.work-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 8;
  margin-bottom: 14px;
  object-fit: cover;
  background: var(--line);
}

.work-card h3 {
  margin-bottom: 2px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 24px;
  font-weight: 400;
}

.work-card:hover h3,
.work-card:focus-visible h3 {
  color: var(--accent);
}

.masonry-section {
  padding: 0 0 82px;
}

.main-works-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 82px;
}

.main-work {
  display: block;
}

.main-work-media {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 8;
  margin-bottom: 12px;
  object-fit: cover;
  background: var(--line);
}

.main-work-caption h2,
.various-heading h2 {
  margin: 0 0 2px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.05;
}

.main-work-caption p,
.various-heading p {
  color: var(--muted);
}

.main-work:hover h2,
.main-work:focus-visible h2 {
  color: var(--accent);
}

.various-heading {
  max-width: 520px;
  margin: 0 auto 34px;
  text-align: center;
}

.various-collection {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 0 0 12px;
}

.various-item {
  min-width: 0;
}

.various-media {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 10px;
  background: var(--line);
}

.various-item h3 {
  margin-bottom: 2px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.05;
}

.various-item p {
  color: var(--muted);
}

.work-card p,
.cv li {
  color: var(--muted);
}

.text-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(28px, 7vw, 84px);
  margin-bottom: 54px;
}

.text-columns h3,
.cv h3 {
  margin-bottom: 14px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 24px;
  font-weight: 400;
}

.cv {
  max-width: 1040px;
  margin-bottom: 42px;
  overflow-x: auto;
}

.cv ol {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.cv li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.cv-year {
  flex: 0 0 96px;
  color: var(--text);
}

.cv-text {
  flex: 0 0 auto;
  white-space: nowrap;
}

.cv-text em {
  font-weight: 700;
}

.site-footer {
  padding: 42px 0 56px;
  color: var(--muted);
}

.email-button {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  display: inline-block;
  color: var(--text);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 28px;
}

.email-button:hover,
.email-button:focus-visible {
  color: var(--accent);
}

.social-links {
  display: flex;
  gap: 16px;
  margin-top: 18px;
}

.social-links a {
  color: var(--muted);
}

@media (max-width: 760px) {
  .site-header,
  .section-head,
  .text-columns {
    display: block;
  }

  nav {
    margin-top: 10px;
  }

  .works-grid {
    grid-template-columns: 1fr;
  }

  .main-works-grid {
    grid-template-columns: 1fr;
    margin-bottom: 62px;
  }

  .various-collection {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 40px;
  }

  .intro p:last-child {
    font-size: 18px;
  }

  .cv li {
    align-items: flex-start;
    gap: 4px;
    white-space: normal;
  }

  .cv-year {
    flex: 0 0 72px;
  }

  .cv-text {
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
  }
}
