/* ============================================================
   Site layout — sits on top of design-system/{tokens,base,components}.css
   The shell repeats across home, work, work/:slug, about.
   ============================================================ */

html, body { min-height: 100%; }
body { overflow-x: clip; }

.shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 48px;
}
@media (max-width: 720px) {
  .shell { padding: 0 20px; }
}

/* ─── Reusable labels ───────────────────────────────────────── */
.label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.label-accent { color: var(--accent); }
.caption {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--fg-muted);
}

/* ─── Nav ───────────────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 24px;
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}
@media (max-width: 720px) {
  .nav { padding: 18px 0 14px; gap: 12px; }
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.08em;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  text-decoration: none;
  border-bottom: 0;
}
.nav-logo .d {
  width: 9px; height: 9px;
  background: var(--accent);
  transform: rotate(45deg);
  display: inline-block;
}
.nav-logo em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: inherit;
  color: var(--fg);
}
.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}
@media (max-width: 720px) {
  .nav-links { gap: 18px; }
}
@media (max-width: 380px) {
  .nav-links { gap: 14px; }
}
.nav-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
  cursor: pointer;
  border: none;
  background: none;
  padding: 6px 0;
  text-decoration: none;
  border-bottom: 0;
  transition: color 150ms var(--ease);
}
.nav-link:hover { color: var(--fg); }
.nav-link.active { color: var(--accent); }
.nav-link.active::before { content: '◆ '; font-size: 8px; vertical-align: 1px; }
.nav-mode {
  border: 1px solid var(--border);
  padding: 7px 26px 7px 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-dim);
  background: transparent;
  cursor: pointer;
  clip-path: var(--clip-tag);
  transition: color 150ms var(--ease), border-color 150ms var(--ease);
}
.nav-mode:hover { color: var(--fg); border-color: var(--border-strong); }
@media (max-width: 380px) {
  .nav-mode { padding: 7px 22px 7px 10px; letter-spacing: 0.12em; }
}

/* ─── Hero — full-viewport photo ────────────────────────────── */
.hero-photo {
  position: relative;
  width: 100%;
  height: calc(100svh - 81px);
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 64px));
}
.hero-photo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
@media (max-width: 720px) {
  .hero-photo {
    height: calc(100svh - 64px);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 32px));
  }
}

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: var(--cream);
  border: none;
  padding: 14px 42px 14px 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 0;
  cursor: pointer;
  clip-path: var(--clip-btn);
  transition: background 150ms var(--ease), transform 150ms var(--ease);
}
.btn:hover { background: var(--accent-hover); color: var(--cream); }
.btn-outline {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border-strong);
  padding: 13px 27px 13px 41px;
  clip-path: var(--clip-btn-rev);
  transition: border-color 150ms var(--ease), color 150ms var(--ease);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn-ghost {
  background: transparent;
  color: var(--fg-dim);
  border: none;
  padding: 12px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 0;
  cursor: pointer;
}
.btn-ghost:hover { color: var(--fg); }

/* ─── Tags ──────────────────────────────────────────────────── */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 24px 5px 12px;
  clip-path: var(--clip-tag);
}
.tag-red { background: var(--accent-dim); color: var(--accent-soft); }
.tag-slate { background: rgba(78, 94, 110, 0.14); color: var(--steel); border: 1px solid rgba(78, 94, 110, 0.28); }
.tag-dim { background: var(--bg-token); color: var(--fg-dim); border: 1px solid var(--border); }

/* ─── Current-work card ─────────────────────────────────────── */
.current-card {
  position: relative;
  background:
    linear-gradient(135deg,
      rgba(78, 94, 110, 0.14) 0%,
      rgba(122, 138, 154, 0.06) 60%,
      rgba(78, 94, 110, 0.10) 100%);
  border-top: 1px solid rgba(78, 94, 110, 0.22);
  border-bottom: 1px solid rgba(78, 94, 110, 0.22);
  padding: 24px 64px 24px 44px;
  clip-path: var(--clip-panel);
  margin: 40px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  isolation: isolate;
}
.current-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 22px;
  background: var(--accent);
  clip-path: polygon(0 0, 55% 0, 100% 100%, 0 100%);
  z-index: -1;
}
[data-theme="dark"] .current-card {
  background: var(--bg-raised);
  border-color: transparent;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .current-card {
    background: var(--bg-raised);
    border-color: transparent;
  }
}
.current-card-text { display: flex; flex-direction: column; gap: 6px; }
.current-card .label { color: var(--accent); }
.current-card-title {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.1;
  color: var(--fg);
}
.current-card-title em { color: var(--accent); }
@media (max-width: 720px) {
  .current-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 32px 22px 24px;
    margin: 28px 0;
  }
  .current-card::before { width: 14px; }
  .current-card-title { font-size: 22px; }
  .current-card .btn-outline { align-self: flex-start; }
}

/* ─── Series index ──────────────────────────────────────────── */
.series-index {
  padding: 64px 0 0;
}
.series-index-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.series-index-head::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 88px;
  height: 3px;
  background: var(--accent);
  clip-path: polygon(0 0, 82% 0, 100% 100%, 0 100%);
}
.series-index-title {
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: 0.02em;
  color: var(--fg);
}
@media (max-width: 720px) {
  .series-index { padding-top: 40px; }
  .series-index-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 20px;
  }
  .series-index-title { font-size: 28px; }
}
.series-row {
  display: grid;
  grid-template-columns: 64px 1fr auto 200px;
  gap: 32px;
  align-items: center;
  padding: 28px 24px 28px 32px;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  transition: background 180ms var(--ease), padding-left 180ms var(--ease);
  position: relative;
  text-decoration: none;
  color: inherit;
  border-left: 0;
  border-right: 0;
  border-top: 0;
}
.series-row::before {
  content: '';
  position: absolute;
  left: 0; top: 18px; bottom: 18px;
  width: 0;
  background: var(--accent);
  clip-path: polygon(0 0, 45% 0, 100% 100%, 0 100%);
  transition: width 180ms var(--ease);
}
.series-row:hover { background: var(--bg-token); padding-left: 48px; }
.series-row:hover::before { width: 16px; }
.series-row:hover .series-row-title { color: var(--accent); }
.series-row:hover .series-row-num { color: var(--accent); }
.series-row-num {
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1;
  color: var(--fg-dim);
  letter-spacing: 0.02em;
  transition: color 150ms var(--ease);
}
.series-row-title {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.1;
  color: var(--fg);
  transition: color 150ms var(--ease);
}
.series-row-title em { color: var(--accent); }
.series-row-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-top: 6px;
  max-width: 480px;
}
.series-row-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  text-align: right;
  line-height: 1.8;
}
.series-row-thumb {
  width: 200px;
  height: 120px;
  background-size: cover;
  background-position: center;
  clip-path: var(--clip-thumb);
}

/* ─── /work — listing hero ─────────────────────────────────── */
.work-hero {
  padding: 80px 0 40px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
@media (max-width: 720px) {
  .work-hero { padding: 40px 0 24px; }
}
.work-hero-eyebrow { margin-bottom: 14px; }
.work-hero-title {
  font-family: var(--font-display);
  font-size: clamp(56px, 9vw, 120px);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--fg);
  margin: 0;
  position: relative;
}
.work-hero-title em { color: var(--accent); }
.work-hero::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 120px;
  height: 4px;
  background: var(--accent);
  clip-path: polygon(0 0, 88% 0, 100% 100%, 0 100%);
}

/* ─── Series detail ─────────────────────────────────────────── */
.series-hero {
  padding: 80px 0 56px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.series-hero::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 120px;
  height: 4px;
  background: var(--accent);
  clip-path: polygon(0 0, 88% 0, 100% 100%, 0 100%);
}
.series-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}
.series-hero-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--accent);
  padding: 8px 32px 8px 16px;
  margin-bottom: 24px;
  clip-path: var(--clip-tag);
}
.series-hero-title {
  font-family: var(--font-display);
  font-size: clamp(56px, 9vw, 120px);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--fg);
  margin-bottom: 24px;
}
.series-hero-title em { color: var(--accent); }
.series-hero-sub {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 28px;
}
.series-hero-meta {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.series-hero-meta-item .label { margin-bottom: 6px; }
.series-hero-meta-item .v {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg);
}
@media (max-width: 720px) {
  .series-hero { padding: 40px 0 32px; }
  .series-hero-top { margin-bottom: 20px; }
  .series-hero-num { margin-bottom: 16px; }
  .series-hero-title { margin-bottom: 18px; }
  .series-hero-sub { margin-bottom: 20px; font-size: 12px; }
  .series-hero-meta { gap: 20px 28px; padding-top: 18px; }
}

/* ─── Plate stream ──────────────────────────────────────────── */
.plate-stream {
  display: flex;
  flex-direction: column;
  gap: 96px;
  padding: 96px 0;
}
.plate {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: flex-start;
  animation: simpleFade 0.5s var(--ease) both;
}
.plate.alt {
  grid-template-columns: 280px 1fr;
}
.plate.alt .plate-text { order: -1; }
.plate-img {
  width: 100%;
  background: var(--bg-raised);
  display: block;
  transition: opacity 240ms var(--ease);
}
.plate-num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.plate-caption {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.65;
  color: var(--fg);
  margin: 0 0 14px;
  text-wrap: pretty;
}
.plate-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
  line-height: 1.6;
}

@media (max-width: 720px) {
  .plate, .plate.alt { grid-template-columns: 1fr; gap: 16px; }
  .plate.alt .plate-text { order: 0; }
  .plate-stream { gap: 56px; padding: 56px 0; }
  .series-row { grid-template-columns: 40px 1fr; gap: 14px; padding: 18px 0 18px 12px; }
  .series-row:hover { padding-left: 24px; }
  .series-row:hover::before { width: 10px; }
  .series-row-thumb,
  .series-row-meta { display: none; }
  .series-row-title { font-size: 20px; line-height: 1.15; }
  .series-row-num { font-size: 26px; }
  .series-row-sub { font-size: 11px; }
}

/* ─── Series nav (prev / next) ─────────────────────────────── */
.series-nav {
  padding: 32px 0 80px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 32px;
}
.series-nav-link {
  text-decoration: none;
  border-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: inherit;
}
.series-nav-link.right { text-align: right; align-items: flex-end; }
.series-nav-link:hover .series-nav-title { color: var(--accent); }
.series-nav-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.series-nav-title {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--fg);
  transition: color 150ms var(--ease);
}
@media (max-width: 720px) {
  .series-nav { padding: 24px 0 56px; gap: 16px; }
  .series-nav-title { font-size: 17px; line-height: 1.2; }
}

/* ─── About ─────────────────────────────────────────────────── */
.about {
  padding: 96px 0;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}
.about-portrait {
  aspect-ratio: 4/5;
  background-size: cover;
  background-position: center;
  clip-path: var(--clip-portrait);
}
.about-body { display: flex; flex-direction: column; gap: 28px; }
.about-headline {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--fg);
  margin: 0;
}
.about-headline em { color: var(--accent); }
.about-p {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.8;
  color: var(--fg);
  max-width: 540px;
  margin: 0;
}
.about-link { color: var(--fg); border-bottom: 1px solid var(--accent); }
.about-link:hover { color: var(--accent); }
.about-list {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px 32px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  margin: 0;
}
.about-list dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
  align-self: baseline;
}
.about-list dd {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg);
  margin: 0;
  line-height: 1.65;
}
.about-cta { display: flex; gap: 12px; margin-top: 16px; }

@media (max-width: 720px) {
  .about { grid-template-columns: 1fr; gap: 32px; padding: 48px 0; }
  .about-portrait { max-width: 260px; }
}

/* ─── Footer ─────────────────────────────────────────────────── */
.footer {
  margin-top: 40px;
  padding: 56px 0 32px;
  border-top: 1px solid var(--rule);
}
/* Skyline — angular building silhouette */
.footer-skyline {
  position: relative;
  margin-top: 40px;
  margin-bottom: 24px;
  padding: 24px 0 0;
  isolation: isolate;
  overflow-x: clip;
}
.footer-skyline::before {
  content: '';
  position: absolute;
  left: -48px;
  right: -48px;
  bottom: -24px;
  top: 24%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(122, 138, 154, 0.08) 50%,
    rgba(78, 94, 110, 0.18) 100%
  );
  clip-path: polygon(0 14%, 100% 0, 100% 100%, 0 100%);
  z-index: -1;
  opacity: 1;
  transition: opacity 240ms var(--ease);
}
[data-theme="dark"] .footer-skyline::before { opacity: 0; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .footer-skyline::before { opacity: 0; }
}

.footer-horizon {
  display: block;
  width: 100%;
  height: 16px;
  margin-bottom: 14px;
  color: var(--steel);
  opacity: 0.85;
}
[data-theme="dark"] .footer-horizon { opacity: 0.55; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .footer-horizon { opacity: 0.55; }
}

.footer-facade {
  display: flex;
  gap: 5px;
  align-items: flex-end;
  height: 150px;
  overflow: visible;
  opacity: 1;
}
[data-theme="dark"] .footer-facade { opacity: 0.75; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .footer-facade { opacity: 0.75; }
}

.footer-bldg {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
  position: relative;
}
.footer-bldg-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-self: stretch;
}
.footer-bldg-row { display: flex; gap: 2px; }

.footer-bldg-stack.roof-flat  { clip-path: polygon(0 0,    100% 0,    100% 100%, 0 100%); }
.footer-bldg-stack.roof-pl    { clip-path: polygon(0 38%,  100% 0,    100% 100%, 0 100%); }
.footer-bldg-stack.roof-pr    { clip-path: polygon(0 0,    100% 38%,  100% 100%, 0 100%); }
.footer-bldg-stack.roof-peak  { clip-path: polygon(0 42%,  50% 0,     100% 42%,  100% 100%, 0 100%); }
.footer-bldg-stack.roof-wedge { clip-path: polygon(0 0,    55% 0,     100% 38%,  100% 100%, 0 100%); }
.footer-bldg-stack.roof-step  {
  clip-path: polygon(
    0 50%, 30% 50%, 30% 28%, 60% 28%, 60% 8%,
    100% 8%, 100% 100%, 0 100%
  );
}

.footer-antenna {
  position: relative;
  width: 1px;
  height: 14px;
  background: var(--steel);
  opacity: 1;
  margin-bottom: 2px;
}
[data-theme="dark"] .footer-antenna { opacity: 0.85; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .footer-antenna { opacity: 0.85; }
}
.footer-antenna::after {
  content: '';
  position: absolute;
  top: -7px;
  left: 50%;
  width: 7px;
  height: 7px;
  background: var(--accent);
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 0 0 8px rgba(194, 74, 44, 0.55);
}

.footer-win {
  width: 7px;
  height: 5px;
  background: var(--win-off);
  border: 1px solid var(--win-edge);
  clip-path: polygon(0 0, 85% 0, 100% 100%, 0 100%);
}
.footer-win.on   { background: var(--win-on);   border-color: var(--win-on-edge); }
.footer-win.warm { background: var(--win-warm); border-color: var(--win-warm-edge); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 720px) {
  .footer { padding: 40px 0 24px; margin-top: 24px; }
  .footer-skyline { margin-top: 24px; }
  .footer-skyline::before { left: -20px; right: -20px; }
  .footer-facade { height: 80px; gap: 4px; }
  .footer-bottom { font-size: 9px; letter-spacing: 0.12em; }
}

/* ─── Entry animation ───────────────────────────────────────── */
@keyframes simpleFade {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .plate { animation: none; opacity: 1; transform: none; }
}
