/* vladimirkisselev.com. Typographic, deliberately plain.
   The job of this site is to be found and read, not to perform. */

:root {
  --ground:   #FBFAF8;
  --surface:  #FFFFFF;
  --ink:      #1B1A17;
  --ink-2:    #5D5B54;
  --ink-3:    #8B887F;
  --rule:     #E4E1DA;
  --rule-2:   #CFCBC1;
  --accent:   #0F5C4E;
  --accent-2: #0B4A3E;
  --mark:     #FCF3D9;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:   #16171A;
    --surface:  #1D1F22;
    --ink:      #EDEBE6;
    --ink-2:    #A5A29A;
    --ink-3:    #7A7770;
    --rule:     #2C2E32;
    --rule-2:   #3D4045;
    --accent:   #5CC3A9;
    --accent-2: #7FD4BE;
    --mark:     #2E2A18;
  }
}
:root[data-theme="dark"] {
  --ground:   #16171A;
  --surface:  #1D1F22;
  --ink:      #EDEBE6;
  --ink-2:    #A5A29A;
  --ink-3:    #7A7770;
  --rule:     #2C2E32;
  --rule-2:   #3D4045;
  --accent:   #5CC3A9;
  --accent-2: #7FD4BE;
  --mark:     #2E2A18;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 24px 120px;
  background: var(--ground);
  color: var(--ink);
  font-family: "Source Serif 4", Charter, "Bitstream Charter", Georgia, serif;
  font-size: 19px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: oldstyle-nums proportional-nums;
}

.wrap { max-width: 40rem; margin: 0 auto; }

/* ── masthead ─────────────────────────────────────────────── */
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  padding: 40px 0 0;
  margin-bottom: 64px;
}
.masthead a.home {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  letter-spacing: .02em;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}
.masthead a.home:hover { color: var(--accent); }
.masthead nav {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  display: flex;
  gap: 20px;
}
.masthead nav a { color: var(--ink-2); text-decoration: none; }
.masthead nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ── hero ─────────────────────────────────────────────────── */
/* A rectangle, not a circle. The circular avatar is the default move on every
   personal site; a plain framed portrait sits better next to serif type and reads
   as chosen rather than inherited. */
.hero {
  display: flex;
  gap: 26px;
  align-items: flex-start;
  margin-bottom: 34px;
}
.portrait {
  width: 120px;
  height: 160px;
  flex: none;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--rule-2);
  background: var(--surface);
  display: block;
}
.hero h1 { margin-top: -3px; }   /* optical: cap-height to the frame's top edge */

@media (max-width: 560px) {
  .hero { gap: 20px; }
  .portrait { width: 92px; height: 123px; }
}

/* ── type ─────────────────────────────────────────────────── */
h1 {
  font-size: clamp(30px, 5vw, 40px);
  line-height: 1.14;
  font-weight: 600;
  letter-spacing: -.014em;
  margin: 0 0 12px;
  text-wrap: balance;
}
h2 {
  font-size: 23px;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -.008em;
  margin: 56px 0 14px;
  text-wrap: balance;
}
h3 {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 56px 0 18px;
}
p { margin: 0 0 20px; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2.5px; }
a:hover { color: var(--accent-2); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

strong { font-weight: 600; }

code {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .84em;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: .08em .32em;
}

ul, ol { margin: 0 0 20px; padding-left: 1.4em; }
li { margin-bottom: 9px; }
li::marker { color: var(--ink-3); }

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 52px 0;
}

.lede {
  font-size: 21px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0 0 8px;
}

.meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  letter-spacing: .02em;
  color: var(--ink-3);
  margin: 0 0 48px;
}

/* ── home ─────────────────────────────────────────────────── */
.intro p:first-of-type { font-size: 21px; line-height: 1.52; }

.entries { list-style: none; margin: 0; padding: 0; }
.entries li {
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  margin: 0;
}
.entries li:first-child { border-top: 1px solid var(--rule); }
.entries a { font-size: 20px; font-weight: 600; text-decoration: none; color: var(--ink); display: block; margin-bottom: 5px; }
.entries a:hover { color: var(--accent); }
.entries .sub { color: var(--ink-2); font-size: 17px; line-height: 1.5; margin: 0 0 6px; }
.entries .when { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--ink-3); }

.work { list-style: none; margin: 0; padding: 0; }
.work li { margin-bottom: 22px; }
.work .role {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  color: var(--ink-3);
  display: block;
  margin-bottom: 3px;
}
.work .what { margin: 0; }

.contact { display: flex; flex-wrap: wrap; gap: 8px 26px; font-size: 17px; margin: 0; padding: 0; list-style: none; }

footer {
  margin-top: 88px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--ink-3);
}

/* ── article ──────────────────────────────────────────────── */
article h2:first-of-type { margin-top: 0; }
article p > code, article li > code { white-space: nowrap; }

.backlink {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  display: inline-block;
  margin-top: 8px;
}

@media (max-width: 640px) {
  body { font-size: 18px; padding: 0 20px 80px; }
  h1 { font-size: 28px; }
  .lede, .intro p:first-of-type { font-size: 19px; }
}

@media print {
  body { background: #fff; color: #000; }
  .masthead nav, footer { display: none; }
}
