:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #eef3f9;
  --text: #1f2937;
  --muted: #5f6b7a;
  --accent: #2f5d95;
  --accent-hover: #244a79;
  --accent-soft: #d9e5f4;
  --border: #d8e0ea;
  --shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
  --max-width: 1000px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #f9fbfd 0%, var(--bg) 100%);
  color: var(--text);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

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

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Navigation */
.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.15rem 1.2rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.nav strong {
  font-size: 1rem;
  font-weight: 650;
  color: var(--text);
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}

.nav-links a {
  margin-left: 0;
  color: var(--muted);
  padding-bottom: 0.2rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
  border-color: var(--accent-soft);
  text-decoration: none;
}

/* Main layout */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.75rem 1.2rem 4rem;
}

/* Intro block */
.top {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 2.5rem;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.info {
  min-width: 0;
}

.info p {
  max-width: 70ch;
}

.profile {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.profile img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.10);
  background: #fff;
}

/* Typography */
h1 {
  font-size: clamp(2.3rem, 4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 0.45rem;
  color: #142235;
}

h2 {
  font-size: 1.45rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: #183153;
  position: relative;
  padding-bottom: 0.45rem;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 52px;
  height: 2px;
  background: var(--accent-soft);
  border-radius: 999px;
}

p {
  margin: 0 0 1rem;
}

.meta {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 1.2rem;
}

/* Section separators */
hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.4rem 0;
}

/* Lists */
ol,
ul {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.55rem;
}

/* Small details used elsewhere */
.talk-mark {
  display: inline-block;
  width: 0.52rem;
  height: 0.52rem;
  margin-left: 0.38rem;
  border-radius: 50%;
  vertical-align: middle;
}

.talk-mark.invited {
  background: #0f8b7f;
  box-shadow: 0 0 0 1px rgba(15, 139, 127, 0.14);
}

.legend {
  margin-top: 0.45rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Footer */
.footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.2rem 2rem;
  color: var(--muted);
  font-size: 0.94rem;
}

/* Selection */
::selection {
  background: var(--accent-soft);
}

/* Responsive */
@media (max-width: 820px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .nav-links {
    gap: 0.8rem 1rem;
  }

  .top {
    grid-template-columns: 1fr;
    gap: 1.4rem;
    padding: 1.4rem;
  }

  .profile {
    justify-content: flex-start;
  }

  .profile img {
    width: 142px;
    height: 142px;
  }
}

@media (max-width: 520px) {
  body {
    line-height: 1.68;
  }

  main {
    padding: 2rem 1rem 3rem;
  }

  .nav {
    padding: 1rem 1rem 0.9rem;
  }

  h1 {
    font-size: 2.15rem;
  }

  h2 {
    font-size: 1.3rem;
  }
}
