/* ============================================================
   ПОРТФОЛИО УЧИТЕЛЯ — Основные стили
   Bootstrap 5.3 + custom
   ============================================================ */

/* ---------- CSS VARIABLES ---------- */
:root {
  --cream:        #f4ede0;
  --cream-dark:   #ece4d5;
  --sage:         #8fa68c;
  --sage-dark:    #6d8a6a;
  --sage-light:   #b5cbb2;
  --sage-pale:    #dde8db;
  --beige:        #c9b89a;
  --beige-light:  #e0d3ba;
  --beige-pale:   #ede5d5;
  --card-bg:      #ede8d9;
  --dark:         #2a2a2a;
  --muted:        #7a7868;
  --white:        #ffffff;
  --shadow-sm:    0 2px 12px rgba(0,0,0,.06);
  --shadow-md:    0 6px 24px rgba(0,0,0,.10);
  --shadow-lg:    0 12px 40px rgba(0,0,0,.12);
  --radius-card:  18px;
  --radius-pill:  50px;
}

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

body {
  background-color: var(--cream);
  color: var(--dark);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a { text-decoration: none; }

img { max-width: 100%; }

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4, h5 {
  font-family: 'Playfair Display', Georgia, serif;
}

/* ---------- SHARED NAVBAR ---------- */
.navbar-main {
  background: var(--white);
  border-bottom: 1px solid var(--cream-dark);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.navbar-brand-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dark);
  line-height: 1.3;
}

.navbar-brand-text span { color: var(--sage); }

.nav-link-custom {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted) !important;
  padding: 0.35rem 0.9rem !important;
  border-radius: var(--radius-pill);
  transition: background .2s, color .2s;
}

.nav-link-custom:hover,
.nav-link-custom.active {
  background: var(--sage-pale);
  color: var(--sage) !important;
}

/* ---------- FOOTER ---------- */
.footer-portfolio {
  background: var(--card-bg);
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2rem;
  border-top: 1px solid var(--beige-light);
}

/* ============================================================
   INDEX PAGE — HERO
   ============================================================ */

.hero {
  position: relative;
  overflow: hidden;
  padding: 3.5rem 0 2.5rem;
  background: var(--cream);
}

/* organic blob shapes */
.blob {
  position: absolute;
  border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%;
  pointer-events: none;
  z-index: 0;
}

.blob-1 {
  width: 420px;
  height: 400px;
  background: var(--beige-pale);
  top: -60px;
  right: -80px;
  border-radius: 65% 35% 42% 58% / 44% 58% 42% 56%;
  opacity: .85;
}

.blob-2 {
  width: 300px;
  height: 280px;
  background: var(--sage-pale);
  top: 30px;
  right: 40px;
  border-radius: 40% 60% 65% 35% / 60% 30% 70% 40%;
  opacity: .55;
}

.blob-3 {
  width: 180px;
  height: 160px;
  background: var(--beige-light);
  bottom: -30px;
  left: -40px;
  border-radius: 50% 50% 30% 70% / 60% 40% 60% 40%;
  opacity: .5;
}

/* botanical decoration (SVG lines on right edge) */
.hero-decor-leaves {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 110px;
  z-index: 1;
  opacity: .3;
  pointer-events: none;
}

.hero-decor-dots {
  position: absolute;
  top: 20px;
  left: 20px;
  opacity: .25;
  pointer-events: none;
}

/* label above h1 */
.hero-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: .5rem;
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--dark);
  margin-bottom: .9rem;
}

.hero-subtitle {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--muted);
  text-transform: uppercase;
}

/* photo container */
.hero-photo-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-photo-frame {
  width: 280px;
  height: 340px;
  background: var(--beige-light);
  border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow-md);
}

.hero-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo-frame .photo-icon {
  font-size: 9rem;
  color: var(--beige);
  line-height: 1;
  margin-bottom: -.5rem;
  opacity: .6;
}

/* circular badge */
.hero-badge {
  position: absolute;
  width: 108px;
  height: 108px;
  background: var(--sage);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.4;
  padding: .9rem;
  z-index: 4;
  bottom: 20px;
  right: 0;
  box-shadow: var(--shadow-md);
  cursor: default;
  border: 3px solid var(--white);
}

/* ============================================================
   INDEX PAGE — PROFILE SECTION
   ============================================================ */

.profile-section {
  background: var(--sage-pale);
  border-radius: var(--radius-card);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.profile-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: .3rem;
  color: var(--dark);
}

.profile-role {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: .7rem;
}

.profile-hr {
  border: none;
  border-top: 1px solid var(--beige-light);
  margin: .65rem 0 .8rem;
}

.profile-contact {
  font-size: 0.81rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .35rem;
}

.profile-contact i { color: var(--sage); font-size: .85rem; }

.profile-divider {
  width: 1px;
  background: var(--beige-light);
  align-self: stretch;
  margin: 0 1.5rem;
}

.profile-desc {
  font-size: 0.85rem;
  color: var(--dark);
  line-height: 1.8;
}

/* ============================================================
   INDEX PAGE — CATEGORY CARDS
   ============================================================ */

.cards-section {
  padding-bottom: 2rem;
}

.card-portfolio {
  background: var(--card-bg);
  border: none;
  border-radius: var(--radius-card);
  padding: 1.6rem 1.5rem;
  height: 100%;
  transition: transform .25s, box-shadow .25s;
  color: var(--dark);
  display: block;
  text-decoration: none;
  cursor: pointer;
}

.card-portfolio:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  color: var(--dark);
}

.card-icon {
  width: 52px;
  height: 52px;
  background: var(--beige-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .9rem;
  font-size: 1.35rem;
  color: var(--sage);
  flex-shrink: 0;
}

.card-portfolio h5 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .5rem;
  color: var(--dark);
}

.card-divider {
  width: 28px;
  height: 2px;
  background: var(--beige);
  margin-bottom: .6rem;
  border-radius: 2px;
}

.card-portfolio p {
  font-size: 0.81rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* ============================================================
   INDEX PAGE — QUOTE SECTION
   ============================================================ */

.quote-section {
  background: var(--sage-pale);
  border-radius: var(--radius-card);
  padding: 2rem 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.quote-section::before {
  content: '';
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 180px;
  height: 180px;
  background: var(--sage-light);
  border-radius: 50%;
  opacity: .25;
}

.quote-mark {
  font-family: 'Playfair Display', serif;
  font-size: 5rem;
  color: var(--sage);
  line-height: .6;
  opacity: .45;
  margin-bottom: .5rem;
  display: block;
}

.quote-text {
  font-size: .95rem;
  font-style: italic;
  color: var(--dark);
  line-height: 1.75;
  margin: 0;
}

.quote-tagline {
  font-size: 0.88rem;
  color: var(--sage-dark);
  font-weight: 700;
  text-align: right;
  line-height: 1.55;
  margin: 0;
}

.quote-tagline i { color: var(--sage); }

/* ============================================================
   SHARED — PAGE HEADER (works + detail pages)
   ============================================================ */

.page-header {
  background: linear-gradient(135deg, var(--card-bg) 0%, var(--sage-pale) 100%);
  padding: 2.5rem 0 2rem;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 260px;
  height: 260px;
  background: var(--beige-light);
  border-radius: 50%;
  opacity: .35;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: 30%;
  width: 140px;
  height: 140px;
  background: var(--sage-light);
  border-radius: 50%;
  opacity: .2;
}

.page-header-content { position: relative; z-index: 1; }

.page-title {
  font-size: 2.3rem;
  font-weight: 700;
  margin-bottom: .4rem;
  color: var(--dark);
}

.page-subtitle {
  font-size: .87rem;
  color: var(--muted);
  margin: 0;
}

/* breadcrumb */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: .75rem;
  font-size: .8rem;
}

.breadcrumb-item + .breadcrumb-item::before { color: var(--muted); }

.breadcrumb-item a {
  color: var(--sage);
  font-weight: 600;
}

.breadcrumb-item.active { color: var(--muted); }

/* ============================================================
   WORKS LIST PAGE
   ============================================================ */

/* filter pills */
.filter-pills { margin-bottom: .5rem; }

.btn-pill {
  border-radius: var(--radius-pill);
  font-size: .78rem;
  font-weight: 700;
  padding: .35rem 1.1rem;
  transition: all .2s;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-pill-active {
  background: var(--sage);
  color: #fff;
  border-color: var(--sage);
}

.btn-pill-idle {
  background: transparent;
  color: var(--muted);
  border-color: var(--beige-light);
}

.btn-pill-idle:hover {
  background: var(--card-bg);
  border-color: var(--beige);
  color: var(--dark);
}

.results-count {
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* work card */
.work-card {
  background: var(--white);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
  color: var(--dark);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.work-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  color: var(--dark);
}

.work-card-thumb {
  width: 100%;
  height: 175px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.work-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-card-body {
  padding: 1.25rem 1.3rem 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.work-badge {
  display: inline-block;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--sage-pale);
  color: var(--sage-dark);
  padding: .18rem .75rem;
  border-radius: var(--radius-pill);
  margin-bottom: .65rem;
}

.work-card h5 {
  font-size: .98rem;
  font-weight: 700;
  margin-bottom: .4rem;
  line-height: 1.3;
  flex: 1;
}

.work-card p {
  font-size: .8rem;
  color: var(--muted);
  margin: 0 0 .75rem;
  line-height: 1.5;
}

.work-date {
  font-size: .75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-top: auto;
}

.work-date i { color: var(--sage); }

/* pagination */
.pagination .page-link {
  color: var(--sage);
  border-color: var(--beige-light);
  border-radius: 10px !important;
  margin: 0 3px;
  font-size: .82rem;
  font-weight: 600;
  padding: .4rem .75rem;
  transition: all .2s;
}

.pagination .page-item.active .page-link {
  background: var(--sage);
  border-color: var(--sage);
  color: #fff;
}

.pagination .page-link:hover {
  background: var(--sage-pale);
  border-color: var(--sage-pale);
  color: var(--sage);
}

.pagination .page-item.disabled .page-link {
  color: var(--beige);
  border-color: var(--beige-light);
}

/* ============================================================
   WORK DETAIL PAGE
   ============================================================ */

.detail-main {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 2rem 2.2rem;
  box-shadow: var(--shadow-sm);
}

.detail-main h3 {
  font-size: 1.25rem;
  color: var(--dark);
  margin: 1.8rem 0 .7rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--sage-pale);
}

.detail-main h3:first-child { margin-top: 0; }

.detail-main p {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.8;
}

.detail-main ul,
.detail-main ol {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.8;
  padding-left: 1.5rem;
}

.detail-main ul li::marker { color: var(--sage); }

.detail-main ol li::marker {
  color: var(--sage);
  font-weight: 700;
}

.detail-main blockquote {
  background: var(--sage-pale);
  border-left: 4px solid var(--sage);
  border-radius: 0 10px 10px 0;
  padding: 1rem 1.25rem;
  margin: 1.2rem 0;
  font-style: italic;
  font-size: .88rem;
  color: var(--dark);
}

.detail-main .highlight-box {
  background: var(--beige-pale);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin: 1.2rem 0;
  font-size: .87rem;
  color: var(--dark);
}

.detail-main .highlight-box strong {
  color: var(--sage-dark);
}

.stage-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.stage-num {
  width: 34px;
  height: 34px;
  background: var(--sage);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: .1rem;
}

.stage-body { flex: 1; }

.stage-body strong {
  display: block;
  font-size: .88rem;
  margin-bottom: .2rem;
  color: var(--dark);
}

.stage-body span {
  font-size: .82rem;
  color: var(--muted);
}

/* sidebar cards */
.sidebar-card {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.3rem;
}

.sidebar-card-title {
  font-family: 'Montserrat', sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .9rem;
  padding-bottom: .55rem;
  border-bottom: 2px solid var(--cream-dark);
}

.sidebar-info-row {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: .7rem;
  font-size: .83rem;
}

.sidebar-info-row i {
  color: var(--sage);
  margin-top: .15rem;
  min-width: 16px;
  font-size: .9rem;
}

.sidebar-info-row span {
  color: var(--muted);
  line-height: 1.45;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.tag {
  background: var(--sage-pale);
  color: var(--sage-dark);
  font-size: .72rem;
  font-weight: 600;
  padding: .22rem .75rem;
  border-radius: var(--radius-pill);
}

/* related work mini card */
.related-mini {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  padding: .7rem 0;
  border-bottom: 1px solid var(--cream-dark);
  text-decoration: none;
  color: var(--dark);
  transition: color .2s;
}

.related-mini:last-child { border-bottom: none; }

.related-mini:hover { color: var(--sage); }

.related-mini-icon {
  width: 40px;
  height: 40px;
  background: var(--card-bg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--sage);
  flex-shrink: 0;
}

.related-mini-title {
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.3;
}

.related-mini-cat {
  font-size: .72rem;
  color: var(--muted);
  margin-top: .15rem;
}

/* buttons */
.btn-sage {
  background: var(--sage);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: .6rem 1.6rem;
  font-size: .85rem;
  font-weight: 700;
  transition: background .2s, transform .15s;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
}

.btn-sage:hover {
  background: var(--sage-dark);
  color: #fff;
  transform: translateY(-1px);
}

.btn-outline-sage {
  background: transparent;
  color: var(--sage);
  border: 2px solid var(--sage);
  border-radius: var(--radius-pill);
  padding: .55rem 1.4rem;
  font-size: .85rem;
  font-weight: 700;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
}

.btn-outline-sage:hover {
  background: var(--sage);
  color: #fff;
}

/* meta row under title */
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: .9rem;
  font-size: .82rem;
  color: var(--muted);
}

.detail-meta-item {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.detail-meta-item i { color: var(--sage); }

/* progress/stats */
.stat-pill {
  background: var(--sage-pale);
  border-radius: 10px;
  padding: .7rem 1rem;
  text-align: center;
}

.stat-pill .stat-val {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--sage);
  display: block;
  line-height: 1;
}

.stat-pill .stat-label {
  font-size: .72rem;
  color: var(--muted);
  margin-top: .2rem;
  display: block;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 767.98px) {
  .hero { padding: 2.5rem 0 2rem; }
  .hero-title { font-size: 2.2rem; }
  .hero-photo-frame { width: 220px; height: 270px; }
  .hero-badge { width: 88px; height: 88px; font-size: .56rem; right: -10px; bottom: 10px; }
  .blob-1 { width: 280px; height: 270px; right: -50px; }
  .blob-2 { width: 220px; height: 210px; }
  .profile-section { flex-direction: column; }
  .profile-divider { display: none; }
  .quote-section { padding: 1.5rem; }
  .detail-main { padding: 1.3rem 1.1rem; }
}

@media (max-width: 991.98px) {
  .hero-photo-wrap { margin-top: 2rem; }
}
