/* ===== Theme — change --accent to recolor the whole site ===== */
/* Desert palette: sand background, parchment page, terracotta accent, sage detail */
:root {
  --accent: #9a4a28;   /* terracotta */
  --sage: #5c6748;     /* desert sage */
  --bg: #e9dcc4;       /* sand */
  --card: #faf3e4;     /* parchment */
  --text: #3a2e24;     /* dark umber */
  --muted: #7a6956;
  --border: #e0cfb2;
  --tag-bg: #f0e0c8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #e0915f;
    --sage: #a8b38f;
    --bg: #1c1712;
    --card: #26201a;
    --text: #efe4d1;
    --muted: #b4a28a;
    --border: #3b3127;
    --tag-bg: #3a2b20;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(ellipse at top, rgba(255, 244, 222, 0.55), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 820px;
  margin: 48px auto;
  padding: 48px 56px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(90, 60, 30, 0.12);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ----- Header ----- */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 2px solid var(--accent);
}
h1 { margin: 0; font-family: "Libre Baskerville", Georgia, serif; font-size: 2.4rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.role { margin: 6px 0 0; font-size: 1.1rem; font-weight: 500; }
.status { margin: 2px 0 0; font-size: 0.95rem; font-weight: 500; color: var(--sage); }
.location { margin: 2px 0 0; color: var(--muted); }

.contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 0.95rem;
  white-space: nowrap;
}
.button {
  margin-top: 8px;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
}
.button:hover { text-decoration: none; opacity: 0.9; }

/* ----- Sections ----- */
section { margin-top: 36px; }
h2 {
  margin: 0 0 16px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
h3 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.org { font-weight: 400; color: var(--muted); }

.item { margin-bottom: 22px; }
.item:last-child { margin-bottom: 0; }
.item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.dates { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.item ul { margin: 8px 0 0; padding-left: 20px; }
.item li { margin-bottom: 4px; }
.note { margin: 6px 0 0; color: var(--muted); }
.degree { margin: 2px 0 0; }
.details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 16px;
  margin: 8px 0 0;
}
.details dt { font-weight: 600; font-size: 0.9rem; color: var(--muted); }
.details dd { margin: 0; }
@media (max-width: 640px) {
  .details { grid-template-columns: 1fr; gap: 0; }
  .details dd { margin-bottom: 6px; }
}

.tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tags li {
  padding: 4px 12px;
  background: var(--tag-bg);
  color: var(--accent);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
}

footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}
footer p { margin: 0; }

/* ----- Phones ----- */
@media (max-width: 640px) {
  .page { margin: 0; padding: 28px 16px; border: none; border-radius: 0; }
  .hero { flex-direction: column; }
  .contact { align-items: flex-start; }
  h1 { font-size: 2rem; }
  .item-head { flex-direction: column; gap: 0; }
}

/* ----- Printing (Ctrl/Cmd+P gives a clean one-page-style resume) ----- */
@media print {
  :root { --bg: #fff; --card: #fff; --text: #000; --muted: #444; --accent: #8a4426; --sage: #4f5a3c; --tag-bg: #fff; }
  body { font-size: 11pt; background-image: none; }
  .page { margin: 0; padding: 0; border: none; max-width: none; box-shadow: none; }
  .button, footer { display: none; }
  .tags li { border: 1px solid #ccc; }
  section, .item { break-inside: avoid; }
}
