:root {
  --ink: #1a1c22;
  --ink-soft: #4a4f5c;
  --muted: #8a8f9c;
  --accent: #2f5d8a;
  --rule: #e4e7ec;
  --bg: #f6f7f9;
  --card: #ffffff;
  --max: 820px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

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

.resume {
  max-width: var(--max);
  margin: 40px auto;
  background: var(--card);
  padding: 56px 60px 40px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 12px 36px rgba(16, 24, 40, 0.06);
}

/* Masthead */
.masthead {
  text-align: center;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 8px;
}
.masthead h1 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: clamp(2.2rem, 6vw, 3rem);
  letter-spacing: -0.01em;
  margin: 0;
}
.tagline {
  color: var(--accent);
  font-weight: 500;
  margin: 6px 0 16px;
  font-size: 0.98rem;
}
.contact {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  padding: 0;
  margin: 0;
  font-size: 0.92rem;
}
.contact li { position: relative; }
.contact li + li::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted);
  transform: translateY(-50%);
}

/* Section blocks */
.block { margin-top: 30px; }
.block > h2 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 16px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}

/* Skills */
.skills { margin: 0; }
.skills > div {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 4px 16px;
  padding: 3px 0;
}
.skills dt { font-weight: 600; color: var(--ink); margin: 0; }
.skills dd { margin: 0; color: var(--ink-soft); }

/* Experience entries */
.entry { margin-bottom: 18px; }
.entry:last-child { margin-bottom: 0; }
.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.entry-head h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
}
.entry-head .role {
  font-weight: 400;
  color: var(--ink-soft);
}
.dates {
  flex: none;
  color: var(--muted);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.entry ul {
  margin: 7px 0 0;
  padding-left: 18px;
  color: var(--ink-soft);
}
.entry li { margin: 3px 0; }
.entry .meta { margin: 4px 0 0; color: var(--ink-soft); }

.site-foot {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  text-align: center;
}
.counter {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}
#visit-count { font-weight: 600; color: var(--accent); }

/* Responsive */
@media (max-width: 640px) {
  .resume { margin: 0; border-radius: 0; padding: 32px 22px; border-left: none; border-right: none; }
  .entry-head { flex-direction: column; gap: 2px; }
  .dates { font-size: 0.82rem; }
  .skills > div { grid-template-columns: 1fr; gap: 0; padding: 6px 0; }
}

/* Print */
@media print {
  body { background: #fff; font-size: 11pt; }
  .resume { box-shadow: none; border: none; margin: 0; max-width: none; padding: 0; }
  .site-foot { display: none; }
  a { color: var(--ink); }
}
