/* Paper, ink and one signal colour. Type does the work; no cards, no icons. */
:root {
  --paper: #f2f0eb;
  --paper-2: #e9e6df;
  --ink: #141517;
  --ink-2: #4a4c50;
  --mute: #8a8c8f;
  --rule: #d6d2c9;
  --signal: #d4461c;
  --night: #121314;
  --night-ink: #ecebe7;
  --night-rule: #2c2e31;

  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --cond: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; }
ol, ul { list-style: none; }
::selection { background: var(--signal); color: var(--paper); }

.mono { font-family: var(--mono); font-size: 13px; letter-spacing: .02em; }
.label {
  font: 500 12px/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mute);
}

h2 {
  font: 600 clamp(36px, 6vw, 76px)/1 var(--cond);
  letter-spacing: -.02em;
}
h3 { font: 500 20px/1.3 var(--sans); letter-spacing: -.01em; }

/* Reading progress */
.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 20; }
.progress span { display: block; height: 100%; background: var(--signal); transform-origin: 0 50%; transform: scaleX(0); }

/* Header */
.top {
  position: fixed; inset: 0 0 auto; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--gutter);
  mix-blend-mode: difference; color: #fff;
}
.mark { font: 600 18px var(--cond); text-decoration: none; letter-spacing: .04em; }
.top nav { display: flex; gap: clamp(14px, 3vw, 36px); font: 500 13px var(--mono); }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 640px) { .top nav a:not(.nav-cta) { display: none; } }

/* Hero: a centred, photo-led introduction */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 120px var(--gutter) 72px;
  position: relative;
  overflow-x: clip;
}
.hero-inner {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 22px; width: 100%; max-width: 600px;
}
.hero-inner > * { max-width: 100%; }
.hero-photo {
  width: clamp(150px, 24vw, 220px); height: auto; aspect-ratio: 1;
  border-radius: 50%; object-fit: cover; object-position: center 28%;
  box-shadow: 0 0 0 1px var(--rule), 0 0 0 7px var(--paper), 0 0 0 9px var(--signal);
}
.hero-name {
  font: 600 clamp(40px, 7vw, 84px)/1 var(--cond);
  letter-spacing: -.03em; text-transform: uppercase; margin-top: 8px;
}
.hero-role {
  font: 500 12px/1 var(--mono); letter-spacing: .14em;
  text-transform: uppercase; color: var(--mute);
}
.hero-lede { font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-2); max-width: min(44ch, 100%); }
.hero-certs { color: var(--ink-2); }
.hero-cta {
  margin-top: 6px; padding: 13px 28px; border-radius: 999px;
  background: var(--ink); color: var(--paper); text-decoration: none;
  font: 500 13px var(--mono); letter-spacing: .06em; text-transform: uppercase;
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.hero-cta:hover { background: var(--signal); transform: translateY(-2px); }
.scroll-hint { position: absolute; right: var(--gutter); bottom: 32px; writing-mode: vertical-rl; color: var(--mute); }
@media (max-width: 720px) {
  .hero { padding-top: 104px; }
  .scroll-hint { display: none; }
}

/* Migration case study: a tall section with a pinned panel */
.migration {
  background: var(--night); color: var(--night-ink);
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  padding: 120px var(--gutter) 30vh;
}
.migration .label { color: #8d8f92; }
.mig-sticky { position: sticky; top: 90px; align-self: start; display: grid; gap: 40px; }
.mig-head h2 { margin: 20px 0 16px; }
.mig-sub { color: #a9aaad; max-width: 42ch; }

.route { width: 100%; height: auto; overflow: visible; }
.route-tag { font: 500 12px var(--mono); letter-spacing: .14em; fill: #8d8f92; }
.route-base { fill: none; stroke: var(--night-rule); stroke-width: 2; }
.route-draw { fill: none; stroke: var(--signal); stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p, 0)); }
.route-start { fill: var(--night-ink); }
.route-end { fill: var(--night); stroke: var(--signal); stroke-width: 2; transition: fill .3s; }
.migration.done .route-end { fill: var(--signal); }

.figures { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--night-rule); }
.figures > div { padding: 16px 12px 0 0; border-right: 1px solid var(--night-rule); }
.figures > div + div { padding-left: 12px; }
.figures > div:last-child { border-right: 0; }
.figures dt { font: 400 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #8d8f92; min-height: 2.6em; }
.figures dd { font: 600 clamp(30px, 3.6vw, 52px)/1 var(--cond); margin-top: 10px; font-variant-numeric: tabular-nums; }
.figures small { font-size: .5em; margin-left: 2px; color: #a9aaad; }

.phases { display: grid; gap: 34vh; padding-top: 30vh; counter-reset: ph; }
.phase {
  border-left: 1px solid var(--night-rule); padding: 4px 0 4px 24px;
  opacity: .28; transition: opacity .5s var(--ease), border-color .5s;
  counter-increment: ph;
}
.phase.on { opacity: 1; border-color: var(--signal); }
.phase .mono { color: var(--signal); }
.phase h3 { font: 600 clamp(26px, 2.6vw, 36px)/1.1 var(--cond); margin: 10px 0 12px; }
.phase h3::before { content: "0" counter(ph) " "; color: #5c5e61; }
.phase p:last-child { color: #b9babc; max-width: 46ch; }

@media (max-width: 860px) {
  .migration { grid-template-columns: 1fr; padding-bottom: 100px; }
  .mig-sticky { position: static; }
  .figures { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 20px; }
  .figures > div:nth-child(3) { border-right: 0; }
  .figures > div:nth-child(4) { padding-left: 0; }
  .phases { gap: 48px; padding-top: 16px; }
}

/* Section heads */
.work, .services, .creds, .contact { padding: 140px var(--gutter) 40px; }
.section-head { display: grid; gap: 20px; margin-bottom: 64px; }
.section-sub { color: var(--ink-2); max-width: 48ch; }

/* Work rows: lines that draw, then text that rises */
.rows { border-top: 1px solid var(--rule); }
.row {
  position: relative;
  display: grid; grid-template-columns: 80px minmax(0, 1fr) 200px; gap: 24px;
  padding: 36px 0;
}
.row::after, .price::after, .cert::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--ink); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 1.1s var(--ease);
}
.row.in::after, .price.in::after, .cert.in::after { transform: scaleX(1); }
.row > *, .price > *, .cert > a > * {
  opacity: 0; transform: translateY(18px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.in > *, .cert.in > a > * { opacity: 1; transform: none; }
.in > :nth-child(2), .cert.in > a > :nth-child(2) { transition-delay: .08s; }
.in > :nth-child(3), .cert.in > a > :nth-child(3) { transition-delay: .16s; }

.row-n { color: var(--signal); padding-top: 4px; }
.row-body h3 { font: 600 clamp(24px, 2.6vw, 34px)/1.1 var(--cond); margin-bottom: 12px; }
.row-body p { color: var(--ink-2); max-width: 62ch; }
.row-body .stack { margin-top: 14px; color: var(--mute); }
.row-links { display: flex; gap: 20px; align-items: start; justify-content: end; font: 500 13px var(--mono); }
.row-links a { text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.row-links a:hover { color: var(--signal); }
@media (max-width: 760px) {
  .row { grid-template-columns: 1fr; gap: 10px; }
  .row-links { justify-content: start; }
}

/* Services as a price list */
.services { background: var(--paper-2); padding-bottom: 120px; }
.price-list { border-top: 1px solid var(--rule); }
.price {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: baseline;
  padding: 28px 0;
}
.price h3 { font: 600 clamp(22px, 2.2vw, 30px)/1.15 var(--cond); }
.price p { color: var(--ink-2); max-width: 56ch; margin-top: 6px; }
.price .mono { font-size: clamp(16px, 1.6vw, 20px); white-space: nowrap; }

/* Certifications */
.cert-list { border-top: 1px solid var(--rule); }
.cert { position: relative; }
.cert a {
  display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; gap: 24px; align-items: baseline;
  padding: 26px 0; text-decoration: none;
}
.cert-code { font-size: clamp(22px, 2.4vw, 32px); color: var(--signal); font-weight: 500; }
.cert a > span:nth-child(2) { font: 500 clamp(18px, 1.8vw, 24px) var(--sans); }
.cert .arrow { font-size: 22px; transition: transform .3s var(--ease); }
.cert a:hover .arrow { transform: translate(4px, -4px); }
@media (max-width: 600px) { .cert a { grid-template-columns: 1fr auto; } .cert-code { grid-column: 1 / -1; } }

.stack-grid { margin-top: 100px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.stack-grid dt { color: var(--signal); margin-bottom: 10px; }
.stack-grid dd { color: var(--ink-2); font-size: 15px; }
@media (max-width: 860px) { .stack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Contact */
.contact { padding-bottom: 120px; min-height: 80svh; display: grid; align-content: center; gap: 28px; }
.contact-line { font-size: clamp(32px, 5vw, 64px); max-width: 18ch; }
.mail {
  font: 600 clamp(28px, 6.4vw, 92px)/1 var(--cond); letter-spacing: -.02em;
  text-decoration: none; overflow-wrap: anywhere;
  background: linear-gradient(var(--signal), var(--signal)) 0 100% / 0 3px no-repeat;
  transition: background-size .6s var(--ease), color .3s;
  padding-bottom: 6px; justify-self: start;
}
.mail:hover { background-size: 100% 3px; color: var(--signal); }
.contact-links { display: flex; gap: 28px; font: 500 14px var(--mono); }
.contact-links a { text-decoration: none; border-bottom: 1px solid currentColor; }

/* Curtain footer: the page lifts to reveal a dark sign-off underneath */
main { position: relative; z-index: 1; background: var(--paper); margin-bottom: var(--foot-h, 340px); }
.foot {
  position: fixed; inset: auto 0 0 0; z-index: 0;
  min-height: var(--foot-h, 340px);
  background: var(--night); color: var(--night-ink);
  display: flex; align-items: flex-end;
  padding: clamp(36px, 6vw, 72px) var(--gutter);
}
.foot-inner { width: 100%; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.foot-name { font: 600 clamp(52px, 12vw, 150px)/.86 var(--cond); letter-spacing: -.03em; text-transform: uppercase; }
.foot-side { display: grid; gap: 10px; text-align: right; color: #a9aaad; align-content: end; }
.foot-top { color: var(--night-ink); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 3px; justify-self: end; transition: color .3s; }
.foot-top:hover { color: var(--signal); }
@media (max-width: 640px) {
  .foot-inner { flex-direction: column; align-items: flex-start; }
  .foot-side { text-align: left; }
  .foot-top { justify-self: start; }
}

/* Simple reveal for single elements */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
  .reveal, .row > *, .price > *, .cert > a > * { opacity: 1; transform: none; }
  .row::after, .price::after, .cert::after { transform: scaleX(1); }
  .phase { opacity: 1; }
}
