/* Home composition uses the shared mechanical editorial palette. */
html[data-page='home'] {
  --home-paper: var(--paper);
  --home-ink: var(--ink);
  --home-blue: var(--cobalt);
  --home-pale: var(--paleBlue);
  --home-yellow: var(--warmYellow);
  --home-rule: var(--rule);
  --home-grid: var(--gridGap);
  --home-gutter: var(--pageGutter);
  --home-font: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  --home-mono: 'Cascadia Code', Consolas, monospace;
  --home-title: clamp(44px,6.7vw,104px);
  --home-arc: 164px;
  --home-stroke: 1px;
  --background: var(--home-paper);
  --text: var(--home-ink);
  --muted: #4d5c69;
  --accent: var(--home-blue);
  --line: var(--home-rule);
}
html[data-page='home'] body {
  background: var(--home-paper);
  color: var(--home-ink);
  font-family: var(--home-font);
}
html[data-page='home'] header { border-color: var(--home-rule); }
html[data-page='home'] .brand::before { background: var(--home-blue); border-radius: 0; }
html[data-page='home'] nav a[aria-current] { background: transparent; }
html[data-page='home'] nav a:hover { background: rgba(184,224,247,.25); }
html[data-page='home'] #language { border-radius: 0; background: transparent; }
html[data-page='home'] .layout { padding-top: 72px; }
html[data-page='home'] footer { background: var(--home-paper); }

/* Independent photographic layers; all graphics sit outside the reading area. */
#home-hero[hidden] { display: none; }
html[data-page='home'] #home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(12,minmax(0,1fr));
  grid-template-rows: 1fr auto 1fr;
  column-gap: 20px;
  min-height: max(740px,100svh);
  padding: 90px var(--home-gutter) 110px;
  background: var(--home-paper);
  color: var(--home-ink);
  border-bottom: var(--home-stroke) solid var(--home-rule);
}
html[data-page='home'] #home-hero .hero-background {
  position: absolute;
  z-index: 1;
  top: 8%;
  left: 45%;
  width: 43%;
  height: 39%;
  object-fit: cover;
  object-position: center;
}
html[data-page='home'] #home-hero .hero-portrait {
  position: absolute;
  z-index: 3;
  top: 25%;
  right: 9%;
  width: min(27vw,360px);
  height: auto;
  max-height: 62%;
  object-fit: contain;
  border: 0;
  padding: 0;
  background: transparent;
  outline: 10px solid var(--home-paper);
}
html[data-page='home'] #home-hero .hero-intro {
  position: relative;
  z-index: 4;
  grid-column: 1 / 7;
  grid-row: 2;
  min-width: 0;
  padding: 24px 24px 24px 0;
  background: var(--home-paper);
  text-align: left;
}
html[data-page='home'] #home-hero .eyebrow {
  margin: 0;
  font: 10px/1.9 var(--home-mono);
  color: var(--home-blue);
  letter-spacing: .12em;
}
html[data-page='home'] #home-hero .hero-title {
  display: block;
  margin: 24px 0;
  border: 0;
  padding: 0;
  font-size: var(--home-title);
  font-weight: 550;
  letter-spacing: -.055em;
  line-height: 1.12;
  overflow-wrap: anywhere;
}
html[data-page='home'] #home-hero .hero-tagline {
  max-width: 320px;
  margin: 0;
  font-size: clamp(16px,1.5vw,20px);
  line-height: 1.75;
  color: var(--home-ink);
}
html[data-page='home'] #home-hero .hero-down {
  position: absolute;
  z-index: 5;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--home-blue);
  font-size: 32px;
  line-height: 1;
}
html[data-page='home'] #home-hero .hero-down:hover { color: var(--home-ink); background: transparent; }
html[data-page='home'] #home-hero .home-decoration { position: absolute; pointer-events: none; }
html[data-page='home'] #home-hero .hero-block {
  z-index: 0;
  top: 15%;
  right: 6%;
  width: 24%;
  height: 65%;
  background: var(--home-blue);
}
html[data-page='home'] #home-hero .hero-arc {
  z-index: 0;
  left: var(--home-gutter);
  bottom: 8%;
  width: var(--home-arc);
  height: var(--home-arc);
  border: var(--home-stroke) solid var(--home-blue);
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(35deg);
}
html[data-page='home'] #home-hero .hero-arc::after {
  content: '';
  position: absolute;
  top: 22px;
  left: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--home-blue);
}
html[data-page='home'] #home-hero .hero-register {
  z-index: 2;
  left: 43%;
  top: 6%;
  width: 24px;
  height: 24px;
  background: linear-gradient(var(--home-blue),var(--home-blue)) center/1px 100% no-repeat,
              linear-gradient(var(--home-blue),var(--home-blue)) center/100% 1px no-repeat;
}
html[data-page='home'] #home-hero .hero-scan {
  z-index: 0;
  top: 82%;
  right: 9%;
  width: 110px;
  height: 28px;
  border-left: 28px solid var(--home-yellow);
  background: repeating-linear-gradient(0deg,transparent 0 4px,rgba(36,85,245,.2) 4px 5px);
}

/* Introduction: a local ginkgo frame, never a backdrop for the project list. */
html[data-page='home'] main[data-section='home'] { min-width: 0; }
html[data-page='home'] .home-introduction {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0,1.4fr) minmax(0,1fr);
  column-gap: var(--home-grid);
  padding: 28px 0 52px;
  margin-bottom: 44px;
  border-bottom: var(--home-stroke) solid var(--home-rule);
}
html[data-page='home'] .home-introduction::before {
  content: '';
  grid-column: 2;
  grid-row: 1 / 5;
  align-self: center;
  width: 100%;
  aspect-ratio: 1;
  background-image: var(--homeImage,none);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 14px 14px 0 var(--home-pale);
  pointer-events: none;
}
html[data-page='home'] .home-introduction::after {
  content: '';
  position: absolute;
  z-index: -1;
  top: 24px;
  right: -10px;
  width: 62px;
  height: 20px;
  background: var(--home-yellow);
  pointer-events: none;
}
html[data-page='home'] .home-introduction > * { grid-column: 1; min-width: 0; }
html[data-page='home'] .home-introduction > .eyebrow {
  margin: 0 0 22px;
  font-size: 10px;
  color: var(--home-blue);
  letter-spacing: .12em;
}
html[data-page='home'] .home-introduction h1 {
  font-size: clamp(30px,3vw,44px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -.035em;
  margin: 0 0 24px;
}
html[data-page='home'] .home-introduction .lead {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 2;
  color: var(--home-ink);
}
html[data-page='home'] .home-socials { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: start; }
html[data-page='home'] .social-link {
  display: inline-block;
  padding: 6px 0;
  font-size: 13px;
  text-decoration: none;
  border-bottom: var(--home-stroke) solid var(--home-blue);
  color: var(--home-blue);
  overflow-wrap: anywhere;
}
html[data-page='home'] .social-link::after { content: ' ↗'; margin-left: 10px; }
html[data-page='home'] .social-link:hover { color: var(--home-ink); }

/* Quiet editorial rhythm below the collage. No new card content or metadata. */
html[data-page='home'] main[data-section='home'] > h2 {
  margin: 64px 0 24px;
  padding: 0 0 14px;
  border-color: var(--home-rule);
  font-size: 20px;
  font-weight: 500;
  background: transparent;
}
html[data-page='home'] main[data-section='home'] > h2::before { color: var(--home-blue); }
html[data-page='home'] main[data-section='home'] > .grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 32px; }
html[data-page='home'] main[data-section='home'] .card {
  padding: 26px 0;
  border: 0;
  border-bottom: var(--home-stroke) solid var(--home-rule);
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
html[data-page='home'] main[data-section='home'] .card:hover,
html[data-page='home'] main[data-section='home'] .card:focus-within { border-color: var(--home-blue); background: transparent; box-shadow: none; }
html[data-page='home'] main[data-section='home'] .card > a { font-size: 19px; font-weight: 500; }
html[data-page='home'] main[data-section='home'] .card-tags span { border: 0; border-radius: 0; padding: 0 10px 0 0; }
html[data-page='home'] main[data-section='home'] .card[data-archive-id]::after { display: none; }
html[data-page='home'] .explore a { border-color: var(--home-rule); }

@media (max-width:1000px) {
  html[data-page='home'] { --home-title: clamp(42px,6vw,70px); }
  html[data-page='home'] .home-introduction { grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); column-gap: 26px; }
}
@media (max-width:760px) {
  html[data-page='home'] { --home-gutter: 24px; --home-title: clamp(42px,10vw,64px); --home-arc: 90px; }
  html[data-page='home'] .layout { padding-top: 0; }
  html[data-page='home'] #home-hero {
    min-height: 100svh;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    grid-template-rows: auto auto;
    gap: 32px 18px;
    padding: 44px var(--home-gutter) 90px;
  }
  html[data-page='home'] #home-hero .hero-intro { grid-column: 1 / -1; grid-row: 1; padding: 0; }
  html[data-page='home'] #home-hero .eyebrow { font-size: 9px; letter-spacing: .06em; }
  html[data-page='home'] #home-hero .hero-title { margin: 18px 0; }
  html[data-page='home'] #home-hero .hero-tagline { font-size: 15px; max-width: 300px; }
  html[data-page='home'] #home-hero .hero-background {
    position: relative;
    grid-column: 1;
    grid-row: 2;
    top: auto;
    left: auto;
    align-self: start;
    margin-top: 22px;
    width: 100%;
    height: 150px;
    object-position: 40% center;
  }
  html[data-page='home'] #home-hero .hero-portrait {
    position: relative;
    grid-column: 2;
    grid-row: 2;
    top: auto;
    right: auto;
    align-self: start;
    width: 100%;
    height: auto;
    max-height: none;
    outline-width: 6px;
  }
  html[data-page='home'] #home-hero .hero-block { top: auto; bottom: 72px; right: 16px; width: 39%; height: 100px; }
  html[data-page='home'] #home-hero .hero-arc { bottom: 80px; left: 30px; }
  html[data-page='home'] #home-hero .hero-register,
  html[data-page='home'] #home-hero .hero-scan { display: none; }
  html[data-page='home'] #home-hero .hero-down { bottom: 16px; }
  html[data-page='home'] .home-introduction { grid-template-columns: minmax(0,1fr); padding: 12px 0 40px; margin-bottom: 24px; }
  html[data-page='home'] .home-introduction::before { grid-column: 1; grid-row: 5; width: min(76%,320px); margin: 36px 14px 14px auto; box-shadow: 10px 10px 0 var(--home-pale); }
  html[data-page='home'] .home-introduction::after { display: none; }
  html[data-page='home'] .home-introduction h1 { font-size: 32px; }
  html[data-page='home'] main[data-section='home'] > h2 { margin-top: 44px; }
  html[data-page='home'] main[data-section='home'] > .grid { grid-template-columns: minmax(0,1fr); }
}
