:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-muted: #eef3f8;
  --text: #20242a;
  --muted: #687383;
  --line: #dbe2ea;
  --accent: #1768b3;
  --accent-hover: #b65d12;
  --notice-bg: #fff6e6;
  --notice-border: #f0b75a;
  --radius: 8px;
  --shadow: 0 10px 28px rgba(39, 54, 75, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Lato, Verdana, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.58;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

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

p {
  margin: 0 0 12px;
}

ul {
  margin: 0;
  padding-left: 21px;
}

li + li {
  margin-top: 9px;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(219, 226, 234, 0.85);
  background: rgba(247, 248, 251, 0.92);
  backdrop-filter: blur(12px);
}

.site-nav {
  display: flex;
  gap: 18px;
  justify-content: center;
  width: 100%;
  min-width: 0;
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 24px;
  overflow-x: auto;
  white-space: nowrap;
}

.site-nav a {
  color: #475465;
  font-size: 14px;
}

.page-shell {
  width: calc(100vw - 40px);
  max-width: 980px;
  margin: 34px auto 48px;
}

.page-shell.standalone {
  max-width: 720px;
}

.section {
  scroll-margin-top: 72px;
  margin-top: 32px;
}

.section:first-child {
  margin-top: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.section-heading h2 {
  margin: 0;
  font-size: 23px;
  font-weight: 700;
}

.section-note {
  margin: -4px 0 14px;
  color: var(--muted);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 34px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-copy {
  min-width: 0;
}

.profile-name {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 700;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  gap: 10px 16px;
  margin-top: 18px;
}

.profile-links a {
  font-weight: 700;
}

.notice {
  margin: 18px 0 0;
  border-left: 5px solid var(--notice-border);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 12px 14px;
  background: var(--notice-bg);
  color: #8a3216;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.avatar-link {
  justify-self: center;
}

.avatar {
  width: 220px;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--surface-muted);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.news-panel {
  max-height: 230px;
  overflow-y: auto;
  padding: 18px 20px;
}

.item-list {
  display: grid;
  gap: 18px;
}

.media-item {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 18px;
}

.media-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 18px;
  color: #314155;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(135deg, #fbfdff 0%, #e7edf4 100%);
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  padding: 18px;
}

.experience-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  overflow: hidden;
  padding: 16px;
  border-radius: var(--radius);
  background: #fbfcfe;
  transition: transform 0.18s ease;
}

.experience-logo:hover,
.experience-logo:focus {
  transform: translateY(-1px);
}

.experience-logo img {
  width: auto;
  height: auto;
  max-width: 180px;
  max-height: 72px;
  object-fit: contain;
}

.experience-placeholder {
  color: #314155;
  font-weight: 700;
  text-align: center;
}

.media-body {
  min-width: 0;
}

.hero p,
.description,
.authors,
.meta,
.item-title {
  overflow-wrap: anywhere;
}

.item-title {
  display: inline;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
}

.meta {
  margin-top: 6px;
  color: var(--muted);
}

.authors {
  margin-top: 6px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 10px;
}

.meta-link {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  background: #fbfcfe;
  font-size: 13px;
}

.badge {
  height: 20px;
  width: auto;
}

.description {
  margin-top: 10px;
  color: #3a424d;
}

.misc-panel {
  padding: 18px 20px;
}

.loading-state,
.error-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--surface);
  color: var(--muted);
}

.error-state h1 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 26px;
}

.site-footer {
  width: calc(100vw - 40px);
  max-width: 980px;
  margin: 0 auto 32px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: #8a94a3;
  font-size: 13px;
}

@media (max-width: 760px) {
  body {
    font-size: 14px;
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 14px;
    padding-inline: 18px;
    white-space: normal;
  }

  .page-shell,
  .site-footer {
    width: calc(100vw - 28px);
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 22px;
    text-align: left;
  }

  .avatar-link {
    grid-row: 1;
  }

  .avatar {
    width: min(210px, 62vw);
  }

  .profile-name {
    font-size: 28px;
    text-align: center;
  }

  .profile-links {
    justify-content: center;
  }

  .profile-links a {
    overflow-wrap: anywhere;
  }

  .section-heading h2 {
    font-size: 21px;
  }

  .media-item {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  .media-frame {
    max-width: 360px;
    margin-inline: auto;
  }
}

@media (max-width: 520px) {
  .page-shell,
  .site-footer {
    margin-left: 14px;
    margin-right: 14px;
    max-width: 362px;
  }
}

@media (max-width: 430px) {
  .page-shell,
  .site-footer {
    margin-left: auto;
    margin-right: auto;
    width: calc(100vw - 22px);
    max-width: 362px;
  }

  .hero,
  .media-item,
  .news-panel,
  .misc-panel {
    padding: 14px;
  }

  .profile-name {
    font-size: 24px;
  }

  .profile-links {
    gap: 8px 12px;
  }

  .media-frame {
    max-width: 100%;
  }
}
