/* Maria Spies — design tokens per "Ruled" design reference */
:root {
  --bg: #fcfcfb;
  --ink: #14161a;
  --body: #464d55;
  --secondary: #5c646d;
  --meta: #6d757e;
  --faint: #8d949b;
  --hairline: #dfe2e6;
  --row-divider: #eceef0;
  --btn-border: #c9ced4;
  --accent: #1d4ed8;
  --accent-tint: #f2f5fd;
  --img-fill: #e9ebee;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Libre Franklin', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--meta);
}

img { display: block; }

button { font-family: inherit; cursor: pointer; }

/* ---------- Header ---------- */
.site-header {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  border-bottom: 1px solid var(--ink);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.site-header .brand {
  grid-column: span 3;
  padding: 22px 0 20px 52px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.site-header .tagline {
  grid-column: span 4;
  padding: 22px 0 20px;
  align-self: center;
}

.site-header nav {
  grid-column: span 5;
  padding: 22px 52px 20px 0;
  display: flex;
  gap: 24px;
  justify-content: flex-end;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  flex-wrap: wrap;
}

.site-header nav a[aria-current="page"] { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  border-top: 1px solid var(--ink);
  font-size: 13px;
  color: var(--meta);
}

.site-footer .copy { grid-column: span 5; padding: 24px 0 22px 52px; }

.site-footer nav {
  grid-column: span 7;
  padding: 24px 52px 22px 0;
  display: flex;
  gap: 24px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

main { flex: 1; }

/* ---------- Grid bands ---------- */
.band {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}

.band.rule-below { border-bottom: 1px solid var(--hairline); }
.band.rule-below-strong { border-bottom: 1px solid var(--ink); }

.strip {
  grid-column: span 12;
  padding: 16px 52px;
  border-bottom: 1px solid var(--hairline);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 22px;
  font-size: 14px;
}

.btn-primary { background: var(--accent); color: #fff; font-weight: 500; }
.btn-primary:hover { color: #fff; opacity: 0.92; }
.btn-secondary { border: 1px solid var(--btn-border); }

/* ---------- Home ---------- */
.hero {
  grid-column: span 7;
  padding: 76px 44px 64px 52px;
  border-right: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.hero h1 {
  margin: 0;
  font-size: 50px;
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.hero p {
  margin: 0;
  font-size: 17px;
  line-height: 1.68;
  color: var(--body);
  max-width: 56ch;
}

.hero-media {
  grid-column: span 5;
  min-height: 460px;
  background: var(--img-fill);
  overflow: hidden;
}

.hero-media img { width: 100%; height: 100%; object-fit: cover; }

.card-row .card {
  grid-column: span 3;
  padding: 32px 26px;
  border-right: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.card-row .card:last-child { border-right: none; }

.card .num { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; color: var(--accent); }
.card .title { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.card p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--secondary); }

.photo-row .cell {
  grid-column: span 4;
  aspect-ratio: 4 / 3;
  border-right: 1px solid var(--hairline);
  background: var(--img-fill);
  overflow: hidden;
}

.photo-row .cell:last-child { border-right: none; }
.photo-row .cell img { width: 100%; height: 100%; object-fit: cover; }

.pub-section { padding: 52px; display: flex; flex-direction: column; gap: 20px; }

.pub-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 12px;
}

.pub-header a { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; color: var(--accent); }

.pub-row {
  display: grid;
  grid-template-columns: 80px 1fr 130px;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--row-divider);
  align-items: baseline;
}

.pub-row .year { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; color: var(--faint); }
.pub-row .title { font-size: 17px; }
.pub-row .kind { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; color: var(--meta); }

/* ---------- Inner page intros ---------- */
.intro-78 { grid-column: span 8; padding: 64px 44px 56px 52px; display: flex; flex-direction: column; gap: 20px; }
.intro-7 { grid-column: span 7; border-right: 1px solid var(--hairline); padding: 72px 44px 64px 52px; display: flex; flex-direction: column; gap: 24px; }
.intro-7.tight { padding: 64px 44px 56px 52px; gap: 20px; }
.intro-5-media { grid-column: span 5; overflow: hidden; }

h1.page-title { margin: 0; font-size: 42px; line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; }

.lead { margin: 0; font-size: 16.5px; line-height: 1.68; color: var(--body); max-width: 58ch; }

.accent-link { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12.5px; color: var(--accent); }

.notice {
  margin-top: 8px;
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  background: var(--accent-tint);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #34404f;
  max-width: 62ch;
}

/* ---------- About ---------- */
.about-media { grid-column: span 5; display: flex; flex-direction: column; }
.about-media .portrait { aspect-ratio: 4 / 5; background: var(--img-fill); overflow: hidden; border-bottom: 1px solid var(--hairline); }
.about-media .secondary { aspect-ratio: 4 / 3; background: var(--img-fill); overflow: hidden; }
.about-media img { width: 100%; height: 100%; object-fit: cover; }

.about-bio p { margin: 0; font-size: 16px; line-height: 1.7; color: var(--body); max-width: 60ch; }
.about-bio p.first { font-size: 17px; color: #2c3238; }

.role-list { grid-column: span 12; padding: 34px 52px 56px; display: flex; flex-direction: column; }

.role-row {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  padding: 15px 0;
  border-bottom: 1px solid var(--row-divider);
  align-items: baseline;
}

.role-row .title { font-size: 16px; font-weight: 500; }
.role-row .org { font-size: 15px; color: var(--secondary); }

/* ---------- Writing ---------- */
.writing-body { padding: 0 52px 64px; }

.filters { display: flex; gap: 8px; padding: 26px 0 22px; flex-wrap: wrap; }

.filter-chip {
  padding: 8px 14px;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--body);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.filter-chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.table-head {
  display: grid;
  grid-template-columns: 80px 1fr 150px 110px;
  gap: 20px;
  padding: 12px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--meta);
}

.table-row {
  display: grid;
  grid-template-columns: 80px 1fr 150px 110px;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--row-divider);
  align-items: baseline;
}

.table-row .year { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; color: var(--faint); }
.table-row .title-stack { display: flex; flex-direction: column; gap: 5px; }
.table-row .title-stack .title { font-size: 17px; letter-spacing: -0.01em; }
.table-row .title-stack .note { font-size: 13.5px; line-height: 1.55; color: var(--meta); }
.table-row .venue { font-size: 13.5px; color: var(--secondary); }
.table-row .kind { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; color: var(--accent); }

.empty-row { padding: 18px 0; font-size: 15px; color: var(--meta); }

/* ---------- Speaking ---------- */
.talk-topics .topic {
  grid-column: span 4;
  padding: 32px 28px;
  border-right: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.talk-topics .topic:last-child { border-right: none; }
.topic .num { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; color: var(--accent); }
.topic .title { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.topic p { margin: 0; font-size: 14px; line-height: 1.62; color: var(--secondary); }

.appearances-head {
  display: grid;
  grid-template-columns: 90px 1fr 240px;
  gap: 20px;
  padding: 26px 0 12px;
  border-bottom: 1px solid var(--ink);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--meta);
}

.appearance-row {
  display: grid;
  grid-template-columns: 90px 1fr 240px;
  gap: 20px;
  padding: 17px 0;
  border-bottom: 1px solid var(--row-divider);
  align-items: baseline;
}

.appearance-row .year { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; color: var(--faint); }
.appearance-row .event { font-size: 16.5px; }
.appearance-row .format { font-size: 13.5px; color: var(--secondary); }

/* ---------- Projects ---------- */
.project-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  border-bottom: 1px solid var(--hairline);
}

.project-row .media {
  grid-column: span 4;
  background: var(--img-fill);
  border-right: 1px solid var(--hairline);
  min-height: 260px;
  overflow: hidden;
}

.project-row .media img { width: 100%; height: 100%; object-fit: cover; }

.project-row .content {
  grid-column: span 8;
  padding: 44px 52px 44px 44px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-row .meta-line { display: flex; gap: 16px; align-items: baseline; }
.project-row .num { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; color: var(--accent); }
.project-row .org { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; color: var(--faint); }
.project-row h2 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.025em; }
.project-row .body-text { margin: 0; font-size: 15.5px; line-height: 1.68; color: var(--body); max-width: 62ch; }

/* ---------- Contact ---------- */
.contact-band { display: grid; grid-template-columns: repeat(12, 1fr); border-bottom: 1px solid var(--hairline); }

.contact-content {
  grid-column: span 7;
  border-right: 1px solid var(--hairline);
  padding: 72px 44px 72px 52px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.contact-content .lead { max-width: 54ch; }

.contact-stack { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }
.contact-email { font-size: 20px; font-weight: 500; color: var(--accent); }

.contact-media { grid-column: span 5; min-height: 420px; background: var(--img-fill); overflow: hidden; }
.contact-media img { width: 100%; height: 100%; object-fit: cover; }

/* sr-only utility for crawlable-but-hidden text if ever needed */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Responsive (README §Interactions, "not designed; recommended") ---------- */
@media (max-width: 900px) {
  .site-header .brand { padding-left: 24px; }
  .site-header .tagline { display: none; }
  .site-header nav { grid-column: span 8; padding-right: 24px; gap: 16px; }

  .band, .contact-band, .project-row { grid-template-columns: 1fr; }
  .hero, .intro-7, .intro-7.tight, .about-media, .contact-content, .contact-media,
  .hero-media, .intro-5-media { grid-column: span 1; border-right: none; }

  .hero { padding: 44px 24px 40px; border-bottom: 1px solid var(--hairline); }
  .hero h1 { font-size: 36px; }
  .hero-media { order: -1; min-height: 320px; }

  .card-row .card { grid-column: span 6; border-right: 1px solid var(--hairline); }
  .card-row .card:nth-child(2n) { border-right: none; }

  .photo-row .cell { grid-column: span 12; border-right: none; border-bottom: 1px solid var(--hairline); }
  .photo-row .cell:last-child { border-bottom: none; }

  .pub-section, .writing-body { padding-left: 24px; padding-right: 24px; }
  .pub-row, .table-row { grid-template-columns: 1fr; gap: 4px; padding: 16px 0; }
  .table-head, .appearances-head { display: none; }
  .appearance-row { grid-template-columns: 1fr; gap: 4px; }

  .intro-78, .intro-7, .intro-7.tight { padding: 44px 24px 36px; }
  .about-media .portrait, .about-media .secondary { aspect-ratio: 16 / 10; }
  .role-list { padding: 24px 24px 40px; }
  .role-row { grid-template-columns: 1fr; gap: 4px; }

  .talk-topics .topic { grid-column: span 12; border-right: none; border-bottom: 1px solid var(--hairline); }
  .talk-topics .topic:last-child { border-bottom: none; }

  .project-row .media { border-right: none; border-bottom: 1px solid var(--hairline); min-height: 220px; }
  .project-row .content { padding: 32px 24px; }

  .contact-content { padding: 44px 24px; border-right: none; border-bottom: 1px solid var(--hairline); }
  .contact-media { order: -1; min-height: 280px; }

  .site-footer .copy { grid-column: span 12; padding: 20px 24px 0; }
  .site-footer nav { grid-column: span 12; padding: 12px 24px 20px; justify-content: flex-start; }
}
