@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,wght@0,400;0,500;1,400;1,500&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --paper: #f5f4f0;
  --ink: #1b1b18;
  --accent: #2b4fd9;
  --muted: #726f66;
  --line: #d8d5cb;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6vw 24px;
}

.frame {
  position: fixed;
  inset: 14px;
  border: 1px solid var(--line);
  pointer-events: none;
}

.sheet {
  width: 100%;
  max-width: 620px;
}

.mark {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin: 0 0 48px;
}

h1 {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 500;
  font-size: clamp(40px, 7vw, 60px);
  line-height: 1.05;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.role {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(19px, 2.6vw, 22px);
  color: var(--ink);
  margin: 0 0 28px;
}

.summary {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 46ch;
  margin: 0 0 44px;
}

.summary .accent {
  color: var(--ink);
}

.links {
  border-top: 1px solid var(--line);
}

.links a {
  display: flex;
  gap: 20px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
}

.links a:hover,
.links a:focus-visible {
  color: var(--accent);
}

.links a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

.links .label {
  color: var(--muted);
  width: 78px;
  flex-shrink: 0;
}

.links a:hover .label,
.links a:focus-visible .label {
  color: var(--accent);
}

footer {
  margin-top: 44px;
  font-size: 12px;
  color: var(--muted);
}

/* 404 page */
.code {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 500;
  font-size: clamp(64px, 12vw, 108px);
  line-height: 1;
  margin: 0 0 20px;
  color: var(--accent);
}

.error-msg {
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 44ch;
  margin: 0 0 36px;
}

.back {
  display: inline-block;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}

.back:hover,
.back:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

@media (prefers-reduced-motion: no-preference) {
  .sheet {
    animation: rise 0.5s ease-out;
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .links a { flex-direction: column; gap: 4px; }
  .links .label { width: auto; }
}
