:root {
  --ink: #171717;
  --muted: #777;
  --line: #d9d9d9;
  --paper: #fff;
  --soft: #f3f3f3;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
p, h1, h2, figure { margin-top: 0; }

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 46px 0 34px;
  border-bottom: 1px dotted var(--line);
}
.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
}
.brand span {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.03em;
}
.brand small,
.portfolio-label,
.eyebrow {
  color: var(--muted);
  font-size: .82rem;
}
.portfolio-label { margin: 0; }

.project-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 56px;
  align-items: center;
  padding: 62px 0;
  border-bottom: 1px dotted var(--line);
}
.hero-project {
  padding-top: 76px;
  align-items: end;
}
.project-section.reverse {
  grid-template-columns: minmax(320px, .9fr) minmax(0, 1.1fr);
}
.project-section.reverse .project-image { order: 2; }
.project-section.reverse .project-copy { order: 1; }
.gate-project {
  padding-top: 86px;
  border-bottom: 0;
}

.project-copy { max-width: 650px; }
.project-copy p:not(.pid):not(.eyebrow),
.project-copy li {
  color: #333;
  font-size: 1.02rem;
}
.pid {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.eyebrow {
  margin-bottom: 20px;
}
h1 {
  font-size: clamp(3.2rem, 7vw, 7.2rem);
  line-height: .88;
  letter-spacing: -.08em;
  margin-bottom: 28px;
  font-weight: 800;
}
h2 {
  font-size: clamp(2.2rem, 5vw, 5rem);
  line-height: .9;
  letter-spacing: -.065em;
  margin-bottom: 26px;
  font-weight: 800;
}
.signature {
  font-weight: 700;
  color: var(--ink) !important;
  margin-top: 26px;
}

figure {
  margin-bottom: 0;
  overflow: hidden;
  background: var(--soft);
  box-shadow: 0 18px 50px rgba(0,0,0,.07);
}
figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-image { aspect-ratio: 653 / 367; }
.board-layout { aspect-ratio: 653 / 427; }
.schematic { aspect-ratio: 653 / 245; }
.soldering { aspect-ratio: 653 / 411; }
.gate-board { aspect-ratio: 653 / 367; }

.footer-mark {
  display: flex;
  justify-content: center;
  padding: 60px 0 76px;
}
.footer-mark img {
  width: 37px;
  height: 41px;
  object-fit: contain;
}

@media (max-width: 920px) {
  .project-section,
  .project-section.reverse {
    grid-template-columns: 1fr;
  }
  .project-section.reverse .project-image,
  .project-section.reverse .project-copy {
    order: initial;
  }
}

@media (max-width: 620px) {
  .page-shell { width: min(100% - 24px, 680px); }
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 28px;
  }
  .hero-project { padding-top: 44px; }
  .project-section { gap: 30px; padding: 42px 0; }
  h1 { font-size: 3.65rem; }
  h2 { font-size: 3rem; }
}
