/* =========================================================================
   Site rules — shared sizing, spacing, type and layout for every page.

   Tokens and base styles. Layout primitives (Center, Sidebar, Stack, Cover,
   Columns) live in layout.css.
   Units:
   - rem for text and fixed steps (1rem = 16px), so zoom scales them 1:1.
   - clamp() for the fluid frame: margins grow smoothly with the window
     between a minimum and a maximum, with no breakpoint jumps.
   - vh only for the left column, so it fits short windows.
   ========================================================================= */

:root {
  /* Tokens mirror the design system "Meghna Okhade Portfolio" (same names and values).
     Sizes are in rem: 1rem = 16px at the 1440px frame. */

  /* Colour */
  --paper: #ffffff;     /* page background */
  --ink: #030504;       /* headings, links, values, anything noticed first */
  --grey: #5c5c5c;      /* body copy, labels, captions */
  --media: #e8e8e8;     /* image fill and placeholders, Key insight card */
  --night: #030504;     /* password page and brush veil */
  --on-night: #fafafa;  /* everything on night */

  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
  --font-hand: 'Caveat', 'Bradley Hand', cursive;

  /* Type: Caveat for the name and password; Plus Jakarta Sans, quiet — small sizes, medium weight */
  --text-title: 2rem;        /* 32  project title, stat numbers */
  --text-intro: 1.375rem;    /* 22  project summary, pull quotes, big links */
  --text-heading: 1.5rem;    /* 24  section headings */
  --text-body: 1rem;         /* 16  body, links, values */
  --text-label: 0.875rem;    /* 14  labels, captions, eyebrows */
  --weight-strong: 500;      /* titles, headings, emphasis — never heavier */
  --leading-display: 0.76;
  --leading-title: 1.2;
  --leading-intro: 1.4;
  --leading-heading: 1.35;
  --leading-body: 1.6;
  --leading-link: 1.3;
  --leading-label: 1.5;
  --tracking-display: -0.06em;
  --tracking-title: -0.02em;
  --tracking-intro: -0.01em;

  /* Spacing — use only these steps */
  --space-2: 0.125rem;  /*   2  link to its underline */
  --space-4: 0.25rem;   /*   4  label to value */
  --space-8: 0.5rem;    /*   8  quote to attribution */
  --space-12: 0.75rem;  /*  12  between homepage menu links */
  --space-16: 1rem;     /*  16  heading to body, TOC links, image to caption */
  --space-24: 1.5rem;   /*  24  between thumbnails; gutter inside a module */
  --space-32: 2rem;     /*  32  before a quote or gallery */
  --space-48: 3rem;     /*  48  inside a module */
  --space-64: 4rem;     /*  64  left column to content */
  --space-96: 6rem;     /*  96  between modules */
  --space-128: 8rem;    /* 128  large breaks */

  /* Radius — the only one */
  --radius-card: 1rem;  /* 16  anything that stands on its own: images, videos, boxes */
  --radius-inner: 0.5rem;  /* 8  anything sitting inside a box */

  /* Fluid frame (Utopia-style: grows smoothly from a phone to a large monitor, never jumps).
     Side margins: 32 on a phone → ~88 at 1440 → 120 max. Top/bottom: the same, so the page
     has an even frame on all four sides (capped at 14% of the window height). */
  --gutter: clamp(2rem, 1rem + 5vw, 7.5rem);
  --frame-top: min(var(--gutter), 14vh);  /* top and bottom match the side margins, unless the window is very short */

  /* Height-aware sizes for the left column, so name + bio + menu fit short windows */
  --text-display: clamp(3rem, min(12vh, 16vw), 6rem);  /* name: 96 on big windows, down to 48 on short or narrow ones */
  --rail-gap: clamp(2rem, 7vh, 3.5rem);      /* name → bio → menu: 56 on tall windows, 32 minimum */

  /* Layout */
  --rail-width: 20.25rem;    /* 324  the left column on every page */
  --measure: 40rem;          /* 640  max width of body copy */
  --page-max: 120rem;        /* 1920 content stops growing past here; margins grow instead */
  --stroke-marker: 2.5px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
img { max-width: 100%; }

body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--ink);
  background: var(--paper);
}

/* The handwritten name, identical on every page so it lines up through the reveal */
.display-name {
  font-family: var(--font-hand);
  font-weight: 500;
  font-size: var(--text-display);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  padding-block-end: 0.2em;  /* Caveat's descenders hang below the tight line height; keep the gap after it honest */
}

/* Shared text styles from the design system */
.t-title { font-size: var(--text-title); line-height: var(--leading-title); font-weight: var(--weight-strong); letter-spacing: var(--tracking-title); }
.t-intro { font-size: var(--text-intro); line-height: var(--leading-intro); letter-spacing: var(--tracking-intro); }
.t-heading { font-size: var(--text-heading); line-height: var(--leading-heading); font-weight: var(--weight-strong); }
.t-body { font-size: var(--text-body); line-height: var(--leading-body); color: var(--grey); }
.t-label { font-size: var(--text-label); line-height: var(--leading-label); color: var(--grey); }

/* Marker link: the homepage menu link — the hand-drawn mark sits tight under the word, shown on the current one / hover */
.mk { position: relative; display: inline-block; width: fit-content; line-height: var(--leading-link); color: var(--ink); text-decoration: none; }
.mk .underline { position: absolute; left: 0; bottom: -0.125rem; width: 100%; height: auto; opacity: 0; transition: opacity .2s ease; pointer-events: none; }

/* Cursor: a small, slightly lopsided grey marker blob on every page (links too, instead of the hand) */
html, a, button, input, label { cursor: url('../assets/shared/cursor-blob.svg') 10 10, auto; }
