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

:root {
  --bg:        #F7F5F0;
  --surface:   #FFFFFF;
  --text:      #1A1A1A;
  --muted:     #6B6B6B;
  --line:      #E0DDD8;
  --tag-bg:    #EDEBE6;

  /* accent palette */
  --blue:      #2563EB;
  --blue-bg:   #EFF4FF;
  --blue-line: #C7D9FF;
  --teal:      #0D9488;
  --teal-bg:   #EDFAFA;
  --teal-line: #B2E4E1;
  --amber:     #B45309;
  --amber-bg:  #FFFBEB;
  --amber-line:#FDE68A;
  --rose:      #BE185D;
  --rose-bg:   #FFF0F6;
  --rose-line: #FBCFE8;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── Page ─── */
.page {
  max-width: 780px;
  margin: 0 auto;
  padding: 56px 32px 100px;
}

/* ─── HEADER ─── */
header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 64px;
  opacity: 0;
  animation: fadeUp .7s ease forwards;
}

/* ─── COUNTER ───*/

.counter-box {
  display: inline-grid;
  flex-direction: column;
  gap: 8px;
  background: #f4f6f8;
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}


.counter-box .label {
  font-size: 14px;
  color: #555;
}

.counter-box img {
  height: 24px;
}

.avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--surface);
  outline: 2px solid var(--blue-line);
  outline-offset: 2px;
  flex-shrink: 0;
}

.header-text h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.header-text .role {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-bg);
  border: 1px solid var(--blue-line);
  padding: 3px 10px;
  border-radius: 99px;
  margin-bottom: 16px;
  font-weight: 400;
}

.contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 0.8rem;
  color: var(--muted);
}

.contacts a {
  color: inherit;
  text-decoration: none;
  transition: color .2s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.contacts a:hover { color: var(--blue); }
.contacts span { display: flex; align-items: center; gap: 5px; }

.c-icon {
  width: 13px;
  height: 13px;
  opacity: .5;
  flex-shrink: 0;
}

/* ─── SECTIONS ─── */
section {
  border-top: 1px solid var(--line);
  padding-top: 40px;
  margin-bottom: 52px;
  opacity: 0;
  animation: fadeUp .7s ease forwards;
}

section:nth-child(2) { animation-delay: .10s; }
section:nth-child(3) { animation-delay: .18s; }
section:nth-child(4) { animation-delay: .26s; }
section:nth-child(5) { animation-delay: .34s; }

.section-label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ─── ABOUT ─── */
.about p {
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 580px;
}

/* ─── EXPERIENCE ─── */
.exp-item {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 0 28px;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.exp-item:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }

.exp-meta { padding-top: 2px; }

.exp-meta .period {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  line-height: 1.5;
  margin-bottom: 4px;
}

.exp-meta .company {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--teal);
  background: var(--teal-bg);
  border: 1px solid var(--teal-line);
  padding: 2px 8px;
  border-radius: 4px;
}

.exp-content h3 {
  font-size: 0.98rem;
  font-weight: 500;
  margin-bottom: 7px;
  line-height: 1.3;
}

.exp-content p {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.75;
}

/* ─── EDUCATION ─── */
.edu-item {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 0 28px;
  margin-bottom: 20px;
}

.edu-item .period {
  font-size: 0.75rem;
  color: var(--muted);
  padding-top: 3px;
}

.edu-item h3 {
  font-size: 0.98rem;
  font-weight: 500;
  margin-bottom: 3px;
}

.edu-item p { font-size: 0.86rem; color: var(--muted); }

/* ─── SKILLS ─── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 24px 20px;
}

.skill-group h4 {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* coloured tags per category */
.tag {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 5px;
  font-weight: 400;
  border: 1px solid transparent;
}

.tag-blue   { background: var(--blue-bg);  color: var(--blue);  border-color: var(--blue-line); }
.tag-teal   { background: var(--teal-bg);  color: var(--teal);  border-color: var(--teal-line); }
.tag-amber  { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-line); }
.tag-rose   { background: var(--rose-bg);  color: var(--rose);  border-color: var(--rose-line); }

/* ─── FOOTER ─── */
footer {
  text-align: center;
  font-size: 0.76rem;
  color: var(--muted);
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

/* ─── ANIMATION ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────
   RESPONSIVE — TABLET
───────────────────────────────── */
@media (max-width: 640px) {
  .page { padding: 36px 20px 72px; }

  header {
    grid-template-columns: auto 1fr;
    gap: 20px;
    margin-bottom: 44px;
    align-items: center;
  }

  .avatar { width: 72px; height: 72px; }

  .header-text h1 { font-size: 1.8rem; }

  .contacts { gap: 4px 12px; font-size: 0.76rem; }
}

/* ─────────────────────────────────
   RESPONSIVE — MOBILE
───────────────────────────────── */
@media (max-width: 480px) {
  .page { padding: 28px 16px 64px; }

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

  .avatar {
    width: 84px;
    height: 84px;
    margin: 0 auto;
  }

  .header-text h1 { font-size: 2rem; }

  .contacts {
    justify-content: center;
  }

  /* Experience & Education: stack on mobile */
  .exp-item,
  .edu-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .exp-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .exp-meta .period { margin-bottom: 0; }

  section { padding-top: 28px; margin-bottom: 36px; }

  .skills-grid { grid-template-columns: 1fr 1fr; }
}

@media print {
  * { animation: none !important; opacity: 1 !important; transform: none !important; }
  body { background: white; }
  .page { padding: 16px; }
}