:root {
  --bg: #f7f7f5;
  --fg: #141414;
  --muted: #5a5a5a;
  --accent: #1f6feb;
  --card: #ffffff;
  --border: #e0e0de;
  --font: "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--fg);
  background: radial-gradient(circle at 20% 20%, rgba(31, 111, 235, 0.05), transparent 25%),
    radial-gradient(circle at 80% 0%, rgba(20, 20, 20, 0.06), transparent 35%),
    var(--bg);
  line-height: 1.6;
  padding: 32px 18px 64px;
}

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

a:hover,
a:focus {
  text-decoration: underline;
}

main,
.site-header,
.site-footer {
  max-width: 760px;
  margin: 0 auto;
}

.site-header {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04);
}

.profile {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  align-items: center;
}

.profile__photo {
  width: 160px;
  height: 160px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.profile__name {
  margin: 0 0 4px;
  font-size: 32px;
}

.profile__title,
.profile__contact {
  margin: 2px 0;
  color: var(--muted);
}

.profile__intro {
  margin: 0;
  color: var(--fg);
}

.profile__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.block {
  margin-top: 24px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.035);
}

.block h2 {
  margin: 0;
  font-size: 22px;
}

.block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}

.filter-bar__label {
  font-weight: 600;
}

.filter-bar__buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  border: 1px solid var(--border);
  background: #fff;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--fg);
  font-size: 14px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.filter-btn:hover,
.filter-btn:focus {
  background: #eef3fb;
}

.filter-btn.is-active {
  background: #e6efff;
  border-color: #c8dbff;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.pill-list li {
  padding: 8px 12px;
  border-radius: 20px;
  background: #eef3fb;
  color: #0c3c83;
  border: 1px solid #d7e4fb;
  font-size: 14px;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}

.timeline li {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfbfa;
  font-size: 14px;
}

.timeline__date {
  font-weight: 600;
  color: var(--muted);
}

.timeline__text {
  color: var(--fg);
}

.pub-list {
  display: grid;
  gap: 12px;
}

.pub-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: #fbfbfa;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  align-items: start;
}

.pub-thumb {
  width: 100%;
  height: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.pub-body {
  display: grid;
  gap: 4px;
}

.pub-title {
  margin: 0 0 4px;
  font-weight: 700;
}

.pub-meta {
  margin: 0 0 8px;
  color: var(--muted);
}

.pub-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  margin-bottom: 8px;
}

.pub-links a {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
}

.pub-links a.disabled {
  background: #f0f0f0;
  color: #999;
  cursor: not-allowed;
  opacity: 0.5;
  pointer-events: none;
}

.link-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.link-wrapper[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--fg);
  color: var(--bg);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
  margin-bottom: 8px;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.link-wrapper[data-tooltip]:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--fg);
  margin-bottom: 3px;
  z-index: 1000;
}

.tag-list {
  list-style: none;
  padding: 0;
  margin: 0 0 6px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  padding: 4px 8px;
  border-radius: 8px;
  background: #eef3fb;
  color: #0c3c83;
  border: 1px solid #d7e4fb;
  font-size: 12px;
}

.pub-notes {
  margin: 0;
  color: var(--fg);
}

.list-plain {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}

.btn-ghost {
  border: 1px solid var(--border);
  background: transparent;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--fg);
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-ghost:hover,
.btn-ghost:focus {
  background: #eef3fb;
}

.btn-ghost:active {
  transform: translateY(1px);
}

.site-footer {
  margin-top: 28px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

@media (max-width: 720px) {
  body {
    padding: 18px 14px 48px;
  }

  .profile {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile__photo {
    margin: 0 auto;
  }

  .timeline li {
    grid-template-columns: 1fr;
  }

  .pub-item {
    grid-template-columns: 1fr;
  }

  .pub-thumb {
    max-height: 220px;
  }
}
