/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #f7f6f3;
  --surface:   #ffffff;
  --border:    #ddd9d0;
  --accent:    #1a5f9e;
  --accent-lt: #e8f0f9;
  --text:      #1c1c1c;
  --muted:     #5e5e5e;
  --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Consolas', 'Menlo', monospace;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  padding: 2rem 1rem;
}

/* ── Page wrapper ─────────────────────────────────── */
header, main {
  max-width: 860px;
  margin: 0 auto;
}

/* ── Header ───────────────────────────────────────── */
header {
  background: var(--accent);
  color: #fff;
  padding: 2rem 2.5rem;
  border-radius: 6px 6px 0 0;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

header .tagline {
  font-size: 0.95rem;
  font-family: var(--font-mono);
  opacity: 0.8;
  margin-top: 0.2rem;
  margin-bottom: 1rem;
}

header .contact {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  font-size: 0.85rem;
  opacity: 0.92;
}

header .contact a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Main card ────────────────────────────────────── */
main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 6px 6px;
  padding: 2rem 2.5rem;
}

/* ── Sections ─────────────────────────────────────── */
section {
  margin-bottom: 2rem;
}

section:last-child {
  margin-bottom: 0;
}

section h2 {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 2px solid var(--accent-lt);
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
}

/* ── Skills grid ──────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.8rem;
}

.skill-group {
  background: var(--accent-lt);
  border-left: 3px solid var(--accent);
  padding: 0.6rem 0.9rem;
  border-radius: 0 4px 4px 0;
}

.skill-group h3 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.skill-group p {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.4;
}

/* ── Job entries ──────────────────────────────────── */
.job {
  margin-bottom: 1.4rem;
}

.job:last-child {
  margin-bottom: 0;
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.job-header h3 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
}

.job-header .company {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.job-header .dates {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--muted);
  white-space: nowrap;
  padding-top: 0.2rem;
}

.job ul {
  padding-left: 1.2rem;
}

.job ul li {
  font-size: 0.88rem;
  margin-bottom: 0.3rem;
  color: #2e2e2e;
}

/* ── Two-column bottom ────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

/* ── Project entries ──────────────────────────────── */
.project {
  margin-bottom: 1rem;
}

.project h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.project p {
  font-size: 0.87rem;
  color: #2e2e2e;
}

/* ── Plain list (certs, awards) ───────────────────── */
.plain-list {
  list-style: none;
  padding: 0;
}

.plain-list li {
  font-size: 0.88rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
  color: #2e2e2e;
}

.plain-list li:last-child {
  border-bottom: none;
}

.cert-year {
  color: var(--muted);
  font-size: 0.82rem;
}

/* ── Print ────────────────────────────────────────── */
@media print {
  body { background: #fff; padding: 0; }
  header { border-radius: 0; }
  main { border: none; border-radius: 0; }
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 620px) {
  header, main { padding: 1.2rem 1rem; }
  .two-col { grid-template-columns: 1fr; }
  .job-header { flex-direction: column; }
  header .contact { flex-direction: column; gap: 0.3rem; }
}
