/* =========================================================
   Settings: change these to restyle the whole page
   ========================================================= */
:root {
  --ink: #111111;          /* headings, name */
  --text: #2d2d2d;         /* body text */
  --muted: #7a7a7a;        /* dates, labels */
  --rule: #e2e2e2;         /* thin lines */
  --card: #fafafa;         /* project card background */
  --accent: #0f766e;       /* impact lines and links */
  --bg: #ececec;           /* behind the page */

  --font: Arial, "Helvetica Neue", Helvetica, sans-serif;

  --page-width: 880px;
  --pad-x: 64px;           /* left/right margin inside the page */
  --pad-y: 56px;           /* top/bottom margin inside the page */
  --section-gap: 40px;     /* space between sections */
}

/* =========================================================
   Base
   ========================================================= */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { margin: 0; padding: 0; }

/* The white "sheet" */
.page {
  max-width: var(--page-width);
  margin: 40px auto;
  padding: var(--pad-y) var(--pad-x);
  background: #fff;
  border-top: 6px solid var(--ink);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
}

/* =========================================================
   Header
   ========================================================= */
h1 {
  margin: 0;
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--ink);
}

.tagline {
  margin: 10px 0 14px;
  font-size: 1.02rem;
  color: var(--text);
}

.contact {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  font-size: 0.85rem;
  color: var(--muted);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.header { padding-bottom: 4px; }
.links a {
  padding: 5px 14px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
}
.links a:hover {
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}

/* =========================================================
   Section headings (wide-spaced caps, from the PDF)
   ========================================================= */
section { margin-top: var(--section-gap); }

h2 {
  margin: 0 0 18px;
  padding-bottom: 10px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5em;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}

.section-note {
  margin: -6px 0 18px;
  font-size: 0.9rem;
  color: var(--muted);
}

h3 { margin: 0; font-size: 1rem; color: var(--ink); line-height: 1.3; }
h4 { margin: 0; font-size: 0.92rem; font-style: italic; color: var(--ink); }

.year {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--muted);
  white-space: nowrap;
}

.place { margin: 0; font-size: 0.86rem; color: var(--muted); }

/* =========================================================
   Competencies: three labeled groups of chips
   ========================================================= */
.skill-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.skill-group h3 {
  margin-bottom: 8px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.chips {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 12px;
  border-left: 2px solid var(--rule);
}
.chips li { font-size: 0.86rem; line-height: 1.4; }

/* =========================================================
   Projects: card grid
   ========================================================= */
.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 6px;
}
.card-wide { grid-column: 1 / -1; }
.card { transition: border-color 0.15s, box-shadow 0.15s; }
.card:hover { border-color: #cfcfcf; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); }

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.card-top .year { padding-top: 2px; }

.impact {
  margin: 6px 0 8px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent);
}

.card p:not(.impact) {
  margin: 0 0 12px;
  font-size: 0.88rem;
}

.tech {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.tech li {
  padding: 2px 9px;
  font-size: 0.74rem;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--muted);
}

/* push links to the bottom so cards line up */
.card-links {
  margin-top: auto;
  display: flex;
  gap: 18px;
  font-size: 0.84rem;
  font-weight: 700;
}
.internal { font-weight: 400; font-style: italic; color: var(--muted); }

/* =========================================================
   Experience: vertical timeline
   ========================================================= */
.timeline {
  list-style: none;
  position: relative;
  padding-left: 26px;
}
.timeline::before {                /* the vertical line */
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--rule);
}

.job { position: relative; margin-bottom: 28px; }
.job:last-child { margin-bottom: 0; }
.job::before {                     /* the dot on the line */
  content: "";
  position: absolute;
  left: -26px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--ink);
}

.job-head, .role-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.role { margin-top: 14px; padding-left: 14px; border-left: 2px solid var(--rule); }

.job ul { list-style: none; margin-top: 6px; }
.job ul > li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 3px;
  font-size: 0.9rem;
}
.job ul > li::before {
  content: "\2013";
  position: absolute;
  left: 0;
  color: var(--muted);
}
.job strong { color: var(--ink); font-weight: 600; }

/* =========================================================
   Education
   ========================================================= */
.edu { list-style: none; }
.edu li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 0.94rem;
}
.edu strong { color: var(--ink); }

.pill {
  margin-left: 6px;
  padding: 1px 8px;
  font-size: 0.7rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  vertical-align: 2px;
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  margin-top: var(--section-gap);
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}
.footer p { margin: 0; }
#visitor-count { font-weight: 700; color: var(--ink); }

/* =========================================================
   Tablets
   ========================================================= */
@media (max-width: 860px) {
  :root { --pad-x: 36px; --pad-y: 40px; }
  .page { margin: 0; box-shadow: none; }
  .skill-groups { grid-template-columns: 1fr 1fr; }
}

/* =========================================================
   Phones
   ========================================================= */
@media (max-width: 600px) {
  :root { --pad-x: 20px; --pad-y: 28px; --section-gap: 32px; }
  body { font-size: 14px; }
  h1 { font-size: 2.1rem; }
  h2 { letter-spacing: 0.32em; }
  .skill-groups, .projects { grid-template-columns: 1fr; }
  .card-top, .job-head, .role-head, .edu li { flex-direction: column; gap: 0; }
}

/* =========================================================
   Print (Ctrl+P)
   ========================================================= */
@media print {
  body { background: #fff; font-size: 12px; }
  .page { margin: 0; padding: 0; max-width: none; box-shadow: none; border-top-width: 4px; }
  .links, .footer, .card-links { display: none; }
  .card { break-inside: avoid; background: #fff; }
  .job { break-inside: avoid; }
  a { color: var(--ink); }
}