/* Editorial memorial — quiet contrast, typography-led, minimal chrome */
:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --ink: #000000;
  --muted: #3b3a37;
  --faint: #8a8680;
  --accent: #1e4a6e;
  --accent-hover: #163a59;
  --border: #e2e0db;
  --rule: #c8c4bc;
  --max: 42rem;
  --shell: 52rem;
  --wide: calc(0.75 * (var(--shell)));
  --narrow: 38rem;
  font-size: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Georgia", "Times New Roman", serif;
  line-height: 1.7;
  color: var(--ink);
  background: var(--surface);
}

/* UI chrome in a neutral sans */
.site-header,
.nav,
.button,
.post .meta,
.post-list .meta,
.back,
.site-footer,
.media-placeholder,
.article-subhead {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 3rem;
}

.site-header .wrap.header-inner {
  max-width: var(--shell);
}

.wrap.narrow {
  max-width: var(--narrow);
}

/* Header — flat, no shadow */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.65rem 20px;
  min-height: 0;
}

.site-title {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  flex: 0 1 auto;
  min-width: 0;
}

.site-title:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  flex: 0 1 auto;
  justify-content: flex-end;
  gap: 0.7rem 1.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  padding-top: 0;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.nav a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  border-radius: 0.35rem;
  width: 2.1rem;
  height: 2.1rem;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

/* Hero — typographic, one accent rule */
.hero {
  padding: 3.25rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.hero-home {
  position: relative;
  border-bottom-color: #bcb8af;
  background-image:
    linear-gradient(rgba(18, 22, 28, 0.48), rgba(18, 22, 28, 0.62)),
    url("../../media/sagingaliyev_with_drillers_1978_79_felde.png");
  background-size: cover;
  background-position: center 30%;
  min-height: 64vh;
  display: flex;
  align-items: end;
}

.hero-home .wrap {
  background: rgba(11, 16, 24, 0.42);
  border-left: 3px solid var(--accent);
  padding-top: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
}

.hero-home h1,
.hero-home .lead {
  color: #f7f9fc;
}

.main-home .home-brand {
  text-align: center;
  margin: 0 0 1.25rem;
}

.main-home .home-logo {
  display: block;
  margin: 0 auto;
  max-width: min(18rem, 78vw);
  height: auto;
}

.hero .wrap {
  border-left: 3px solid var(--accent);
  padding-left: 1.35rem;
  margin-left: auto;
  margin-right: auto;
  padding-right: 1.35rem;
}

.hero h1 {
  font-size: clamp(1.8rem, 4.2vw, 2.6rem);
  font-weight: 400;
  line-height: 1.35;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.lead {
  font-size: 1.02rem;
  color: var(--muted);
  max-width: 36rem;
  margin: 0;
  line-height: 1.65;
}

/* Shared source/info callout style (matches article treatment). */
main .post-info {
  margin: 0 0 1rem;
  padding-left: 0.85rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-style: italic;
}

section {
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

h2 {
  font-size: 1.23rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 1.1rem;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
  color: var(--ink);
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

/* Media */
.media-block {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1rem 1.15rem;
  margin: 1rem 0 0;
}

.media-placeholder {
  aspect-ratio: 16 / 9;
  background: #f0eeea;
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
}

.post-video {
  margin: 0 0 1rem;
  border: 0px solid var(--border);
  background: var(--surface);
}

.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Stats — simple two-column, no cards */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0;
  margin: 1.5rem 0 0;
  border: 1px solid var(--border);
  background: var(--surface);
}

.stat {
  padding: 1rem 1.15rem;
  border-right: 1px solid var(--border);
}

.stat:last-child {
  border-right: none;
}

.stat strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.stat span {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Goals — stacked sections */
.goals {
  padding: 0;
  margin: 0;
}

.goals > article {
  padding: 1.35rem 0;
}

.goals h3 {
  margin-top: 0;
  font-size: 1.05rem;
}

.award-year {
  font-family: system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 0.35rem;
}

.cta-row {
  margin-top: 1.35rem;
}

.main-home .cta-row {
  text-align: center;
}

.button {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.55rem 0;
  color: var(--accent) !important;
  background: none;
  border: none;
  border-bottom: 2px solid var(--accent);
  text-decoration: none;
  border-radius: 0;
  box-shadow: none;
}

.button:hover {
  color: var(--accent-hover) !important;
  border-bottom-color: var(--accent-hover);
  filter: none;
  transform: none;
}

/* Blog list */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  margin: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.post-list li:last-child {
  border-bottom: none;
}

.post-list a.title {
  font-size: 1.08rem;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  overflow-wrap: anywhere;
}

.post-list a.title:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.post-list .meta {
  font-size: 0.8rem;
  color: var(--faint);
  margin: 0.4rem 0 0;
}

.post-list .excerpt {
  margin: 0.45rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

/* Single post */
.post .meta {
  font-size: 0.8rem;
  color: var(--faint);
  margin: 0 0 0.35rem;
}

.post-title {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 1.35rem;
  text-wrap: balance;
}

.prose {
  font-size: 1rem;
}

.prose p {
  margin-bottom: 1rem;
}

/* Book tables (big-emba) */
.prose table.book-data,
table.book-data {
  width: 100%;
  border-collapse: collapse;
  margin: 1.15rem 0;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  background: var(--surface);
}

.prose table.book-data th,
.prose table.book-data td,
table.book-data th,
table.book-data td {
  border: 1px solid var(--border);
  padding: 0.45rem 0.6rem;
  vertical-align: top;
  text-align: left;
}

.nav a.is-active {
  color: var(--accent);
  font-weight: 600;
}

.post-image {
  margin: 0 0 1rem;
  border: 0px solid var(--border);
  background: var(--surface);
}

.post-image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.article-subhead {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 1.75rem 0 0.65rem;
  font-weight: 600;
}

.back {
  margin-top: 2.5rem;
  font-size: 0.9rem;
}

.site-footer {
  margin-top: 0;
  padding: 2rem 0 2.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
  background: transparent;
  text-align: center;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--accent);
}

.page-title {
  padding: 2.5rem 0 0.25rem;
  max-width: none;
}

.page-title h1 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 400;
  line-height: 1.25;
}

.subtle {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

main ul {
  margin: 0 0 1rem 1.1rem;
  padding: 0;
}

/* Biography — prose-first, no pills/timeline chrome */
.bio-lede {
  font-size: 1.02rem;
  color: var(--muted);
  max-width: var(--max);
  margin: 0 0 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

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

@media (max-width: 640px) {
  :root {
    font-size: 16px;
  }

  .wrap {
    padding: 0 1.5rem;
  }

  .header-inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    min-height: auto;
    padding: 0.8rem 1rem;
    gap: 0.5rem;
  }

  .site-title {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    text-align: left;
    font-size: 0.96rem;
  }

  .nav {
    display: none;
    order: 3;
    flex-basis: 100%;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.85rem;
    letter-spacing: 0.01em;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
  }

  .site-header.menu-open .nav {
    display: flex;
  }

  .menu-toggle {
    display: inline-flex;
    align-self: center;
  }

  section {
    padding: 1.5rem 0;
  }

  .hero .wrap {
    border-left: none;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero {
    padding: 2.25rem 0 2rem;
  }

  .hero-home {
    min-height: 64vh;
    background-position: center 24%;
  }

  .stat {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .stat:last-child {
    border-bottom: none;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  :root {
    font-size: 17px;
  }

  .wrap {
    padding: 0 2rem;
  }

  .header-inner {
    padding: 0.9rem 1.15rem;
  }

  .nav {
    gap: 0.9rem 1.1rem;
    font-size: 0.8rem;
  }

  .hero {
    padding: 2.75rem 0 2.2rem;
  }

  .hero-home {
    min-height: 68vh;
  }

  .hero .wrap {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }
}
