:root {
  color-scheme: light;
  --paper: #f7f7f2;
  --white: #fff;
  --ink: #142d38;
  --muted: #465961;
  --accent: #236654;
  --wash: #e5ede5;
  --line: #d9e0db;
  --sans: "Segoe UI", system-ui, sans-serif;
  --mono: Consolas, "SFMono-Regular", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 var(--sans); }
h1, h2, h3, p, figure, ul { margin: 0; }
h1, h2, h3 { line-height: 1.06; font-weight: 730; letter-spacing: -.045em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; width: 100%; height: auto; }
:focus-visible { outline: 3px solid #377f69; outline-offset: 4px; }
.wrap { width: min(1160px, calc(100% - 80px)); margin-inline: auto; }
.accent { color: var(--accent); }
.mono, .kicker { font: 650 .75rem/1.4 var(--mono); letter-spacing: .105em; }
.kicker { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.signal { width: 7px; height: 7px; flex: none; background: #377f69; border-radius: 50%; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 10; padding: 8px 14px; background: var(--white); transform: translateY(-150%); }
.skip:focus { transform: none; }

.header { position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--line); background: var(--paper); }
.bar { display: grid; min-height: 72px; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; }
.brand { display: inline-flex; gap: 11px; align-items: center; justify-self: start; font-weight: 720; font-size: .95rem; }
.brand-mark { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 9px; background: var(--ink); color: #edf5ed; font: 700 .82rem var(--mono); letter-spacing: -.04em; }
.nav { display: flex; align-items: center; gap: 28px; font-size: .9rem; color: var(--muted); }
.nav a:hover, .foot a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 5px; }
.languages { display: flex; justify-self: end; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; }
.languages button { padding: 5px 9px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; font: 700 .75rem/1.5 var(--mono); }
.languages button[aria-pressed=true] { background: var(--ink); color: var(--white); }

.hero { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); gap: clamp(30px,6vw,88px); align-items: center; padding-block: 72px 63px; scroll-margin-top: 82px; }
.hero h1 { max-width: 9ch; margin-top: 16px; font-size: clamp(3.3rem,7.65vw,6.8rem); letter-spacing: -.075em; line-height: .98; }
.role { margin-top: 20px; color: var(--accent); font-size: clamp(1.12rem,2.1vw,1.55rem); font-weight: 670; letter-spacing: -.03em; }
.intro { max-width: 490px; margin-top: 11px; color: var(--muted); font-size: clamp(1rem,1.6vw,1.14rem); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 49px; padding: 9px 15px; border: 1px solid #a8b7b0; border-radius: 8px; font-size: .9rem; font-weight: 680; transition: background .18s, border-color .18s; }
.button span[aria-hidden] { font-size: 1.12rem; }
.primary { background: var(--ink); border-color: var(--ink); color: var(--white); }
.primary:hover { background: #23505b; border-color: #23505b; }
.secondary:hover { background: var(--wash); border-color: var(--accent); }
.portrait { width: min(100%, 400px); justify-self: end; border-radius: 14px; overflow: hidden; border: 1px solid #ced9d1; background: #ecf1e9; }
.portrait-stage { display: grid; place-items: center; padding: clamp(20px,3vw,34px); background-color: #dfe9df; background-image: linear-gradient(#647e651a 1px,transparent 1px), linear-gradient(90deg,#647e651a 1px,transparent 1px); background-size: 24px 24px; }
.portrait-stage img { border: 1px solid #cad9cb; border-radius: 9px; box-shadow: 0 12px 28px #1b3d2f1e; background: var(--white); }
.portrait figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 17px; color: var(--muted); border-top: 1px solid #ced9d1; font-size: .86rem; }
.portrait .mono { color: var(--accent); white-space: nowrap; }
.stack-band { background: #edf1e9; border-block: 1px solid var(--line); }
.stack { display: flex; gap: 20px 36px; align-items: center; min-height: 68px; padding-block: 11px; }
.stack .mono { white-space: nowrap; }
.stack ul { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 21px; padding: 0; list-style: none; font-size: .91rem; font-weight: 680; }
.stack li+li::before { content: "·"; margin-right: 21px; color: var(--accent); }

.section { padding-block: 76px; scroll-margin-top: 76px; }
.section-top { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 27px; }
h2 { margin-top: 10px; font-size: clamp(2.5rem,5.15vw,4.5rem); }
.section-note { max-width: 380px; color: var(--muted); }
.project-tools:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.filters button { border: 1px solid #c8d5cd; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; padding: 6px 12px; min-height: 40px; font-weight: 650; font-size: .84rem; }
.filters button:hover { background: var(--wash); color: var(--ink); }
.filters button[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.project-count { color: var(--muted); font: .82rem/1.45 var(--mono); }
.projects { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }
.project { display: flex; flex-direction: column; min-width: 0; padding: 23px 25px 21px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: 0 6px 15px #142d3805; }
.project-spotlight { grid-column: 1 / -1; }
.project-spotlight .process { width: min(100%, 550px); }
.project-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.project-index { display: grid; place-items: center; min-width: 39px; min-height: 37px; background: var(--wash); border-radius: 7px; color: var(--accent); letter-spacing: .01em; }
.project-type { color: var(--accent); text-align: right; font: 650 .68rem/1.35 var(--mono); letter-spacing: .07em; }
.project h3 { margin-bottom: 8px; font-size: clamp(1.52rem,3vw,2.1rem); }
.project p { margin-bottom: 19px; color: var(--muted); }
.process { --flow-bg:#e8eff0; --flow-line:#c5d7db; --flow-ink:#245263; margin: auto 0 16px; padding: 13px; border: 1px solid var(--flow-line); border-radius: 8px; background: var(--flow-bg); color: var(--flow-ink); }
.project[data-category=business] .process { --flow-bg:#e9eee5; --flow-line:#cbd8c7; --flow-ink:#355d42; }
.project[data-category=dev] .process { --flow-bg:#efebf5; --flow-line:#d7cde5; --flow-ink:#594678; }
.process-label { display: block; margin-bottom: 8px; font: 700 .67rem/1.4 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.process-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; padding: 0; list-style: none; counter-reset: flow; }
.process-steps li { display: flex; flex-direction: column; gap: 4px; position: relative; min-width: 0; padding: 6px 7px; border: 1px solid var(--flow-line); border-radius: 5px; background: #ffffffb8; font-size: .77rem; font-weight: 690; line-height: 1.35; overflow-wrap: anywhere; }
.process-steps li::before { counter-increment: flow; content: "0" counter(flow); opacity: .83; font: .63rem/1 var(--mono); }
.process-steps li+li::after { content: ""; position: absolute; left: -9px; top: 50%; width: 5px; height: 5px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: translateY(-50%) rotate(45deg); }
.project-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; padding: 0; list-style: none; }
.tags li { padding: 3px 7px; background: #edf3ee; border-radius: 4px; color: #275746; font: .76rem/1.45 var(--mono); }
.project-link { color: var(--accent); font-size: .83rem; font-weight: 680; white-space: nowrap; }
.project-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.more { margin-top: 38px; }
.more h3 { margin-bottom: 13px; font-size: 1.5rem; }
.more ul { padding: 0; border-top: 1px solid var(--line); list-style: none; }
.more li { display: grid; grid-template-columns: minmax(180px,.7fr) minmax(0,1.3fr) auto; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.more li p { color: var(--muted); font-size: .9rem; }
.more a { color: var(--accent); font-size: 1.15rem; }
.project, .more li { position: relative; }
.project:hover { border-color: #a6bbb0; }
.more li:hover { background: #ecf0e9; }
.detail-trigger { padding: 3px 0; border: 0; background: transparent; color: var(--accent); cursor: pointer; white-space: nowrap; font-size: .84rem; font-weight: 700; }
.detail-trigger::after { content: ""; position: absolute; inset: 0; }
.project:hover .detail-trigger, .more li:hover .detail-trigger { text-decoration: underline; text-underline-offset: 4px; }
.project-detail { width: min(620px,calc(100% - 28px)); max-height: min(84vh, 760px); max-height: min(84dvh, 760px); padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); color: var(--ink); box-shadow: 0 18px 65px #142d3852; }
.project-detail::backdrop { background: #142d3899; }
body:has(.project-detail[open]) { overflow: hidden; }
.detail-header { display: flex; justify-content: space-between; align-items: start; gap: 15px; background: #edf1e9; border-bottom: 1px solid var(--line); padding: clamp(17px,4vw,28px); }
.detail-header .kicker { color: var(--accent); }
.detail-header h2 { margin-top: 7px; font-size: clamp(1.65rem,5vw,2.7rem); }
.detail-close { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #becdc3; border-radius: 7px; background: var(--white); color: var(--ink); cursor: pointer; font-size: 1.45rem; line-height: 1; }
.detail-close:hover { background: var(--wash); }
.detail-content { display: grid; gap: 21px; padding: clamp(17px,4vw,28px); }
.detail-content h3 { margin-bottom: 8px; font-size: 1.24rem; }
.detail-content p, .detail-content ol { color: var(--muted); }
.detail-content ol { padding-left: 1.6em; }
.detail-content li { padding-left: .18em; }
.detail-content li+li { margin-top: 6px; }
.detail-content li::marker { color: var(--accent); font-weight: 700; }
.detail-links:empty { display: none; }
.about { background: #edf1e9; border-block: 1px solid var(--line); scroll-margin-top: 76px; }
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; }
.about .section-note, .contact .section-note { margin-top: 13px; }
.timeline { padding-left: 22px; border-left: 1px solid #a4b8aa; }
.timeline article { position: relative; padding-bottom: 23px; }
.timeline article:last-child { padding-bottom: 0; }
.timeline article::before { content: ""; position: absolute; left: -27px; top: 9px; width: 9px; height: 9px; background: var(--accent); border-radius: 50%; }
.timeline h3 { margin: 5px 0 6px; font-size: 1.4rem; line-height: 1.15; }
.timeline p { color: var(--muted); }
.contact { display: flex; align-items: end; justify-content: space-between; gap: 28px; padding: clamp(23px,5vw,53px); background: var(--ink); border-radius: 15px; color: var(--white); }
.contact .kicker, .contact .section-note { color: #c4d6d2; }
.contact .accent { color: #b2dcc8; }
.contact .actions { flex-shrink: 0; }
.contact .primary { background: #e1eee6; color: var(--ink); border-color: #e1eee6; }
.contact .primary:hover { background: #c4e5d2; }
.contact .secondary:hover { background: #254652; border-color: #bdd8ce; }
footer { border-top: 1px solid var(--line); }
.foot { display: flex; justify-content: space-between; align-items: center; min-height: 62px; gap: 12px; color: var(--muted); font-size: .86rem; }

@media (max-width: 850px) {
  .wrap { width: calc(100% - 48px); }
  .hero { gap: 27px; padding-block: 50px; }
  .section { padding-block: 58px; }
  .contact { flex-direction: column; align-items: start; }
  .contact .actions { margin-top: 0; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 36px); }
  .bar { min-height: 60px; grid-template-columns: 1fr auto; gap: 9px; padding-top: 9px; }
  .nav { grid-row: 2; grid-column: 1/-1; justify-content: space-between; gap: 8px; padding-bottom: 9px; }
  .hero { grid-template-columns: minmax(0,1fr); padding-block: 38px; scroll-margin-top: 100px; }
  .hero h1 { font-size: clamp(3.2rem,13vw,5.2rem); }
  .role { margin-top: 14px; }
  .portrait { justify-self: start; width: min(100%,340px); }
  .stack { align-items: start; flex-direction: column; gap: 6px; }
  .stack ul { gap: 5px 11px; }
  .stack li+li::before { content: none; }
  .section { padding-block: 47px; scroll-margin-top: 100px; }
  .section-top { display: block; margin-bottom: 19px; }
  .section-note { margin-top: 10px; }
  .project-tools:not([hidden]) { gap: 8px; margin-bottom: 13px; }
  .projects, .about-grid { grid-template-columns: 1fr; gap: 12px; }
  .project { padding: 18px; }
  .project-head { margin-bottom: 15px; }
  .more li { grid-template-columns: minmax(0,1fr) auto; gap: 4px 10px; }
  .more li p { grid-row: 2; grid-column: 1; }
  .more li a, .more li .detail-trigger { grid-column: 2; grid-row: 1/3; }
  .about-grid { gap: 24px; }
  .about { scroll-margin-top: 100px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
