:root {
  --bg: #f4efe6;
  --bg-strong: #efe8dc;
  --paper: #fbf8f2;
  --ink: #2e2a24;
  --muted: #5c5449;
  --line: #e0d7c7;
  --accent: #b8552e;
  --accent-dark: #99441f;
  --sage: #5c5449;
  --shadow: 0 1px 2px rgba(46, 42, 36, 0.05), 0 8px 24px rgba(46, 42, 36, 0.06);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 18px;
  line-height: 1.62;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 48px);
  background: rgba(239, 232, 220, 0.96);
  border-bottom: 2px solid var(--accent-dark);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent-dark);
  font-size: 0.78rem;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  color: var(--ink);
  font-size: 0.92rem;
}

.site-nav a {
  position: relative;
  color: inherit;
  text-decoration: none;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 1px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

.resources-menu {
  position: relative;
}

.resources-menu summary {
  position: relative;
  color: inherit;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.resources-menu summary::-webkit-details-marker {
  display: none;
}

.resources-menu summary::after {
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 1px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}

.resources-menu summary:hover::after,
.resources-menu[open] summary::after {
  transform: scaleX(1);
}

.resources-submenu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  z-index: 40;
  display: grid;
  width: min(72vw, 430px);
  max-height: min(70vh, 560px);
  padding: 10px;
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.site-nav .resources-submenu a {
  display: block;
  padding: 9px 10px;
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  border-bottom: 1px solid var(--line);
}

.site-nav .resources-submenu a::after {
  display: none;
}

.site-nav .resources-submenu a:last-child {
  border-bottom: 0;
}

.site-nav .resources-submenu a.selected {
  color: var(--accent-dark);
  font-weight: 700;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 18px;
  height: 1px;
  margin: 5px auto;
  background: var(--ink);
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(33px, 4.5vw, 57px) clamp(18px, 4vw, 48px) clamp(68px, 9vw, 118px);
  scroll-margin-top: 82px;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
  min-height: auto;
  padding-top: 5.5rem;
  padding-bottom: 5rem;
  border-bottom: 1px solid var(--line);
}

.hero-text .greeting {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1.1rem;
  font-style: italic;
}

.hero-text h1 {
  max-width: none;
  margin: 0 0 0.5rem;
  font-size: clamp(2.3rem, 5vw, 3.4rem);
  line-height: 1.08;
}

.hero-text .role {
  margin: 0 0 1.5rem;
  color: var(--accent-dark);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 500;
}

.hero-text .lead {
  max-width: 46ch;
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.eyebrow,
.meta,
.project-stats,
figcaption {
  color: var(--muted);
  font-size: 0.8rem;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 500;
  line-height: 1.05;
}

h1 {
  max-width: 830px;
  font-size: clamp(2.3rem, 5vw, 3.4rem);
}

h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
}

h3 {
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
}

h4 {
  margin: 28px 0 8px;
  color: var(--accent-dark);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.subtitle {
  color: var(--accent-dark);
  font-size: clamp(1.25rem, 2.6vw, 2rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button,
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  color: var(--accent-dark);
  font: inherit;
  font-size: 0.98rem;
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 999px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.button.primary,
button[type="submit"] {
  color: #fdf9f2;
  background: var(--accent);
  border-color: var(--accent);
}

.button:hover,
button[type="submit"]:hover {
  transform: translateY(-1px);
}

.button.primary:hover,
button[type="submit"]:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.portrait-wrap {
  position: relative;
  margin: 0;
}

.portrait {
  width: 100%;
  margin: 0;
  aspect-ratio: auto;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  filter: none;
}

.hero-photo::after {
  position: absolute;
  z-index: -1;
  inset: 16px -16px -16px 16px;
  content: "";
  border: 1px solid var(--accent);
  border-radius: 10px;
  opacity: 0.35;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(150px, 0.34fr) minmax(0, 1fr);
  gap: 24px;
  align-items: baseline;
  padding-bottom: 28px;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.prose {
  max-width: 980px;
  color: var(--muted);
}

.two-column {
  columns: 2 340px;
  column-gap: clamp(36px, 6vw, 82px);
}

.two-column p {
  break-inside: avoid;
  margin-top: 0;
}

.project-list {
  display: grid;
  gap: 28px;
}

.project-source {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 28px;
  align-items: center;
  padding: 20px 0 34px;
  border-bottom: 1px solid var(--line);
}

.project-source p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
}

.project-source .actions {
  justify-content: end;
  margin: 0;
}

.project {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 44px);
  align-items: start;
  padding: clamp(30px, 5vw, 56px) 0;
  border-bottom: 1px solid var(--line);
}

.project:first-child {
  border-top: 0;
}

.summary {
  color: var(--accent-dark);
  font-size: 1.18rem;
}

.project-copy h3 {
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
}

.project-media {
  position: sticky;
  top: 104px;
  margin: 0;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.project-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.project-gallery img:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
}

/* Project gallery slider */
.project-gallery.is-slider {
  display: block;
}

.project-slider-viewport {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
}

.project-gallery.is-slider .project-slider-image {
  display: none;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  padding: 12px;
  background: var(--paper);
  border: 0;
}

.project-gallery.is-slider .project-slider-image.is-active {
  display: block;
}

.project-slider-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.project-slider-button {
  min-width: 42px;
  min-height: 42px;
  color: var(--accent-dark);
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.project-slider-button:hover,
.project-slider-button:focus-visible {
  color: var(--paper);
  background: var(--accent-dark);
  outline: none;
}

.project-slider-status {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.project-slider-thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.project-slider-thumbnail {
  flex: 0 0 88px;
  height: 58px;
  padding: 2px;
  cursor: pointer;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 4px;
}

.project-gallery.is-slider .project-slider-thumbnail-image {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  padding: 0;
  object-fit: cover;
  background: transparent;
  border: 0;
}

.project-slider-thumbnail.is-active,
.project-slider-thumbnail:hover,
.project-slider-thumbnail:focus-visible {
  border-color: var(--accent-dark);
  outline: none;
}

figcaption {
  grid-column: 1 / -1;
  margin-top: 9px;
  font-style: italic;
}

.family-feature {
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 50px);
  align-items: start;
  padding: clamp(30px, 5vw, 56px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.family-media {
  position: sticky;
  top: 104px;
  margin: 0;
}

.family-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.family-copy h3 {
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
}

ul {
  padding-left: 1.2rem;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.pill-list li {
  padding: 4px 10px;
  color: var(--accent-dark);
  background: var(--bg-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.92rem;
}

.text-link {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

/* Education cards */
.edu-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.edu-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  padding: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.edu-logo {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.edu-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.edu-item h3 {
  margin: 0 0 0.25rem;
  font-size: 1.2rem;
}

.edu-meta {
  margin: 0 0 0.7rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.edu-item p {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.97rem;
}

.edu-item ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.edu-item ul li {
  margin-bottom: 0.2rem;
}

.edu-item ul strong {
  color: var(--ink);
}

/* Experience timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--line);
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 1.5rem;
  padding: 0 0 2rem 1.75rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.4rem;
  width: 12px;
  height: 12px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--accent);
}

.timeline li:last-child { padding-bottom: 0; }

.tl-when {
  padding-top: 0.15rem;
  color: var(--accent-dark);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.tl-what h3 {
  margin: 0 0 0.3rem;
  font-size: 1.12rem;
}

.tl-what p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
}
.resume-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.resume-actions {
  padding: 18px;
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.resume-panel iframe {
  display: block;
  width: 100%;
  height: min(1180px, 120vh);
  background: #fff;
  border: 0;
}

.resource-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.resource-viewer-heading {
  padding: clamp(18px, 3vw, 28px);
  border-bottom: 1px solid var(--line);
}

.resource-viewer-heading h3 {
  margin: 4px 0 0;
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
}

.resource-viewer {
  position: relative;
  background: #fff;
}

.resource-frame {
  display: block;
  width: 100%;
  height: min(900px, 78vh);
  background: #fff;
  border: 0;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(280px, 1.15fr);
  gap: clamp(26px, 4vw, 48px);
  align-items: start;
}

.contact-section {
  background: var(--bg-strong);
  box-shadow: 0 0 0 100vmax var(--bg-strong);
  clip-path: inset(0 -100vmax);
}

.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: start;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  text-decoration: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: transform 160ms ease, border-color 160ms ease;
}

.contact-card:hover,
.contact-card:focus-visible {
  border-color: var(--accent);
  outline: none;
  transform: translateY(-2px);
}

.card-icon {
  display: grid;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--accent-dark);
  background: #efe1d6;
  border-radius: 50%;
  font-family: Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.contact-card > span:last-child {
  min-width: 0;
}

.card-label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card-link {
  display: block;
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.contact-form {
  padding: clamp(22px, 4vw, 38px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.contact-form h3 {
  margin-bottom: 18px;
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
}

.contact-form label {
  display: block;
  margin: 16px 0 6px;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 11px 13px;
  color: var(--ink);
  font: inherit;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(184, 85, 46, 0.12);
}

textarea {
  resize: vertical;
}

.honeypot {
  display: none;
}

button[type="submit"] {
  width: 100%;
  margin-top: 18px;
}

.form-status {
  min-height: 1.4em;
  margin-top: 12px;
  color: var(--sage);
}

.site-footer {
  padding: 20px clamp(18px, 4vw, 48px);
  color: #fdf9f2;
  text-align: center;
  background: var(--ink);
  border-top: 1px solid var(--accent-dark);
}

/* Home page image slider */
.home-image-slider {
  position: relative;
  width: 100%;
  padding: 18px clamp(18px, 4vw, 48px);
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.home-image-slider__viewport {
  overflow: hidden;
  outline-offset: 4px;
}

.home-image-slider__track {
  display: flex;
  transition: transform 0.5s ease;
}

.home-image-slider__slide {
  flex: 0 0 25%;
  min-width: 0;
  margin: 0;
  padding: 0 6px;
}

.home-image-slider__slide img {
  display: block;
  width: 100%;
  height: clamp(130px, 16vw, 230px);
  object-fit: cover;
  border: 1px solid var(--line);
}

.home-image-slider__controls {
  display: flex;
  justify-content: space-between;
  position: absolute;
  inset: 50% 24px auto;
  pointer-events: none;
}

.home-image-slider__button {
  width: 42px;
  height: 42px;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  background: rgba(19, 54, 46, 0.85);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
  transform: translateY(-50%);
}

.home-image-slider__button:hover,
.home-image-slider__button:focus-visible {
  background: var(--accent-dark);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.site-footer p {
  margin: 0.4rem 0;
  font-size: 0.95rem;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #fff;
  outline: none;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 24px;
  margin-top: 12px;
}

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

  .brand span:last-child {
    max-width: 210px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-toggle {
    display: block;
    position: relative;
    z-index: 30;
  }

  .site-nav {
    position: fixed;
    inset: 71px 0 auto 0;
    display: grid;
    gap: 0;
    padding: 10px clamp(18px, 4vw, 48px) 24px;
    background: rgba(239, 232, 220, 0.99);
    border-bottom: 2px solid var(--accent-dark);
    transform: translateY(-120%);
    transition: transform 180ms ease;
  }

  .site-nav.open {
    transform: translateY(0);
  }

  .site-nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  .resources-menu {
    border-bottom: 1px solid var(--line);
  }

  .resources-menu summary {
    padding: 14px 0;
  }

  .resources-submenu {
    position: static;
    width: 100%;
    max-height: 45vh;
    padding: 0 0 6px 14px;
    margin: 0 0 8px;
    overflow: auto;
    background: transparent;
    border: 0;
    box-shadow: none;
    transform: none;
  }

  .site-nav .resources-submenu a {
    padding: 10px 0;
    color: var(--muted);
  }

  .hero,
  .project,
  .project-source,
  .family-feature,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .project-media {
    position: static;
  }

  .family-media {
    position: static;
  }

  .project-source .actions {
    justify-content: start;
  }

  .portrait {
    width: min(100%, 360px);
    margin: 0;
  }

  .hero-photo::after {
    display: none;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .home-image-slider__slide {
    flex-basis: 33.333%;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  .section {
    padding-top: 32px;
    padding-bottom: 58px;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    font-size: clamp(3.1rem, 16vw, 4.8rem);
  }

  .actions,
  .resume-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .project-gallery {
    grid-template-columns: 1fr;
  }

  .project-gallery img:first-child {
    grid-column: auto;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .edu-item {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 1rem;
    padding: 1.1rem;
  }

  .edu-logo {
    width: 64px;
    height: 64px;
    padding: 6px;
  }

  .logo-link,
  .remote-logo {
    width: 132px;
  }

  .resume-panel iframe {
    height: 78vh;
  }

  .home-image-slider {
    padding-right: 12px;
    padding-left: 12px;
  }

  .home-image-slider__slide {
    flex-basis: 50%;
    padding: 0 4px;
  }

  .home-image-slider__controls {
    inset-right: 14px;
    inset-left: 14px;
  }
}
