/* ===========================================================================
   SECTIONS — hero, manifest, stack strip, products, method, background, contact.
   =========================================================================== */

.section {
  width: var(--measure);
  margin-inline: auto;
  padding-block: var(--band);
}

.section-head { max-width: 30ch; margin-bottom: clamp(2.2rem, 5vw, 3.6rem); }
.section-head .eyebrow { margin-bottom: 1rem; }
.section-lede {
  max-width: 52ch;
  margin-top: 1.4rem;
  color: var(--ink-2);
  font-size: var(--step-1);
}

/* ===========================  HERO  ====================================== */
.hero {
  width: var(--measure);
  margin-inline: auto;
  padding-block: clamp(3rem, 8vw, 7rem) clamp(3rem, 6vw, 5rem);
}

.hero .eyebrow { margin-bottom: clamp(1.4rem, 3vw, 2.4rem); }

.hero-name {
  font-size: var(--display);
  line-height: 0.82;
  letter-spacing: -0.05em;
  font-stretch: 90%;
  margin-bottom: clamp(1.6rem, 3vw, 2.4rem);
}

/* The surname is drawn as outline only — the one typographic flourish. */
.hero-name .line { display: block; }
.hero-name .outline {
  color: transparent;
  -webkit-text-stroke: clamp(1px, 0.16vw, 2.5px) var(--ink);
  transition: -webkit-text-stroke-color var(--speed) var(--ease);
}
.hero-name .outline:hover { -webkit-text-stroke-color: var(--accent); }

.hero-thesis {
  max-width: 46ch;
  font-size: var(--step-1);
  color: var(--ink-2);
  margin-bottom: clamp(1.8rem, 4vw, 2.6rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: clamp(3rem, 7vw, 5rem);
}

/* --- the shipped manifest: proof above the fold ------------------------- */
.manifest {
  border-top: 1px solid var(--line-strong);
}

.manifest-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--ink-2);
  padding: 1rem 0 0.4rem;
}
.manifest-rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.manifest-item a {
  display: grid;
  grid-template-columns: 3ch minmax(8rem, 1fr) 3fr auto auto;
  align-items: baseline;
  gap: clamp(0.8rem, 2vw, 2rem);
  padding: clamp(0.9rem, 2vw, 1.25rem) 0.9rem;
  margin-inline: -0.9rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  border-radius: 10px;
  transition: background 300ms var(--ease), color 300ms var(--ease),
    padding-left 300ms var(--ease);
}
.manifest-item a:hover {
  background: var(--accent);
  color: var(--accent-ink);
  padding-left: 1.4rem;
}
.manifest-item a:hover .m-idx,
.manifest-item a:hover .m-kind,
.manifest-item a:hover .m-status { color: inherit; opacity: 0.85; }

.m-idx { font-family: var(--font-mono); font-size: var(--step--1); color: var(--ink-2); }
.m-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-2);
  letter-spacing: -0.03em;
}
.m-kind { color: var(--ink-2); font-size: var(--step-0); }
.m-status {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-2);
}
.m-arrow { font-size: 1.1rem; }

@media (max-width: 820px) {
  .manifest-item a {
    grid-template-columns: 2.5ch 1fr auto;
    row-gap: 0.35rem;
  }
  .m-kind { grid-column: 2 / -1; }
  .m-arrow { display: none; }
}

/* =======================  STACK STRIP  =================================== */
.strip {
  border-block: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  padding: 0.9rem 0;
  margin-block: clamp(1rem, 3vw, 2rem);
}
.strip-track {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  animation: strip-scroll 42s linear infinite;
}
.strip:hover .strip-track { animation-play-state: paused; }
.strip-item {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 2.5rem;
  white-space: nowrap;
}
.strip-item::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  transition: background var(--speed) var(--ease);
}
@keyframes strip-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .strip-track { animation: none; flex-wrap: wrap; width: 100%; }
}

/* =========================  PRODUCTS  ==================================== */
.product-list { display: grid; gap: clamp(1.2rem, 3vw, 2rem); }

.product {
  --pa: var(--accent);
  --pa-text: color-mix(in srgb, var(--pa) 96%, #000);
  position: relative;
  border: 1px solid color-mix(in srgb, var(--pa) 40%, transparent);
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--pa) 9%, transparent),
      color-mix(in srgb, var(--pa) 2%, transparent)),
    var(--surface);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 3.2rem);
  overflow: hidden;
}

:root[data-theme="dark"] .product {
  --pa-text: color-mix(in srgb, var(--pa) 72%, #fff);
}

/* a thin colour bar that identifies the product */
.product::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--pa);
}

.product-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}
.product-idx {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--pa-text);
  font-weight: 700;
}
.product-name {
  font-size: var(--step-4);
  letter-spacing: -0.04em;
  margin-right: auto;
}
.chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--pa);
  color: #fff;
  white-space: nowrap;
}
.chip-soft {
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--pa) 50%, transparent);
  color: var(--ink-2);
}

.product-kind {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  margin-bottom: 1.4rem;
}
.product-line {
  font-size: var(--step-2);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  max-width: 28ch;
  margin-bottom: clamp(1.8rem, 4vw, 2.6rem);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(1.2rem, 3vw, 2.2rem);
  padding-block: clamp(1.4rem, 3vw, 2rem);
  border-top: 1px solid color-mix(in srgb, var(--pa) 28%, transparent);
}
.pblock h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pa-text);
  margin-bottom: 0.6rem;
}
.pblock p { color: var(--ink-2); }

/* metrics: the numbers recruiters scan for */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.2rem;
  padding-block: clamp(1.4rem, 3vw, 2rem);
  border-top: 1px solid color-mix(in srgb, var(--pa) 28%, transparent);
}
.metric-val {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-3);
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--pa-text);
}
.metric-label {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}

/* the AI leverage line — deliberately called out */
.product-ai {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1.1rem 1.2rem;
  margin-block: 1.4rem;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--pa) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--pa) 30%, transparent);
}
.product-ai .ai-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pa-text);
  white-space: nowrap;
  padding-top: 0.2rem;
}

.tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1.6rem; }
.tags li {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-2);
}

.product-links { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.product .btn-solid { background: var(--pa); }
.product .btn-line:hover { border-color: var(--pa); color: var(--pa-text); }

/* ==========================  METHOD  ===================================== */
.flow {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.6rem);
  counter-reset: step;
}
.flow-step {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1.3rem, 3vw, 2rem) 0;
  border-top: 1px solid var(--line);
}
.flow-step:last-child { border-bottom: 1px solid var(--line); }
.step-idx {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--accent-text);
  font-weight: 700;
  transition: color var(--speed) var(--ease);
}
.flow-step h4 { margin-bottom: 0.6rem; }
.flow-step p { color: var(--ink-2); max-width: 62ch; margin-bottom: 0.9rem; }
.flow-step .tags { margin-bottom: 0; }

@media (max-width: 640px) {
  .flow-step { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* ========================  BACKGROUND  =================================== */
.background-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
@media (max-width: 860px) {
  .background-grid { grid-template-columns: 1fr; }
}

.timeline { display: grid; gap: 1.4rem; }
.tl-item {
  display: grid;
  grid-template-columns: minmax(7rem, 9rem) 1fr;
  gap: clamp(0.8rem, 2vw, 1.8rem);
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
}
.tl-period {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  padding-top: 0.35rem;
}
.tl-role { font-size: var(--step-1); margin-bottom: 0.15rem; }
.tl-org { color: var(--accent-text); font-weight: 600; margin-bottom: 0.7rem; transition: color var(--speed) var(--ease); }
.tl-points li {
  color: var(--ink-2);
  padding-left: 1.1rem;
  position: relative;
}
.tl-points li + li { margin-top: 0.45rem; }
.tl-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 5px;
  height: 1px;
  background: var(--ink-2);
}
@media (max-width: 560px) {
  .tl-item { grid-template-columns: 1fr; }
}

.skills-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.3rem, 3vw, 1.9rem);
  background: var(--surface);
  position: sticky;
  top: 5.5rem;
}
.skills-title { color: var(--ink-2); margin-bottom: 1rem; }
.skills-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}
.skills-list li:last-child { border-bottom: 0; }

/* =========================  CONTACT  ===================================== */
.contact { padding-bottom: clamp(3rem, 7vw, 6rem); }
.contact .eyebrow { margin-bottom: 1.2rem; }
.contact-pitch {
  font-size: var(--step-4);
  max-width: 18ch;
  margin-bottom: clamp(1.6rem, 4vw, 2.4rem);
}
.contact-email {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 5vw, 3.4rem);
  letter-spacing: -0.04em;
  text-decoration: none;
  color: var(--accent-text);
  word-break: break-word;
  transition: color var(--speed) var(--ease), opacity 240ms var(--ease);
  margin-bottom: 1.8rem;
}
.contact-email:hover { opacity: 0.7; }

.contact-links { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.contact-links a {
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: color 220ms var(--ease), border-color 220ms var(--ease);
}
.contact-links a:hover { color: var(--accent-text); border-color: var(--accent); }
