/* akshayluther.com — reading text is Inter on white; the identity is the
   yellow band, the name in Archivo italic, and Space Grotesk headings. */


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: #16171a;
  font: 400 1.125rem/1.7 "Inter", -apple-system, "Helvetica Neue", sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  padding-bottom: 4rem;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }

/* Reading column */
.prose { max-width: 40rem; }
.prose > * { margin-top: 0; margin-bottom: 1.3rem; }
.prose a {
  color: var(--link, #1d4ed8);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose a:hover { text-decoration-thickness: 2px; }
.prose h2, .prose h3 { line-height: 1.25; margin-top: 2.5rem; margin-bottom: 0.8rem; }
.prose h2 { font-size: 1.5rem; }
.prose h3 { font-size: 1.25rem; }
.prose strong { font-weight: 650; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.35rem; }
.prose blockquote {
  margin: 1.8rem 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--accent, #16171a);
  color: #3c3f46;
}
.prose img { display: block; margin: 2rem auto; }
.prose iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; margin: 2rem 0; }
.prose code {
  font: 400 0.86em/1 "JetBrains Mono", ui-monospace, Menlo, monospace;
  background: #f3f4f6;
  padding: 0.15em 0.35em;
  border-radius: 4px;
}
.prose pre {
  font: 400 0.82rem/1.6 "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-variant-ligatures: none;
  background: #f6f7f9;
  border: 1px solid #eceef2;
  padding: 1rem 1.2rem;
  border-radius: 6px;
  overflow-x: auto;
}
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose hr { border: 0; border-top: 1px solid #e5e7eb; margin: 2.5rem 0; }
.prose table { border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { border-bottom: 1px solid #e5e7eb; padding: 0.5rem 0.75rem; text-align: left; }

/* ---- Layout: card grid home in date order; posts with details in the margin ---- */
:root { --ink: #111; --muted: #6b7280; --line: #e5e7eb; --panel: #f4f4f5; --link: #111; --accent: #111; }

.mast, main, .foot { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }

/* Masthead */
.mast { display: flex; justify-content: space-between; align-items: baseline; padding-top: 1.75rem; padding-bottom: 1.25rem; margin-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.ident .tagline { margin: 0; }
.name { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; text-decoration: none; }
.mast nav { display: flex; gap: 1.5rem; font-size: 0.95rem; font-weight: 500; }
.mast nav a { text-decoration: none; color: var(--muted); }
.mast nav a:hover, .mast nav a[aria-current] { color: var(--ink); }

/* Home: cards in date order, the newest one wide */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; text-decoration: none; background: #fff; transition: border-color 0.15s; }
.card:hover { border-color: var(--ink); }
.card.wide { grid-column: span 2; }
.card-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--panel); border-bottom: 1px solid var(--line); }
.card.wide .card-img { aspect-ratio: 16 / 8; }
.card-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.card-body { display: flex; flex-direction: column; gap: 0.55rem; padding: 1.1rem 1.2rem 1.25rem; flex: 1; }
.card-title { font-weight: 700; font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.015em; }
.card.wide .card-title { font-size: 1.6rem; line-height: 1.2; letter-spacing: -0.025em; }
.card-excerpt { font-size: 0.95rem; line-height: 1.55; color: #374151; }
.card-meta { margin-top: auto; padding-top: 0.4rem; font-size: 0.8rem; color: var(--muted); }

/* Post: title and text in a left column, details in the right margin */
.post { position: relative; }
.post-head { position: relative; max-width: 40rem; padding: 1.5rem 0 2.25rem; }
.post-head h1 { margin: 0; font-weight: 800; font-size: clamp(1.6rem, 3.2vw, 2rem); line-height: 1.2; letter-spacing: -0.03em; }
.tags { margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: 0.85rem; }
.tags a { color: var(--muted); text-decoration: none; }
.tags a:hover { color: var(--ink); text-decoration: underline; }
.margin-note { position: absolute; top: 1.9rem; left: calc(100% + 3.5rem); width: 11rem; display: grid; gap: 0.3rem; padding-top: 0.7rem; border-top: 2px solid var(--ink); font-size: 0.85rem; color: var(--muted); }
.margin-note time { color: var(--ink); font-weight: 600; }
.prose h2, .prose h3 { font-weight: 750; letter-spacing: -0.02em; }
/* Images framed apart from the text */
.prose p:has(> img), .prose p:has(> a > img) { margin: 2.25rem 0; padding: 0.75rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.prose p:has(> img) img, .prose p:has(> a > img) img { margin: 0 auto; }

.pager { max-width: 40rem; margin: 4rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.pager a { display: grid; gap: 0.3rem; text-decoration: none; font-weight: 600; line-height: 1.35; }
.pager a:hover { text-decoration: underline; }
.pager span { font-size: 0.8rem; font-weight: 500; color: var(--muted); }
.pager .newer { text-align: right; }

/* Shared pages */
.page-head { padding: 0.5rem 0 1.5rem; }
.page-head h1 { margin: 0; font-weight: 800; font-size: 2.4rem; letter-spacing: -0.03em; }
.kicker { margin: 0 0 0.5rem; font-size: 0.85rem; }
.kicker a { color: var(--muted); text-decoration: none; }
.topic-index, .entries { list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.topic-index a, .entries a { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.topic-name, .entry-title { font-weight: 600; }
.count, .entries time { font-size: 0.82rem; color: var(--muted); white-space: nowrap; }
.topic-index a:hover .topic-name, .entries a:hover .entry-title { text-decoration: underline; }
main > .prose { font-size: 1.2rem; }

/* Moments at MIT Sloan: a stream of quotes and photos, oldest first */
.moments-head { max-width: 40rem; }
.moments-intro { margin: 1rem 0 0; color: #4b5563; font-size: 1.05rem; line-height: 1.6; }
.moments { max-width: 40rem; }
.moment { margin: 0 0 1.75rem; padding: 0 0 1.75rem; border-bottom: 1px solid var(--line); }
.moment blockquote { margin: 0; padding: 0; border: 0; font-size: 1.35rem; line-height: 1.4; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
.moment blockquote::before { content: "“"; }
.moment blockquote::after { content: "”"; }
.moment.photo img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }
.moment figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: 0.7rem; font-size: 0.9rem; }
.moment .who { color: #1f2937; font-size: 1.05rem; font-weight: 500; }
.moment .who::before { content: "— "; }
.moment.photo .who::before { content: ""; }
.moment time { margin-left: auto; color: var(--muted); font-size: 0.8rem; white-space: nowrap; }


@media (max-width: 70rem) {
  .margin-note { position: static; width: auto; display: flex; gap: 1rem; margin-top: 1.25rem; padding-top: 0; border-top: 0; }
}
@media (max-width: 56rem) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 36rem) {
  .mast, main, .foot { padding: 0 1rem; }
  .mast { padding-top: 1.25rem; }
  .grid { grid-template-columns: 1fr; }
  .card.wide { grid-column: auto; }
  .pager { grid-template-columns: 1fr; }
  .pager .newer { text-align: left; }
}

/* Short pages: the footer still sits at the bottom of the window. */
body { display: flex; flex-direction: column; min-height: 100vh; }
body > main { flex: 1; width: 100%; }
body > .mast, body > .foot { width: 100%; }

/* ---- Highlighter: a fluorescent yellow band, the name in Archivo italic,
   Space Grotesk headings, firm black outlines. ---- */
:root { --fluo: #e8ff1f; --ink: #111; --link: #111; --accent: #111;
  --head: "Space Grotesk", sans-serif; --head-w: 700; --head-ls: -0.02em;
  --name: "Archivo", sans-serif; }
.mast { background: var(--fluo); box-shadow: 0 0 0 100vmax var(--fluo); clip-path: inset(0 -100vmax); border-bottom: 0; padding-top: 1.6rem; padding-bottom: 1.4rem; align-items: center; }
.ident { display: grid; gap: 0.25rem; }
.name { font: italic 800 2.2rem/1 var(--name); letter-spacing: -0.03em; }
.ident .tagline { display: block; font-size: 1rem; font-weight: 500; }
.mast nav a { color: var(--ink); font-weight: 600; padding-bottom: 2px; border-bottom: 3px solid transparent; }
.mast nav a:hover, .mast nav a[aria-current] { border-color: var(--ink); }
.mast + main { padding-top: 0.5rem; }
.card { border: 1px solid var(--ink); border-radius: 6px; }
.card-img { border-bottom: 1px solid var(--ink); }
.card-title, .post-head h1, .page-head h1, .prose h2, .prose h3, .pager a, .moment blockquote { font-family: var(--head); }
.card-title { font-weight: var(--head-w); letter-spacing: var(--head-ls); }
/* The title is highlighted like a marker pen, line by line, on hover. */
.card-title > span { background: linear-gradient(transparent 52%, var(--fluo) 52%, var(--fluo) 96%, transparent 96%) no-repeat 0 0 / 0% 100%; box-decoration-break: clone; -webkit-box-decoration-break: clone; transition: background-size 0.35s ease; }
.card:hover .card-title > span { background-size: 100% 100%; }
.post-head h1 { font-weight: var(--head-w); letter-spacing: -0.032em; }
.margin-note { border-top: 3px solid var(--ink); }
.margin-note time { background: var(--fluo); padding: 0 0.25rem; justify-self: start; }
.prose a { text-decoration-thickness: 2px; }
.prose a:hover { background: var(--fluo); }
.prose p:has(> img), .prose p:has(> a > img) { border: 1px solid var(--ink); border-radius: 6px; }
.prose blockquote { border-left: 4px solid var(--fluo); background: #fbffe0; padding: 0.8rem 1rem; }
.tags a { color: var(--ink); border: 1.5px solid var(--ink); border-radius: 999px; padding: 0.1rem 0.6rem; }
.tags a:hover { background: var(--fluo); text-decoration: none; }

/* Footer: a slim black strip — the name with the years, RSS, back to top. */
.foot { background: var(--ink); box-shadow: 0 0 0 100vmax var(--ink); clip-path: inset(0 -100vmax); border-top: 0; margin-top: 6rem; padding-top: 0.7rem; padding-bottom: 0.7rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 2rem; color: #8a8a8a; font-size: 0.82rem; }
.foot-ident { margin-right: auto; display: flex; align-items: baseline; gap: 0.75rem; }
.foot-name { font: italic 800 1.1rem/1 var(--name); letter-spacing: -0.03em; color: var(--fluo); text-decoration: none; }
.foot-links { display: flex; gap: 1.5rem; }
.foot-links a { color: var(--fluo); font-weight: 600; text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }

/* Moments: quotes in the heading face, with a yellow quote mark */
.moment blockquote { font-weight: 700; letter-spacing: var(--head-ls); position: relative; }
.moment blockquote::before { content: "“"; position: absolute; left: -1.6rem; top: -0.35rem; font-size: 3rem; line-height: 1; color: var(--ink); background: var(--fluo); width: 1.2rem; height: 1.6rem; display: grid; place-items: center; padding-top: 0.6rem; overflow: hidden; }
.moment blockquote::after { content: ""; }
.moment.photo img { border: 1px solid var(--ink); border-radius: 6px; }
@media (max-width: 70rem) { .moment blockquote::before { position: static; display: inline-grid; margin-right: 0.4rem; vertical-align: -0.2rem; } }

/* Phones: the menu gets its own row under the name. */
@media (max-width: 40rem) {
  .mast { flex-direction: column; align-items: flex-start; gap: 0.9rem; padding-top: 1.2rem; padding-bottom: 1rem; }
  .name { font-size: 1.9rem; }
  .ident .tagline { font-size: 0.92rem; }
  .mast nav { gap: 1.1rem; flex-wrap: wrap; font-size: 0.92rem; }
  .page-head h1 { line-height: 1.12; font-size: 2rem; }
  .foot { gap: 0.4rem 1rem; }
}
