:root {
  --page-bg: #f5f7fa;
  --surface: #ffffff;
  --text: #263238;
  --muted: #5f6b7a;
  --border: #dce3ec;
  --primary: #0366d6;
  --primary-hover: #024ea2;
  --shadow: 0 8px 28px rgba(28, 44, 64, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: 'Inter', Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: var(--primary);
}

.page {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 0 20px 40px;
}

.hero {
  display: grid;
  justify-items: center;
  text-align: center;
}

.top-nav {
  position: sticky;
  top: env(safe-area-inset-top, 0);
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
  margin-bottom: 34px;
  padding: 8px;
  border: 1px solid rgba(220, 227, 236, 0.78);
  border-radius: 12px;
  background: rgba(245, 247, 250, 0.86);
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 18px rgba(28, 44, 64, 0.06);
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  padding: 0 16px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(28, 44, 64, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  border-color: rgba(3, 102, 214, 0.35);
  color: var(--primary);
  box-shadow: 0 8px 20px rgba(28, 44, 64, 0.1);
  text-decoration: none;
  transform: translateY(-1px);
}

.top-nav a:focus-visible {
  outline: 3px solid rgba(3, 102, 214, 0.18);
  outline-offset: 2px;
}

.top-nav .home-link {
  width: 42px;
  height: 42px;
  padding: 0;
}

.top-nav .home-link img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: block;
  object-fit: cover;
}

.profile-photo {
  width: 152px;
  height: 152px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: var(--shadow);
  margin-bottom: 26px;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.7rem);
  line-height: 1.1;
  margin: 0;
}

.headline {
  color: var(--muted);
  font-size: 1.15rem;
  margin: 8px 0 22px;
}

.intro {
  max-width: 680px;
  margin: 0 0 30px;
  font-size: 1.06rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
  line-height: 1;
  padding: 0 16px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(28, 44, 64, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.links a:hover,
.links a:focus-visible {
  border-color: rgba(3, 102, 214, 0.35);
  color: var(--primary);
  box-shadow: 0 8px 20px rgba(28, 44, 64, 0.1);
  transform: translateY(-1px);
}

.links a:focus-visible {
  outline: 3px solid rgba(3, 102, 214, 0.18);
  outline-offset: 2px;
}

.content {
  display: grid;
  gap: 34px;
  margin-top: 48px;
}

.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.section h2 {
  font-size: 1.35rem;
  line-height: 1.25;
  margin: 0 0 18px;
  scroll-margin-top: 96px;
}

.items {
  display: grid;
  gap: 14px;
}

.item {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.item:first-child {
  border-top: 0;
  padding-top: 0;
}

.item-meta {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.item h3 {
  font-size: 1.08rem;
  line-height: 1.35;
  margin: 0 0 6px;
}

.item p {
  color: var(--muted);
  margin: 0 0 10px;
}

.item a {
  font-weight: 600;
  text-decoration: none;
}

.item a:hover {
  text-decoration: underline;
}

.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.error-card {
  width: min(100%, 560px);
  padding: 34px 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.error-logo {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
}

.error-code {
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 18px 0 8px;
}

.error-card h1 {
  font-size: clamp(2rem, 5vw, 2.6rem);
}

.error-message {
  color: var(--muted);
  margin: 14px auto 26px;
  max-width: 420px;
}

.error-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
  line-height: 1;
  padding: 0 16px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(28, 44, 64, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.error-home-link:hover,
.error-home-link:focus-visible {
  border-color: rgba(3, 102, 214, 0.35);
  color: var(--primary);
  box-shadow: 0 8px 20px rgba(28, 44, 64, 0.1);
  transform: translateY(-1px);
}

.error-home-link:focus-visible {
  outline: 3px solid rgba(3, 102, 214, 0.18);
  outline-offset: 2px;
}

footer {
  color: #7d8794;
  font-size: 0.9rem;
  margin-top: 44px;
  text-align: center;
}

@media (max-width: 640px) {
  .page {
    padding-top: 0;
  }
}
