/* ============================================================
   ПОРТФОЛИО ПИСАТЕЛЯ — элегантный спокойный лендинг
   (отдельные стили; страницы книг используют свой styles.css)
   ============================================================ */

:root {
  --bg: #fffbf5;
  --surface: #ffffff;
  --surface-2: #f6f1e8;
  --text: #1f2937;
  --muted: #6b7280;
  --faint: #9ca3af;
  --line: #e9e2d5;
  --accent: #c4944b;       /* медь/тёплое золото */
  --accent-deep: #8b7355;
  --slate: #6b7280;

  --serif: "Merriweather", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "Source Code Pro", ui-monospace, monospace;

  --maxw: 1180px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(31,41,55,.04), 0 12px 30px rgba(31,41,55,.06);
}
[data-theme="dark"] {
  --bg: #1b1b19;
  --surface: #232320;
  --surface-2: #2a2a26;
  --text: #ece8e0;
  --muted: #a8a294;
  --faint: #7b756a;
  --line: #34332d;
  --accent: #d4ab6a;
  --accent-deep: #b9966a;
  --slate: #9aa0a8;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 14px 34px rgba(0,0,0,.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background .4s ease, color .4s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---------- ТИПОГРАФИКА ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.18; letter-spacing: -0.01em; }
.eyebrow {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
.section { padding: 96px 0; }
.section-head { max-width: 620px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-title { font-size: clamp(28px, 3.6vw, 40px); }
.section-sub { color: var(--muted); margin-top: 14px; font-size: 17px; }
.divider { width: 48px; height: 2px; background: var(--accent); margin: 18px 0; border: 0; }
.center .divider { margin-left: auto; margin-right: auto; }

/* ---------- КНОПКИ ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--sans); font-weight: 600; font-size: 15px;
  padding: 13px 26px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .2s ease, background .25s, border-color .25s, color .25s, box-shadow .25s;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(196,148,75,.28); }
.btn-primary:hover { transform: translateY(-2px); background: var(--accent-deep); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- ШАПКА ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 21px; letter-spacing: -0.01em; }
.brand b { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { font-size: 15px; color: var(--muted); transition: color .2s; position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: -5px; width: 0; height: 1.5px; background: var(--accent); transition: width .25s; }
.nav a:hover { color: var(--text); }
.nav a:hover::after { width: 100%; }
.nav-tools { display: flex; align-items: center; gap: 14px; }
.theme-toggle, .burger {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; font-size: 16px; transition: border-color .2s, background .2s;
}
.theme-toggle:hover { border-color: var(--accent); }
.burger { display: none; flex-direction: column; gap: 4px; }
.burger span { width: 18px; height: 2px; background: var(--text); transition: .25s; }
.burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- ГЕРОЙ ---------- */
.hero { padding: 90px 0 70px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 60px; align-items: center; }
.hero-title { font-size: clamp(40px, 6.5vw, 76px); line-height: 1.05; margin: 18px 0 8px; }
.hero-sub { font-size: clamp(18px, 2.2vw, 22px); color: var(--muted); font-family: var(--serif); font-style: italic; }
.hero-intro { color: var(--muted); margin: 22px 0 32px; max-width: 520px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual { position: relative; }
.hero-photo {
  aspect-ratio: 4/5; border-radius: var(--radius); background: var(--surface-2);
  box-shadow: var(--shadow); overflow: hidden; position: relative;
}
.hero-photo::after { /* тонкая медная рамка-акцент */
  content: ""; position: absolute; inset: 12px; border: 1px solid var(--accent); border-radius: 8px; opacity: .5; pointer-events: none;
}
.img-ph {
  background: linear-gradient(135deg, var(--surface-2), color-mix(in srgb, var(--surface-2) 70%, var(--line)));
  background-size: cover; background-position: center; position: relative;
}
.img-ph[data-ph]:not([style*="url"])::before {
  content: attr(data-ph); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 12px; letter-spacing: 1.5px; color: var(--faint); text-align: center; padding: 16px;
}

/* ---------- ФИЛЬТР ЖАНРОВ ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.chip {
  font-family: var(--mono); font-size: 13px; letter-spacing: .3px;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); cursor: pointer; transition: .2s;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- СЕТКА ПРОИЗВЕДЕНИЙ ---------- */
.works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.work-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s, border-color .25s;
}
.work-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 18px 40px rgba(31,41,55,.10); }
.work-cover { aspect-ratio: 3/2; }
.work-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.work-genre { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); }
.work-title { font-size: 22px; }
.work-tagline { color: var(--muted); font-size: 15px; flex: 1; }
.work-meta { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.status { display: inline-flex; align-items: center; gap: 6px; }
.status .dot { width: 7px; height: 7px; border-radius: 50%; }
.status.done .dot { background: #5a9e6f; }
.status.progress .dot { background: var(--accent); }
.progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-deep), var(--accent)); border-radius: 999px; }
.work-link { margin-top: 6px; font-weight: 600; font-size: 15px; color: var(--accent); display: inline-flex; gap: 6px; align-items: center; }
.work-link:hover { gap: 10px; }

/* ---------- ОБ АВТОРЕ ---------- */
.about { background: var(--surface-2); }
.about-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: center; }
.about-photo { aspect-ratio: 1/1; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.about-text p { color: var(--muted); margin-bottom: 16px; }
.about-mission {
  margin-top: 18px; padding-left: 20px; border-left: 2px solid var(--accent);
  font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--text);
}

/* ---------- В ПРОЦЕССЕ ---------- */
.upcoming-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.upcoming-card { display: flex; gap: 18px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.upcoming-card .uc-cover { width: 88px; flex-shrink: 0; aspect-ratio: 3/4; border-radius: 8px; }
.upcoming-card .uc-body { display: flex; flex-direction: column; gap: 8px; }

/* ---------- ПОДПИСКА + СОЦСЕТИ ---------- */
.connect { text-align: center; }
.subscribe { display: flex; gap: 12px; max-width: 480px; margin: 28px auto 0; }
.subscribe input {
  flex: 1; min-width: 0; padding: 14px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-family: var(--sans); font-size: 15px;
}
.subscribe input:focus { outline: none; border-color: var(--accent); }
.form-note { margin-top: 14px; color: var(--accent-deep); font-size: 14px; }
.socials { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 34px; }
.socials a {
  font-family: var(--mono); font-size: 13px; letter-spacing: .5px;
  padding: 10px 20px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); transition: .2s;
}
.socials a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- ПОДВАЛ ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.footer-inner .brand { font-size: 18px; }
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-nav a { color: var(--muted); font-size: 14px; }
.footer-nav a:hover { color: var(--accent); }
.copyright { color: var(--faint); font-size: 13px; }

/* ---------- АНИМАЦИЯ ПОЯВЛЕНИЯ ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- АДАПТИВ ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 380px; }
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .about-photo { max-width: 320px; }
  .works-grid { grid-template-columns: repeat(2, 1fr); }
  .upcoming-grid { grid-template-columns: 1fr; }
  .nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 0 16px;
    transform: translateY(-130%); transition: transform .3s ease;
  }
  .nav.is-open { transform: translateY(0); }
  .nav a { padding: 14px 28px; }
  .nav a::after { display: none; }
  .burger { display: inline-flex; }
}
@media (max-width: 560px) {
  .section { padding: 64px 0; }
  .works-grid { grid-template-columns: 1fr; }
  .subscribe { flex-direction: column; }
  .subscribe .btn { width: 100%; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ---------- ТЕКУЩИЙ ПУНКТ МЕНЮ ---------- */
.nav a.is-current { color: var(--accent); }

/* ---------- СТРАНИЦА ПРОИЗВЕДЕНИЯ ---------- */
.work-page { padding-top: 56px; }
.wd-back { display: inline-block; color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.wd-back:hover { color: var(--accent); }
.wd-hero { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 48px; align-items: start; }
.wd-cover { aspect-ratio: 3 / 2; border-radius: 14px; }
.wd-title { font-family: var(--serif); font-size: clamp(30px, 5vw, 50px); line-height: 1.08; margin: 14px 0 16px; }
.wd-tagline { font-size: 19px; color: var(--muted); line-height: 1.6; max-width: 36ch; }
.wd-block { max-width: 720px; margin: 56px 0 0; }
.wd-h { font-family: var(--serif); font-size: 24px; margin: 0 0 16px; }
.wd-text p { color: var(--text); line-height: 1.8; margin: 0 0 16px; }
.wd-excerpt {
  margin: 0; padding: 22px 26px; border-left: 3px solid var(--accent);
  background: var(--surface-2); border-radius: 0 12px 12px 0;
  font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.7; color: var(--text);
}
.wd-facts { margin: 0; padding-left: 20px; }
.wd-facts li { color: var(--text); line-height: 1.7; margin: 0 0 10px; }
.wd-more { margin-top: 84px; padding-top: 48px; border-top: 1px solid var(--line); }
.wd-more .wd-h { margin-bottom: 28px; }
.wd-empty { text-align: center; padding: 80px 0; }
.wd-empty .btn { margin-top: 24px; }
@media (max-width: 760px) {
  .wd-hero { grid-template-columns: 1fr; gap: 26px; }
  .wd-cover { max-width: 420px; }
}

/* ---------- ПЕРЕКЛЮЧАТЕЛЬ ЯЗЫКА ---------- */
.lang-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-toggle button {
  font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .5px;
  padding: 6px 11px; background: transparent; color: var(--muted); border: 0; cursor: pointer; transition: .2s;
}
.lang-toggle button:hover { color: var(--text); }
.lang-toggle button.is-active { background: var(--accent); color: #fff; }

/* ---------- СТРАНИЦА КОНТАКТОВ ---------- */
.contact-grid { display: grid; grid-template-columns: 1.4fr 0.85fr; gap: 48px; align-items: start; margin-top: 36px; }
.cform { display: flex; flex-direction: column; }
.cform-label { font-size: 14px; font-weight: 600; color: var(--text); margin: 16px 0 7px; }
.cform-label:first-of-type { margin-top: 0; }
.cform input, .cform textarea {
  font-family: var(--sans); font-size: 15px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; width: 100%; transition: border-color .2s;
}
.cform input:focus, .cform textarea:focus { outline: none; border-color: var(--accent); }
.cform textarea { resize: vertical; min-height: 130px; }
.cform .btn { margin-top: 22px; align-self: flex-start; }
.cform .form-note { margin-top: 14px; }
.cform .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-aside { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 26px; }
.contact-aside .wd-h { margin-top: 0; }
@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; gap: 30px; }
}
