:root {
  font-family: Georgia, "Times New Roman", serif;
  color: #191817;
  background: #e9e5dc;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --paper: #f7f4ec;
  --ink: #191817;
  --muted: #68645c;
  --line: #c9c2b5;
  --measure: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: #e9e5dc; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font: inherit; }
::selection { background: #d8d0bf; }

.page { padding: clamp(24px, 4vw, 52px) 20px; }
.sheet {
  width: min(100%, var(--measure));
  margin: 0 auto;
  padding: clamp(34px, 5vw, 72px);
  background: var(--paper);
  box-shadow: 0 18px 55px rgba(50, 45, 35, 0.12);
}

.topline,
.meta,
footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.kicker,
.language,
.meta,
.period,
.tags,
.repo-link,
footer,
.index {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.kicker,
.language,
.period,
footer {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.language { display: inline-flex; gap: 7px; }
.language button {
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}
.language button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

h1 {
  margin: 52px 0 8px;
  font-size: clamp(3.6rem, 10vw, 7.8rem);
  font-weight: 400;
  line-height: 0.83;
  letter-spacing: -0.075em;
}

.role { margin: 22px 0 0; color: var(--muted); font-size: 1.05rem; font-style: italic; }
.meta { justify-content: flex-start; flex-wrap: wrap; margin-top: 22px; font-size: 0.78rem; }
.abstract { max-width: 900px; margin: 62px 0 0; font-size: clamp(1.25rem, 2.2vw, 1.72rem); line-height: 1.5; }

.index {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 62px;
  padding-top: 18px;
  border-top: 1px solid var(--ink);
  font-size: 0.68rem;
  text-transform: uppercase;
}
.index a { text-decoration: none; }
.index a:hover { text-decoration: underline; }

.section {
  display: block;
  padding: 66px 0;
  border-top: 1px solid var(--ink);
}
.section:first-of-type { margin-top: 82px; }
.section h2 {
  margin: 0 0 38px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.section-body { min-width: 0; }

.entry {
  display: block;
  padding: 0 0 43px;
}
.entry + .entry { padding-top: 43px; border-top: 1px solid var(--line); }
.entry:last-child { padding-bottom: 0; }
.entry-topline { display: flex; align-items: baseline; justify-content: space-between; gap: 28px; }
.entry h3,
.project h3,
.skill-group h3 { margin: 0; font-size: 1.16rem; font-weight: 600; line-height: 1.25; }
.subtitle { margin: 5px 0 0; font-style: italic; }
.company-link { text-decoration-thickness: 1px; text-underline-offset: 4px; }
.company-link:hover { text-decoration-color: var(--muted); }
.summary { margin: 16px 0 0; color: #33302b; line-height: 1.65; }
.statements { margin: 18px 0 0; padding-left: 1.25rem; }
.statements li { padding-left: .35rem; line-height: 1.58; }
.statements li + li { margin-top: 9px; }
.statements li::marker { color: var(--muted); font-size: .8em; }
.tags { margin: 19px 0 0; color: var(--muted); font-size: 0.72rem; line-height: 1.7; }
.compact { padding-bottom: 30px; }
.compact + .compact { padding-top: 30px; }

.project { padding: 0 0 38px; }
.project + .project { padding-top: 38px; border-top: 1px solid var(--line); }
.project:last-child { padding-bottom: 0; }
.project h3 { font-size: 1.55rem; font-weight: 400; }
.repo-link { display: inline-block; margin-top: 17px; font-size: 0.72rem; text-transform: uppercase; }

.skill-group { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; padding: 22px 0; }
.skill-group:first-child { padding-top: 0; }
.skill-group + .skill-group { border-top: 1px solid var(--line); }
.skill-group h3 { font-size: 0.98rem; }
.skill-group p { margin: 0; color: #33302b; line-height: 1.55; }

footer { padding-top: 25px; border-top: 1px solid var(--ink); }

@media (max-width: 760px) {
  .page { padding: 0; }
  .sheet { padding: 28px 22px 42px; box-shadow: none; }
  h1 { margin-top: 40px; font-size: clamp(3.4rem, 18vw, 5.9rem); }
  .index { grid-template-columns: 1fr 1fr; }
  .section { padding: 48px 0; }
  .section h2 { position: static; }
  .entry-topline { align-items: flex-start; flex-direction: column; gap: 8px; }
  .skill-group { grid-template-columns: 1fr; gap: 8px; }
  footer { align-items: flex-start; flex-direction: column; }
}

@media print {
  @page { margin: 16mm; }
  :root, body { background: white; }
  .page { padding: 0; }
  .sheet { width: 100%; padding: 0; background: white; box-shadow: none; }
  .language { display: none; }
  .index { break-after: page; }
  .section { break-inside: auto; }
  .entry, .project, .skill-group { break-inside: avoid; }
  a { text-decoration: none; }
}
