@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

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

:root {
  --navy: #1a2e4a;
  --navy-light: #2c4a72;
  --coral: #c94f2e;
  --coral-light: #fdf0ed;
  --warm: #faf9f7;
  --mid: #64748b;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-light: #475569;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 10.5pt;
  line-height: 1.6;
  color: var(--text);
  background: white;
  max-width: 210mm;
  margin: 0 auto;
  padding: 0;
}

/* ---- HEADER ---- */
.doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 28px 40px 24px;
  border-bottom: 2px solid var(--navy);
  background: white;
}

.logo {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-name {
  font-family: 'Playfair Display', serif;
  font-size: 22pt;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.5px;
  line-height: 1;
}

.logo-name span {
  color: var(--coral);
}

.logo-sub {
  font-size: 7.5pt;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--mid);
}

.doc-meta {
  text-align: right;
  font-size: 8.5pt;
  color: var(--mid);
  line-height: 1.7;
}

.doc-meta strong {
  color: var(--text);
  font-weight: 600;
  display: block;
  font-size: 9.5pt;
  margin-bottom: 2px;
}

/* ---- NAV ---- */
.doc-nav {
  display: flex;
  gap: 2px;
  background: var(--navy);
  padding: 0 36px;
  overflow-x: auto;
}

.doc-nav a {
  padding: 11px 16px;
  font-size: 8pt;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.doc-nav a:hover {
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.06);
}

.doc-nav a.active {
  color: #fff;
  border-bottom-color: var(--coral);
  font-weight: 600;
}

/* ---- BODY ---- */
.doc-body {
  padding: 36px 40px 40px;
}

/* ---- TYPOGRAPHY ---- */
h1 {
  font-family: 'Playfair Display', serif;
  font-size: 18pt;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
  line-height: 1.2;
}

h2 {
  font-size: 11pt;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

h2:first-child { margin-top: 0; }

h3 {
  font-size: 10.5pt;
  font-weight: 600;
  color: var(--text);
  margin: 16px 0 6px;
}

p {
  margin-bottom: 10px;
  color: var(--text-light);
}

p:last-child { margin-bottom: 0; }

strong { color: var(--text); font-weight: 600; }

/* ---- TABLES ---- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: 9.5pt;
}

th {
  background: var(--navy);
  color: white;
  font-weight: 600;
  padding: 9px 12px;
  text-align: left;
  font-size: 8.5pt;
  letter-spacing: 0.3px;
}

td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text-light);
  line-height: 1.55;
}

tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: var(--warm); }

td:first-child {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

td strong { color: var(--navy); }

/* ---- CRITERIA TABLE ---- */
.criteria-table td:first-child {
  white-space: normal;
  width: 24%;
  color: var(--navy);
  font-weight: 600;
}

/* ---- CALL-OUT BOXES ---- */
.callout {
  background: var(--coral-light);
  border-left: 3px solid var(--coral);
  padding: 12px 16px;
  margin: 16px 0;
  border-radius: 0 4px 4px 0;
  font-size: 9.5pt;
  color: var(--text);
}

.callout p { margin: 0; color: var(--text); }

.note-box {
  background: #f0f4ff;
  border-left: 3px solid var(--navy-light);
  padding: 12px 16px;
  margin: 16px 0;
  border-radius: 0 4px 4px 0;
  font-size: 9pt;
  color: var(--text-light);
}

/* ---- SIGNATURE ---- */
.sig-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.sig-person strong {
  display: block;
  font-size: 10.5pt;
  color: var(--navy);
  margin-bottom: 2px;
}

.sig-person span {
  font-size: 9pt;
  color: var(--mid);
  display: block;
  line-height: 1.7;
}

/* ---- CV ---- */
.cv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--navy);
}

.cv-name {
  font-family: 'Playfair Display', serif;
  font-size: 20pt;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 4px;
}

.cv-title {
  font-size: 10pt;
  color: var(--coral);
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}

.cv-contact {
  font-size: 8.5pt;
  color: var(--mid);
  line-height: 1.8;
  text-align: right;
}

.cv-contact strong {
  color: var(--text);
  font-weight: 500;
}

.job {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.job:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.job-title {
  font-weight: 700;
  color: var(--navy);
  font-size: 10.5pt;
}

.job-period {
  font-size: 8.5pt;
  color: var(--coral);
  font-weight: 600;
  white-space: nowrap;
}

.job-org {
  font-size: 9.5pt;
  font-weight: 500;
  color: var(--mid);
  margin-bottom: 6px;
}

.job ul {
  padding-left: 16px;
  margin: 0;
}

.job li {
  font-size: 9.5pt;
  color: var(--text-light);
  margin-bottom: 3px;
  line-height: 1.55;
}

/* ---- PORTFOLIO GRID ---- */
.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 16px 0;
}

.portfolio-item {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.portfolio-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: top;
  display: block;
  background: #eee;
}

.portfolio-info {
  padding: 12px 14px;
}

.portfolio-name {
  font-weight: 700;
  color: var(--navy);
  font-size: 9.5pt;
  margin-bottom: 2px;
}

.portfolio-client {
  font-size: 8pt;
  color: var(--coral);
  font-weight: 600;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.portfolio-desc {
  font-size: 8.5pt;
  color: var(--text-light);
  line-height: 1.5;
  margin: 0;
}

.portfolio-url {
  font-size: 8pt;
  color: var(--navy-light);
  font-weight: 500;
  margin-top: 5px;
  display: block;
}

/* ---- PRICING ---- */
.price-total {
  background: var(--navy);
  color: white;
}

.price-total td {
  color: white !important;
  font-weight: 700 !important;
  font-size: 10.5pt;
  background: var(--navy) !important;
}

.milestone-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--coral);
  color: white;
  border-radius: 50%;
  font-size: 8pt;
  font-weight: 700;
  margin-right: 6px;
}

/* ---- FOOTER ---- */
.doc-footer {
  padding: 14px 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 8pt;
  color: var(--mid);
  margin-top: 40px;
}

/* ---- SKILLS TAGS ---- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.tag {
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--text-light);
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 8pt;
  font-weight: 500;
}

/* ---- PRINT ---- */
@media print {
  body { max-width: 100%; }
  .doc-nav { display: none; }
  .doc-header { padding: 18px 28px 16px; }
  .doc-body { padding: 24px 28px; }
  .doc-footer { padding: 10px 28px; }
  .page-break { page-break-before: always; }
  a { color: inherit; text-decoration: none; }
}

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