/* leonidaltman.com — plain structure, system type, rules instead of boxes. */

:root {
  --bg: #f2f1ed;
  --fg: #111111;
  --muted: #5d5b56;
  --rule: #111111;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 3vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --fg: #eceae4;
    --muted: #9a978f;
    --rule: #eceae4;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.5 var(--sans);
}

a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }

h1, h2, h3, p, ol, blockquote { margin: 0; }

/* Header and footer: one line each, ruled */
.top, .bottom {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 16px var(--gutter);
  font: 13px/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.top { border-bottom: 1px solid var(--rule); }
.bottom { border-top: 1px solid var(--rule); color: var(--muted); }
.top .name { text-decoration: none; font-weight: 700; }
.top nav { display: flex; gap: 20px; flex-wrap: wrap; }

main { padding: 0 var(--gutter); }

/* Opening statement */
.intro { padding: clamp(48px, 10vw, 120px) 0 clamp(40px, 7vw, 88px); }
.intro h1 {
  max-width: 22ch;
  font-size: clamp(32px, 5.2vw, 68px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.intro .aside {
  margin-top: clamp(14px, 2vw, 24px);
  font-size: clamp(19px, 2.2vw, 28px);
  line-height: 1.25;
  color: var(--muted);
}

/* Sections: a label column and a content column, separated by a rule */
.block {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(0, 4fr);
  gap: 24px var(--gutter);
  padding: 28px 0 56px;
  border-top: 1px solid var(--rule);
}
.label {
  font: 13px/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 400;
}

/* Work list */
.list { list-style: none; padding: 0; }
.row {
  display: grid;
  grid-template-columns: 3ch minmax(0, 1.2fr) minmax(0, 3fr) minmax(0, 1.4fr);
  gap: 8px 24px;
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--rule);
}
.row:first-child { padding-top: 0; }
.num { font: 13px/1.9 var(--mono); color: var(--muted); }
.row h3 { font-size: 20px; line-height: 1.3; font-weight: 700; }
.row .text p + p { margin-top: 6px; }
.meta { font: 13px/1.5 var(--mono); color: var(--muted); }
.links { display: flex; flex-direction: column; gap: 4px; font: 14px/1.5 var(--mono); }
.links a, .contact a { overflow-wrap: anywhere; }

/* Quotes */
.quotes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px var(--gutter); }
.quotes p { font-size: 20px; line-height: 1.4; }
.quotes cite { display: block; margin-top: 10px; font: 13px/1.4 var(--mono); font-style: normal; color: var(--muted); }
.quotes cite::before { content: "— "; }

/* About */
.about { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px var(--gutter); max-width: 900px; }
.about img { width: 200px; height: 200px; object-fit: cover; border: 1px solid var(--rule); display: block; }
.about .text p + p { margin-top: 14px; }

.contact { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 20px; }

@media (max-width: 1100px) {
  .row { grid-template-columns: 3ch minmax(0, 1fr); }
  .row .text, .row .links { grid-column: 2; }
  .links { flex-direction: row; flex-wrap: wrap; gap: 4px 20px; }
}

@media (max-width: 860px) {
  .block { grid-template-columns: minmax(0, 1fr); padding-bottom: 40px; }
  .quotes { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .about { grid-template-columns: minmax(0, 1fr); }
  .about img { width: 140px; height: 140px; }
  .top { flex-direction: column; gap: 8px; }
}
