/* Night Field - the style of www.hristopavlov.net. Pages that aren't converted yet use style.css. */
:root { --ink: #e4e6f5; --dim: #a9adca; --glow: #b4b8ff; --line: #272b45; --field: #12152a; --edge: #4a5080; color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; background: #000; color: var(--ink); font: 16px/1.6 "Segoe UI", Arial, sans-serif; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img { max-width: 100%; height: auto; }
a { color: var(--glow); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--glow); outline-offset: 2px; }
.w { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* the sky at the top of the page */
.sky { position: relative; overflow: hidden; }
.sky canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sky .w { position: relative; }
#menu { min-height: 62px; padding: 18px 0; }
#menu ul { display: flex; flex-wrap: wrap; gap: 6px 26px; }
#menu a { color: var(--ink); }
#menu a[aria-current] { color: var(--glow); border-bottom: 2px solid var(--glow); }
h1 { font: 300 46px/1.15 "Segoe UI Light", "Segoe UI", Arial, sans-serif; text-wrap: balance; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 40px; align-items: center; padding: 56px 0 72px; }
.hero p { margin-top: 18px; color: var(--dim); font-size: 18px; }
.hero .name { margin: 0 0 6px; color: var(--glow); }
.hero img, .title img { -webkit-mask: radial-gradient(closest-side, #000 70%, transparent); mask: radial-gradient(closest-side, #000 70%, transparent); }
.hero img { width: 460px; }
.title { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-bottom: 12px; }
.title img { width: 200px; }

/* content */
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 16px; }
.news { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; padding: 34px 0; border-top: 1px solid var(--line); }
.news p { color: var(--dim); }
.new { font: 600 13px "Segoe UI", Arial, sans-serif; background: #2e8540; color: #fff; padding: 1px 7px; margin-left: 10px; vertical-align: 3px; border-radius: 2px; }
.page { min-height: 300px; padding: 34px 0 48px; border-top: 1px solid var(--line); }
.page p { max-width: 68ch; }
.page p + p { margin-top: 18px; }
.page a { overflow-wrap: anywhere; }
.articles li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; padding: 11px 0; }
.articles time { color: var(--dim); font-variant-numeric: tabular-nums; }
.articles a { font-size: 18px; line-height: 1.4; }
.links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 48px; }
.links a { font-size: 15px; }
.email { display: block; margin-top: 14px; filter: invert(1) contrast(2); }

/* a program's own menu and its text pages */
.status { margin-top: 10px; color: var(--dim); font-size: 18px; }
.sub ul { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 0; border-top: 1px solid var(--line); }
.sub a { display: block; padding: 5px 12px; background: var(--field); border: 1px solid var(--line); border-radius: 3px; color: var(--ink); font-size: 15px; }
.sub a:hover { border-color: var(--edge); text-decoration: none; }
.sub a[aria-current] { background: var(--glow); border-color: var(--glow); color: #0b0d1c; }
.button { display: inline-block; padding: 9px 20px; background: var(--glow); border-radius: 3px; color: #0b0d1c; font-weight: 600; }
.doc section { display: flow-root; }
.doc section + section { margin-top: 44px; }
.doc h2 { margin-bottom: 12px; font-size: 24px; font-weight: 400; }
.doc p { max-width: 78ch; margin: 0 0 16px; }
.doc p + p { margin-top: 0; }
.doc h3 { margin: 24px 0 10px; font-size: 18px; }
.doc section ul, .doc section ol { max-width: 78ch; margin: 0 0 16px; padding-left: 1.3em; list-style: disc; }
.doc section ol { list-style: decimal; }
.doc section li { margin-bottom: 8px; }
.doc section li::marker { color: var(--glow); }
.shot { float: right; width: 48%; margin: 6px 0 20px 36px; }
.shot img { display: block; border: 1px solid var(--edge); }
.shots { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; margin: 8px 0 24px; }
.shots img { display: block; border: 1px solid var(--edge); }
.shots figure { width: 200px; margin: 0; }
.shots figcaption { margin-top: 8px; color: var(--dim); font-size: 14px; line-height: 1.4; }
.doc code { font: 14px/1.5 Consolas, "Courier New", monospace; color: var(--glow); }
.doc pre { overflow-x: auto; margin: 0 0 24px; padding: 14px 18px; background: var(--field); border: 1px solid var(--line); }
.doc pre code { color: var(--ink); }
.grid { overflow-x: auto; margin: 0 0 24px; }
.grid table { width: 100%; border-collapse: collapse; line-height: 1.5; }
.grid th, .grid td { padding: 9px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.grid th { background: var(--field); font-weight: 600; }

/* the articles: their text is laid out with br and tables */
.article { max-width: 920px; }
.article h2, .article h3, .article h4 { margin: 28px 0 10px; }
.article > h2:first-child { margin-top: 0; }
.article h2 { font-size: 24px; font-weight: 400; }
.article h3 { font-size: 19px; font-weight: 600; }
.article p { max-width: none; }
.article ul, .article ol { margin: 10px 0 16px; padding-left: 1.4em; list-style: disc; }
.article ol { list-style: decimal; }
.article li { margin-bottom: 4px; }
.article img { background: #fff; }
.article table { display: block; width: fit-content; max-width: min(1080px, 100vw - 40px); overflow-x: auto; margin: 10px 0; border-collapse: collapse; line-height: 1.4; }
.article td, .article th { padding: 5px 9px; }
.article td img { max-width: none; }
.article table table { display: table; margin: 0; line-height: 1.3; }
.article table table td { padding: 2px 5px; color: var(--ink); }
.article table[border], .article table[border] > tbody > tr > td, .article table[border] > tbody > tr > th { border: 1px solid var(--edge); }
.article table[border="0"], .article table[border="0"] > tbody > tr > td { border: 0; }
.article th { background: var(--field); }
.article td[style*="background"], .article [bgcolor] td { color: #10121f; }
.article font[color="red"] { color: #ff8a80; }
.article font[color="green"] { color: #7ddc8b; }
.article font[size="2"], .article font[size="1.8"], .article font[size="-5"] { font-size: 14px; color: var(--dim); }
.article div[style*="overflow: auto"] { height: auto !important; }
.article .modeData { width: 280px; font-size: 13px; }
.article .modeData td { width: auto !important; padding: 3px 6px; border: 1px solid var(--line); }

/* pictures with captions */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 36px 30px; }
.gallery figure { margin: 0; }
.gallery img { display: block; border: 1px solid var(--edge); }
.gallery figcaption { margin-top: 8px; color: var(--dim); font-size: 15px; line-height: 1.45; }

/* the lists at the end of every page */
#lists { display: grid; grid-template-columns: 1fr 2fr 1.3fr; gap: 36px; padding: 34px 0 60px; border-top: 1px solid var(--line); }
#lists h3 { margin-bottom: 10px; }
#lists li { margin-bottom: 7px; line-height: 1.4; }
#lists form { display: flex; gap: 6px; }
#lists input, #lists button { padding: 7px 10px; font: inherit; background: var(--field); color: var(--ink); border: 1px solid var(--edge); }
#lists input { flex: 1; min-width: 0; }
#lists button { cursor: pointer; }

@media (max-width: 820px) {
  .hero, .news, .links { grid-template-columns: minmax(0, 1fr); }
  #lists { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding: 24px 0 36px; }
  h1 { font-size: 34px; }
  .title img { width: 120px; }
  .shot { float: none; display: block; width: auto; margin: 0 0 20px; }
}
@media (max-width: 520px) {
  #lists { grid-template-columns: minmax(0, 1fr); }
  .articles li { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
