:root {
  color-scheme: light;
  --bg: #f6f3ed;
  --surface: #fffefa;
  --surface-strong: #ffffff;
  --text: #202124;
  --muted: #626a73;
  --line: #d9d4ca;
  --accent: #126c68;
  --accent-strong: #0a4f4b;
  --accent-soft: #d7ece9;
  --focus: #c45c31;
  --shadow: 0 18px 50px rgba(26, 31, 37, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #17191c;
  --surface: #202327;
  --surface-strong: #282c31;
  --text: #f2f0ea;
  --muted: #b8b8b0;
  --line: #3a3f45;
  --accent: #71d6cd;
  --accent-strong: #9ce5de;
  --accent-soft: #173d3a;
  --focus: #f3a15f;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 16px;
  padding: 14px max(20px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 20%);
  background: color-mix(in srgb, var(--surface), transparent 10%);
  backdrop-filter: blur(18px);
}

.site-brand {
  grid-column: 1 / -1;
  color: var(--text);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1;
}

.nav,
.header-actions,
.contact-list,
.filter-row,
.meta-list,
.skill-list,
.credential-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.nav a {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
  background: var(--accent-soft);
  outline: none;
}

.primary-button,
.icon-button,
.filter-button,
.contact-item,
.contact-link {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-strong);
  color: var(--text);
}

.primary-button {
  padding: 0 14px;
  border-color: var(--accent-strong);
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
}

.icon-button {
  width: 40px;
  font-size: 1.2rem;
}

.primary-button:focus-visible,
.icon-button:focus-visible,
.filter-button:focus-visible,
.contact-link:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus), transparent 35%);
  outline-offset: 2px;
}

.resume-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 28px auto 64px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px 28px;
  align-items: start;
  padding: 36px 0 26px;
  border-bottom: 1px solid var(--line);
}

.hero-title {
  grid-column: 1 / -1;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: none;
  margin-bottom: 10px;
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  line-height: 1;
  letter-spacing: 0;
}

.headline {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.contact-panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.contact-list {
  align-items: stretch;
}

.contact-item,
.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 8px 10px;
  color: var(--text);
  font-size: 0.92rem;
  text-decoration: none;
}

.contact-item {
  cursor: default;
}

.contact-link:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.section {
  scroll-margin-top: 210px;
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}

.contact-section {
  scroll-margin-top: 150px;
  padding: 0px 0 24px;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section h2 {
  margin-bottom: 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1;
}

.section-kicker {
  max-width: 420px;
  margin-bottom: 0;
  color: var(--muted);
}

.summary-grid,
.skill-grid,
.credential-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.summary-item,
.skill-group,
.credential {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.summary-item h3,
.skill-group h3,
.credential h3 {
  margin-bottom: 8px;
  font-size: 1.02rem;
}

.summary-item p,
.credential p {
  margin-bottom: 0;
  color: var(--muted);
}

.skill-group:only-child {
  grid-column: 1 / -1;
}

.skill-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.skill-table {
  display: grid;
  gap: 8px;
}

.skill-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: 16px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 35%);
}

.skill-row:last-child {
  border-bottom: 0;
}

.skill-row-meta {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: left;
  white-space: nowrap;
}

.skill-row-meta strong {
  color: var(--accent-strong);
}

.filter-row {
  margin-bottom: 18px;
}

.filter-button {
  padding: 8px 12px;
  color: var(--muted);
}

.filter-button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 700;
}

.experience-list {
  display: grid;
  gap: 14px;
}

.previous-experience,
.previous-experience-control {
  margin-top: 28px;
}

.previous-experience-header {
  margin-bottom: 14px;
}

.previous-toggle {
  flex: 0 0 auto;
}

.previous-experience-body {
  display: grid;
  gap: 14px;
}

.role {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.role-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 4px;
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 20%);
  padding-bottom: 6px;
}

.role-date {
  color: var(--accent-strong);
  flex: 0 0 auto;
  font-weight: 800;
  text-align: right;
}

.role h3 {
  margin-bottom: 0;
  font-size: 1.32rem;
}

.role-company {
  margin-bottom: 8px;
  color: var(--muted);
}

.role-context {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.role-context p {
  font-style: italic;
}

.role-type-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.role ul {
  margin: 0;
  padding-left: 1.2rem;
}

.role li + li {
  margin-top: 8px;
}

.meta-list {
  margin-top: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 0.83rem;
}

.skill-list,
.credential-list {
  align-items: flex-start;
}

.loading,
.empty-state {
  padding: 64px 0;
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
  }

  .nav,
  .header-actions {
    grid-column: 1 / -1;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(2.4rem, 12vw, 4rem);
  }

  .role-heading {
    display: block;
  }

  .role-date {
    margin-top: 2px;
    text-align: left;
  }

  .summary-grid,
  .skill-grid,
  .credential-grid {
    grid-template-columns: 1fr;
  }

  .section-header {
    display: block;
  }

  .section-kicker {
    margin-top: 8px;
  }

  .skill-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .skill-row-meta {
    justify-content: flex-start;
    text-align: left;
  }
}

@media print {
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-strong: #ffffff;
    --text: #111111;
    --muted: #444444;
    --line: #cccccc;
    --accent: #111111;
    --accent-strong: #111111;
    --accent-soft: #ffffff;
  }

  @page {
    margin: 0.55in;
  }

  body {
    background: #ffffff;
    font-size: 10.5pt;
    line-height: 1.35;
  }

  .site-header,
  .filter-row,
  .skill-mode-row,
  .previous-toggle,
  .previous-experience.is-collapsed {
    display: none;
  }

  .resume-shell {
    width: 100%;
    margin: 0;
  }

  .hero,
  .section {
    padding: 0 0 16px;
    break-inside: avoid;
  }

  .hero {
    grid-template-columns: 1.4fr 0.9fr;
    gap: 20px;
  }

  h1 {
    max-width: none;
    font-size: 36pt;
  }

  .headline,
  .section-kicker,
  .summary-item p,
  .credential p,
  .role-company {
    color: #333333;
  }

  .section h2 {
    font-size: 18pt;
  }

  .summary-grid,
  .skill-grid,
  .credential-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .credential-grid {
    display: block;
  }

  .contact-panel,
  .summary-item,
  .skill-group,
  .credential,
  .role {
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .credential {
    display: block;
    margin-bottom: 6pt;
    break-inside: avoid;
  }

  .credential h3 {
    display: inline;
    margin: 0;
    font-size: inherit;
    font-weight: 700;
  }

  .credential p {
    display: inline;
    margin: 0;
  }

  .credential p::before {
    content: " - ";
  }

  .role {
    break-inside: avoid;
  }

  .role-heading {
    border-bottom-color: #111111;
    gap: 10px;
    padding-bottom: 2px;
  }

  .role + .role {
    padding-top: 12px;
  }

  .pill,
  .contact-item,
  .contact-link {
    border: 0;
    padding: 0;
    min-height: 0;
  }
}
