:root {
  --navy: #071d3b;
  --text: #15213a;
  --muted: #56627a;
  --teal: #0d7377;
  --teal-dark: #075a60;
  --coral: #ff684e;
  --cream: #fffaf2;
  --line: #d5e1e4;
  --soft: #f6fbfb;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #eef3f5;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  padding: 24px;
}

.page {
  position: relative;
  width: min(1050px, 100%);
  min-height: 1485px;
  margin: 0 auto;
  overflow: hidden;
  padding: 42px 34px 34px;
  background: linear-gradient(135deg, #ffffff 0%, #fffefa 48%, #fbfdfd 100%);
  border: 1px solid #d8dfe3;
  box-shadow: 0 22px 70px rgba(7, 29, 59, 0.12);
}

.decor {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.decor-teal {
  top: 0;
  left: 0;
  width: 110px;
  height: 170px;
  background: var(--teal);
  border-bottom-right-radius: 95px;
}

.decor-cream {
  top: 0;
  left: 70px;
  width: 245px;
  height: 190px;
  background: #f8ebda;
  border-bottom-right-radius: 150px;
  opacity: 0.85;
}

.dots {
  position: absolute;
  top: 294px;
  left: 30px;
  z-index: 1;
  width: 75px;
  height: 75px;
  background-image: radial-gradient(var(--teal) 1.2px, transparent 1.2px);
  background-size: 13px 13px;
  opacity: 0.45;
}

.hero,
.card,
.section-heading,
.projects,
.approach {
  position: relative;
  z-index: 2;
}

.hero {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 34px;
  align-items: center;
  margin-bottom: 36px;
}

.photo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-photo {
  width: 260px;
  height: 260px;
  object-fit: cover;
  border-radius: 50%;
  border: 10px solid #fff;
  box-shadow: 0 14px 30px rgba(7, 29, 59, 0.16);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 58px;
  line-height: 0.98;
  letter-spacing: -1.8px;
}

.role {
  margin-top: 12px;
  color: var(--teal-dark);
  font-size: 28px;
  font-weight: 800;
}

.email {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  margin-top: 22px;
  color: var(--text);
  font-size: 23px;
  font-weight: 600;
  text-decoration: none;
}

.email-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 18px;
}

.accent-line {
  display: block;
  width: 88px;
  height: 3px;
  margin: 20px 0 22px;
  background: var(--coral);
}

.summary {
  max-width: 640px;
  color: var(--text);
  font-size: 19px;
  line-height: 1.45;
}

.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(250, 253, 253, 0.84);
  padding: 18px 18px 22px;
}

.skills h2,
.section-heading h2 {
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.skills h2 {
  margin-bottom: 20px;
  color: var(--teal-dark);
  font-size: 20px;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
}

.skill {
  min-height: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 10px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.skill:last-child {
  border-right: 0;
}

.icon {
  min-height: 33px;
  color: var(--teal-dark);
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
}

.skill p {
  font-size: 14px;
  line-height: 1.25;
  font-weight: 700;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr auto auto 1fr;
  gap: 14px;
  align-items: center;
  margin: 28px 0 18px;
  text-align: center;
}

.section-heading .rule {
  height: 1px;
  background: #8da6b6;
}

.section-heading .badge {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  font-weight: 800;
}

.section-heading .teal-badge {
  background: var(--teal);
}

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

.projects {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.project-card {
  position: relative;
  min-height: 545px;
  padding: 22px 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
}

.project-card.coral {
  border-color: #f4d8cf;
}

.number {
  position: absolute;
  top: 16px;
  left: 14px;
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.teal .number,
.teal .project-icon,
.teal h3,
.teal .more {
  color: var(--teal-dark);
}

.teal .number {
  background: var(--teal);
  color: #fff;
}

.coral .number {
  background: var(--coral);
}

.coral .project-icon,
.coral h3,
.coral .more {
  color: var(--coral);
}

.project-card h3 {
  min-height: 85px;
  padding-left: 46px;
  font-size: 21px;
  line-height: 1.1;
  font-weight: 900;
}

.project-icon {
  display: block;
  min-height: 44px;
  margin: 10px 0 10px;
  text-align: center;
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
}

.description {
  min-height: 59px;
  margin: 0 auto 16px;
  padding: 0 8px 14px;
  border-bottom: 2px solid currentColor;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
}

.project-card ul {
  margin: 0;
  padding-left: 17px;
  color: #11213a;
  font-size: 12.5px;
  line-height: 1.42;
}

.project-card li {
  overflow-wrap: anywhere;
}

.more {
  margin-top: 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.approach-title {
  margin-top: 22px;
}

.approach {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  align-items: stretch;
}

.approach article {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 14px;
  min-height: 120px;
  padding: 8px 18px 4px;
  border-right: 1px solid var(--line);
}

.approach article:last-child {
  border-right: 0;
}

.approach-icon {
  display: inline-grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 50%;
  background: #eaf2f2;
  color: var(--teal-dark);
  font-size: 31px;
  font-weight: 900;
}

.approach h3 {
  margin-bottom: 7px;
  color: var(--teal-dark);
  font-size: 17px;
  line-height: 1.15;
  font-weight: 900;
}

.approach p {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

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

  body {
    padding: 0;
    background: #fff;
  }

  .page {
    width: 210mm;
    min-height: 297mm;
    border: 0;
    box-shadow: none;
  }
}

@media (max-width: 900px) {
  body {
    padding: 12px;
  }

  .page {
    min-height: auto;
    padding: 26px 18px;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .intro {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  h1 {
    font-size: 42px;
  }

  .role {
    font-size: 22px;
  }

  .skill-grid,
  .projects,
  .approach {
    grid-template-columns: 1fr 1fr;
  }

  .project-card {
    min-height: auto;
  }
}

@media (max-width: 580px) {
  .skill-grid,
  .projects,
  .approach {
    grid-template-columns: 1fr;
  }

  .skill,
  .approach article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .profile-photo {
    width: 220px;
    height: 220px;
  }
}
