/* Arash Lowni CV, built on the site's design system (Fraunces + Inter, warm palette) */
:root {
  --bg: #f3efe7;
  --paper: #faf6ed;
  --ink: #14110d;
  --ink-soft: #6b645c;
  --ink-muted: #968d83;
  --rule: #ddd6c8;
  --accent: #5a3a2b;
  --accent-soft: #8b6a55;
  --highlight: #ffe87a;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, sans-serif;
  --rail: 260px;
}

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

body.cv {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 40px 20px 64px;
}

/* Screen: A4-proportioned sheet, centred, with a soft shadow */
.cv-sheet {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02), 0 30px 70px -30px rgba(20,17,13,0.28);
  /* Full-height dual tone: paper on the left, dark rail on the right,
     painted on the sheet itself so it extends across every printed page. */
  background:
    linear-gradient(to right,
      var(--paper) 0, var(--paper) calc(100% - var(--rail)),
      var(--ink) calc(100% - var(--rail)), var(--ink) 100%);
}

/* Header band spanning both columns */
.cv-head {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 48px 18px;
}
.cv-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 40%;
  box-shadow: 0 0 0 1px var(--rule);
  flex: none;
}
.cv-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 60, "SOFT" 30;
}
.cv-role {
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 6px;
  letter-spacing: 0.01em;
}

/* Two columns */
.cv-grid {
  display: grid;
  grid-template-columns: 1fr var(--rail);
}
.cv-main { padding: 6px 40px 32px 48px; }
.cv-side {
  padding: 40px 40px 48px 32px;
  color: var(--paper);
}

/* Section headings */
.cv-h {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.01em;
  padding-bottom: 5px;
  margin-bottom: 11px;
  border-bottom: 1px solid var(--rule);
}
.cv-side .cv-h { border-bottom-color: rgba(250,246,237,0.22); }

.cv-block { margin-bottom: 20px; }
.cv-block:last-child { margin-bottom: 0; }

/* Profile */
.cv-profile p {
  font-size: 11px;
  line-height: 1.52;
  color: var(--ink-soft);
  max-width: 52ch;
}
.cv-profile p + p { margin-top: 8px; }

/* Highlighter, echoing the site (single tasteful use) */
.cv-mark {
  font-weight: 600;
  color: var(--ink);
  background-image:
    linear-gradient(181deg, transparent 30%, rgba(255,230,112,0.74) 33%, rgba(255,226,100,0.74) 86%, transparent 90%),
    linear-gradient(178deg, transparent 40%, rgba(255,240,150,0.5) 43%, rgba(255,222,88,0.42) 90%, transparent 94%);
  background-repeat: no-repeat;
  padding: 0.06em 0.16em 0.02em;
  border-radius: 0.2em 0.5em 0.28em 0.55em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Experience */
.cv-exp { list-style: none; display: flex; flex-direction: column; gap: 13px; }
.cv-exp .date {
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.cv-exp .co {
  font-size: 13px;
  font-weight: 600;
  margin-top: 3px;
}
.cv-exp .role {
  font-size: 12px;
  color: var(--accent);
  margin-top: 1px;
}
.cv-exp p {
  font-size: 11px;
  line-height: 1.44;
  color: var(--ink-soft);
  margin-top: 5px;
  max-width: 54ch;
}

/* Condensed earlier roles */
.cv-earlier { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.cv-earlier li { font-size: 11px; line-height: 1.4; color: var(--ink-soft); }
.cv-earlier .co { font-weight: 600; color: var(--ink); }
.cv-earlier .yr { color: var(--ink-muted); }

/* Sidebar blocks */
.cv-side .cv-block { margin-bottom: 28px; }
.cv-field { margin-bottom: 12px; }
.cv-field:last-child { margin-bottom: 0; }
.cv-field .k {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(250,246,237,0.65);
}
.cv-field .v { font-size: 11.5px; margin-top: 3px; line-height: 1.45; }
.cv-side a { color: var(--paper); text-decoration: none; border-bottom: 1px solid rgba(250,246,237,0.35); }
.cv-side a:hover { border-bottom-color: var(--paper); }
.cv-skills { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.cv-skills li { font-size: 11.5px; color: rgba(250,246,237,0.9); }

/* Screen-only print button */
.cv-print {
  position: fixed;
  top: 20px; right: 20px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  box-shadow: 0 8px 20px -12px rgba(20,17,13,0.4);
  transition: background 0.2s, color 0.2s;
}
.cv-print:hover { background: var(--ink); color: var(--paper); }

/* Print: clean A4 */
@media print {
  @page { size: A4; margin: 0; }
  body.cv { background: #fff; padding: 0; }
  .cv-sheet {
    max-width: none;
    width: 100%;
    border-radius: 0;
    box-shadow: none;
  }
  .cv-print { display: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cv-exp li, .cv-block { break-inside: avoid; }
}

@media (max-width: 640px) {
  :root { --rail: 0px; }
  .cv-sheet { background: var(--paper); }
  .cv-grid { grid-template-columns: 1fr; }
  .cv-side {
    color: var(--ink);
    background: var(--ink);
    color: var(--paper);
    margin: 0 -1px;
    padding: 32px 24px 40px;
  }
  .cv-main { padding: 8px 24px 32px; }
  .cv-head { padding: 32px 24px 20px; }
}
