:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --paper: #f5f5f5;
  --ink: #111111;
  --text: #333333;
  --muted: #666666;
  --line: #d8d8d8;
  --soft: #f7f7f7;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "Poppins", "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cv-page {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  width: min(1120px, calc(100% - 40px));
  margin: 24px auto;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
}

.profile-rail {
  background: var(--black);
  color: var(--white);
  padding: 38px 30px;
}

.profile-head {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding-bottom: 34px;
}

.brand-mark {
  width: 132px;
  height: 132px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 8px solid var(--white);
  border-radius: 50%;
  color: var(--white);
  font-size: 72px;
  font-weight: 900;
  line-height: 1;
}

.brand-mark:hover {
  text-decoration: none;
}

.profile-mobile-title {
  display: none;
  text-align: center;
}

.rail-section {
  margin-top: 30px;
}

.rail-section h2 {
  margin: 0 0 16px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--white);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
}

.contact-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.contact-list div {
  min-width: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.contact-list div:last-child {
  border-bottom: 0;
}

.contact-list dt,
.rail-label {
  margin: 0;
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
}

.contact-list dd {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.skill-list,
.creation-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.skill-list {
  display: grid;
  gap: 8px;
}

.skill-list li,
.creation-list li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 600;
}

.rail-note {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.rail-note-prod {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.creation-list {
  display: grid;
}

.creation-list a {
  display: block;
  margin-top: 3px;
  color: var(--white);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.content {
  padding: 52px 54px 54px;
}

.hero {
  padding-bottom: 30px;
  border-bottom: 2px solid var(--black);
}

.eyebrow,
.section-heading p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: 54px;
  font-weight: 900;
  line-height: 1;
}

.role {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 21px;
  font-weight: 500;
}

.summary {
  max-width: 740px;
  margin: 22px 0 0;
  color: var(--text);
  font-size: 15px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.hero-tags span {
  padding: 6px 10px;
  background: var(--white);
  border: 1px solid var(--black);
  border-radius: 4px;
  color: var(--black);
  font-size: 11px;
  font-weight: 800;
}

.section {
  margin-top: 38px;
}

.section-heading {
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  font-weight: 900;
  line-height: 1.08;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-card {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 22px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.timeline-card:last-child {
  border-bottom: 1px solid var(--line);
}

.timeline-meta {
  min-width: 0;
}

.timeline-meta span,
.education-card span {
  display: inline-block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.timeline-meta p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.timeline-body h3,
.education-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
}

.timeline-body p,
.education-card p {
  margin: 7px 0 0;
  color: var(--text);
  font-size: 13px;
}

.education-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.education-card {
  padding: 18px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.education-card-wide {
  grid-column: 1 / -1;
}

.unit-panel {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.unit-panel h4 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.unit-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.unit-list li {
  padding: 8px 9px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(330px, 1fr);
  gap: 24px;
  align-items: start;
}

.knowledge-grid {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.knowledge-grid li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.knowledge-grid li:last-child {
  border-bottom: 1px solid var(--line);
}

.referee-card {
  padding: 18px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.referee-list {
  display: grid;
  gap: 16px;
}

.referee-list p,
.referee-list strong {
  display: block;
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.referee-list strong {
  margin-top: 4px;
  font-weight: 900;
}

@media (max-width: 1060px) {
  .cv-page {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .profile-rail {
    padding: 32px 24px;
  }

  .content {
    padding: 40px 36px 44px;
  }

  .hero h1 {
    font-size: 44px;
  }

  .timeline-card {
    grid-template-columns: 170px minmax(0, 1fr);
  }

  .split-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  body {
    background: var(--white);
  }

  .cv-page {
    display: block;
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .profile-rail {
    padding: 28px 22px 34px;
  }

  .profile-head {
    padding-bottom: 8px;
  }

  .brand-mark {
    width: 102px;
    height: 102px;
    border-width: 7px;
    font-size: 56px;
  }

  .profile-mobile-title {
    display: block;
  }

  .profile-mobile-title h1 {
    margin: 0;
    color: var(--white);
    font-size: 29px;
    font-weight: 900;
    line-height: 1.08;
  }

  .profile-mobile-title p {
    max-width: 460px;
    margin: 8px auto 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 13px;
  }

  .rail-section {
    max-width: 680px;
    margin: 27px auto 0;
  }

  .contact-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
  }

  .content {
    max-width: 760px;
    margin: 0 auto;
    padding: 34px 22px 46px;
  }

  .hero {
    display: none;
  }

  .section {
    margin-top: 34px;
  }

  .section:first-child {
    margin-top: 0;
  }

  .section-heading h2 {
    font-size: 27px;
  }

  .timeline-card {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 16px 0;
  }

  .education-list,
  .unit-list {
    grid-template-columns: 1fr;
  }

  .split-section {
    display: block;
  }

  .split-section > div + div {
    margin-top: 34px;
  }
}

@media (max-width: 520px) {
  .profile-rail,
  .content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .profile-mobile-title h1 {
    font-size: 25px;
  }

  .contact-list {
    grid-template-columns: 1fr;
  }

  .rail-section h2 {
    font-size: 22px;
  }

  .section-heading h2 {
    font-size: 24px;
  }

  .timeline-body h3,
  .education-card h3 {
    font-size: 16px;
  }

  .referee-list p,
  .referee-list strong {
    overflow-wrap: anywhere;
  }
}

@media print {
  @page {
    margin: 0;
    size: A4;
  }

  body {
    background: var(--white);
  }

  .cv-page {
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .profile-rail {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
