/* Resume — Maya Lindqvist
   A light "paper on a desk" document: warm off-white page on a subtle grey
   backdrop, system serif (Charter family), one spruce-green accent used only
   for links, rules, and tick marks. Print-ready A4 via the block at the end. */

:root {
  --backdrop: #eae8e1;
  --paper: #fbfaf6;
  --paper-soft: #f4f2ea;
  --ink: #24221d;
  --ink-soft: #5b564b;
  --ink-faint: #746e61;
  --rule: #e3e0d5;
  --rule-strong: #cdc8b9;
  --accent: #22684f;
  --accent-deep: #1b5440;
  --accent-wash: rgba(34, 104, 79, 0.07);
  --font-serif: "Charter", "Bitstream Charter", "Sitka Text", Cambria, "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 1px 2px rgba(60, 52, 38, 0.06), 0 18px 44px -18px rgba(60, 52, 38, 0.28);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

body {
  margin: 0;
  background-color: var(--backdrop);
  background-image: radial-gradient(circle, rgba(74, 66, 50, 0.06) 1px, transparent 1.4px);
  background-size: 24px 24px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(34, 104, 79, 0.16); }

a { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- layout: sheet of paper, optional left rail ---------- */

.layout { padding: 48px 20px 72px; }

.nav-col { display: none; }

.paper {
  max-width: 820px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: clamp(28px, 6vw, 64px);
}

@media (min-width: 900px) {
  .layout {
    display: grid;
    grid-template-columns: 176px minmax(0, 820px);
    gap: 48px;
    justify-content: center;
    align-items: stretch;
  }
  .nav-col { display: block; }
  .site-nav { position: sticky; top: 48px; }
}

/* ---------- "On this page" nav ---------- */

.site-nav { font-family: var(--font-sans); font-size: 12.5px; line-height: 1.4; }

.nav-label {
  margin: 0 0 10px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.site-nav ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule-strong); }

.site-nav a {
  display: block;
  margin-left: -1px;
  padding: 6px 10px 6px 14px;
  border-left: 2px solid transparent;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 140ms ease-out, border-color 140ms ease-out;
}

.site-nav a:hover { color: var(--ink); }

.site-nav a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}

/* ---------- masthead: name, headline, contact, actions ---------- */

.actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}

.btn {
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 120ms ease-out, background-color 140ms ease-out,
    border-color 140ms ease-out, color 140ms ease-out;
}

.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); }

.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--rule-strong); }
.btn-ghost:hover { border-color: var(--ink-faint); color: var(--ink); }

body.editing #btn-edit {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.name {
  margin: 0;
  font-size: clamp(2rem, 5.5vw + 1rem, 3.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.headline {
  margin: 12px 0 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 26px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--rule);
  list-style: none;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-soft);
}

.contact li { display: inline-flex; align-items: center; gap: 7px; }

.contact svg { width: 14px; height: 14px; color: var(--ink-faint); flex: none; }

.contact a {
  color: var(--accent);
  text-decoration: none;
  padding: 6px 0; /* comfortable tap target without scaling the icon */
}

.contact a:hover,
.contact a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- sections ---------- */

section { margin-top: 42px; scroll-margin-top: 28px; }

.section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 16px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* small caps heading with a thin rule: short accent tick, then a hairline */
.section-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--accent) 32px, var(--rule) 32px);
}

.summary {
  margin: 0;
  max-width: 68ch;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink);
}

/* ---------- experience ---------- */

.entry + .entry { margin-top: 28px; }

.entry-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 16px;
}

.role {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.dates {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  white-space: nowrap;
}

.org {
  margin: 4px 0 0;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.org-city { margin-left: 6px; font-weight: 400; color: var(--ink-faint); }

.bullets { margin: 10px 0 0; padding: 0; list-style: none; }

.bullets li {
  position: relative;
  margin-top: 7px;
  padding-left: 22px;
  font-size: 15.5px;
  line-height: 1.6;
}

/* short accent tick as the bullet marker */
.bullets li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 0.72em;
  width: 9px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* ---------- education ---------- */

.edu {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 12px 0;
}

.edu + .edu { border-top: 1px solid var(--rule); }

.edu-main { min-width: 0; }

.edu-degree {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.35;
}

.edu-school {
  margin: 3px 0 0;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-soft);
}

.edu-dates {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  white-space: nowrap;
}

/* ---------- skills ---------- */

.skill-group + .skill-group { margin-top: 18px; }

.skill-group h3 {
  margin: 0 0 9px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  font-family: var(--font-sans);
  font-size: 12.5px;
  line-height: 1;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--ink-soft);
}

/* ---------- projects ---------- */

.project { padding: 13px 0; }

.project + .project { border-top: 1px solid var(--rule); }

.project-name {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.35;
}

.project-tag {
  margin-left: 10px;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.project-desc {
  margin: 4px 0 0;
  max-width: 68ch;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------- footer ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  margin-top: 46px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-faint);
}

/* ---------- edit mode ---------- */

.edit-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 24px;
  padding: 10px 14px;
  border: 1px solid rgba(34, 104, 79, 0.25);
  border-radius: 8px;
  background: rgba(34, 104, 79, 0.06);
  font-family: var(--font-sans);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--accent-deep);
}

.edit-banner svg { width: 15px; height: 15px; margin-top: 2px; flex: none; }

.edit-banner[hidden] { display: none; }

body.editing [data-editable] {
  caret-color: var(--accent);
  transition: background-color 140ms ease-out, box-shadow 140ms ease-out;
}

body.editing [data-editable]:hover {
  background: var(--accent-wash);
  box-shadow: 0 0 0 3px rgba(34, 104, 79, 0.08);
}

body.editing [data-editable]:focus {
  outline: none;
  background: var(--accent-wash);
  box-shadow: 0 0 0 2px var(--accent);
}

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- print: clean A4 resume ---------- */

@media print {
  @page { size: A4; margin: 12mm; }

  html { scroll-behavior: auto; }

  body {
    background: #fff;
    background-image: none;
    color: #191919;
    font-size: 10.5pt;
    line-height: 1.55;
  }

  .layout { padding: 0; }

  /* screen-only affordances: the nav rail, the buttons, the editing banner */
  .nav-col,
  .actions,
  .edit-banner { display: none !important; }

  .paper {
    max-width: none;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: none;
  }

  section { margin-top: 24pt; }

  /* keep whole sections / entries on one page */
  #summary, #education, #skills, #projects { break-inside: avoid; }
  .entry, .edu, .project, .skill-group, .masthead { break-inside: avoid; }
  .section-head, .name, .role, .edu-degree, .project-name { break-after: avoid; }

  .name { font-size: 26pt; }
  .headline { font-size: 11pt; margin-top: 8pt; }

  .contact { margin-top: 16pt; padding-top: 10pt; font-size: 9pt; gap: 4pt 18pt; }

  .section-head { margin-bottom: 10pt; font-size: 8.5pt; }

  .summary { font-size: 10.5pt; }

  .entry + .entry { margin-top: 18pt; }
  .role { font-size: 12.5pt; }
  .org { font-size: 9.5pt; margin-top: 2pt; }
  .dates { font-size: 8.5pt; }
  .bullets { margin-top: 5pt; }
  .bullets li { margin-top: 4pt; padding-left: 16pt; font-size: 10.5pt; }
  .bullets li::before { top: 0.72em; left: 0.5pt; width: 7pt; height: 1.2pt; }

  .edu { padding: 7pt 0; }
  .edu-degree { font-size: 11.5pt; }
  .edu-school { font-size: 9.5pt; margin-top: 2pt; }
  .edu-dates { font-size: 8.5pt; }

  .skill-group + .skill-group { margin-top: 11pt; }
  .skill-group h3 { font-size: 8pt; margin-bottom: 6pt; }
  .chips { gap: 5px; }
  .chip { font-size: 9pt; padding: 4px 10px; }

  .project { padding: 8pt 0; }
  .project-name { font-size: 11.5pt; }
  .project-tag { font-size: 7.5pt; }
  .project-desc { font-size: 10.5pt; margin-top: 3pt; }

  .foot { margin-top: 22pt; padding-top: 7pt; font-size: 8pt; }

  p, li { orphans: 3; widows: 3; }
}
