@font-face {
  font-family: "LM Roman";
  src: url("/assets/fonts/lmroman10-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "LM Roman";
  src: url("/assets/fonts/lmroman10-italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "LM Roman";
  src: url("/assets/fonts/lmroman10-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "LM Caps";
  src: url("/assets/fonts/lmromancaps10-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #fdfcf8;
  --ink: #151515;
  --muted: #5f5b54;
  --rule: #d8d3c8;
  --rule-strong: #b9b2a4;
  --accent: #7a2e24;
  --max: 620px;
}

* { box-sizing: border-box; }
html { min-height: 100%; -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: "LM Roman", "Latin Modern Roman", "Times New Roman", Times, serif;
  font-size: 17px;
  line-height: 1.5;
  font-feature-settings: "liga" 1, "kern" 1;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
::selection { background: #e6dfd2; }
a {
  color: inherit;
  text-decoration-thickness: .5px;
  text-underline-offset: 2.5px;
}
a:hover { color: var(--accent); }
a:focus-visible,
summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2 { font-weight: 400; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.wrap { width: min(calc(100% - 56px), var(--max)); margin: 0 auto; }

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

.header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0 20px;
  border-bottom: 1px solid var(--rule-strong);
}
.brand {
  font-family: "LM Caps", "Latin Modern Roman", "Times New Roman", serif;
  font-size: 1.05rem;
  letter-spacing: .04em;
  text-decoration: none;
  white-space: nowrap;
}
.nav { display: flex; align-items: baseline; gap: .5rem; }
.nav a {
  font-family: "LM Caps", "Latin Modern Roman", "Times New Roman", serif;
  font-size: .72rem;
  letter-spacing: .08em;
  text-decoration: none;
  color: var(--muted);
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.nav-sep { color: var(--rule-strong); font-size: .72rem; }

main { flex: 1 0 auto; padding: 3.25rem 0 4rem; }
main.home {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #0b1f27;
  color: var(--paper);
}
.home-backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("/assets/miami-skyline.jpg") center center / cover no-repeat;
}
main.home::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(6, 22, 29, .84) 0%, rgba(6, 22, 29, .62) 48%, rgba(6, 22, 29, .28) 100%),
    linear-gradient(0deg, rgba(6, 22, 29, .45), transparent 55%);
}
.home-content {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 40px), 1200px);
  text-align: center;
}
.home h1 {
  color: var(--paper);
  border-bottom-color: rgba(253, 252, 248, .5);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .4);
  font-size: clamp(.95rem, 3.8vw, 4.2rem);
  line-height: 1.08;
  white-space: nowrap;
  text-wrap: nowrap;
  letter-spacing: -.02em;
  text-align: center;
  margin-bottom: .75rem;
}
.home .lede {
  color: rgba(253, 252, 248, .92);
  font-size: 1.1rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .55);
  text-align: center;
}

.kicker {
  font-family: "LM Caps", "Latin Modern Roman", "Times New Roman", serif;
  font-size: .72rem;
  letter-spacing: .1em;
  color: var(--muted);
  margin: 0 0 .8rem;
}
h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: -.01em;
  margin: 0 0 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule-strong);
  text-wrap: balance;
}
.lede {
  max-width: 100%;
  font-size: 1.05rem;
  line-height: 1.55;
  margin: 0;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.people { margin-top: 2.25rem; }
.person + .person { margin-top: 2.5rem; }
body.hide-ramu-shreyas #ramu,
body.hide-ramu-shreyas #shreyas { display: none; }
body.hide-ramu-shreyas #keshav { margin-top: 0; }
.person-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: .45rem;
  margin-bottom: .65rem;
}
.person-head h2 {
  font-family: "LM Caps", "Latin Modern Roman", "Times New Roman", serif;
  font-size: 1.05rem;
  letter-spacing: .04em;
  margin: 0;
}
.role {
  font-style: italic;
  font-size: .95rem;
  color: var(--muted);
  margin: 0;
  text-align: right;
}
.person-meta { margin: 0; display: grid; gap: .3rem; }
.person-meta div {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: .75rem;
  align-items: baseline;
}
dt {
  font-family: "LM Caps", "Latin Modern Roman", "Times New Roman", serif;
  font-size: .68rem;
  letter-spacing: .07em;
  color: var(--muted);
  padding-top: .1rem;
}
dd { margin: 0; }
.meta-item { display: flex; align-items: baseline; gap: .4rem; }
.meta-item + .meta-item { margin-top: .2rem; }
.meta-icon {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--muted);
  transform: translateY(1px);
}

.reading-groups { margin-top: 1.5rem; }
.reading-group + .reading-group { margin-top: 2.5rem; }
.reading-group-title {
  font-family: "LM Caps", "Latin Modern Roman", "Times New Roman", serif;
  font-size: .72rem;
  letter-spacing: .1em;
  color: var(--muted);
  margin: 0 0 .85rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--rule);
}
.reading-list { list-style: none; margin: 0; padding: 0; }
.reading {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  column-gap: .75rem;
  align-items: start;
  padding: 0 0 1.35rem;
  margin: 0 0 1.35rem;
}
.reading:last-child { padding-bottom: 0; margin-bottom: 0; }
.reading-num {
  font-size: .9rem;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: oldstyle-nums;
  padding-top: .1rem;
}
.reading-main { min-width: 0; }
.reading-citation { margin: 0 0 .35rem; text-wrap: pretty; hyphens: manual; }
.reading-title { font-style: italic; hyphens: manual; }
.reading-links {
  margin: .25rem 0 0;
  font-family: "LM Caps", "Latin Modern Roman", "Times New Roman", serif;
  font-size: .7rem;
  letter-spacing: .06em;
  line-height: 1.6;
}
.reading-links a { text-decoration: underline; text-underline-offset: 2px; }
.reading-links .sep { color: var(--rule-strong); margin: 0 .45em; }
.reading-links.empty { font-family: inherit; font-size: .82rem; font-style: italic; letter-spacing: 0; color: var(--muted); }
.reading-preview { margin-top: .75rem; }
.reading-preview summary {
  width: fit-content;
  cursor: pointer;
  font-family: "LM Caps", "Latin Modern Roman", "Times New Roman", serif;
  font-size: .7rem;
  letter-spacing: .06em;
  color: var(--muted);
}
.reading-preview summary:hover { color: var(--ink); }
.reading-preview iframe {
  display: block;
  width: 100%;
  height: 540px;
  min-height: 380px;
  margin-top: .6rem;
  border: 1px solid var(--rule-strong);
  background: white;
}
.reading-note {
  margin: 2.5rem 0 0;
  padding-top: .75rem;
  border-top: 1px solid var(--rule);
  font-size: .8rem;
  font-style: italic;
  color: var(--muted);
}
.empty { color: var(--muted); font-size: .85rem; font-style: italic; }

.site-footer {
  flex-shrink: 0;
  padding: 0 0 4rem;
}
.footer-inner a { text-decoration: underline; text-underline-offset: 2px; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule-strong);
  font-family: "LM Caps", "Latin Modern Roman", "Times New Roman", serif;
  font-size: .72rem;
  letter-spacing: .07em;
  font-variant-numeric: oldstyle-nums;
  color: var(--muted);
}
.photo-credit {
  margin: .5rem auto 0;
  font-size: .7rem;
  font-style: italic;
  color: #4f4b45;
}
.photo-credit a { text-underline-offset: 2px; }
.corner {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(.85rem, env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .2rem;
  text-align: right;
  padding: .38rem .58rem .34rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: rgba(253, 252, 248, .92);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: var(--muted);
  font-family: "LM Caps", "Latin Modern Roman", "Times New Roman", serif;
  font-size: .7rem;
  letter-spacing: .08em;
  line-height: 1.05;
  font-variant-numeric: oldstyle-nums;
  white-space: nowrap;
  pointer-events: none;
}
.corner-aum { color: var(--ink); }
body.journal-page .corner { display: none; }
.countdown {
  color: var(--muted);
  border-top: 1px solid var(--rule);
  padding-top: .22rem;
}

.journal-count {
  margin: .35rem 0 0;
  font-family: "LM Caps", "Latin Modern Roman", "Times New Roman", serif;
  font-size: .68rem;
  letter-spacing: .08em;
  color: var(--muted);
}
.journal-list { margin-top: 1.5rem; }
.journal-entries { list-style: none; margin: 0; padding: 0; }
.journal-entry {
  padding: .8rem 0;
  border-bottom: 1px solid var(--rule);
}
.journal-entry:first-child { border-top: 1px solid var(--rule); }
.journal-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.journal-date {
  font-family: "LM Caps", "Latin Modern Roman", "Times New Roman", serif;
  font-size: .8rem;
  letter-spacing: .05em;
  color: var(--ink);
  font-variant-numeric: oldstyle-nums;
}
.journal-links {
  font-family: "LM Caps", "Latin Modern Roman", "Times New Roman", serif;
  font-size: .7rem;
  letter-spacing: .06em;
  color: var(--muted);
  white-space: nowrap;
}
.journal-links a { text-decoration: underline; text-underline-offset: 2px; }
.journal-links .sep { color: var(--rule-strong); margin: 0 .3rem; }
.journal-viewer { margin-top: .85rem; }
.journal-viewer iframe {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  aspect-ratio: 210 / 297;
  border: 1px solid var(--rule-strong);
  background: white;
}
.journal-pending {
  font-size: .75rem;
  font-style: italic;
  color: var(--muted);
}
.journal-note {
  margin: 1.5rem 0 0;
  font-size: .8rem;
  font-style: italic;
  color: var(--muted);
}
.journal-empty { color: var(--muted); font-size: .85rem; font-style: italic; }

@media (max-width: 640px) {
  .wrap { width: min(calc(100% - 40px), var(--max)); }
  .header-inner { padding: 18px 0 14px; gap: 12px; align-items: center; }
  .nav { gap: .4rem; }
  .nav a { min-height: 44px; display: inline-flex; align-items: center; }
  main { padding: 2.25rem 0 3rem; }
  main.home { padding: 4rem 0; }
  h1 { font-size: clamp(1.8rem, 8vw, 2.3rem); }
  .lede { text-align: left; hyphens: manual; -webkit-hyphens: manual; }
  .person-head { flex-direction: column; gap: .2rem; }
  .role { text-align: left; }
  .reading { grid-template-columns: 1.6rem minmax(0, 1fr); column-gap: .5rem; }
  .reading-num { grid-row: 1; }
  .reading-main { grid-column: 2; grid-row: 1; }
  .footer-inner { flex-direction: column; gap: .35rem; }
  .photo-credit { font-size: .66rem; }
  .corner {
    right: max(.65rem, env(safe-area-inset-right));
    bottom: max(.8rem, env(safe-area-inset-bottom));
    padding: .34rem .52rem .3rem;
    font-size: .66rem;
  }
  .journal-row { flex-direction: column; align-items: flex-start; gap: .3rem; }
  .journal-links { white-space: normal; }
  .journal-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 .15rem;
  }
}


.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(6, 22, 29, .34);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
html.auth-ok .auth-overlay { display: none; }
.auth-overlay.locked {
  background: #06161d;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.auth-popup {
  width: min(100%, 380px);
  padding: 1.5rem 1.4rem 1.25rem;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}
.auth-kicker {
  margin: 0 0 .65rem;
  font-family: "LM Caps", "Latin Modern Roman", "Times New Roman", serif;
  font-size: .62rem;
  letter-spacing: .09em;
  color: var(--muted);
}
.auth-form { display: grid; }
.auth-form input[type="password"] {
  width: 100%;
  padding: .7rem .75rem;
  border: 0;
  background: #fff;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: transparent;
  text-shadow: none;
  font: inherit;
  font-size: .95rem;
}
.auth-form input[type="password"]:focus {
  outline: none;
}
#touchid-setup-wrap[hidden] { display: none; }


.auth-popup.locked input[type="password"] {
  background: #f1eee6;
  color: var(--muted);
}
.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;
}

@media (max-width: 640px) {
  .auth-overlay { padding: .85rem; }
  .auth-popup { width: min(100%, 330px); padding: 1.25rem 1.1rem 1rem; }
}

@media print {
  .site-header, .site-footer, .skip-link { display: none; }
  body { background: white; display: block; }
  main { flex: none; padding: 0; }
  a { text-decoration: none; }
}
