@import url('/assets/fonts/fonts.css');

:root {
  --bg: #fafaf8;
  --ink: #141414;
  --body: #2b2b2a;
  --muted: #74726d;
  --rule: #e6e4df;
  --link-line: #c9c6bf;

  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Instrument Sans', -apple-system, 'Helvetica Neue', Arial, sans-serif;

  --label: 150px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: underline; text-decoration-color: var(--link-line); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-color 0.15s, color 0.15s; }
a:hover { color: var(--ink); text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 3px; }
p { margin: 0 0 0.85em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }

.page {
  width: min(100% - 48px, 860px);
  margin: 0 auto;
  padding: clamp(48px, 9vw, 96px) 0 64px;
}

/* ── header ── */
.head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--rule);
}
.head h1 {
  font-family: var(--serif);
  font-size: clamp(42px, 6vw, 58px);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.head .role { margin: 12px 0 0; font-size: 18px; color: var(--muted); }

.contact {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  font-size: 15px;
}
.contact li { display: inline-flex; align-items: center; gap: 6px; }
.contact svg { width: 14px; height: 14px; flex: none; color: var(--ink); }

.print-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.print-btn:hover { background: var(--ink); color: var(--bg); }
.print-btn svg { width: 15px; height: 15px; }

/* ── sections ── */
.section {
  display: grid;
  grid-template-columns: var(--label) minmax(0, 1fr);
  gap: 0 32px;
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
}
.section > h2 {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 4px;
}
.section .lead { font-size: 18px; color: var(--ink); line-height: 1.55; }
.homelab-link { white-space: nowrap; }

/* ── experience ── */
.jobs { list-style: none; margin: 0; padding: 0; }
.job { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 0 20px; }
.job + .job { margin-top: 26px; }
.job .when { color: var(--muted); font-size: 14.5px; font-variant-numeric: tabular-nums; padding-top: 2px; white-space: nowrap; }
.job h3 { font-family: var(--sans); font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.job h3 .org { font-weight: 400; color: var(--body); }
.job p { margin-top: 4px; }

/* ── footer ── */
.foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-top: 24px;
  font-size: 14px;
  color: var(--muted);
}
.foot a { color: var(--muted); }

@media screen { .print-only { display: none !important; } }

/* ── small screens ── */
@media (max-width: 680px) {
  body { font-size: 16px; }
  .head { flex-direction: column; }
  .section { grid-template-columns: 1fr; gap: 14px; padding: 30px 0; }
  .job { grid-template-columns: 1fr; gap: 2px; }
}

/* ── print / PDF ── */
@page { size: Letter; margin: 0.55in 0.6in; }
@media print {
  :root { --label: 112px; }
  body { background: #fff; font-size: 10pt; line-height: 1.48; color: #222; }
  .page { width: auto; padding: 0; }
  .print-btn, .screen-only { display: none !important; }
  .head { padding-bottom: 16pt; }
  .head h1 { font-size: 30pt; }
  .head .role { font-size: 12pt; margin-top: 6pt; }
  .contact { margin-top: 10pt; font-size: 9.5pt; gap: 3pt 14pt; }
  .section { padding: 14pt 0; gap: 0 18pt; }
  .section > h2 { font-size: 8pt; padding-top: 2pt; }
  .section .lead { font-size: 11pt; }
  .job { grid-template-columns: 82px minmax(0, 1fr); gap: 0 12pt; break-inside: avoid; }
  .job + .job { margin-top: 10pt; }
  .job .when { font-size: 9pt; }
  .job h3 { font-size: 10.5pt; }
  .job p { margin-top: 1pt; }
  .foot { font-size: 8.5pt; padding-top: 10pt; }
  a { text-decoration: none; }
}
