@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --paper: #f4f2ed;
  --paper-deep: #e9e6de;
  --ink: #171717;
  --muted: #6d6b65;
  --line: #d8d5cc;
  --blue: #164fbd;
  --orange: #e86d3d;
  --max: 1240px;
  --display: "Space Grotesk", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --body: "DM Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
body::before { position: fixed; inset: 0; z-index: -1; pointer-events: none; content: ""; opacity: .35; background-image: radial-gradient(#c8c4ba .7px, transparent .7px); background-size: 18px 18px; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue); }
.wrap { width: min(100% - 48px, var(--max)); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 20px; top: 20px; z-index: 100; padding: 10px 16px; background: var(--ink); color: white; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(244, 242, 237, .92); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 78px; }
.brand { font: 700 1.45rem/1 var(--display); letter-spacing: -.09em; }
.brand span { color: var(--orange); }
.nav { display: flex; align-items: center; gap: 34px; }
.nav a { font-size: .88rem; font-weight: 600; }
.nav-cta { padding: 10px 16px; border: 1px solid var(--ink); }
.nav-cta:hover { background: var(--ink); color: white; }
.nav-toggle, .nav-toggle-label { display: none; }

.hero { position: relative; overflow: hidden; padding: 130px 0 142px; border-bottom: 1px solid var(--line); }
.hero::after { position: absolute; right: -8vw; bottom: -16vw; width: 42vw; height: 42vw; content: ""; border: 1px solid rgba(22,79,189,.22); border-radius: 50%; pointer-events: none; }
.hero-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .75fr); gap: 100px; align-items: center; }
.eyebrow, .card-kicker, .footer-label { margin: 0 0 18px; color: var(--blue); font-size: .72rem; font-weight: 700; letter-spacing: .16em; line-height: 1.2; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.055em; }
h1 { max-width: 820px; margin-bottom: 28px; font-size: clamp(3.5rem, 8vw, 8.5rem); font-weight: 500; letter-spacing: -.07em; line-height: .9; }
h1::first-line { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.04em; }
.hero-lede { max-width: 560px; margin-bottom: 36px; color: var(--muted); font-size: 1.15rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.button { display: inline-flex; gap: 18px; align-items: center; padding: 14px 20px; font-weight: 600; border: 1px solid var(--ink); }
.button-primary { background: var(--ink); color: white; }
.button-primary:hover { background: var(--blue); color: white; border-color: var(--blue); }
.button-quiet { border-color: var(--line); }
.hero-note { display: flex; gap: 10px; align-items: center; margin-top: 58px; color: var(--muted); font-size: .86rem; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #3c9b68; box-shadow: 0 0 0 5px rgba(60, 155, 104, .13); }
.hero-portrait { position: relative; max-width: 440px; justify-self: end; }
.portrait-frame { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--paper-deep); box-shadow: 24px 24px 0 var(--orange); }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center top; filter: saturate(.82); }
.portrait-caption { display: flex; justify-content: space-between; gap: 12px; margin: 14px 0 0; font-size: .76rem; color: var(--muted); }
.portrait-caption strong { color: var(--ink); font-weight: 600; }

.signal-strip { border-bottom: 1px solid var(--line); background: var(--ink); color: white; }
.signal-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.signal-grid > div { display: flex; min-height: 92px; flex-direction: column; justify-content: center; gap: 7px; padding: 0 22px; border-left: 1px solid #41413f; }
.signal-grid > div:first-child { border-left: 0; padding-left: 0; }
.signal-grid span, .now-list > article > span, .approach-grid span { color: var(--orange); font: .72rem var(--display); }
.signal-grid strong { font: 500 1.05rem var(--display); }

.section { padding: 126px 0; border-bottom: 1px solid var(--line); }
.section-heading { max-width: 700px; margin-bottom: 58px; }
.section-heading h2, .about-section h2 { margin-bottom: 0; font-size: clamp(2.4rem, 5vw, 4.7rem); font-weight: 500; line-height: 1.02; }
.section-heading h2::first-line, .about-section h2::first-line { font-family: var(--serif); font-style: italic; font-weight: 400; }
.section-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 28px; max-width: none; }
.now-section { background: #e9e6de; }
.now-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 100px; }
.now-list { border-top: 1px solid var(--line); }
.now-list > article { display: grid; grid-template-columns: 38px 1fr auto; gap: 16px; align-items: start; padding: 25px 0; border-bottom: 1px solid var(--line); }
.now-list h3 { margin-bottom: 7px; font-size: 1.35rem; }
.now-list p { max-width: 48ch; margin: 0; color: var(--muted); font-size: .92rem; }
.now-list b { padding-top: 5px; color: var(--muted); font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.work-card { display: flex; flex-direction: column; min-width: 0; border: 0; background: transparent; }
.work-card-featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr .9fr; }
.work-image { overflow: hidden; min-height: 280px; background: #dfe4eb; }
.work-card-featured .work-image { min-height: 420px; }
.work-image img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .5s ease; }
.work-card:hover .work-image img { transform: scale(1.025); }
.work-image-dark { background: #d9e3ed; }
.work-image-dark img { object-fit: contain; padding: 34px; }
.work-card-book .work-image { background: #202e3c; }
.work-card-book .work-image img { object-fit: contain; padding: 40px; }
.work-content { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 28px 0 0; }
.work-content .card-kicker { margin-bottom: 24px; }
.work-content h3 { margin-bottom: 12px; font-size: clamp(1.8rem, 3vw, 2.7rem); font-weight: 500; }
.work-content p:not(.card-kicker) { max-width: 48ch; margin-bottom: 28px; color: var(--muted); }
.text-link { display: inline-flex; gap: 8px; align-items: center; margin-top: auto; color: var(--blue); font-size: .9rem; font-weight: 700; }
.text-link:hover { color: var(--orange); }

.client-section { background: var(--ink); color: white; }
.client-section .eyebrow { color: #7fa8ff; }
.client-section .section-note { color: #b8b7b1; }
.section-note { max-width: 33ch; margin: 0; color: var(--muted); font-size: .92rem; }
.client-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.client-card { display: flex; flex-direction: column; min-height: 100%; border: 0; background: #242524; }
.client-card:nth-child(-n + 2) { grid-column: span 1; }
.client-placeholder { display: flex; min-height: 190px; flex-direction: column; justify-content: space-between; padding: 22px; background: linear-gradient(160deg, rgba(13,18,24,.2), rgba(13,18,24,.78)), url("../img/mobile-tech-hub-1.jpeg") center / cover; color: white; }
.client-placeholder span { font: 500 3rem/1 var(--display); letter-spacing: -.08em; }
.client-placeholder strong { font: 500 1.25rem var(--display); }
.client-placeholder small { color: rgba(255,255,255,.72); font-size: .78rem; }
.client-placeholder-blue { background-image: linear-gradient(160deg, rgba(13,18,24,.15), rgba(13,18,24,.8)), url("../img/china-study.jpg"); }
.client-placeholder-orange { background-image: linear-gradient(160deg, rgba(13,18,24,.12), rgba(13,18,24,.78)), url("../img/networking-lab.jpg"); }
.client-placeholder-dark { background-image: linear-gradient(160deg, rgba(13,18,24,.2), rgba(13,18,24,.82)), url("../img/security-lab.jpg"); }
.client-placeholder-lime { background-image: linear-gradient(160deg, rgba(13,18,24,.12), rgba(13,18,24,.78)), url("../img/web-dev-class.jpg"); }
.client-card > div:last-child { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 24px; }
.client-card h3 { color: white; }
.client-card .text-link { color: #9dbbff; }
.client-card .card-kicker { margin-bottom: 18px; color: var(--muted); }
.client-card h3 { margin-bottom: 10px; font-size: 1.55rem; }
.client-card p:not(.card-kicker) { margin-bottom: 24px; color: var(--muted); font-size: .9rem; }

.approach-section { background: var(--paper); }
.approach-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.approach-grid article { min-height: 250px; padding: 25px 24px 28px 0; border-right: 1px solid var(--line); }
.approach-grid article:not(:first-child) { padding-left: 24px; }
.approach-grid article:last-child { border-right: 0; }
.approach-grid h3 { margin: 48px 0 13px; max-width: 15ch; font-size: 1.35rem; line-height: 1.08; }
.approach-grid p { max-width: 25ch; margin: 0; color: var(--muted); font-size: .9rem; }

.journey-section { background: var(--paper-deep); }
.journey-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.journey-grid article { background: var(--paper); }
.journey-grid img { width: 100%; height: 230px; object-fit: cover; filter: saturate(.75); }
.journey-grid article > div { padding: 22px 24px 25px; }
.journey-grid span { color: var(--blue); font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.journey-grid h3 { margin: 12px 0 8px; font-size: 1.5rem; }
.journey-grid p { margin: 0; color: var(--muted); font-size: .9rem; }

.book-section { background: #e2e7ec; }
.book-layout { display: grid; grid-template-columns: minmax(260px, .7fr) minmax(0, 1.3fr); gap: 100px; align-items: center; }
.book-cover { max-width: 360px; padding: 30px; background: #273746; box-shadow: 18px 18px 0 var(--orange); transform: rotate(-2deg); }
.book-cover img { width: 100%; }
.book-copy { max-width: 650px; }
.book-copy h2 { margin-bottom: 24px; font-size: clamp(3.3rem, 7vw, 6.5rem); font-weight: 500; line-height: .9; }
.book-copy p { max-width: 56ch; color: var(--muted); }
.book-copy .book-lede { margin-bottom: 24px; color: var(--ink); font: 500 clamp(1.3rem, 2.4vw, 1.8rem)/1.2 var(--display); }
.book-copy .button { margin-top: 12px; }

.about-section { background: var(--ink); color: white; }
.about-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 100px; }
.about-section .eyebrow { color: #7fa8ff; }
.about-section h2 { max-width: 500px; }
.about-copy { max-width: 620px; color: #c2c0bb; font-size: 1.08rem; }
.about-copy p { max-width: 58ch; }
.capability-list { margin-top: 54px; border-top: 1px solid #41413f; }
.capability-list > div { display: grid; grid-template-columns: 42px 1fr; gap: 0 18px; padding: 22px 0; border-bottom: 1px solid #41413f; }
.capability-list span { color: #7fa8ff; font: .75rem var(--display); }
.capability-list strong { color: white; font: 600 1.1rem var(--display); }
.capability-list p { grid-column: 2; margin: 6px 0 0; font-size: .9rem; }

.writing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.writing-card { display: flex; flex-direction: column; min-height: 285px; padding: 28px; border-top: 2px solid var(--ink); background: rgba(255,255,255,.22); }
.writing-card .card-kicker { color: var(--muted); }
.writing-card h3 { margin-bottom: 12px; font-size: 1.45rem; line-height: 1.15; }
.writing-card p:not(.card-kicker) { margin-bottom: 24px; color: var(--muted); font-size: .93rem; }

.contact-section { padding: 128px 0 140px; background: var(--orange); }
.contact-inner { text-align: center; }
.contact-section .eyebrow { color: var(--ink); }
.contact-section h2 { margin-bottom: 32px; font-size: clamp(3.5rem, 8vw, 8rem); font-weight: 500; line-height: .9; }
.contact-email { display: inline-flex; gap: 15px; align-items: center; border-bottom: 1px solid var(--ink); font: 600 clamp(1.1rem, 2vw, 1.5rem) var(--display); }
.contact-email svg, .footer-links svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }

.site-footer { padding: 54px 0 44px; background: var(--paper-deep); }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr auto; gap: 40px; align-items: end; }
.footer-inner p { margin: 12px 0 0; color: var(--muted); font-size: .86rem; }
.footer-label { margin-bottom: 12px; color: var(--muted); }
.footer-links ul { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; list-style: none; }
.footer-links li { font-size: .88rem; font-weight: 600; }
.footer-links a span { color: var(--blue); }
.footer-links li:last-child a { display: inline-flex; align-items: center; color: var(--blue); }
.copyright { align-self: end; white-space: nowrap; }

/* Post pages */
.wrap-reading { max-width: 760px; }
.post-page { padding-top: 100px; }
.back { display: inline-block; margin-bottom: 46px; color: var(--blue); font-weight: 600; }
.post-title { margin-bottom: 18px; font-size: clamp(2.8rem, 6vw, 5rem); line-height: 1; }
.post-standfirst { color: var(--muted); font-size: 1.25rem; }
.post-meta { padding-bottom: 28px; margin-bottom: 42px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.post-page p, .post-page h2 { max-width: 68ch; }
.post-page p { margin-bottom: 24px; font-size: 1.08rem; }
.post-page h2 { margin: 52px 0 18px; font-size: 1.8rem; }
.post-page strong { font-weight: 700; }
.post-page code { padding: 2px 5px; background: var(--paper-deep); }
.post-nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--line); }
.post-nav a { padding: 18px; border: 1px solid var(--line); font-weight: 600; }
.post-nav small { display: block; margin-bottom: 8px; color: var(--muted); font-size: .7rem; text-transform: uppercase; }

@media (max-width: 850px) {
  .hero { padding: 76px 0 90px; }
  .hero-layout, .about-layout { grid-template-columns: 1fr; gap: 56px; }
  .hero-portrait { justify-self: start; max-width: 360px; }
  .now-layout { grid-template-columns: 1fr; gap: 48px; }
  .work-card-featured { grid-template-columns: 1fr; }
  .work-card-featured .work-image { min-height: 300px; }
  .client-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .approach-grid { grid-template-columns: repeat(2, 1fr); }
  .approach-grid article:nth-child(2) { border-right: 0; }
  .approach-grid article:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .journey-grid { grid-template-columns: repeat(2, 1fr); }
  .book-layout { gap: 56px; }
  .writing-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .copyright { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .wrap { width: min(100% - 36px, var(--max)); }
  .site-header .header-inner { min-height: 68px; }
  .nav-toggle-label { display: flex; flex-direction: column; gap: 5px; padding: 10px 0 10px 10px; cursor: pointer; }
  .nav-toggle-label span { width: 22px; height: 1px; background: var(--ink); }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 0; padding: 12px 18px 22px; background: var(--paper); border-bottom: 1px solid var(--line); }
  .nav a { width: 100%; padding: 12px 0; }
  .nav .nav-cta { padding: 12px; margin-top: 6px; }
  .nav-toggle:checked ~ .nav { display: flex; }
  .hero { padding: 64px 0 76px; }
  h1 { font-size: clamp(3rem, 15vw, 5rem); }
  .signal-grid { grid-template-columns: repeat(2, 1fr); }
  .signal-grid > div, .signal-grid > div:first-child { min-height: 76px; padding: 0 14px; border-left: 1px solid #41413f; }
  .signal-grid > div:nth-child(-n + 2) { border-bottom: 1px solid #41413f; }
  .signal-grid > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .section { padding: 82px 0; }
  .section-heading { margin-bottom: 38px; }
  .section-heading-row { display: block; }
  .section-heading-row .text-link { margin-top: 24px; }
  .work-grid, .writing-grid { grid-template-columns: 1fr; }
  .client-grid { grid-template-columns: 1fr; }
  .now-list > article { grid-template-columns: 30px 1fr; }
  .now-list b { grid-column: 2; padding-top: 0; }
  .approach-grid, .journey-grid { grid-template-columns: 1fr; }
  .approach-grid article, .approach-grid article:nth-child(2), .approach-grid article:nth-child(-n + 2) { min-height: auto; padding: 22px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .approach-grid article:last-child { border-bottom: 0; }
  .approach-grid h3 { margin-top: 26px; }
  .work-content { padding: 24px; }
  .work-image, .work-card-featured .work-image { min-height: 260px; }
  .about-layout { gap: 36px; }
  .book-layout { grid-template-columns: 1fr; gap: 38px; }
  .book-cover { max-width: 260px; }
  .capability-list { margin-top: 38px; }
  .contact-section { padding: 90px 0 100px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .copyright { grid-column: auto; }
  .post-nav { grid-template-columns: 1fr; }
}

a:focus-visible, input:focus-visible + .nav-toggle-label { outline: 2px solid var(--blue); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
