:root {
  --page-width: 980px;
  --text: #1c252f;
  --muted: #5e6b78;
  --surface: #ffffff;
  --accent: #155c8a;
  --line: #d9e1e8;
  --bg: linear-gradient(180deg, #f7fbff 0%, #f1f6fa 100%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  background: var(--bg);
}

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

a:hover {
  text-decoration: underline;
}

.page {
  max-width: var(--page-width);
  margin: 2rem auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(21, 42, 64, 0.08);
  padding: 2.25rem;
}

.header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "name name social"
    "image details details";
  column-gap: 2rem;
  row-gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.25rem;
}

.header-name {
  grid-area: name;
}

.header-name h1 {
  margin: 0;
}

.header-details {
  grid-area: details;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
}

.header-details .subtitle {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
}

.header-details .meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.profile-image {
  grid-area: image;
  width: 140px;
  height: 140px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(21, 42, 64, 0.12);
}

.social-links {
  grid-area: social;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  justify-content: flex-end;
}

.social-links a {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f8fbff;
  color: var(--muted);
  filter: grayscale(100%) opacity(0.7);
  transition: filter 0.25s ease-in-out, opacity 0.25s ease-in-out, background-color 0.25s ease-in-out;
}

.social-links a:hover,
.social-links a:focus,
.social-links a:active {
  filter: grayscale(0%) opacity(1);
  text-decoration: none;
}

.social-links i {
  font-size: 1rem;
  font-style: normal;
  line-height: 1;
}

.social-image {
  width: 1rem;
  height: 1rem;
  object-fit: contain;
}

.social-links a.social-icon-github { color: #181717; }
.social-links a.social-icon-linkedin { color: #0a66c2; }
.social-links a.social-icon-stack-overflow { color: #f58025; }
.social-links a.social-icon-sourceforge { color: #ff6600; }

mark {
  background-color: #e2e8f0;
  color: var(--text);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.section {
  margin-top: 1.8rem;
}

h2 {
  margin: 0 0 0.8rem;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.experience-list {
  display: grid;
  gap: 1rem;
}

.experience-item {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr);
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.experience-meta h3 {
  margin: 0;
  font-size: 1rem;
}

.experience-meta p {
  margin: 0.35rem 0;
  color: var(--muted);
}

.richtext p {
  margin: 0.45rem 0;
}

.richtext ul {
  margin-top: 0.4rem;
  padding-left: 1.1rem;
}

@media (max-width: 900px) {
  .page {
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    padding: 1.25rem;
  }

  .header {
    grid-template-columns: 1fr;
    grid-template-areas:
      "image"
      "name"
      "details"
      "social";
  }

  .profile-image {
    margin-left: 0;
    margin-bottom: 1rem;
  }

  .social-links {
    justify-content: flex-start;
  }

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