/* ============================================================
   Amit Malul Lev — AI integration
   Sage limestone ground, basalt ink, ultramarine accent.
   Colour arrives through a categorical four: each kind of work
   owns a hue, carried by its icon, its card wash, its process
   number and its lane in the signal band.
   ============================================================ */

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

:root {
  --ground:      #E7E9E3;
  --ground-2:    #DFE2DA;
  --surface:     #F4F5F0;
  --line:        #C7CCC0;
  --line-soft:   #D6DACE;
  --ink:         #14171A;
  --ink-2:       #454C4E;
  --ink-3:       #767E78;

  /* the four kinds of work */
  --c1: #3B50D9;   /* assistants inside your product */
  --c2: #1E9A8F;   /* agents                         */
  --c3: #C67C13;   /* engineering velocity           */
  --c4: #C23A5E;   /* data to decisions              */

  --accent: var(--c1);
  --accent-hi: #1A2A9C;

  --sig-noise: #99A196;

  --display: 'Archivo', system-ui, sans-serif;
  --body:    'Newsreader', Georgia, serif;
  --mono:    'IBM Plex Mono', ui-monospace, monospace;

  --fs-xs:  0.72rem;
  --fs-sm:  0.86rem;
  --fs-base:1.075rem;
  --fs-md:  1.22rem;
  --fs-lg:  1.5rem;
  --fs-h2:  clamp(1.9rem, 4vw, 2.9rem);
  --fs-h2b: clamp(2.2rem, 5.2vw, 3.7rem);
  --fs-hero:clamp(2.7rem, 8.2vw, 6.2rem);

  --shell: 1200px;
  --pad: clamp(1.25rem, 5vw, 3.5rem);
  --rail: 210px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground:      #101310;
    --ground-2:    #161A15;
    --surface:     #1A1E19;
    --line:        #2C312B;
    --line-soft:   #232821;
    --ink:         #E8EAE2;
    --ink-2:       #AFB6AC;
    --ink-3:       #7C847A;

    --c1: #8E9CFF;
    --c2: #4CC5BB;
    --c3: #E0A94E;
    --c4: #F0748F;

    --accent-hi: #ADB8FF;
    --sig-noise: #4C544B;
  }
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--fs-base);
  line-height: 1.66;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.shell { max-width: var(--shell); margin-inline: auto; padding-inline: var(--pad); }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 1px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--ground);
  padding: 0.6rem 1rem; z-index: 100;
  font-family: var(--mono); font-size: var(--fs-sm);
}
.skip:focus { left: 0; }

em { font-style: italic; }
b  { font-weight: 500; color: var(--ink); }

.icon {
  width: 1em; height: 1em; flex: none;
  stroke: currentColor; fill: none;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

/* ─────────────────── top bar ─────────────────── */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.topbar.is-stuck { border-bottom-color: var(--line); }

.topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: 0.7rem;
}

.topbar__id { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.topbar__avatar {
  width: 30px; height: 30px; border-radius: 50%;
  object-fit: cover; display: block;
  box-shadow: 0 0 0 1px var(--line);
}
.topbar__name {
  font-family: var(--display);
  font-variation-settings: 'wdth' 100, 'wght' 620;
  font-size: var(--fs-sm);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.topbar__nav {
  display: flex; align-items: center; gap: clamp(0.8rem, 2.5vw, 1.8rem);
  font-family: var(--mono); font-size: var(--fs-xs);
  letter-spacing: 0.04em;
}
.topbar__nav a { text-decoration: none; color: var(--ink-2); transition: color 0.2s ease; }
.topbar__nav a:hover { color: var(--ink); }

.status { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--ink-3); }
.status__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c2);
  animation: pulse 2.8s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c2) 55%, transparent); }
  70%  { box-shadow: 0 0 0 7px color-mix(in srgb, var(--c2) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c2) 0%, transparent); }
}

.topbar__cta {
  color: var(--accent) !important;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  padding-bottom: 1px;
}
.topbar__cta:hover { border-bottom-color: var(--accent); }
.topbar__cta-short { display: none; }

@media (max-width: 760px) { .status { display: none; } }
@media (max-width: 520px) {
  .topbar__link { display: none; }
  .topbar__cta-long { display: none; }
  .topbar__cta-short { display: inline; }
}

/* ─────────────────── hero ─────────────────── */

.hero { padding-top: clamp(2.75rem, 8vw, 6rem); }

.hero__eyebrow {
  font-family: var(--mono); font-size: var(--fs-xs);
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: clamp(1.3rem, 3.2vw, 2.2rem);
}

.hero__title {
  font-family: var(--display);
  font-size: var(--fs-hero);
  font-variation-settings: 'wdth' 94, 'wght' 720;
  line-height: 0.94;
  letter-spacing: -0.038em;
  text-wrap: balance;
}
.line { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.line__i { display: block; }
.hero__title .line:nth-child(3) .line__i { color: var(--accent); }

.hero__foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(1.75rem, 5vw, 4rem);
  margin-top: clamp(1.9rem, 4.5vw, 3rem);
}
.hero__stand {
  max-width: 52ch;
  font-size: var(--fs-md);
  color: var(--ink-2);
  line-height: 1.58;
  margin-bottom: 1.4rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* portrait */
.who { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; text-align: center; }
.who__photo {
  /* height:auto is required: the width/height attributes would otherwise
     win over aspect-ratio and stretch the image. */
  width: clamp(116px, 15vw, 156px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  box-shadow: 0 0 0 1px var(--line), 0 0 0 7px color-mix(in srgb, var(--accent) 12%, transparent);
}
.who__body { display: flex; flex-direction: column; gap: 0.2rem; }
.who__name {
  font-family: var(--display); font-size: var(--fs-base);
  font-variation-settings: 'wdth' 100, 'wght' 640;
  letter-spacing: -0.015em;
}
.who__role {
  font-family: var(--mono); font-size: var(--fs-xs);
  letter-spacing: 0.07em; color: var(--ink-3); line-height: 1.7;
}
.who__role b { color: var(--accent); font-weight: 500; }

@media (max-width: 900px) {
  .hero__foot { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .who { flex-direction: row; text-align: left; align-items: center; gap: 1rem; }
}
@media (max-width: 560px) {
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { justify-content: center; }
}

/* ─────────────────── buttons ─────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--mono); font-size: var(--fs-sm);
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.8rem 1.2rem;
  border: 1px solid var(--ink);
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
  white-space: nowrap;
}
.btn__arrow { transition: transform 0.24s cubic-bezier(0.3, 0.9, 0.3, 1); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }

.btn--lg { padding: 1rem 1.5rem; font-size: var(--fs-base); }
@media (max-width: 560px) { .btn--lg { padding: 0.9rem 1.05rem; font-size: var(--fs-sm); } }

@media (prefers-color-scheme: dark) {
  .btn--primary { color: #0B0F1E; }
  .btn--primary:hover { color: #0B0F1E; }
}

/* ─────────────────── signature: signal band ─────────────────── */

.signal {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--surface) 70%, transparent),
    color-mix(in srgb, var(--surface) 25%, transparent));
}
.signal__canvas { display: block; width: 100%; height: clamp(130px, 19vw, 205px); }

.signal__caps {
  max-width: var(--shell); margin-inline: auto;
  padding: 0.5rem var(--pad) 0.7rem;
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  font-family: var(--mono); font-size: var(--fs-xs);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3);
}
.signal__cap--end { color: var(--accent); }
.signal__note {
  font-family: var(--body); font-style: italic;
  font-size: var(--fs-sm); letter-spacing: 0;
  text-transform: none; color: var(--ink-3); text-align: center;
}
@media (max-width: 700px) { .signal__note { display: none; } }

/* ─────────────────── credential strip ─────────────────── */

.creds {
  max-width: var(--shell); margin-inline: auto;
  padding: clamp(1.1rem, 2.6vw, 1.6rem) var(--pad);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
  gap: 0.9rem 1.6rem;
  list-style: none;
}
.cred { display: flex; align-items: flex-start; gap: 0.62rem; }
.cred__mark { width: 9px; height: 9px; border-radius: 2px; background: var(--cc); margin-top: 0.5rem; flex: none; }
.cred__text { display: flex; flex-direction: column; }
.cred__k {
  font-family: var(--display); font-size: var(--fs-sm);
  font-variation-settings: 'wdth' 100, 'wght' 640;
  letter-spacing: -0.012em;
}
.cred__v { font-family: var(--mono); font-size: var(--fs-xs); color: var(--ink-3); letter-spacing: 0.045em; }
.cred:nth-child(1) { --cc: var(--c1); }
.cred:nth-child(2) { --cc: var(--c2); }
.cred:nth-child(3) { --cc: var(--c3); }
.cred:nth-child(4) { --cc: var(--c4); }

/* ─────────────────── section frame ─────────────────── */

.section {
  max-width: var(--shell); margin-inline: auto;
  padding-inline: var(--pad);
  padding-block: clamp(3.5rem, 8vw, 6.25rem);
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: 0 clamp(1.75rem, 5vw, 4.5rem);
}
.section + .section { border-top: 1px solid var(--line); }

.section__label {
  font-family: var(--mono); font-size: 0.98rem; font-weight: 500;
  letter-spacing: 0.09em; text-transform: uppercase;
  line-height: 1.42;
  color: var(--accent);
  position: sticky; top: 4.25rem; align-self: start;
  padding-top: 0.4rem;
}
@media (max-width: 860px) { .section__label { font-size: 0.9rem; } }
.section__body { display: flex; flex-direction: column; gap: 1.35rem; min-width: 0; }

@media (max-width: 860px) {
  .section { grid-template-columns: minmax(0, 1fr); gap: 1.15rem; }
  .section__label { position: static; padding-top: 0; }
}

.h2 {
  font-family: var(--display);
  font-size: var(--fs-h2);
  font-variation-settings: 'wdth' 97, 'wght' 640;
  line-height: 1.06;
  letter-spacing: -0.028em;
  text-wrap: balance;
  max-width: 20ch;
}
.h2--big { font-size: var(--fs-h2b); max-width: 17ch; }
.lede { max-width: 62ch; color: var(--ink-2); }

/* ─────────────────── capability cards ─────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 1rem;
}
@media (max-width: 700px) { .cards { grid-template-columns: minmax(0, 1fr); } }

.card {
  background: color-mix(in srgb, var(--cc) 7%, var(--surface));
  padding: clamp(1.35rem, 3vw, 2rem);
  display: flex; flex-direction: column; gap: 0.55rem;
  border-top: 3px solid var(--cc);
  transition: background 0.32s ease;
}
.card:hover { background: color-mix(in srgb, var(--cc) 14%, var(--surface)); }
.card:nth-child(1) { --cc: var(--c1); }
.card:nth-child(2) { --cc: var(--c2); }
.card:nth-child(3) { --cc: var(--c3); }
.card:nth-child(4) { --cc: var(--c4); }

.card__badge {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 3px;
  background: color-mix(in srgb, var(--cc) 15%, transparent);
  color: var(--cc);
  margin-bottom: 0.7rem;
}
.card__badge .icon { width: 25px; height: 25px; stroke-width: 1.5; }

.card__tag {
  font-family: var(--mono); font-size: var(--fs-xs);
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--cc);
}
.card__title {
  font-family: var(--display);
  font-size: var(--fs-lg);
  font-variation-settings: 'wdth' 98, 'wght' 620;
  line-height: 1.14; letter-spacing: -0.02em; text-wrap: balance;
}
.card__text { font-size: var(--fs-base); color: var(--ink-2); line-height: 1.62; }

@media (prefers-color-scheme: dark) {
  .card { background: color-mix(in srgb, var(--cc) 9%, var(--surface)); }
  .card:hover { background: color-mix(in srgb, var(--cc) 17%, var(--surface)); }
  .card__badge { background: color-mix(in srgb, var(--cc) 18%, transparent); }
}

/* ─────────────────── process steps ─────────────────── */

.steps { list-style: none; margin-top: 0.75rem; }

.step {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  gap: 0 1.25rem;
  padding-block: clamp(1.35rem, 3vw, 1.9rem);
  border-top: 1px solid var(--line-soft);
  align-items: start;
}
.step:last-child { border-bottom: 1px solid var(--line-soft); }
.step:nth-child(1) { --cc: var(--c1); }
.step:nth-child(2) { --cc: var(--c2); }
.step:nth-child(3) { --cc: var(--c3); }
.step:nth-child(4) { --cc: var(--c4); }

.step__n {
  font-family: var(--mono); font-size: var(--fs-sm);
  color: #fff; background: var(--cc);
  width: 2.15rem; height: 2.15rem;
  display: grid; place-items: center;
  border-radius: 50%;
  font-variant-numeric: tabular-nums;
  margin-top: 0.15rem;
}
@media (prefers-color-scheme: dark) { .step__n { color: #101310; } }

.step__body { display: flex; flex-direction: column; gap: 0.15rem; }
.step__title {
  font-family: var(--display); font-size: var(--fs-lg);
  font-variation-settings: 'wdth' 98, 'wght' 620;
  letter-spacing: -0.02em; line-height: 1.15;
}
.step__meta {
  font-family: var(--mono); font-size: var(--fs-xs);
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--cc); margin-bottom: 0.5rem;
}
.step__text { max-width: 58ch; color: var(--ink-2); }

@media (max-width: 520px) {
  .step { grid-template-columns: minmax(0, 1fr); gap: 0.55rem; }
}

/* ─────────────────── track record ─────────────────── */

.record { list-style: none; margin-top: 0.75rem; }

.record__row {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 0 1.25rem;
  padding-block: 1.1rem;
  border-top: 1px solid var(--line-soft);
}
.record__row:last-child { border-bottom: 1px solid var(--line-soft); }
.record__when {
  font-family: var(--mono); font-size: var(--fs-xs);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3); padding-top: 0.42rem;
  font-variant-numeric: tabular-nums;
}
.record__what { color: var(--ink-2); max-width: 62ch; }

@media (max-width: 620px) {
  .record__row { grid-template-columns: minmax(0, 1fr); gap: 0.3rem; }
  .record__when { padding-top: 0; }
}

.stack {
  margin-top: 1.5rem;
  padding: 1.15rem 1.35rem;
  background: var(--surface);
  border-left: 3px solid var(--accent);
}
.stack__label {
  font-family: var(--mono); font-size: var(--fs-xs);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 0.45rem;
}
.stack__items { font-family: var(--mono); font-size: var(--fs-sm); line-height: 1.85; color: var(--ink-2); }
.stack--alt { margin-top: 0.75rem; border-left-color: var(--c2); }

/* ─────────────────── still learning ─────────────────── */

.learn {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 1.35rem;
  align-items: start;
  padding: clamp(1.35rem, 3vw, 1.9rem);
  background: color-mix(in srgb, var(--c3) 8%, var(--surface));
  border-left: 3px solid var(--c3);
}
.learn__badge {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 3px;
  background: color-mix(in srgb, var(--c3) 16%, transparent);
  color: var(--c3);
}
.learn__badge .icon { width: 27px; height: 27px; stroke-width: 1.5; }
.learn__body { display: flex; flex-direction: column; gap: 0.12rem; }
.learn__meta {
  font-family: var(--mono); font-size: var(--fs-xs);
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--c3); margin-bottom: 0.2rem;
}
.learn__title {
  font-family: var(--display); font-size: var(--fs-lg);
  font-variation-settings: 'wdth' 98, 'wght' 620;
  letter-spacing: -0.02em; line-height: 1.15;
}
.learn__org {
  font-family: var(--mono); font-size: var(--fs-sm);
  color: var(--ink-3); margin-bottom: 0.6rem;
}
.learn__text { color: var(--ink-2); max-width: 58ch; }

@media (max-width: 560px) {
  .learn { grid-template-columns: minmax(0, 1fr); gap: 0.9rem; }
}
@media (prefers-color-scheme: dark) {
  .learn { background: color-mix(in srgb, var(--c3) 10%, var(--surface)); }
  .learn__badge { background: color-mix(in srgb, var(--c3) 20%, transparent); }
}

/* ─────────────────── contact ─────────────────── */

.contacts {
  list-style: none; margin-top: 1.6rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(186px, 1fr));
  gap: 1.15rem 2rem;
  font-family: var(--mono); font-size: var(--fs-sm);
}
.contacts li { display: flex; flex-direction: column; gap: 0.28rem; }
.contacts__k {
  display: inline-flex; align-items: center; gap: 0.42rem;
  font-size: var(--fs-xs); letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--ink-3);
}
.contacts__k .icon { width: 13px; height: 13px; }
.contacts a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; }
.contacts a:hover { border-bottom-color: var(--accent); }

/* The location needs two columns to keep its one sentence on one line.
   On a single-column grid the span is clamped, so no override is needed. */
.contacts__wide { grid-column: span 2; }

.section--end { padding-bottom: clamp(4rem, 9vw, 7rem); }

/* ─────────────────── footer ─────────────────── */

.foot { border-top: 1px solid var(--line); }
.foot__inner {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
  padding-block: 1.6rem;
  font-family: var(--mono); font-size: var(--fs-xs);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3);
}

/* ─────────────────── motion ─────────────────── */

.anim {
  opacity: 0;
  transform: translateY(1.1em);
  animation: rise 0.95s cubic-bezier(0.16, 0.85, 0.28, 1) forwards;
  animation-delay: calc(var(--step, 1) * 90ms + 60ms);
}
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* Reveals are progressive enhancement: without JS every section stays visible. */
.js .reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.16, 0.85, 0.28, 1);
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .anim { opacity: 1; transform: none; animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .status__dot { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
