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

/* Structural/layout layer, shared by every theme. Themes (theme-*.css) load
   after this file and redefine the tokens below plus a few additive rules
   (decorative backgrounds, hover flourishes) — they never touch layout. */

:root {
  --bg: #fdfdfc;
  --ink: #1a1a18;
  --ink-2: #55554f;
  --ink-3: #91918a;
  --rule: #e4e3de;
  --accent: #55554f;
  --on-accent: #fdfdfc;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 700px;
  --btn-radius: 3px;
  --tag-radius: 20px;
  --tag-bg: #f4f3ef;
  --card-bg: transparent;
  --card-border: none;
  --card-radius: 0px;
  --card-padding: 0px;
}

* { 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;
  position: relative;
}

/* Themes may add a decorative body::before (grid, gradient, dot pattern) —
   it renders behind everything else. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.resume {
  position: relative;
  z-index: 1;
  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;
}

.tagline {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink-2);
  max-width: 46ch;
}

.contact {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
  letter-spacing: 0.005em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 6px;
}

.contact .c-item:not(:first-child)::before {
  content: "·";
  margin: 0 7px;
  color: var(--ink-3);
}

.cta-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--btn-radius);
  padding: 9px 18px;
  transition: opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  color: var(--on-accent);
  background: var(--accent);
  border: 1px solid var(--accent);
}

.btn-primary:hover { opacity: 0.88; }

.btn-secondary {
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
}

.btn-secondary:hover { color: var(--on-accent); background: var(--accent); }

.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);
}

.weather {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.weather[hidden] {
  display: none;
}

.weather-icon {
  display: inline-block;
  vertical-align: middle;
  margin: -3px -2px;
}

/* ---- 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);
}

/* ---- case studies (Featured Work) ---- */

.case-study {
  margin-bottom: 34px;
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: var(--card-padding);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.case-study:last-child { margin-bottom: 0; }

.case-label {
  margin: 14px 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.case-study .case-label:first-of-type { margin-top: 10px; }

.case-study > p:not(.case-label) {
  margin: 0;
  color: var(--ink-2);
}

/* ---- skill tags ---- */

.tag-group-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.tag-list:last-child { margin-bottom: 0; }

.tag {
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--tag-bg, #f4f3ef);
  border: 1px solid var(--rule);
  border-radius: var(--tag-radius);
  padding: 5px 12px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

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(--on-accent);
  background: var(--accent);
  border: none;
  border-radius: var(--btn-radius);
  padding: 9px 20px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

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

.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) ---- */

.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); }

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

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

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

  .header { margin-bottom: 34px; }

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

  .tagline { font-size: 16px; max-width: none; }

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

  .contact .c-item:not(:first-child)::before { margin: 0 5px; }

  .cta-row { margin-top: 18px; }

  .form-row input,
  .form-row textarea { font-size: 16px; }

  .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 ---- */

@page { margin: 6mm 12mm; }

@media print {
  body { background: #fff; font-size: 7.8pt; line-height: 1.18; }
  .resume { max-width: 100%; padding: 0; }
  .back-link, .cta-row, .print-hide { display: none; }
  .header { margin-bottom: 4px; }
  .header h1 { font-size: 15pt; margin-bottom: 2px; }
  .tagline { margin-bottom: 3px; font-size: 8.5pt; max-width: none; }
  .contact { font-size: 7.8pt; }
  .section { margin-bottom: 3px; padding-top: 3px; }
  .section h2 { font-size: 9.5pt; margin-bottom: 2px; }
  .entry, .case-study { break-inside: avoid; margin-bottom: 3px; }
  .entry-head { margin-bottom: 0; }
  .entry-head h3 { font-size: 8.5pt; }
  .org { font-size: 7.5pt; margin-bottom: 1px; }
  .dates { font-size: 7pt; }
  .entry p, .case-study p { margin-bottom: 1px; }
  .entry ul, .case-study ul { margin-top: 1px; }
  .entry li, .case-study li { padding-left: 11px; margin-bottom: 0px; }
  .entry li::before, .case-study li::before { top: 6px; }
  .case-label { margin: 2px 0 1px; font-size: 7pt; }
  .tag-group-label { font-size: 7pt; margin-bottom: 1px; }
  .tag-list, .tags { gap: 3px; margin-bottom: 3px !important; }
  .tag { font-size: 7pt; padding: 1px 6px; }
  a { color: var(--ink); text-decoration: none; border: 0; }
}
