:root {
  color-scheme: light dark;
  --background: #f7f6f2;
  --surface: #fcfbf8;
  --ink: #20221f;
  --muted: #686963;
  --line: #dcdad4;
  --green: #176443;
  --accent-wash: #eef0eb;
  --serif: Iowan Old Style, Baskerville, Georgia, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --frame: 76rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #171816;
    --surface: #1d1e1b;
    --ink: #f3f0e9;
    --muted: #b7b5ae;
    --line: #353632;
    --green: #8bc8a0;
    --accent-wash: #242622;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --background: #f7f6f2;
  --surface: #fcfbf8;
  --ink: #20221f;
  --muted: #686963;
  --line: #dcdad4;
  --green: #176443;
  --accent-wash: #eef0eb;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #171816;
  --surface: #1d1e1b;
  --ink: #f3f0e9;
  --muted: #b7b5ae;
  --line: #353632;
  --green: #8bc8a0;
  --accent-wash: #242622;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--green);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 4px;
}

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

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

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.03;
}

.frame {
  width: min(calc(100% - 4rem), var(--frame));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-200%);
  padding: 0.55rem 0.75rem;
  background: var(--ink);
  color: var(--background);
  text-decoration: none;
}

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

.site-header {
  border-bottom: 1px solid var(--line);
}

.nav-frame {
  display: flex;
  min-height: 3.8rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 2vw, 1.3rem);
  font-size: 0.86rem;
}

nav a {
  text-decoration: none;
}

.theme-toggle {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15.5rem, 18rem);
  align-items: center;
  justify-content: start;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-block: clamp(1.25rem, 2.4vw, 2rem);
}

.kicker,
.project-index {
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.kicker {
  margin-bottom: 0.65rem;
}

h1 {
  margin-bottom: 0.55rem;
  font-size: clamp(3rem, 5.2vw, 5.1rem);
}

.positioning {
  max-width: 36rem;
  margin-bottom: 0.7rem;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.18;
}

.positioning span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.58em;
  font-weight: 600;
}

.intro {
  max-width: 36rem;
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.3vw, 1.08rem);
}

.proof {
  margin-bottom: 0.9rem;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.45;
}

.proof span {
  color: var(--green);
  padding-inline: 0.25rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-links a {
  color: var(--green);
}

.portrait {
  position: relative;
  width: min(100%, 17rem);
  aspect-ratio: 4 / 5;
  margin: 0;
}

.portrait::before {
  position: absolute;
  z-index: -1;
  top: 0.9rem;
  right: 0.9rem;
  width: 100%;
  height: 100%;
  background: var(--accent-wash);
  content: "";
}

.portrait img {
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  object-fit: cover;
  object-position: 43% center;
}

.work {
  padding-block: 0.5rem 0.6rem;
  border-top: 1px solid var(--line);
}

.work-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 0.6rem;
}

.work-heading .kicker {
  margin: 0;
}

h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.6vw, 2rem);
}

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

.project {
  display: flex;
  min-height: 8.25rem;
  flex-direction: column;
  padding: clamp(0.8rem, 1.4vw, 1.05rem);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.project:hover {
  background: var(--accent-wash);
}

.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.project-index {
  margin-bottom: 0.3rem;
}

.project h3 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.project-body > p:not(.project-index) {
  max-width: 33rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.project-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.65rem;
}

.project-tag {
  min-height: 1.1rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.03em;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 0.8rem;
  margin: 0;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 750;
}

.project-links a {
  color: var(--green);
}

.project-featured {
  border-top: 2px solid var(--green);
}

.project-featured h3 {
  font-size: clamp(1.4rem, 2.25vw, 1.8rem);
}

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

.band-strip-inner {
  display: grid;
  grid-template-columns: minmax(12rem, 0.6fr) 1.4fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding-block: 0.6rem;
}

.band-strip h2 {
  align-self: start;
  font-size: 1.05rem;
  line-height: 1.2;
}

.band-strip p {
  max-width: 52rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

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

.footer-frame {
  display: flex;
  min-height: 5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-frame p {
  margin: 0;
}

.footer-frame div {
  display: flex;
  gap: 1rem;
}

@media (max-width: 48rem) {
  .frame {
    width: min(calc(100% - 2.5rem), var(--frame));
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-block: 2.5rem;
  }

  .portrait {
    width: min(100%, 20rem);
    margin: 0;
  }

  .portrait::before {
    top: 0.8rem;
    right: 0.8rem;
  }

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

  .band-strip-inner {
    grid-template-columns: 1fr;
    gap: 0.4rem;
    padding-block: 1rem;
  }
}

@media (max-width: 31rem) {
  .frame {
    width: min(calc(100% - 2rem), var(--frame));
  }

  .wordmark span {
    display: none;
  }

  nav {
    gap: 0.7rem;
    font-size: 0.82rem;
  }

  h1 {
    font-size: clamp(3.5rem, 18vw, 5.2rem);
  }

  .work-heading {
    display: block;
  }

  .work-heading .kicker {
    margin-bottom: 0.55rem;
  }

  .footer-frame {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.4rem;
  }
}

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