/* Aviatory — projects catalogue and project pages. Loaded before base.css. */
/* ── Page header ── */
.proj-hero {
  position: relative;
  background: #071929;
  border-bottom: 1px solid rgba(64, 140, 220, 0.18);
  overflow: hidden;
  padding: 56px 0 52px;
}
.proj-hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
}
.proj-crumb {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  margin-bottom: 28px;
}
.proj-crumb a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}
.proj-crumb a:hover {
  color: var(--text);
}
.proj-crumb .sep {
  color: var(--text-dimmer);
}
.proj-crumb .here {
  color: var(--brand);
}

.proj-hero-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.proj-hero-title {
  font-family: "Space Grotesk", var(--font-sans);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-bright);
  margin: 0 0 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.proj-hero-title .accent {
  color: var(--text-bright);
}
.proj-hero-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  line-height: 1.7;
  max-width: 480px;
  margin: 0;
}

/* ── Main body ── */
.proj-body {
  max-width: var(--container);
  margin: 0 auto;
  padding: 100px 40px 100px;
}

/* ── Section ── */
.section-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  padding: 4px 10px;
  border-radius: 4px;
}

/* Header row: ID + status */
.proj-card-id {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--text-dimmer);
}

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.status-badge .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-badge.active {
  color: #6fb89e;
  background: rgba(111, 184, 158, 0.08);
  border: 1px solid rgba(111, 184, 158, 0.22);
}
.status-badge.active .dot {
  background: #6fb89e;
  box-shadow: 0 0 0 2px rgba(111, 184, 158, 0.18);
}
.status-badge.beta {
  color: #6ba4d8;
  background: rgba(107, 164, 216, 0.08);
  border: 1px solid rgba(107, 164, 216, 0.22);
}
.status-badge.beta .dot {
  background: #6ba4d8;
}
.status-badge.wip {
  color: #cf9a4a;
  background: rgba(207, 154, 74, 0.08);
  border: 1px solid rgba(207, 154, 74, 0.22);
}
.status-badge.wip .dot {
  background: #cf9a4a;
}
.status-badge.research {
  color: #b8a4e0;
  background: rgba(184, 164, 224, 0.08);
  border: 1px solid rgba(184, 164, 224, 0.22);
}
.status-badge.research .dot {
  background: #b8a4e0;
}

/* ── Empty state ── */
.proj-empty {
  padding: 80px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.01);
  display: none;
}
.proj-empty.is-visible {
  display: flex;
}
.proj-empty svg {
  opacity: 0.4;
}
.proj-empty .label {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ───────── Showcase: three projects to a row (components/project-entry) ───────── */
.proj-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}
.proj-item {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-2);
  border-top: 2px solid var(--accent);
  background: rgba(13, 34, 52, 0.6);
  transition:
    background 0.18s,
    border-color 0.18s;
}
.proj-item:hover {
  border-color: var(--line-3);
  border-top-color: var(--accent);
  background: rgba(19, 44, 65, 0.75);
}
.proj-item[hidden] {
  display: none;
}
/* The drawing sheet: a fine grid, figure number above, category below. */
.proj-sheet {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  height: 150px;
  padding: 10px 12px;
  overflow: hidden;
  border-bottom: 1px solid var(--line-2);
  background-color: rgba(7, 22, 36, 0.7);
  background-image:
    linear-gradient(to right, rgba(124, 186, 242, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(124, 186, 242, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}
.proj-sheet-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}
.proj-sheet-row:first-child span:first-child {
  color: var(--accent);
}
.proj-drawing {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.proj-drawing svg {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  overflow: visible; /* labels near the edge stay whole; the sheet clips the rest */
}
/* Drawn small for the home strip: keep the lines fine at this size. */
.proj-drawing svg * {
  vector-effect: non-scaling-stroke;
}
/* A project with a photo: the picture fills the top of the card, edge to edge. */
.proj-photo {
  aspect-ratio: 16 / 7.5; /* as an article card's photo */
  overflow: hidden;
  background: #050d16;
}
.proj-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.proj-item:hover .proj-cover {
  transform: scale(1.04);
}
.proj-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 24px 0;
}
.proj-info-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.proj-cat {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.proj-name {
  margin: 18px 0 10px;
  font-family: var(--font-sans);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--text-bright);
  text-wrap: balance;
}
.proj-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-mute);
}
/* The dates: in the foot, on its left. */
.proj-facts {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  margin: 0;
}
.proj-facts div {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.proj-facts dt {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dimmer);
}
.proj-facts dd {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-bright);
}
.proj-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.proj-tech li {
  padding: 3px 7px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--text-mute);
}
.proj-tech li.is-more {
  border-style: dashed;
  color: var(--text-dim);
}
/* The foot, as an article card's: on a rule, the dates at the left, the links at the right. */
.proj-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: auto -24px 0;
  padding: 16px 24px 18px;
  border-top: 1px solid var(--line);
}
.proj-foot-main {
  display: flex;
  flex-wrap: wrap; /* on a narrow card the link goes under the dates instead of squeezing them */
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}
.proj-foot-more {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.proj-info > :nth-last-child(2) {
  margin-bottom: 22px;
}
.proj-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--text);
  white-space: nowrap;
  transition: color 0.15s;
}
/* The main link is the one the card leads to: it lights up with the card, as an article's READ does. */
.proj-item:hover .proj-link:not(.is-quiet) {
  color: var(--accent);
}
.proj-item:hover .proj-link:not(.is-quiet) svg {
  transform: translateX(3px);
}
.proj-link svg {
  transition: transform 0.15s;
}
.proj-link:hover svg {
  transform: translateX(3px);
}
.proj-link.is-quiet {
  font-weight: 500;
  color: var(--text-dim);
}
.proj-link:hover,
.proj-link.is-quiet:hover {
  color: var(--text-bright);
}
@media (max-width: 1100px) {
  .proj-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .proj-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ───────── Project page: the header's buttons (the page is laid out as an article, see library.css) ───────── */
.proj-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

/* ── Reveal animation: the panels rise in one after another ── */
@media (prefers-reduced-motion: no-preference) {
  .proj-item {
    opacity: 0;
    transform: translateY(20px);
    animation: cardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--i, 0) * 90ms);
  }
  @keyframes cardIn {
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .proj-hero-inner {
    padding: 0 24px;
  }
  .proj-body {
    padding: 36px 24px 80px;
  }
}
@media (max-width: 640px) {
  .proj-hero-title {
    font-size: 38px;
  }

  .proj-body {
    padding: 28px 16px 64px;
  }
}
@media (max-width: 720px) {
  /* Breadcrumb links are text-height; extend the hit area without moving the row. */
  .proj-crumb a {
    position: relative;
  }
  .proj-crumb a::after {
    content: "";
    position: absolute;
    inset: -14px 0;
  }
  .proj-link {
    position: relative;
  }
  .proj-link::after {
    content: "";
    position: absolute;
    inset: -10px -4px;
  }
}
.proj-detail-empty {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.7;
}
