/*
 * Daniel Azar - portfolio tokens
 * Grid from mchiu.co.uk, visual language from Apple (HIG + apple.com),
 * brand carried over from the Wix site: black, the cyan circle, the photo.
 *
 * Primitive → Semantic → Component. Dark is the default (the brand is
 * black); [data-theme="light"] overrides the semantic layer only.
 */

:root {
  /* ── Primitive: colour (Apple system greys) ── */
  --p-black:      #000000;
  --p-gray-950:   #161617;   /* apple.com dark tile */
  --p-gray-900:   #1d1d1f;   /* apple.com primary text / raised dark tile */
  --p-gray-800:   #2c2c2e;
  --p-gray-600:   #6e6e73;
  --p-gray-500:   #86868b;
  --p-gray-300:   #d2d2d7;
  --p-gray-100:   #f5f5f7;
  --p-gray-50:    #fbfbfd;
  --p-white:      #ffffff;

  /* ── Primitive: brand (sampled from the hero photo's circle) ── */
  --p-cyan-400:   #01b7ff;
  --p-cyan-600:   #0077c2;   /* text-safe on white */

  /* Apple Intelligence glow - only on AI surfaces */
  --gradient-ai: conic-gradient(from var(--ai-angle, 0deg), #ff9f0a, #ff375f, #bf5af2, #0a84ff, #64d2ff, #ff9f0a);

  /* ── Primitive: type (SF Pro on Apple devices, Inter elsewhere) ── */
  --font-text:    -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Helvetica Neue', sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Helvetica Neue', sans-serif;

  /* apple.com marketing scale (size / leading / tracking) */
  --type-eyebrow:    600 0.8125rem/1.23 var(--font-text);     /* 13 */
  --type-caption:    400 0.875rem/1.43 var(--font-text);      /* 14 */
  --type-body:       400 1.0625rem/1.47 var(--font-text);     /* 17 */
  --type-tile-sm:    600 1.3125rem/1.19 var(--font-display);  /* 21 - 1×1 */
  --type-tile:       600 1.5rem/1.17 var(--font-display);     /* 24 - 1×2, 2×1 */
  --type-tile-lg:    600 2rem/1.125 var(--font-display);      /* 32 - 2×2 */
  --type-headline:   600 3rem/1.08 var(--font-display);       /* 48 */
  --tracking-text:    -0.016em;
  --tracking-display: -0.022em;

  /* ── Primitive: space · radius · motion ── */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 28px; --space-7: 48px; --space-8: 80px;

  --radius-tile:  28px;      /* apple.com large tiles */
  --radius-sm:    12px;
  --radius-pill:  980px;     /* apple.com's pill value */

  --ease-apple:   cubic-bezier(.28, .11, .32, 1);   /* apple.com transitions */
  --ease-spring:  cubic-bezier(.32, .72, 0, 1);     /* iOS sheet / spring */
  --ease-bounce:  cubic-bezier(.34, 1.18, .64, 1);  /* swatches, full stops, presses */
  --ease-lens:    cubic-bezier(.34, 1.4, .64, 1);   /* the tab lens alone keeps the big overshoot */

  /* ── Semantic: dark (default) ── */
  --color-bg:            var(--p-black);
  --color-tile:          var(--p-gray-950);
  --color-tile-raised:   var(--p-gray-900);
  --color-text:          var(--p-gray-100);
  --color-text-2:        var(--p-gray-500);   /* the grey half of a two-tone headline */
  --color-text-3:        var(--p-gray-600);
  --color-separator:     rgba(255, 255, 255, .1);
  --color-accent:        var(--p-cyan-400);
  --color-fill:          rgba(120, 120, 128, .24);   /* iOS tertiary fill */
  --color-fill-hover:    rgba(120, 120, 128, .36);
  --shadow-hover:        0 0 0 1px rgba(255, 255, 255, .08), 0 20px 50px rgba(0, 0, 0, .6);

  /* Liquid Glass (iOS 26) */
  --glass-bg:            rgba(30, 30, 32, .72);
  --color-tab:           rgba(245, 245, 247, .62);
  --glass-edge:          rgba(255, 255, 255, .14);
  --glass-highlight:     rgba(255, 255, 255, .22);
  --glass-shadow:        0 8px 32px rgba(0, 0, 0, .35);
  --glass-lens:          rgba(255, 255, 255, .14);

  /* ── Component ── */
  --grid-cell: 252px;
  --grid-cols: 4;
  --tile-pad:  var(--space-6);

  /* Projects sit in quiet frames: more air between projects than inside
     one, and the frame's corner follows the cubes' (28 + 10 = 38). */
  --group-gap:   28px;
  --group-pad:   10px;
  --inner-gap:   10px;
  --group-bg:    rgba(255, 255, 255, .035);
  --group-edge:  rgba(255, 255, 255, .08);
}

[data-theme="light"] {
  --color-bg:            var(--p-gray-100);
  --color-tile:          var(--p-white);
  --color-tile-raised:   var(--p-gray-50);
  --color-text:          var(--p-gray-900);
  --color-text-2:        var(--p-gray-600);
  --color-text-3:        var(--p-gray-500);
  --color-separator:     rgba(0, 0, 0, .08);
  --color-accent:        var(--p-cyan-600);
  --color-fill:          rgba(120, 120, 128, .12);
  --color-fill-hover:    rgba(120, 120, 128, .2);
  --shadow-hover:        0 20px 50px rgba(0, 0, 0, .12);

  --group-bg:            rgba(0, 0, 0, .03);
  --group-edge:          rgba(0, 0, 0, .06);

  --glass-bg:            rgba(255, 255, 255, .72);
  --color-tab:           rgba(29, 29, 31, .58);
  --glass-edge:          rgba(255, 255, 255, .7);
  --glass-highlight:     rgba(255, 255, 255, .9);
  --glass-shadow:        0 8px 32px rgba(0, 0, 0, .1);
  --glass-lens:          rgba(255, 255, 255, .95);
}
