@font-face { font-family: "Lora"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/lora-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/lora-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/lora-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/lora-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lora"; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/lora-cyrillic-400-italic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Lora"; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/lora-latin-400-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Marck Script"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/marck-script-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Marck Script"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/marck-script-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #efe8dc;
  --paper-light: #f8f4ec;
  --mat: #fdfbf7;
  --ink: #3b332b;
  --ink-soft: #4a3f35;
  --muted: #8b7a66;
  --accent: #9c4a2f;
  --line: #cdbfa9;
  --shadow: 0 1px 2px rgba(60, 40, 20, .12), 0 6px 18px rgba(60, 40, 20, .10);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 "Lora", Georgia, serif; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 24px 20px 56px; }

/* header */
.hdr { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 32px; margin-bottom: 28px; }
.brand { display: block; color: inherit; text-decoration: none; }
.name { display: block; font-family: "Marck Script", cursive; font-size: 44px; line-height: 1.05; color: #4a3b2e; }
.sub { display: block; margin-top: 4px; font-style: italic; color: var(--muted); }
.nav { display: flex; gap: 20px; font-size: 16px; }
.nav a { padding: 6px 0; color: #6b5c4d; text-decoration: none; }
.nav a.cur, .nav a:hover { color: var(--accent); }

/* home */
.intro { display: flex; flex-direction: column; gap: 16px; margin-bottom: 36px; padding: 20px 22px; border-radius: 4px; background: var(--paper-light); color: #5a4c3f; }
.intro p { margin: 0 0 .5em; }
.intro p:last-child { margin-bottom: 0; }
.intro-photo { flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 28px; font-size: 16px; }
.tabs a { padding: 4px 0; border-bottom: 2px solid transparent; color: var(--muted); text-decoration: none; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--ink); }

.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 36px; align-items: start; }
.card a { display: block; color: inherit; text-decoration: none; }
.mat { background: var(--mat); padding: 12px; box-shadow: var(--shadow); }
.card .mat { transition: transform .2s, box-shadow .2s; }
.card a:hover .mat { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(60, 40, 20, .14), 0 10px 26px rgba(60, 40, 20, .14); }
.t { margin: 14px 0 0; font-size: 20px; font-weight: 500; line-height: 1.3; }
.m { margin: 4px 0 0; font-size: 15px; font-style: italic; color: var(--muted); }
.empty { color: var(--muted); font-style: italic; }

/* painting page */
.back { display: inline-block; margin-bottom: 20px; font-size: 15px; color: var(--muted); text-decoration: none; }
.work { display: grid; gap: 28px; }
.work .image { text-align: center; }
.work .zoom { display: inline-block; max-width: 100%; cursor: zoom-in; }
.work h1 { margin: 0; font-size: 28px; font-weight: 500; line-height: 1.2; }
.work .meta { margin: 8px 0 0; font-style: italic; color: var(--muted); }
.story { margin-top: 20px; color: var(--ink-soft); line-height: 1.75; }
.story p { margin: 0 0 1em; }
.hint { margin: 10px 0 0; font-size: 13px; font-style: italic; color: #a8987f; }
.pn { display: flex; justify-content: space-between; gap: 16px; margin-top: 36px; padding-top: 18px; border-top: 1px dashed var(--line); font-size: 15px; }
.pn a { text-decoration: none; }
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(20, 16, 12, .94); cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-close { position: absolute; top: 8px; right: 12px; border: 0; background: none; color: #fff; font-size: 40px; line-height: 1; cursor: pointer; }

/* about, contacts, errors */
.page h1 { margin: 0 0 20px; font-size: 28px; font-weight: 500; }
.about { display: grid; gap: 28px; align-items: start; }
.contacts { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.contacts .label { display: block; font-size: 14px; font-style: italic; color: var(--muted); }
.contacts a { font-size: 19px; text-decoration: none; }

/* footer */
.foot { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 64px; padding-top: 20px; border-top: 1px dashed var(--line); font-size: 15px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--accent); }

@media (min-width: 640px) {
  .wrap { padding: 36px 40px 72px; }
  .name { font-size: 52px; }
  .nav { gap: 28px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .intro { flex-direction: row; align-items: center; padding: 24px 28px; }
  .mat { padding: 18px; }
}

@media (min-width: 900px) {
  .work { grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: start; }
  .work .image { position: sticky; top: 24px; }
  .work .zoom img { width: auto; max-height: calc(100vh - 140px); }
  .work h1 { font-size: 34px; }
  .about { grid-template-columns: 1fr 1.4fr; gap: 56px; }
  .about.text-only { grid-template-columns: minmax(0, 720px); }
}

@media (min-width: 1000px) {
  .wrap { padding: 40px 56px 80px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
}
