:root {
  --sun: #f2c646;
  --ink: #1e3443;
  --paper: #f3efe2;
  --paper-dark: #e8e2d2;
  --muted: #53636a;
  --rule: #1e3443;
  --brand-fold: #f3efe2;
  --display: 'Archivo Black', 'IBM Plex Sans', sans-serif;
  --body: 'IBM Plex Sans', sans-serif;
  --utility: 'DM Mono', monospace;
  --gutter: clamp(1.25rem, 3.8vw, 4.5rem);
  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 5rem;
}

:root[data-theme='dark'] {
  --sun: #d8ad32;
  --ink: #172c38;
  --paper: #263d47;
  --paper-dark: #1e333d;
  --muted: #c2cfd0;
  --rule: #d7d8c8;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--sun); color: var(--ink); font-family: var(--body); -webkit-font-smoothing: antialiased; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { font: inherit; }
::selection { background: var(--ink); color: var(--sun); }
:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
.skip-link { position: fixed; z-index: 100; top: -6rem; left: var(--gutter); background: var(--ink); color: var(--sun); padding: .8rem 1rem; font-family: var(--utility); }
.skip-link:focus { top: 1rem; }
.site-shell { width: min(100%, 1800px); margin: 0 auto; overflow: clip; }
.eyebrow { margin: 0; font-family: var(--utility); font-size: .69rem; font-weight: 500; line-height: 1.5; letter-spacing: .09em; text-transform: uppercase; }

.site-header { min-height: 85px; padding: 0 var(--gutter); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2rem; border-bottom: 3px solid var(--ink); }
.site-brand { display: inline-flex; align-items: center; width: max-content; text-decoration: none; }
.brand-symbol { display: block; flex: none; width: 3.4rem; height: 3.4rem; overflow: visible; }
.brand-symbol-path, .brand-symbol-fold { fill: none; stroke-width: 10; stroke-linecap: square; stroke-linejoin: round; }
.brand-symbol-path { stroke: var(--ink); }
.brand-symbol-fold { stroke: var(--brand-fold); }
.site-brand:hover .brand-symbol { transform: translateX(3px); }
.brand-symbol { transition: transform .2s ease; }
.site-nav, .nav-controls, .lang-switch { display: flex; align-items: center; }
.site-nav { gap: clamp(1.25rem, 2.4vw, 2.5rem); }
.site-nav a, .lang-switch a, .theme-toggle { font-family: var(--utility); font-size: .72rem; font-weight: 500; letter-spacing: .04em; text-decoration: none; text-transform: uppercase; }
.site-nav a { border-bottom: 2px solid transparent; padding: .3rem 0; transition: border-color .2s ease; }
.site-nav a:hover, .site-nav a[aria-current='page'] { border-color: currentColor; }
.nav-controls { justify-self: end; gap: 1.5rem; }
.lang-switch { gap: .55rem; }
.lang-switch a { opacity: .55; transition: opacity .2s ease; }
.lang-switch a:hover, .lang-switch a[aria-current='true'] { opacity: 1; }
.lang-switch a + a::before { content: '/'; margin-right: .55rem; opacity: .55; }
.theme-toggle { display: grid; place-items: center; min-width: 2.25rem; min-height: 2.25rem; border: 2px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; transition: background .2s ease, color .2s ease; }
.theme-toggle:hover { background: var(--ink); color: var(--sun); }
.theme-toggle .theme-moon { display: none; }
:root[data-theme='dark'] .theme-toggle .theme-sun { display: none; }
:root[data-theme='dark'] .theme-toggle .theme-moon { display: inline; }
.page-home .site-nav { visibility: hidden; }

.studio-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(245px, 28%); min-height: min(735px, calc(100svh - 85px)); border-bottom: 3px solid var(--ink); }
.studio-hero-main { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; padding: clamp(2.5rem, 5vw, 5rem) var(--gutter) clamp(2.5rem, 4vw, 4rem); }
.studio-hero-main > .eyebrow { padding-left: .15rem; }
.studio-hero h1 { margin: auto 0; padding: 1rem 0 2rem; font-family: var(--display); font-size: clamp(5.7rem, 10.3vw, 12.5rem); line-height: .82; letter-spacing: -.105em; font-weight: 400; }
.studio-hero h1 span { color: var(--paper); }
.studio-hero-bottom { display: grid; grid-template-columns: minmax(130px, 27%) minmax(0, 1fr); gap: 2rem; align-items: start; border-top: 2px solid var(--ink); padding-top: 1.2rem; }
.studio-hero-bottom .eyebrow { padding-top: .25rem; }
.studio-hero-bottom strong { display: block; max-width: 540px; font-size: clamp(1.35rem, 2.1vw, 2.2rem); line-height: 1.13; letter-spacing: -.045em; }
.studio-hero-bottom p:not(.eyebrow) { max-width: 560px; margin: .95rem 0 0; font-size: .92rem; line-height: 1.55; }
.studio-rail { display: grid; grid-template-rows: repeat(3, 1fr); border-left: 3px solid var(--ink); }
.studio-rail a { display: flex; flex-direction: column; justify-content: space-between; padding: clamp(1.5rem, 2.7vw, 3rem); border-bottom: 3px solid var(--ink); font-family: var(--display); font-size: clamp(2rem, 3.5vw, 4.25rem); letter-spacing: -.075em; line-height: 1; text-decoration: none; transition: background .24s ease, color .24s ease; }
.studio-rail a:last-child { border-bottom: 0; }
.studio-rail a span:last-child { align-self: end; font-family: var(--body); font-size: clamp(1.6rem, 2.4vw, 2.4rem); font-weight: 400; }
.studio-rail a:hover, .studio-rail a:focus-visible { background: var(--ink); color: var(--sun); }

.writing-section, .archive-section { background: var(--paper); color: var(--rule); }
.writing-section { padding: clamp(4rem, 7vw, 7.5rem) var(--gutter) clamp(4rem, 6vw, 6rem); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 3.25rem; }
.section-heading h2, .page-intro h1 { margin: .7rem 0 0; font-family: var(--display); font-size: clamp(3.2rem, 6vw, 7rem); font-weight: 400; line-height: .95; letter-spacing: -.085em; }
.section-heading h2 span, .page-intro h1 span { color: var(--sun); }
.section-heading > p { max-width: 330px; margin: 0 0 .35rem; font-size: 1rem; line-height: 1.5; }
.writing-list { border-top: 2px solid var(--rule); }
.writing-row { display: grid; grid-template-columns: minmax(105px, 12%) minmax(0, 1fr) auto 1.6rem; gap: 1.5rem; align-items: baseline; padding: 1.75rem .3rem; border-bottom: 2px solid var(--rule); text-decoration: none; transition: padding .2s ease, background .2s ease; }
.writing-row:hover { padding-left: 1.2rem; padding-right: 1.2rem; background: var(--paper-dark); }
.writing-kind, .writing-row time { font-family: var(--utility); font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.writing-main { display: flex; flex-direction: column; gap: .38rem; }
.writing-main strong { font-size: clamp(1.3rem, 2.1vw, 2.15rem); line-height: 1.18; letter-spacing: -.04em; }
.writing-main > span { max-width: 660px; font-size: .91rem; line-height: 1.5; color: var(--muted); }
.writing-arrow { font-size: 1.4rem; line-height: 1; transition: transform .2s ease; }
.writing-row:hover .writing-arrow { transform: translate(3px, -3px); }
.section-actions { display: flex; gap: 2rem; flex-wrap: wrap; padding-top: 2rem; }
.inline-link, .back-link, .page-translation { display: inline-block; border-bottom: 2px solid currentColor; padding-bottom: .2rem; font-family: var(--utility); font-size: .76rem; font-weight: 500; letter-spacing: .02em; text-decoration: none; transition: opacity .2s ease; }
.inline-link:hover, .back-link:hover, .page-translation:hover { opacity: .6; }

.page-intro { min-height: 330px; display: flex; align-items: end; justify-content: space-between; gap: 3rem; padding: clamp(4rem, 7vw, 7.5rem) var(--gutter) clamp(3rem, 5vw, 5rem); border-bottom: 3px solid var(--ink); }
.page-intro > p, .page-intro-actions { width: min(100%, 360px); margin: 0 0 .5rem; font-size: 1rem; line-height: 1.55; }
.page-intro h1 span { color: var(--paper); }
.page-intro-actions p { margin: 0 0 1.5rem; }
.page-intro-actions .page-translation { margin: 1rem 0 0 1.1rem; }
.button { display: inline-block; padding: .92rem 1.2rem; border: 2px solid var(--ink); background: var(--ink); color: var(--sun); font-family: var(--utility); font-size: .76rem; font-weight: 500; text-decoration: none; transition: background .2s ease, color .2s ease; }
.button:hover { background: transparent; color: var(--ink); }
.archive-section { min-height: 440px; padding: clamp(3rem, 5vw, 5rem) var(--gutter) clamp(5rem, 8vw, 8rem); }
.notes-feed { width: min(100%, 780px); margin: 0 auto; border-top: 2px solid var(--rule); }
.note-post { padding: 1.7rem .25rem 2.1rem; border-bottom: 2px solid var(--rule); }
.note-post-header { display: flex; align-items: center; gap: .85rem; min-height: 2.8rem; }
.note-avatar { display: grid; flex: 0 0 2.8rem; width: 2.8rem; height: 2.8rem; place-items: center; border-radius: 50%; background: var(--ink); color: var(--sun); font-family: var(--display); font-size: .82rem; letter-spacing: -.08em; }
.note-author { display: flex; align-items: baseline; gap: .65rem; min-width: 0; flex-wrap: wrap; }
.note-author strong { font-size: .94rem; letter-spacing: -.02em; }
.note-author time { color: var(--muted); font-family: var(--utility); font-size: .68rem; white-space: nowrap; }
.note-share { position: relative; margin-left: auto; font-family: var(--utility); font-size: .69rem; }
.note-share summary { display: flex; align-items: center; gap: .35rem; padding: .45rem .15rem; cursor: pointer; list-style: none; }
.note-share summary::-webkit-details-marker { display: none; }
.note-share summary:hover { opacity: .65; }
.note-share-menu { position: absolute; z-index: 2; top: calc(100% + .35rem); right: 0; display: grid; min-width: 9.5rem; padding: .35rem 0; border: 2px solid var(--rule); background: var(--paper); box-shadow: 4px 4px 0 var(--rule); }
.note-share:not([open]) .note-share-menu { display: none; }
.note-share-menu a, .note-share-menu button { display: block; padding: .58rem .75rem; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.note-share-menu a:hover, .note-share-menu button:hover { background: var(--paper-dark); }
.note-share-status { padding: 0 .75rem; color: var(--muted); font-size: .62rem; }
.note-body { margin: .65rem 0 0 3.65rem; font-size: clamp(1rem, 1.2vw, 1.12rem); line-height: 1.72; overflow-wrap: anywhere; }
.note-body > :first-child { margin-top: 0; }
.note-body > :last-child { margin-bottom: 0; }
.note-body p { margin: 0 0 1.2em; }
.note-body h2, .note-body h3, .note-body h4 { color: var(--rule); line-height: 1.2; letter-spacing: -.04em; scroll-margin-top: 2rem; }
.note-body h2 { margin: 2em 0 .7em; padding-top: .45em; border-top: 2px solid var(--rule); font-family: var(--display); font-size: clamp(1.35rem, 2vw, 1.8rem); font-weight: 400; }
.note-body h3 { margin: 1.6em 0 .55em; font-size: 1.2rem; }
.note-body h4 { margin: 1.4em 0 .5em; font-size: 1.05rem; }
.note-body a { text-decoration-thickness: 1px; text-underline-offset: .2em; }
.note-body ul, .note-body ol { margin: 0 0 1.4em; padding-left: 1.3em; }
.note-body li { margin-bottom: .45em; padding-left: .15em; }
.note-body blockquote { margin: 1.8em 0; padding: .35em 0 .35em 1em; border-left: 4px solid var(--sun); }
.note-body :not(pre) > code { padding: .12em .28em; background: var(--paper-dark); font-family: var(--utility); font-size: .82em; }
.note-body pre { max-width: 100%; overflow-x: auto; margin: 1.7em 0; padding: 1.15rem; border-left: 4px solid var(--sun); background: var(--ink); color: #f5f1e5; font-family: var(--utility); font-size: .78rem; line-height: 1.6; }
.note-body pre code { font-family: inherit; }
.note-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .9em; }
.note-body th, .note-body td { padding: .5rem .75rem; border: 1px solid var(--rule); text-align: left; }
.empty-state { max-width: 520px; padding: 2.5rem 0; }
.empty-state > span { font-size: 2.5rem; }
.empty-state h2 { font-family: var(--display); font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -.07em; margin: 1rem 0; }
.empty-state p { line-height: 1.6; }
.empty-state .inline-link { margin-top: 1rem; }

.article-header { padding: clamp(2rem, 5vw, 4rem) var(--gutter) clamp(3.5rem, 7vw, 6.5rem); }
.article-header .eyebrow { margin: clamp(3rem, 6vw, 6rem) 0 1rem; }
.article-header .eyebrow span { margin: 0 .5rem; }
.article-header h1 { max-width: 1200px; margin: 0; font-family: var(--display); font-size: clamp(3.4rem, 7vw, 8.5rem); line-height: .98; letter-spacing: -.08em; font-weight: 400; overflow-wrap: anywhere; }
.article-description { max-width: 660px; margin: 2rem 0 0; font-size: clamp(1.15rem, 1.5vw, 1.45rem); line-height: 1.45; }
.reading-layout, .content-layout { display: grid; grid-template-columns: minmax(160px, 25%) minmax(0, 1fr); background: var(--paper); color: var(--rule); }
.reading-rail, .content-rail { padding: clamp(2.5rem, 5vw, 5rem) var(--gutter); border-right: 2px solid var(--rule); }
.reading-rail { display: flex; flex-direction: column; align-items: start; gap: 1rem; font-family: var(--utility); font-size: .72rem; }
.reading-rail a { margin-top: 1rem; text-decoration-thickness: 1px; text-underline-offset: .3em; }
.content-rail .eyebrow { position: sticky; top: 2rem; }
.article-content { min-width: 0; width: 100%; max-width: 850px; padding: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 6vw, 7rem) clamp(5rem, 9vw, 9rem); font-size: clamp(1.04rem, 1.2vw, 1.19rem); line-height: 1.75; overflow-wrap: anywhere; }
.article-content > :first-child { margin-top: 0; }
.article-content p { margin: 0 0 1.45em; }
.article-content h2, .article-content h3, .article-content h4 { color: var(--rule); line-height: 1.18; letter-spacing: -.04em; scroll-margin-top: 2rem; }
.article-content h2 { margin: 2.7em 0 .8em; padding-top: .5em; border-top: 2px solid var(--rule); font-family: var(--display); font-size: clamp(1.6rem, 2.5vw, 2.4rem); font-weight: 400; }
.article-content h3 { margin: 1.8em 0 .7em; font-size: clamp(1.3rem, 1.7vw, 1.6rem); }
.article-content h4 { margin: 1.6em 0 .6em; font-size: 1.1rem; }
.article-content a { text-decoration-thickness: 2px; text-underline-offset: .2em; }
.article-content a:hover { opacity: .7; }
.article-content ul, .article-content ol { padding-left: 1.4em; margin: 0 0 1.6em; }
.article-content li { padding-left: .2em; margin-bottom: .5em; }
.article-content blockquote { margin: 2.3em 0; padding: .5em 0 .5em 1.4em; border-left: 5px solid var(--sun); font-size: 1.25em; line-height: 1.5; }
.article-content blockquote p:last-child { margin-bottom: 0; }
.article-content :not(pre) > code { padding: .15em .32em; background: var(--paper-dark); font-family: var(--utility); font-size: .82em; }
.article-content pre { max-width: 100%; overflow-x: auto; margin: 2em 0; padding: 1.5rem; border-left: 5px solid var(--sun); background: var(--ink); color: #f5f1e5; font-family: var(--utility); font-size: .82rem; line-height: 1.65; }
.article-content pre code { font-family: inherit; }
.article-content img { max-width: 100%; height: auto; }
.article-content hr { border: 0; border-top: 2px solid var(--rule); margin: 3rem 0; }
.article-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .91em; }
.article-content th, .article-content td { padding: .6rem .9rem; border: 1px solid var(--rule); text-align: left; }
.article-end { display: flex; justify-content: space-between; align-items: center; padding: 2.5rem var(--gutter); border-top: 3px solid var(--ink); }
.article-end > span { font-size: 2.5rem; }
.content-page .page-intro { min-height: 360px; }
.page-content { max-width: 1000px; }
.cv-page .page-content h2 { margin-top: 2.3em; }
.cv-page .page-content h3 { margin-top: 1.5em; }
.profile-links { display: flex; flex-wrap: wrap; gap: 0; border-top: 3px solid var(--ink); }
.profile-links a { flex: 1 1 180px; padding: 1.6rem var(--gutter); border-right: 2px solid var(--ink); font-family: var(--display); font-size: 1.3rem; letter-spacing: -.05em; text-decoration: none; transition: background .2s ease, color .2s ease; }
.profile-links a:last-child { border-right: 0; }
.profile-links a:hover { background: var(--ink); color: var(--sun); }

.site-footer { background: var(--ink); color: var(--sun); padding: clamp(3rem, 5vw, 5rem) var(--gutter) 1.6rem; }
.footer-top { display: grid; grid-template-columns: minmax(145px, 25%) minmax(0, 1fr); column-gap: 2rem; padding-bottom: clamp(4rem, 8vw, 8rem); }
.footer-top .eyebrow { grid-row: span 2; }
.footer-top p { margin: 0 0 1.6rem; max-width: 760px; font-family: var(--display); font-size: clamp(2rem, 4.6vw, 5.5rem); line-height: 1.05; letter-spacing: -.065em; }
.footer-email { justify-self: start; font-family: var(--utility); font-size: clamp(.9rem, 1.35vw, 1.4rem); text-underline-offset: .3em; overflow-wrap: anywhere; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 2rem; padding-top: 1.3rem; border-top: 2px solid var(--sun); font-family: var(--utility); font-size: .69rem; text-transform: uppercase; letter-spacing: .05em; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { text-decoration: none; border-bottom: 1px solid transparent; }
.footer-links a:hover { border-color: currentColor; }

@media (max-width: 1050px) {
  .site-header { grid-template-columns: auto 1fr auto; gap: 1.5rem; }
  .studio-hero { grid-template-columns: minmax(0, 1fr) minmax(230px, 30%); }
  .studio-hero h1 { font-size: clamp(5rem, 10.7vw, 9rem); }
  .studio-hero-bottom { grid-template-columns: 1fr; gap: .7rem; }
  .writing-row { grid-template-columns: 90px minmax(0, 1fr) auto 1.4rem; }
}
@media (max-width: 760px) {
  .site-header { min-height: 74px; grid-template-columns: 1fr auto; gap: .6rem; padding-block: 1rem; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; gap: 1.2rem; flex-wrap: wrap; padding-top: .75rem; border-top: 1px solid var(--ink); }
  .page-home .site-nav { display: none; }
  .nav-controls { gap: .8rem; }
  .studio-hero { display: block; min-height: 0; }
  .studio-hero-main { min-height: 620px; padding-block: 2.3rem 2.7rem; }
  .studio-hero h1 { font-size: clamp(5rem, 15vw, 8rem); padding: 4rem 0; }
  .studio-rail { grid-template-columns: repeat(3, 1fr); grid-template-rows: auto; border-left: 0; border-top: 3px solid var(--ink); }
  .studio-rail a { min-height: 150px; padding: 1.3rem; border-bottom: 0; border-right: 3px solid var(--ink); font-size: clamp(1.3rem, 4.3vw, 2.2rem); }
  .studio-rail a:last-child { border-right: 0; }
  .section-heading, .page-intro { align-items: start; flex-direction: column; }
  .page-intro { min-height: 0; }
  .page-intro > p, .page-intro-actions { width: min(100%, 560px); }
  .reading-layout, .content-layout { grid-template-columns: minmax(0, 1fr); }
  .reading-rail, .content-rail { padding: 1.4rem var(--gutter); border-right: 0; border-bottom: 2px solid var(--rule); }
  .reading-rail { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 1.4rem; }
  .reading-rail a { margin-top: 0; }
  .article-content { max-width: 760px; }
  .footer-top { grid-template-columns: 1fr; gap: 1.2rem; }
  .footer-top .eyebrow { grid-row: auto; }
}
@media (max-width: 520px) {
  .brand-symbol { width: 3rem; height: 3rem; }
  .studio-hero-main { min-height: 570px; }
  .studio-hero h1 { font-size: clamp(4.5rem, 16vw, 6.1rem); }
  .studio-hero-bottom strong { font-size: 1.4rem; }
  .studio-rail a { min-height: 120px; padding: 1rem .7rem; font-size: clamp(1.15rem, 4.2vw, 1.7rem); }
  .studio-rail a span:last-child { font-size: 1.5rem; }
  .section-heading { margin-bottom: 2.2rem; }
  .writing-row { grid-template-columns: minmax(0, 1fr) auto; gap: .35rem 1rem; padding: 1.5rem 0; }
  .writing-kind { grid-column: 1 / -1; }
  .writing-main { grid-column: 1; }
  .writing-row time { grid-column: 1; grid-row: 3; margin-top: .4rem; }
  .writing-arrow { grid-column: 2; grid-row: 2; }
  .article-header h1 { font-size: clamp(2.7rem, 11vw, 4.5rem); }
  .article-content { padding-inline: var(--gutter); }
  .note-post { padding-block: 1.35rem 1.7rem; }
  .note-post-header { gap: .65rem; }
  .note-avatar { flex-basis: 2.35rem; width: 2.35rem; height: 2.35rem; font-size: .72rem; }
  .note-author { gap: .3rem .5rem; }
  .note-author strong { font-size: .86rem; }
  .note-author time { font-size: .62rem; }
  .note-share { font-size: .65rem; }
  .note-body { margin-left: 3rem; font-size: 1rem; }
  .footer-bottom { align-items: start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
