:root {
  --ink: #17140f;
  --ink-soft: #2f2a22;
  --muted: #756a59;
  --paper: #f4eddf;
  --paper-2: #e7d9c4;
  --paper-3: #d8c4a9;
  --line: rgba(23, 20, 15, 0.16);
  --line-strong: rgba(23, 20, 15, 0.35);
  --ember: #a94732;
  --ember-dark: #7e3327;
  --slate: #6f8287;
  --moss: #74775e;
  --shadow: 0 28px 80px rgba(23, 20, 15, 0.14);
  --display: Georgia, 'Times New Roman', serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max: 1180px;
  --gutter: clamp(20px, 4vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% -12%, rgba(169, 71, 50, 0.22), transparent 31rem),
    radial-gradient(circle at 12% 14%, rgba(111, 130, 135, 0.2), transparent 28rem),
    linear-gradient(180deg, rgba(244, 237, 223, 0.95), rgba(231, 217, 196, 0.78)),
    var(--paper);
  font-family: var(--sans);
  line-height: 1.56;
  text-rendering: optimizeLegibility;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(23, 20, 15, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 20, 15, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  z-index: 0;
}

a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--ember-dark); }
img, svg, canvas { display: block; max-width: 100%; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 99;
  transform: translateY(-180%);
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
}
.skip-link:focus { transform: translateY(0); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.signal-canvas {
  position: fixed;
  inset: 0 0 auto 0;
  width: 100%;
  height: 38vh;
  min-height: 280px;
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: multiply;
}

.site-header,
main,
.site-footer { position: relative; z-index: 1; }

.site-header {
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 26px var(--gutter) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.wordmark-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--paper);
  background: var(--ink);
  border-radius: 50%;
  font-family: var(--display);
  font-size: 1rem;
  box-shadow: 0 10px 30px rgba(23, 20, 15, 0.18);
}
.wordmark-text { font-size: 0.95rem; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 2vw, 1.65rem);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted);
}
.site-nav a {
  text-decoration: none;
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(244, 237, 223, 0.78);
  width: 48px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle span:not(.sr-only) {
  width: 20px;
  height: 1px;
  background: var(--ink);
  transition: transform 0.2s ease;
}

main {
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(130px, 0.34fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  border-top: 1px solid var(--line);
  padding: clamp(58px, 8.8vw, 112px) 0;
}

.hero {
  min-height: min(860px, calc(100vh - 70px));
  align-items: end;
  border-top: 0;
  padding-top: clamp(90px, 13vw, 180px);
}

.kicker,
.section-label,
.card-eyebrow,
.eyebrow,
.stat-label,
.timeline-time,
.feature-index,
.quote-source,
.footer-note {
  color: var(--ember-dark);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.hero-copy h1,
.section-grid h2,
.contact-card h2 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.055em;
  margin: 0;
}

.hero-copy h1 {
  max-width: 1040px;
  font-size: clamp(3rem, 8.25vw, 7.7rem);
}

.lede {
  max-width: 780px;
  margin: clamp(1.35rem, 3vw, 2.25rem) 0 0;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  color: var(--ink-soft);
}

.hero-actions,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.78rem 1.12rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 850;
  font-size: 0.88rem;
}
.button-primary { background: var(--ink); color: var(--paper); }
.button-primary:hover { color: var(--paper); background: var(--ember-dark); border-color: var(--ember-dark); }
.button-ghost { background: rgba(244, 237, 223, 0.48); }

.hero-card {
  align-self: end;
  padding: clamp(1.2rem, 2vw, 1.6rem);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(244, 237, 223, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.card-title {
  font-family: var(--display);
  font-size: clamp(1.16rem, 1.875vw, 1.875rem);
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 0.5rem 0 0.8rem;
}
.hero-card p:last-child { margin-bottom: 0; color: var(--muted); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 2.6rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  max-width: 880px;
  background: var(--line);
}
.stat {
  padding: 1rem;
  background: rgba(244, 237, 223, 0.68);
}
.stat strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.24rem, 2.4vw, 2.55rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
}
.stat span { display: block; margin-top: 0.5rem; color: var(--muted); font-size: 0.9rem; }

.section-grid h2 { font-size: clamp(2.1rem, 4.5vw, 5.25rem); max-width: 980px; }
.section-intro {
  max-width: 800px;
  color: var(--ink-soft);
  font-size: clamp(1.06rem, 1.55vw, 1.28rem);
  margin: 1.35rem 0 0;
}

.work-list {
  list-style: none;
  padding: 0;
  margin: clamp(2rem, 4vw, 3.5rem) 0 0;
  border-top: 1px solid var(--line-strong);
}
.work-list li { border-bottom: 1px solid var(--line); }
.work-list a {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 34px;
  gap: 1.2rem;
  align-items: center;
  padding: clamp(1.1rem, 2.2vw, 1.8rem) 0;
  text-decoration: none;
}
.work-number { color: var(--muted); font-variant-numeric: tabular-nums; }
.work-title {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.09rem, 2.25vw, 2.25rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}
.work-meta { display: block; color: var(--muted); margin-top: 0.25rem; }
.work-arrow { font-size: 1.4rem; transition: transform 0.18s ease; }
.work-list a:hover .work-arrow { transform: translateX(5px); }

.card-grid,
.project-grid,
.patent-grid,
.quote-grid,
.education-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}
.card,
.project-card,
.patent-card,
.quote-card,
.education-card,
.timeline-item {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(244, 237, 223, 0.58);
  padding: clamp(1.2rem, 2.3vw, 1.8rem);
  box-shadow: 0 18px 48px rgba(23, 20, 15, 0.07);
}
.card h3,
.project-card h3,
.patent-card h3,
.quote-card h3,
.education-card h3,
.timeline-item h3 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
  font-size: clamp(1.2rem, 2.025vw, 1.99rem);
  margin: 0;
}
.card p,
.project-card p,
.patent-card p,
.quote-card p,
.education-card p,
.timeline-item p {
  color: var(--muted);
  margin: 0.9rem 0 0;
}
.card.large,
.project-card.large,
.patent-card.large { grid-column: span 2; }

.timeline {
  display: grid;
  gap: 1rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}
.timeline-item {
  display: grid;
  grid-template-columns: minmax(150px, 0.28fr) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  position: relative;
}
.timeline-company {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: baseline;
  margin-bottom: 0.25rem;
}
.timeline-company h3 { margin-right: 0.2rem; }
.role-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  color: var(--ember-dark);
  background: rgba(169, 71, 50, 0.06);
  font-weight: 800;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.timeline-list {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
  color: var(--ink-soft);
}
.timeline-list li + li { margin-top: 0.38rem; }
.tech-line { margin-top: 0.9rem; color: var(--muted); font-size: 0.92rem; }

.skill-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}
.skill-group {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(1.2rem, 2.3vw, 1.8rem);
  background: rgba(244, 237, 223, 0.58);
}
.skill-group h3 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: clamp(1.09rem, 1.875vw, 1.725rem);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 500;
}
.skill-cloud { display: flex; flex-wrap: wrap; gap: 0.48rem; }
.skill-cloud span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.36rem 0.68rem;
  background: rgba(255, 255, 255, 0.16);
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.quote-card blockquote {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.875vw, 1.84rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.quote-card p { margin-top: 1rem; }

.contact { border-bottom: 1px solid var(--line); }
.contact-card {
  color: var(--paper);
  background:
    radial-gradient(circle at 20% 0%, rgba(169, 71, 50, 0.46), transparent 27rem),
    radial-gradient(circle at 80% 70%, rgba(111, 130, 135, 0.34), transparent 26rem),
    var(--ink);
  border-radius: 36px;
  padding: clamp(1.6rem, 5vw, 4rem);
  box-shadow: var(--shadow);
}
.contact-card h2 { font-size: clamp(1.76rem, 4.125vw, 4.95rem); max-width: 1000px; }
.contact-card p { max-width: 760px; color: rgba(244, 237, 223, 0.72); font-size: 1.12rem; }
.contact-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border: 1px solid rgba(244, 237, 223, 0.28);
  border-radius: 999px;
  padding: 0.72rem 1rem;
  color: var(--paper);
  text-decoration: none;
  font-weight: 800;
}
.contact-links a:hover { background: var(--paper); color: var(--ink); }

.site-footer {
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 30px var(--gutter) 48px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer p { margin: 0; }
.footer-note { color: var(--muted); text-transform: none; letter-spacing: 0.02em; font-weight: 600; max-width: 600px; }

@media (max-width: 900px) {
  .site-header { align-items: flex-start; }
  .menu-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 76px;
    right: var(--gutter);
    left: var(--gutter);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(244, 237, 223, 0.95);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.9rem; border-bottom: 1px solid var(--line); }
  .site-nav a:last-child { border-bottom: 0; }
  .section-grid,
  .hero,
  .timeline-item { grid-template-columns: 1fr; }
  .hero { padding-top: 76px; }
  .hero-card { margin-top: 1rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid,
  .project-grid,
  .patent-grid,
  .quote-grid,
  .education-grid,
  .skill-groups { grid-template-columns: 1fr; }
  .card.large,
  .project-card.large,
  .patent-card.large { grid-column: auto; }
}

@media (max-width: 560px) {
  .hero-copy h1 { font-size: clamp(2.55rem, 12.75vw, 4.875rem); }
  .work-list a { grid-template-columns: 48px minmax(0, 1fr); }
  .work-arrow { display: none; }
  .stats { grid-template-columns: 1fr; }
  .section-grid { padding: 52px 0; }
}

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