* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  background: #e6e0d4;
  color: #1c1916;
  font-family: Inter, "Noto Sans", "Liberation Sans", sans-serif;
  font-synthesis: none;
}

main {
  display: grid;
  grid-template-columns: minmax(300px, 440px) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  min-height: 100vh;
  padding: 32px 40px 48px;
}

h1 {
  margin: 0;
  font-family: "Noto Serif", "Liberation Serif", Georgia, serif;
  font-size: 42px;
  font-weight: 400;
  line-height: 1.1;
}

h2 {
  margin: 18px 0 8px;
  font-family: "Noto Serif", "Liberation Serif", Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.2;
}

.lede {
  margin: 12px 0 22px;
  max-width: 38em;
  font-size: 16px;
  line-height: 1.45;
  color: #3f3a34;
}

.hint, .fine, .empty {
  margin: 0;
  max-width: 46em;
  font-size: 13px;
  line-height: 1.4;
  color: #5e574e;
}

.fine {
  margin-top: 22px;
}

.empty {
  margin-top: 8px;
  font-size: 15px;
}

#status:not(:empty) {
  margin-top: 8px;
}

.layouts,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.actions {
  margin-top: 12px;
}

.layouts button {
  padding: 8px 12px;
  font-size: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #3f3a34;
}

input,
textarea {
  width: 100%;
  border: 1px solid #c9c0b2;
  border-radius: 6px;
  background: #fffcf7;
  color: #1c1916;
  font: inherit;
  font-size: 16px;
  padding: 10px 12px;
}

textarea {
  resize: vertical;
  min-height: 88px;
  line-height: 1.4;
}

.fields {
  display: grid;
  gap: 10px;
}

#summary {
  margin-top: 8px;
}

.photo-controls {
  margin-top: 8px;
}

.photo-controls .hint {
  margin-top: 8px;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.block-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 12px;
  margin-top: 22px;
}

.block-head h2 {
  margin: 0;
}

.block-head button {
  font-size: 14px;
  padding: 6px 10px;
}

.entry {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #ddd4c6;
}

.entry.skill {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}

.entry.skill label {
  flex: 1;
  min-width: 160px;
}

.entry-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.entry-tools button {
  font-size: 13px;
  padding: 4px 8px;
}

button {
  justify-self: start;
  border: 1px solid #1c1916;
  border-radius: 6px;
  background: transparent;
  color: #1c1916;
  font: inherit;
  font-size: 15px;
  padding: 10px 16px;
  cursor: pointer;
}

button:hover:not(:disabled):not([aria-pressed="true"]) {
  background: #f3ece1;
}

button[aria-pressed="true"] {
  background: #1c1916;
  color: #fffcf7;
}

button[aria-pressed="true"]:hover:not(:disabled) {
  background: #34302b;
  color: #fffcf7;
}

button:disabled {
  cursor: default;
  opacity: 0.45;
}

:focus-visible {
  outline: 2px solid #1c1916;
  outline-offset: 2px;
}

.stage {
  display: flex;
  justify-content: center;
  min-width: 0;
  padding: 4px 8px 20px;
}

.sheet {
  width: min(100%, 760px);
  min-height: 980px;
  margin: 0 auto;
  padding: 52px 56px 64px;
  background: #fffcf7;
  color: #1c1916;
  box-shadow: 0 12px 32px rgba(48, 38, 22, 0.12);
  font-family: "Noto Serif", "Liberation Serif", Georgia, serif;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: break-word;
}

.sheet h2 {
  margin: 18px 0 6px;
  padding-bottom: 3px;
  border-bottom: 1px solid #1c1916;
  font-family: Inter, "Noto Sans", "Liberation Sans", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.sheet p {
  margin: 0;
}

.ghost {
  color: #b7ad9f;
  font-size: 34px;
  line-height: 1.05;
}

.quiet {
  margin-top: 10px;
  color: #8a8175;
  font-family: Inter, "Noto Sans", "Liberation Sans", sans-serif;
  font-size: 14px;
}

.name-row {
  display: flex;
  gap: 16px;
  align-items: center;
}

.name-text {
  min-width: 0;
}

.resume-name {
  font-size: 34px;
  font-weight: 400;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.contact-line,
.project-link,
.skill-line {
  margin-top: 6px;
  font-family: Inter, "Noto Sans", "Liberation Sans", sans-serif;
  font-size: 12.5px;
  line-height: 1.4;
  color: #3f3a34;
  overflow-wrap: anywhere;
}

.skill-line {
  color: #1c1916;
}

.summary {
  margin-top: 14px;
}

.summary p + p {
  margin-top: 6px;
}

.item {
  margin-top: 10px;
}

.item-top {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.role {
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
}

.dates {
  margin-left: auto;
  flex: none;
  font-family: Inter, "Noto Sans", "Liberation Sans", sans-serif;
  font-size: 12px;
  color: #5e574e;
  white-space: nowrap;
}

.place {
  color: #3f3a34;
  font-style: italic;
}

.sheet ul {
  margin: 4px 0 0;
  padding-left: 1.15em;
}

.sheet li + li {
  margin-top: 2px;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: Inter, "Noto Sans", "Liberation Sans", sans-serif;
  font-size: 13px;
}

.photo {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
  flex: none;
  background: #ddd4c6;
}

.sheet[data-layout="columns"] .resume-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.9fr);
  column-gap: 26px;
  align-items: stretch;
  margin-top: 8px;
}

.sheet[data-layout="columns"] .resume-side {
  border-left: 1px solid #ddd4c6;
  padding-left: 20px;
}

.sheet[data-layout="compact"] {
  padding: 28px 32px 36px;
  font-size: 12px;
  line-height: 1.28;
}

.sheet[data-layout="compact"] .resume-name {
  font-size: 22px;
}

.sheet[data-layout="compact"] h2 {
  margin: 8px 0 3px;
}

.sheet[data-layout="compact"] .summary {
  margin-top: 8px;
}

.sheet[data-layout="compact"] .item {
  margin-top: 6px;
}

.sheet[data-layout="compact"] .photo {
  width: 52px;
  height: 52px;
}

.sheet[data-layout="compact"] .contact-line,
.sheet[data-layout="compact"] .skill-line,
.sheet[data-layout="compact"] .dates {
  font-size: 11px;
}

.sheet[data-layout="sidebar"] {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  padding: 0;
  align-items: stretch;
}

.sheet[data-layout="sidebar"] .resume-side {
  background: #6b2d3c;
  color: #fffcf7;
  padding: 36px 20px 40px;
}

.sheet[data-layout="sidebar"] .resume-main {
  padding: 36px 32px 48px;
}

.sheet[data-layout="sidebar"] .resume-name,
.sheet[data-layout="sidebar"] .resume-side .contact-line {
  color: #fffcf7;
}

.sheet[data-layout="sidebar"] .resume-name {
  font-size: 26px;
  margin-bottom: 10px;
}

.sheet[data-layout="sidebar"] .resume-side h2 {
  color: #fffcf7;
  border-bottom-color: rgba(255, 252, 247, 0.45);
}

.sheet[data-layout="sidebar"] .resume-side .skills {
  display: grid;
  gap: 3px;
  color: #fffcf7;
}

.sheet[data-layout="sidebar"] .photo {
  width: 88px;
  height: 88px;
  margin-bottom: 14px;
}

.live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

noscript {
  display: block;
  padding: 16px 20px;
  background: #fff4e8;
}

@media (min-width: 901px) {
  .stage {
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow: auto;
  }
}

@media (max-width: 900px) {
  main {
    grid-template-columns: 1fr;
    padding: 24px 18px 40px;
  }

  h1 {
    font-size: 34px;
  }

  .sheet {
    min-height: 0;
    padding: 32px 22px 40px;
  }

  .sheet[data-layout="sidebar"] {
    grid-template-columns: 1fr;
  }

  .dates {
    white-space: normal;
  }
}
