/* Portfolio polish layer · 2026-11-14
   Drop-in after style.css. Keeps the portfolio palette (paper, ink, mint, lavender, peach)
   and DM Sans; adds a type scale, surfaces with depth instead of borders, a quiet motion
   system (reveal on scroll, hover lift, count-up), and consistent focus states.
   Everything animated is off under prefers-reduced-motion. */

:root {
  --ink: #15171B; --ink-2: #34353A; --muted: #686D76; --line: #E6E4E2;
  --paper: #FBF8F2; --white: #FFFFFF;
  --mint: #EEF4EF; --lav: #F2EFF7; --peach: #F7F3EC; --blue: #EFF3F5; --rose: #F4EEF2;
  --accent: #202126;            /* buttons, numbers */
  --accent-soft: #DEDDE2;       /* hairlines on accent surfaces */
  --shadow-1: 0 1px 2px rgba(21,23,27,.05), 0 8px 24px -16px rgba(21,23,27,.18);
  --shadow-2: 0 2px 4px rgba(21,23,27,.06), 0 24px 48px -24px rgba(21,23,27,.28);
  --r-lg: 22px; --r-md: 16px; --r-sm: 10px;
  --ease-out: cubic-bezier(.2,.7,.2,1);
  --dur: 560ms;
  /* type scale (fluid) */
  --fs-hero: clamp(40px, 6vw, 72px);
  --fs-h2: clamp(28px, 3.4vw, 40px);
  --fs-h3: clamp(18px, 1.6vw, 22px);
  --fs-body: clamp(16px, 1.15vw, 18px);
  --fs-small: 13px;
  --lh-tight: 1.05; --lh-body: 1.6;
}

html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }   /* the hero light bleeds past the edges on purpose; never a horizontal scroll */
body { background: var(--paper); color: var(--ink); font-family: "DM Sans", -apple-system, "Segoe UI", sans-serif; font-size: var(--fs-body); line-height: var(--lh-body); -webkit-font-smoothing: antialiased; }

/* ---------- type ---------- */
h1, .hero h1 { font-size: var(--fs-hero); line-height: var(--lh-tight); letter-spacing: -0.025em; font-weight: 800; margin: 0 0 .25em; }
h2, .section-title { font-size: var(--fs-h2); line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; margin: 0 0 .35em; }
h3 { font-size: var(--fs-h3); line-height: 1.25; font-weight: 700; margin: 0 0 .3em; }
.eyebrow, .assistant-overline, .assistant-answer-label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.section-sub, .lead { color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }

/* big numbers (hero stats, JIOS counters) */
.stat { display: grid; gap: 4px; }
.stat b { font-size: clamp(28px, 3.6vw, 44px); line-height: 1; letter-spacing: -0.03em; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
.stat span { font-size: var(--fs-small); color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px; margin: 28px 0 8px; }

/* ---------- surfaces ---------- */
.card, .skill-card, .project-card, .action-card, .assistant-answer-card, .panel {
  background: var(--white); border: 0; border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.card.tint-mint { background: var(--mint); } .card.tint-lav { background: var(--lav); }
.card.tint-peach { background: var(--peach); } .card.tint-blue { background: var(--blue); }
@media (hover: hover) {
  a.card:hover, .click-card:hover, .project-card:hover, .action-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
}
.hairline { border-top: 1px solid var(--line); }

/* ---------- buttons & links ---------- */
.btn, .button { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid var(--line); background: var(--white); color: var(--ink); transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), background 220ms; }
.btn.primary, .button.primary { background: var(--accent); color: var(--white); border-color: var(--accent); }
@media (hover: hover) { .btn:hover, .button:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); } }
.text-link { position: relative; text-decoration: none; font-weight: 600; color: inherit; }
/* layout safety on small screens: grid children may shrink, media never overflows */
*, *::before, *::after { box-sizing: border-box; }
img, svg, video { max-width: 100%; height: auto; }
.hero-grid > *, .case-study > *, .stats > * { min-width: 0; }
h1, h2, h3, p { overflow-wrap: anywhere; }
.text-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 280ms var(--ease-out); }
.text-link:hover::after { transform: scaleX(1); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

/* ---------- chips ---------- */
.chips span, .chip { display: inline-block; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--mint); color: var(--ink-2); margin: 0 6px 6px 0; }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; padding: clamp(48px, 8vw, 96px) 0 40px; }
.hero::before { /* one soft, slow light behind the hero; no image */
  content: ""; position: absolute; inset: -20% -10% auto; height: 70%; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 60% at 70% 30%, rgba(238,244,239,.9), transparent 70%), radial-gradient(50% 50% at 20% 70%, rgba(242,239,247,.9), transparent 70%);
  filter: blur(40px); animation: hero-drift 18s ease-in-out infinite alternate;
}
@keyframes hero-drift { from { transform: translate3d(0,0,0); } to { transform: translate3d(2%, 3%, 0); } }
.hero-photo img { border-radius: var(--r-lg); box-shadow: var(--shadow-2); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 80ms; } .reveal[data-delay="2"] { transition-delay: 160ms; } .reveal[data-delay="3"] { transition-delay: 240ms; }
/* safety net: if JS never runs, everything is visible */
html:not(.js) .reveal { opacity: 1; transform: none; }

/* ---------- JIOS case-study block ---------- */
.case-study { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 40px; border-radius: var(--r-lg); background: var(--white); box-shadow: var(--shadow-1); }
.case-study .shot { border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-2); background: var(--blue); aspect-ratio: 16 / 10; }
.case-study .shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* a case-study visual is shown whole: max-height + cover was cutting the top
   and bottom off the taller diagrams and screenshots. */
.project-visual img { max-height: none; object-fit: contain; }
.project-visual figcaption { font-size: 12px; color: #686D76; padding: 10px 14px; border-top: 1px solid #E6E4E2; background: #fff; }
@media (max-width: 820px) { .case-study { grid-template-columns: 1fr; padding: 24px; } .stats { gap: 16px; } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero::before { animation: none; }
  .card, .btn, .button, .text-link::after { transition: none; }
}
