html {
  scroll-behavior: smooth;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #ffffff;
  --text: #303030;
  --muted: #b3b3b3;
  --link: #0099ff;
  --border: rgba(0, 0, 0, 0.08);
  --font: 'Inter', sans-serif;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ─── Shared container ─── */

.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Nav ─── */

.site-nav {
  padding: 16px 0;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.nav-lang {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.15px;
  color: var(--text);
  opacity: 0.45;
  transition: opacity 0.15s;
}

.nav-lang:hover {
  opacity: 1;
}

/* ─── Home hero ─── */

.hero {
  padding-top: 80px;
  padding-bottom: 64px;
}

.hero h1 {
  font-size: 52px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
}

.hero .intro {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 20px;
}

.hero .cv-link {
  font-size: 20px;
  font-weight: 400;
  color: var(--link);
}

/* ─── Home sections ─── */

.home-section {
  padding-bottom: 64px;
}

.home-section h2 {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 24px;
}

/* Work experience */

.work-list {
  list-style: none;
}

.work-item {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.8;
}

.work-item .muted {
  color: var(--muted);
}

/* Portfolio */

.portfolio-item {
  margin-bottom: 48px;
}

.portfolio-item:last-child {
  margin-bottom: 0;
}

.portfolio-item h3 {
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 12px;
}

.portfolio-item h3 a {
  color: var(--link);
}

.portfolio-item p {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
}

/* ─── Home footer ─── */

.home-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.home-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-contacts {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-contacts a {
  font-size: 20px;
  color: var(--link);
}

.footer-name {
  font-size: 16px;
  color: var(--muted);
}

/* ─── Case study header ─── */

.case-header {
  max-width: 700px;
  margin: 0 auto;
  padding: 64px 24px 48px;
}

.case-header h1 {
  font-size: 52px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
}

.case-intro {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 32px;
}

.case-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}

.case-meta-item {
  font-size: 15px;
  color: var(--muted);
}

.case-meta-item strong {
  font-weight: 500;
  color: var(--text);
}

.case-demo-link {
  font-size: 20px;
  color: var(--link);
}

/* ─── Case study body layout ─── */

.case-body {
  display: grid;
  grid-template-columns: 160px minmax(0, 700px);
  gap: 48px;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.case-sidebar {
  position: sticky;
  top: 24px;
  height: fit-content;
  align-self: start;
}

.sidebar-nav {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  padding: 3px 0;
  line-height: 1.4;
  transition: color 0.15s;
}

.sidebar-link:hover,
.sidebar-link.active {
  color: var(--text);
}

/* ─── Case study content ─── */

.case-content section {
  margin-bottom: 64px;
  scroll-margin-top: 24px;
}

.case-content h2 {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 20px;
}

.case-content h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 32px;
  margin-bottom: 12px;
}

.case-content p {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 16px;
}

.case-content ul,
.case-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.case-content li {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.6;
}

.case-content p:last-child {
  margin-bottom: 0;
}

/* Problem cards with emoji */

.problems-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 16px;
}

.problem-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.problem-emoji {
  font-size: 24px;
  line-height: 1.4;
  flex-shrink: 0;
}

.problem-text {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
}

/* Image placeholders */

.img-placeholder {
  background: #f7f7f7;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 40px 24px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  margin: 24px 0;
}

/* Other projects */

.other-projects {
  border-top: 1px solid var(--border);
  padding-top: 48px;
}

.other-projects-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.other-projects-list a {
  font-size: 20px;
  color: var(--link);
}

/* ─── Case study footer ─── */

.case-footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  max-width: 960px;
  margin: 0 auto;
}

.case-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* ─── Responsive ─── */

@media (max-width: 860px) {
  .case-body {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .case-sidebar {
    position: static;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .sidebar-link {
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
  }
}

@media (max-width: 600px) {
  .hero h1,
  .case-header h1 {
    font-size: 36px;
  }

  .home-footer-inner,
  .case-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-contacts {
    flex-direction: column;
    gap: 8px;
  }
}
