/*
Theme Name: Portfolio Layouts
Version: 1.0.0
Requires at least: 6.4
*/
:root {
    --bg: #f5f3ec;
    --panel: #e9e2ce;
    --ink: #212921;
    --accent: #3d6350;
    --line: #9caa92;
    --accent-ink: #fff;
    --font-heading: Georgia, "Noto Serif Myanmar", "Noto Serif Khmer", "Noto Serif Thai", serif;
    --font-copy: system-ui, "Noto Sans Myanmar", "Noto Sans Khmer", "Noto Sans Thai", sans-serif;
    --width: 1200px;
    --pad: clamp(24px, 5vw, 74px);
    --radius: 0;
}
*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.6 var(--font-copy); }
body:has(.site-header) { display: flex; min-height: 100vh; flex-direction: column; }
main { flex: 1; }
a { color: inherit; text-underline-offset: .2em; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.page-width { max-width: var(--width); width: calc(100% - 2 * clamp(16px, 4vw, 56px)); margin-inline: auto; }
.skip-link { position: absolute; left: 1rem; top: .5rem; z-index: 20; padding: .45em .75em; background: var(--bg); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.site-header, .site-footer { border-block-end: 1px solid var(--line); }
.header-inner, .footer-inner { min-height: 86px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 26px; row-gap: 10px; padding-block: 11px; }
.site-name { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; font: 700 clamp(1.1rem, 2.8vw, 1.7rem)/1.25 var(--font-heading); text-decoration: none; }
.site-mark { display: inline-grid; place-items: center; min-width: 46px; min-height: 42px; padding: 4px 8px; background: var(--accent); color: var(--accent-ink); font: 800 .72rem/1 var(--font-copy); letter-spacing: .03em; }
.languages { display: flex; gap: 6px; flex-wrap: wrap; }
.languages a { display: inline-block; min-height: 38px; padding: 7px 11px; font-size: .83rem; text-decoration: none; }
.languages a[aria-current] { background: var(--panel); text-decoration: underline; text-decoration-thickness: 1.5px; }
.front-lead { display: grid; grid-template: "copy photo" auto / 1fr 1fr; align-items: stretch; margin-block: clamp(22px, 5vw, 66px); background: var(--panel); border-radius: var(--radius); overflow: hidden; }
.lead-copy { grid-area: copy; align-self: center; padding: var(--pad); }
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.17; overflow-wrap: anywhere; margin: 0; }
.lead-copy h1 { font-size: clamp(2.3rem, 5.7vw, 5rem); letter-spacing: -.037em; }
:lang(th) .lead-copy h1, :lang(my) .lead-copy h1, :lang(km) .lead-copy h1 { letter-spacing: normal; line-height: 1.38; }
.lead-copy p { max-width: 48ch; margin: 1rem 0 1.4rem; font-size: clamp(1rem, 1.5vw, 1.18rem); }
.lead-link { display: inline-block; background: var(--accent); color: var(--accent-ink); padding: 11px 17px; border: 1px solid var(--accent); text-decoration: none; font-weight: 710; }
.lead-link:hover { text-decoration: underline; }
.lead-photo { grid-area: photo; position: relative; margin: 0; min-height: 320px; background: var(--panel); }
.lead-photo img { width: 100%; height: 100%; display: block; position: absolute; inset: 0; object-fit: cover; object-position: center; }
.reference { margin-block: -15px 68px; }
.reference > h2 { padding-block: 10px 18px; font-size: clamp(1.4rem, 2.5vw, 2.2rem); }
.reference dl, .reference ol, .reference ul, .reference details { margin: 0; }
.reference ol, .reference ul { padding: 0; }
.reference ol { list-style-position: inside; }
.reference ul { list-style: none; }
.reference dt, .reference summary, .reference strong { font-weight: 760; }
.reference dd { margin: 5px 0 0; }
.reference dd, .reference li span, .reference details p { display: block; margin: 5px 0 0; }
.reference details { padding: 12px 18px; border-block-start: 1px solid var(--line); }
.reference details[open] { background: var(--panel); }
.reference summary { cursor: pointer; }
.reference-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.reference-grid > div, .reference-grid > li { padding: 14px 18px; border: 1px solid var(--line); background: var(--panel); }
.reference-steps > li { padding: 11px 8px; border-block-end: 1px solid var(--line); }
.reference-table { border-collapse: collapse; width: 100%; }
.reference-table :is(th, td) { text-align: start; padding: .7rem .85rem; border-block-end: 1px solid var(--line); }
.reference-table td { width: 68%; }
.listings { margin-block: 45px 74px; }
.listings h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
.entries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-block: 22px; }
.entry a { min-height: 105px; height: 100%; display: block; text-decoration: none; background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.entry img { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; }
.entry a > div { padding: 12px 16px 18px; }
.entry a:hover h2, .entry a:hover h3 { text-decoration: underline; }
.entry time, .article-header time { font-size: .84rem; display: block; margin-block-end: .35rem; }
.article-shell { padding-block: 50px 85px; }
.article-header { border-block-end: 1px solid var(--line); padding-block-end: 18px; }
.article-header h1 { font-size: clamp(2.25rem, 5.5vw, 5rem); max-width: 27ch; margin: 12px 0; }
.entry-content { max-width: 72ch; margin: 2.5rem auto 0; }
.entry-content :is(img, video, iframe) { max-width: 100%; height: auto; }
.entry-content :is(h2, h3) { margin-top: 1.6em; }
.entry-content figure { margin-inline: 0; }
.entry-content table { width: 100%; border-collapse: collapse; overflow-wrap: anywhere; }
.entry-content :is(th, td) { padding: .38em .54em; border: 1px solid var(--line); }
.site-footer { border-block: 1px solid var(--line) 0; }
.footer-inner { font-size: .85rem; min-height: 68px; }
@media (max-width: 730px) {
    body .front-lead { grid-template: "copy" auto "photo" auto / minmax(0, 1fr); }
    body .lead-copy { padding: 23px; }
    body .lead-photo { min-height: auto; height: clamp(200px, 60vw, 340px); }
    .languages a { padding-inline: 8px; }
    .reference-grid, .entries { grid-template-columns: minmax(0, 1fr); }
    .site-name { font-size: 1.2rem; }
    .header-inner { gap: 8px; }
}
