/* bhatia.page: Paper */

@font-face { font-family: "Besley"; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/besley-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Besley"; font-style: normal; font-weight: 900; font-display: swap; src: url("/assets/fonts/besley-latin-900-normal.woff2") format("woff2"); }
@font-face { font-family: "Overpass"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/overpass-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Overpass"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/overpass-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Overpass"; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/overpass-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Overpass Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/overpass-mono-latin-400-normal.woff2") format("woff2"); }

:root {
  --paper: #EAE6DC;
  --card: #F5F2EB;
  --frame-line: #D6D0C2;
  --rule: #CFC8B8;
  --ink: #172D33;
  --teal: #213E45;
  --teal-soft: #3E5C63;
  --butter: #F1DFAE;
  --mustard: #C79A3E;
  --red: #C3302A;
  --white: #FFFFFF;

  --serif: "Besley", Georgia, serif;
  --sans: "Overpass", "Helvetica Neue", Arial, sans-serif;
  --mono: "Overpass Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --gutter: 40px;
  --section: 96px;

  --fs-hook: 104px;
  --fs-h2: 56px;
  --fs-project: 40px;
  --fs-chapter: 24px;
  --fs-quote: 32px;
  --fs-intro: 26px;
  --fs-range: 21px;
  --fs-body: 18px;
  --fs-small: 15px;
  --fs-time: 14px;
}

@media (max-width: 759px) {
  :root {
    --gutter: 16px;
    --section: 64px;
    --fs-hook: 46px;
    --fs-h2: 36px;
    --fs-project: 26px;
    --fs-chapter: 20px;
    --fs-quote: 22px;
    --fs-intro: 19px;
    --fs-range: 16px;
    --fs-body: 16px;
    --fs-small: 13px;
    --fs-time: 13px;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ol, ul, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper); font-weight: 800;
  padding: 12px 16px; border-radius: 6px; text-decoration: none;
}
.skip:focus { top: 8px; }

.serif { font-family: var(--serif); }
.link { font-weight: 800; text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
.link-row { display: inline-flex; align-items: center; min-height: 44px; }
.muted { color: var(--teal-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 14px 22px; border-radius: 6px;
  font-family: var(--sans); font-size: 17px; font-weight: 800; line-height: 1;
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.btn svg { flex: none; }
.btn-red { background: var(--red); border-color: var(--red); color: var(--white); padding: 16px 24px; }
.btn-red:hover { background: #A92823; border-color: #A92823; }
.btn-line { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--card); }
.btn-ink { background: var(--ink); border-color: var(--ink); color: var(--paper); padding: 10px 18px; min-height: 44px; font-size: 16px; }
.btn-ink:hover { background: #0C1D22; border-color: #0C1D22; }

@media (prefers-reduced-motion: no-preference) {
  .btn-red:hover .handset, .btn-red:focus-visible .handset { animation: ring 400ms var(--ease); }
}
@keyframes ring {
  0%, 100% { transform: rotate(0); }
  12.5%, 62.5% { transform: rotate(12deg); }
  37.5%, 87.5% { transform: rotate(-12deg); }
}

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 40; border-bottom: 1px solid var(--rule); }
.site-header .container { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 72px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; font-weight: 800; font-size: 18px; justify-self: start; }
.brand img { width: 42px; height: 42px; border-radius: 50%; }
.nav { display: flex; gap: 4px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font-weight: 600; text-decoration: none; border-radius: 6px; }
.nav a:hover { background: var(--card); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
.line-open { justify-self: end; display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-small); font-weight: 600; white-space: nowrap; }
.line-open time { font-family: var(--mono); font-weight: 400; font-size: var(--fs-time); color: var(--teal-soft); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .line-open .dot { animation: pulse 1200ms var(--ease) 600ms 1; }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(195, 48, 42, 0.5); }
  100% { box-shadow: 0 0 0 10px rgba(195, 48, 42, 0); }
}

/* Phone menu: a <details> sheet, so it works without JavaScript. */
.menu { display: none; justify-self: end; }
.menu > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: 44px;
  padding: 0 16px; border: 2px solid var(--ink); border-radius: 6px; font-weight: 800;
}
.menu > summary::-webkit-details-marker { display: none; }
.sheet {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--paper); border-bottom: 1px solid var(--rule);
  padding: 8px var(--gutter) 24px;
}
.sheet a:not(.btn) { display: flex; align-items: center; min-height: 52px; font-size: 20px; font-weight: 800; text-decoration: none; border-bottom: 1px solid var(--rule); }
.sheet .btn { width: 100%; margin-top: 20px; }
.sheet .line-open { margin-top: 16px; }

@media (max-width: 759px) {
  .site-header .container { grid-template-columns: 1fr auto; min-height: 64px; }
  .nav-top, .site-header .container > .line-open { display: none; }
  .menu { display: block; }
}

/* ---------- Phone bottom bar ---------- */
.bottombar { display: none; }
@media (max-width: 759px) {
  .bottombar {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--paper); border-top: 1px solid var(--rule);
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px));
    transition: transform 200ms var(--ease);
  }
  .bottombar .btn { width: 100%; }
  html.js .bottombar:not(.is-shown) { transform: translateY(110%); visibility: hidden; }
  .site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Hero ---------- */
.hero .container { display: grid; grid-template-columns: 52fr 48fr; gap: 64px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.print { position: relative; }
.print img {
  width: 100%; border-radius: 6px;
  box-shadow: 0 0 0 10px var(--card), 0 0 0 11px var(--frame-line);
}
.print-tag {
  position: absolute; left: 0; bottom: 24px; transform: translateX(-10px);
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--butter);
  font-size: var(--fs-small); font-weight: 800; padding: 10px 14px; border-radius: 0 6px 6px 0;
}
.hero-copy { display: grid; gap: 20px; }
.hook { font-family: var(--serif); font-weight: 900; font-size: var(--fs-hook); line-height: 0.92; letter-spacing: -0.02em; }
.intro { font-size: var(--fs-intro); font-weight: 800; line-height: 1.2; }
.range { font-size: var(--fs-range); max-width: 32ch; line-height: 1.45; }
.open-line { font-size: var(--fs-range); font-weight: 600; color: var(--teal-soft); max-width: 32ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-built { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .hero .print { animation: settle 600ms var(--ease) both; }
  .hero .hero-copy { animation: appear 600ms var(--ease) 120ms both; }
}
@keyframes settle { from { opacity: 0; transform: scale(1.02); } to { opacity: 1; transform: none; } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 759px) {
  .hero .container { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 0 0 24px; }
  .hero .print { margin: 0; }
  .hero .print img { width: 100%; height: 330px; object-fit: cover; object-position: 30% 30%; border-radius: 0; box-shadow: none; }
  .print-tag { bottom: 12px; transform: none; font-size: 13px; padding: 8px 12px; }
  .hero-copy { padding: 0 var(--gutter); gap: 10px; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; margin-top: 6px; }
  .hero-actions .btn { min-height: 52px; padding: 0 10px; }
  .hero-built { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
  .hero-built .logos { display: flex; }
  .hero-built .logos svg { width: 56px; height: 56px; margin-right: -8px; }
  .hero-built a { margin-left: 16px; }
}

/* ---------- Sections ---------- */
.section { padding: var(--section) 0 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; margin-bottom: 32px; }
.h2 { font-family: var(--serif); font-weight: 800; font-size: var(--fs-h2); line-height: 1.02; letter-spacing: -0.01em; }
.sub { margin-top: 12px; max-width: 58ch; color: var(--teal-soft); }

/* ---------- Project rows ---------- */
.rows > li { border-top: 1px solid var(--rule); }
.rows > li:last-child { border-bottom: 1px solid var(--rule); }
.row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 32px; align-items: center; padding: 28px 0; }
.badge { width: 120px; height: 120px; transition: transform 150ms var(--ease); }
.row:hover .badge, .row:focus-within .badge { transform: translateY(-2px); }
.ptitle { font-family: var(--serif); font-weight: 800; font-size: var(--fs-project); line-height: 1.1; }
.ptitle a { text-decoration: none; }
.ptitle a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.12em; }
.ptitle .what { color: var(--teal-soft); }
.why { margin-top: 8px; max-width: 60ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { font-size: 13px; font-weight: 600; line-height: 1; padding: 6px 10px; border: 1px solid var(--teal-soft); border-radius: 999px; color: var(--teal-soft); }
.row-action { justify-self: end; }
@media (max-width: 759px) {
  .row { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 24px 0; }
  .badge { width: 64px; height: 64px; }
  .row-action { justify-self: start; }
}

/* ---------- Chapters ---------- */
.chapters { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.chapter { background: var(--card); border-radius: 10px; padding: 20px; display: grid; align-content: start; gap: 12px; }
.chapter h3 { font-family: var(--serif); font-weight: 800; font-size: var(--fs-chapter); line-height: 1.15; }
.chapter p { font-size: 15px; line-height: 1.5; }
.chapter.is-now { background: var(--red); color: var(--white); }
.marks { display: flex; gap: 6px; }
.mark {
  width: 36px; height: 36px; border-radius: 6px; background: var(--ink); color: var(--butter);
  display: grid; place-items: center; font-size: 13px; font-weight: 800; letter-spacing: 0.02em;
}
.mark.is-current { background: var(--red); color: var(--white); }
.is-now .mark { background: var(--white); color: var(--red); }

/* ---------- Recommendation ---------- */
.quote { margin-top: 48px; padding: 40px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.quote blockquote p { font-family: var(--serif); font-weight: 800; font-size: var(--fs-quote); line-height: 1.25; max-width: 40ch; }
.quote .qmark { font-family: var(--serif); font-weight: 900; font-size: 96px; line-height: 0.6; color: var(--red); display: block; height: 40px; }
.quote figcaption { margin-top: 20px; display: flex; align-items: center; gap: 12px; font-size: var(--fs-small); }

/* ---------- Other lines ---------- */
.lines { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.line-card {
  display: grid; grid-template-columns: 28px 1fr; gap: 4px 14px; align-content: start;
  background: var(--card); border-radius: 10px; padding: 24px; text-decoration: none; min-height: 44px;
  transition: background-color 150ms var(--ease);
}
.line-card:hover { background: #FBF9F4; }
.line-card svg { grid-row: span 3; width: 28px; height: 28px; }
.line-card .lc-name { font-weight: 800; font-size: 20px; line-height: 1.2; }
.line-card .lc-handle { font-family: var(--mono); font-size: var(--fs-time); color: var(--teal-soft); }
.line-card.is-wide { grid-column: 1 / -1; }
.strip { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 14px; }
.strip img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
@media (max-width: 759px) { .strip { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Call panel ---------- */
.call { padding-top: var(--section); scroll-margin-top: 16px; }
.call-panel {
  background: var(--butter); border-radius: 14px; padding: 48px;
  display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 32px; align-items: center;
}
.call-panel img { width: 112px; height: 112px; border-radius: 50%; }
.call-panel .h2 { font-size: clamp(30px, 3.4vw, 44px); }
.call-panel .call-sub { margin-top: 12px; max-width: 54ch; }
.call-actions { display: grid; gap: 12px; justify-items: center; }
@media (max-width: 759px) {
  .call-panel { grid-template-columns: minmax(0, 1fr); padding: 28px 20px; gap: 20px; }
  .call-panel img { width: 88px; height: 88px; }
  .call-actions { justify-items: stretch; }
  .call-actions .btn { width: 100%; }
}

/* ---------- Footer ---------- */
.site-footer { padding: 32px 0 48px; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 32px; font-size: var(--fs-small); color: var(--teal-soft); }
.foot-row nav { display: flex; gap: 20px; }
.foot-row nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; color: var(--ink); }

/* ---------- Page heads ---------- */
.page-head { padding-top: 56px; }
.page-head .sub { font-size: var(--fs-range); }

/* ---------- Project page ---------- */
.project-head { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 32px; align-items: center; padding-top: 56px; }
.project-head .badge { width: 160px; height: 160px; }
.project-head h1 { font-family: var(--serif); font-weight: 800; font-size: var(--fs-h2); line-height: 1.05; }
.project-head h1 .what { color: var(--teal-soft); }
.facts { margin-top: 48px; display: grid; gap: 32px; max-width: 70ch; }
.facts h2 { font-family: var(--serif); font-weight: 800; font-size: var(--fs-chapter); line-height: 1.2; margin-bottom: 6px; }
.try { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.note { font-size: var(--fs-small); color: var(--teal-soft); }
.shot { margin-top: 56px; }
.shot img { border-radius: 6px; box-shadow: 0 0 0 10px var(--card), 0 0 0 11px var(--frame-line); width: calc(100% - 22px); margin: 11px; }
.back { margin-top: 40px; }
@media (max-width: 759px) {
  .project-head { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 32px; }
  .project-head .badge { width: 96px; height: 96px; }
}

/* ---------- Career page ---------- */
.banner { background: var(--butter); }
.banner .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 14px; padding-bottom: 14px; font-weight: 800; }
.career-head .container { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; padding-top: 56px; }
.career-head .print img { aspect-ratio: 1; object-fit: cover; object-position: 22% 50%; }
@media (max-width: 759px) { .career-head .container { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 32px; } .career-head .print { margin: 11px; } }

.chapter-full { padding: 48px 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 40px; }
.chapter-full:first-child { border-top: 2px solid var(--ink); }
.chapter-full h2 { font-family: var(--serif); font-weight: 800; font-size: clamp(28px, 3vw, 40px); line-height: 1.1; }
.chapter-full .numbers { margin-top: 16px; display: grid; gap: 8px; }
.chapter-full .numbers li { font-weight: 800; padding-left: 16px; border-left: 3px solid var(--mustard); }
.roles { display: grid; gap: 28px; }
.role { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; }
.role .mark { width: 44px; height: 44px; font-size: 15px; }
.role h3 { font-size: 20px; font-weight: 800; line-height: 1.3; }
.role .meta { font-size: var(--fs-small); color: var(--teal-soft); }
.role .one { margin-top: 6px; max-width: 60ch; }
.chapter-full.is-now h2 { color: var(--red); }
@media (max-width: 759px) { .chapter-full { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 36px 0; } }

.lists { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.lists ul { margin-top: 16px; display: grid; gap: 8px; }
@media (max-width: 759px) { .lists { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 404 ---------- */
.wrong { padding-top: 96px; }
.wrong .hook { max-width: 12ch; }
.wrong p { margin-top: 20px; font-size: var(--fs-range); }

/* ---------- Page transitions ---------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-group(root) { animation-duration: 250ms; animation-timing-function: var(--ease); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0s !important; }
}

/* ---------- Small helpers (no inline styles: the CSP forbids them) ---------- */
.rec-photo { width: 44px; height: 44px; border-radius: 50%; }
.quote-link { margin-top: 20px; }
.is-wide-li { grid-column: 1 / -1; }
.section.tight { padding-top: 40px; }
.hook-page { font-size: clamp(46px, 7vw, 96px); }
.sub-lg { font-size: var(--fs-range); }
.chapter-full h2 { margin-top: 14px; }
.quote-in { margin-top: 8px; }
.h2-sm { font-size: clamp(28px, 3vw, 40px); }
.back-home { margin-top: 16px; }
