:root {
  --bg: #15181e;
  --panel: #1b1f27;
  --line: #2a313d;
  --ink: #e9e4d8;
  --muted: #8b94a3;
  --amber: #f5b642;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, Menlo, monospace;
  --sans: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.hero, main, footer {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- drawing-sheet header --- */

.hero {
  padding-top: 28px;
  background-image:
    repeating-linear-gradient(0deg,  rgba(255,255,255,0.018) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 48px);
}

.sheet-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.sheet-head .mark { color: var(--amber); }
.sheet-head .right { margin-left: auto; }
.sheet-head .right { display: none; }
@media (min-width: 521px) { .sheet-head .right { display: inline; } }

h1 {
  margin: 56px 0 12px;
  font-family: var(--mono);
  font-size: clamp(2.1rem, 7vw, 3.3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  line-height: 1.05;
}

.tagline {
  margin: 0;
  max-width: 34em;
  color: var(--muted);
  font-size: 1.08rem;
}

/* dimension line: hairline with end ticks + label */
.dim {
  position: relative;
  height: 1px;
  background: var(--line);
  margin: 40px 0 0;
}
.dim::before, .dim::after {
  content: "";
  position: absolute;
  top: -4px;
  width: 1px;
  height: 9px;
  background: var(--muted);
}
.dim::before { left: 0; }
.dim::after { right: 0; }
.dim span {
  position: absolute;
  left: 0;
  top: -0.7em;
  padding-right: 12px;
  background: var(--bg);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
}

/* --- projects as parts list --- */

.projects { margin-top: 64px; }

h2 {
  margin: 0 0 20px;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}
h2 .count { color: var(--line); font-weight: 400; }

.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.project-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 22px 24px 24px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.project-card:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.item-no {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* inspection stamps */
.stamp {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid var(--amber);
  border-radius: 2px;
  padding: 3px 10px;
  transform: rotate(-2deg);
  white-space: nowrap;
}
.stamp.live { background: var(--amber); color: var(--bg); }

h3 { margin: 0 0 6px; font-size: 1.18rem; letter-spacing: -0.01em; }
.project-card p { margin: 0 0 14px; color: var(--muted); font-size: 0.98rem; }

.card-link {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--amber);
  text-decoration: none;
  text-transform: uppercase;
}
.card-link:hover, .card-link:focus-visible { text-decoration: underline; }

/* --- title block (signature) --- */

footer { margin-top: 88px; padding-bottom: 48px; }

.titleblock {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
}
.titleblock > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px 12px;
  border-right: 1px solid var(--line);
}
.titleblock > div:last-child { border-right: none; }

.tb-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.tb-value {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink);
}

.colophon {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.colophon a { color: var(--muted); }
.colophon a:hover, .colophon a:focus-visible { color: var(--amber); }

/* --- quality floor --- */

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

@media (max-width: 520px) {
  .titleblock { grid-template-columns: repeat(2, 1fr); }
  .titleblock > div { border-bottom: 1px solid var(--line); }
  .titleblock > div:nth-child(3) { border-right: none; }
  .titleblock > div:nth-child(n+3) { border-bottom: none; }
  .projects { margin-top: 48px; }
}

@media (prefers-reduced-motion: no-preference) {
  .dim, .sheet-head {
    transform-origin: left center;
    animation: draw-in 0.5s ease-out both;
  }
  @keyframes draw-in {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
  }
}
