:root {
  --bg: #f6f4f0;
  --surface: #fffdfa;
  --text: #1b2129;
  --muted: #5f6a78;
  --line: #d9d3c8;
  --accent: #1f3a56;
  --accent-soft: #e8eef5;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  line-height: 1.72;
  background:
    radial-gradient(140% 70% at 100% 0%, rgba(31, 58, 86, 0.08) 0%, rgba(31, 58, 86, 0) 60%),
    radial-gradient(120% 80% at 0% 100%, rgba(93, 112, 134, 0.08) 0%, rgba(93, 112, 134, 0) 60%),
    var(--bg);
}

.page {
  width: min(980px, 92vw);
  margin: 48px auto 64px;
  padding: 40px 44px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.hero > div:first-child {
  max-width: 720px;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.15;
}

h2 {
  margin: 0 0 16px;
  font-size: 1.06rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  color: var(--accent);
}

h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 500;
}

p,
li {
  font-size: 1rem;
}

.role,
.location,
.meta {
  margin: 6px 0;
  color: var(--muted);
}

.role {
  margin-top: 12px;
  font-weight: 500;
}

.meta {
  font-size: 0.95rem;
}

.lang-switch {
  display: inline-flex;
  gap: 0;
  align-self: flex-start;
  border: 1px solid var(--line);
  background: var(--surface);
}

.lang-switch button {
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 9px 14px;
  border-radius: 0;
  font: inherit;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}

.lang-switch button:first-child {
  border-left: 0;
}

.lang-switch button:hover,
.lang-switch button:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
}

.lang-switch button.is-active {
  background: var(--accent);
  color: #ffffff;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 0.98rem;
}

.contact span[aria-hidden="true"] {
  color: var(--line);
}

.contact a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease, color 180ms ease;
}

.contact a:hover,
.contact a:focus-visible {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.block {
  margin: 32px 0;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  animation: fade-up 400ms ease both;
}

.block:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.block p {
  margin: 0;
  color: #273140;
}

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

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

.project-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.project-list li + li {
  margin-top: 16px;
}

.project-item {
  padding: 20px;
  margin-top: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #faf8f3 100%);
}

.project-head {
  margin: 0 0 10px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.project-head a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(31, 58, 86, 0.25);
  white-space: nowrap;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  transition: border-color 180ms ease;
}

.project-head a:hover,
.project-head a:focus-visible {
  border-bottom-color: var(--accent);
}

.project-line {
  margin: 6px 0;
  color: var(--muted);
}

.project-label {
  display: inline-block;
  min-width: 84px;
  margin-right: 8px;
  color: var(--accent);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[data-lang="en"] {
  display: none;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .page {
    padding: 32px;
  }

  h1 {
    font-size: clamp(1.9rem, 4.6vw, 2.35rem);
  }
}

@media (max-width: 720px) {
  .page {
    margin: 16px auto 96px;
    padding: 24px 20px 88px;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .hero {
    flex-direction: column;
    gap: 16px;
  }

  .lang-switch {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    border: 1px solid var(--line);
    background: rgba(255, 253, 250, 0.96);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(5px);
  }

  .lang-switch button {
    padding: 10px 14px;
  }

  .contact {
    gap: 8px;
  }

  .contact span[aria-hidden="true"] {
    display: none;
  }

  .project-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-item {
    padding: 16px;
  }

  .project-label {
    min-width: 76px;
  }
}

@media (max-width: 480px) {
  .page {
    margin: 16px auto 96px;
    padding: 20px 16px 92px;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 0.94rem;
    letter-spacing: 0.065em;
  }

  p,
  li {
    font-size: 0.97rem;
  }

  .lang-switch {
    right: 12px;
    bottom: 12px;
  }

  .lang-switch button {
    padding: 9px 12px;
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}