:root {
  color-scheme: light;
  --paper: #f7f3ec;
  --ink: #171717;
  --vermilion: #b84a3f;
  --stone: #6f6c66;
  --rule: #d9d2c7;
  --serif: "Iowan Old Style", "Baskerville", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: Inter, "Helvetica Neue", Arial, sans-serif;
  --page-gutter: clamp(1.25rem, 5vw, 5rem);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(5.5rem + env(safe-area-inset-top, 0px));
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

a { color: inherit; }

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

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  min-height: calc(4.65rem + env(safe-area-inset-top, 0px));
  margin-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
  margin-right: max(var(--page-gutter), env(safe-area-inset-right, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.wordmark {
  display: flex;
  align-items: center;
  min-height: 44px;
  width: fit-content;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-decoration: none;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 3rem);
}

.main-nav a,
.footer-top {
  display: flex;
  align-items: center;
  min-height: 44px;
  position: relative;
  padding: 0.55rem 0 0.5rem;
  color: var(--ink);
  font-size: 0.86rem;
  text-decoration: none;
  transition: color 160ms ease;
}

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

.main-nav a:hover,
.main-nav a[aria-current="location"] { color: var(--vermilion); }

.main-nav a:hover::after,
.main-nav a[aria-current="location"]::after { transform: scaleX(1); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1.15rem;
  min-height: 3.1rem;
  padding: 0.8rem 1.35rem;
  border: 1px solid var(--vermilion);
  background: var(--vermilion);
  color: #fffaf3;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.button:hover { background: transparent; color: var(--vermilion); }
.button:active { background: #963b33; color: #fffaf3; }
.button--small { min-height: 2.35rem; padding: 0.5rem 1rem; font-size: 0.8rem; }

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  width: fit-content;
  border-bottom: 1px solid var(--stone);
  padding-bottom: 0.18rem;
  font-size: 0.95rem;
  text-decoration: none;
}

.text-link:hover { color: var(--vermilion); border-color: var(--vermilion); }
.text-link:active { color: #963b33; border-color: #963b33; }
.text-link--accent { display: inline-flex; gap: 1rem; color: var(--vermilion); border-color: var(--vermilion); }

.section {
  position: relative;
  padding: 3.8rem max(var(--page-gutter), env(safe-area-inset-right, 0px)) 4.2rem
    max(var(--page-gutter), env(safe-area-inset-left, 0px));
  scroll-margin-top: calc(4.65rem + env(safe-area-inset-top, 0px));
}

.intro {
  display: flex;
  align-items: center;
  min-height: min(850px, calc(100svh - 4.65rem));
  padding-top: 4.6rem;
  padding-bottom: 5.8rem;
}

.intro-copy { width: min(100%, 76rem); }

.eyebrow {
  margin: 0;
  color: var(--stone);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  line-height: 1.3;
  text-transform: uppercase;
}

.intro h1 {
  display: flex;
  align-items: baseline;
  gap: clamp(1rem, 3vw, 3rem);
  margin: 0 0 0.4rem -0.08em;
  font-family: var(--serif);
  font-size: clamp(5rem, 8.5vw, 9rem);
  font-weight: 400;
  letter-spacing: -0.075em;
  line-height: 0.9;
}

.name-last { transform: translateY(0.12em); }

.intro-role {
  margin: clamp(2rem, 4vw, 3.4rem) 0 0.9rem;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.7vw, 3.6rem);
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.intro-summary {
  max-width: 43rem;
  margin: 0;
  color: var(--stone);
  font-size: clamp(1rem, 1.45vw, 1.3rem);
  line-height: 1.65;
}

.intro-proof {
  width: fit-content;
  margin: 1.7rem 0 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--stone);
  font-size: 0.93rem;
}

.intro-proof span { color: var(--vermilion); }
.intro-actions { display: flex; align-items: center; gap: 2rem; }

.section-rule {
  display: block;
  height: 1px;
  background: var(--rule);
}

.intro > .section-rule { position: absolute; right: var(--page-gutter); bottom: 1.2rem; left: var(--page-gutter); }

.section-label-row {
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: clamp(2.8rem, 5vw, 4.5rem);
}

.work-section { padding-top: 4.2rem; padding-bottom: 4.1rem; }
.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.95fr);
  align-items: start;
  gap: clamp(1.5rem, 2.5vw, 2.5rem);
}

.project { min-width: 0; }
.project-image { display: block; width: 100%; height: auto; object-fit: contain; }
.project-image--blackroot { aspect-ratio: 1019 / 509; }
.project-image--homeclub { aspect-ratio: 1057 / 705; }

.project h3 {
  margin: 1.1rem 0 0.15rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 3vw, 2.65rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.project-type { margin: 0.3rem 0 0.7rem; color: var(--stone); font-size: 0.98rem; }
.project-description { max-width: 32rem; margin: 0; color: #62605b; font-size: 0.93rem; line-height: 1.65; }
.project-index { font-size: 0.75rem; }
.project--idencottage { display: grid; grid-template-columns: minmax(10rem, 0.72fr) minmax(0, 1.7fr) auto; align-items: center; gap: clamp(1rem, 3vw, 3rem); margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
.project--idencottage .project-index { margin: 0; }
.project--idencottage h3 { margin: 0 0 0.35rem; font-size: clamp(2rem, 3.5vw, 3rem); }
.project--idencottage .project-type { margin: 0 0 0.45rem; }
.project--idencottage .project-description { max-width: 48rem; }
.promotion-link { white-space: nowrap; }
.promotion-link svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-linecap: square; stroke-width: 1.4; }
.section-rule--bottom { margin-top: 4rem; }

.project-gallery { margin-top: 3.25rem; }
.gallery-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.gallery-label { margin: 0; color: var(--stone); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.17em; text-transform: uppercase; }
.gallery-controls { display: flex; gap: 0.5rem; }
.gallery-control { display: grid; width: 2.75rem; min-height: 2.75rem; place-items: center; border: 1px solid var(--rule); border-radius: 0; background: transparent; color: var(--ink); cursor: pointer; }
.gallery-control:hover:not(:disabled) { border-color: var(--vermilion); color: var(--vermilion); }
.gallery-control:disabled { color: #a6a096; cursor: default; }
.gallery-control svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-linecap: square; stroke-linejoin: miter; stroke-width: 1.4; }
.gallery-track { display: flex; gap: clamp(0.8rem, 1.5vw, 1.25rem); overflow-x: auto; overscroll-behavior-inline: contain; padding: 0 0 0.9rem; scroll-behavior: smooth; scroll-snap-type: x mandatory; scrollbar-color: var(--rule) transparent; scrollbar-width: thin; }
.gallery-track:focus-visible { outline: 2px solid var(--vermilion); outline-offset: 4px; }
.gallery-page { flex: 0 0 min(76vw, 62rem); min-width: 0; margin: 0; scroll-snap-align: start; }
.gallery-page a { display: block; border: 1px solid var(--rule); background: #fff; }
.gallery-page img { display: block; width: 100%; height: auto; }
.gallery-page figcaption { padding-top: 0.55rem; color: var(--stone); font-size: 0.72rem; letter-spacing: 0.12em; }

.experience-section { padding-top: 4.2rem; padding-bottom: 4.4rem; }
.experience-list { margin-left: clamp(5rem, 16vw, 16rem); }

.experience-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(10rem, 16rem);
  align-items: start;
  gap: 2rem;
  padding: 0.5rem 0 2rem 2.2rem;
  border-bottom: 1px solid var(--rule);
}

.experience-item + .experience-item { padding-top: 2rem; }
.experience-item:last-child { border-bottom: 0; }
.experience-marker { position: absolute; top: 0.4rem; bottom: 1rem; left: -2.2rem; width: 2px; background: var(--vermilion); }
.experience-item + .experience-item .experience-marker { top: 2rem; }
.experience-copy h3 { margin: 0; font-family: var(--serif); font-size: clamp(2rem, 3.1vw, 3rem); font-weight: 400; letter-spacing: -0.035em; line-height: 1.15; }
.experience-role { margin: 0.4rem 0 1rem; color: var(--stone); font-size: clamp(1.1rem, 1.7vw, 1.4rem); }
.experience-copy > p:last-child { max-width: 45rem; margin: 0; color: #66635d; font-size: 1rem; line-height: 1.8; }
.experience-date { margin: 0.2rem 0; color: var(--vermilion); font-size: 1rem; white-space: nowrap; }

.education-section { padding-top: 4.2rem; padding-bottom: 4.3rem; }
.education-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(3rem, 8vw, 7rem); min-height: 24rem; }
.education-column { padding-right: clamp(2rem, 4vw, 4rem); border-right: 1px solid var(--rule); }
.column-title { margin: 0 0 1.65rem; font-family: var(--serif); font-size: clamp(2.5rem, 4vw, 3.2rem); font-weight: 400; letter-spacing: -0.04em; line-height: 1.1; }
.education-entry { padding-bottom: 1.8rem; border-bottom: 1px solid var(--rule); }
.education-entry h4 { margin: 0.3rem 0 0.35rem; font-family: var(--serif); font-size: clamp(1.7rem, 2.8vw, 2.5rem); font-weight: 400; letter-spacing: -0.03em; line-height: 1.2; }
.education-entry p { margin: 0.25rem 0; color: var(--stone); font-size: 1.05rem; line-height: 1.5; }
.education-entry .education-date { margin-top: 0.6rem; letter-spacing: 0.08em; }
.education-entry .education-distinction { margin-top: 0.7rem; color: var(--vermilion); }
.education-entry--second { padding-top: 1.6rem; border-bottom: 0; }
.skills-column { display: flex; flex-direction: column; gap: clamp(3rem, 6vw, 5.5rem); padding-top: 0; }
.skills-group .column-title { margin-bottom: 0.7rem; }
.short-rule { display: block; width: 3.5rem; height: 2px; margin: 0 0 1.35rem; background: var(--vermilion); }
.skills-group p { margin: 0; color: var(--stone); font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.8; }

.contact-section { min-height: min(780px, calc(100svh - 4.65rem)); padding-top: 4.3rem; padding-bottom: 5rem; }
.contact-copy { width: min(100%, 70rem); margin: clamp(5rem, 11vh, 8rem) auto clamp(7rem, 16vh, 11rem); }
.contact-copy h3 { margin: 0 0 1.6rem; font-family: var(--serif); font-size: clamp(3.5rem, 9.3vw, 8.3rem); font-weight: 400; letter-spacing: -0.055em; line-height: 1; }
.contact-copy .short-rule { margin-bottom: 1.8rem; }
.contact-email { display: block; width: fit-content; margin: 0 0 2.8rem; color: var(--stone); font-size: clamp(1.25rem, 2.6vw, 2rem); text-decoration: none; }
.contact-email:hover { color: var(--vermilion); }

.site-footer { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 2rem; margin-left: max(var(--page-gutter), env(safe-area-inset-left, 0px)); margin-right: max(var(--page-gutter), env(safe-area-inset-right, 0px)); padding: 1.5rem 0 calc(2rem + env(safe-area-inset-bottom, 0px)); }
.site-footer p { margin: 0; color: var(--stone); font-size: 0.8rem; }
.footer-top { width: fit-content; padding: 0; font-size: 0.8rem; }

@media (min-width: 1600px) {
  .section { padding-right: max(var(--page-gutter), calc((100vw - 1500px) / 2), env(safe-area-inset-right, 0px)); padding-left: max(var(--page-gutter), calc((100vw - 1500px) / 2), env(safe-area-inset-left, 0px)); }
  .site-header, .site-footer { margin-right: max(var(--page-gutter), calc((100vw - 1500px) / 2), env(safe-area-inset-right, 0px)); margin-left: max(var(--page-gutter), calc((100vw - 1500px) / 2), env(safe-area-inset-left, 0px)); }
}

@media (max-width: 900px) {
  .work-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: start; }
  .project--idencottage { grid-template-columns: minmax(8rem, 0.55fr) minmax(0, 1.4fr) auto; gap: 1.2rem; }
  .gallery-page { flex-basis: min(82vw, 56rem); }
  .experience-list { margin-left: clamp(2.2rem, 8vw, 5rem); }
  .education-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .education-column { padding-right: 2rem; }
}

@media (max-width: 760px) {
  .work-grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .project--idencottage { grid-template-columns: minmax(0, 1fr); gap: 0.65rem; margin-top: 2.8rem; padding-top: 1.6rem; }
  .promotion-link { width: fit-content; margin-top: 0.35rem; }
  .experience-list { margin-left: 1.2rem; }
  .experience-item { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; padding: 0.1rem 0 1.5rem 1.2rem; }
  .experience-item + .experience-item { padding-top: 1.5rem; }
  .experience-marker { left: -1.2rem; }
  .experience-item + .experience-item .experience-marker { top: 1.5rem; }
  .experience-date { grid-row: 1; margin: 0 0 0.4rem; }
  .education-grid { grid-template-columns: minmax(0, 1fr); gap: 2.2rem; min-height: 0; }
  .education-column { padding: 0 0 1.7rem; border-right: 0; border-bottom: 1px solid var(--rule); }
  .skills-column { gap: 2rem; }
}

@media (max-width: 640px) {
  :root { --page-gutter: 1.25rem; }
  html { scroll-padding-top: calc(6.35rem + env(safe-area-inset-top, 0px)); }
  .site-header { grid-template-columns: 1fr auto; gap: 0.4rem 1rem; min-height: calc(6.35rem + env(safe-area-inset-top, 0px)); padding: calc(0.45rem + env(safe-area-inset-top, 0px)) 0 0.45rem; }
  .wordmark { font-size: 0.8rem; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; gap: 0.4rem; }
  .main-nav a { min-height: 48px; padding: 0.35rem 0; font-size: 0.875rem; }
  .button--small { min-width: 44px; min-height: 48px; padding: 0.4rem 0.75rem; font-size: 0.875rem; }
  .section { padding-top: 3rem; padding-bottom: 3.3rem; scroll-margin-top: calc(6.35rem + env(safe-area-inset-top, 0px)); }
  .intro { min-height: calc(100vh - 6.35rem - env(safe-area-inset-top, 0px)); min-height: calc(100svh - 6.35rem - env(safe-area-inset-top, 0px)); align-items: center; padding-top: 2.4rem; padding-bottom: 4rem; }
  .intro h1 { display: block; margin-bottom: 0; font-size: clamp(3.55rem, 18vw, 7.5rem); line-height: 0.88; }
  .intro h1 span { display: block; }
  .name-last { width: fit-content; margin-left: 0.7em; }
  .intro-role { max-width: 33rem; margin-top: 1.8rem; font-size: clamp(1.65rem, 7vw, 2.4rem); }
  .intro-summary { font-size: 1rem; }
  .intro-proof { max-width: 100%; font-size: 0.875rem; line-height: 1.65; }
  .intro-actions { align-items: flex-start; flex-wrap: wrap; gap: 1.2rem; }
  .intro-actions .button { min-height: 48px; }
  .intro > .section-rule { bottom: 0.6rem; }
  .section-label-row { gap: 0.8rem; margin-bottom: 2rem; }
  .eyebrow { font-size: 0.875rem; letter-spacing: 0.22em; }
  .work-grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .project--idencottage { grid-template-columns: minmax(0, 1fr); gap: 0.65rem; margin-top: 2.8rem; padding-top: 1.6rem; }
  .project--idencottage h3 { font-size: 2.25rem; }
  .promotion-link { width: fit-content; margin-top: 0.35rem; }
  .project-gallery { margin-top: 2.6rem; }
  .gallery-page { flex-basis: 88vw; }
  .gallery-control { width: 3rem; min-height: 3rem; }
  .gallery-page figcaption { padding-top: 0.5rem; }
  .project h3 { margin-top: 0.8rem; font-size: 2.25rem; }
  .project--idencottage h3 { font-size: 2rem; }
  .experience-list { margin-left: 1.2rem; }
  .experience-item { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; padding: 0.1rem 0 1.5rem 1.2rem; }
  .experience-item + .experience-item { padding-top: 1.5rem; }
  .experience-marker { left: -1.2rem; }
  .experience-item + .experience-item .experience-marker { top: 1.5rem; }
  .experience-copy h3 { font-size: 2rem; }
  .experience-role { margin-bottom: 0.6rem; font-size: 1.1rem; }
  .experience-copy > p:last-child { font-size: 0.93rem; line-height: 1.7; }
  .experience-date { grid-row: 1; margin: 0 0 0.4rem; font-size: 0.87rem; }
  .education-grid { grid-template-columns: 1fr; gap: 2.2rem; min-height: 0; }
  .education-column { padding: 0 0 1.7rem; border-right: 0; border-bottom: 1px solid var(--rule); }
  .column-title { margin-bottom: 1.3rem; font-size: 2.5rem; }
  .education-entry h4 { font-size: 1.85rem; }
  .education-entry p { font-size: 0.96rem; }
  .skills-column { gap: 2rem; }
  .skills-group .column-title { margin-bottom: 0.55rem; }
  .skills-group p { font-size: 1rem; }
  .contact-section { min-height: calc(100vh - 6.35rem - env(safe-area-inset-top, 0px)); min-height: calc(100svh - 6.35rem - env(safe-area-inset-top, 0px)); }
  .contact-copy { margin: clamp(4rem, 12vh, 6rem) 0 clamp(5rem, 15vh, 8rem); }
  .contact-copy h3 { font-size: clamp(3.25rem, 14vw, 5.5rem); }
  .contact-email { max-width: 100%; font-size: clamp(1.05rem, 5.3vw, 1.45rem); overflow-wrap: anywhere; }
  .site-footer { grid-template-columns: 1fr auto; gap: 0.8rem; }
  .footer-top { min-height: 44px; }
  .site-footer p { grid-row: 2; font-size: 0.8rem; }
}

@media (max-width: 380px) {
  .main-nav { gap: 0.2rem; }
}

@media (prefers-contrast: more) {
  :root { --stone: #5c5953; --rule: #b7afa3; }
  .button { border-width: 2px; }
  .main-nav a:focus-visible, .text-link:focus-visible, .button:focus-visible { outline-width: 3px; }
}

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