@import url("../../_ds/fonts.css");
@import url("../../_ds/theme.css");
@import url("../../_shared/chrome.css");
@import url("../../_shared/components.css");
@import url("../../_shared/audience-switcher.css");

/* ──────────────────────────────────────────────────────────
   /agents/skills — Twelve-skill editorial catalog.

   Sub-page under /agents.  Reads like a magazine index, not a
   grid of cards.  Each row is a numbered editorial entry that
   links to the actual SKILL.md on github.  No saturated
   bands, no bloom curtains, no sticky stages — just clean
   typography on dark with scroll-linked row reveals.
─────────────────────────────────────────────────────────── */


main {
  position: relative;
  z-index: 1;
}

/* Cursor suppression — spinning O is the sole pointer on the
   interactive surfaces. */
.back-to-top,
.ag-skills-row,
.ag-skills-end-cmd,
.ag-skills-end-cmd * {
  cursor: pointer;
}

/* ──────────────────────────────────────────────────────────
   Act 1 — Hero.
─────────────────────────────────────────────────────────── */

[data-act="1"] {
  position: relative;
  min-height: 70vh;
  background: var(--background);
  padding: clamp(120px, 16vh, 180px) clamp(20px, 5vw, 80px) clamp(48px, 7vh, 80px);
  display: flex;
  align-items: center;
}

.ag-skills-hero {
  width: 100%;
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}


.ag-skills-h1 {
  margin: 0;
  font-family: var(--font-display, "Rawest", system-ui, sans-serif);
  font-size: var(--mkt-hero-xl);
  line-height: 1.02;
  letter-spacing: var(--tracking-dense, -0.032em);
  font-weight: 500;
  color: var(--text-primary);
  text-wrap: balance;
  max-width: 14ch;
  opacity: 0;
  transform: translateY(10px);
}

.ag-skills-sub {
  margin: clamp(20px, 2.6vh, 32px) 0 0;
  font-family: var(--font-base);
  font-size: var(--mkt-body);
  line-height: 1.5;
  color: var(--text-secondary);
  text-wrap: balance;
  max-width: 580px;
  opacity: 0;
  transform: translateY(8px);
}

/* ──────────────────────────────────────────────────────────
   Act 2 — The index.

   12 editorial rows, numbered 01-12.  Each row is a single
   anchor.  Row layout: number column on the left, body
   column (head + gist + meta) on the right.
─────────────────────────────────────────────────────────── */

[data-act="2"] {
  position: relative;
  background: var(--background);
  padding: clamp(48px, 7vh, 80px) clamp(20px, 5vw, 80px) clamp(72px, 10vh, 120px);
}

.ag-skills-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  width: 100%;
  max-width: 840px;
  display: flex;
  flex-direction: column;
}

.ag-skills-row {
  border-top: 1px solid var(--border-subtle);
  opacity: 0;
  transform: translateY(10px);
}

.ag-skills-row:last-child {
  border-bottom: 1px solid var(--border-subtle);
}

.ag-skills-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(18px, 2.2vw, 32px);
  padding: clamp(20px, 2.6vh, 32px) clamp(14px, 1.6vw, 22px);
  text-decoration: none;
  color: inherit;
  outline: none;
  transition: background 0ms;
  border-radius: var(--radius-default, 6px);
}

.ag-skills-link:hover,
.ag-skills-link:focus-visible {
  background: var(--sunken-hover);
}

.ag-skills-n {
  font-family: var(--font-code, "IBM Plex Mono", monospace);
  font-size: var(--mkt-body-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--text-tertiary);
  align-self: start;
  padding-top: 6px;
}

.ag-skills-body {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.2vh, 16px);
  min-width: 0;
}

.ag-skills-head {
  display: flex;
  align-items: baseline;
  gap: clamp(12px, 1.4vw, 20px);
  flex-wrap: wrap;
}

.ag-skills-name {
  font-family: var(--font-code, monospace);
  font-size: var(--mkt-h4);
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--text-primary);
  transition: color 0ms;
}

.ag-skills-link:hover .ag-skills-name,
.ag-skills-link:focus-visible .ag-skills-name {
  color: #7C4FE8;
}

.ag-skills-type {
  font-family: var(--font-code, monospace);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full, 999px);
  border: 1px solid var(--border-subtle);
  color: var(--text-tertiary);
  background: transparent;
}

.ag-skills-row[data-type="master"] .ag-skills-type {
  color: #7C4FE8;
  border-color: color-mix(in srgb, #7C4FE8 45%, transparent);
}

.ag-skills-row[data-type="cross-cutting"] .ag-skills-type {
  color: #7ADAE6;
  border-color: color-mix(in srgb, #7ADAE6 40%, transparent);
}

.ag-skills-gist {
  margin: 0;
  font-family: var(--font-base);
  font-size: var(--mkt-body);
  line-height: 1.5;
  color: var(--text-secondary);
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.ag-skills-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-code, monospace);
  font-size: 11.5px;
  color: var(--text-quaternary);
  letter-spacing: -0.005em;
}

.ag-skills-path {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ag-skills-arrow {
  color: var(--text-quaternary);
  font-weight: 600;
  transition: transform 0ms, color 0ms;
}

.ag-skills-link:hover .ag-skills-arrow,
.ag-skills-link:focus-visible .ag-skills-arrow {
  color: #7C4FE8;
  transform: translateX(4px);
}

.ag-skills-link:hover .ag-skills-arrow,
.ag-skills-link:focus-visible .ag-skills-arrow {
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), color 220ms ease;
}

/* ──────────────────────────────────────────────────────────
   Act 3 — Closer.

   Tight install moment.  Clickable command line copies to
   clipboard; canonical CTA stack closes the page.
─────────────────────────────────────────────────────────── */

[data-act="3"] {
  position: relative;
  background: var(--background);
  padding: clamp(72px, 10vh, 120px) clamp(20px, 5vw, 80px) clamp(96px, 14vh, 160px);
}

.ag-skills-end {
  width: 100%;
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(20px, 2.6vh, 32px);
}


.ag-skills-end-h2 {
  margin: 0;
  font-family: var(--font-display, "Rawest", system-ui, sans-serif);
  font-size: var(--mkt-h2);
  line-height: 1.02;
  letter-spacing: var(--tracking-dense, -0.034em);
  font-weight: 500;
  color: var(--text-primary);
  text-wrap: balance;
  opacity: 0;
  transform: translateY(8px);
}

.ag-skills-end-cmd {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: clamp(12px, 1.6vh, 20px) 0 0;
  padding: clamp(16px, 2vh, 22px) clamp(18px, 2.2vw, 26px);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-display, 20px);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  outline: none;
  transition:
    background 220ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 220ms cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 0;
  transform: translateY(10px);
}

.ag-skills-end-cmd:hover,
.ag-skills-end-cmd:focus-visible {
  background: var(--sunken-hover);
  border-color: var(--zen-purple-7, #7C4FE8);
}

.ag-skills-end-cmd.is-copied {
  border-color: var(--zen-cyan-6, #7ADAE6);
}

.ag-skills-end-code {
  color: var(--text-primary);
  font-family: var(--font-code, monospace);
  font-size: var(--mkt-body);
  letter-spacing: -0.005em;
  font-weight: 500;
}

.ag-skills-end-hint {
  color: var(--text-tertiary);
  font-family: var(--font-code, monospace);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  transition: color 220ms ease;
}

.ag-skills-end-cmd.is-copied .ag-skills-end-hint {
  color: var(--zen-cyan-6, #7ADAE6);
}

/* Layout + tag styles come from .cta-stack + .cta-stack-tag
   in components.css.  Only the page-specific bits remain. */
.ag-skills-end-cta {
  gap: 12px;
  margin-top: clamp(8px, 1vh, 16px);
  opacity: 0;
  transform: translateY(8px);
}

/* ── Mobile responsive ──────────────────────────────────── */

@media (max-width: 1023px) {
  [data-act="1"] {
    padding: clamp(96px, 13vh, 140px) clamp(18px, 5vw, 32px) clamp(40px, 6vh, 64px);
    min-height: auto;
  }
  [data-act="2"] {
    padding: clamp(32px, 5vh, 56px) clamp(18px, 5vw, 32px) clamp(56px, 8vh, 88px);
  }
  [data-act="3"] {
    padding: clamp(56px, 8vh, 96px) clamp(18px, 5vw, 32px) clamp(80px, 12vh, 140px);
  }
  .ag-skills-link {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: clamp(18px, 2.4vh, 28px) clamp(12px, 1.5vw, 18px);
  }
  .ag-skills-n {
    padding-top: 0;
    font-size: 11px;
  }
  .ag-skills-head { gap: 10px; }
}

@media (max-width: 600px) {
  .ag-skills-h1 {
    font-size: var(--mkt-h2);
    line-height: 1.04;
  }
  .ag-skills-name { font-size: clamp(18px, 5.4vw, 24px); }
  .ag-skills-path { white-space: normal; word-break: break-all; }
  .ag-skills-end-h2 { font-size: var(--mkt-h3); }
  .ag-skills-end-cmd { padding: 14px 18px; }
  .ag-skills-end-code {
    font-size: var(--mkt-body-sm);
    word-break: break-all;
  }
}

/* ── Wide-desktop tiers ─────────────────────────────────── */

@media (min-width: 1600px) {
  .ag-skills-hero,
  .ag-skills-list,
  .ag-skills-end { max-width: 920px; }
  
  .ag-skills-sub { font-size: 20px; max-width: 640px; }
  .ag-skills-name { font-size: 30px; }
  .ag-skills-gist { font-size: 18px; }
  .ag-skills-end-h2 { font-size: 72px; }
  .ag-skills-end-code { font-size: 19px; }
}

@media (min-width: 1920px) {
  .ag-skills-hero,
  .ag-skills-list,
  .ag-skills-end { max-width: 1040px; }
  
  .ag-skills-sub { font-size: 21px; max-width: 700px; }
  .ag-skills-name { font-size: 34px; }
  .ag-skills-gist { font-size: 19px; }
  .ag-skills-end-h2 { font-size: 84px; }
  .ag-skills-end-code { font-size: 20.5px; }
}

@media (min-width: 2400px) {
  .ag-skills-hero,
  .ag-skills-list,
  .ag-skills-end { max-width: 1240px; }
  
  .ag-skills-sub { font-size: 24px; max-width: 800px; }
  .ag-skills-name { font-size: 42px; }
  .ag-skills-gist { font-size: 22px; }
  .ag-skills-end-h2 { font-size: 108px; }
  .ag-skills-end-code { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .eyebrow,
  .ag-skills-h1,
  .ag-skills-sub,
  .ag-skills-row,
  .eyebrow,
  .ag-skills-end-h2,
  .ag-skills-end-cmd,
  .ag-skills-end-cta {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ══════════════════════════════════════════════════════════
   BU light overrides.  --font-display auto-flips to Mq12 via
   DS-level override.
═══════════════════════════════════════════════════════════ */
html:not(.dark) body {
  background: var(--zen-gray-3);
  color: var(--text-primary);
}
html:not(.dark) [data-act="1"],
html:not(.dark) [data-act="2"],
html:not(.dark) [data-act="3"] {
  background: var(--zen-gray-3);
}


/* Teal text on light bg — cross-cutting skill-type tag flip. */
html:not(.dark) .ag-skills-row[data-type="cross-cutting"] .ag-skills-type {
  color: #1C9E97;
}

/* BU readers don't need to see the GitHub SKILL.md file path on
   each row — that's dev wayfinding to the open-source playbook.
   Hide the .ag-skills-path in BU; the arrow + gist still
   communicate "row links out to a deeper resource". */
html:not(.dark) .ag-skills-path { display: none; }
