:root {
  --primary: #1e6b4f;
  --primary-dark: #124532;
  --ink: #1c2a24;
  --body: #3d4a43;
  --muted: #6f7b74;
  --border: #e0e6e2;
  --bg: #f4f7f5;
  --card: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--body);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 860px; margin: 0 auto; padding: 0 24px; }

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

/* ---------- header */
.hero { background: var(--primary-dark); color: #fff; padding: 56px 0 48px; }
.hero-inner { display: flex; align-items: center; gap: 32px; }
.headshot {
  width: 168px; height: 168px; border-radius: 50%; object-fit: cover; flex: none;
  border: 4px solid rgba(255, 255, 255, 0.9);
}
.hero h1 { margin: 0; font-size: 2.4rem; line-height: 1.15; letter-spacing: -0.02em; }
.role { margin: 6px 0 16px; color: #cfe3d8; font-size: 1.05rem; }
.links { display: flex; gap: 10px; flex-wrap: wrap; }
.links a {
  color: #fff; text-decoration: none; font-weight: 500; font-size: 0.9rem;
  padding: 6px 14px; border: 1px solid rgba(255, 255, 255, 0.45); border-radius: 999px;
}
.links a:hover { background: rgba(255, 255, 255, 0.12); }
.links button {
  font: inherit; color: #fff; font-weight: 500; font-size: 0.9rem; cursor: pointer; background: none;
  padding: 6px 14px; border: 1px solid rgba(255, 255, 255, 0.45); border-radius: 999px;
}
.links button:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- sections */
section { padding: 40px 0 8px; }
h2 {
  margin: 0 0 18px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--primary);
}
h3 { margin: 0; color: var(--ink); font-size: 1.05rem; font-weight: 600; }
.lead { margin: 0; font-size: 1.08rem; color: var(--ink); }

/* ---------- projects */
.note {
  margin: 0 0 16px; padding: 12px 16px; font-size: 0.95rem;
  background: #e8f2ec; border-left: 3px solid var(--primary); border-radius: 0 8px 8px 0;
}
.note strong { color: var(--ink); }
.project {
  display: flex; gap: 24px; align-items: flex-end; justify-content: space-between;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 24px;
}
.project ~ .project { margin-top: 16px; }
.project p { margin: 8px 0 0; }
.tags { color: var(--muted); font-size: 0.88rem; }
/* Fixed column so every card's buttons share one width and height, whatever the labels say. */
.project-actions { display: flex; flex-direction: column; gap: 8px; flex: none; width: 160px; }
.project-actions .button { display: block; width: 100%; height: 40px; padding: 0 12px; line-height: 38px; }
.button {
  display: inline-block; text-align: center; text-decoration: none; font-weight: 600; font-size: 0.9rem;
  padding: 9px 18px; border-radius: 8px; background: var(--primary); color: #fff; border: 1px solid var(--primary);
}
.button:hover { background: var(--primary-dark); }
.button.ghost { background: transparent; color: var(--primary); }
.button.ghost:hover { background: #e8f2ec; }

button.button { font-family: inherit; cursor: pointer; line-height: inherit; }

/* ---------- project "About" pop-up */
.about {
  width: min(560px, calc(100% - 32px)); padding: 0; border: none; border-radius: 12px;
  color: var(--body); box-shadow: 0 20px 50px rgba(18, 69, 50, 0.25);
}
.about::backdrop { background: rgba(28, 42, 36, 0.45); }
.about-head {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 24px; border-bottom: 1px solid var(--border);
}
.about-close {
  border: none; background: none; font-size: 1.6rem; line-height: 1; color: var(--muted);
  cursor: pointer; padding: 0 4px;
}
.about-close:hover { color: var(--ink); }
.about dl { margin: 0; padding: 20px 24px 26px; }
.about dt { font-size: 1rem; font-weight: 700; color: var(--ink); }
.about dt + dd { margin: 4px 0 0; line-height: 1.65; }
.about dd + dt { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }

/* ---------- resume pop-up: the PDF in a frame, with a download button */
.about.resume { width: min(900px, calc(100% - 32px)); height: min(92vh, 1180px); overflow: hidden; }
.about.resume[open] { display: flex; flex-direction: column; }
.about.resume h3 { margin: 0; }
.resume-actions { display: flex; align-items: center; gap: 12px; }
.resume-frame { flex: 1; width: 100%; border: none; background: #525659; }

/* ---------- experience & education */
.job { padding: 0 0 22px; margin-bottom: 22px; border-bottom: 1px solid var(--border); }
.job:last-child { border-bottom: none; margin-bottom: 0; }
.job-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.dates { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.org { margin: 2px 0 8px; color: var(--muted); font-size: 0.95rem; }
.job p:last-child { margin-bottom: 0; }

/* ---------- skills */
.skills { display: grid; grid-template-columns: 200px 1fr; gap: 10px 20px; margin: 0; }
.skills dt { font-weight: 600; color: var(--ink); }
.skills dd { margin: 0; }

.footer { padding: 40px 24px 48px; color: var(--muted); font-size: 0.85rem; }

@media (max-width: 640px) {
  .hero { padding: 40px 0 36px; }
  .hero-inner { flex-direction: column; text-align: center; gap: 20px; }
  .links { justify-content: center; }
  .headshot { width: 140px; height: 140px; }
  .hero h1 { font-size: 2rem; }
  .project { flex-direction: column; align-items: stretch; }
  .project-actions { width: 100%; }
  .job-head { flex-direction: column; gap: 0; }
  .skills { grid-template-columns: 1fr; gap: 2px; }
  .skills dd { margin-bottom: 10px; }
}
