/* sooryaparameswaran.com */

:root {
  --paper:   #F7F5F0;
  --paper-2: #F1EEE7;
  --ink:     #16181D;
  --ink-2:   #3A3E46;
  --muted:   #5A5F68;
  --rule:    #E1DCD1;
  --accent:  #9A3B24;
  --accent-soft: rgba(154, 59, 36, 0.10);

  --serif: "Newsreader", ui-serif, Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1120px;
  --gut: clamp(20px, 5vw, 56px);
}

/* Dark palette, defined once and applied from two directions: the system
   preference (unless the reader has explicitly chosen light) and an explicit
   choice of dark. Light stays the base definition on :root above. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:   #101215;
    --paper-2: #15181C;
    --ink:     #ECEAE5;
    --ink-2:   #C8CCD2;
    --muted:   #979EA7;
    --rule:    #262A31;
    --accent:  #F0876A;
    --accent-soft: rgba(240, 135, 106, 0.13);
  }
}
:root[data-theme="dark"] {
  --paper:   #101215;
  --paper-2: #15181C;
  --ink:     #ECEAE5;
  --ink-2:   #C8CCD2;
  --muted:   #979EA7;
  --rule:    #262A31;
  --accent:  #F0876A;
  --accent-soft: rgba(240, 135, 106, 0.13);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Anchored sections must land below the fixed bar, not under it. */
section[id] { scroll-margin-top: 74px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

a { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  z-index: 100;
}
.skip:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Top bar */

/* The bar is present from the first paint so its controls are always
   reachable; it only earns a background and a rule once the page scrolls
   under it. */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .3s ease, border-color .3s ease;
}
.topbar.show {
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--rule);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: clamp(10px, 3vw, 28px);
  height: 58px;
}

.topbar nav { margin-left: auto; }

.mark {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: .04em;
  text-decoration: none;
  color: var(--ink);
  opacity: .55;
  transition: opacity .3s ease;
}
.topbar.show .mark { opacity: 1; }
.mark:hover { opacity: 1; }

.topbar nav {
  display: flex;
  gap: clamp(11px, 2.4vw, 28px);
}
.topbar nav a {
  position: relative;
  font-size: clamp(13px, 3.4vw, 14px);
  letter-spacing: .01em;
  color: var(--muted);
  text-decoration: none;
  padding-block: 4px;
  transition: color .2s;
}
.topbar nav a:hover { color: var(--ink); }

/* The section currently under the reader gets an underline, set by main.js. */
.topbar nav a[aria-current="true"] { color: var(--ink); }
.topbar nav a[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1.5px;
  background: var(--accent);
}

/* Theme switch */
.theme-btn {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.theme-btn:hover { color: var(--ink); border-color: var(--ink); }
.theme-btn svg {
  width: 16px; height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Show the icon for the theme the button switches TO. */
.theme-btn .i-sun  { display: none; }
.theme-btn .i-moon { display: block; }
:root[data-theme="dark"] .theme-btn .i-sun  { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .i-sun  { display: block; }
  :root:not([data-theme="light"]) .theme-btn .i-moon { display: none; }
}
/* No JS means no working switch, so don't show a dead control. */
html:not(.js) .theme-btn { display: none; }

/* Hero */

.hero {
  padding-top: clamp(92px, 13vw, 168px);
  padding-bottom: clamp(48px, 7vw, 92px);
}

.eyebrow {
  margin: 0 0 clamp(20px, 3vw, 34px);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.1rem, 11.5vw, 8.2rem);
  line-height: .93;
  letter-spacing: -0.028em;
  margin: 0 0 clamp(26px, 4vw, 44px);
}

.lede {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.5vw, 1.62rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 33ch;
  margin: 0 0 clamp(30px, 4vw, 44px);
}
@media (min-width: 760px) { .lede { max-width: 46ch; } }

.lede strong { color: var(--ink); font-weight: 500; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  transition: border-color .2s, background .2s, color .2s, transform .2s;
}
.btn:hover { border-color: var(--ink); transform: translateY(-1px); }

/* Text takes the page background so the button stays legible in both themes:
   near-white on deep brick in light, near-black on soft coral in dark. */
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
  font-weight: 600;
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, var(--ink));
  border-color: color-mix(in srgb, var(--accent) 88%, var(--ink));
  color: var(--paper);
}

/* Stats */

.stats {
  border-block: 1px solid var(--rule);
  background: var(--paper-2);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  padding-block: 0;
}
@media (min-width: 700px)  { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .stats-grid { grid-template-columns: repeat(6, 1fr); } }

.stat {
  padding: clamp(22px, 3.6vw, 34px) 18px;
  padding-left: 18px;
  border-left: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* The first cell of each row sits flush with the page gutter and carries no
   divider; every other cell gets the rule plus matching inset. The nth-child
   pairs below re-assert the rule at the previous breakpoint's column count
   before clearing it at the new one. */
.stat:nth-child(2n + 1) { border-left: none; padding-left: 0; }
.stat:nth-child(n + 3)  { border-top: 1px solid var(--rule); }

@media (min-width: 700px) {
  .stat:nth-child(2n + 1) { border-left: 1px solid var(--rule); padding-left: 18px; }
  .stat:nth-child(3n + 1) { border-left: none; padding-left: 0; }
  .stat:nth-child(3)      { border-top: none; }
  .stat:nth-child(n + 4)  { border-top: 1px solid var(--rule); }
}

@media (min-width: 1000px) {
  .stat:nth-child(3n + 1) { border-left: 1px solid var(--rule); padding-left: 18px; }
  .stat:nth-child(6n + 1) { border-left: none; padding-left: 0; }
  .stat                   { border-top: none; }
}

.stat .n {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 3.4vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--accent);
}
.stat .l {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 24ch;
}

/* Bands */

.band { padding-block: clamp(64px, 9vw, 120px); }
.band.alt { background: var(--paper-2); border-block: 1px solid var(--rule); }

.grid-2 { display: grid; gap: clamp(28px, 5vw, 56px); }
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: 210px minmax(0, 1fr); gap: clamp(40px, 6vw, 92px); }
  .col-label { position: sticky; top: 92px; align-self: start; }
}

.col-label h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
}

.col-body > p { margin: 0 0 1.05em; max-width: 68ch; color: var(--ink-2); }
.col-body > p:last-child { margin-bottom: 0; }
.col-body strong { color: var(--ink); font-weight: 600; }

.col-body p.big {
  font-family: var(--serif);
  font-size: clamp(1.32rem, 2.6vw, 1.78rem);
  line-height: 1.42;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin-bottom: 1.1em;
  max-width: 30ch;
}

/* Experience: company > roles */

.company {
  padding-block: clamp(30px, 4vw, 44px);
  border-top: 1px solid var(--rule);
}
.company:first-child { border-top: none; padding-top: 0; }

.company-head { margin-bottom: 22px; }

.company-head h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.45rem, 2.8vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.014em;
  margin: 0 0 7px;
}

.company-meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 13.5px;
  color: var(--muted);
}
.company-meta .span {
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}
/* Separator between the two halves. It rides in the flex gap, so it simply
   disappears when the halves wrap onto their own lines. */
.company-meta .where + .span::before {
  content: "·";
  margin-right: 14px;
  color: var(--muted);
  opacity: .55;
}

.company.feature .company-head h3 { color: var(--accent); }

/* A company with more than one role gets a spine linking them. */
.company .role + .role { margin-top: 26px; }

.role { position: relative; padding-left: 18px; }
.role::before {
  content: "";
  position: absolute;
  left: 0; top: 6px; bottom: 4px;
  width: 1.5px;
  background: var(--rule);
}

.role h4 {
  margin: 0 0 3px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15.5px;
  line-height: 1.35;
  letter-spacing: -0.004em;
  color: var(--ink);
}

.role .when {
  margin: 0 0 13px;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.role h4 + ul { margin-top: 13px; }

.role .note {
  margin: 0 0 15px;
  padding: 10px 15px;
  background: var(--accent-soft);
  border-left: 2px solid var(--accent);
  font-size: 13.8px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 60ch;
}

.role ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
  max-width: 66ch;
}
.role li {
  position: relative;
  padding-left: 19px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.role li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .75;
}
.role li strong { color: var(--ink); font-weight: 600; }

.role .disclaimer {
  margin: 15px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 60ch;
}

@media (max-width: 560px) {
  .role { padding-left: 14px; }
  .role li { font-size: 15px; }
}

/* Education */

.degree {
  padding-block: clamp(26px, 3.5vw, 36px);
  border-top: 1px solid var(--rule);
}
.degree:first-child { border-top: none; padding-top: 0; }

.degree h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.4vw, 1.55rem);
  line-height: 1.25;
  letter-spacing: -0.012em;
  margin: 0 0 6px;
}
.degree .org { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.degree .when {
  margin: 4px 0 0;
  font-size: 12.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.degree .coursework {
  margin: 13px 0 0;
  font-size: 14.6px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 66ch;
}

/* Cards */

.cards {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}
@media (min-width: 680px) { .cards { grid-template-columns: 1fr 1fr; } }

.card {
  background: var(--paper);
  padding: clamp(22px, 3vw, 32px);
}
.card h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.24rem;
  letter-spacing: -0.01em;
}
.card p {
  margin: 0;
  font-size: 14.8px;
  line-height: 1.62;
  color: var(--muted);
}

/* Extras */

.extras {
  margin-top: clamp(30px, 4vw, 44px);
  padding-top: clamp(26px, 3.5vw, 36px);
  border-top: 1px solid var(--rule);
}
.extras-h {
  margin: 0 0 16px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
}
.tickers {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
  max-width: 68ch;
}
.tickers li {
  position: relative;
  padding-left: 20px;
  font-size: 15.2px;
  line-height: 1.6;
  color: var(--ink-2);
}
/* Same accent dot the experience bullets use, so the two lists read as one
   system rather than two different markers. */
.tickers li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .75;
}

/* Contact */

.contact {
  padding-block: clamp(76px, 10vw, 132px);
  border-top: 1px solid var(--rule);
}

.contact h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 8vw, 5rem);
  line-height: 1;
  letter-spacing: -0.028em;
  margin: 0 0 clamp(18px, 2.4vw, 26px);
}

.contact > .wrap > p {
  max-width: 52ch;
  font-size: 17px;
  color: var(--ink-2);
  margin: 0 0 clamp(30px, 4vw, 44px);
}

.contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
  max-width: 620px;
}
.contact-list li {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--rule);
}
.contact-list span {
  flex: 0 0 96px;
  font-size: 12px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-list a {
  font-family: var(--serif);
  font-size: clamp(1.08rem, 2.2vw, 1.3rem);
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: border-color .2s, color .2s;
  word-break: break-word;
}
.contact-list a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* Email gate */

.contact-list li.row-gate { align-items: flex-start; }
.row-gate > span { padding-top: 3px; }

.gate { flex: 1 1 auto; min-width: 0; }

.gate-ask label {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 9px;
  max-width: 46ch;
}

.gate-field { display: flex; flex-wrap: wrap; gap: 8px; }

.gate-field input {
  flex: 1 1 190px;
  min-width: 0;
  padding: 9px 13px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 7px;
  transition: border-color .2s;
}
.gate-field input::placeholder { color: var(--muted); opacity: .75; }
.gate-field input:focus { border-color: var(--accent); }
.gate-field input[aria-invalid="true"] { border-color: var(--accent); }

.gate-field button {
  flex: 0 0 auto;
  padding: 9px 18px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--paper);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 7px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.gate-field button:hover {
  background: color-mix(in srgb, var(--accent) 88%, var(--ink));
  border-color: color-mix(in srgb, var(--accent) 88%, var(--ink));
}

.gate-msg {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--accent);
  min-height: 0;
}
.gate-msg:empty { display: none; }

.gate-out { margin: 0; }
.gate-out:focus { outline: none; }
.gate-out a {
  font-family: var(--serif);
  font-size: clamp(1.08rem, 2.2vw, 1.3rem);
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: border-color .2s, color .2s;
  word-break: break-word;
}
.gate-out a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* Only one of the three states is ever shown. Without JS the challenge cannot
   run, so the form is replaced by a pointer to LinkedIn rather than a control
   that does nothing. */
.gate-nojs {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 46ch;
}
.js .gate-nojs { display: none; }
html:not(.js) .gate-ask { display: none; }

/* Footer */

.foot {
  border-top: 1px solid var(--rule);
  background: var(--paper-2);
  padding-block: 26px;
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}
.foot p { margin: 0; font-size: 13px; color: var(--muted); }
.foot a { text-decoration: none; color: var(--muted); transition: color .2s; }
.foot a:hover { color: var(--ink); }

/* Reveal */

/* Content is visible by default. The `js` class is set by an inline script in
   <head>, so a reader without JS (or before it runs) never sees a blank page. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);
}
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
  .topbar { transition: none; }
}

/* Print */

@media print {
  .topbar, .cta, .skip, .foot a { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .band, .contact, .hero { padding-block: 18px; }
  .role { break-inside: avoid; }
  .reveal { opacity: 1; transform: none; }
}
