/* alnaqeeb.dev — Muhammad Alnaqeeb
 *
 * The subject is money moving correctly through distributed systems, so the
 * page is built like a ledger: ruled sections, tabular figures, and a strong
 * dark band at the top that the eye lands on before anything else.
 *
 * Rules of the design:
 *   · one accent, used for structure and never decoration
 *   · one thesis, three pillars, and nothing that reads like a CV
 *   · labels and data are monospaced; only prose is set in the sans
 */

:root {
  --paper: #FBFAF7;
  --surface: #FFFFFF;
  --ink: #0F1317;
  --ink-soft: #39424A;
  --muted: #6B757C;
  --line: #E6E4DE;
  --accent: #0B7A63;
  --accent-ink: #2DD4A7;
  --band: #0F1317;
  --band-soft: #98A5AC;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --page: 1080px;
  --gutter: clamp(20px, 5vw, 56px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0B0E11;
    --surface: #141A1E;
    --ink: #EDF0F1;
    --ink-soft: #C3CBD0;
    --muted: #8A959B;
    --line: #202830;
    --accent: #2DD4A7;
    --accent-ink: #2DD4A7;
    --band: #060809;
    --band-soft: #8A959B;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.inner {
  max-width: var(--page);
  /* margin-inline, not the margin shorthand: a class-level shorthand here
     outranks `section { margin-bottom }` and quietly flattens the page. */
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 0; top: 0; z-index: 10;
  background: var(--accent); color: #fff; padding: 10px 16px;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

/* ============================================================ hero band */

.band {
  background: var(--band);
  color: #F2F5F6;
  padding-block: clamp(56px, 11vw, 104px) clamp(40px, 7vw, 64px);
  position: relative;
  overflow: hidden;
}

/* A faint ruled grid — a ledger's paper, not a decoration. */
.band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 90% at 20% 0%, #000 30%, transparent 78%);
  pointer-events: none;
}

.band .inner { position: relative; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::after {
  content: "";
  height: 1px;
  flex: 1;
  max-width: 180px;
  background: linear-gradient(to right, var(--accent-ink), transparent);
  opacity: .55;
}

h1 {
  font-size: clamp(44px, 9.5vw, 92px);
  line-height: .95;
  letter-spacing: -.038em;
  font-weight: 800;
  margin: 0 0 26px;
}

.thesis {
  font-size: clamp(21px, 3.1vw, 31px);
  line-height: 1.32;
  letter-spacing: -.018em;
  font-weight: 500;
  margin: 0 0 14px;
  max-width: 20ch;
}
.thesis em { color: var(--accent-ink); font-style: normal; font-weight: 700; }

.band .sub {
  color: var(--band-soft);
  max-width: 56ch;
  margin: 0 0 34px;
  font-size: 16.5px;
}

.links { display: flex; flex-wrap: wrap; gap: 10px; }

.links a {
  font-family: var(--mono);
  font-size: 13.5px;
  color: #E7ECEE;
  text-decoration: none;
  padding: 9px 16px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  transition: border-color .15s, background .15s;
}
.links a:hover { border-color: var(--accent-ink); background: rgba(45,212,167,.10); }
.links a.primary {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
  color: #05201A;
  font-weight: 600;
}
.links a.primary:hover { background: #55E0BA; }

/* ============================================================ pillars */

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  /* Lifted so it overlaps the dark band — the page starts with substance
     rather than a gap. */
  margin-top: clamp(-40px, -4.5vw, -30px);
  position: relative;
  z-index: 2;
  padding: 0;
}

.pillars article {
  background: var(--surface);
  padding: clamp(24px, 3.2vw, 34px);
  /* The rule above the tools line has to sit at the same height in every
     card, so it is pushed to the bottom rather than following the prose. */
  display: flex;
  flex-direction: column;
}
.pillars article p:nth-of-type(2) { flex: 1; }

.pillars .num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--accent);
  margin: 0 0 14px;
}

.pillars h3 {
  font-size: 20px;
  letter-spacing: -.02em;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.2;
}

.pillars p {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.58;
}

.pillars .tools {
  font-size: 12.5px;
  color: var(--muted);
  margin: auto 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* ============================================================ sections */

main { padding-block: 0 clamp(52px, 8vw, 88px); }

section { margin-bottom: clamp(56px, 9vw, 100px); }
.pillars { margin-bottom: clamp(56px, 9vw, 100px); }
section:last-child { margin-bottom: 0; }

.head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.head h2 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
}
.head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  text-align: right;
  flex: 1;
}

/* Statement on the left, detail on the right: the page is 1080px wide and a
   single narrow column left half of it empty. */
.split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 780px) {
  .split { grid-template-columns: 1fr; gap: 20px; }
}

.lede {
  font-size: clamp(24px, 3.5vw, 36px);
  line-height: 1.24;
  letter-spacing: -.028em;
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}
.body { color: var(--ink-soft); margin: 0 0 16px; }
.body:last-child { margin-bottom: 0; }

/* ---- domains ---- */

.domains {
  list-style: none;
  margin: clamp(34px, 5vw, 52px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.domains li {
  background: var(--paper);
  padding: 20px 14px 20px 0;
  font-weight: 600;
  letter-spacing: -.012em;
  display: flex;
  align-items: baseline;
  gap: 11px;
}
.domains span {
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
}

/* ---- stack ---- */

.groups { display: grid; gap: 22px; }

.group h3 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 10px;
}

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips span {
  font-size: 13.5px;
  font-family: var(--mono);
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-soft);
}
.chips span.key {
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  color: var(--accent);
  font-weight: 600;
}

/* ---- contact ---- */

.contact {
  background: var(--band);
  color: #EFF3F4;
  border-radius: 18px;
  padding: clamp(30px, 5.5vw, 52px);
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(90% 120% at 88% 10%, #000 20%, transparent 72%);
}
.contact > * { position: relative; }
.contact h2 {
  font-size: clamp(27px, 4.2vw, 40px);
  letter-spacing: -.03em;
  font-weight: 800;
  margin: 0 0 12px;
  line-height: 1.1;
}
.contact p { color: var(--band-soft); max-width: 48ch; margin: 0 0 26px; }
.contact .aside { font-size: 14px; margin: 22px 0 0; }
.contact .aside a { color: var(--accent-ink); }
.contact .mail {
  font-family: var(--mono);
  font-size: clamp(17px, 2.6vw, 22px);
  color: var(--accent-ink);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent-ink) 45%, transparent);
  padding-bottom: 3px;
}
.contact .mail:hover { border-bottom-color: var(--accent-ink); }

/* ---- footer ---- */

footer {
  padding-block: 28px 48px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12.5px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
footer a { color: var(--muted); }

@media print {
  .band, .contact { background: #fff !important; color: #000 !important; }
  .band::before, .contact::before { display: none; }
  .links, .skip { display: none; }
  :root { --ink: #000; --ink-soft: #222; --muted: #555; --line: #ccc; --accent: #000; --accent-ink: #000; }
}
