:root {
  color-scheme: light dark;
  --brand: #0B3C5D;
  --bg: #F6F9FC;
  --surface: #FFFFFF;
  --text: #14212B;
  --muted: #4A5B68;
  --accent: #0B3C5D;
  --link: #0B5A9C;
  --border: #C5D3DE;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1A24;
    --surface: #16263A;
    --text: #E6EEF4;
    --muted: #A3B4C2;
    --accent: #5FD3F3;
    --link: #8CCBFF;
    --border: #2C4258;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 1rem/1.75 system-ui, "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: break-word;          /* long URLs must not cause horizontal scroll at 360 px */
}
.wrap { max-width: 42rem; margin-inline: auto; padding-inline: 1rem; }
main { padding-block: 1.5rem 2rem; }

.site-header { background: var(--brand); color: #fff; padding-block: 1rem; }
.header-inner { display: flex; align-items: center; gap: 1rem; }
.logo { flex: none; width: 56px; height: 56px; }
.site-name { margin: 0; font-size: 1.5rem; line-height: 1.3; font-weight: 700; }
.tagline { margin: 0; color: #CFE3F1; font-size: .9375rem; line-height: 1.5; }
.brand-link { display: flex; align-items: center; gap: 1rem; color: inherit; text-decoration: none; }
.brand-link:focus-visible { outline-color: #fff; }   /* link blue on the brand band would be unreadable */

h1 { font-size: 1.625rem; line-height: 1.4; margin: 0 0 .5rem; }
h2 { font-size: 1.25rem; line-height: 1.4; margin: 2rem 0 .5rem; }
p, ul { margin: 0 0 1rem; }
ul { padding-left: 1.25rem; }
li { margin-bottom: .25rem; }
.meta { color: var(--muted); }
.en { color: var(--muted); }

a { color: var(--link); text-decoration: underline; text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 2px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: .75rem; padding: 1rem 1.25rem; margin-block: 1rem; }
.card h2 { margin-top: 0; font-size: 1.125rem; }
.card p:last-child { margin-bottom: 0; }

.button {
  display: inline-block; min-height: 2.75rem;   /* 44 px target; not flex, or the inline <span> and the text split into separate columns */
  padding: .5rem 1.25rem; text-align: center; border: 2px solid var(--accent); border-radius: .5rem;
  background: var(--brand); color: #fff; font-weight: 600; text-decoration: none;
}
.button:hover { background: #0F4E7A; }
.button span { white-space: nowrap; }

.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: .9375rem; padding-block: 1rem 2rem; }
.site-footer p { margin: 0; }
.site-footer a { display: inline-block; padding-block: .5rem; }      /* >= 24 px target */

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Developer profile page: one card per app. */
.app-card { display: flex; gap: 1rem; align-items: flex-start; }
.app-card img { flex: none; border-radius: 12px; }
.app-card h3 { margin: 0 0 .25rem; font-size: 1.125rem; line-height: 1.4; }
.app-card p { margin: 0 0 .5rem; }
.app-card div { min-width: 0; }
