/* Home page. Same identity as the Chess Data Platform case study, so the
   professional half of the site reads as one system: ink, paper, a light-square
   tint, board green for structure, one amber accent spent on the call to action
   and the hero highlight. Fraunces for display, IBM Plex Sans for text.
   verify-assets: 1.1.0 */
:root {
    --ink: #1B1F23;
    --ink-2: #2A3036;
    --green: #5E7F3E;
    --green-deep: #3F5A2A;
    --square: #EBECD0;
    --amber: #C8892B;
    --slate: #5B6770;
    --mute: #8A939B;
    --rule: #D5D8D0;
    --tint: #F4F5EF;
    --paper: #FFFFFF;
    --bronze: #A0673A;
    --silver: #7C8791;
    --gold: #B8912F;
    --serif: "Fraunces", Georgia, serif;
    --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
    --mono: "IBM Plex Mono", Consolas, monospace;
    --wide: 1140px;
}
body { background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 1.04rem; line-height: 1.55; -webkit-font-smoothing: antialiased; }
.hm { overflow-x: clip; }
.hm .wrap { max-width: var(--wide); margin: 0 auto; padding: 0 20px; }
.hm h1, .hm h2, .hm h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.012em; line-height: 1.1; margin: 0; }
.hm h2 { font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.5rem); font-variation-settings: "opsz" 72; }
.hm h3 { font-size: 1.3rem; }
.hm p { margin: 0 0 1rem; max-width: 62ch; }
.hm a { color: var(--green-deep); text-underline-offset: 0.15em; }
.hm a:hover { color: var(--amber); }
.hm :focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.hm ul { padding-left: 1.1rem; max-width: 62ch; }
.hm li { margin-bottom: 0.4rem; }
/* Lists that are layout, not prose: beat the .hm ul measure on specificity. */
.hm .hm-principles, .hm .hm-stack { max-width: none; }
.hm-btn { display: inline-block; padding: 0.7rem 1.2rem; border-radius: 4px; text-decoration: none; font-weight: 600; font-size: 0.98rem; border: 1px solid transparent; }
.hm-btn-solid { background: var(--amber); color: var(--ink) !important; }
.hm-btn-solid:hover { background: #d99a3d; }
.hm-btn-ghost { border-color: rgba(235,236,208,0.45); color: var(--square) !important; }
.hm-btn-ghost:hover { border-color: var(--square); }
.hm-btn-ink { border-color: var(--ink); color: var(--ink) !important; }
.hm-btn-ink:hover { background: var(--ink); color: var(--paper) !important; }
.hm-sec { padding: clamp(2.8rem, 6vw, 5rem) 0; }
.hm-sec.tint { background: var(--tint); }
.hm-sec.ink { background: var(--ink); color: var(--square); }
.hm-sec.ink h2, .hm-sec.ink h3 { color: #fff; }
.hm-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 1rem 3rem; align-items: start; margin-bottom: 2.2rem; }
.hm-head p { margin: 0; color: var(--slate); }
.hm-sec.ink .hm-head p { color: var(--square); opacity: 0.82; }
.hm-mark { font-family: var(--serif); font-size: 0.95rem; color: var(--green); font-weight: 500; margin-bottom: 0.35rem; }
.hm-sec.ink .hm-mark { color: var(--square); opacity: 0.8; }

/* ---------- hero ---------- */
.hm-hero { background: var(--ink); color: var(--square); padding: clamp(3rem, 7vw, 6rem) 0 clamp(2.6rem, 5vw, 4.5rem); position: relative; }
.hm-hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hm-hero .hm-mark { color: var(--square); opacity: 0.72; font-size: 1rem; margin-bottom: 1.2rem; }
.hm-hero h1 { font-size: clamp(2.4rem, 1.6rem + 3.6vw, 4.5rem); font-variation-settings: "opsz" 144; color: #fff; max-width: 14ch; margin-bottom: 1.2rem; }
.hm-hero h1 em { font-style: italic; font-weight: 500; color: var(--amber); }
.hm-lede { font-size: clamp(1.05rem, 1rem + 0.5vw, 1.3rem); line-height: 1.5; max-width: 38ch; margin-bottom: 1.8rem; }
.hm-hero .hm-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.hm-shot { position: relative; }
.hm-shot img { display: block; width: 100%; height: auto; border: 1px solid rgba(235,236,208,0.25); box-shadow: 0 40px 80px rgba(0,0,0,0.55); background: #fff; }
.hm-shot figcaption { margin-top: 0.8rem; font-size: 0.86rem; color: var(--square); opacity: 0.75; }
.hm-shot::before { content: ""; position: absolute; inset: -14px -14px auto auto; width: 42%; height: 60%; background:
    repeating-linear-gradient(90deg, var(--green-deep) 0 12.5%, var(--ink-2) 12.5% 25%); opacity: 0.55; z-index: -1; }

/* ---------- proof ledger ---------- */
.hm-ledger { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.hm-ledger div { padding: 1.4rem 1.2rem 1.3rem; border-left: 1px solid var(--rule); }
.hm-ledger div:first-child { border-left: 0; padding-left: 0; }
.hm-ledger b { display: block; font-family: var(--serif); font-weight: 600; font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.8rem); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.hm-ledger span { display: block; margin-top: 0.5rem; color: var(--slate); font-size: 0.92rem; line-height: 1.35; }
.hm-ledger-note { margin: 1rem 0 0; color: var(--mute); font-size: 0.86rem; }

/* ---------- what I do ---------- */
.hm-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem 2.5rem; }
.hm-cols > div { border-top: 3px solid var(--green); padding-top: 1rem; }
.hm-cols h3 { margin-bottom: 0.5rem; }
.hm-cols p { color: var(--slate); font-size: 0.98rem; margin-bottom: 0.8rem; }
.hm-cols ul { font-size: 0.95rem; margin: 0; }

/* ---------- work ---------- */
.hm-feature { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 2rem 3rem; align-items: center; background: var(--paper); border: 1px solid var(--rule); padding: 1.5rem; margin-bottom: 1.5rem; }
.hm-feature img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); }
.hm-feature .hm-mark { margin-bottom: 0.4rem; }
.hm-feature h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); margin-bottom: 0.7rem; }
.hm-feature p { color: var(--slate); }
.hm-feature ul { font-size: 0.95rem; margin-bottom: 1.2rem; }
.hm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.hm-card { display: block; text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-top: 3px solid var(--rule); transition: border-color 0.15s ease; }
.hm-card:hover { color: var(--ink); border-top-color: var(--amber); }
.hm-card img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hm-card .hm-tile { aspect-ratio: 16 / 9; display: grid; place-items: center; background: var(--ink); color: var(--square); font-family: var(--serif); font-size: 1.6rem; font-variation-settings: "opsz" 72; padding: 1rem; text-align: center; }
.hm-card > div:last-child { padding: 1rem 1.2rem 1.2rem; }
.hm-card b { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.15rem; margin-bottom: 0.3rem; }
.hm-card span { display: block; color: var(--slate); font-size: 0.92rem; }
.hm-card small { display: block; margin-top: 0.6rem; font-size: 0.8rem; color: var(--green-deep); font-weight: 600; }

/* ---------- medallion hints: a thin bronze / silver / gold bar on the featured
   case study, and a dot before each layer word in the services list ---------- */
.hm-medallion { position: relative; border-top: 0; padding-top: calc(1.5rem + 4px); }
.hm-medallion::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--bronze) 0 33.34%, var(--silver) 33.34% 66.67%, var(--gold) 66.67% 100%); }
.hm-metal::before { content: ""; display: inline-block; width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--m); margin-right: 0.3em; vertical-align: 0.05em; }

/* ---------- how I work ---------- */
.hm-principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem 2rem; list-style: none; padding: 0; margin: 0; max-width: none; }
.hm-principles li { margin: 0; border-top: 1px solid rgba(235,236,208,0.25); padding-top: 0.9rem; }
.hm-principles b { display: block; font-family: var(--serif); font-size: 1.15rem; color: #fff; margin-bottom: 0.3rem; }
.hm-principles span { font-size: 0.92rem; opacity: 0.85; }

/* ---------- stack ---------- */
.hm-stack { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.6rem; list-style: none; padding: 0; margin: 0; max-width: none; }
.hm-stack li { margin: 0; background: var(--paper); border: 1px solid var(--rule); padding: 0.6rem 0.8rem; font-size: 0.92rem; }
.hm-stack li em { display: block; font-style: normal; font-size: 0.76rem; color: var(--mute); }

/* ---------- contact ---------- */
.hm-contact .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 2rem 3rem; align-items: center; }
.hm-contact h2 { margin-bottom: 0.8rem; }
.hm-contact p { color: var(--slate); }
.hm-contact .hm-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.hm-aside { border-left: 3px solid var(--rule); padding-left: 1.2rem; font-size: 0.95rem; color: var(--slate); }
.hm-aside b { display: block; color: var(--ink); font-family: var(--serif); font-size: 1.1rem; margin-bottom: 0.3rem; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
    .hm-cols, .hm-grid { grid-template-columns: 1fr 1fr; }
    .hm-principles { grid-template-columns: 1fr 1fr; }
    .hm-ledger { grid-template-columns: 1fr 1fr; }
    .hm-ledger div:nth-child(3) { border-left: 0; padding-left: 0; }
    .hm-ledger div:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 720px) {
    .hm-hero .wrap, .hm-feature, .hm-contact .wrap, .hm-head { grid-template-columns: minmax(0, 1fr); }
    .hm-hero h1 { max-width: none; }
    .hm-cols, .hm-grid, .hm-principles { grid-template-columns: 1fr; }
    .hm-shot::before { display: none; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
