:root {
  color-scheme: light;
  --page: #e9eeea;
  --surface: #ffffff;
  --ink: #1b241f;
  --muted: #657168;
  --line: #d4ddd6;
  --accent: #147567;
  --accent-dark: #0b5148;
}

* {
  box-sizing: border-box;
}

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

body {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-rows: auto 1fr;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.resume-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 12px clamp(16px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 22px rgba(27, 36, 31, 0.08);
}

.identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.identity > span:last-child {
  display: grid;
  min-width: 0;
}

.identity strong,
.identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity strong {
  font-size: 1rem;
}

.identity small {
  color: var(--muted);
  font-size: 0.78rem;
}

.monogram {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent-dark);
  font-weight: 850;
}

.actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 0.9rem;
  font-weight: 750;
}

.button:focus-visible {
  outline: 3px solid rgba(20, 117, 103, 0.24);
  outline-offset: 2px;
}

.button.primary {
  background: var(--accent);
  color: #ffffff;
}

.button.primary:hover {
  background: var(--accent-dark);
}

.button.secondary {
  border-color: #b9c6bd;
  background: var(--surface);
}

.button.secondary:hover {
  background: #edf2ee;
}

.resume-shell {
  min-height: 0;
  padding: clamp(8px, 1.5vw, 18px);
}

.resume-document {
  display: block;
  width: min(1100px, 100%);
  height: 100%;
  min-height: calc(100vh - 108px);
  min-height: calc(100dvh - 108px);
  margin: 0 auto;
  border: 1px solid #c7d0c9;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(27, 36, 31, 0.13);
}

.fallback {
  display: grid;
  min-height: 50vh;
  place-content: center;
  justify-items: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
}

.fallback p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 620px) {
  .resume-header {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .resume-document {
    min-height: calc(100vh - 158px);
    min-height: calc(100dvh - 158px);
  }
}
