@import url('https://fonts.googleapis.com/css2?family=Alegreya+Sans:wght@400;500;700&family=Crimson+Text:ital,wght@0,400;0,600;1,400&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
  font-family: "Crimson Text", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: 17px;
}

html {
  background: #fff;
  color: #2c363c;
}

html,
body {
  line-height: 1.5;
  font-size: 17px;
}

p {
  font-size: inherit !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
dt {
}


h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Alegreya Sans", sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 1.5rem;
}

h3 {
  font-size: 1.25rem;
  margin: 2rem 0 1rem;
}

a:link {
  color: #2563eb;
  text-decoration: underline;
}

a:visited {
  color: #2563eb;
}

strong {
  font-weight: 600;
}

blockquote {
  padding: 0 2rem;
  font-style: italic;
}

ul,
ol,
p {
  margin: 1rem 0;
  hyphens: auto;
  word-break: break-word;
  word-wrap: break-word;
}

li > ul, li > ol {
  margin: .25rem 0;
}

li {
  margin: 0.25rem 0;
}

li > p {
  margin: 0;
}
li > p+p {
  margin: 1rem 0 0;
}

figure {
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

figcaption {
  margin-top: .5rem;
  text-align: center;
  font-style: italic;
}

th,
td {
  padding: .5rem;
  border-bottom: 1px solid #ddd;
}

tr.divider td {
  text-align: center;
  font-style: italic;
}
sup {
  font-size: .75em;
  line-height: 1;
}

dl {
  margin: 2rem 0;
}

dt {
  font-size: 1rem;
  font-weight: 600;
  margin-top: .5rem;
  font-family: "Alegreya Sans", sans-serif;
}

dd {
  margin-left: 1rem;
}

pre,
code {
  font-family: "JetBrains Mono", monospace;
  font-size: .8rem;
  font-weight: normal;
  line-height: 1.2;
}

img, video, object {
  max-width: 100%;
}

.sourceCode {
  background: inherit;
}
pre {
  padding: 1rem;
}

math {
  font-family: "Crimson Text", serif;
  font-size: 1em;
}
math[display=block] {
  display: block;
  text-align: left;
  padding: 0 2rem;
}

body {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

body>.sourceCode,
body>pre {
  margin: 1rem 0;
  overflow-x: auto;
}

/*
 * Post
 */

#title-block-header {
  display: flex;
  margin: 2rem 0 0.5rem 0;
  flex-wrap: wrap;
  font-family: "Alegreya Sans", sans-serif;
}

#title-block-header h1 {
  flex: 1 1 100%;
  margin: 0 0 .25rem;
}

#title-block-header .author,
#title-block-header .date {
  display: none;
}


.post-nav {
  font-family: "Alegreya Sans", sans-serif;
  font-size: 1.1rem;
  color: #666;
}

.post-nav a {
  text-decoration: none;
}

.post-nav.before {
  margin: 0;
}

.post-nav.after {
  margin: 2rem 0 0;
}

.post-nav ul {
  display: flex;
  list-style-type: none;
  margin: 0;
  padding: 0;
  gap: 1rem;
}

.post-nav a {
  color: inherit;
}

/*
 * Index
 */
/* Top nav */
.top-nav {
  display: flex;
  justify-content: flex-end;
  gap: 1.25rem;
  padding: 1rem 0 0;
  font-family: "Alegreya Sans", sans-serif;
  font-size: 0.85rem;
}

.top-nav a {
  color: #888;
  text-decoration: none;
}

.top-nav a:hover {
  color: #2c363c;
}

.top-nav a.active {
  color: #2c363c;
  font-weight: 700;
}

@media (prefers-color-scheme: dark) {
  .top-nav a:hover {
    color: #b4bdc3;
  }
  .top-nav a.active {
    color: #b4bdc3;
  }
}

/* Header: photo left, info right */
.index-page header {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem 0 0.5rem;
}

.header-photo {
  width: 130px;
  height: 130px;
  border-radius: 6px;
  object-fit: cover;
  object-position: center top;
  display: block;
  margin-bottom: 1rem;
}

.header-info h1 {
  font-size: 2rem;
  margin: 0 0 0.3rem;
}

.header-info .tagline {
  font-size: 0.95rem;
  color: #444;
  margin: 0 0 0.4rem;
}

.header-info .contacts {
  font-family: "Alegreya Sans", sans-serif;
  font-size: 0.88rem;
  color: #888;
  margin: 0;
}

.header-info .contacts a {
  color: #888;
}

.divider {
  border: none;
  border-top: 1px solid #e8e8e8;
  margin: 0 0 1.25rem;
}

.index-page h2 {
  font-size: 0.85rem;
  font-family: "Alegreya Sans", sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #bbb;
  margin: 2rem 0 0.75rem;
}

.index {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

.index li {
  display: flex;
  flex-direction: column;
  margin: 1.5rem 0;
}

@media screen and (max-width: 90ch) {
  :root {
    font-size: 17px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.375rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  body>.sourceCode,
  body>pre {
    margin: 1rem -1rem;
  }
}

@media (prefers-color-scheme: dark) {
  html {
    background: #000;
    color: #b4bdc3;
  }

  a:link {
    color: #60a5fa;
  }

  a:visited {
    color: inherit;
  }

  #title-block-header .author,
  #title-block-header .date {
    color: #aaa;
  }
}
.footnote-ref {
  text-decoration: none !important;
}
.footnote-ref sup:before {
  content: '[';
}
.footnote-ref sup:after {
  content: ']';
}

/* Syntax highlighting overrides */

code span.kw,
code span.cf,
code span.pp,
code span.im {
  font-weight: 700;
}

code span.at,
code span.dt {
  text-decoration: none;
  font-style: italic;
}

code span.co {
  color: #999;
}

code span.st, code span.ss {
  color: #556570;
}

@media (prefers-color-scheme: dark) {
  code span.kw,
  code span.im {
    font-weight: 700;
  }
  code span.at,
  code span.dt {
    color: #a1938c;
  }
  code span.st, code span.ss {
    color: #868c91;
  }
}

/* Custom class, not part of highlighting */
span.red {
  color: #A8334C;
}
span.blue {
  color: #286486;
}

@media (prefers-color-scheme: dark) {
  span.red {
    color: #DE6E7C;
  }
  span.blue {
    color: #6099C0;
  }
}

@media print {
  :root, html, body {
  }
  .post-nav.after {
    display: none;
  }
}

/* Timeline — 2-column: [date + logo stacked] | prose */
.timeline {
  margin: 0;
}

.entry {
  display: grid;
  grid-template-columns: 4rem 1fr;
  column-gap: 1rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

.entry-left {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.entry-date {
  font-family: "Alegreya Sans", sans-serif;
  font-size: 0.85rem;
  color: #bbb;
  text-align: right;
  white-space: nowrap;
}

.org-logo {
  width: 3.75rem;
  height: 3.75rem;
  object-fit: contain;
  border-radius: 4px;
}

.entry > p {
  margin: 0;
  font-size: 0.95rem;
}

/* Notable — standalone section between timeline and projects */
.notable {
  margin: 0;
}

.notable h2 {
  margin-top: 0.75rem;
}

.notable ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.notable ul li {
  margin: 0.3rem 0;
  font-size: 0.95rem;
}

.notable ul li::before {
  content: "";
}

/* Projects page */
.page-title {
  font-size: 2rem;
  margin: 1.5rem 0 0.5rem;
}

.project-category {
  margin: 0 0 2rem;
}

.project-category h2 {
  margin: 1.5rem 0 1rem;
}

a.project-card,
div.project-card {
  display: block;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

a.project-card:hover {
  border-color: #ccc;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

a.project-card:visited {
  color: inherit;
}

.project-card h3 {
  font-size: 1.1rem;
  margin: 0;
}

.project-card p {
  margin: 0.5rem 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.project-img {
  width: 100%;
  border-radius: 4px;
  object-fit: cover;
  margin-top: 0.75rem;
}

.project-placeholder {
  width: 100%;
  height: 140px;
  border-radius: 4px;
  margin-top: 0.75rem;
  background: linear-gradient(135deg, #f0f0f0 0%, #e4e4e4 50%, #f0f0f0 100%);
}

@media (prefers-color-scheme: dark) {
  .project-placeholder {
    background: linear-gradient(135deg, #1a1a1a 0%, #252525 50%, #1a1a1a 100%);
  }
}

@media (prefers-color-scheme: dark) {
  a.project-card,
  div.project-card {
    border-color: #333;
  }
  a.project-card:hover {
    border-color: #555;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.04);
  }
}

/* Legacy project entries (index page) */
.project-entry {
  margin-bottom: 0.8rem;
}

.project-entry p {
  margin: 0;
  font-size: 0.95rem;
}

.project-entry time {
  font-family: "Alegreya Sans", sans-serif;
  font-size: 0.78em;
  color: #bbb;
  margin: 0 0.3rem;
}

/* Writing */
.writing-year {
  font-family: "Alegreya Sans", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #bbb;
  margin: 1.5rem 0 0.5rem;
}

.writing-year:first-of-type {
  margin-top: 0;
}

.writing a:visited {
  color: #2563eb;
}

@media (prefers-color-scheme: dark) {
  .writing a:visited {
    color: #93c5fd;
  }
}

.index {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

.index li {
  display: flex;
  flex-direction: column;
  margin: 0.75rem 0;
  font-size: 0.95rem;
}

.excerpt {
  font-size: 0.85rem;
  color: #888;
  margin-top: 0.15rem;
  line-height: 1.4;
}
