:root {
  --navy: #021024;
  --navy-light: #0d2a4a;
  --text: #1a1a1a;
  --text-muted: #4a4a4a;
  --gray-light: #e8e8e8;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Montserrat Alternates', -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--text);
  background: #fff;
  line-height: 1.5;
}

/* HEADER */
.header {
  background: var(--navy);
  margin: 0 70px;
  padding: 20px 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-radius: 0 0 15px 15px;
}
.header .header-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; width: 100%; }
.header .nav-wrap { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.logo-row img { height: 50px; width: auto; display: block; }
.nav { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.nav a {
  color: #fff;
  background: transparent;
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  border: 1px solid #fff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 400;
  font-family: 'Montserrat Alternates', sans-serif;
  transition: opacity 0.15s;
}
.nav a:hover { opacity: 0.85; }
.nav a.active { background: #fff; color: var(--navy); border-color: #fff; }
.lang-btn {
  display: flex; align-items: center; gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 12px;
  font-family: 'Montserrat Alternates', sans-serif;
}

/* HERO + STATS — единый скруглённый блок */
.hero-stats-wrap {
  margin: 8px 70px 0;
  border-radius: 15px;
  overflow: hidden;
}
.hero-wrap {
  background: var(--navy);
  padding: 56px 70px 60px;
}
.hero-tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero h1 {
  color: #fff;
  font-size: 35px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 20px;
}
.hero-desc {
  font-size: 20px;
  font-weight: 400;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  max-width: 640px;
}

/* STATS */
.stats-bar {
  background: #f0f0f0;
  padding: 24px 70px;
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}
.stat-num { font-size: 28px; font-weight: 700; color: var(--navy); letter-spacing: -0.02em; }
.stat-label { font-size: 11px; font-weight: 500; color: #999; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 2px; }

/* CONTAINER */
.container { margin: 0 70px; padding: 20px 70px; font-size: 20px; font-weight: 500; }
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: #999;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.section-block { margin-bottom: 48px; }

/* ROLES */
.roles { display: flex; flex-direction: column; }
.role {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--gray-light);
  align-items: start;
}
.role:first-child { border-top: 1px solid var(--gray-light); }
.role-title { font-size: 16px; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.role-period { font-size: 12px; color: #999; font-weight: 400; }
.role-place { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.role-desc { font-size: 15px; font-weight: 400; color: var(--text-muted); line-height: 1.7; }

/* PROJECTS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--gray-light);
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  overflow: hidden;
}
.proj { background: #fff; padding: 28px; display: flex; flex-direction: column; gap: 10px; transition: background 0.15s; }
.proj:hover { background: #fafafa; }
.proj-tag { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; color: #999; text-transform: uppercase; }
.proj-name { font-size: 18px; font-weight: 700; color: var(--navy); }
.proj-desc { font-size: 14px; font-weight: 400; color: var(--text-muted); line-height: 1.65; flex: 1; }
.proj-link { font-size: 13px; font-weight: 500; color: var(--navy); text-decoration: none; opacity: 0.4; transition: opacity 0.15s; margin-top: 8px; }
.proj-link:hover { opacity: 1; }

/* SKILLS */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.skill-card { background: #f8f8f8; border: 1px solid var(--gray-light); border-radius: 8px; padding: 18px 20px; }
.skill-title { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; color: #999; text-transform: uppercase; margin-bottom: 10px; }
.skill-item { font-size: 14px; font-weight: 400; color: var(--text); padding: 3px 0; }

/* EDUCATION */
.edu-list { display: flex; flex-direction: column; }
.edu-item { display: flex; align-items: baseline; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--gray-light); }
.edu-item:first-child { border-top: 1px solid var(--gray-light); }
.edu-year { font-size: 13px; font-weight: 600; color: #999; min-width: 40px; }
.edu-name { font-size: 16px; font-weight: 400; color: var(--text); }

/* LANGUAGES */
.langs { display: flex; gap: 10px; flex-wrap: wrap; }
.lang-tag { font-size: 14px; font-weight: 500; color: var(--navy); background: #f5f5f5; border: 1px solid var(--gray-light); padding: 8px 16px; border-radius: 8px; }

/* FOOTER — точно как BrainOS */
.footer {
  background: var(--navy);
  color: #fff;
  margin: 3rem 70px 20px;
  padding: 20px 70px;
  border-radius: 15px;
  font-family: 'Montserrat Alternates', sans-serif;
  font-size: 12px;
  font-weight: 400;
}
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.25);
}
.footer-top .footer-img { height: 50px; width: auto; display: block; object-fit: contain; }
.footer-bottom {
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  font-size: 12px;
  opacity: 0.95;
}
.footer-bottom .contact { font-size: 12px; }
.footer-bottom .contact a { color: inherit; text-decoration: none; }
.footer-bottom .contact a:hover { text-decoration: underline; }
.footer-bottom .copy { font-size: 12px; opacity: 0.9; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .header, .hero-stats-wrap, .container, .footer { margin-left: 16px; margin-right: 16px; }
  .header { padding: 16px 20px; }
  .hero-wrap { padding: 40px 20px; }
  .stats-bar { padding: 20px; gap: 24px; }
  .container { padding: 20px; }
  .footer { padding: 16px 20px; }
  .role { grid-template-columns: 1fr; gap: 8px; }
  .hero h1 { font-size: 26px; }
  .hero-desc { font-size: 16px; }
}
@media (max-width: 600px) {
  .header, .hero-stats-wrap, .container, .footer { margin-left: 12px; margin-right: 12px; }
  .hero h1 { font-size: 22px; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { flex-direction: column; align-items: flex-start; }
}
