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

:root {
  --paper: #fbfaf7;
  --ink: #282729;
  --muted: #716f71;
  --line: #d8d5cf;
  --accent: #e74771;
  --soft-accent: #fff0f3;
  --display: 'DM Serif Display', Georgia, serif;
  --sans: 'DM Sans', Arial, sans-serif;
  --mono: 'DM Mono', monospace;
  --content: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--content); margin: auto; padding: 0 32px; }

.site-header { padding: 32px 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.logo { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: -.035em; }
.logo img { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; object-fit: cover; object-position: center 30%; }
.main-nav { display: flex; gap: 30px; counter-reset: nav; }
.main-nav a { position: relative; padding: 8px 0; color: var(--muted); font-size: 15px; counter-increment: nav; transition: color .2s ease; }
.main-nav a::before { content: '0' counter(nav); margin-right: 6px; color: var(--ink); font: 500 11px var(--mono); }
.main-nav a::after { content: ''; position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.main-nav a:hover, .main-nav a.active { color: var(--ink); }
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }

.hero { max-width: 1040px; padding: 130px 0 132px; }
.eyebrow { margin: 0 0 18px; color: var(--accent); font-size: 14px; font-weight: 700; letter-spacing: .065em; text-transform: uppercase; }
.hero h1 { margin: 0; max-width: 960px; font: 400 clamp(54px, 7.5vw, 104px)/.93 var(--display); letter-spacing: -.055em; }
.page-intro h1, .about-intro h1 { margin: 0; max-width: 960px; font: 400 clamp(58px, 8vw, 112px)/.93 var(--display); letter-spacing: -.055em; }
.hero-text, .lede, .about-lede { max-width: 780px; margin: 34px 0 0; color: var(--ink); font-size: clamp(20px, 2.35vw, 30px); line-height: 1.4; letter-spacing: -.025em; }

.section { padding: 72px 0; border-top: 1px solid var(--line); }
.section-header { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.section-header h2, .about-links h2 { margin: 0; font: 400 36px/1 var(--display); letter-spacing: -.035em; }
.section-header a, .see-all { color: var(--accent); font-weight: 700; font-size: 14px; }
.project-list, .post-list, .article-list { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.project, .post, .article-preview { min-height: 178px; padding: 27px 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background .2s ease, color .2s ease; }
.project:hover, .post:hover, .article-preview:hover { background: var(--ink); color: var(--paper); }
.project h3, .post h3, .article-preview h2 { margin: 0 0 8px; font: 400 29px/1.05 var(--display); letter-spacing: -.035em; }
.project p, .post span, .article-preview p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
.project:hover p, .post:hover span, .article-preview:hover p, .article-preview:hover .article-category { color: #d2ced0; }
.project, .post { display: flex; flex-direction: column; justify-content: space-between; gap: 22px; }
.project-meta, .post time, .article-category { color: var(--muted); font: 12px var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.post { min-height: 160px; }

.list-page, .about-page { padding-top: 88px; }
.page-intro, .about-intro { max-width: 1000px; padding-bottom: 100px; }
.page-intro h1, .about-intro h1 { font-size: clamp(55px, 7vw, 92px); }
.page-intro .lede { max-width: 690px; }
.about-intro-main { display: grid; grid-template-columns: minmax(0, 1fr) 220px; align-items: end; gap: 48px; }
.about-portrait { width: 220px; height: 280px; margin: 0; overflow: hidden; border-radius: 110px 110px 16px 16px; background: var(--soft-accent); }
.about-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 26%; }
.article-preview { display: flex; justify-content: space-between; gap: 22px; min-height: 260px; }
.article-preview h2 { font-size: 35px; }
.article-main { display: flex; flex-direction: column; align-items: flex-start; gap: 13px; }
.article-category { margin-top: auto; }
.article-arrow { color: var(--accent); font: 400 44px/1 var(--display); }

.article-page { padding-top: 88px; }
.article-header { padding-bottom: 60px; border-bottom: 1px solid var(--line); }
.article-header h1 { max-width: 800px; margin: 0; font: 400 clamp(52px, 7vw, 86px)/.95 var(--display); letter-spacing: -.05em; }
.article-dek { max-width: 680px; margin: 30px 0 0; font-size: 21px; line-height: 1.5; letter-spacing: -.015em; }
.article-meta { display: flex; gap: 12px; margin-top: 30px; color: var(--muted); font: 12px var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.article-meta span + span::before { content: '·'; margin-right: 12px; }
.article-content { padding: 56px 0 88px; }
.article-content > * { max-width: none; }
.article-content p, .article-content li { font-size: 18px; line-height: 1.7; }
.article-content p { margin: 0 0 24px; }
.article-content h2 { margin: 64px 0 20px; font: 400 40px/1.05 var(--display); letter-spacing: -.035em; }
.article-content h3 { margin: 42px 0 16px; font: 400 29px/1.1 var(--display); letter-spacing: -.025em; }
.article-content ul, .article-content ol { margin: 0 0 28px; padding-left: 24px; }
.article-content li { margin: 8px 0; padding-left: 5px; }
.article-content a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article-content code { padding: .12em .3em; background: #efece5; font: .86em var(--mono); }
.article-content p code, .article-content li code { overflow-wrap: anywhere; word-break: break-word; }
.article-content pre { max-width: 100%; margin: 28px 0 34px; padding: 22px; overflow-x: auto; background: #efece5; color: var(--ink); border: 1px solid var(--line); font: 13px/1.6 var(--mono); }
.article-content pre code { padding: 0; background: transparent; font: inherit; }
.hljs-comment, .hljs-quote { color: var(--muted); font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-type, .hljs-built_in, .hljs-literal, .hljs-tag, .hljs-name { color: var(--accent); font-weight: 500; }
.hljs-string, .hljs-attr, .hljs-number, .hljs-meta, .hljs-doctag, .hljs-symbol { color: #9c6b35; }
.hljs-title, .hljs-title.class_, .hljs-title.function_, .hljs-section { color: var(--ink); font-weight: 700; }
.hljs-variable, .hljs-attribute, .hljs-params { color: var(--ink); }
.article-content table { width: 100%; margin: 30px 0 34px; border-collapse: collapse; font-size: 15px; }
.article-content th, .article-content td { padding: 12px 14px; border: 1px solid var(--line); text-align: left; }
.article-content th { background: var(--soft-accent); font-weight: 700; }
.article-note { max-width: 720px; margin: 34px 0; padding: 20px 22px; border-left: 4px solid var(--accent); background: var(--soft-accent); }
.article-note p:last-child { margin-bottom: 0; }
.article-outro { margin-top: 56px !important; padding-top: 32px; border-top: 1px solid var(--line); }

.projects { border-top: 1px solid var(--line); }
.project-detail { display: grid; grid-template-columns: 100px 1fr; gap: 28px; padding: 52px 0; border-bottom: 1px solid var(--line); }
.project-number { color: var(--accent); font: 14px var(--mono); }
.project-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.project-heading h2 { margin: 0; font: 400 52px/1 var(--display); letter-spacing: -.045em; }
.project-type { margin: 8px 0 0; color: var(--muted); }
.project-link { color: var(--accent); font-weight: 700; white-space: nowrap; }
.project-description { max-width: 680px; margin: 32px 0 25px; font-size: 19px; line-height: 1.55; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.project-tags span { border: 1px solid var(--line); padding: 5px 8px; font: 11px var(--mono); text-transform: uppercase; }
.project-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.project-gallery .project-image { height: 520px; margin: 0; }
.project-image { display: grid; place-items: center; height: 350px; margin: 32px 0 0; overflow: hidden; background: var(--soft-accent); }
.project-image img { display: block; width: 100%; height: 100%; object-fit: contain; }

.about-content { max-width: 740px; padding: 54px 0 72px; border-top: 1px solid var(--line); }
.about-content p { margin: 0 0 24px; font-size: 20px; line-height: 1.6; }
.about-content strong { font-weight: 700; }
.about-links { padding: 48px 0 88px; border-top: 1px solid var(--line); }
.links-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; padding: 0; list-style: none; }
.links-row a { display: block; padding: 10px 14px; border: 1px solid var(--line); transition: background .2s ease; }
.links-row a:hover { background: var(--ink); color: var(--paper); }

.site-footer { padding: 36px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; }
.footer-inner div { display: flex; gap: 18px; }
.footer-inner a:hover { color: var(--accent); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

@media (max-width: 700px) {
  .wrap { padding: 0 20px; }
  .site-header { padding: 22px 0; }
  .header-inner { align-items: flex-start; flex-direction: column; }
  .main-nav { gap: 16px; flex-wrap: wrap; }
  .main-nav a { font-size: 14px; }
  .hero { padding: 75px 0 85px; }
  .hero-text, .lede, .about-lede { margin-top: 25px; }
  .section { padding: 52px 0; }
  .project-list, .post-list, .article-list { grid-template-columns: 1fr; }
  .list-page, .about-page { padding-top: 55px; }
  .page-intro, .about-intro { padding-bottom: 65px; }
  .about-intro-main { grid-template-columns: 1fr; gap: 32px; }
  .about-portrait { width: min(100%, 320px); height: 370px; }
  .project-detail { grid-template-columns: 1fr; gap: 16px; padding: 40px 0; }
  .project-heading { flex-direction: column; }
  .project-description, .about-content p { font-size: 18px; }
  .project-gallery { display: flex; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
  .project-gallery .project-image { flex: 0 0 min(78vw, 320px); height: 480px; scroll-snap-align: start; }
  .project-image { height: 185px; }
  .article-page { padding-top: 55px; }
  .article-header { padding-bottom: 44px; }
  .article-content { padding-top: 42px; }
  .article-content p, .article-content li { font-size: 17px; }
  .article-content h2 { margin-top: 50px; font-size: 35px; }
  .article-content pre { padding: 18px; }
  .article-content table { table-layout: fixed; font-size: 13px; }
  .article-content th, .article-content td { padding: 10px 8px; overflow-wrap: anywhere; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
