:root {
  --bg: #f4efe6;
  --paper: #fffaf1;
  --paper-strong: #fffdf8;
  --ink: #111c17;
  --muted: #626d66;
  --line: #d6c9b7;
  --accent: #0c6a4a;
  --accent-dark: #064432;
  --accent-soft: #e3f0e8;
  --surface: #eadfce;
  --shadow: 0 18px 54px rgb(17 28 23 / 10%);
  --max: 1180px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #eee4d5 0, var(--bg) 26rem, #fbf8f1 100%);
  color: var(--ink);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration-color: rgb(14 111 81 / 38%);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-dark);
  text-decoration-color: currentColor;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-150%);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1rem;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
  width: min(var(--max), calc(100% - 32px));
  margin: 0.75rem auto 0;
  padding: 0.7rem;
  border: 1px solid rgb(214 201 183 / 72%);
  border-radius: 999px;
  background: rgb(255 250 241 / 82%);
  backdrop-filter: blur(18px);
  min-width: 0;
  box-shadow: 0 14px 36px rgb(17 28 23 / 7%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  width: max-content;
  font-size: 0.95rem;
  font-weight: 760;
  letter-spacing: 0;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper-strong);
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 850;
  box-shadow: 0 8px 20px rgb(22 35 29 / 8%);
}

.nav {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  padding: 0.28rem;
  border: 0;
  border-radius: 999px;
  background: rgb(234 223 206 / 68%);
  box-shadow: none;
}

.nav a {
  border-radius: 999px;
  padding: 0.48rem 0.78rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 680;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}

.nav a:hover,
.nav a.is-active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.nav-pdf {
  display: none;
}

.print-button,
.primary-link,
.secondary-link {
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.91rem;
  font-weight: 760;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.print-button,
.primary-link {
  background: var(--ink);
  color: var(--paper);
  padding: 0.72rem 1rem;
}

.print-short {
  display: none;
}

.secondary-link {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
  padding: 0.72rem 1rem;
}

.print-button:hover,
.primary-link:hover,
.secondary-link:hover {
  transform: translateY(-1px);
}

.print-button:hover,
.primary-link:hover {
  background: var(--accent-dark);
  color: var(--paper);
}

.secondary-link:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

section[id] {
  scroll-margin-top: 7rem;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.76fr);
  gap: clamp(2rem, 5vw, 5.5rem);
  align-items: center;
  min-height: auto;
  padding: clamp(2.6rem, 6vw, 6rem) 0 clamp(3rem, 6vw, 6rem);
}

.hero::before {
  content: "";
  position: absolute;
  left: -10vw;
  right: -10vw;
  bottom: 0;
  height: 1px;
  background: var(--line);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 11ch;
  margin-bottom: 1.4rem;
  font-size: 5.15rem;
  line-height: 0.95;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

h1 span {
  display: block;
}

.lead {
  max-width: 780px;
  margin-bottom: 2rem;
  color: #4f5b54;
  font-size: 1.24rem;
  line-height: 1.65;
}

.contact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  max-width: 760px;
}

.contact-strip a,
.contact-strip span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 250 241 / 74%);
  padding: 0.58rem 0.82rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgb(17 28 23 / 12%);
  border-radius: 8px;
  background: #14231d;
  box-shadow: var(--shadow);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgb(255 255 255 / 8%), transparent 42%),
    linear-gradient(180deg, rgb(12 106 74 / 24%), transparent 70%);
  pointer-events: none;
}

.panel-topline {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgb(255 250 241 / 14%);
  padding: 1.05rem 1.1rem;
  color: rgb(255 250 241 / 68%);
  font-size: 0.86rem;
}

.panel-topline strong {
  color: var(--paper-strong);
}

.architecture-map {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  padding: 4rem 1.1rem;
}

.node {
  display: grid;
  min-height: 64px;
  place-items: center;
  border: 1px solid rgb(14 111 81 / 22%);
  border-radius: 8px;
  background: rgb(255 250 241 / 9%);
  color: rgb(255 250 241 / 88%);
  font-weight: 820;
  box-shadow: none;
}

.node-main {
  grid-row: span 2;
  min-height: 140px;
  background: var(--paper-strong);
  color: var(--accent-dark);
  font-size: 2rem;
}

.quick-stats {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  margin: 0;
  border-top: 1px solid rgb(255 250 241 / 14%);
}

.quick-stats div {
  display: grid;
  grid-template-columns: 0.45fr 1fr;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgb(255 250 241 / 14%);
}

.quick-stats div:last-child {
  border-bottom: 0;
}

.quick-stats dt {
  color: var(--paper-strong);
  font-weight: 850;
}

.quick-stats dd {
  margin: 0;
  color: rgb(255 250 241 / 66%);
}

.section {
  display: grid;
  grid-template-columns: minmax(190px, 0.32fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  border-top: 1px solid var(--line);
  padding: clamp(3.4rem, 7vw, 6rem) 0;
}

.section-intro {
  padding-top: 0;
}

.section-heading {
  max-width: 420px;
}

.sticky-heading {
  position: sticky;
  top: 6rem;
  align-self: start;
}

.section-heading h2,
.cta h2 {
  margin-bottom: 0;
  font-size: 3.35rem;
  line-height: 1;
  letter-spacing: 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.2rem, 3vw, 2.5rem);
  color: var(--muted);
  font-size: 1.16rem;
}

.summary-grid p {
  margin: 0;
}

.skill-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgb(214 201 183 / 84%);
  border-radius: 8px;
  background: rgb(214 201 183 / 84%);
}

.skill-item {
  min-height: 220px;
  background: rgb(255 250 241 / 80%);
  padding: clamp(1.2rem, 2.2vw, 2rem);
}

.skill-item h3,
.job h3 {
  margin-bottom: 0.55rem;
  font-size: 1.42rem;
  line-height: 1.12;
}

.skill-item p {
  margin: 0;
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgb(214 201 183 / 84%);
  border-radius: 8px;
  background: rgb(214 201 183 / 84%);
}

.job {
  display: grid;
  grid-template-columns: minmax(160px, 0.32fr) minmax(0, 1fr);
  gap: clamp(1.1rem, 3vw, 2.4rem);
  background: rgb(255 250 241 / 80%);
  padding: clamp(1.25rem, 2.4vw, 2rem);
}

.job-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 680;
}

.role {
  margin-bottom: 0.9rem;
  color: var(--accent-dark);
  font-weight: 820;
}

.job ul {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.compact-section {
  padding-bottom: clamp(2.8rem, 6vw, 5rem);
}

.cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: end;
  margin-bottom: 3rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #111c17, #183428);
  color: var(--paper);
  padding: clamp(1.35rem, 4vw, 3rem);
}

.cta .eyebrow {
  color: #98e0bc;
}

.cta h2 {
  max-width: 850px;
}

.cta-actions {
  display: flex;
  gap: 0.7rem;
}

.cta .primary-link {
  background: var(--paper);
  color: var(--ink);
}

.cta .secondary-link {
  border-color: rgb(255 253 248 / 24%);
  color: var(--paper);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

:focus-visible {
  outline: 3px solid rgb(14 111 81 / 48%);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
    border-radius: 8px;
  }

  .nav {
    order: 3;
    grid-column: 1 / -1;
    width: 100%;
    overflow-x: auto;
    justify-content: space-between;
  }

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

  .hero {
    min-height: auto;
  }

  h1 {
    max-width: 12ch;
    font-size: 4.3rem;
  }

  .section-heading h2,
  .cta h2 {
    font-size: 2.65rem;
  }

  .sticky-heading {
    position: static;
  }

  .cta {
    align-items: start;
  }
}

@media (max-width: 720px) {
  main,
  .site-header,
  .site-footer {
    width: min(var(--max), calc(100% - 32px));
  }

  .brand span:last-child {
    display: none;
  }

  .site-header {
    grid-template-columns: 1fr auto;
    justify-content: space-between;
    gap: 0.75rem;
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    margin-top: 0.5rem;
    padding: 0.55rem;
    overflow: hidden;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 0.1rem;
    padding: 0.18rem;
    min-width: 0;
    max-width: 100%;
    justify-content: space-between;
  }

  .nav a {
    flex: 0 0 auto;
    padding: 0.44rem 0.55rem;
    font-size: 0.84rem;
  }

  .print-button {
    display: none;
  }

  .nav-pdf {
    display: inline-flex;
  }

  h1 {
    max-width: 100%;
    font-size: 2.36rem;
    line-height: 1;
  }

  .lead,
  .summary-grid {
    font-size: 1.04rem;
  }

  .lead {
    max-width: 32ch;
  }

  .section-heading h2,
  .cta h2 {
    font-size: 1.86rem;
    line-height: 1.1;
  }

  .skill-item h3,
  .job h3 {
    font-size: 1.22rem;
  }

  .contact-strip {
    flex-direction: column;
  }

  .contact-strip a,
  .contact-strip span {
    width: 100%;
  }

  .hero-panel {
    display: none;
  }

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

  .skill-item {
    min-height: auto;
  }

  .job-meta {
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.75rem;
  }

  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-link,
  .secondary-link {
    text-align: center;
  }
}

@media (max-width: 420px) {
  .nav-pdf {
    display: none;
  }

  h1 {
    font-size: 2.1rem;
  }
}

@media print {
  :root {
    --bg: #ffffff;
    --paper: #ffffff;
    --ink: #111111;
    --muted: #333333;
    --line: #c8c8c8;
    --accent: #111111;
    --accent-dark: #111111;
  }

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

  .site-header,
  .hero-panel,
  .cta,
  .site-footer,
  .skip-link {
    display: none !important;
  }

  main {
    width: 100%;
  }

  .hero {
    display: block;
    min-height: 0;
    padding: 0 0 1.1rem;
  }

  h1 {
    max-width: none;
    margin-bottom: 0.45rem;
    font-size: 30pt;
    line-height: 1.05;
  }

  .lead {
    max-width: none;
    margin-bottom: 0.7rem;
    font-size: 10.5pt;
  }

  .contact-strip {
    display: block;
  }

  .contact-strip a,
  .contact-strip span {
    display: inline;
    border: 0;
    padding: 0;
    background: transparent;
  }

  .contact-strip a::after,
  .contact-strip span::after {
    content: " | ";
  }

  .contact-strip span:last-child::after {
    content: "";
  }

  .section {
    display: block;
    break-inside: avoid;
    border-top: 1px solid #c8c8c8;
    padding: 0.9rem 0;
  }

  .section-heading {
    max-width: none;
    margin-bottom: 0.45rem;
  }

  .section-heading h2,
  .cta h2 {
    font-size: 15pt;
    line-height: 1.15;
  }

  .summary-grid,
  .skill-list,
  .timeline,
  .job {
    display: block;
    border: 0;
    background: transparent;
  }

  .skill-item,
  .job {
    break-inside: avoid;
    border-top: 1px solid #d8d8d8;
    padding: 0.55rem 0;
    background: transparent;
  }

  .skill-item h3,
  .job h3 {
    margin-bottom: 0.18rem;
    font-size: 12pt;
  }

  .job-meta {
    display: block;
    color: #333333;
  }

  .job-meta span + span::before {
    content: " - ";
  }

  .job ul {
    gap: 0;
  }
}
