/* =========================================================
   Portfolio — Учитель начальных классов
   Bootstrap 5.3 + custom theme
   ========================================================= */

:root {
  --bs-body-font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  --bs-body-color: #2f3832;
  --bs-body-bg: #faf6f1;

  /* palette */
  --sage-50:  #f2f4ef;
  --sage-100: #e3e8dd;
  --sage-200: #c9d2c0;
  --sage-400: #a8b5a0;
  --sage-500: #8a9a82;
  --sage-700: #5d6a56;

  --blush-50:  #fbf5f1;
  --blush-100: #f5ebe3;
  --blush-200: #ead9d0;
  --blush-300: #dbc3b6;
  --blush-500: #b89a8a;

  --cream-50: #faf6f1;
  --cream-100: #f5efe6;

  --ink-900: #2f3832;
  --ink-700: #4d5650;
  --ink-500: #7a8078;
  --ink-300: #b4b8b2;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 40px;

  --shadow-soft: 0 10px 40px -20px rgba(47,56,50,0.18);
  --shadow-card: 0 4px 24px -12px rgba(47,56,50,0.12);
}

/* ---- typography ---- */
body {
  font-family: 'Manrope', system-ui, sans-serif;
  color: var(--ink-900);
  background: var(--cream-50);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, .display-1, .display-2, .display-3, .display-4, .heading {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-900);
}

.eyebrow {
  font-family: 'Manrope', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-500);
}

.text-ink    { color: var(--ink-900) !important; }
.text-ink-70 { color: var(--ink-700) !important; }
.text-muted2 { color: var(--ink-500) !important; }

.bg-cream  { background: var(--cream-50) !important; }
.bg-cream2 { background: var(--cream-100) !important; }
.bg-sage   { background: var(--sage-400) !important; color: #fff; }
.bg-sage-100 { background: var(--sage-100) !important; }
.bg-sage-50 { background: var(--sage-50) !important; }
.bg-blush  { background: var(--blush-200) !important; }
.bg-blush-50 { background: var(--blush-50) !important; }
.bg-blush-100 { background: var(--blush-100) !important; }

/* ---- layout helpers ---- */
.section { padding: clamp(3rem, 6vw, 6rem) 0; position: relative; }
.section-sm { padding: clamp(2rem, 4vw, 4rem) 0; }

.rounded-soft { border-radius: var(--radius-md); }
.rounded-card { border-radius: var(--radius-lg); }
.rounded-hero { border-radius: var(--radius-xl); }

/* ---- hero (main page) ---- */
.hero {
  position: relative;
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 4rem);
  overflow: hidden;
}
.hero-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 4vw, 3.5rem);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}
.hero h1 {
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.08;
  font-weight: 500;
  color: var(--ink-900);
}
.hero-dots {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-700);
}
.hero-dots span + span::before {
  content: "•";
  margin: 0 .65rem;
  color: var(--sage-400);
}
.hero-portrait {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(140deg, var(--sage-100) 0%, var(--blush-100) 100%);
  box-shadow: 0 20px 60px -30px rgba(47,56,50,0.3);
}
.hero-badge {
  position: absolute;
  left: -8%;
  bottom: 12%;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: var(--blush-300);
  color: var(--ink-900);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.25;
  padding: 1rem;
  box-shadow: 0 10px 30px -15px rgba(47,56,50,0.3);
}

/* name block */
.name-block .name {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.15;
}
.name-block .role {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-top: .5rem;
}

/* quote / motto */
.motto {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink-700);
}

/* contacts list */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li {
  display: flex; align-items: center; gap: .75rem;
  padding: .35rem 0;
  color: var(--ink-700);
  font-size: 0.95rem;
}
.contact-list .ico {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--sage-100);
  color: var(--sage-700);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ---- category cards grid ---- */
.cat-card {
  position: relative;
  padding: clamp(1.5rem, 2.5vw, 2rem);
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid rgba(47,56,50,0.04);
  transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s;
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
  overflow: hidden;
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
  color: inherit;
}
.cat-card .icon-wrap {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--sage-100);
  color: var(--sage-700);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.5rem;
  transition: transform .4s;
}
.cat-card:hover .icon-wrap { transform: scale(1.08) rotate(-4deg); }
.cat-card h3 {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: .75rem;
  color: var(--ink-900);
}
.cat-card p {
  color: var(--ink-700);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
}
.cat-card.tone-blush { background: var(--blush-50); }
.cat-card.tone-sage  { background: var(--sage-50); }
.cat-card.tone-cream { background: var(--cream-100); }
.cat-card.tone-blush .icon-wrap { background: var(--blush-200); color: var(--blush-500); }
.cat-card.tone-cream .icon-wrap { background: var(--blush-100); color: var(--blush-500); }

.cat-card .arrow {
  position: absolute;
  right: 1.5rem; bottom: 1.5rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(47,56,50,0.12);
  display: flex; align-items: center; justify-content: center;
  transition: all .3s;
  color: var(--ink-700);
}
.cat-card:hover .arrow {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: #fff;
  transform: translateX(4px);
}

/* ---- quote footer ---- */
.quote-strip {
  background: var(--sage-100);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  position: relative;
  overflow: hidden;
}
.quote-mark {
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  line-height: 0.8;
  color: var(--sage-400);
}
.quote-strip .quote-text {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--ink-900);
}
.quote-strip .quote-sub {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-700);
}

/* ---- decorative SVG ---- */
.deco {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.deco-top-right { top: -60px; right: -80px; width: 340px; opacity: .8; }
.deco-top-left  { top: -40px; left: -60px; width: 260px; opacity: .7; }
.deco-bottom-right { bottom: -60px; right: -60px; width: 280px; opacity: .7; }
.deco-bottom-left  { bottom: -40px; left: -40px; width: 220px; opacity: .6; }
.deco-mid-right { top: 30%; right: -100px; width: 260px; opacity: .55; }

/* ---- breadcrumb ---- */
.crumbs {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--ink-500);
  padding: 1.25rem 0;
}
.crumbs a { color: var(--ink-500); text-decoration: none; }
.crumbs a:hover { color: var(--sage-500); }
.crumbs .sep { margin: 0 .6rem; color: var(--ink-300); }
.crumbs .current { color: var(--ink-900); font-weight: 500; }

/* ---- inner page header ---- */
.page-head {
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(2rem, 3vw, 3rem);
  position: relative;
  overflow: hidden;
}
.page-head .eyebrow { color: var(--sage-500); }
.page-head h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  line-height: 1.1;
  max-width: 820px;
}
.page-head .lead-txt {
  font-size: 1.1rem;
  color: var(--ink-700);
  max-width: 620px;
  margin-top: 1rem;
  line-height: 1.6;
}

/* back to index link */
.back-link {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .85rem;
  color: var(--ink-700);
  text-decoration: none;
  padding: .5rem 1rem;
  border: 1px solid rgba(47,56,50,0.1);
  border-radius: 999px;
  transition: all .25s;
}
.back-link:hover { background: var(--ink-900); color: #fff; border-color: var(--ink-900); }

/* ---- generic panels ---- */
.panel {
  background: #fff;
  border-radius: var(--radius-md);
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  box-shadow: var(--shadow-card);
  height: 100%;
}
.panel-outline {
  background: transparent;
  border: 1px solid rgba(47,56,50,0.08);
  border-radius: var(--radius-md);
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  height: 100%;
}

/* stats row */
.stat {
  text-align: center;
  padding: 1.5rem 1rem;
}
.stat .num {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  line-height: 1;
  color: var(--sage-500);
}
.stat .lbl {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-top: .5rem;
}

/* timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 2px dashed var(--sage-200);
}
.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.43rem;
  top: .35rem;
  width: 14px; height: 14px;
  background: var(--sage-400);
  border-radius: 50%;
  border: 3px solid var(--cream-50);
}
.timeline-year {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--sage-700);
}
.timeline-title { font-weight: 600; margin: .25rem 0; }
.timeline-text { color: var(--ink-700); font-size: .95rem; }

/* tag pill */
.tag {
  display: inline-block;
  padding: .35rem .85rem;
  border-radius: 999px;
  background: var(--sage-100);
  color: var(--sage-700);
  font-size: .78rem;
  letter-spacing: 0.06em;
  margin: 0 .25rem .5rem 0;
}
.tag.tag-blush { background: var(--blush-100); color: var(--blush-500); }
.tag.tag-cream { background: var(--cream-100); color: var(--ink-700); }

/* gallery item placeholder */
.photo-ph {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background:
    repeating-linear-gradient(135deg, rgba(47,56,50,0.04) 0 2px, transparent 2px 14px),
    linear-gradient(140deg, var(--sage-100) 0%, var(--blush-100) 100%);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .75rem;
  color: var(--ink-500);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  overflow: hidden;
}
.photo-ph.aspect-square { aspect-ratio: 1/1; }
.photo-ph.aspect-wide { aspect-ratio: 16/9; }
.photo-ph.aspect-tall { aspect-ratio: 3/4; }

/* achievement card */
.ach-card {
  border-radius: var(--radius-md);
  padding: 1.5rem;
  background: #fff;
  border: 1px solid rgba(47,56,50,0.06);
  height: 100%;
  display: flex; flex-direction: column;
  transition: transform .3s, box-shadow .3s;
}
.ach-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.ach-card .year {
  font-family: 'Playfair Display', serif;
  color: var(--sage-500);
  font-size: 1.05rem;
}
.ach-card .title {
  font-weight: 600;
  margin: .5rem 0 .75rem;
  font-size: 1.02rem;
  line-height: 1.35;
}
.ach-card .meta { color: var(--ink-500); font-size: .85rem; margin-top: auto; }
.ach-card .ribbon {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .72rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: .3rem .65rem;
  border-radius: 999px;
  background: var(--sage-100); color: var(--sage-700);
  margin-bottom: 1rem;
  align-self: flex-start;
}
.ach-card.gold .ribbon { background: #f1e4c4; color: #8a6d2e; }
.ach-card.silver .ribbon { background: #e6e6e6; color: #5e5e5e; }

/* footer */
.site-footer {
  background: var(--sage-100);
  padding: 3rem 0 2rem;
  position: relative;
  overflow: hidden;
  margin-top: 4rem;
}
.site-footer .brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
}
.site-footer a { color: var(--ink-700); text-decoration: none; }
.site-footer a:hover { color: var(--sage-700); }

/* reveal animation */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--d, 0s);
}
[data-reveal].is-in { opacity: 1; transform: translateY(0); }

/* button */
.btn-sage {
  background: var(--sage-400);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: .75rem 1.5rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all .25s;
}
.btn-sage:hover { background: var(--sage-500); color: #fff; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink-900);
  border: 1px solid rgba(47,56,50,0.15);
  border-radius: 999px;
  padding: .75rem 1.5rem;
  font-weight: 500;
  transition: all .25s;
}
.btn-ghost:hover { background: var(--ink-900); color: #fff; border-color: var(--ink-900); }

/* form */
.form-control, .form-select {
  background: #fff;
  border: 1px solid rgba(47,56,50,0.1);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  color: var(--ink-900);
}
.form-control:focus, .form-select:focus {
  border-color: var(--sage-400);
  box-shadow: 0 0 0 .2rem rgba(168,181,160,0.2);
}
.form-label { font-size: .85rem; color: var(--ink-700); letter-spacing: 0.04em; }

/* responsive tweaks */
@media (max-width: 767.98px) {
  .deco-top-right, .deco-top-left, .deco-bottom-right, .deco-bottom-left, .deco-mid-right {
    width: 160px;
    opacity: .4;
  }
  .hero-badge { width: 100px; height: 100px; font-size: .8rem; left: 2%; bottom: 0; }
}
