:root {
  --bg: #f4f1eb;
  --paper: #fffdfa;
  --white: #ffffff;

  --text: #1b2330;
  --muted: #627083;
  --line: #e7dfd2;
  --line-strong: #d8cebf;

  --accent: #b88a45;
  --accent-dark: #8e6935;
  --accent-soft: #f6eddc;

  --sidebar: #172438;
  --sidebar-2: #1d2d46;
  --sidebar-card: rgba(255, 255, 255, 0.05);
  --sidebar-border: rgba(255, 255, 255, 0.09);
  --sidebar-text: #ffffff;
  --sidebar-muted: rgba(255, 255, 255, 0.84);
  --sidebar-title: #e8d1a0;
  --sidebar-icon: #d7b97e;

  --chip-bg: #f8f3ea;
  --chip-border: #e5dbc9;
  --chip-text: #3c495d;

  --success: #0f6b5a;
  --success-bg: #edf9f5;
  --success-border: #bfe8db;

  --tag-bg: rgba(215, 185, 126, 0.12);
  --tag-border: rgba(231, 200, 142, 0.24);
  --tag-text: #f5e5bf;

  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --shadow: 0 14px 34px rgba(24, 33, 51, 0.08);
  --card-shadow: 0 8px 18px rgba(24, 33, 51, 0.04);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

strong {
  font-weight: 700;
}

.web-only {
  display: inline;
}

.print-only {
  display: none;
}

.page {
  min-height: 100vh;
  padding: 28px;
}

.cv {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  background: var(--paper);
  border: 1px solid rgba(184, 138, 69, 0.08);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* ACTIONS */

.actions {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 20;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid #d8cebf;
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(24, 33, 51, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(24, 33, 51, 0.12);
}

/* SIDEBAR */

.sidebar {
  padding: 22px 18px;
  color: var(--sidebar-text);
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
}

.profile {
  margin-bottom: 14px;
  padding-bottom: 14px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile__photo {
  width: 200px;
  height: 200px;
  margin: 0 auto 12px;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.profile__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile__name {
  margin: 0;
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.profile__role {
  margin: 8px 0 4px;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
}

.profile__tagline {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sidebar-title);
}

.profile__availability {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.28;
  color: var(--sidebar-muted);
}

.sidebar-card {
  margin-bottom: 10px;
  padding: 13px;
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-md);
  background: var(--sidebar-card);
}

.sidebar-card__title {
  margin: 0 0 8px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sidebar-title);
}

.meta-list,
.simple-list,
.language-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.meta-list {
  display: grid;
  gap: 7px;
}

.meta-list li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 8px;
  align-items: start;
  font-size: 0.84rem;
  line-height: 1.36;
  color: var(--sidebar-muted);
}

.meta-list li i {
  margin-top: 2px;
  color: var(--sidebar-icon);
}

.meta-list a {
  color: var(--sidebar-text);
  word-break: break-word;
}

.meta-list a:hover {
  text-decoration: underline;
}

.simple-list {
  display: grid;
  gap: 6px;
}

.simple-list li {
  position: relative;
  padding-left: 13px;
  font-size: 0.83rem;
  line-height: 1.36;
  color: var(--sidebar-muted);
}

.simple-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--sidebar-icon);
}

.language-list {
  display: grid;
  gap: 7px;
}

.language-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  font-size: 0.84rem;
  line-height: 1.3;
  color: var(--sidebar-muted);
}

.tag-level {
  padding: 3px 8px;
  border: 1px solid var(--tag-border);
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.66rem;
  font-weight: 700;
  white-space: nowrap;
}

.qr-wrap {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.qr-card {
  display: inline-flex;
  padding: 5px;
  border-radius: 12px;
  background: #ffffff;
}

.qr-card img {
  width: 62px;
  border-radius: 8px;
}

/* CONTENT */

.content {
  padding: 24px;
  background: var(--paper);
}

.hero {
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fffaf2;
}

.hero__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 10px;
}

.hero__eyebrow {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.hero__title {
  margin: 0;
  font-size: 1.52rem;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  max-width: 310px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid #eadac0;
  border-radius: 999px;
  background: #ffffff;
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.hero__summary p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.5;
}

/* SECTIONS */

.section + .section {
  margin-top: 14px;
}

.section--compact {
  margin-top: 14px;
}

.section__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 9px;
  font-size: 0.98rem;
  color: var(--text);
}

.section__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

.section__title i {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  box-shadow: inset 0 0 0 1px #ead8b9;
}

/* CHIPS */

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-text);
  font-size: 0.73rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

/* SKILLS */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.skill-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--card-shadow);
}

.skill-card__title {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text);
}

/* TIMELINE */

.timeline {
  display: grid;
  gap: 8px;
}

.timeline__item {
  position: relative;
  padding: 12px 12px 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--card-shadow);
}

.timeline__item::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 0;
  bottom: 12px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--accent), #ddc08c);
}

.timeline__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 3px;
}

.timeline__role {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.22;
}

.timeline__company {
  margin: 3px 0 0;
  font-size: 0.83rem;
  line-height: 1.34;
  color: var(--muted);
}

.timeline__body {
  margin-top: 7px;
}

.timeline__body ul {
  margin: 0 0 7px;
  padding-left: 16px;
}

.timeline__body li {
  margin-bottom: 3px;
  font-size: 0.85rem;
  line-height: 1.38;
}

.timeline__stack {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid var(--success-border);
  border-radius: 999px;
  background: var(--success-bg);
  color: var(--success);
  font-size: 0.68rem;
  font-weight: 700;
}

.date-badge {
  padding: 4px 8px;
  border: 1px solid #e4dacb;
  border-radius: 999px;
  background: #fbf7f0;
  color: var(--text);
  font-size: 0.69rem;
  font-weight: 800;
  white-space: nowrap;
}

/* EDUCATION */

.education-list {
  display: grid;
  gap: 8px;
}

.education-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--card-shadow);
}

.education-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.education-card__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.24;
}

.education-card__school,
.subtle {
  margin: 3px 0 0;
  font-size: 0.83rem;
  line-height: 1.34;
  color: var(--muted);
}

.education-separator {
  height: 1px;
  margin: 8px 0;
  background: var(--line);
}
.timeline__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.project-link i {
  font-size: 0.78rem;
}

.project-link:hover {
  text-decoration: underline;
}

/* RESPONSIVE */

@media (max-width: 980px) {
  .page {
    padding: 20px;
  }

  .cv {
    grid-template-columns: 1fr;
  }

  .hero__top {
    flex-direction: column;
  }

  .hero__badges {
    justify-content: flex-start;
    max-width: none;
  }
}

@media (max-width: 720px) {
  .actions {
    position: static;
    margin-bottom: 18px;
    display: flex;
    justify-content: center;
  }

  .sidebar,
  .content {
    padding: 18px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .timeline__head,
  .education-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero__title {
    font-size: 1.3rem;
  }
}

/* PRINT */

@media print {
  @page {
    size: A4;
    margin: 9mm;
  }

  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body {
    font-size: 10pt !important;
    line-height: 1.3 !important;
  }

  .actions,
  .no-print,
  .print-hide,
  .qr-wrap {
    display: none !important;
  }

  .web-only {
    display: none !important;
  }

  .print-only {
    display: inline !important;
    word-break: break-word !important;
  }

  .page {
    padding: 0 !important;
    min-height: auto !important;
    background: #ffffff !important;
  }

  .cv {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: 58mm 1fr !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    background: #ffffff !important;
  }

  .sidebar {
    padding: 7mm 5mm !important;
    background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%) !important;
  }

  .content {
    padding: 7mm 0 7mm 6mm !important;
    background: #ffffff !important;
  }

  .profile,
  .sidebar-card,
  .hero,
  .skill-card,
  .timeline__item,
  .education-card {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    box-shadow: none !important;
  }

  .profile {
    margin-bottom: 4mm !important;
    padding-bottom: 4mm !important;
  }

  .profile__photo {
    width: 150px !important;
    height: 150px !important;
    margin: 0 auto 3mm !important;
    border-width: 2px !important;
  }

  .profile__name {
    font-size: 14pt !important;
  }

  .profile__role,
  .profile__tagline,
  .profile__availability {
    font-size: 7.8pt !important;
    line-height: 1.28 !important;
  }

  .sidebar-card {
    margin-bottom: 3.5mm !important;
    padding: 3.2mm !important;
    border-radius: 8px !important;
  }

  .sidebar-card__title {
    margin-bottom: 2.2mm !important;
    font-size: 8pt !important;
    letter-spacing: 0.06em !important;
  }

  .meta-list,
  .simple-list,
  .language-list {
    gap: 2mm !important;
  }

  .meta-list li,
  .simple-list li,
  .language-list li {
    font-size: 7.1pt !important;
    line-height: 1.28 !important;
  }

  .meta-list li {
    grid-template-columns: 9px 1fr !important;
    gap: 5px !important;
  }

  .simple-list li {
    padding-left: 10px !important;
  }

  .tag-level {
    padding: 2px 6px !important;
    font-size: 6.2pt !important;
  }

  .hero {
    margin-bottom: 4mm !important;
    padding: 10px 12px !important;
    border-radius: 10px !important;
    background: #fffaf2 !important;
  }

  .hero__top {
    margin-bottom: 3mm !important;
    gap: 6px !important;
  }

  .hero__eyebrow {
    margin: 0 0 2mm !important;
    font-size: 6.7pt !important;
    letter-spacing: 0.08em !important;
  }

  .hero__title {
    font-size: 10.2pt !important;
    line-height: 1.2 !important;
    max-width: none !important;
  }

  .hero__summary p {
    font-size: 7.9pt !important;
    line-height: 1.32 !important;
  }

  .section + .section,
  .section--compact {
    margin-top: 9px !important;
  }

  .section__title {
    margin: 0 0 3.2mm !important;
    gap: 6px !important;
    font-size: 8.8pt !important;
  }

  .section__title i {
    width: 18px !important;
    height: 18px !important;
    border-radius: 6px !important;
    font-size: 7pt !important;
  }

  .skills-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }

  .timeline,
  .education-list {
    gap: 6px !important;
  }

  .skill-card,
  .timeline__item,
  .education-card {
    padding: 8px 9px !important;
    border-radius: 9px !important;
  }

  .skill-card__title,
  .timeline__role,
  .education-card__title {
    margin: 0 0 3px !important;
    font-size: 7.9pt !important;
    line-height: 1.22 !important;
  }

  .chip-list {
    gap: 4px !important;
  }

  .chip,
  .timeline__stack,
  .date-badge {
    padding: 2px 6px !important;
    font-size: 6.2pt !important;
    line-height: 1.15 !important;
  }

  .timeline__item {
    padding: 8px 9px 8px 11px !important;
  }

  .timeline__item::before {
    top: 8px !important;
    bottom: 8px !important;
    width: 3px !important;
  }

  .timeline__head,
  .education-item {
    gap: 6px !important;
    margin-bottom: 2px !important;
  }

  .timeline__company,
  .education-card__school,
  .subtle {
    margin-top: 2px !important;
    font-size: 7pt !important;
    line-height: 1.25 !important;
  }

  .timeline__body {
    margin-top: 4px !important;
  }

  .timeline__body ul {
    margin: 0 0 4px !important;
    padding-left: 14px !important;
  }

  .timeline__body li {
    margin-bottom: 2px !important;
    font-size: 7.1pt !important;
    line-height: 1.28 !important;
  }

  .education-separator {
    margin: 6px 0 !important;
  }
}