:root {
  --aluminum: #C8CDD3;
  --ink: #171A1D;
  --mute: #5E666E;
  --line: #9AA3AB;
  --heat: #E24A17;
  --heat-ink: #FFF6F0;
  --sign: "Big Shoulders Display", sans-serif;
  --note: "Source Serif 4", "Source Serif Pro", Georgia, serif;
}

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

html {
  color-scheme: light;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100dvh;
  background: var(--aluminum);
  color: var(--ink);
  font-family: var(--note);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

a {
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.lip {
  position: sticky;
  top: 0;
  z-index: 20;
  height: calc(10px + env(safe-area-inset-top));
  background: var(--heat);
}

.page {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

/* Nav */
.nav {
  position: sticky;
  top: calc(10px + env(safe-area-inset-top));
  z-index: 10;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0 16px;
  background: var(--aluminum);
}

.nav-brand {
  font-family: var(--sign);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.02em;
  line-height: 1;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 16px;
}

.nav-links a {
  color: var(--mute);
}

@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { color: var(--ink); }
}

/* Hero: shop sign, then the note */
.hero {
  padding: 12px 0 48px;
}

.sign {
  font-family: var(--sign);
  font-weight: 800;
  font-size: clamp(72px, 13vw, 152px);
  line-height: 0.8;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 42ch) auto;
  gap: 24px 48px;
  align-items: end;
  justify-content: space-between;
}

.who {
  font-size: 18px;
  margin-bottom: 10px;
}

.who b { font-weight: 600; }

.blurb {
  color: var(--mute);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  background: var(--heat);
  color: var(--heat-ink);
  border-radius: 3px;
  font-size: 16px;
  font-weight: 600;
  user-select: none;
  -webkit-user-select: none;
}

.tag:active { transform: scale(0.98); }

@media (hover: hover) and (pointer: fine) {
  .tag:hover { filter: brightness(1.05); }
}

.plain {
  color: var(--mute);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .plain:hover {
    color: var(--ink);
    border-bottom-color: var(--ink);
  }
}

/* Work: parts list */
.work {
  padding: 8px 0 72px;
  scroll-margin-top: 72px;
}

.work > h2,
.about > h2 {
  font-family: var(--sign);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.parts {
  border-top: 2px solid var(--ink);
}

.part {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr) auto;
  gap: 20px 32px;
  align-items: baseline;
  padding: 26px 0 24px;
  border-bottom: 1px solid var(--line);
}

.part-name {
  font-family: var(--sign);
  font-weight: 800;
  font-size: clamp(32px, 4.2vw, 48px);
  letter-spacing: -0.02em;
  line-height: 0.95;
}

.part-desc {
  color: var(--mute);
  max-width: 44ch;
}

.part-kind {
  font-size: 15px;
  color: var(--mute);
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .part:hover .part-name { color: var(--heat); }
}

/* About */
.about {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px 64px;
  padding: 8px 0 80px;
  scroll-margin-top: 72px;
}

.about h2 { grid-column: 1 / -1; margin-bottom: 0; }

.about-copy {
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.4;
  max-width: 28ch;
}

.facts {
  display: flex;
  flex-direction: column;
}

.fact {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}

.fact:first-child { border-top: 1px solid var(--line); }

.fact dt { color: var(--mute); }

.stack {
  margin-top: 28px;
  font-size: 16px;
  color: var(--mute);
  line-height: 1.7;
}

.stack b {
  color: var(--ink);
  font-weight: 600;
}

/* Contact */
.contact {
  padding: 0 0 64px;
  scroll-margin-top: 72px;
}

.contact p {
  font-family: var(--sign);
  font-weight: 800;
  font-size: clamp(36px, 5.4vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  max-width: 16ch;
  margin-bottom: 24px;
}

/* Footer */
.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 max(32px, env(safe-area-inset-bottom));
  border-top: 2px solid var(--ink);
  font-size: 15px;
  color: var(--mute);
}

@media (hover: hover) and (pointer: fine) {
  .foot a:hover { color: var(--ink); }
}

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

  .page {
    width: calc(100% - 28px);
  }

  .nav {
    top: calc(10px + env(safe-area-inset-top));
    padding: 14px 0 12px;
    gap: 16px;
  }

  .nav-brand { font-size: 18px; }

  .nav-links {
    gap: 16px;
    font-size: 15px;
  }

  .nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .hero { padding: 4px 0 32px; }

  .sign {
    font-size: clamp(56px, 18vw, 96px);
    line-height: 0.82;
    margin-bottom: 20px;
    overflow-wrap: anywhere;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .who { font-size: 17px; }

  .actions {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .tag {
    width: 100%;
  }

  .plain {
    align-self: flex-start;
    padding: 10px 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .work {
    padding: 0 0 48px;
    scroll-margin-top: 88px;
  }

  .work > h2,
  .about > h2 {
    font-size: 18px;
  }

  .part {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 20px 0;
  }

  .part-kind {
    order: -1;
    font-size: 13px;
  }

  .part-name {
    font-size: clamp(28px, 9vw, 40px);
    word-break: break-word;
  }

  .part-desc {
    max-width: none;
    font-size: 15px;
    line-height: 1.45;
  }

  .about {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 0 0 56px;
    scroll-margin-top: 88px;
  }

  .about-copy {
    max-width: none;
    font-size: clamp(18px, 5.2vw, 22px);
  }

  .fact {
    grid-template-columns: 64px 1fr;
    gap: 12px;
    font-size: 15px;
    padding: 14px 0;
  }

  .stack {
    font-size: 15px;
    margin-top: 22px;
  }

  .contact {
    padding: 0 0 48px;
    scroll-margin-top: 88px;
  }

  .contact p {
    font-size: clamp(32px, 11vw, 48px);
    max-width: 11ch;
    margin-bottom: 20px;
  }

  .foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 18px 0 max(28px, env(safe-area-inset-bottom));
    font-size: 14px;
  }

  .foot a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

@media (max-width: 380px) {
  .page { width: calc(100% - 24px); }

  .nav-links { gap: 12px; font-size: 14px; }

  .sign { font-size: clamp(48px, 17vw, 72px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Page header (projects) */
.page-hero {
  padding: 12px 0 40px;
}

.page-title {
  font-family: var(--sign);
  font-weight: 800;
  font-size: clamp(48px, 10vw, 96px);
  line-height: 0.88;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.page-lead {
  color: var(--mute);
  max-width: 42ch;
  margin-bottom: 28px;
}

.work-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.work-head h2 {
  margin-bottom: 0;
}

.work-more {
  font-size: 15px;
  color: var(--mute);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .work-more:hover {
    color: var(--ink);
    border-bottom-color: var(--ink);
  }
}

@media (max-width: 820px) {
  .work-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .page-title {
    font-size: clamp(40px, 14vw, 72px);
  }
}

.part[id] {
  scroll-margin-top: 88px;
}
