:root {
  --paper: #f3f0e9;
  --paper-deep: #e8e3d9;
  --ink: #22231f;
  --muted: #68675f;
  --line: rgba(34, 35, 31, .16);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: Inter, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; }
.site-header { position: sticky; top: 0; z-index: 20; height: 78px; padding: 0 clamp(22px, 5vw, 76px); display: flex; align-items: center; justify-content: space-between; background: rgba(243,240,233,.95); border-bottom: 1px solid rgba(34,35,31,.08); backdrop-filter: blur(14px); }
.wordmark { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; font-size: 18px; font-weight: 500; letter-spacing: .18em; white-space: nowrap; }
.wordmark span { font-family: var(--serif); font-size: 23px; font-weight: 400; letter-spacing: -.04em; }
.nav { display: flex; align-items: center; gap: clamp(22px, 4vw, 56px); }
.nav a { position: relative; padding: 9px 0; text-decoration: none; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #55554f; transition: color .2s ease; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: 2px; width: 100%; height: 1px; transform: scaleX(0); transform-origin: left; background: var(--ink); transition: transform .25s ease; }
.nav a:hover, .nav a.is-active { color: var(--ink); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.menu-toggle { display: none; border: 0; background: transparent; color: var(--ink); padding: 10px 0 10px 10px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.page-main { min-height: calc(100vh - 78px); }
.hero { position: relative; min-height: max(650px, calc(100svh - 78px)); overflow: hidden; isolation: isolate; display: flex; align-items: center; color: #fff; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("../assets/hero-bambu.webp") center 43% / cover no-repeat; transform: scale(1.015); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(16,17,15,.66) 0%, rgba(16,17,15,.38) 43%, rgba(16,17,15,.04) 100%), linear-gradient(0deg, rgba(15,16,14,.32), transparent 42%); }
.hero-content { width: min(1240px, 100%); margin: 0 auto; padding: 90px clamp(28px, 7.5vw, 120px) 70px; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 25px; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; }
.eyebrow::before { content: ""; display: inline-block; width: 30px; height: 1px; background: currentColor; opacity: .7; }
h1, h2, h3, p { margin-top: 0; }
.hero h1, .smart-page-hero h1 { max-width: 730px; margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(54px, 8vw, 112px); letter-spacing: -.055em; line-height: .98; }
.hero h1 em, .smart-page-hero h1 em { font-weight: 400; }
.hero-copy { max-width: 450px; margin: 26px 0 33px; color: rgba(255,255,255,.84); font-size: 15px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button-link { display: inline-flex; align-items: center; gap: 18px; min-height: 48px; padding: 0 18px; border: 1px solid rgba(255,255,255,.75); color: white; text-decoration: none; font-size: 10px; letter-spacing: .15em; text-transform: uppercase; transition: background .2s ease, color .2s ease; }
.button-link:hover { background: white; color: var(--ink); }
.button-link b { font-size: 16px; font-weight: 400; }
.button-link-quiet { border-color: rgba(255,255,255,.35); background: rgba(24,24,21,.1); }
.hero-index { position: absolute; right: clamp(24px, 5vw, 76px); bottom: 28px; display: flex; align-items: center; gap: 10px; font-size: 10px; letter-spacing: .15em; }
.hero-index span { opacity: .65; }
.section-shell { width: min(1300px, 100%); margin: 0 auto; padding: 0 clamp(22px, 5vw, 76px); }
.section-title { margin: 0 0 24px; font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 5.2vw, 72px); letter-spacing: -.055em; line-height: 1.02; }
.eyebrow-dark { color: var(--muted); }
.intro-section { display: grid; grid-template-columns: 90px minmax(240px, .9fr) minmax(250px, .9fr); gap: 40px; align-items: center; padding-top: 115px; padding-bottom: 115px; }
.intro-mark { width: 78px; height: 78px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-family: var(--serif); font-size: 21px; letter-spacing: -.06em; }
.intro-section .section-title { font-size: clamp(38px, 4.5vw, 60px); }
.intro-text { max-width: 410px; }
.intro-text p { margin-bottom: 24px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.text-link { display: inline-flex; width: fit-content; align-items: center; gap: 14px; padding-bottom: 7px; border-bottom: 1px solid currentColor; text-decoration: none; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.text-link span { font-size: 16px; }
.home-links { display: grid; grid-template-columns: 1fr 1fr; min-height: 440px; }
.home-link-card { position: relative; min-height: 440px; padding: 48px clamp(28px, 6vw, 88px); display: flex; align-items: flex-end; justify-content: space-between; overflow: hidden; color: white; text-decoration: none; isolation: isolate; }
.home-link-card::before { content: ""; position: absolute; inset: 0; z-index: -2; background-position: center; background-size: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.home-link-card:hover::before { transform: scale(1.035); }
.home-link-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(18,19,16,.76), rgba(18,19,16,.06) 75%); }
.home-link-projects::before { background-image: url("../assets/kabuto-four.webp"); }
.home-link-smart::before { background-image: url("../assets/out-station-main.webp"); }
.home-link-card .eyebrow { margin-bottom: 13px; opacity: .85; }
.home-link-card h2 { margin: 0; font-family: var(--serif); font-size: clamp(37px, 5vw, 62px); font-weight: 400; letter-spacing: -.04em; line-height: 1; }
.home-link-number { position: absolute; top: 27px; left: clamp(28px, 6vw, 88px); font-size: 10px; letter-spacing: .16em; }
.home-link-arrow { display: grid; place-items: center; width: 47px; height: 47px; border: 1px solid rgba(255,255,255,.76); border-radius: 50%; font-size: 19px; transition: background .2s ease,color .2s ease; }
.home-link-card:hover .home-link-arrow { background: white; color: var(--ink); }
.site-footer { min-height: 90px; padding: 20px clamp(22px, 5vw, 76px); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--paper); border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; letter-spacing: .09em; }
.site-footer .wordmark { color: var(--ink); }
.site-footer p { margin: 0; }
.site-footer > a:last-child { text-decoration: none; }
.site-footer > a:last-child span { padding-left: 6px; font-size: 13px; }
.page-heading { padding-top: clamp(74px, 10vw, 130px); padding-bottom: 44px; }
.page-heading .eyebrow { margin-bottom: 21px; }
.page-heading .section-title { font-size: clamp(58px, 9vw, 118px); }
.page-heading-bottom { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-top: 16px; }
.page-heading-bottom p { max-width: 500px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.count-label { color: #858278; font-size: 10px; letter-spacing: .15em; text-transform: uppercase; white-space: nowrap; }
.project-archive { padding-top: 0; padding-bottom: 110px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 20px 0 28px; border-top: 1px solid var(--line); }
.filter-chip { min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 99px; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; transition: all .2s ease; }
.filter-chip:hover, .filter-chip.is-active { border-color: var(--ink); background: var(--ink); color: white; }
.archive-grid, .smart-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.archive-card, .smart-card { display: flex; flex-direction: column; min-width: 0; background: #e9e4db; color: var(--ink); text-decoration: none; }
.archive-card-image, .smart-card-image { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #d1cabc; }
.archive-card-image { aspect-ratio: 4 / 3; background: #c9c8c5; }
.archive-card-image img, .smart-card-image img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; transition: transform .55s cubic-bezier(.2,.7,.2,1); }
.archive-card-image.is-contain { aspect-ratio: 3 / 4; }
.archive-card-image.is-contain img { object-fit: contain; }
.archive-card:hover img, .smart-card:hover img { transform: scale(1.04); }
.archive-card-info, .smart-card-info { padding: 19px 20px 21px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.tag { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border: 1px solid rgba(34,35,31,.2); border-radius: 99px; color: #5e5d56; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.tag-status { border-color: transparent; background: rgba(34,35,31,.08); }
.archive-card h2, .smart-card h2 { margin: 0 0 8px; font-family: var(--serif); font-size: 26px; font-weight: 400; letter-spacing: -.025em; }
.archive-card p, .smart-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.card-open { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 19px; padding-top: 13px; border-top: 1px solid var(--line); font-size: 9px; letter-spacing: .13em; text-transform: uppercase; }
.card-open span:last-child { font-size: 16px; }
.empty-state { padding: 45px 0; color: var(--muted); font-family: var(--serif); font-size: 20px; }
.empty-state code { font-family: monospace; font-size: .75em; }
.smart-page-hero { position: relative; min-height: max(620px, calc(87svh - 78px)); display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; color: white; }
.smart-page-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("../assets/out-station-main.webp") center 44% / cover no-repeat; }
.smart-page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(18,19,16,.62), rgba(18,19,16,.08) 82%), linear-gradient(0deg, rgba(16,17,15,.52), transparent 75%); }
.smart-page-content { width: min(1300px, 100%); margin: 0 auto; padding: 100px clamp(28px, 7.5vw, 120px) 75px; }
.smart-page-hero h1 { max-width: 780px; font-size: clamp(52px, 8vw, 100px); }
.smart-page-content > p:last-child { max-width: 460px; margin: 23px 0 0; color: rgba(255,255,255,.82); font-size: 14px; line-height: 1.8; }
.smart-archive { padding-top: 90px; padding-bottom: 110px; }
.page-heading-inline { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 35px; }
.page-heading-inline .section-title { margin: 0; font-size: clamp(44px, 6vw, 75px); }
.page-heading-inline .eyebrow { margin-bottom: 17px; }
.page-heading-inline > p { max-width: 350px; margin: 0 0 6px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.detail-wrap { padding-top: 68px; padding-bottom: 110px; }
.back-link { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 39px; color: var(--muted); text-decoration: none; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.back-link:hover { color: var(--ink); }
.detail-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 37px; }
.detail-heading h1 { max-width: 780px; margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(48px, 7vw, 88px); letter-spacing: -.055em; line-height: 1; }
.detail-heading .card-meta { justify-content: end; margin-bottom: 8px; }
.detail-copy { max-width: 750px; margin: 0 0 34px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.detail-layout { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(250px,.6fr); gap: 30px; align-items: start; }
.gallery-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.detail-gallery-main { position: relative; overflow: hidden; background: var(--paper-deep); cursor: zoom-in; }
.detail-gallery-main img { display: block; width: 100%; max-height: 760px; aspect-ratio: 4 / 3; object-fit: contain; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; margin-top: 9px; }
.gallery-thumb { padding: 0; border: 1px solid transparent; background: var(--paper-deep); cursor: pointer; overflow: hidden; aspect-ratio: 4 / 3; }
.gallery-thumb[hidden] { display: none; }
.gallery-thumb.is-active { border-color: var(--ink); }
.gallery-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.gallery-stage, .gallery-thumb-type { position: absolute; z-index: 1; left: 12px; bottom: 12px; padding: 8px 11px; background: rgba(24,24,21,.76); color: white; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; backdrop-filter: blur(8px); }
.gallery-thumb { position: relative; }
.gallery-thumb-type { left: 5px; bottom: 5px; max-width: calc(100% - 10px); overflow: hidden; padding: 5px 7px; text-overflow: ellipsis; white-space: nowrap; font-size: 7px; }
.detail-aside { padding: 27px; background: #e9e4db; }
.detail-aside h2 { margin: 0 0 15px; font-family: var(--serif); font-size: 25px; font-weight: 400; }
.detail-aside ul { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.detail-aside li { padding: 12px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.6; }
.detail-aside p { margin: 20px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.lightbox { width: min(1100px, calc(100vw - 30px)); max-width: none; max-height: 92vh; padding: 18px; border: 0; background: #111; color: white; }
.lightbox::backdrop { background: rgba(0,0,0,.84); }
.lightbox img { display: block; width: 100%; max-height: calc(82vh - 50px); object-fit: contain; }
.lightbox p { margin: 10px 0 0; color: rgba(255,255,255,.75); font-size: 11px; text-align: center; }
.lightbox-close { position: absolute; top: 8px; right: 10px; z-index: 2; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255,255,255,.15); color: white; cursor: pointer; font-size: 25px; }
.not-found { padding: 110px 0; text-align: center; }
.not-found h1 { font-family: var(--serif); font-size: 50px; font-weight: 400; }
.reveal { opacity: 1; transform: none; }
.has-js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.has-js .reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (max-width: 900px) {
  .site-header { height: 70px; }
  .page-main { min-height: calc(100vh - 70px); }
  .menu-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; top: 70px; right: 0; left: 0; padding: 10px 26px 22px; flex-direction: column; align-items: stretch; gap: 0; background: rgba(243,240,233,.98); border-bottom: 1px solid var(--line); }
  .nav.is-open { display: flex; }
  .nav a { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .hero { min-height: max(650px, calc(100svh - 70px)); }
  .hero::before { background-position: 52% center; }
  .intro-section { grid-template-columns: 70px 1fr; gap: 25px; padding-top: 80px; padding-bottom: 80px; }
  .intro-text { grid-column: 2; }
  .intro-mark { width: 64px; height: 64px; }
  .home-links { min-height: 360px; }
  .home-link-card { min-height: 360px; }
  .archive-grid, .smart-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-aside { max-width: none; }
}
@media (max-width: 560px) {
  .wordmark { font-size: 15px; }
  .wordmark span { font-size: 20px; }
  .hero { min-height: max(620px, calc(100svh - 70px)); }
  .hero::before { background-position: 48% center; }
  .hero-content { padding: 70px 25px 65px; }
  .hero h1 { font-size: clamp(52px, 14vw, 78px); }
  .hero-copy { max-width: 340px; font-size: 13px; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-index { right: 24px; bottom: 21px; }
  .intro-section { grid-template-columns: 1fr; gap: 23px; padding-top: 66px; padding-bottom: 67px; }
  .intro-text { grid-column: auto; }
  .intro-mark { width: 54px; height: 54px; font-size: 18px; }
  .intro-section .section-title { font-size: 43px; }
  .home-links { grid-template-columns: 1fr; }
  .home-link-card { min-height: 310px; padding: 38px 27px; }
  .home-link-number { left: 27px; top: 22px; }
  .site-footer { align-items: start; flex-direction: column; gap: 9px; padding-top: 24px; padding-bottom: 24px; }
  .page-heading { padding-top: 70px; padding-bottom: 32px; }
  .page-heading .section-title { font-size: 64px; }
  .page-heading-bottom { align-items: start; flex-direction: column; gap: 16px; }
  .project-archive { padding-bottom: 75px; }
  .filter-bar { flex-wrap: nowrap; overflow-x: auto; margin-right: -22px; padding-right: 22px; }
  .filter-chip { flex: 0 0 auto; }
  .archive-grid, .smart-grid { grid-template-columns: 1fr; gap: 14px; }
  .archive-card-image, .smart-card-image { aspect-ratio: 5 / 4; }
  .smart-page-hero { min-height: max(600px, calc(88svh - 70px)); }
  .smart-page-content { padding: 80px 26px 60px; }
  .smart-page-hero h1 { font-size: 57px; }
  .smart-archive { padding-top: 65px; padding-bottom: 75px; }
  .page-heading-inline { align-items: start; flex-direction: column; gap: 14px; }
  .detail-wrap { padding-top: 45px; padding-bottom: 75px; }
  .detail-heading { align-items: start; flex-direction: column; gap: 17px; }
  .detail-heading .card-meta { justify-content: start; }
  .detail-heading h1 { font-size: 52px; }
  .detail-gallery-main img { aspect-ratio: 4 / 3; }
  .gallery-thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-aside { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .has-js .reveal { opacity: 1; transform: none; }
}
