/* ============================================================
   Krutik Poojara — theme styles
   Design system translated from NewDesign (responsive).
   ============================================================ */

/* ---- Self-hosted fonts ---- */
@font-face{
  font-family:'Source Serif 4';
  src:url('../fonts/SourceSerif4-Variable.ttf') format('truetype-variations');
  font-weight:200 900; font-style:normal; font-display:swap;
}
@font-face{
  font-family:'Source Serif 4';
  src:url('../fonts/SourceSerif4-Italic-Variable.ttf') format('truetype-variations');
  font-weight:200 900; font-style:italic; font-display:swap;
}
@font-face{
  font-family:'IBM Plex Mono';
  src:url('../fonts/IBMPlexMono-Regular.ttf') format('truetype');
  font-weight:400; font-style:normal; font-display:swap;
}
@font-face{
  font-family:'IBM Plex Mono';
  src:url('../fonts/IBMPlexMono-Medium.ttf') format('truetype');
  font-weight:500; font-style:normal; font-display:swap;
}

/* ---- Tokens ---- */
:root{
  --navy:#0F1F3D; --ink:#111111; --gray:#4D4D4D; --red:#B83A1B;
  --white:#FFFFFF; --rule:#E6E6E6; --surface:#F2F2F2; --highlight:#F1E2A6;
  --foot-text:#C9D2E3; --foot-dim:#9AA8C2;
  --serif:'Source Serif 4',Georgia,Cambria,serif;
  --sans:'Helvetica Neue',Helvetica,Arial,sans-serif;
  --mono:'IBM Plex Mono',ui-monospace,Menlo,monospace;
  --page:1100px; --read:680px; --gutter:40px;
}

/* ---- Reset / base ---- */
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0; background:var(--white); color:var(--ink);
  font-family:var(--serif); font-optical-sizing:auto;
  font-size:20px; line-height:32px; -webkit-font-smoothing:antialiased;
}
img{max-width:100%; height:auto}
::selection{background:var(--highlight)}
a{color:var(--ink); text-decoration:none}
a:hover{color:var(--red)}
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible{
  outline:2px solid var(--red); outline-offset:3px;
}
.sans{font-family:var(--sans)}
.site{min-height:100vh; display:flex; flex-direction:column}
.wrap{max-width:var(--page); width:100%; margin:0 auto; padding:0 var(--gutter)}
.flex1{flex:1}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---- Header / nav ---- */
.site-header{padding-top:28px}
.site-header__inner{
  display:flex; justify-content:space-between; align-items:center;
  flex-wrap:wrap; gap:16px; padding-bottom:16px; border-bottom:1px solid var(--rule);
}
.brand{display:inline-flex; line-height:0}
.brand img{height:64px; width:auto; display:block}
.nav{
  display:flex; gap:28px; flex-wrap:wrap;
  font-family:var(--sans); font-size:15px; font-weight:500; color:var(--gray);
}
.nav-list{list-style:none; margin:0; padding:0; display:flex; gap:28px; flex-wrap:wrap; align-items:center}
.nav-list li{list-style:none; margin:0}
.nav a{color:var(--gray)}
.nav a:hover{color:var(--red)}
.nav a.current{color:var(--ink); border-bottom:2px dashed var(--red); padding-bottom:3px}
.nav .current-menu-item > a,.nav .current_page_item > a{color:var(--ink); border-bottom:2px dashed var(--red); padding-bottom:3px}

/* Hamburger toggle + slide-in menu (hidden on desktop) */
.nav-toggle{display:none; position:relative; width:44px; height:44px; padding:0; margin:-6px -8px -6px 0; background:none; border:none; cursor:pointer; color:var(--ink)}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after{content:""; position:absolute; left:11px; width:22px; height:2px; background:currentColor; transition:transform .25s ease, opacity .2s ease}
.nav-toggle__bars{top:21px}
.nav-toggle__bars::before{top:-7px}
.nav-toggle__bars::after{top:7px}
.nav-close{display:none; position:absolute; top:20px; right:24px; width:44px; height:44px; background:none; border:none; font-size:34px; line-height:1; color:var(--ink); cursor:pointer}
.nav__brand{display:none}
.nav-backdrop{display:none}

/* ---- Shared type helpers ---- */
.kicker{font-family:var(--sans); font-size:13px; letter-spacing:.06em; text-transform:uppercase; color:var(--gray)}
.kicker--red{color:var(--red)}
.meta{font-family:var(--sans); font-size:14px; line-height:20px; color:var(--gray)}
.tlink{text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:3px; color:var(--gray)}
.tlink:hover{color:var(--red)}
.elink{font-family:var(--sans)}
.elink:hover{color:var(--red); text-decoration:underline; text-decoration-style:dashed;
  text-decoration-color:var(--red); text-decoration-thickness:1.5px; text-underline-offset:6px}
.arrow-link{font-family:var(--sans); font-size:15px; font-weight:500; color:var(--red);
  border-bottom:2px dashed var(--red); padding-bottom:2px; display:inline-block}
.arrow-link:hover{color:var(--red)}

/* ---- Page header (Part N / title / italic sub) ---- */
.page-head{padding-top:64px}
.page-head h1{margin:8px 0 0; font-family:var(--sans); font-size:28px; line-height:36px; font-weight:700; letter-spacing:-.011em}
.page-head__sub{margin:8px 0 0; font-style:italic; font-size:18px; line-height:28px; color:var(--gray)}

/* ---- Home: lead story ---- */
.lead-top{padding-top:20px; display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:12px}
.lead-top__tag{font-style:italic; font-size:17px; color:var(--gray)}
.lead{
  padding:28px 0 48px; display:flex; flex-wrap:wrap; gap:48px; align-items:center;
  border-top:1px solid var(--rule); margin-top:16px;
}
.lead__media{flex:1 1 480px; max-width:600px; display:block}
.lead__media img, .lead__media svg{width:100%; height:auto; display:block; border:1px solid var(--rule)}
.lead__body{flex:1 1 380px; min-width:0}
.lead__title{margin:14px 0 0; font-family:var(--sans); font-size:42px; line-height:52px; font-weight:700; letter-spacing:-.011em}
.lead__dek{margin:16px 0 0; font-size:20px; line-height:32px}
.upcoming{display:flex; align-items:baseline; gap:20px; flex-wrap:wrap;
  border-top:1px dashed var(--red); border-bottom:1px solid var(--rule); padding:14px 0}

/* ---- Section (home) ---- */
.section{padding:40px 0 8px}
.section__head{display:flex; justify-content:space-between; align-items:baseline; margin-bottom:16px; gap:16px}
.section__head h2{margin:0; font-family:var(--sans); font-size:24px; line-height:30px; font-weight:700}
.section__head h2 .rn{font-weight:400; color:var(--gray)}
.section__more{font-family:var(--sans); font-size:15px; font-weight:500}

/* ---- Entry ledger (home + blog) ---- */
.layout{display:flex; flex-wrap:wrap; gap:48px; padding-top:40px}
.layout__main{flex:999 1 560px; min-width:0}
.entry{display:flex; flex-wrap:wrap; column-gap:32px; row-gap:8px; padding:24px 0; border-top:1px solid var(--rule)}
.entry--last{border-bottom:1px solid var(--rule)}
.entry__head{flex:1 0 100%; display:flex; gap:14px; align-items:baseline}
.entry__no{font-family:var(--sans); font-size:13px; letter-spacing:.06em; color:var(--gray); white-space:nowrap}
.entry__date{font-family:var(--sans); font-size:14px; line-height:20px; color:var(--gray)}
.entry__body{flex:999 1 340px; min-width:0}
.entry__title{font-family:var(--sans); font-size:20px; line-height:28px; font-weight:600; display:inline-block}
.entry__excerpt{margin:6px 0 8px; font-size:16px; line-height:24px; color:var(--gray)}
.entry__thumb{margin:0; flex:1 1 170px; max-width:200px; min-width:150px}
.entry__thumb img, .entry__thumb svg{width:100%; height:auto; display:block; border:1px solid var(--rule); aspect-ratio:200/125; object-fit:cover}
.ledger-foot{padding-top:24px; display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; font-family:var(--sans); font-size:15px; font-weight:500}
.ledger-foot span{color:var(--gray)}

/* ---- Topic landing intro ---- */
.topic-intro{padding:28px 0 8px; max-width:var(--read)}
.topic-intro p{margin:0 0 20px; font-size:20px; line-height:32px; letter-spacing:-.003em}
.topic-intro p:first-child{font-size:22px; line-height:34px}
.topic-intro a{text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:3px}
@media (max-width:820px){ .topic-intro p{font-size:18px; line-height:28px} .topic-intro p:first-child{font-size:19px; line-height:30px} }

/* ---- Filter sidebar ---- */
.filters{flex:1 1 180px; max-width:200px; padding-top:24px}
.filters__title{font-family:var(--sans); font-size:13px; letter-spacing:.06em; text-transform:uppercase; color:var(--gray); border-top:1px solid var(--rule); padding-top:12px}
.filters ul{list-style:none; margin:12px 0 0; padding:0; display:flex; flex-direction:column; gap:10px; font-family:var(--sans); font-size:15px; font-weight:500}
.filters a{color:var(--gray)}
.filters a.active{color:var(--red); border-bottom:2px dashed var(--red); padding-bottom:2px}

/* ---- Article ---- */
.progress{position:fixed; top:0; left:0; height:2px; width:100%; z-index:50; background:transparent}
.progress__bar{height:2px; width:0; background:var(--red)}
.article{width:100%; flex:1}
.article__inner{max-width:var(--read); margin:0 auto; padding-top:72px; position:relative}
.article__meta{font-family:var(--sans); font-size:14px; line-height:20px; color:var(--gray)}
.article__no{font-family:var(--sans); font-size:13px; letter-spacing:.06em}
.article__title{margin:16px 0 0; font-family:var(--sans); font-size:42px; line-height:52px; font-weight:700; letter-spacing:-.011em}
.article__dek{margin:16px 0 0; font-family:var(--sans); font-size:22px; line-height:30px; font-weight:400; color:var(--gray)}
.article__rule{margin-top:32px; border-top:1px dashed var(--red); width:64px}
.article__hero{margin:40px 0 0}
.article__hero img{width:100%; height:auto; display:block; border:1px solid var(--rule)}

.article-body{padding-top:40px; font-size:20px; line-height:32px; letter-spacing:-.003em}
.article-body p{margin:0 0 32px}
.article-body a{text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:3px}
.article-body h2{margin:48px 0 12px; font-family:var(--sans); font-size:24px; line-height:30px; font-weight:700}
.article-body h3{margin:40px 0 10px; font-family:var(--sans); font-size:20px; line-height:28px; font-weight:600}
.article-body ul,.article-body ol{margin:0 0 32px; padding-left:24px}
.article-body li{margin-bottom:8px}
.article-body img{height:auto}
.article-body figure{margin:40px 0}
.article-body figure img{border:1px solid var(--rule)}
.article-body figcaption{margin-top:8px; font-family:var(--sans); font-size:14px; line-height:20px; color:var(--gray)}
.article-body blockquote{margin:40px 0; padding:4px 0 4px 24px; border-left:2px solid var(--red); font-style:italic; font-size:24px; line-height:36px}
.article-body code{font-family:var(--mono); font-size:.85em; background:var(--surface); padding:2px 4px}
.article-body pre{margin:0 0 32px; background:var(--surface); padding:20px; overflow:auto; font-family:var(--mono); font-size:15px; line-height:24px}
.article-body pre code{background:none; padding:0; font-size:inherit}
.article-body table{width:100%; border-collapse:collapse; margin:0 0 32px; font-size:16px; line-height:24px}
.article-body th,.article-body td{border:1px solid var(--rule); padding:8px 12px; text-align:left}
.article-body .wp-caption{max-width:100%!important}
.article-body hr{border:none; border-top:1px solid var(--rule); margin:40px 0}

/* End matter */
.filed{margin-top:24px; border-top:1px dashed var(--red); padding-top:24px}
.filed__row{display:flex; gap:20px; align-items:baseline; flex-wrap:wrap}
.prevnext{margin-top:32px; border-top:1px solid var(--rule); padding:24px 0; display:flex; justify-content:space-between; gap:40px; flex-wrap:wrap}
.prevnext__col{max-width:320px}
.prevnext__col--next{text-align:right; margin-left:auto}

/* ---- Forms (inline, underline) ---- */
.subscribe{margin-top:8px; border-top:1px solid var(--rule); padding:32px 0 0}
.field-row{display:flex; gap:24px; align-items:flex-end; flex-wrap:wrap}
.field{flex:1 1 320px}
.field label{display:block; font-family:var(--sans); font-size:13px; letter-spacing:.06em; text-transform:uppercase; color:var(--gray); margin-bottom:10px}
.inp{width:100%; background:transparent; border:none; border-bottom:1px solid var(--ink); padding:6px 0; font-family:var(--serif); font-size:18px; color:var(--ink)}
textarea.inp{resize:vertical; min-height:72px}
.btn{background:none; border:none; padding:6px 0; font-family:var(--sans); font-size:15px; font-weight:500; color:var(--red); cursor:pointer; border-bottom:2px dashed var(--red)}
.btn:hover{color:var(--red)}
.form-note{margin-top:12px; font-family:var(--sans); font-size:14px; color:var(--gray)}
.form-note.ok{color:var(--navy)}
.form-note.err{color:var(--red)}
.hpot{position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden}

/* ---- Publications ---- */
.biblio .year{flex:1 0 100%; font-family:var(--sans); font-size:14px; line-height:20px; color:var(--gray)}
.pub__venue{margin:6px 0 0; font-size:16px; line-height:24px}
.pub__abstract{margin:8px 0 0; font-size:16px; line-height:24px; color:var(--gray)}
.pub__tags{display:flex; gap:20px; align-items:baseline; flex-wrap:wrap; margin-top:10px}
.cite-box{margin-top:14px; border:1px solid var(--rule); padding:14px 16px; display:flex; gap:24px; align-items:flex-start; justify-content:space-between; flex-wrap:wrap}
.cite-box p{margin:0; flex:1 1 360px; font-family:var(--sans); font-size:13px; line-height:20px; color:var(--ink)}
.copybtn{background:none; border:none; padding:0; font-family:var(--sans); font-size:14px; font-weight:500; color:var(--red); cursor:pointer; text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:3px}

/* ---- Speaking ---- */
.timeband{font-family:var(--sans); font-size:13px; letter-spacing:.06em; text-transform:uppercase; color:var(--red); border-top:1px dashed var(--red); padding-top:12px}
.timeband--past{color:var(--gray)}
.talk__where{font-family:var(--sans); font-size:16px; color:var(--gray)}
.talk__title{margin:6px 0 0; font-size:16px; line-height:24px; font-style:italic}
.talk__figure{margin:0; flex:1 1 180px; max-width:220px; min-width:160px}
.talk__figure img{width:100%; height:auto; display:block; border:1px solid var(--rule)}
.invite{margin-top:56px; max-width:var(--read)}
.invite h2{margin:0 0 12px; font-family:var(--sans); font-size:24px; line-height:30px; font-weight:700}

/* ---- Media clippings ---- */
.clip__outlet{font-family:var(--sans); font-size:13px; letter-spacing:.06em; text-transform:uppercase; color:var(--gray); margin-bottom:4px}
.clip__quote{margin:12px 0 0; padding:2px 0 2px 16px; border-left:2px solid var(--red); font-style:italic; font-size:18px; line-height:28px}
.clip__desc{margin:8px 0 0; font-size:16px; line-height:24px; color:var(--gray)}

/* ---- About ---- */
.about-top{display:flex; flex-wrap:wrap; gap:56px}
.about-bio{flex:999 1 480px; min-width:0; max-width:var(--read)}
.about-bio h1{margin:0; font-family:var(--sans); font-size:28px; line-height:36px; font-weight:700; letter-spacing:-.011em}
.about-bio p{margin:28px 0 0; font-size:20px; line-height:32px; letter-spacing:-.003em}
.about-figure{margin:0; flex:1 1 280px; max-width:320px}
.about-figure img{width:100%; height:auto; display:block; border:1px solid var(--rule)}
.about-figure figcaption{margin-top:8px; font-family:var(--sans); font-size:14px; line-height:20px; color:var(--gray)}
.about-section{margin-top:56px; max-width:var(--read)}
.about-section h2{margin:0 0 4px; font-family:var(--sans); font-size:24px; line-height:30px; font-weight:700}
.kv{display:grid; grid-template-columns:150px minmax(0,1fr); column-gap:32px}
.kv__k{font-family:var(--sans); font-size:14px; line-height:24px; color:var(--gray); border-top:1px solid var(--rule); padding:14px 0}
.kv__k--label{font-size:13px; letter-spacing:.06em; text-transform:uppercase; padding:16px 0}
.kv__v{font-size:18px; line-height:28px; border-top:1px solid var(--rule); padding:12px 0}
.kit{border-top:1px dashed var(--red); margin-top:12px}
.kit__row{display:grid; grid-template-columns:150px minmax(0,1fr); column-gap:32px; border-top:1px solid var(--rule); padding:16px 0}
.kit__row--last{border-bottom:1px solid var(--rule)}
.kit__k{font-family:var(--sans); font-size:13px; letter-spacing:.06em; text-transform:uppercase; color:var(--gray)}
.kit__v{font-size:16px; line-height:24px}

/* ---- 404 ---- */
.redacted{max-width:var(--read); padding-top:120px}
.redacted h1{margin:16px 0 0; font-family:var(--sans); font-size:42px; line-height:52px; font-weight:700; letter-spacing:-.011em}
.redacted p{margin:28px 0 0; font-size:20px; line-height:32px; letter-spacing:-.003em}
.bar{background:var(--ink); color:transparent; border-radius:1px; -webkit-user-select:none; user-select:none}

/* ---- Footer ---- */
.site-footer{margin-top:96px; background:var(--navy); color:var(--white)}
.site-footer__inner{padding:64px var(--gutter) 40px; max-width:var(--page); margin:0 auto}
.foot-grid{display:flex; flex-wrap:wrap; gap:48px 40px}
.foot-about{flex:2 1 360px; min-width:0}
.foot-about__logo img{height:44px; width:auto; display:block}
.foot-about p{margin:20px 0 0; max-width:420px; font-size:17px; line-height:27px; color:var(--foot-text)}
.foot-news{margin-top:28px; max-width:420px}
.foot-news label{display:block; font-family:var(--sans); font-size:13px; letter-spacing:.06em; text-transform:uppercase; color:var(--foot-dim); margin-bottom:8px}
.foot-news__row{display:flex; gap:16px; align-items:flex-end}
.foot-news .inp{border-bottom:1px solid var(--white); color:var(--white)}
.foot-news .inp::placeholder{color:var(--foot-dim)}
.foot-news .btn{color:var(--white); border-bottom-color:var(--white)}
.foot-news .btn:hover{color:var(--white)}
.foot-col{flex:1 1 140px; min-width:130px}
.foot-col h2{font-family:var(--sans); font-size:13px; letter-spacing:.06em; text-transform:uppercase; color:var(--foot-dim); margin:0 0 14px; font-weight:500}
.foot-col ul{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; font-family:var(--sans); font-size:15px; line-height:22px}
.foot-col a{color:var(--white)}
.foot-col a:hover{color:var(--foot-text)}
.foot-bottom{margin-top:56px; padding-top:20px; border-top:1px solid rgba(255,255,255,.18); display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; font-family:var(--sans); font-size:14px; line-height:20px; color:var(--foot-dim)}

/* ---- Sidenotes (article margin notes) ---- */
.sidenote,.marginnote{display:block}
.sidenote-ref{color:var(--red); font-family:var(--sans); font-size:14px; vertical-align:super}
@media (min-width:1220px){
  .has-sidenotes .sidenote{position:absolute; left:calc(100% + 56px); width:240px;
    font-family:var(--sans); font-size:14px; line-height:20px; color:var(--gray);
    border-top:1px solid var(--rule); padding-top:8px; margin:0}
}
@media (max-width:1219px){
  .sidenote{font-family:var(--sans); font-size:15px; line-height:22px; color:var(--gray);
    border-left:2px solid var(--rule); padding:2px 0 2px 16px; margin:16px 0 32px}
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width:820px){
  :root{--gutter:20px}
  body{font-size:18px; line-height:28px}
  .page-head{padding-top:40px}
  .lead__title{font-size:32px; line-height:40px}
  .lead__dek{font-size:18px; line-height:28px}
  .article__inner{padding-top:40px}
  .article__title{font-size:32px; line-height:40px}
  .article__dek{font-size:18px; line-height:26px}
  .article-body{font-size:18px; line-height:28px}
  .article-body blockquote{font-size:20px; line-height:30px}
  .redacted{padding-top:72px}
  .redacted h1{font-size:32px; line-height:40px}
  .about-bio p{font-size:18px; line-height:28px}
  .kv,.kit__row{grid-template-columns:1fr}
  .kv__k{border-top:1px solid var(--rule); padding-bottom:0}
  .kv__v{border-top:none; padding-top:4px}
  .kit__row{gap:4px}
  .filters{max-width:none; flex-basis:100%}
  .prevnext__col--next{text-align:left; margin-left:0}
  .section__head h2{font-size:20px; line-height:26px}
  .site-footer{margin-top:64px}
}
@media (max-width:560px){
  .entry__thumb{max-width:none; flex-basis:100%; order:3}
  .lead__media{flex-basis:100%}
}

/* ---- Mobile slide-in menu ---- */
@media (max-width:820px){
  .nav-toggle{display:block}
  html.nav-open{overflow:hidden}
  .nav{
    position:fixed; inset:0; z-index:100;
    display:flex; flex-direction:column; justify-content:center; align-items:flex-start;
    gap:4px; padding:0 32px; margin:0;
    background:var(--white);
    transform:translateX(100%);
    transition:transform .3s cubic-bezier(.4,0,.2,1);
    visibility:hidden;
    font-size:15px;
  }
  html.nav-open .nav{transform:translateX(0); visibility:visible}
  .nav-list{flex-direction:column; align-items:flex-start; gap:0; width:100%}
  .nav-list li{width:100%}
  .nav-list a{
    color:var(--ink); display:block;
    font-family:var(--sans); font-size:32px; line-height:1; font-weight:600;
    letter-spacing:-.011em; padding:16px 0; width:100%;
    border-bottom:1px solid var(--rule);
  }
  .nav-list li:first-child a{border-top:1px solid var(--rule)}
  .nav a.current,.nav .current-menu-item > a,.nav .current_page_item > a{border-bottom:1px solid var(--rule); color:var(--red)}
  .nav-close{display:block}
  .nav__brand{display:block; position:absolute; top:24px; left:20px; line-height:0}
  .nav__brand img{height:64px; width:auto; display:block}
  /* hide the header's bottom rule while the slider is open */
  html.nav-open .site-header__inner{border-bottom-color:transparent}
  /* animate hamburger into an X when open */
  html.nav-open .nav-toggle__bars{background:transparent}
  html.nav-open .nav-toggle__bars::before{transform:translateY(7px) rotate(45deg)}
  html.nav-open .nav-toggle__bars::after{transform:translateY(-7px) rotate(-45deg)}
}
