:root {
  color-scheme: light;
  --background: #f5f1ea;
  --text: #171512;
  --muted: #6f675d;
  --subtle: #ddd5ca;
  --panel: #fffaf2;
  --link: #171512;
  --link-hover: #64513d;
  --focus: #8f5f2f;
  --measure: 45rem;
  --wide-measure: 58rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --background: #171512;
    --text: #f4efe7;
    --muted: #b8afa4;
    --subtle: #35302a;
    --panel: #1f1c18;
    --link: #f4efe7;
    --link-hover: #d9c5a7;
    --focus: #d9a66f;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #171512;
  --text: #f4efe7;
  --muted: #b8afa4;
  --subtle: #35302a;
  --panel: #1f1c18;
  --link: #f4efe7;
  --link-hover: #d9c5a7;
  --focus: #d9a66f;
}

:root[data-theme="light"] {
  color-scheme: light;
  --background: #f5f1ea;
  --text: #171512;
  --muted: #6f675d;
  --subtle: #ddd5ca;
  --panel: #fffaf2;
  --link: #171512;
  --link-hover: #64513d;
  --focus: #8f5f2f;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  color: var(--text);
  font-family:
    ui-serif,
    Georgia,
    Cambria,
    "Times New Roman",
    Times,
    serif;
  font-size: 100%;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--panel) 55%, transparent), transparent 22rem),
    var(--background);
  color: var(--text);
}

body,
button {
  font: inherit;
}

a {
  color: var(--link);
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--link-hover);
  text-decoration-color: currentColor;
}

a:focus-visible,
button:focus-visible {
  outline: 0.15rem solid var(--focus);
  outline-offset: 0.2rem;
}

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

p {
  line-height: 1.65;
}

ul {
  margin: 1rem 0 0;
  padding-left: 1.15rem;
}

li {
  line-height: 1.6;
  padding-left: 0.25rem;
}

li + li {
  margin-top: 0.5rem;
}

.site-shell {
  width: min(calc(100% - 2rem), var(--wide-measure));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.site-header {
  padding: 1.25rem 0 6rem;
}

.header-content {
  max-width: var(--wide-measure);
}

.theme-toggle {
  display: inline-flex;
  position: fixed;
  top: 1rem;
  right: 1rem;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 2rem;
  border: 1px solid var(--subtle);
  border-radius: 999px;
  padding: 0.55rem;
  background: color-mix(in srgb, var(--panel) 72%, transparent);
  color: var(--link);
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--link-hover);
  border-color: color-mix(in srgb, currentColor 45%, var(--subtle));
}

.theme-icon {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.theme-icon [data-theme-state] {
  display: none;
}

.theme-toggle[data-selected-theme="light"] [data-theme-state="light"],
.theme-toggle[data-selected-theme="dark"] [data-theme-state="dark"] {
  display: block;
}

@keyframes theme-icon-morph {
  0% {
    filter: blur(0);
    opacity: 1;
    transform: scale(1);
  }

  42% {
    filter: blur(0.28rem);
    opacity: 0.55;
    transform: scale(0.86) rotate(8deg);
  }

  100% {
    filter: blur(0);
    opacity: 1;
    transform: scale(1);
  }
}

.eyebrow {
  color: var(--muted);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.site-header .eyebrow {
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 550;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1 {
  max-width: var(--measure);
  margin-top: 0.85rem;
  font-size: clamp(3rem, 8vw, 5.8rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.88;
}

h2 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
}

h3 {
  font-size: 1.08rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.hero {
  max-width: var(--measure);
  padding-bottom: 5.5rem;
}

.hero p + p {
  margin-top: 1.35rem;
  color: var(--muted);
}

.lede {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  letter-spacing: -0.02em;
  line-height: 1.22;
}

.section {
  padding: 4.75rem 0 2.5rem;
}

.section + .section {
  margin-top: 1rem;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(8rem, 0.5fr) minmax(0, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.entry {
  display: grid;
  grid-template-columns: minmax(8rem, 0.5fr) minmax(0, 1fr);
  gap: 2rem;
  padding: 0;
}

.entry + .entry {
  margin-top: 3rem;
}

.entry-meta p {
  margin-top: 0.35rem;
  color: var(--muted);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 0.9rem;
  line-height: 1.45;
}

.entry-copy {
  max-width: var(--measure);
}


.entry-copy p + p {
  margin-top: 1rem;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.project {
  min-height: 100%;
}

.project p {
  margin-top: 0.85rem;
  color: var(--muted);
}

.working-style {
  padding-bottom: 4rem;
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.principles p {
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer p {
  line-height: 1.4;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 760px) {
  .site-shell {
    width: min(calc(100% - 1.5rem), var(--wide-measure));
    padding-top: 1rem;
  }

  .section-heading,
  .entry,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-header {
    padding-bottom: 4rem;
  }

  h1 {
    font-size: clamp(3.2rem, 18vw, 5.5rem);
  }

  .hero {
    padding-bottom: 4rem;
  }

  .section {
    padding: 2.5rem 0;
  }

  .section-heading,
  .entry {
    gap: 1rem;
  }

  .project-list,
  .principles {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  a,
  button {
    transition:
      border-color 150ms ease,
      color 150ms ease,
      text-decoration-color 150ms ease;
  }

  .theme-toggle[data-morphing="true"] .theme-icon {
    animation: theme-icon-morph 260ms ease-out;
    transform-origin: center;
  }
}
