/* rahilsetia.com · "Noir" design: warm black in the style of harvey.ai, Newsreader serif headlines, Geist text.
   Crisp 4-6px corners (no pills), hairline rules, restrained heading sizes. Dark only, with a print style. */

:root {
  --bg: #0f0e0d;
  --card: #1a1917;
  --card-hover: #201e1b;
  --line: rgba(250, 250, 249, .09);
  --line-2: rgba(250, 250, 249, .18);
  --ink: #fafaf9;
  --text: #d6d3cd;
  --soft: #a8a59e;
  --muted: #8a8780;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Geist", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --max: 1200px;
  --gut: clamp(20px, 5vw, 48px);
  --sec: clamp(72px, 9vw, 112px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; background: var(--bg); }
body {
  margin: 0;
  background-color: var(--bg);
  /* a very faint grain, so the black has some depth */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--text);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 400; text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
p, figure, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-color: rgba(250, 250, 249, .45);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color .15s, color .15s;
}
a:hover { text-decoration-color: var(--ink); }
b { font-weight: 500; color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
::selection { background: #3d3a35; color: #fff; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 14px; background: var(--ink); color: var(--bg); }
.skip:focus { left: 8px; }

/* Header */
.bar-wrap {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 14, 13, .96);
  border-bottom: 1px solid var(--line);
}
@supports ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  .bar-wrap { background: rgba(15, 14, 13, .8); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2); }
}
.bar {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  max-width: var(--max); height: 64px; margin: 0 auto; padding: 0 var(--gut);
}
.bar-name { padding: 12px 0; font: 400 22px/1 var(--serif); letter-spacing: -.015em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { padding: 8px 0; font: 500 14px/1 var(--sans); color: var(--soft); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]:not(.nav-cta) { box-shadow: inset 0 -1px 0 var(--ink); }
.nav .nav-cta { padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--ink); transition: background .15s, color .15s, border-color .15s; }
.nav .nav-cta:hover, .nav .nav-cta[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.menu-btn { display: none; }

@media (max-width: 759px) {
  .bar { height: 60px; }
  .bar-name { font-size: 21px; }
  .js .menu-btn {
    display: inline-flex; align-items: center; gap: 10px;
    height: 44px; padding: 0 14px;
    background: none; border: 1px solid var(--line-2); border-radius: 4px;
    font: 500 14px/1 var(--sans); color: var(--ink); cursor: pointer;
  }
  .menu-icon { position: relative; width: 14px; height: 1.5px; background: currentColor; box-shadow: 0 -4.5px 0 currentColor, 0 4.5px 0 currentColor; }
  .menu-open .menu-icon { background: transparent; box-shadow: none; }
  .menu-open .menu-icon::before, .menu-open .menu-icon::after { content: ""; position: absolute; left: 0; top: 0; width: 14px; height: 1.5px; background: currentColor; }
  .menu-open .menu-icon::before { transform: rotate(45deg); }
  .menu-open .menu-icon::after { transform: rotate(-45deg); }
  .js .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    max-height: calc(100vh - 60px); max-height: calc(100dvh - 60px);
    overflow-y: auto; overscroll-behavior: contain;
    padding: 6px var(--gut) 22px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 50px rgba(0, 0, 0, .55);
  }
  .js .menu-open .nav { display: flex; }
  .js .nav a, .js .nav .nav-cta {
    padding: 16px 0;
    border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
    background: none; box-shadow: none;
    font: 400 26px/1.15 var(--serif); letter-spacing: -.015em; color: var(--ink);
  }
  .js .nav a:last-child { border-bottom: 0; }
  .js .nav a[aria-current="page"] { font-style: italic; font-weight: 300; color: var(--ink); background: none; box-shadow: none; }
  html:not(.js) .bar { height: auto; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
  html:not(.js) .nav { flex-wrap: wrap; gap: 10px 18px; }
}

/* Shared type */
.label { display: flex; align-items: center; gap: 12px; font: 500 14px/1.4 var(--sans); color: var(--muted); }
.lead { max-width: 34em; margin-top: 20px; font-size: clamp(17px, 1.6vw, 19px); line-height: 1.65; color: var(--soft); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; padding: 0 22px;
  border: 1px solid transparent; border-radius: 4px;
  font: 500 15px/1 var(--sans); text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-light { background: var(--ink); color: var(--bg); }
.btn-light:hover { background: #e4e1db; }
.btn-ghost { border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }

/* Home: hero */
.hero { position: relative; padding-top: clamp(20px, 4vw, 48px); }
.hero-grid { position: relative; display: grid; }
.portrait {
  width: 116px; margin: 0 0 28px;
  overflow: hidden; border-radius: 4px;
  border: 1px solid var(--line-2);
  background: #4b4b51;
}
.portrait img { width: 100%; }
.hero-copy { position: relative; padding-bottom: clamp(44px, 6vw, 72px); }
.hero h1 { margin-top: 16px; font: 400 clamp(56px, 9vw, 112px)/.95 var(--serif); letter-spacing: -.035em; white-space: nowrap; }
.hero-sub { max-width: 24em; margin-top: 20px; font: 400 clamp(21px, 2.3vw, 28px)/1.3 var(--serif); letter-spacing: -.012em; color: var(--text); text-wrap: balance; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
/* Phones and tablets: the "In-house counsel · Mumbai" label sits beside the photo, so the name,
   buttons and first figure come up without shrinking anything. */
@media (max-width: 899px) {
  .hero-grid { grid-template-columns: 112px minmax(0, 1fr); column-gap: 18px; }
  .hero-copy { display: contents; }
  .portrait { grid-column: 1; grid-row: 1; width: 112px; margin: 0; }
  .hero-copy .label { grid-column: 2; grid-row: 1; align-self: end; flex-direction: column; align-items: flex-start; gap: 10px; padding-bottom: 2px; }
  .hero h1, .hero-sub, .hero .lead, .hero .actions { grid-column: 1 / -1; }
  .hero h1 { margin-top: 26px; }
  .hero .actions { margin-bottom: 44px; } /* stands in for .hero-copy's bottom padding, which display: contents drops */
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 72px; align-items: center; }
  .portrait { order: 2; width: 100%; margin: 0 0 32px; }
  .hero-copy { order: 1; align-self: center; padding: 8px 0 64px; }
}

.stats { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stats div { padding: 24px 14px 26px 0; border-bottom: 1px solid var(--line); }
/* Three stats: on phones the first (2,000+) takes the full top row, the other two share the next. */
.stats div:first-child { grid-column: 1 / -1; }
.stats div:nth-child(3) { padding-left: 18px; border-left: 1px solid var(--line); }
.stats dt { font: 300 clamp(32px, 5vw, 58px)/1 var(--serif); letter-spacing: -.035em; color: var(--ink); white-space: nowrap; }
.stats dd { max-width: 17em; margin-top: 12px; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
@media (min-width: 900px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
  .stats div:first-child { grid-column: auto; }
  .stats div { padding: 32px 24px 34px 0; border-bottom: 0; }
  .stats div:nth-child(n + 2) { padding-left: 28px; border-left: 1px solid var(--line); }
}

/* Sections */
.sec { padding-top: var(--sec); }
.sec-first { padding-top: clamp(44px, 5.5vw, 72px); }
.sec-last, .sec-contact { padding-bottom: clamp(80px, 10vw, 128px); }
.sec-h { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: clamp(28px, 3.6vw, 44px); }
.sec-h h2 { margin-top: 14px; font: 400 clamp(32px, 4vw, 52px)/1.05 var(--serif); letter-spacing: -.03em; }
.more { display: inline-block; padding: 15px 0; font: 500 14.5px/1 var(--sans); color: var(--soft); text-decoration: none; white-space: nowrap; }
.more::after { content: "\2192"; content: "\2192" / ""; margin-left: .4em; } /* second value hides the arrow from screen readers */
.more:hover { color: var(--ink); }
.sec-intro { max-width: 40em; margin: -10px 0 36px; font-size: 18px; color: var(--soft); }

/* What I work on */
.areas { display: grid; border-top: 1px solid var(--line); }
.areas li { padding: 24px 0 28px; border-bottom: 1px solid var(--line); }
.areas h3 { font: 400 clamp(22px, 2.1vw, 25px)/1.25 var(--serif); letter-spacing: -.015em; }
.areas p { max-width: 30em; margin-top: 8px; font-size: 16px; line-height: 1.6; color: var(--soft); }
@media (min-width: 700px) and (max-width: 999px) {
  .areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .areas li { padding-right: 28px; }
  .areas li:nth-child(even) { padding-left: 28px; border-left: 1px solid var(--line); }
}
@media (min-width: 1000px) {
  .areas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .areas li { padding: 30px 32px 34px 0; }
  .areas li:not(:nth-child(3n + 1)) { padding-left: 32px; border-left: 1px solid var(--line); }
}

/* Experience */
.xp, .roles { border-top: 1px solid var(--line); }
.xp > li, .role { display: grid; gap: 10px 48px; padding: 30px 0 34px; border-bottom: 1px solid var(--line); }
@media (min-width: 860px) { .xp > li, .role { grid-template-columns: 220px minmax(0, 1fr); } }
.xp-when { padding-top: 6px; font: 500 14px/1.6 var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; }
.xp h3, .role h3 { font: 400 clamp(23px, 2.3vw, 28px)/1.2 var(--serif); letter-spacing: -.02em; }
.xp-org { margin-top: 8px; font: 500 15.5px/1.5 var(--sans); color: var(--text); }
.xp > li p:not(.xp-when):not(.xp-org) { max-width: 38em; margin-top: 12px; color: var(--soft); }
.role .role-h-2 { margin-top: 6px; font-size: clamp(19px, 1.9vw, 21px); color: var(--text); }
.role-sub { display: inline-block; margin-left: 8px; font: 400 14.5px/1.4 var(--sans); letter-spacing: 0; color: var(--muted); }
.role ul { display: grid; gap: 12px; margin-top: 18px; max-width: 40em; }
.role li { position: relative; padding-left: 22px; color: var(--soft); }
.role li::before { content: ""; position: absolute; left: 2px; top: .68em; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); } /* a dot, not a dash: he doesn't want dashes on the site */

/* Tool cards (home) */
.cards { display: grid; gap: 16px; }
/* four tools: two by two from 760px (was an inline <style> in the 18 Oct calculator deploy) */
@media (min-width: 760px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
.card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 28px 26px 26px;
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  transition: background .2s, border-color .2s;
}
.card:hover { background: var(--card-hover); border-color: var(--line-2); }
.card-tag { display: block; font: 500 13.5px/1.4 var(--sans); color: var(--muted); }
.card-t { margin-top: 18px; font: 400 clamp(28px, 2.6vw, 34px)/1.08 var(--serif); letter-spacing: -.025em; }
/* the title link covers the whole card, so a click anywhere opens the tool */
.card-link { color: inherit; text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: 6px; }
.card-link:focus-visible { outline: none; }
.card-link:focus-visible::after { outline: 2px solid var(--ink); outline-offset: 2px; }
.card-d { margin-top: 12px; font-size: 16px; line-height: 1.6; color: var(--soft); }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 66px; margin-top: auto; padding-top: 22px; } /* 22px + a 44px row, so every card's "Open …" lines up */
.card-go { font: 500 15px/1 var(--sans); color: var(--ink); }
.card-go::after { content: "\2192"; display: inline-block; margin-left: .4em; transition: transform .2s; }
.card:hover .card-go::after { transform: translateX(4px); }
/* social links sit above the stretched card link so they stay clickable on their own */
.card-social { position: relative; z-index: 1; display: flex; gap: 0; margin-right: -12px; }
.card-social a { display: inline-block; min-width: 44px; padding: 15px 12px; text-align: center; font: 500 14px/1 var(--sans); color: var(--soft); text-decoration: none; }
.card-social a:hover { color: var(--ink); text-decoration: underline; }

/* Writing rows */
.rows { border-top: 1px solid var(--line); }
.rows li { border-bottom: 1px solid var(--line); }
.rows a { display: grid; gap: 6px 32px; padding: 22px 0 24px; color: inherit; text-decoration: none; }
@media (min-width: 720px) { .rows a { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; } }
.row-t { font: 400 clamp(20px, 2.1vw, 25px)/1.3 var(--serif); letter-spacing: -.015em; color: var(--ink); text-wrap: balance; }
.row-d { font-size: 14px; color: var(--muted); white-space: nowrap; }
.rows a:hover .row-t { text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--line-2); text-underline-offset: 6px; }

/* Contact */
.mail {
  display: inline-block; margin-top: 20px; padding-bottom: 6px;
  border-bottom: 1px solid var(--line-2);
  font: 400 clamp(26px, 4.4vw, 56px)/1.1 var(--serif); letter-spacing: -.02em;
  color: var(--ink); text-decoration: none;
  transition: border-color .2s;
}
.mail:hover { border-bottom-color: var(--ink); }
.contact-note { max-width: 40em; margin-top: 28px; font-size: 18px; color: var(--soft); }
.contact-links { display: flex; gap: 28px; margin-top: 10px; }
.contact-links a { display: inline-block; min-width: 44px; padding: 12px 0; font: 500 15px/1 var(--sans); text-decoration: none; }
.contact-links a:hover { text-decoration: underline; }
.contact-more { margin-top: 36px; }

/* Inner page heading */
.page-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(36px, 4.5vw, 56px); border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 15em; margin-top: 18px; font: 400 clamp(42px, 6.2vw, 80px)/1 var(--serif); letter-spacing: -.035em; }
.page-hero .lead { margin-top: 24px; }

/* Prose */
.prose { max-width: 42em; color: var(--soft); }
.prose p + p { margin-top: 1.1em; }
.prose-lg { font: 300 clamp(20px, 2vw, 23px)/1.55 var(--serif); letter-spacing: -.005em; color: var(--text); }
.prose-lg p + p { margin-top: .9em; }
.prose-lg .recruiters { margin-top: 1.6em; font: 400 17px/1.6 var(--sans); letter-spacing: 0; color: var(--soft); }

/* About */
.about { display: grid; gap: 28px; }
.about-photo {
  width: min(52vw, 220px);
  overflow: hidden; border-radius: 4px;
  border: 1px solid var(--line-2);
  background: #4b4b51;
}
.about-photo img { width: 100%; }
/* Phones: a smaller photo floats beside the text, so his words start on the first screen,
   and role dates go on their own line instead of breaking the job title. */
@media (max-width: 899px) {
  .about { display: block; }
  .about::after { content: ""; display: table; clear: both; }
  .about-photo { float: right; width: 112px; margin: 6px 0 12px 18px; }
  .role-sub { display: block; margin: 2px 0 10px; } /* space below, so each date groups with the title above it */
}
@media (min-width: 900px) {
  .about { grid-template-columns: 300px minmax(0, 1fr); gap: 72px; align-items: start; }
  .about-photo { position: sticky; top: 96px; width: auto; }
}
.two { display: grid; gap: 64px; }
@media (min-width: 900px) { .two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 72px; } }
.two .sec-h h2 { font-size: clamp(28px, 3.2vw, 40px); }
.list { border-top: 1px solid var(--line); }
.list li { padding: 16px 0 17px; border-bottom: 1px solid var(--line); color: var(--soft); }

/* Publications and work in progress */
.pubs { border-top: 1px solid var(--line); }
.pubs li { padding: 24px 0 26px; border-bottom: 1px solid var(--line); }
.pub-t { font: 400 clamp(20px, 2.1vw, 24px)/1.35 var(--serif); letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.pub-j { margin-top: 8px; font-size: 15px; color: var(--muted); }
.pub-j i { font: italic 300 16.5px/1 var(--serif); color: var(--soft); }
.notes { display: grid; gap: 36px 48px; }
@media (min-width: 900px) { .notes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.note-card { padding-top: 26px; border-top: 1px solid var(--line); }
.note-card h3 { margin-top: 12px; font: 400 clamp(23px, 2.3vw, 28px)/1.2 var(--serif); letter-spacing: -.02em; }
.note-card p:not(.card-tag) { margin-top: 12px; color: var(--soft); }
.ask { max-width: 42em; margin-top: 36px; color: var(--soft); }

/* Tools page */
.feature { display: grid; gap: 32px; margin-bottom: clamp(56px, 8vw, 96px); padding-bottom: clamp(56px, 8vw, 96px); border-bottom: 1px solid var(--line); }
.feature:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
@media (min-width: 900px) { .feature { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 72px; align-items: center; } }
.feature h2 { margin-top: 14px; font: 400 clamp(36px, 4.2vw, 54px)/1.02 var(--serif); letter-spacing: -.03em; }
.feature-text p:not(.label) { max-width: 34em; margin-top: 16px; font-size: 17px; color: var(--soft); }
.feature-text .btn { margin-top: 28px; }
.feature-img { display: block; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 6px; transition: border-color .2s; }
.feature-img:hover { border-color: var(--line-2); }
.feature-img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 0; }

/* Footer */
.foot { border-top: 1px solid var(--line); color: var(--soft); font-size: 15px; }
.foot-in { max-width: var(--max); margin: 0 auto; padding: 40px var(--gut) 36px; }
.foot-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.foot-name { font: 400 22px/1.1 var(--serif); letter-spacing: -.015em; color: var(--ink); }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 24px; }
.foot-links a { display: inline-block; min-width: 44px; padding: 10px 0; color: var(--soft); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.foot-note { max-width: 58em; margin-top: 22px; font-size: 13.5px; line-height: 1.65; color: var(--muted); }
.foot-copy { margin-top: 12px; font-size: 13.5px; color: var(--muted); }

/* Print: dark text on white, no navigation */
@media print {
  :root { color-scheme: light; --bg: #fff; --card: #fff; --card-hover: #fff; --ink: #000; --text: #222; --soft: #333; --muted: #555; --line: #ccc; --line-2: #999; }
  html, body { background: #fff; }
  .bar-wrap, .skip, .menu-btn, .actions, .more, .foot-links, .card-go { display: none !important; }
  .about-photo { position: static; max-width: 160px; }
  .portrait { max-width: 160px; }
  a { text-decoration-color: #999; }
}
