:root {
  --ink: #080b10;
  --ink-soft: #0e161d;
  --paper: #f1f0ea;
  --paper-soft: #faf9f4;
  --lime: #b5ff18;
  --cyan: #42d7ee;
  --coral: #ff5c4d;
  --muted: #a2aaad;
  --line: rgba(241, 240, 234, .17);
  --dark-line: rgba(8, 11, 16, .17);
}

html, body { height: auto; }
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  color: var(--paper);
  background: var(--ink);
  font: 500 16px/1.5 Manrope, Arial, sans-serif;
}
button, input { font: inherit; }

.portal-bar {
  height: 68px;
  padding: 0 clamp(20px, 3.7vw, 70px);
  margin: 0;
  text-align: left;
  background: rgba(8, 11, 16, .97);
  border-radius: 0;
}
.portal-mark { width: 40px; height: 40px; background: var(--lime); }
.image-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(15px, 2vw, 32px);
}
.image-nav a, .image-nav a:visited {
  color: #aeb5b8;
  text-decoration: none;
  font-size: 14px;
}
.image-nav a:hover, .image-nav a:focus-visible { color: var(--lime); text-decoration: none; }
.image-menu {
  display: none;
  padding: 9px 12px;
  color: var(--paper);
  background: transparent;
  border: 1px solid var(--line);
  font: 800 10px/1 "Courier New", monospace;
}

.image-hero {
  min-height: clamp(720px, calc(100vh - 68px), 920px);
  padding: clamp(72px, 8vw, 132px) clamp(24px, 5vw, 94px);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .55fr);
  align-items: center;
  gap: clamp(55px, 9vw, 170px);
}
.image-hero-copy, .hero-stat { position: relative; z-index: 1; min-width: 0; }
.image-hero h1 {
  max-width: 1050px;
  margin: 0;
  color: var(--paper);
  text-align: left;
  font-size: clamp(70px, 9.3vw, 166px);
  line-height: .84;
  letter-spacing: -.075em;
}
.image-hero h1 span { color: var(--lime); }
.image-hero-copy > p:not(.page-kicker) {
  max-width: 850px;
  margin: 38px 0 0;
  color: #c7ccca;
  font-size: clamp(20px, 2vw, 31px);
  line-height: 1.25;
  letter-spacing: -.025em;
}
.image-hero-copy > a {
  display: inline-flex;
  margin-top: 35px;
  padding: 15px 18px;
  color: var(--ink);
  background: var(--lime);
  font: 800 11px/1 "Courier New", monospace;
  text-decoration: none;
}
.hero-stat {
  padding: clamp(28px, 3vw, 45px);
  background: rgba(12, 22, 15, .78);
  border: 1px solid rgba(181, 255, 24, .45);
}
.hero-stat strong {
  display: block;
  color: var(--lime);
  font-size: clamp(76px, 8vw, 135px);
  line-height: .85;
  letter-spacing: -.07em;
}
.hero-stat > span { display: block; margin-top: 12px; color: #f2f3ee; font-size: 22px; font-weight: 800; }
.hero-stat p { margin: 30px 0 0; padding-top: 25px; color: #aeb6b4; border-top: 1px solid var(--line); line-height: 1.55; }

.prompt-anatomy {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  color: var(--ink);
  background: var(--paper);
}
.prompt-anatomy article {
  min-height: 245px;
  padding: clamp(32px, 4vw, 65px);
  border-right: 1px solid var(--dark-line);
}
.prompt-anatomy article:last-child { border-right: 0; }
.prompt-anatomy span { color: #658800; font: 800 11px/1 "Courier New", monospace; }
.prompt-anatomy h2 { margin: 35px 0 10px; color: var(--ink); font-size: clamp(29px, 3vw, 45px); line-height: 1; letter-spacing: -.045em; }
.prompt-anatomy p { max-width: 470px; margin: 0; color: #555e62; line-height: 1.5; }

.catalog-section {
  padding: clamp(75px, 8vw, 125px) clamp(20px, 4vw, 72px);
  color: var(--paper);
  background: var(--ink);
}
.section-label {
  margin: 0 0 15px;
  color: var(--lime);
  font: 800 11px/1.2 "Courier New", monospace;
  letter-spacing: .1em;
}
.catalog-heading {
  margin-bottom: 38px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 35px;
}
.catalog-heading h2, .showcase-copy h2 {
  margin: 0;
  color: inherit;
  font-size: clamp(48px, 6vw, 90px);
  line-height: .95;
  letter-spacing: -.06em;
}
.catalog-heading > p { margin: 0; color: #969fa2; }
.catalog-heading > p strong { color: var(--lime); font-size: 28px; }

.search-panel {
  position: sticky;
  top: 68px;
  z-index: 15;
  margin-bottom: 30px;
  padding: 17px;
  display: grid;
  grid-template-columns: minmax(270px, 1fr) auto;
  gap: 12px;
  color: var(--paper);
  background: rgba(13, 20, 26, .97);
  border: 1px solid #354048;
  box-shadow: 0 18px 35px rgba(0,0,0,.2);
}
.search-container {
  margin: 0;
  display: grid;
  justify-content: stretch;
  gap: 8px;
}
.search-container span { color: var(--cyan); font: 800 10px/1 "Courier New", monospace; letter-spacing: .08em; }
#searchInput {
  width: 100%;
  max-width: none;
  min-height: 50px;
  padding: 0 16px;
  color: white;
  background: #080e13;
  border: 1px solid #465159;
  border-radius: 0;
  outline: 0;
}
#searchInput:focus { border-color: var(--lime); box-shadow: 0 0 0 1px var(--lime); }
.clear-search {
  align-self: end;
  min-height: 50px;
  padding: 0 18px;
  color: #bcc4c5;
  background: transparent;
  border: 1px solid #465159;
  cursor: pointer;
  font: 800 10px/1 "Courier New", monospace;
}
.clear-search:hover { color: var(--ink); background: var(--lime); border-color: var(--lime); }
.area-filters { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px; }
.area-filter {
  min-height: 38px;
  padding: 0 13px;
  color: #aeb6b8;
  background: transparent;
  border: 1px solid #3b474f;
  cursor: pointer;
  font-size: 13px;
}
.area-filter:hover, .area-filter.is-active { color: var(--ink); background: var(--lime); border-color: var(--lime); }

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid #354048;
  border-left: 1px solid #354048;
}
.card {
  position: relative;
  min-width: 0;
  min-height: 350px;
  padding: clamp(24px, 2.5vw, 38px);
  display: flex;
  flex-direction: column;
  background: #0d151b;
  border: 0;
  border-right: 1px solid #354048;
  border-bottom: 1px solid #354048;
  border-radius: 0;
  box-shadow: none;
  transition: background .2s ease;
}
.card:hover { transform: none; background: #111c22; }
.card::before {
  content: attr(data-index);
  margin-bottom: 28px;
  color: var(--lime);
  font: 800 11px/1 "Courier New", monospace;
}
.card h2 {
  margin: 0 0 18px;
  color: #f2f3ee;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.12;
  letter-spacing: -.035em;
}
.card h2::before { display: none; }
.card p {
  position: relative;
  max-height: 145px;
  overflow: hidden;
  margin: 0;
  color: #aeb7b9;
  font-size: 14px;
  line-height: 1.55;
}
.card p::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 55px;
  background: linear-gradient(transparent, #0d151b);
}
.card:hover p::after { background: linear-gradient(transparent, #111c22); }
.card.is-expanded p { max-height: none; }
.card.is-expanded p::after { display: none; }
.card-actions { margin-top: auto; padding-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.card-action {
  min-height: 40px;
  padding: 0 12px;
  color: #c5cccd;
  background: transparent;
  border: 1px solid #435058;
  cursor: pointer;
  font: 800 10px/1 "Courier New", monospace;
}
.card-action:hover, .card-action.copy.is-copied { color: var(--ink); background: var(--lime); border-color: var(--lime); }
.card-action.expand { color: var(--cyan); }

.empty-state { padding: 70px 20px; text-align: center; border: 1px solid #354048; }
.empty-state strong { display: block; font-size: 30px; }
.empty-state p { margin: 8px 0 0; color: var(--muted); }
.load-more {
  width: 100%;
  min-height: 58px;
  margin-top: 22px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  background: var(--lime);
  border: 0;
  cursor: pointer;
  font: 800 11px/1 "Courier New", monospace;
  letter-spacing: .05em;
}
.load-more:hover { filter: brightness(1.07); }
.load-more[hidden] { display: none; }

.image-showcase {
  padding: clamp(70px, 8vw, 120px) clamp(20px, 5vw, 94px);
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  align-items: center;
  gap: clamp(50px, 9vw, 160px);
  color: var(--ink);
  background: var(--paper);
}
.image-showcase .section-label { color: #658800; }
.showcase-copy p:not(.section-label) { max-width: 650px; margin: 30px 0; color: #505a5e; font-size: 18px; line-height: 1.55; }
.showcase-copy > a, .showcase-copy > a:visited {
  display: inline-flex;
  padding: 14px 17px;
  color: var(--ink);
  background: var(--lime);
  font: 800 11px/1 "Courier New", monospace;
  text-decoration: none;
}
.image-showcase figure { margin: 0; }
.image-showcase img { width: 100%; max-height: 720px; display: block; object-fit: cover; border: 1px solid var(--dark-line); }
.image-showcase figcaption { margin-top: 10px; color: #687175; font: 700 10px/1 "Courier New", monospace; text-transform: uppercase; }

.image-footer {
  padding: 34px clamp(20px, 4vw, 72px);
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--paper);
  background: var(--ink);
  border-top: 1px solid var(--line);
}
.image-footer img { width: 58px; height: 58px; object-fit: cover; border: 2px solid var(--lime); border-radius: 50%; }
.image-footer strong { display: block; }
.image-footer p { margin: 5px 0 0; color: #929b9e; font-size: 13px; }
.footer-links { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.footer-links > span { color: #8d9799; font: 700 9px/1 "Courier New", monospace; text-transform: uppercase; }
.footer-links a, .footer-links a:visited { color: var(--lime); text-decoration: none; font: 800 10px/1 "Courier New", monospace; }

@media (max-width: 1120px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .image-hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-stat { max-width: 680px; }
}

@media (max-width: 760px) {
  .portal-bar { flex-wrap: wrap; }
  .image-menu { display: block; margin-left: auto; }
  .image-nav { order: 3; width: 100%; margin: 0; padding: 14px 0 18px; display: none; flex-direction: column; align-items: stretch; background: var(--ink); }
  .image-nav.is-open { display: flex; }
  .image-hero { padding-top: 76px; }
  .image-hero h1 { font-size: clamp(64px, 19vw, 105px); }
  .prompt-anatomy { grid-template-columns: 1fr; }
  .prompt-anatomy article { border-right: 0; border-bottom: 1px solid var(--dark-line); }
  .catalog-heading { align-items: start; flex-direction: column; }
  .grid { grid-template-columns: 1fr; }
  .card { min-height: 315px; }
  .image-showcase { grid-template-columns: 1fr; }
  .image-footer { align-items: start; flex-wrap: wrap; }
  .footer-links { width: 100%; margin: 8px 0 0; justify-content: space-between; }
}

@media (max-width: 520px) {
  .portal-bar { padding-inline: 14px; }
  .portal-brand > span:last-child { display: none; }
  .image-hero { padding-inline: 22px; }
  .image-hero h1 { font-size: 17.5vw; }
  .catalog-section { padding-inline: 14px; }
  .search-panel { top: 68px; padding: 12px; }
  .area-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .area-filter { flex: 0 0 auto; }
  .card { padding: 24px 20px; }
  .image-showcase { padding-inline: 22px; }
}

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