:root {
  color-scheme: light;
  --bg: #f4f0e8;
  --surface: #fbf8f1;
  --ink: #18211f;
  --muted: #606965;
  --soft: #e5ded1;
  --line: #cfc6b7;
  --accent: #a8432c;
  --accent-strong: #84331f;
  --forest: #2f594d;
  --shadow: 0 24px 70px rgba(33, 42, 38, 0.11);
  --max: 1240px;
  --serif: Iowan Old Style, Baskerville, "Times New Roman", serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14201d;
  --surface: #1b2925;
  --ink: #f1eadc;
  --muted: #adb8b1;
  --soft: #243630;
  --line: #3a4c46;
  --accent: #e17a5f;
  --accent-strong: #f08c70;
  --forest: #b9d6ca;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 8%, transparent) 1px, transparent 0);
  background-size: 24px 24px;
  content: "";
  pointer-events: none;
  opacity: 0.18;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  color: inherit;
  font: inherit;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

::selection {
  background: var(--accent);
  color: #fffaf2;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  padding: 0.8rem 1rem;
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-160%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  max-width: calc(var(--max) + 80px);
  margin: 0 auto;
  padding: 1.3rem 40px;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  transition: border-color 180ms ease, padding 180ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 0.75rem;
  font-size: 0.86rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.desktop-nav a,
.site-footer a {
  position: relative;
}

.desktop-nav a::after,
.site-footer a::after {
  position: absolute;
  right: 0;
  bottom: -0.35rem;
  left: 0;
  height: 1px;
  background: var(--accent);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.desktop-nav a:hover::after,
.desktop-nav a:focus-visible::after,
.site-footer a:hover::after,
.site-footer a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

.icon-button,
.menu-button {
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.icon-button:hover,
.menu-button:hover {
  border-color: var(--ink);
  background: var(--surface);
  transform: translateY(-2px);
}

.icon-button svg {
  width: 1.1rem;
  height: 1.1rem;
}

.moon-icon,
[data-theme="dark"] .sun-icon {
  display: none;
}

[data-theme="dark"] .moon-icon {
  display: block;
}

.menu-button,
.mobile-nav {
  display: none;
}

.hero,
.section,
.contact {
  width: min(calc(100% - 80px), var(--max));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: calc(100vh - 80px);
  padding: 7rem 0 8rem;
  overflow: hidden;
}

.hero-copy {
  max-width: 1040px;
}

.eyebrow,
.section-number,
.work-type {
  margin: 0 0 1.25rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.eyebrow span {
  width: 2.4rem;
  height: 1px;
  background: currentColor;
}

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

h1,
h2 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.04em;
}

h1 {
  max-width: 990px;
  margin-bottom: 1.7rem;
  font-size: clamp(4rem, 7.4vw, 7.2rem);
  line-height: 0.9;
}

h1 em {
  color: var(--accent);
  font-weight: 400;
}

.hero-intro {
  max-width: 900px;
  margin-bottom: 2.3rem;
  color: var(--muted);
  font-size: clamp(1.04rem, 1.6vw, 1.25rem);
  line-height: 1.68;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.button {
  display: inline-flex;
  min-height: 3.3rem;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.25rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.button svg {
  width: 1rem;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-3px);
}

.button-primary {
  background: var(--ink);
  color: var(--bg);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff8ee;
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: var(--surface);
}

.section {
  display: grid;
  grid-template-columns: 0.42fr 1fr;
  gap: clamp(3rem, 8vw, 8rem);
  padding: 9rem 0;
  border-top: 1px solid var(--line);
}

.section-heading h2,
.ai-copy h2,
.contact h2 {
  margin-bottom: 0;
  font-size: clamp(2.8rem, 5vw, 5.2rem);
  line-height: 1;
}

.about-content .lead {
  max-width: 780px;
  margin-bottom: 4rem;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.4vw, 3.1rem);
  line-height: 1.18;
}

.strength-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.strength-card {
  min-height: 260px;
  padding: 1.8rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 180ms ease, transform 180ms ease;
}

.strength-card:hover {
  background: var(--surface);
  transform: translateY(-4px);
}

.card-number {
  display: block;
  margin-bottom: 3rem;
  color: var(--accent);
  font-family: var(--serif);
  font-style: italic;
}

.strength-card h3,
.timeline-body h3,
.work-card h3,
.credential h3 {
  margin-bottom: 0.75rem;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 500;
}

.strength-card p,
.timeline-body p,
.work-card p,
.credential p,
.section-intro {
  color: var(--muted);
  line-height: 1.68;
}

.ai-band {
  display: grid;
  grid-template-columns: minmax(320px, 0.7fr) minmax(0, 1.2fr);
  gap: clamp(3rem, 8vw, 8rem);
  padding: 7rem max(40px, calc((100vw - var(--max)) / 2));
  overflow: hidden;
  background: var(--forest);
  color: var(--bg);
}

[data-theme="dark"] .ai-band {
  background: #a94f39;
  color: #fff9ee;
}

.ai-band .section-number {
  color: color-mix(in srgb, currentColor 72%, transparent);
}

.ai-copy p:last-child {
  max-width: 720px;
  margin: 2rem 0 0;
  color: color-mix(in srgb, currentColor 80%, transparent);
  font-size: 1.08rem;
  line-height: 1.75;
}

.ai-signal {
  display: flex;
  min-height: 340px;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
}

.ai-signal span {
  width: clamp(1.2rem, 2.6vw, 2.5rem);
  height: 40%;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.82;
  transform-origin: center;
  animation: signal 2.8s ease-in-out infinite;
}

.ai-signal span:nth-child(2),
.ai-signal span:nth-child(6) { height: 64%; animation-delay: -0.25s; }
.ai-signal span:nth-child(3),
.ai-signal span:nth-child(5) { height: 88%; animation-delay: -0.5s; }
.ai-signal span:nth-child(4) { height: 100%; animation-delay: -0.75s; }

@keyframes signal {
  0%, 100% { transform: scaleY(0.88); opacity: 0.64; }
  50% { transform: scaleY(1); opacity: 0.92; }
}

.experience .section-heading {
  position: sticky;
  top: 120px;
  align-self: start;
}

.experience {
  padding-bottom: 2rem;
}

.timeline {
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 0.38fr 1fr;
  gap: 2.2rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--line);
}

.timeline-item:last-child {
  border-bottom: 0;
}

.timeline-meta p {
  margin-bottom: 0.35rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.timeline-meta span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.timeline-body h3 {
  font-size: clamp(1.7rem, 3vw, 2.45rem);
}

.timeline-body p {
  max-width: 740px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.work {
  display: block;
  padding-top: 3rem;
}

.work .section-heading {
  display: grid;
  grid-template-columns: 0.42fr 1fr;
  column-gap: clamp(3rem, 8vw, 8rem);
}

.work .section-number {
  grid-row: 1 / 3;
}

.section-intro {
  max-width: 580px;
  margin: 1.5rem 0 0;
}

.work-grid {
  display: grid;
  grid-template-columns: 1.18fr 1fr 1fr;
  gap: 1rem;
  margin-top: 5rem;
}

.work-card {
  display: flex;
  min-height: 420px;
  flex-direction: column;
  padding: 2rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.work-card-static:hover {
  box-shadow: none;
  transform: none;
}

.work-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-7px);
}

.work-card-featured {
  background: var(--accent);
  color: #fff8ee;
}

.work-card-featured p,
.work-card-featured .work-type,
.work-card-featured .work-tech {
  color: color-mix(in srgb, currentColor 78%, transparent);
}

.work-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.work-card-top svg {
  width: 1.4rem;
  transition: transform 180ms ease;
}

.work-card:hover .work-card-top svg {
  transform: translate(3px, -3px);
}

.work-card h3 {
  max-width: 300px;
  margin-top: auto;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.work-tech {
  display: block;
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.credential-list {
  border-top: 1px solid var(--line);
}

.credentials {
  padding-bottom: 2rem;
}

.credential {
  display: grid;
  grid-template-columns: 0.2fr 1fr auto;
  align-items: start;
  gap: 2rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line);
}

.credential:last-child {
  border-bottom: 0;
}

.credential-link {
  transition: background 180ms ease, color 180ms ease;
}

.credential-link:hover,
.credential-link:focus-visible {
  background: var(--surface);
}

.credential-link .credential-year::after {
  content: " ↗";
}

.credential > span,
.credential-year {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.credential h3 {
  margin-bottom: 0.4rem;
}

.credential p {
  margin-bottom: 0;
}

.contact {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: clamp(3rem, 8vw, 8rem);
  padding: 3rem 0 8rem;
  border-top: 1px solid var(--line);
}

.contact h2 {
  max-width: 720px;
  margin-bottom: 1.8rem;
}

.contact-copy > p:last-child {
  max-width: 650px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.contact-link {
  display: grid;
  grid-template-columns: 0.28fr 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.contact-link span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-link strong {
  overflow-wrap: anywhere;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
}

.contact-link svg {
  width: 1.2rem;
  transition: color 160ms ease, transform 160ms ease;
}

.contact-link:hover svg {
  color: var(--accent);
  transform: translate(3px, -3px);
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  width: min(calc(100% - 80px), var(--max));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  justify-self: end;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

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

  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: grid;
    position: relative;
  }

  .menu-button > span:not(.sr-only) {
    position: absolute;
    display: block;
    width: 1rem;
    height: 1px;
    background: currentColor;
    transition: transform 180ms ease;
  }

  .menu-button > span:first-child {
    transform: translateY(-3px);
  }

  .menu-button > span:nth-child(2) {
    transform: translateY(3px);
  }

  .menu-button[aria-expanded="true"] > span:first-child {
    transform: rotate(45deg);
  }

  .menu-button[aria-expanded="true"] > span:nth-child(2) {
    transform: rotate(-45deg);
  }

  .mobile-nav {
    position: absolute;
    top: 100%;
    right: 24px;
    left: 24px;
    display: none;
    padding: 1rem;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .mobile-nav.is-open {
    display: grid;
  }

  .mobile-nav a {
    padding: 1rem;
    border-bottom: 1px solid var(--line);
    font-family: var(--serif);
    font-size: 1.4rem;
  }

  .mobile-nav a:last-child {
    border-bottom: 0;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 4rem;
  }

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

  .experience .section-heading {
    position: static;
  }

  .work .section-heading {
    grid-template-columns: 1fr;
  }

  .work .section-number {
    grid-row: auto;
  }

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

  .work-card-featured {
    grid-column: 1 / -1;
  }

  .ai-band {
    grid-template-columns: 0.65fr 1fr;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
    gap: 0.8rem;
  }

  .site-footer p:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 680px) {
  .site-header {
    padding-right: 20px;
    padding-left: 20px;
  }

  .brand-name {
    display: none;
  }

  .hero,
  .section,
  .contact,
  .site-footer {
    width: min(calc(100% - 40px), var(--max));
  }

  .hero {
    padding: 5rem 0 6rem;
  }

  h1 {
    font-size: clamp(3.3rem, 16vw, 5.3rem);
  }

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

  .button {
    width: 100%;
  }

  .section {
    gap: 3rem;
    padding: 6rem 0;
  }

  .strength-grid,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .work-card-featured {
    grid-column: auto;
  }

  .strength-card {
    min-height: 230px;
  }

  .ai-band {
    grid-template-columns: 1fr;
    padding: 5rem 20px;
  }

  .ai-signal {
    min-height: 210px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .credential {
    grid-template-columns: 1fr auto;
  }

  .credential > span {
    grid-column: 1 / -1;
  }

  .contact {
    padding: 6rem 0;
  }

  .contact-link {
    grid-template-columns: 1fr auto;
  }

  .contact-link span {
    grid-column: 1 / -1;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer a {
    justify-self: start;
  }

  .site-footer p:nth-child(2) {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  :root {
    --bg: #fff;
    --surface: #fff;
    --ink: #111;
    --muted: #444;
    --line: #ccc;
    --accent: #8c3522;
  }

  body::before,
  .site-header,
  .ai-band,
  .hero-actions,
  .site-footer {
    display: none;
  }

  .hero,
  .section,
  .contact {
    width: 100%;
    min-height: auto;
    padding: 2rem 0;
  }

  .hero {
    display: block;
  }

  h1 {
    font-size: 42pt;
  }

  .section,
  .contact {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .strength-card,
  .work-card,
  .timeline-item,
  .credential {
    break-inside: avoid;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
