/* ── Web version: Refined adapted for screen ──────────────────
   Playfair Display (name + headers) + Lora (body). Warm teal.
   Responsive, no print/page rules.
─────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400;1,700&family=Lora:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600&display=swap');

/* ── Color tokens ────────────────────────────────────────────── */
:root {
  --bg-page:       #f5f5f0;
  --bg-card:       #ffffff;
  --shadow:        rgba(0,0,0,0.08);
  --text:          #1a1a1a;
  --text-muted:    #666;
  --text-subtle:   #777;
  --heading:       #0f2027;
  --accent:        #1a6b5a;
  --accent-hover:  #145a4b;
  --bullet:        #888;
}

body.dark {
  --bg-page:       #141414;
  --bg-card:       #1e1e1e;
  --shadow:        rgba(0,0,0,0.5);
  --text:          #e0e0d8;
  --text-muted:    #9a9a90;
  --text-subtle:   #9a9a90;
  --heading:       #f0f0e8;
  --accent:        #4db899;
  --accent-hover:  #3da888;
  --bullet:        #9a9a90;
}

@media (prefers-color-scheme: dark) {
  body:not(.light) {
    --bg-page:       #141414;
    --bg-card:       #1e1e1e;
    --shadow:        rgba(0,0,0,0.5);
    --text:          #e0e0d8;
    --text-muted:    #9a9a90;
    --text-subtle:   #9a9a90;
    --heading:       #f0f0e8;
    --accent:        #4db899;
    --accent-hover:  #3da888;
    --bullet:        #9a9a90;
  }
}

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

html { background: var(--bg-page); }
html.dark { background: #141414; }
@media (prefers-color-scheme: dark) {
  html:not(.light) { background: #141414; }
}

body {
  font-family: 'Lora', serif;
  font-size: 16px;
  color: var(--text);
  line-height: 1.6;
  background: var(--bg-card);
  max-width: 780px;
  margin: 48px auto;
  padding: 56px 64px;
  box-shadow: 0 2px 16px var(--shadow);
  transition: background-color 0.2s, color 0.2s;
}

@media (max-width: 860px) {
  body { margin: 0; padding: 36px 28px; box-shadow: none; }
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
hr { display: none; }
strong { font-weight: 600; color: var(--heading); }

/* ── Toolbar (PDF link + theme toggle) ───────────────────────── */
.toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.pdf-link {
  font-family: 'Lora', serif;
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.03em;
}
.pdf-link:hover { text-decoration: underline; }

.theme-toggle {
  background: none;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  font-family: 'Lora', serif;
  font-size: 0.75rem;
  padding: 2px 8px;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: background 0.15s, color 0.15s;
}
.theme-toggle:hover {
  background: var(--accent);
  color: var(--bg-card);
}

/* ── Name ────────────────────────────────────────────────────── */
h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--heading);
  margin-bottom: 6px;
}

/* ── Contact ─────────────────────────────────────────────────── */
h1 + p {
  font-family: 'Lora', serif;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ── Section headings ────────────────────────────────────────── */
h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 4px;
  margin-top: 36px;
  margin-bottom: 16px;
  letter-spacing: 0.01em;
  transition: color 0.15s;
}
h2:hover { color: var(--accent-hover); }

/* ── Job title ───────────────────────────────────────────────── */
h3 {
  font-family: 'Lora', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 2px;
  transition: color 0.15s;
}
h3:hover { color: var(--accent); }

/* ── Company / date line ─────────────────────────────────────── */
h3 + p {
  font-size: 0.875rem;
  color: var(--text-subtle);
  font-style: italic;
  margin-bottom: 10px;
}

/* ── Bullets ─────────────────────────────────────────────────── */
ul {
  list-style: none;
  padding-left: 14px;
  margin-bottom: 16px;
}

li {
  font-size: 0.9rem;
  margin-bottom: 5px;
  position: relative;
}

li::before {
  content: "›";
  color: var(--bullet);
  font-size: 0.8rem;
  position: absolute;
  left: -13px;
  top: 1px;
  line-height: inherit;
  transition: color 0.15s;
}
li:hover::before { color: var(--accent); }

/* ── Body paragraphs ─────────────────────────────────────────── */
p {
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--text);
}

/* ── Contact row ─────────────────────────────────────────────── */
.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  align-items: center;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
}

.contact-item svg { color: var(--accent); flex-shrink: 0; }
a.contact-item:hover { color: var(--accent); }

/* ── Skills table ────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; margin-bottom: 12px; table-layout: auto; }
thead { display: none; }
col { width: auto !important; }
td {
  font-size: 0.88rem;
  padding: 3px 0;
  vertical-align: top;
  color: var(--text);
}
td:first-child {
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  padding-right: 12px;
  width: 0;
}

/* ── Print ───────────────────────────────────────────────────── */
@media print {
  html, body {
    --bg-page:      white !important;
    --bg-card:      white !important;
    --shadow:       none !important;
    --text:         black !important;
    --text-muted:   #444 !important;
    --text-subtle:  #555 !important;
    --heading:      #0f2027 !important;
    --accent:       #1a6b5a !important;
    --accent-hover: #145a4b !important;
    --bullet:       #888 !important;
    background: white !important;
  }
  body {
    max-width: none;
    margin: 0;
    padding: 0.5in;
    box-shadow: none;
    font-size: 10pt;
    color: black;
  }
  .toolbar { display: none; }
  a { color: inherit !important; text-decoration: none !important; }
  h2 { break-after: avoid; }
  h3 { break-after: avoid; }
  ul { break-inside: avoid; }
}
