/* manish-shetty.com
   One visual language with the portfolio films: white paper, navy ink, gold only for markers,
   Source Serif 4 for display, Schibsted Grotesk for everything else, and the films' calibration
   scale under the header (its gold marker follows the scroll, in CSS only). */

:root {
  --paper: #ffffff;
  --fog: #f4f6f9;
  --ink: #0b1f3a;
  --ink2: #46566d;
  --ink3: #6d7b8f;
  --rule: #dde3ea;
  --gold: #b08a3e;
  --gold-ink: #86672a;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --gut: clamp(20px, 4vw, 40px);
  --r-film: 14px;
  --r-ui: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--gold); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--gold-ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }
code { font-size: 0.92em; background: var(--fog); padding: 1px 5px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 50; border-radius: var(--r-ui); }
.skip:focus { left: 8px; }
.k { color: var(--ink3); font-weight: 600; }

/* ---------------------------------------------------------------- header and scale */
.bar { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.94); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 64px; }
.bar-name { font: 700 1.0625rem/1 var(--sans); letter-spacing: -0.01em; text-decoration: none; }
.bar nav ul { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); }
.bar nav a { text-decoration: none; font-weight: 500; color: var(--ink2); font-size: 0.97rem; }
.bar nav a:hover { color: var(--ink); }
.bar nav .bar-cv { color: var(--ink); border: 1.5px solid var(--ink); border-radius: 999px; padding: 7px 16px; font-weight: 600; }
.bar nav .bar-cv:hover { background: var(--ink); color: #fff; }

/* The films' calibration scale: minor ticks every 12px, major every 60px, and a gold marker. */
.scale {
  position: relative; height: 14px;
  background:
    repeating-linear-gradient(90deg, var(--ink3) 0 1px, transparent 1px 60px) left bottom / 100% 12px no-repeat,
    repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px 12px) left bottom / 100% 6px no-repeat;
  border-bottom: 1px solid var(--rule);
}
.scale-mark { position: absolute; bottom: 0; left: 0; width: 3px; height: 14px; background: var(--gold); border-radius: 2px 2px 0 0; }
@supports (animation-timeline: scroll()) {
  .scale-mark { animation: scale-run linear both; animation-timeline: scroll(root); }
  @keyframes scale-run { from { left: 0; } to { left: calc(100% - 3px); } }
}

/* ---------------------------------------------------------------- buttons */
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--rule); font-weight: 600; text-decoration: none; background: var(--paper); }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #142f55; color: #fff; }

/* ---------------------------------------------------------------- the film player */
.player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-film); overflow: hidden; background: var(--fog); box-shadow: 0 1px 0 var(--rule), 0 30px 60px -36px rgba(11, 31, 58, 0.45); }
.player video, .player iframe, .player img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; background: var(--paper); }
figcaption { display: flex; justify-content: space-between; gap: 16px; margin-top: 12px; font-size: 0.95rem; color: var(--ink2); }
.cap-t { font-weight: 600; color: var(--ink); }
.cap-l { color: var(--ink3); }
.cap-l::before { content: ""; display: inline-block; width: 2px; height: 0.9em; background: var(--gold); margin-right: 8px; vertical-align: -0.1em; }

/* ---------------------------------------------------------------- hero */
.hero { padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 7vw, 96px); }
.name { font: 600 clamp(3rem, 7.4vw, 6rem)/0.98 var(--serif); letter-spacing: -0.035em; font-optical-sizing: auto; }
.role { margin-top: 14px; color: var(--gold-ink); font-weight: 600; font-size: clamp(1.05rem, 1.4vw, 1.2rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); margin-top: clamp(28px, 4vw, 44px); align-items: start; }
.lede { font: 400 clamp(1.5rem, 2.3vw, 2.05rem)/1.28 var(--serif); letter-spacing: -0.008em; text-wrap: pretty; max-width: 30ch; }
.hero-more { color: var(--ink2); }
.where { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 18px 0 24px; font-size: 0.95rem; color: var(--ink2); }
.where li { display: flex; align-items: center; gap: 8px; }
.where li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.hero-film { margin: clamp(40px, 5vw, 64px) 0 0; }

/* ---------------------------------------------------------------- sections */
.sec { padding: clamp(56px, 8vw, 104px) 0; }
.sec-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.sec-head h2, .exp-grid h2 { font: 600 clamp(1.75rem, 3vw, 2.5rem)/1.12 var(--serif); letter-spacing: -0.015em; }
.sec-sub { margin-top: 14px; color: var(--ink2); font-size: 1.125rem; max-width: 62ch; }
.sys-more { margin-top: 18px; }
.sys-more a { font-weight: 600; }

/* ---------------------------------------------------------------- systems, one film each */
.sys { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 56px); align-items: start; padding: clamp(36px, 5vw, 56px) 0; border-top: 1px solid var(--rule); }
.sys:first-of-type { border-top: 0; padding-top: 0; }
.sys-what { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; font-size: 0.95rem; color: var(--ink2); font-weight: 500; }
.sys-len { color: var(--ink3); }
.sys-name { margin-top: 6px; font: 600 clamp(1.6rem, 2.4vw, 2.1rem)/1.1 var(--serif); letter-spacing: -0.015em; }
.sys-name a { text-decoration: none; }
.sys-name a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); }
.sys-line { margin-top: 12px; font-size: 1.0625rem; max-width: 52ch; }
.sys-built { margin-top: 18px; font-size: 0.95rem; color: var(--ink2); }
.sys-minor { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); background: var(--paper); border: 1.5px solid var(--rule); border-radius: var(--r-film); padding: clamp(24px, 3.5vw, 40px); margin-top: clamp(24px, 4vw, 40px); }
.sys-minor .sys-name { margin-top: 0; font-size: clamp(1.35rem, 2vw, 1.6rem); }

/* Figures: a gold tick, the value, then what it measures. */
.figs { display: grid; gap: 14px; margin-top: 22px; }
.fig { position: relative; padding-left: 16px; }
.fig::before { content: ""; position: absolute; left: 0; top: 0.32em; bottom: 0.2em; width: 2px; background: var(--gold); }
.fig-v { font: 600 1.45rem/1.15 var(--serif); letter-spacing: -0.01em; font-variant-numeric: lining-nums tabular-nums; }
.fig-q { font: 500 0.85rem/1 var(--sans); color: var(--ink3); letter-spacing: 0; }
.fig-l { margin-top: 2px; font-size: 0.93rem; color: var(--ink2); line-height: 1.45; }
.sys-minor .figs { margin-top: 0; align-self: center; }

/* ---------------------------------------------------------------- method */
.method { background: var(--fog); padding: clamp(56px, 8vw, 104px) 0; }
.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 5vw, 64px); counter-reset: rule; }
.rule { counter-increment: rule; display: grid; align-content: start; grid-template-columns: 2.4rem minmax(0, 1fr); column-gap: 4px; padding: 22px 0; border-top: 1px solid var(--rule); }
.rule::before { content: counter(rule); grid-row: span 2; font: 600 1.5rem/1.1 var(--serif); color: var(--gold-ink); }
.rule-t { font: 600 1.2rem/1.3 var(--serif); }
.rule-d { margin-top: 6px; color: var(--ink2); font-size: 0.98rem; }
.incident { margin-top: 32px; padding: 18px 22px; background: var(--paper); border-left: 3px solid var(--gold); border-radius: 0 var(--r-ui) var(--r-ui) 0; max-width: 760px; }
.incident .k { display: block; font-size: 0.85rem; margin-bottom: 4px; }

/* ---------------------------------------------------------------- experience */
.exp-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 6vw, 88px); }
.jobs { margin-top: 28px; }
.job { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 20px; padding: 20px 0; border-top: 1px solid var(--rule); }
.job-dates { font-size: 0.93rem; color: var(--ink3); font-variant-numeric: tabular-nums; padding-top: 2px; }
.job-role { font-weight: 650; }
.job-org + .job-lines { margin-top: 8px; }
.job-org { color: var(--ink2); font-size: 0.97rem; }
.job-lines { margin-top: 8px; display: grid; gap: 6px; }
.job-lines li { color: var(--ink2); font-size: 0.97rem; }
.skills { margin-top: 28px; display: grid; gap: 18px; }
.skills dt { font-weight: 650; }
.skills dd { margin-top: 4px; color: var(--ink2); font-size: 0.97rem; }
.h-gap { margin-top: 48px; }
.edu { margin-top: 20px; display: grid; gap: 14px; }

/* ---------------------------------------------------------------- footer */
.foot { border-top: 1px solid var(--rule); padding: clamp(48px, 7vw, 80px) 0 56px; }
.foot-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: end; }
.foot-h { font: 600 clamp(1.75rem, 3vw, 2.5rem)/1.1 var(--serif); letter-spacing: -0.015em; }
.foot-lead { margin-top: 10px; color: var(--ink2); }
.foot-links { display: grid; gap: 10px; justify-items: start; }
.foot-links a { font-weight: 600; }
.foot-mail { font: 600 clamp(1.25rem, 2.4vw, 1.9rem)/1.2 var(--serif); overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- case study */
.cs-head { padding: clamp(36px, 5vw, 64px) 0 clamp(24px, 3vw, 36px); }
.crumb a { font-weight: 600; font-size: 0.95rem; color: var(--ink2); }
.cs-title { margin-top: 18px; font: 600 clamp(2.25rem, 5vw, 3.75rem)/1.04 var(--serif); letter-spacing: -0.02em; }
.cs-sub { margin-top: 14px; font-size: clamp(1.125rem, 1.6vw, 1.35rem); color: var(--ink2); max-width: 58ch; }
.cs-film { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(28px, 4vw, 48px); align-items: start; }
.cs-film figure { margin: 0; }
.cs-meta { display: grid; gap: 18px; padding-top: 4px; }
.cs-meta dt { font-weight: 650; font-size: 0.93rem; }
.cs-meta dd { margin-top: 4px; color: var(--ink2); font-size: 0.97rem; }
.cs-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: clamp(32px, 5vw, 72px); padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(48px, 6vw, 80px); }
.cs-aside { position: sticky; top: 104px; align-self: start; }
.figs-stack { margin-top: 0; gap: 22px; }
.aside-h { font-weight: 650; margin-bottom: 12px; }
.cs-sys { display: grid; gap: 12px; }
.cs-sys a { font-weight: 600; }
.cs-sys span { display: block; font-size: 0.9rem; color: var(--ink2); }
.cs-sys .cs-sys-n { font-weight: 600; color: var(--ink); font-size: 1rem; }
.cs-main { max-width: 720px; }
.cs-main h2 { font: 600 clamp(1.5rem, 2.2vw, 1.85rem)/1.15 var(--serif); letter-spacing: -0.01em; }
.cs-sec { margin-top: 48px; }
.cs-sec p, .cs-sec ul, .cs-sec ol { margin-top: 14px; }
.cs-sec p { max-width: 68ch; }
.cs-sec li { position: relative; padding-left: 18px; margin-top: 10px; }
.cs-sec li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 7px; height: 2px; background: var(--gold); }
.cs-sec ol { counter-reset: item; }
.cs-sec ol > li { counter-increment: item; padding-left: 26px; }
.cs-sec ol > li::before { content: counter(item); width: auto; height: auto; background: none; top: 0; font-weight: 700; color: var(--gold-ink); }
.cs-sec li li { margin-top: 6px; }

/* How it works: a real sequence, so it is numbered, with the person's steps marked. */
.flow-intro { margin-top: 12px; color: var(--ink2); max-width: 62ch; }
.flow-list { margin-top: 24px; display: grid; gap: 0; counter-reset: none; }
.flow-step { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); column-gap: 14px; padding: 16px 0; border-top: 1px solid var(--rule); }
.flow-n { grid-row: span 3; width: 2rem; height: 2rem; border-radius: 50%; border: 1.5px solid var(--rule); display: grid; place-items: center; font-weight: 700; font-size: 0.9rem; color: var(--ink2); font-variant-numeric: tabular-nums; }
.flow-t { font-weight: 650; }
.flow-d { margin-top: 2px; color: var(--ink2); font-size: 0.98rem; }
.flow-person .flow-n { background: var(--ink); border-color: var(--ink); color: #fff; }
.flow-tag { margin-top: 8px; justify-self: start; font-size: 0.82rem; font-weight: 650; color: var(--gold-ink); padding-left: 12px; position: relative; }
.flow-tag::before { content: ""; position: absolute; left: 0; top: 0.35em; bottom: 0.3em; width: 2px; background: var(--gold); }

.screens { margin-top: 56px; }
.shot { margin: 24px 0 0; }
.shot img { border-radius: var(--r-ui); border: 1px solid var(--rule); }
.shot figcaption { display: block; font-size: 0.92rem; }

.cs-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-bottom: clamp(48px, 6vw, 80px); }
.cs-nav a { display: block; padding: 20px 22px; border: 1.5px solid var(--rule); border-radius: var(--r-ui); text-decoration: none; font: 600 1.15rem/1.3 var(--serif); }
.cs-nav a:hover { border-color: var(--ink); color: var(--ink); }
.cs-nav .k { display: block; font: 600 0.85rem/1.4 var(--sans); margin-bottom: 4px; }
.cs-next { text-align: right; }

/* ---------------------------------------------------------------- phone and tablet */
@media (max-width: 920px) {
  .hero-grid, .sys, .sys-minor, .exp-grid, .foot-in, .cs-film, .cs-body { grid-template-columns: minmax(0, 1fr); }
  .cs-aside { position: static; }
  .figs-stack { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .rules { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .bar nav li:not(:last-child) { display: none; }
  .job { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .cs-nav { grid-template-columns: minmax(0, 1fr); }
  .cs-next { text-align: left; }
  .actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* ---------------------------------------------------------------- print */
@media print {
  .bar, .scale, .player, .actions, .cs-nav, .skip { display: none !important; }
  body { font-size: 11pt; }
  .method { background: none; }
  .cs-aside { position: static; }
}
