:root {
  color-scheme: light;
  --ink: #152b31;
  --muted: #52636a;
  --paper: #f5f4ef;
  --white: #fff;
  --line: #d7dedb;
  --accent: #b14722;
  --accent-pale: #f8e7dd;
  --teal: #246756;
  --teal-pale: #e7f1ec;
  --code: "IBM Plex Mono", Consolas, monospace;
  --body: "Instrument Sans", "Segoe UI", Arial, sans-serif;
  --display: "Space Grotesk", "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.55 var(--body); }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 4px; }
button, select, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #bd591f; outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.04em; line-height: 1.08; }
[hidden] { display: none !important; }
.frame { width: min(1150px, calc(100% - 72px)); margin-inline: auto; }
.skip { position: absolute; z-index: 3; top: 12px; left: 12px; padding: 12px; background: var(--white); transform: translateY(-180%); }
.skip:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 16px; }
.mark { display: grid; width: 42px; height: 42px; place-items: center; background: var(--ink); color: var(--white); font: 700 16px var(--code); text-decoration: none; }
.header-inner nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 42px); font-weight: 650; font-size: .93rem; }
.header-inner nav a, .header-contact { text-decoration: none; }
.header-inner a:hover { text-decoration: underline; }
.header-contact { color: var(--accent); font-weight: 700; }
.hero { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: clamp(28px, 6vw, 86px); padding-block: clamp(42px, 8vw, 100px); }
.hero-copy { min-width: 0; }
.context, .case-category { color: var(--accent); font: 650 .72rem/1.4 var(--code); text-transform: uppercase; letter-spacing: .08em; }
.context { display: flex; align-items: center; gap: 9px; }
.context span, .image-label span { display: inline-block; width: 8px; height: 8px; background: #bc6136; }
.hero h1 { margin-block: .15em .13em; font-size: clamp(3.9rem, 8.7vw, 8rem); letter-spacing: -.082em; line-height: .86; }
.hero h1 span { color: var(--accent); }
.hero-role { font-size: clamp(1.05rem, 1.8vw, 1.36rem); font-weight: 750; line-height: 1.3; max-width: 30ch; }
.hero-description { color: var(--muted); max-width: 44ch; margin-top: 14px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; padding: 9px 15px; border: 1px solid var(--ink); border-radius: 4px; text-decoration: none; font-weight: 700; }
.primary { color: var(--white); background: var(--ink); }
.primary:hover { background: var(--teal); }
.outline { color: var(--ink); background: transparent; }
.outline:hover { background: var(--teal-pale); }
.hero-visual { border: 1px solid #cbd6d0; background: var(--white); border-radius: 8px; box-shadow: 10px 12px 0 #e2e8df; min-width: 0; overflow: hidden; }
.gallery-view { position: relative; aspect-ratio: 1.38; background-color: #21473f; background-image: linear-gradient(#dcece42b 1px, transparent 1px), linear-gradient(90deg, #dcece42b 1px, transparent 1px); background-size: 28px 28px; }
.gallery-view img { width: 100%; height: 100%; object-fit: cover; }
.gallery-view img.plan { object-fit: contain; }
.image-label { position: absolute; bottom: 12px; left: 12px; max-width: calc(100% - 24px); display: flex; align-items: center; gap: 8px; padding: 7px 9px; background: #152b31ed; color: #fff; font: 600 .68rem/1.2 var(--code); text-transform: uppercase; letter-spacing: .06em; }
figcaption { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 13px 14px; }
.gallery-caption { display: grid; line-height: 1.3; gap: 4px; }
.gallery-caption span { font-size: .83rem; color: var(--muted); }
.gallery-buttons { display: flex; align-items: center; gap: 7px; white-space: nowrap; font: 600 .72rem var(--code); }
.gallery-buttons button { width: 34px; height: 36px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--white); font-size: 1.05rem; }
.gallery-buttons button:hover { background: var(--teal-pale); border-color: var(--teal); }
.section-inner { padding-block: clamp(40px, 6.5vw, 80px); }
.section-intro { display: flex; align-items: end; justify-content: space-between; gap: 12px 30px; margin-bottom: 24px; }
.section-intro h2 { font-size: clamp(2rem, 4.8vw, 3.55rem); }
.section-intro p { color: var(--muted); max-width: 38ch; }
.work-section { background: #edf2ee; border-block: 1px solid var(--line); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 17px; }
.filters button { padding: 7px 13px; min-height: 42px; border: 1px solid #b7c9bf; border-radius: 5px; color: var(--ink); background: transparent; font-size: .9rem; font-weight: 650; }
.filters button[aria-pressed="true"] { border-color: var(--ink); color: var(--white); background: var(--ink); }
.filters button:hover:not([aria-pressed="true"]) { background: var(--white); }
.work-layout { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(0, 2.25fr); gap: 16px; align-items: start; }
.case-list { display: grid; gap: 7px; }
.case-button { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 60px; padding: 11px 12px; border: 1px solid #c5d2ca; border-radius: 5px; color: var(--ink); background: #f8faf8; text-align: left; line-height: 1.25; font-weight: 700; }
.case-button[aria-pressed="true"] { border-color: var(--ink); background: var(--teal-pale); box-shadow: inset 4px 0 var(--teal); }
.case-button:hover { border-color: var(--teal); }
.case-button small { display: block; margin-bottom: 4px; color: var(--teal); font: 600 .64rem var(--code); text-transform: uppercase; }
.case-button .arrow { font-size: 1.16rem; font-weight: 500; }
.case-detail { border: 1px solid #c5d2ca; border-radius: 7px; background: var(--white); overflow: hidden; }
.case-detail-head { padding: clamp(18px, 3.3vw, 32px); border-bottom: 1px solid var(--line); }
.case-detail h3 { margin-top: 6px; font-size: clamp(1.65rem, 3.2vw, 2.65rem); }
.case-detail-head > p:last-child { color: var(--muted); margin-top: 9px; }
.case-body { padding: clamp(18px, 3.3vw, 32px); }
.case-role { margin-bottom: 15px; color: var(--muted); }
.case-role strong { color: var(--ink); }
.case-figure { margin-bottom: 16px; }
.case-photo { width: 100%; max-height: 260px; object-fit: contain; border-radius: 5px; background: #edf2ee; }
.case-figure figcaption { padding: 6px 0 0; font-size: .78rem; color: var(--muted); }
.case-metric { display: grid; gap: 4px; padding: 12px 15px; margin-bottom: 16px; border-left: 4px solid var(--accent); background: var(--accent-pale); }
.case-metric strong { font: 650 clamp(1.35rem, 3vw, 2rem)/1.1 var(--code); }
.case-metric span { font-size: .87rem; }
.case-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.case-points h4 { margin: 0 0 4px; }
.case-points p { font-size: .92rem; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; padding: 0; list-style: none; }
.tags li { padding: 4px 7px; background: var(--teal-pale); color: #214f43; border-radius: 3px; font: 600 .73rem/1.4 var(--code); }
.lab-grid, .background-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.lab-card { padding: clamp(19px, 3vw, 31px); border: 1px solid var(--line); border-radius: 7px; background: var(--white); }
.lab-card h3 { font-size: clamp(1.45rem, 3vw, 2.1rem); margin: 6px 0 9px; }
.lab-card > p:not(.case-category) { color: var(--muted); }
.lab-output { margin: 17px 0 12px; display: flex; gap: 9px; align-items: baseline; }
.lab-output output { color: var(--teal); font: 700 clamp(2.2rem, 5vw, 3.3rem)/1 var(--code); letter-spacing: -.08em; }
.lab-output span { font: 600 .86rem var(--code); }
.range-label { display: flex; align-items: baseline; justify-content: space-between; font-weight: 700; font-size: .92rem; margin-top: 13px; }
.range-label output { font-family: var(--code); color: var(--teal); }
input[type="range"] { display: block; width: 100%; margin: 8px 0 0; accent-color: var(--teal); min-height: 24px; }
.range-ticks { display: flex; justify-content: space-between; color: var(--muted); font: 600 .72rem var(--code); }
.lab-note { font-size: .83rem; margin-top: 10px; }
.case-interaction { margin-top: 16px; padding: 12px 14px; background: var(--teal-pale); border-radius: 5px; }
.case-interaction .range-label { margin-top: 0; }
.text-button { margin-top: 9px; min-height: 36px; padding: 4px 0; border: 0; color: var(--accent); background: transparent; text-decoration: underline; text-underline-offset: 4px; font-weight: 700; }
.lab-card select { display: block; width: 100%; margin: 6px 0 13px; padding: 8px; border: 1px solid #b7c9bf; border-radius: 4px; color: var(--ink); background: #fbfcfb; }
.demo-result { margin-top: 12px; padding: 12px; min-height: 50px; background: #edf2ee; font-size: .87rem; overflow-wrap: anywhere; }
.demo-result ul { margin: 4px 0 0; padding-left: 17px; font-family: var(--code); font-size: .8rem; }
.background-section { border-top: 1px solid var(--line); background: #e8eeeb; }
.background-grid { gap: clamp(16px, 4vw, 52px); }
.timeline { border-left: 2px solid #a1b9ac; padding-left: 18px; }
.timeline article, .credentials article { padding: 0 0 16px; }
.timeline article + article, .credentials article + article { border-top: 1px solid #c8d6ce; padding-top: 16px; }
.timeline article > span { color: var(--teal); font: 650 .76rem var(--code); }
.background-grid h3 { font-size: 1.25rem; margin: 4px 0 6px; }
.background-grid p, .background-grid li { font-size: .92rem; color: var(--muted); }
.credentials ul { margin: 0; padding-left: 20px; }
.text-link { display: inline-block; margin-top: 7px; color: var(--teal); font-weight: 700; }
footer { background: var(--ink); color: #fff; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 18px; padding-block: 30px; }
.contact-identity { display: flex; gap: 13px; align-items: center; }
.contact-identity img { border-radius: 4px; object-fit: cover; object-position: center 35%; }
.contact-identity h2 { font-size: 1.55rem; }
.contact-identity p { color: #c4d8d1; font-size: .86rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: .9rem; font-weight: 650; }
.light .hero-visual, .light .contact-identity img { display: none; }
.light .hero { grid-template-columns: 1fr; }
.light .hero h1 br { display: none; }
@media (max-width: 860px) {
  .frame { width: calc(100% - 42px); }
  .hero { gap: 24px; }
  .gallery-view { aspect-ratio: 1.15; }
  .case-points { grid-template-columns: 1fr; }
}
@media (max-width: 660px) {
  .frame { width: calc(100% - 30px); }
  .header-inner { min-height: 60px; gap: 10px; }
  .mark { width: 33px; height: 34px; font-size: .84rem; }
  .header-inner nav { gap: 10px; font-size: .76rem; }
  .header-contact { font-size: .77rem; }
  .hero, .work-layout, .lab-grid, .background-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
  .hero h1 { font-size: clamp(3.7rem, 13vw, 5rem); }
  .gallery-view { aspect-ratio: 1.55; }
  .section-intro { display: grid; }
  .case-list { display: flex; flex-wrap: wrap; }
  .case-button { flex: 1 1 120px; min-width: 0; font-size: .82rem; min-height: 54px; }
  .case-button .arrow { display: none; }
}
@media (max-width: 350px) {
  .header-inner { flex-wrap: wrap; padding-block: 8px; }
  .gallery-buttons { gap: 4px; }
  figcaption { padding-inline: 9px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
