{
  "$schema": "https://tr.designtokens.org/format/",
  "$description": "Editorial direction — design tokens for ahmedaliqadir.github.io. W3C DTCG format. assets/site.css holds the runtime custom properties; this file is the portable definition. Every contrast figure below is measured with the WCAG 2.x relative-luminance formula, not estimated.",
  "colour": {
    "$type": "color",
    "ground": {
      "paper": { "$value": "#F2F0EA", "$description": "Page ground. Warm off-white, never pure white." },
      "paper-raised": { "$value": "#E9E6DE", "$description": "Inset panels and inline code." },
      "ink": { "$value": "#14121B", "$description": "Body and headings. 16.28:1 on paper — AAA." },
      "ink-muted": { "$value": "#56506A", "$description": "Secondary text. 6.70:1 on paper — AA." },
      "accent": { "$value": "#5B44C4", "$description": "Links, labels, primary fill. 6.00:1 on paper — AA." },
      "accent-hover": { "$value": "#4733A8" },
      "on-accent": { "$value": "#FFFFFF", "$description": "Text on the accent fill. 6.84:1 — AA." },
      "rule": { "$value": "rgba(20, 18, 27, 0.14)", "$description": "Hairlines. Decorative; never carries meaning." }
    },
    "inverted": {
      "$description": "Sections that flip to dark. Aliases are swapped wholesale by .invert, so components need no knowledge of which ground they sit on.",
      "dark": { "$value": "#14121F", "$description": "Inverted section ground." },
      "dark-deep": { "$value": "#0B0A12", "$description": "Image wells and text on the inverted accent." },
      "dark-ink": { "$value": "#F1EFF7", "$description": "16.22:1 on dark — AAA." },
      "dark-muted": { "$value": "#A6A0BA", "$description": "7.36:1 on dark — AAA." },
      "dark-accent": { "$value": "#B9A8FF", "$description": "8.90:1 on dark — AAA." },
      "dark-rule": { "$value": "rgba(241, 239, 247, 0.16)" }
    },
    "nav": {
      "$description": "The pill sits over both grounds, so its opacity is set by the worst case. At 0.55 — the value this pattern usually carries — it composites to #787678 over the light ground and links fall to 2.53:1, failing AA. At 0.80 it composites to #403E44 and links clear 5.49:1 on light and 8.36:1 on dark.",
      "pill": { "$value": "rgba(20, 18, 27, 0.8)" },
      "link": { "$value": "rgba(241, 239, 247, 0.7)", "$description": "5.49:1 against the composited pill — AA." }
    }
  },
  "font": {
    "$type": "fontFamily",
    "display": { "$value": ["Space Grotesk", "Segoe UI", "system-ui", "sans-serif"], "$description": "Everything structural — display, headings, body." },
    "mono": { "$value": ["DM Mono", "ui-monospace", "SFMono-Regular", "Menlo", "Consolas", "monospace"], "$description": "Three jobs only: labels, numerals, and the call to action." }
  },
  "size": {
    "$type": "dimension",
    "$description": "Fluid, clamped. Sizes are not on a fixed ratio — the jump from lead to display is deliberately large.",
    "display": { "$value": { "value": 7.5, "unit": "rem" }, "$extensions": { "css": "clamp(3rem, 1.6rem + 7vw, 7.5rem)" } },
    "h2": { "$value": { "value": 3.75, "unit": "rem" }, "$extensions": { "css": "clamp(2rem, 1.3rem + 3.4vw, 3.75rem)" } },
    "h3": { "$value": { "value": 1.75, "unit": "rem" }, "$extensions": { "css": "clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem)" } },
    "lead": { "$value": { "value": 2.75, "unit": "rem" }, "$extensions": { "css": "clamp(1.375rem, 1rem + 1.9vw, 2.75rem)" }, "$description": "Lead copy is set at display scale, not body scale." },
    "body": { "$value": { "value": 1.0625, "unit": "rem" } },
    "small": { "$value": { "value": 0.9375, "unit": "rem" } },
    "label": { "$value": { "value": 0.6875, "unit": "rem" } }
  },
  "tracking": {
    "$type": "dimension",
    "$description": "Negative tracking that tightens as type grows is the single biggest lever on how expensive large type reads.",
    "display": { "$value": { "value": -0.045, "unit": "em" } },
    "h2": { "$value": { "value": -0.038, "unit": "em" } },
    "h3": { "$value": { "value": -0.028, "unit": "em" } },
    "lead": { "$value": { "value": -0.024, "unit": "em" } },
    "label": { "$value": { "value": 0.1, "unit": "em" }, "$description": "Mono labels open up rather than tighten." }
  },
  "leading": {
    "$type": "number",
    "display": { "$value": 0.9, "$description": "Below 1 — display lines physically interlock." },
    "h2": { "$value": 1.02 },
    "lead": { "$value": 1.18 },
    "body": { "$value": 1.6 },
    "prose": { "$value": 1.7, "$description": "Long-form case-study reading." }
  },
  "measure": {
    "$type": "dimension",
    "prose": { "$value": { "value": 62, "unit": "ch" }, "$description": "Non-negotiable on case studies." }
  },
  "space": {
    "$type": "dimension",
    "$description": "4px base.",
    "1": { "$value": { "value": 0.25, "unit": "rem" } },
    "2": { "$value": { "value": 0.5, "unit": "rem" } },
    "3": { "$value": { "value": 0.75, "unit": "rem" } },
    "4": { "$value": { "value": 1, "unit": "rem" } },
    "6": { "$value": { "value": 1.5, "unit": "rem" } },
    "8": { "$value": { "value": 2, "unit": "rem" } },
    "12": { "$value": { "value": 3, "unit": "rem" } },
    "16": { "$value": { "value": 4, "unit": "rem" } },
    "24": { "$value": { "value": 6, "unit": "rem" } },
    "32": { "$value": { "value": 8, "unit": "rem" } }
  },
  "radius": {
    "$type": "dimension",
    "$description": "Two only.",
    "base": { "$value": { "value": 6, "unit": "px" } },
    "pill": { "$value": { "value": 999, "unit": "px" } }
  },
  "duration": {
    "$type": "duration",
    "fast": { "$value": { "value": 180, "unit": "ms" } },
    "base": { "$value": { "value": 260, "unit": "ms" } },
    "slow": { "$value": { "value": 620, "unit": "ms" }, "$description": "Per-word reveal." }
  },
  "easing": {
    "$type": "cubicBezier",
    "brand": { "$value": [0.22, 1, 0.36, 1] }
  },
  "layout": {
    "$type": "dimension",
    "container": { "$value": { "value": 1240, "unit": "px" } },
    "gutter": { "$value": { "value": 1.5, "unit": "rem" } },
    "rhythm": { "$value": { "value": 9, "unit": "rem" }, "$extensions": { "css": "clamp(5rem, 3rem + 8vw, 9rem)" } }
  }
}
