/* ============================================================
   AutoSE, Technical Blueprint
   Palette : bone canvas · ink navy · slate · signal orange
   Type    : Space Grotesk (display) · IBM Plex Sans (body) · IBM Plex Mono (data)
   ============================================================ */

:root {
  --bone: #efebe0;
  --bone-2: #e7e2d4;
  --card: #fbf9f3;
  --ink: #16233d;
  --ink-soft: #283758;
  --slate: #5a6678;
  --signal: #e2603a;
  --signal-deep: #c44a26;
  --line: rgba(22, 35, 61, 0.14);
  --line-soft: rgba(22, 35, 61, 0.08);
  --grid: rgba(22, 35, 61, 0.05);

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --wrap: 1080px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 2rem;
}

a {
  color: inherit;
}

code {
  font-family: var(--font-mono);
}

/* --- blueprint grid backdrop ------------------------------- */
.blueprint-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 35%, transparent 100%);
}

/* --- shared structural marks -------------------------------- */
.tick {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 0.55rem;
  border-left: 2px solid var(--signal);
  border-bottom: 2px solid var(--signal);
  transform: translateY(-1px);
}

.eyebrow,
.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--slate);
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.4rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 18ch;
}

.section-lede {
  color: var(--slate);
  font-size: 1.05rem;
  max-width: 56ch;
  margin-top: 1rem;
}

/* --- nav ---------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(239, 235, 224, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.brand-accent {
  color: var(--signal);
}

.brand-mark {
  width: 13px;
  height: 13px;
  border: 2px solid var(--ink);
  position: relative;
  transform: rotate(45deg);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 2.5px;
  background: var(--signal);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 0.9rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--slate);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-ext {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* --- hero --------------------------------------------------- */
.hero {
  padding: 6rem 0 4.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.3rem, 6.2vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.ink-underline {
  position: relative;
  white-space: nowrap;
}

.ink-underline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.06em;
  height: 0.16em;
  background: var(--signal);
  opacity: 0.85;
  z-index: -1;
}

.hero-sub {
  margin-top: 1.6rem;
  max-width: 60ch;
  font-size: 1.12rem;
  color: var(--ink-soft);
}

/* install command card */
.install-card {
  margin-top: 2.4rem;
  max-width: 660px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 1px 0 var(--line), 8px 8px 0 -1px var(--bone-2);
}

.install-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
}

.tab {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--slate);
  background: none;
  border: none;
  padding: 0.7rem 1.1rem;
  cursor: pointer;
  border-right: 1px solid var(--line);
  transition: color 0.2s, background 0.2s;
}

.tab.is-active {
  color: var(--ink);
  background: var(--bone);
}

.tab:hover {
  color: var(--ink);
}

.install-body {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.15rem;
}

.install-cmd {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink);
  overflow-x: auto;
  white-space: nowrap;
}

.install-cmd.is-hidden {
  display: none;
}

.install-cmd .prompt {
  color: var(--signal);
  user-select: none;
  margin-right: 0.5rem;
}

.copy-btn {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--card);
  background: var(--ink);
  border: none;
  padding: 0.5rem 0.9rem;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  flex-shrink: 0;
}

.copy-btn:hover {
  background: var(--signal-deep);
}

.copy-btn:active {
  transform: translateY(1px);
}

.copy-btn.is-done {
  background: var(--signal);
}

.install-foot {
  font-size: 0.82rem;
  color: var(--slate);
  padding: 0 1.15rem 0.95rem;
}

.install-foot a {
  color: var(--signal-deep);
}

.tier-footnote {
  margin-top: 1.3rem;
  font-size: 0.82rem;
  color: var(--slate);
}

/* download row (desktop app) */
.download-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.4rem;
}

.dl {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 220px;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
  text-decoration: none;
}

.dl-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--card);
  box-shadow: 8px 8px 0 -1px var(--bone-2);
  transition: background 0.2s, transform 0.12s, box-shadow 0.2s;
}

.dl-primary:hover {
  background: var(--signal-deep);
  transform: translateY(-2px);
  box-shadow: 10px 10px 0 -1px var(--bone-2);
}

.dl-primary:active {
  transform: translateY(0);
  box-shadow: 6px 6px 0 -1px var(--bone-2);
}

.dl-cli {
  color: var(--ink);
  box-shadow: 8px 8px 0 -1px var(--bone-2);
  transition: transform 0.12s, box-shadow 0.2s, border-color 0.2s;
}

.dl-cli:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
  box-shadow: 10px 10px 0 -1px var(--bone-2);
}

.dl-cli:active {
  transform: translateY(0);
  box-shadow: 6px 6px 0 -1px var(--bone-2);
}

.dl-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.dl-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.dl-badge {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  padding: 0.12rem 0.42rem;
  border-radius: 2px;
  background: var(--signal);
  color: var(--card);
}

.dl-meta {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

.dl-cli .dl-meta {
  color: var(--slate);
  opacity: 1;
}

.install-alt-label {
  margin-top: 1.9rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
}

/* desktop download callout inside the install section */
.desktop-callout {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem 0.95rem;
  font-size: 0.9rem;
  color: var(--slate);
}

.dl-inline {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--card);
  background: var(--ink);
  padding: 0.5rem 0.9rem;
  border-radius: 3px;
  text-decoration: none;
  transition: background 0.2s;
}

.dl-inline:hover {
  background: var(--signal-deep);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  margin-top: 1.8rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--slate);
}

.hero-meta .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--signal);
  border-radius: 50%;
  margin-right: 0.5rem;
  transform: translateY(-1px);
}

/* --- provenance: an engineering sheet's title block ---------- */
.research-band {
  background: var(--bone-2);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.prov-block {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.prov-cell {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 1rem 1.4rem 1.05rem;
  border-left: 1px solid var(--line);
  text-decoration: none;
  transition: background 0.2s;
}

.prov-cell:last-child {
  border-right: 1px solid var(--line);
}

.prov-cell:hover {
  background: var(--card);
}

.prov-label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate);
}

.prov-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  transition: color 0.2s;
}

.prov-cell:hover .prov-value {
  color: var(--signal-deep);
}

.prov-arrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.8em;
  color: var(--signal-deep);
  transition: transform 0.2s;
}

.prov-cell:hover .prov-arrow {
  transform: translateX(3px);
}

/* --- pipeline (signature) ----------------------------------- */
.pipeline-section {
  padding: 5rem 0;
  border-top: 1px solid var(--line-soft);
}

.pipeline {
  list-style: none;
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
}

.stage {
  position: relative;
  padding: 1.6rem 1.3rem 1.6rem 0;
  border-top: 2px solid var(--ink);
  margin-right: 1.3rem;
}

/* node tick at the start of each stage on the rule */
.stage::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  width: 10px;
  height: 10px;
  background: var(--bone);
  border: 2px solid var(--ink);
  border-radius: 50%;
}

/* connector arrowhead between stages */
.stage::after {
  content: "";
  position: absolute;
  top: -10px;
  right: -1.3rem;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--line);
  border-right: 2px solid var(--line);
  transform: rotate(45deg);
}

.stage:last-child {
  margin-right: 0;
}

.stage:last-child::after {
  display: none;
}

.stage-id {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--slate);
}

.stage h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  margin: 0.5rem 0 0.5rem;
  letter-spacing: -0.01em;
}

.stage p {
  font-size: 0.9rem;
  color: var(--slate);
}

/* the human gate is the highlighted node */
.stage.is-gate {
  border-top-color: var(--signal);
}

.stage.is-gate::before {
  border-color: var(--signal);
  background: var(--signal);
}

.stage.is-gate .stage-id {
  color: var(--signal-deep);
}

/* --- capabilities / spec cards ------------------------------ */
.features {
  padding: 5rem 0;
  border-top: 1px solid var(--line-soft);
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  margin-top: 3rem;
}

.spec {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1.7rem 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.spec:hover {
  transform: translateY(-3px);
  box-shadow: 6px 6px 0 -1px var(--bone-2);
}

/* blueprint corner crop-marks */
.spec::before,
.spec::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border-color: var(--signal);
  border-style: solid;
}

.spec::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.spec::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}

.spec-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--signal-deep);
}

.spec h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.22rem;
  margin: 0.7rem 0 0.6rem;
  letter-spacing: -0.01em;
}

.spec p {
  font-size: 0.94rem;
  color: var(--slate);
}

/* --- install detail ----------------------------------------- */
.install-detail {
  padding: 5rem 0;
  border-top: 1px solid var(--line-soft);
}

.install-detail-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3.5rem;
  align-items: start;
}

.install-detail-inner>* {
  min-width: 0;
}

.run-list {
  list-style: none;
  margin-top: 2rem;
  display: grid;
  gap: 1.1rem;
}

.run-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.run-n {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--ink);
  color: var(--ink);
}

.run-list code,
.run-list strong {
  font-weight: 600;
}

.run-list code {
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.install-detail-panel {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1.6rem;
}

.panel-row {
  margin-bottom: 1.4rem;
}

.panel-row:last-of-type {
  margin-bottom: 1rem;
}

.panel-os {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--slate);
  display: block;
  margin-bottom: 0.5rem;
}

.panel-cmd {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  background: var(--bone);
  border: 1px solid var(--line);
  padding: 0.75rem 0.85rem;
  overflow-x: auto;
  white-space: nowrap;
  min-width: 0;
}

.panel-cmd .prompt {
  color: var(--signal);
  user-select: none;
  margin-right: 0.45rem;
}

.copy-mini {
  margin-top: 0.5rem;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.copy-mini:hover {
  background: var(--ink);
  color: var(--card);
}

.panel-note {
  font-size: 0.82rem;
  color: var(--slate);
  border-top: 1px dashed var(--line);
  padding-top: 1rem;
}

.panel-note a {
  color: var(--signal-deep);
}

/* --- footer ------------------------------------------------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 3.5rem 0 1.5rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  max-width: 34ch;
}

.footer-brand p {
  flex-basis: 100%;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.88rem;
  color: var(--slate);
  margin-top: 0.5rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.footer-links a {
  color: var(--slate);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--signal-deep);
}

.footer-base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--slate);
}

.footer-credit a {
  color: var(--signal-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--signal-deep);
  padding-bottom: 1px;
}

.footer-credit a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* --- reveal animation --------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(.22, 1, .36, 1), transform 0.7s cubic-bezier(.22, 1, .36, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* --- focus ------------------------------------------------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

/* --- responsive --------------------------------------------- */
@media (max-width: 880px) {
  .pipeline {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 1.3rem;
  }

  .stage:last-child::after,
  .stage::after {
    display: none;
  }

  .spec-grid {
    grid-template-columns: 1fr 1fr;
  }

  .install-detail-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 600px) {
  .wrap {
    padding: 0 1.25rem;
  }

  .nav-links {
    gap: 1.1rem;
  }

  .nav-links a:not(.nav-ext) {
    display: none;
  }

  .hero {
    padding: 3.5rem 0 3rem;
  }

  .pipeline {
    grid-template-columns: 1fr;
  }

  .stage {
    margin-right: 0;
  }

  .spec-grid {
    grid-template-columns: 1fr;
  }

  .download-row {
    gap: 0.7rem;
  }

  .dl {
    min-width: 0;
    flex: 1 1 100%;
  }

  .dl-primary {
    box-shadow: 6px 6px 0 -1px var(--bone-2);
  }

  .install-body {
    flex-wrap: wrap;
  }

  .install-cmd {
    white-space: normal;
    word-break: break-all;
  }

  .install-detail-panel {
    display: none;
  }

  .footer-base {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .spec {
    transition: none;
  }
}

/* ============================================================
   Research / publications page
   ============================================================ */
.page-hero {
  padding: 5.5rem 0 1rem;
}

.pub-section {
  padding: 2.5rem 0 5rem;
}

.pub-count {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: var(--slate);
  margin-top: 2.6rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.pub-list {
  list-style: none;
  margin-top: 1.4rem;
  display: grid;
  gap: 1.1rem;
}

.pub {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1.7rem 1.7rem 1.5rem;
  display: grid;
  grid-template-columns: 3ch 1fr;
  gap: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pub:hover {
  transform: translateY(-3px);
  box-shadow: 6px 6px 0 -1px var(--bone-2);
}

/* blueprint corner crop-marks, matching the spec cards */
.pub::before,
.pub::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border-color: var(--signal);
  border-style: solid;
}

.pub::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.pub::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}

.pub-index {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--slate);
  padding-top: 0.25rem;
}

.pub-venue {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--card);
  background: var(--signal-deep);
  padding: 0.34rem 0.72rem;
  border-radius: 3px;
  box-shadow: 3px 3px 0 -1px var(--bone-2);
}

.pub-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.24rem;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 0.55rem 0 0.5rem;
}

.pub-title a {
  text-decoration: none;
}

.pub-title a:hover {
  color: var(--signal-deep);
}

.pub-authors {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-bottom: 0.65rem;
}


.pub-desc {
  font-size: 0.94rem;
  color: var(--slate);
}

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.95rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--signal-deep);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.pub-link:hover {
  border-bottom-color: var(--signal-deep);
}

@media (max-width: 600px) {
  .pub {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .pub-index {
    padding-top: 0;
  }
}
