
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #1f2937;
  background: #f7f7fb;    
  line-height: 1.55;
}

.page {
  max-width: 900px;
  margin: 32px auto;
  padding: 0 16px;
}

.resume {
  background: #ffffff;      /* card */
  border: 1px solid #e5e7eb;/* line */
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

/* ===== Header ===== */
.top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;          /* allows wrapping on small screens */
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 18px;
  margin-bottom: 22px;
}
.name { font-size: 2rem; font-weight: 800; }
.role { color: #6b7280; margin-top: 2px; }

/* Contact: no flex-gap; stack items with block + margins */
.contact { text-align: right; }
.contact > * { display: block; }
.contact a { color: #2563eb; text-decoration: none; }
.contact a:hover { text-decoration: underline; }
.contact > * + * { margin-top: 4px; }

/* ===== Two-Column Layout (flex, with fallbacks) ===== */
.grid { display: flex; }
.grid > aside { flex: 0 0 320px; max-width: 320px; }
.grid > section { flex: 1 1 auto; min-width: 0; }
/* manual spacing between columns instead of gap */
.grid > section { margin-left: 24px; }

/* ===== Section Headings ===== */
h2 {
  font-size: 1rem;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: #111827;
  margin: 20px 0 10px;
  position: relative;
  bottom: -12px;
}
.rule { height: 1px; background: #e5e7eb; margin: 10px 0 16px; }

/* ===== Content Blocks ===== */
.block { margin-bottom: 18px; }
.pill {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  font-size: 0.9rem;
  margin: 4px 6px 0 0;      /* acts like gap */
  background: #fafafa;
}

/* row container without flex gap */
.row { display: flex; align-items: center; flex-wrap: wrap; }

.list-tight { margin: 6px 0 0 0; padding: 0 0 0 18px; }
.list-tight li { margin: 6px 0; }

.item { margin: 12px 0 18px; }
.item .title { font-weight: 700; }
.sub { color: #6b7280; font-size: 0.95rem; }
.bullets { margin: 6px 0 0 0; padding-left: 18px; }
.bullets li { margin: 6px 0; }
.refs small { color: #6b7280; }

/* ===== Utilities ===== */
.space { height: 8px; }

/* ===== Print Styles (A4-friendly) ===== */
@media print {
  body { background: #ffffff; }
  .page { margin: 0; padding: 0; }
  .resume { box-shadow: none; border: none; border-radius: 0; padding: 0.5in; }
  .top { margin-bottom: 12px; padding-bottom: 12px; }
  .grid { display: block; }
  .grid > section { margin-left: 0; }
  a { color: black !important; text-decoration: none !important; }
}

/* ===== Mobile ===== */
@media (max-width: 760px) {
  .top { align-items: flex-start; }
  .contact { text-align: left; }
  .grid { display: block; }
  .grid > section { margin-left: 0; margin-top: 24px; }
}