:root {
  --cream: #f7f2e8;
  --cream-deep: #efe6d4;
  --paper: #fffdf8;
  --ink: #1f1b16;
  --ink-soft: #3d362e;
  --muted: #6f665b;
  --line: #e4d9c5;
  --gold: #b07d1f;
  --gold-ink: #86600f;
  --gold-soft: #f3e6c6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(60, 40, 10, .06), 0 8px 24px -12px rgba(60, 40, 10, .18);
  --serif: "Noto Serif Georgian", Georgia, "Times New Roman", serif;
  --sans: "Noto Sans Georgian", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-ink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
  color: var(--ink);
  letter-spacing: -.005em;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.muted { color: var(--muted); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin: 0 0 .75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: .95rem;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--gold-ink); color: #fff; }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-sm { padding: .55rem 1rem; font-size: .88rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 242, 232, .88);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: .01em;
}
.wordmark span { color: var(--gold); margin-left: 2px; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.nav-links, .lang-switch { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.nav-links { gap: 24px; }
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
  padding: 6px 0;
  border-bottom: 1.5px solid transparent;
}
.nav-links a:hover, .nav-links a[aria-current] { color: var(--ink); border-bottom-color: var(--gold); }

.lang-switch {
  gap: 2px;
  background: var(--cream-deep);
  border-radius: 999px;
  padding: 3px;
}
.lang-switch a {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 9px;
  border-radius: 999px;
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  padding: 8px 0;
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink);
  cursor: pointer;
}
.menu-toggle-bars, .menu-toggle-bars::before, .menu-toggle-bars::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.menu-toggle-bars { position: relative; }
.menu-toggle-bars::before, .menu-toggle-bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle-bars::before { top: -6px; }
.menu-toggle-bars::after { top: 6px; }
.nav-open .menu-toggle-bars { background: transparent; }
.nav-open .menu-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-open .menu-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 88px;
}
.hero::before {
  content: "";
  position: absolute;
  right: -10%;
  top: -30%;
  width: 60%;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, var(--gold-soft), transparent);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
  gap: 56px;
}
.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.08;
  font-weight: 700;
  margin-bottom: 1.25rem;
}
.hero-lead {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 34ch;
  margin: 0 0 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-portrait {
  margin: 0;
  justify-self: end;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4 / 5;
  border-radius: 200px 200px var(--radius) var(--radius);
  overflow: hidden;
  background: var(--cream-deep);
  box-shadow: var(--shadow);
}
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }

/* Sections */
.section { padding: 72px 0; }
.section-tinted { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.section-head h1, .section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.section-link {
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none;
  white-space: nowrap;
}
.section-link:hover { text-decoration: underline; }

/* Books */
.book-row {
  list-style: none;
  margin: 0 -24px;
  padding: 8px 24px 20px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(136px, 1fr);
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.book { scroll-snap-align: start; }
.book a { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); }
.book-cover {
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: 4px 10px 10px 4px;
  overflow: hidden;
  background: var(--cream-deep);
  box-shadow: -3px 0 0 rgba(0, 0, 0, .12) inset, var(--shadow);
  transition: transform .3s, box-shadow .3s;
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book a:hover .book-cover { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 18px 30px -14px rgba(60, 40, 10, .45); }
.book-title {
  font-weight: 600;
  font-size: .92rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.book-price { font-size: .9rem; font-weight: 600; color: var(--gold-ink); }
.book-price.is-free { color: #2f7a4d; }

/* Courses */
.course-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 500px), 1fr)); gap: 24px; }
.course {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.course-cover { display: block; background: var(--cream-deep); }
.course-cover img { width: 100%; height: 100%; object-fit: cover; }
.course-body { padding: 22px 24px; display: flex; flex-direction: column; }
.course h3 { font-size: 1.15rem; margin-bottom: .6rem; }
.course h3 a { color: inherit; text-decoration: none; }
.course h3 a:hover { color: var(--gold-ink); }
.course-desc { font-size: .92rem; color: var(--muted); margin: 0 0 1.2rem; }
.course-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.course-price { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; }
.course-price del { font-size: .95rem; font-weight: 500; color: var(--muted); margin-right: 4px; }

/* News */
.news-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.news-side { display: flex; flex-direction: column; gap: 24px; }
.news-card { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; align-items: start; }
.news-card.is-lead { grid-template-columns: 1fr; gap: 18px; }
.news-image {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--cream-deep);
}
.news-card.is-lead .news-image { aspect-ratio: 16 / 10; border-radius: var(--radius); }
.news-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.news-card:hover .news-image img { transform: scale(1.04); }
.news-body time { font-size: .8rem; font-weight: 600; letter-spacing: .06em; color: var(--muted); }
.news-body h2, .news-body h3 { font-size: 1.05rem; margin: .25rem 0 .4rem; }
.news-card.is-lead h3 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin: .4rem 0 .7rem; }
.news-body h2 a, .news-body h3 a { color: inherit; text-decoration: none; }
.news-body h2 a:hover, .news-body h3 a:hover { color: var(--gold-ink); }
.news-body p { margin: 0 0 .8rem; color: var(--ink-soft); }
.read-more { font-weight: 600; text-decoration: none; }

.news-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 36px 28px; }
.news-list .news-card { grid-template-columns: 1fr; gap: 14px; }
.news-list .news-image { aspect-ratio: 16 / 10; border-radius: var(--radius); }
.news-list .news-body h2 { font-size: 1.2rem; }
.news-list .news-body p { font-size: .95rem; color: var(--muted); }

.pager { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 48px; font-weight: 600; }
.pager a {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
}
.pager a:hover { background: var(--ink); color: var(--paper); }

/* About strip */
.about-strip { background: var(--ink); color: #e9e2d4; }
.about-strip h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 1rem; }
.about-inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.about-inner p { margin: 0; font-size: 1.08rem; max-width: 52ch; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.contact-list li { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.contact-list span { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: #a79c88; padding-top: 2px; }
.contact-list a { color: #f1d9a0; word-break: break-word; }
.contact-list a:hover { color: #fff; }

/* Article */
.article { max-width: 780px; padding-top: 48px; padding-bottom: 72px; }
.article-head { margin-bottom: 32px; }
.article-head h1 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); margin: 1.1rem 0 .8rem; }
.article-head time { color: var(--muted); font-weight: 600; font-size: .9rem; }
.article-cover { margin: 0 0 40px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.article-cover img { width: 100%; }

.prose { font-size: 1.08rem; line-height: 1.8; color: var(--ink-soft); overflow-wrap: break-word; }
.prose h2, .prose h3, .prose h4 { margin: 2rem 0 .8rem; }
.prose p { margin: 0 0 1.2rem; }
.prose img { border-radius: 10px; margin: 1.5rem auto; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 10px; margin: 1.5rem 0; }
.prose blockquote {
  margin: 2rem 0;
  padding: 0 0 0 1.4rem;
  border-left: 3px solid var(--gold);
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--ink);
}
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; }
.prose td, .prose th { border: 1px solid var(--line); padding: .5rem .7rem; }

.tags { list-style: none; margin: 40px 0 0; padding: 24px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { background: var(--cream-deep); color: var(--ink-soft); font-size: .82rem; font-weight: 500; padding: 4px 12px; border-radius: 999px; }

/* Legacy inner pages (about, contact) */
.post-full, .page-contact main > .inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.post-full .post-header { margin-bottom: 32px; }
.post-title { font-family: var(--serif); font-size: clamp(1.9rem, 4.4vw, 2.7rem); font-weight: 600; line-height: 1.2; margin: 0 0 24px; }
.post-full .post-thumbnail img { width: 300px !important; border-radius: 200px 200px var(--radius) var(--radius); box-shadow: var(--shadow); }
.post-content { font-size: 1.08rem; line-height: 1.8; color: var(--ink-soft); margin-top: 32px; }
.post-content blockquote {
  margin: 0;
  padding: 0 0 0 1.4rem;
  border-left: 3px solid var(--gold);
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--ink);
}
.post-content blockquote p { margin: 0; }

.contact-form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.form-item { margin-bottom: 18px; }
.form-label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.form-label span { font-weight: 400; color: var(--muted); }
.form-input, .form-textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .75rem .9rem;
}
.form-textarea { min-height: 160px; resize: vertical; }
.form-input:focus, .form-textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; background: #fff; }
.contact-form .button {
  font: inherit;
  font-weight: 600;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  border-radius: 999px;
  padding: .8rem 1.6rem;
  cursor: pointer;
}
.contact-form .button:hover { background: var(--gold-ink); }

/* Footer */
.site-footer { padding: 48px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-inner p { margin: 4px 0 0; font-size: .88rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { color: var(--ink-soft); text-decoration: none; font-size: .92rem; }
.footer-links a:hover { color: var(--gold-ink); }
.social {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--ink);
}
.social:hover { background: var(--ink); color: var(--paper); }

/* Responsive */
@media (max-width: 980px) {
  .hero-inner { gap: 36px; }
  .news-grid { grid-template-columns: 1fr; }
  .about-inner { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 820px) {
  .menu-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 12px 24px 24px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -20px rgba(60, 40, 10, .35);
    display: none;
  }
  .nav-open .site-nav { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav-links a:hover, .nav-links a[aria-current] { border-bottom-color: var(--line); color: var(--gold-ink); }
  .lang-switch { align-self: flex-start; }
  .lang-switch a { font-size: .85rem; padding: 6px 12px; }

  .hero { padding: 40px 0 56px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-portrait { order: -1; justify-self: start; max-width: 240px; }
  .hero-lead { font-size: 1.08rem; }
  .section { padding: 56px 0; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .book-row { margin: 0 -16px; padding: 8px 16px 20px; scroll-padding-inline: 16px; grid-auto-columns: 42%; gap: 16px; }
  .course { grid-template-columns: 1fr; }
  .course-cover { aspect-ratio: 16 / 9; }
  .news-card { grid-template-columns: 104px minmax(0, 1fr); }
  .section-head { flex-wrap: wrap; }
  .contact-list li { grid-template-columns: 1fr; gap: 2px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
