/* ─── FONTS ─── */
@font-face {
  font-family: 'PT Sans';
  src: url('/fonts/PTSans-Regular.woff2') format('woff2'),
       url('/fonts/PTSans-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PT Sans';
  src: url('/fonts/PTSans-Bold.woff2') format('woff2'),
       url('/fonts/PTSans-Bold.woff') format('woff');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PT Sans Narrow';
  src: url('/fonts/PTSansNarrow-Regular.woff2') format('woff2'),
       url('/fonts/PTSansNarrow-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PT Sans Narrow';
  src: url('/fonts/PTSansNarrow-Bold.woff2') format('woff2'),
       url('/fonts/PTSansNarrow-Bold.woff') format('woff');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --navy:        #3b5473;
  --navy-dark:   #2a3d54;
  --navy-light:  #516e91;
  --accent:      #d4a000;
  --accent-light:#febf00;
  --white:       #ffffff;
  --off-white:   #f5f7fa;
  --grey-light:  #e8edf3;
  --grey-mid:    #b0bec9;
  --text:        #333e48;
  --success:     #2a7a3b;
  --cad-part:    #5bafe8;
  --radius:      4px;
  --radius-md:   6px;
  --shadow:      0 2px 12px rgba(59,84,115,0.10);
  --shadow-md:   0 4px 24px rgba(59,84,115,0.14);
}

/* ─── PAGE HEAD ─── */
.projects-page-head {
  border-bottom: 1px solid var(--grey-light);
  background:
    linear-gradient(rgba(255,255,255,0.92), rgba(255,255,255,0.92)),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(59,84,115,0.08) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(59,84,115,0.08) 39px 40px);
}
.projects-page-head-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 48px 24px 32px;
  display: flex; align-items: flex-end; gap: 32px;
  flex-wrap: wrap;
}
.projects-page-head-text { flex: 1 1 320px; min-width: 0; }
.projects-sm-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--navy);
  font-family: 'Courier New', monospace;
}
.projects-sm-divider {
  width: 40px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 10px 0 16px;
}
.projects-h1 {
  font-family: 'PT Sans Narrow', 'PT Sans', Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.3px;
  color: var(--navy);
}
.projects-h1 em { color: var(--accent); font-style: normal; }
.projects-page-sub {
  margin-top: 14px;
  font-size: 16px;
  color: var(--text);
  max-width: 620px;
  font-family: 'PT Sans', Arial, sans-serif;
}

/* ─── MAIN AREA ─── */
.projects-main {
  background:
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(59,84,115,0.04) 27px 28px),
    repeating-linear-gradient(90deg, transparent 0 27px, rgba(59,84,115,0.04) 27px 28px),
    var(--white);
  min-height: 60vh;
}
.projects-main-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 48px 24px 96px;
}

/* ─── EMPTY STATE ─── */
.projects-empty-wrap {
  display: flex; justify-content: center; align-items: center;
  padding: 24px 0;
}
.projects-empty-sheet {
  position: relative;
  width: min(640px, 100%);
  aspect-ratio: 4 / 3;
  background: #fbfaf6;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 19px, rgba(59,84,115,0.06) 19px 20px),
    repeating-linear-gradient(90deg, transparent 0 19px, rgba(59,84,115,0.06) 19px 20px);
  box-shadow: var(--shadow);
}
.projects-empty-frame {
  position: absolute; inset: 14px;
  border: 1.5px solid var(--navy);
}
.projects-empty-frame-inner {
  position: absolute; inset: 8px;
  border: 1px solid rgba(59,84,115,0.35);
}
.projects-empty-tick {
  position: absolute;
  width: 14px; height: 14px;
  border: 0 solid var(--navy);
}
.projects-empty-tick.tl { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.projects-empty-tick.tr { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.projects-empty-tick.bl { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.projects-empty-tick.br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }

.projects-empty-content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px; text-align: center;
}
.projects-empty-icon-frame {
  width: 96px; height: 96px;
  border: 1.5px solid var(--navy);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  background: rgba(255,255,255,0.6);
  position: relative;
}
.projects-empty-icon-frame::before,
.projects-empty-icon-frame::after {
  content: '';
  position: absolute;
  background: var(--navy);
}
.projects-empty-icon-frame::before { left: 50%; top: -14px; bottom: -14px; width: 1px; transform: translateX(-50%); opacity: 0.35; }
.projects-empty-icon-frame::after  { top: 50%; left: -14px; right: -14px; height: 1px; transform: translateY(-50%); opacity: 0.35; }
.projects-empty-icon-frame svg { width: 48px; height: 48px; color: var(--accent); }

.projects-empty-title {
  font-family: 'PT Sans Narrow', 'PT Sans', Arial, sans-serif;
  font-weight: 700; font-size: 26px;
  color: var(--navy); margin-bottom: 8px;
}
.projects-empty-sub {
  font-size: 14px; color: var(--text);
  max-width: 320px; line-height: 1.5;
  font-family: 'PT Sans', Arial, sans-serif;
}
.projects-empty-cta {
  margin-top: 22px;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px; font-weight: 700;
  box-shadow: 0 2px 8px rgba(20,60,130,0.30);
  transition: all 0.15s;
  font-family: 'PT Sans', Arial, sans-serif;
}
.projects-empty-cta:hover { background: var(--accent-light); transform: translateY(-1px); }
.projects-empty-cta svg { width: 14px; height: 14px; }

.projects-empty-stamp {
  position: absolute; right: 22px; bottom: 22px;
  width: 200px;
  border: 1px solid var(--navy);
  background: rgba(255,255,255,0.85);
  font-family: 'Courier New', monospace;
  font-size: 10px; color: var(--navy); line-height: 1.4;
}
.projects-empty-stamp-row {
  display: flex;
  border-bottom: 1px solid rgba(59,84,115,0.4);
}
.projects-empty-stamp-row:last-child { border-bottom: none; }
.projects-empty-stamp-cell {
  padding: 5px 8px;
  border-right: 1px solid rgba(59,84,115,0.4);
  flex: 1;
}
.projects-empty-stamp-cell:last-child { border-right: none; }
.projects-empty-stamp-cell .k {
  text-transform: uppercase; color: var(--grey-mid);
  font-size: 8px; letter-spacing: 0.8px;
  display: block; margin-bottom: 2px;
}
.projects-empty-stamp-cell .v { font-weight: 700; color: var(--navy); }

.projects-empty-ucs {
  position: absolute; left: 26px; bottom: 26px;
  width: 36px; height: 36px;
}
.projects-empty-ucs svg { width: 100%; height: 100%; }

/* ─── TIMELINE HEAD ─── */
.projects-timeline-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 16px;
  margin-bottom: 36px;
}
.projects-timeline-counter {
  font-family: 'Courier New', monospace;
  font-size: 12px; color: var(--grey-mid); letter-spacing: 0.8px;
}
.projects-timeline-counter b { color: var(--navy); font-weight: 700; }
.projects-timeline-filters { display: flex; gap: 8px; }
.projects-filter-chip {
  border: 1px solid var(--grey-light);
  background: #fff; border-radius: 20px;
  padding: 5px 14px; font-size: 12px;
  color: var(--text); cursor: pointer;
  transition: all 0.15s;
  font-family: 'PT Sans', Arial, sans-serif;
}
.projects-filter-chip:hover { border-color: var(--navy); }
.projects-filter-chip.is-active {
  background: var(--navy); color: #fff; border-color: var(--navy);
}

/* ─── TIMELINE ─── */
.projects-timeline {
  position: relative;
  padding-left: 88px;
  list-style: none;
}
.projects-timeline::before {
  content: '';
  position: absolute;
  left: 22px; top: 8px; bottom: 8px;
  width: 2px; background: var(--navy);
}
.projects-timeline::after {
  content: '';
  position: absolute;
  left: 14px; top: 0;
  width: 18px; height: 2px;
  background: var(--navy);
  box-shadow: 0 calc(100% - 0px) 0 0 var(--navy);
}
.projects-axis-cap-bottom {
  position: absolute;
  left: 14px; bottom: 0;
  width: 18px; height: 2px;
  background: var(--navy);
}

.projects-item {
  position: relative;
  margin-bottom: 24px;
  animation: projectsFadeInRight 0.5s ease both;
}
.projects-item:last-child { margin-bottom: 0; }
.projects-item:nth-child(1) { animation-delay: 0.05s; }
.projects-item:nth-child(2) { animation-delay: 0.15s; }
.projects-item:nth-child(3) { animation-delay: 0.25s; }
.projects-item:nth-child(4) { animation-delay: 0.35s; }
.projects-item:nth-child(5) { animation-delay: 0.45s; }

.projects-item::before {
  content: '';
  position: absolute;
  left: -56px; top: 36px;
  width: 56px; height: 0;
  border-top: 1.5px dashed var(--cad-part);
  opacity: 0.6;
}
.projects-item::after {
  content: '';
  position: absolute;
  left: -69px; top: 31px;
  width: 10px; height: 10px;
  background: #fff;
  border: 2px solid var(--navy);
  border-radius: 50%;
  z-index: 1;
  transition: all 0.2s;
}
.projects-item:hover::after { background: var(--accent); border-color: var(--accent); }
.projects-item.is-hidden { display: none; }

.projects-card {
  position: relative;
  background: #fff;
  border: 1px solid rgba(212,160,0,0.23);
  border-radius: var(--radius-md);
  padding: 22px 26px 22px 60px;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  text-decoration: none;
  color: inherit;
  display: block;
}
.projects-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-left-color: var(--accent);
}

.projects-card-num {
  position: absolute; top: 14px; left: 18px;
  font-family: 'Courier New', monospace;
  font-size: 11px; font-weight: 700;
  color: var(--grey-mid); letter-spacing: 1px;
}
.projects-card-icon {
  position: absolute; top: 22px; left: 22px;
  width: 28px; height: 28px; margin-top: 18px;
  color: var(--navy);
}
.projects-card-icon svg { width: 100%; height: 100%; }

.projects-card-row {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.projects-card-main { flex: 1 1 300px; min-width: 0; }
.projects-card-title {
  font-family: 'PT Sans Narrow', 'PT Sans', Arial, sans-serif;
  font-weight: 700; font-size: 20px;
  color: var(--navy); line-height: 1.25; margin-bottom: 4px;
}
.projects-card-meta {
  display: flex; flex-wrap: wrap; gap: 14px;
  font-size: 13px; color: var(--grey-mid); margin-bottom: 10px;
}
.projects-card-meta .mono {
  font-family: 'Courier New', monospace;
  font-size: 12px; color: var(--navy);
}
.projects-card-desc {
  font-size: 14px; color: var(--text);
  line-height: 1.55; max-width: 540px;
  font-family: 'PT Sans', Arial, sans-serif;
}

.projects-card-side {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 10px; flex-shrink: 0;
}

.projects-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--radius);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.3px; line-height: 1.2; white-space: nowrap;
  font-family: 'PT Sans', Arial, sans-serif;
}
.projects-badge svg { width: 11px; height: 11px; }
.projects-badge.in-work { background: var(--accent); color: #fff; }
.projects-badge.done    { background: var(--success); color: #fff; }
.projects-badge.draft   { background: var(--off-white); color: var(--navy); border: 1px solid var(--grey-light); }

.projects-card-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--navy);
  background: transparent; color: var(--navy);
  text-decoration: none;
  padding: 7px 14px; border-radius: var(--radius);
  font-size: 13px; font-family: 'PT Sans', Arial, sans-serif;
  cursor: pointer; transition: all 0.15s;
}
.projects-card-btn:hover { background: var(--navy); color: #fff; }
.projects-card-btn svg { width: 13px; height: 13px; }

.projects-card-link {
  position: absolute;
  inset: 0;               /* top:0; right:0; bottom:0; left:0 */
  z-index: 1;
  border-radius: var(--radius-md);
}
 
/* Кнопка «Смотреть 3D» / «Открыть проект» поверх stretched link */
.projects-card-btn {
  position: relative;
  z-index: 2;
}

@keyframes projectsFadeInRight {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 720px) {
  .projects-page-head-inner { padding: 32px 16px 20px; }
  .projects-main-inner { padding: 32px 16px 64px; }
  .projects-timeline { padding-left: 0; }
  .projects-timeline::before,
  .projects-timeline::after,
  .projects-axis-cap-bottom { display: none; }
  .projects-item::before,
  .projects-item::after { display: none; }
  .projects-card-side {
    flex-direction: row; align-items: center;
    width: 100%; justify-content: space-between;
  }
  .projects-card { padding: 60px 18px 18px; }
  .projects-card-icon { top: 14px; left: 18px; margin-top: 0; }
  .projects-card-num { top: 14px; right: 18px; left: auto; }
  .projects-empty-stamp { width: 160px; right: 14px; bottom: 14px; }
  .projects-empty-ucs { left: 16px; bottom: 16px; }
  .projects-timeline-head { margin-bottom: 24px; }
}