/* Editorial — serif display, sans body, hairline rules, monochrome. */

:root {
  --bg: #fdfdfc;
  --ink: #1a1a18;
  --ink-2: #55554f;
  --ink-3: #91918a;
  --rule: #e4e3de;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 700px;
}

* { box-sizing: border-box; }

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

.resume {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 88px 28px 120px;
}

/* ---- header ---- */

.header {
  margin-bottom: 44px;
}

.header h1 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.contact {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
  letter-spacing: 0.005em;
}

.contact a {
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.contact a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.sep {
  margin: 0 7px;
  color: var(--ink-3);
}

/* ---- sections ---- */

.section {
  margin-bottom: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
}

.section h2 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.section > p {
  margin: 0 0 10px;
  color: var(--ink-2);
}

.section > p:last-child { margin-bottom: 0; }

.section > p strong {
  font-weight: 600;
  color: var(--ink);
}

/* ---- entries ---- */

.entry { margin-bottom: 26px; }
.entry:last-child { margin-bottom: 0; }

.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 1px;
}

.entry-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.002em;
}

.org {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink-2);
}

.entry:last-child .org:last-child { margin-bottom: 0; }

.org a {
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

.org a:hover { color: var(--ink); border-bottom-color: var(--ink); }

.dates {
  flex-shrink: 0;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink-3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.entry ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.entry li {
  position: relative;
  padding-left: 17px;
  margin-bottom: 7px;
  color: var(--ink-2);
}

.entry li:last-child { margin-bottom: 0; }

.entry li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 12.5px;
  width: 5px;
  height: 1px;
  background: var(--ink-3);
}

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

/* ---- contact form ---- */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-row label {
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: 0.01em;
}

.form-row input,
.form-row textarea {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 9px 10px;
  resize: vertical;
  transition: border-color 0.15s ease;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--ink-3);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form button {
  align-self: flex-start;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--bg);
  background: var(--ink);
  border: none;
  border-radius: 3px;
  padding: 9px 20px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.contact-form button:hover { opacity: 0.85; }

.form-status {
  margin: 0;
  font-size: 13px;
  color: var(--ink-2);
  min-height: 1.2em;
}

.form-status.success { color: #2a6b3f; }
.form-status.error { color: #a4342a; }

/* ---- standalone pages (contact / feedback) ---- */

.back-link {
  margin: 0 0 28px;
}

.back-link a {
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
}

.back-link a:hover { color: var(--ink); }

/* ---- page tabs ---- */

.page-tabs {
  display: flex;
  gap: 28px;
  justify-content: center;
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
}

.page-tab {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.page-tab:hover { color: var(--ink); }

.page-tab.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ---- responsive ---- */

@media (max-width: 600px) {
  body { font-size: 14.5px; }

  .resume { padding: 52px 22px 80px; }

  .header { margin-bottom: 34px; }

  .header h1 { font-size: 31px; }

  .contact { font-size: 13px; line-height: 1.85; }

  .sep { margin: 0 5px; }

  .section { margin-bottom: 32px; padding-top: 22px; }

  .section h2 { font-size: 18px; margin-bottom: 15px; }

  /* Reorder so each entry reads: role → org → dates → detail. */
  .entry { display: flex; flex-direction: column; }
  .entry-head { display: contents; }
  .entry-head h3 { order: 1; }
  .org { order: 2; margin-bottom: 2px; }
  .dates { order: 3; margin-bottom: 9px; white-space: normal; }
  .entry ul { order: 4; }
  .entry:last-child .dates:last-child { margin-bottom: 0; }
}

/* ---- print ---- */

@media print {
  body { background: #fff; font-size: 10.5pt; line-height: 1.45; }
  .resume { max-width: 100%; padding: 0; }
  .header h1 { font-size: 24pt; }
  .section { break-inside: avoid; margin-bottom: 18px; padding-top: 14px; }
  .section h2 { font-size: 13pt; margin-bottom: 10px; }
  .entry { margin-bottom: 14px; }
  a { color: var(--ink); text-decoration: none; border: 0; }
}
