/* ==========================================================================
   Портфолио учителя — дизайн-система
   ========================================================================== */

:root {
  --color-bg: #fdf9ef;
  --color-bg-alt: #fdf0cf;
  --color-surface: #fffefa;
  --color-ink: #2d2518;
  --color-text: #3c3224;
  --color-text-muted: #978a68;
  --color-primary: #8c3a3a;
  --color-primary-dark: #6c2b2b;
  --color-primary-light: #d8aaa7;
  --color-accent: #eab84a;
  --color-accent-light: #f8e3a8;
  --color-border: #f3e2b0;
  --shadow-sm: 0 2px 8px rgba(45, 37, 24, 0.07);
  --shadow-md: 0 8px 24px rgba(45, 37, 24, 0.09);
  --shadow-lg: 0 16px 48px rgba(45, 37, 24, 0.16);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --container-width: 1160px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

img {
  max-width: 100%;
  display: block;
}

/* ---------- Scroll reveal (progressive enhancement, see main.js) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  color: var(--color-primary-dark);
}

h1 {
  font-weight: 800;
}

p {
  margin: 0 0 1em;
}

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

.section {
  padding: 72px 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section-heading {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238c3a3a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z'/%3E%3Cline x1='16' y1='8' x2='2' y2='22'/%3E%3Cline x1='17.5' y1='15' x2='9' y2='15'/%3E%3C/svg%3E") no-repeat center / contain;
  flex-shrink: 0;
}

.section-heading .eyebrow {
  display: inline-flex;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 26px;
  padding-bottom: 16px;
}

.section-heading .eyebrow::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 9px;
  height: 9px;
  background: var(--color-accent);
  transform: translateX(-50%) rotate(45deg);
}

.section-heading h2 {
  font-size: clamp(1.9rem, 2.9vw, 2.7rem);
  margin-bottom: 14px;
}

.section-heading p {
  color: var(--color-text-muted);
  font-size: 1.08rem;
  font-style: italic;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.015em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn--primary {
  position: relative;
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  isolation: isolate;
}

.btn--primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}

.btn--primary:hover::after {
  left: 130%;
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn--outline:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-2px);
}

.btn--light {
  background: #fff;
  color: var(--color-primary);
}

.btn--light:hover {
  background: var(--color-accent-light);
  transform: translateY(-2px);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 248, 244, 0.88);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  padding-left: 16px;
}

.brand::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--color-primary), var(--color-accent));
}

.brand-text .name {
  display: block;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--color-primary-dark);
}

.brand-text .role {
  display: block;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.main-nav a {
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  color: var(--color-text);
  transition: all 0.18s ease;
}

.main-nav a:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary-dark);
}

.main-nav a.is-active {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  min-width: 240px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.18s ease;
  border: 1px solid var(--color-border);
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-panel a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--color-text);
  font-size: 0.92rem;
}

.nav-dropdown-panel a:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--color-primary-dark);
  cursor: pointer;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: linear-gradient(160deg, #fff6dc 0%, var(--color-bg-alt) 55%, #f6dfa0 100%);
  color: var(--color-text);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 10% 15%, rgba(140, 58, 58, 0.09), transparent 42%),
    radial-gradient(circle at 90% 85%, rgba(234, 184, 74, 0.4), transparent 48%);
  pointer-events: none;
}

.hero-watermark {
  position: absolute;
  top: 50%;
  right: -30px;
  transform: translateY(-50%) rotate(-6deg);
  width: clamp(260px, 32vw, 460px);
  height: auto;
  color: rgba(140, 58, 58, 0.1);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  animation: heroWatermarkDrift 12s ease-in-out infinite;
}

@keyframes heroWatermarkDrift {
  0%, 100% { transform: translateY(-50%) rotate(-6deg); }
  50% { transform: translateY(-54%) rotate(-3deg); }
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
  padding: 88px 0 96px;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 18px;
}

.hero h1 {
  color: var(--color-ink);
  font-size: clamp(2.3rem, 4.4vw, 3.6rem);
  margin-bottom: 20px;
}

.hero p.lead {
  font-size: 1.15rem;
  color: var(--color-text);
  max-width: 540px;
  padding: 0 4px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-photo-frame {
  position: relative;
  justify-self: center;
  width: 300px;
  height: 340px;
  padding: 14px;
  animation: heroPhotoFloat 6s ease-in-out infinite;
}

@keyframes heroPhotoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-photo-frame::before,
.hero-photo-frame::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  border: 2px solid var(--color-accent);
  z-index: 2;
}

.hero-photo-frame::before {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}

.hero-photo-frame::after {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}

.hero-photo-img,
.hero-photo-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 6px solid var(--color-surface);
}

.hero-photo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--color-accent-light), var(--color-primary-light));
  font-family: var(--font-serif);
  font-size: 3.4rem;
  color: var(--color-primary-dark);
}

.hero-quote {
  position: relative;
  margin-top: 32px;
  padding: 24px 28px 24px 40px;
  border-left: 4px solid var(--color-primary);
  background: var(--color-surface);
  border-radius: 4px 18px 18px 4px;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--color-ink);
  font-size: 1.22rem;
  line-height: 1.5;
  overflow: visible;
  box-shadow: var(--shadow-md);
}

.hero-quote::before {
  content: "\201C";
  position: absolute;
  top: -22px;
  left: 16px;
  font-family: var(--font-serif);
  font-size: 4.5rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  pointer-events: none;
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}

.card {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

.card-media {
  aspect-ratio: 4 / 3;
  background: var(--color-bg-alt);
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-media img {
  transform: scale(1.06);
}

.card-media-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 26px;
  background: linear-gradient(160deg, var(--color-bg-alt), var(--color-accent-light) 150%);
}

.card-media-fallback .fallback-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  flex-shrink: 0;
  background: radial-gradient(circle at 32% 28%, #fff, var(--color-accent-light) 70%);
  border: 2px solid var(--color-accent);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px rgba(234, 184, 74, 0.18);
}

.card-media-fallback .fallback-icon svg {
  width: 24px;
  height: 24px;
}

.card-media-fallback .fallback-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--color-primary-dark);
}

.card-body {
  padding: 20px 22px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  line-height: 1.25;
}

.card-body p {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 14px;
}

.card-body .card-spacer {
  flex: 1;
}

.card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--color-accent-light);
  color: var(--color-primary-dark);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* ---------- Portfolio hub tiles ---------- */

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.hub-tile {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  box-shadow: var(--shadow-sm);
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
}

.hub-tile:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
}

.hub-tile::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 30px 30px 0;
  border-color: transparent var(--color-bg-alt) transparent transparent;
  transition: border-color 0.22s ease;
}

.hub-tile:hover::after {
  border-color: transparent var(--color-accent-light) transparent transparent;
}

.hub-tile .icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, var(--color-accent-light), #efe1c3 70%);
  border: 2px solid var(--color-accent);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 0 0 4px rgba(234, 184, 74, 0.18);
}

.hub-tile .icon svg {
  width: 28px;
  height: 28px;
}

.hub-tile h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.hub-tile p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.hub-tile .count {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 700;
}

.hub-tile .go-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--color-primary);
  font-size: 0.9rem;
}

/* ---------- About page ---------- */

.about-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  align-items: start;
}

.about-photo {
  position: relative;
  padding: 14px;
}

.about-photo::before,
.about-photo::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  border: 2px solid var(--color-accent);
  z-index: 2;
}

.about-photo::before {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}

.about-photo::after {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}

.about-photo img,
.about-photo-fallback {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 6px solid #fff;
}

.about-photo img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.about-photo-fallback {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
}

.about-block {
  margin-bottom: 32px;
}

.about-block h2 {
  font-size: 1.65rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-block h2::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  display: inline-block;
}

.about-block p {
  color: var(--color-text-muted);
  white-space: pre-line;
}

.intro-text::first-letter {
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 3.6rem;
  line-height: 1;
  float: left;
  margin: 2px 10px 0 0;
  padding: 4px 10px;
  color: var(--color-primary-dark);
  background: linear-gradient(160deg, var(--color-accent-light), var(--color-accent) 150%);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.about-block p.signature {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--color-primary);
  margin-top: 10px;
}

/* ---------- Gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 20px 14px 10px;
  background: linear-gradient(0deg, rgba(0,0,0,0.65), transparent);
  color: #fff;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 14, 12, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 40px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.lightbox-caption {
  color: #f1e2d3;
  text-align: center;
  margin-top: 16px;
  font-size: 0.95rem;
}

.lightbox-close {
  position: absolute;
  top: 28px;
  right: 36px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

/* ---------- Filters ---------- */

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
}

.filter-chip {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: all 0.18s ease;
}

.filter-chip:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.filter-chip.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* ---------- Empty state ---------- */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-muted);
}

.empty-state .icon {
  font-size: 2.4rem;
  margin-bottom: 14px;
}

/* ---------- File download row ---------- */

.file-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  margin-top: auto;
}

.file-download svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.file-download:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ---------- Pagination ---------- */

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 44px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}

.pagination a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.pagination .is-current {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* ---------- Breadcrumb / page header ---------- */

.page-header {
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  padding: 52px 0 40px;
  text-align: center;
}

.page-header .eyebrow {
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
}

.page-header h1 {
  font-size: clamp(2.1rem, 3.4vw, 3rem);
  margin: 10px 0 12px;
}

.page-header p {
  color: var(--color-text-muted);
  font-style: italic;
  max-width: 620px;
  margin: 0 auto;
}

.page-header p::after {
  content: "";
  display: block;
  width: 90px;
  height: 14px;
  margin: 22px auto 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='14' viewBox='0 0 90 14'%3E%3Cline x1='0' y1='7' x2='34' y2='7' stroke='%238c3a3a' stroke-width='1'/%3E%3Crect x='41' y='3' width='8' height='8' fill='%23eab84a' stroke='%238c3a3a' stroke-width='1' transform='rotate(45 45 7)'/%3E%3Cline x1='56' y1='7' x2='90' y2='7' stroke='%238c3a3a' stroke-width='1'/%3E%3C/svg%3E") no-repeat center / contain;
}

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}

.breadcrumbs a {
  color: var(--color-primary);
  font-weight: 600;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--color-primary-dark);
  color: #f1e2d3;
  padding: 56px 0 28px;
  margin-top: 40px;
}

.footer-quote::before {
  content: "";
  display: block;
  width: 90px;
  height: 14px;
  margin: 0 auto 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='14' viewBox='0 0 90 14'%3E%3Cline x1='0' y1='7' x2='34' y2='7' stroke='%23eab84a' stroke-width='1'/%3E%3Crect x='41' y='3' width='8' height='8' fill='%23eab84a' transform='rotate(45 45 7)'/%3E%3Cline x1='56' y1='7' x2='90' y2='7' stroke='%23eab84a' stroke-width='1'/%3E%3C/svg%3E") no-repeat center / contain;
}

.footer-quote {
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--color-accent-light);
  margin: 0 0 36px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-inner h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer-inner p, .footer-inner a {
  color: #e3cbb4;
  font-size: 0.92rem;
}

.footer-inner ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-inner li {
  margin-bottom: 10px;
}

.footer-inner a:hover {
  color: #fff;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-social a:hover {
  background: var(--color-accent);
  color: #fff;
}

.footer-bottom {
  padding-top: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: #cbab8d;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding-top: 48px;
    text-align: center;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-photo-frame {
    order: -1;
    width: 200px;
    height: 244px;
  }
  .about-layout {
    grid-template-columns: 1fr;
  }
  .about-photo {
    max-width: 280px;
    margin: 0 auto;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .hero-inner {
    padding-left: 36px;
    padding-right: 36px;
  }
}

@media (max-width: 760px) {
  .main-nav {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-140%);
    opacity: 0;
    transition: all 0.2s ease;
    gap: 4px;
  }
  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
  }
  .main-nav a {
    padding: 14px 16px;
  }
  .nav-dropdown-panel {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    display: none;
    border: none;
    padding-left: 12px;
  }
  .nav-dropdown.is-open .nav-dropdown-panel {
    display: block;
  }
  .nav-toggle {
    display: block;
  }
  .section {
    padding: 52px 0;
  }
  .header-inner {
    padding: 14px 0;
    gap: 10px;
  }
  .brand {
    gap: 10px;
    min-width: 0;
  }
  .brand-text {
    min-width: 0;
  }
  .brand-text .name {
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .brand-text .role {
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 480px) {
  .hero-inner {
    padding-left: 32px;
    padding-right: 32px;
  }
  .hero h1 {
    font-size: 1.9rem;
  }
}

/* ---------- Document file-type chip (card fallback) ---------- */

.file-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--color-primary);
}

.file-chip.is-pdf {
  background: #c0392b;
}

.file-chip.is-doc,
.file-chip.is-docx {
  background: #2b579a;
}

/* ---------- Card actions / preview trigger ---------- */

.card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.card-actions .file-download {
  margin-top: 0;
}

.file-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 18px;
  border-radius: 999px;
  background: transparent;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.88rem;
  border: 1px solid var(--color-primary);
  cursor: pointer;
  transition: all 0.18s ease;
}

.file-preview svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.file-preview:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ---------- Document viewer (flipbook modal) ---------- */

.doc-viewer {
  position: fixed;
  inset: 0;
  background: rgba(20, 14, 12, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 24px;
}

.doc-viewer.is-open {
  display: flex;
}

.doc-viewer__dialog {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: min(900px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.doc-viewer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--color-border);
}

.doc-viewer__title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--color-primary-dark);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-viewer__close {
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0 4px;
}

.doc-viewer__close:hover {
  color: var(--color-primary);
}

.doc-viewer__body {
  position: relative;
  flex: 1;
  background: var(--color-bg-alt);
}

.doc-viewer__stage {
  position: relative;
  width: 100%;
  height: min(70vh, 720px);
  perspective: 2000px;
  overflow: hidden;
}

.viewer-page {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.viewer-page.is-flipping {
  transition: transform 0.5s cubic-bezier(0.4, 0.1, 0.2, 1);
  z-index: 2;
}

.viewer-page-inner {
  background: #fff;
  box-shadow: var(--shadow-md);
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
}

.viewer-page-inner canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.doc-viewer__status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.doc-viewer__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px 22px;
  border-top: 1px solid var(--color-border);
}

.doc-viewer__nav {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-primary);
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.doc-viewer__nav:hover:not(:disabled) {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.doc-viewer__nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.doc-viewer__page-indicator {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.doc-viewer__download {
  width: auto;
  padding: 10px 20px;
  margin: 0;
}

@media (max-width: 640px) {
  .doc-viewer {
    padding: 0;
  }
  .doc-viewer__dialog {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }
  .doc-viewer__stage {
    height: auto;
    flex: 1;
  }
}
