:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
  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;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-160%);
  padding: 10px 14px;
  border: 2px solid var(--focus);
  border-radius: 7px;
  background: var(--surface-strong);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.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;
  margin: 0;
  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,
.view-toggle,
.filter-button,
.document-link,
.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: var(--accent-contrast);
  font-weight: 700;
}

.document-link {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

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

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

.primary-button:focus-visible,
.icon-button:focus-visible,
.filter-button:focus-visible,
.document-link: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;
  padding-bottom: 54px;
}

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

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

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

.eyebrow {
  margin: 0;
  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: 800px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.18rem, 2vw, 1.48rem);
  font-weight: 550;
  line-height: 1.42;
}

.resume-version {
  position: fixed;
  right: max(16px, calc((100vw - 1120px) / 2));
  bottom: 16px;
  z-index: 8;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid color-mix(in srgb, var(--line), transparent 10%);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-strong), transparent 6%);
  box-shadow: var(--shadow);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  backdrop-filter: blur(16px);
}

.resume-version-print {
  display: none;
}

.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-intro {
  max-width: 900px;
  margin-bottom: 18px;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 520;
  line-height: 1.5;
}

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

.view-toggle {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  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,
.engagement-list {
  margin-bottom: 8px;
  color: var(--muted);
}

.engagement-list p {
  margin: 0;
}

.engagement-list p + p {
  margin-top: 3px;
}

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

.engagement-list + .role-context {
  margin-top: -5px;
}

.role-context p {
  margin: 0 0 0 18px;
  font-style: italic;
}

.role-context p + p {
  margin-top: 3px;
}

.role-context p + .role-type-list {
  margin-top: 10px;
}

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

.accolade-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.accolade {
  margin: 0;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}

.accolade blockquote {
  margin: 0;
  color: var(--ink);
  font-style: italic;
}

.accolade figcaption {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.88rem;
}

.accolade figcaption::before {
  content: "-- ";
}

.accolade-grid {
  display: grid;
  gap: 12px;
}

.accolade-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.accolade-card .accolade-list,
.accolade-card .accolade {
  margin: 0;
}

.accolade-role-context {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

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

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

.outcome-list {
  margin-top: 16px;
  padding: 14px 16px;
  border-left: 4px solid var(--accent);
  background: color-mix(in srgb, var(--accent-soft), transparent 40%);
}

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

.outcome-list ul {
  margin: 0;
}

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

.ats-resume {
  max-width: 850px;
  margin: 0 auto;
  padding: 12px 0 48px;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.42;
}

.ats-header {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.ats-header h1 {
  margin-bottom: 6px;
  font-size: 2rem;
  line-height: 1.1;
}

.ats-header p,
.ats-section p,
.ats-role p {
  margin-bottom: 6px;
}

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

.ats-section h2 {
  margin-bottom: 10px;
  font-size: 1.35rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.ats-role {
  margin-top: 18px;
}

.ats-role h3 {
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.ats-resume ul {
  margin: 8px 0 0;
  padding-left: 1.2rem;
}

.ats-resume li + li {
  margin-top: 5px;
}

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

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    gap: 8px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .site-brand {
    font-size: clamp(1.7rem, 8vw, 2rem);
  }

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

  .nav {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
    scroll-padding-inline: 20px;
    -webkit-overflow-scrolling: touch;
  }

  .nav a {
    flex: 0 0 auto;
  }

  .header-actions {
    width: 100%;
  }

  .view-toggle {
    flex: 1 1 auto;
  }

  .primary-button {
    flex: 1 1 auto;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 28px;
  }

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

  .headline {
    max-width: 100%;
    font-size: 1.1rem;
    line-height: 1.48;
  }

  .resume-shell {
    padding-bottom: 0;
  }

  .resume-version {
    position: static;
    margin: 10px 0 0;
    width: fit-content;
    max-width: 100%;
    box-shadow: none;
    backdrop-filter: none;
  }

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

  .ats-section {
    scroll-margin-top: 170px;
  }
}
