:root {
  color-scheme: light;
  --ink: #17232d;
  --ink-soft: #364550;
  --muted: #5e6c76;
  --line: #dce3e7;
  --surface: #f2f5f6;
  --paper: #fff;
  --nav: #111d27;
  --accent: #c43f20;
  --accent-dark: #a9381c;
  --accent-soft: #fff1eb;
  --steel: #8fa3b2;
  --shadow: 0 18px 50px rgba(18, 34, 46, .09);
  --radius: 16px;
  --header-bg: rgba(255, 255, 255, .97);
  --header-border: #e3e8eb;
  --header-shadow: 0 5px 20px rgba(20, 36, 48, .045);
  --nav-line: #edf0f2;
  --nav-text: #4a5963;
  --control-bg: #f7f9fa;
  --heading-soft: #45555f;
  --visited: #704e74;
  --body-soft: #35444e;
  --detail-muted: #576671;
  --hover-line: #dba68f;
  --image-placeholder: #e8edf0;
  --gallery-placeholder: #eef1f0;
  --detail-gradient: linear-gradient(135deg, #fff 0%, #f0f4f6 100%);
  --card-shadow: 0 4px 14px rgba(20,35,45,.035);
  --list-shadow: 0 3px 10px rgba(17,34,46,.025);
  --menu-shadow: 0 16px 22px rgba(17,29,39,.1);
  --cta: #c74222;
  --cta-hover: #a9381c;
  --switch-track: #d2dbe1;
  --switch-border: #83939e;
  --switch-icon: #334650;
  --switch-thumb: #fff;
  --focus: #a9381c;

}

:root[data-theme="dark"] {

  color-scheme: dark;
  --ink: #e8edf1;
  --ink-soft: #c6d0d8;
  --muted: #a1b0bb;
  --line: #394a57;
  --surface: #10171d;
  --paper: #19252e;
  --accent: #f18a62;
  --accent-dark: #ffad8c;
  --accent-soft: #352a26;
  --steel: #a8b7c3;
  --shadow: 0 18px 50px rgba(0,0,0,.25);
  --header-bg: rgba(18, 27, 34, .98);
  --header-border: #344451;
  --header-shadow: 0 5px 20px rgba(0,0,0,.16);
  --nav-line: #344451;
  --nav-text: #c6d0d8;
  --control-bg: #22313c;
  --heading-soft: #c6d0d8;
  --visited: #ddb4e4;
  --body-soft: #c6d0d8;
  --detail-muted: #aab8c3;
  --hover-line: #e78b66;
  --image-placeholder: #22333f;
  --gallery-placeholder: #22333f;
  --detail-gradient: linear-gradient(135deg, #1b2933 0%, #14212b 100%);
  --card-shadow: 0 4px 14px rgba(0,0,0,.15);
  --list-shadow: 0 3px 10px rgba(0,0,0,.12);
  --menu-shadow: 0 16px 22px rgba(0,0,0,.28);
  --switch-track: #9e432a;
  --switch-border: #ffad8c;
  --switch-icon: #fff4ec;
  --switch-thumb: #fff4ec;
  --focus: #ffbd91;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {

  color-scheme: dark;
  --ink: #e8edf1;
  --ink-soft: #c6d0d8;
  --muted: #a1b0bb;
  --line: #394a57;
  --surface: #10171d;
  --paper: #19252e;
  --accent: #f18a62;
  --accent-dark: #ffad8c;
  --accent-soft: #352a26;
  --steel: #a8b7c3;
  --shadow: 0 18px 50px rgba(0,0,0,.25);
  --header-bg: rgba(18, 27, 34, .98);
  --header-border: #344451;
  --header-shadow: 0 5px 20px rgba(0,0,0,.16);
  --nav-line: #344451;
  --nav-text: #c6d0d8;
  --control-bg: #22313c;
  --heading-soft: #c6d0d8;
  --visited: #ddb4e4;
  --body-soft: #c6d0d8;
  --detail-muted: #aab8c3;
  --hover-line: #e78b66;
  --image-placeholder: #22333f;
  --gallery-placeholder: #22333f;
  --detail-gradient: linear-gradient(135deg, #1b2933 0%, #14212b 100%);
  --card-shadow: 0 4px 14px rgba(0,0,0,.15);
  --list-shadow: 0 3px 10px rgba(0,0,0,.12);
  --menu-shadow: 0 16px 22px rgba(0,0,0,.28);
  --switch-track: #9e432a;
  --switch-border: #ffad8c;
  --switch-icon: #fff4ec;
  --switch-thumb: #fff4ec;
  --focus: #ffbd91;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height, 122px) + 20px); }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 16px/1.72 ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.container { width: 100%; max-width: none; margin: 0; overflow: visible; background: transparent; }

/* Clean, workshop-inspired masthead */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 24px;
  padding: 8px max(4vw, calc((100vw - 1280px) / 2)) 0;
  border-bottom: 1px solid var(--header-border);
  background: var(--header-bg);
  box-shadow: var(--header-shadow);
  backdrop-filter: blur(16px);
}
.brand-logo { display: inline-flex; flex: 0 0 156px; width: 156px; height: 64px; align-items: center; justify-content: flex-start; }
.brand-logo img { display: block; width: 156px; height: 64px; object-fit: contain; }
nav { order: 3; width: 100%; min-width: 0; border-top: 1px solid var(--nav-line); }
nav ul { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 3px 8px; margin: 0; padding: 5px 0 7px; list-style: none; }
nav ul li a, nav ul li a:visited {
  display: inline-flex; align-items: center; min-height: 38px; padding: 7px 11px;
  border: 0; border-radius: 7px; color: var(--nav-text); text-decoration: none;
  font-size: 12px; font-weight: 700; letter-spacing: .015em; line-height: 1.2;
  transition: color .18s ease, background-color .18s ease;
}
nav ul li a:hover, nav ul li a:focus-visible { color: var(--accent-dark); background: var(--accent-soft); text-decoration: none; }
nav ul li a.active-nav { color: var(--accent-dark); background: var(--accent-soft); }
.lang-selector { margin-left: auto; }
.lang-selector select {
  min-height: 38px; padding: 6px 30px 6px 12px; border: 1px solid var(--line); border-radius: 7px;
  color: var(--ink); background: var(--control-bg); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}

main.site-content { width: min(1160px, 92vw); min-height: 0; margin: 0 auto; padding: 46px 0 88px; }
.tab-content { display: block; padding: 36px 0; scroll-margin-top: 0; }
.tab-content + .tab-content { border-top: 1px solid var(--line); }
h1, h2, h3, h4 { color: var(--ink); font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; line-height: 1.2; }
h1 { max-width: 850px; margin: 0 0 18px; padding: 0; border: 0; font-size: clamp(2.35rem, 5vw, 4.7rem); font-weight: 800; letter-spacing: -.055em; }
h2, .section-title { margin: 0 0 24px; padding: 0 0 0 17px; border: 0; border-left: 4px solid var(--accent); font-size: clamp(1.55rem, 2.8vw, 2.15rem); font-weight: 800; letter-spacing: -.035em; }
h3 { margin: 34px 0 12px; font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; }
h4 { margin: 24px 0 10px; color: var(--heading-soft); font-size: .95rem; font-weight: 800; }
p { margin: 0 0 15px; }
a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
a:visited { color: var(--visited); }
:focus-visible, nav a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* Opening section */
[data-section="home"] {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0 0 20px;
  padding: clamp(36px, 6vw, 76px);
  border: 1px solid #263b4b;
  border-radius: 22px;
  color: #e9f0f4;
  background: #152432 url('/assets/images/hero/golf4-hero.webp') right center / cover no-repeat;
  box-shadow: 0 26px 70px rgba(14, 28, 40, .18);
}
[data-section="home"]::before { position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(15, 28, 39, .98) 0%, rgba(15, 28, 39, .91) 42%, rgba(15, 28, 39, .42) 100%); content: ''; }
[data-section="home"]::after { position: absolute; z-index: -1; right: 0; bottom: 0; left: 0; height: 5px; background: linear-gradient(90deg, var(--accent) 0 23%, #f0a143 23% 27%, transparent 27%); content: ''; }
[data-section="home"] h1 { max-width: 790px; color: #fff; text-wrap: balance; }
[data-section="home"] .home-intro { max-width: 740px; margin: 0 0 12px; padding: 0; border: 0; border-radius: 0; color: #d5e0e7; background: transparent; font-size: 1rem; }
[data-section="home"] .home-intro:first-of-type { font-size: 1.08rem; }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; max-width: 770px; margin: 30px 0 0; }
.stat-box { min-height: 92px; padding: 17px 18px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; background: rgba(255,255,255,.09); text-align: left; backdrop-filter: blur(8px); }
.stat-number { display: block; margin-bottom: 6px; color: #fff; font-family: inherit; font-size: 2rem; font-weight: 800; line-height: 1; }
.stat-label { color: #c6d3dc; font-size: 11px; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
.forum-links { margin: 28px 0 0; padding: 0; border: 0; background: transparent; }
.forum-links p { margin: 0 0 12px; color: #f4f7f8; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.forum-link { display: inline-flex; align-items: center; gap: 8px; margin: 0 8px 0 0; padding: 5px 10px 5px 5px; border: 1px solid rgba(255,255,255,.16); border-radius: 30px; color: #edf3f6; background: rgba(255,255,255,.08); font-size: 12px; font-weight: 700; text-align: left; text-decoration: none; transition: background .18s ease, transform .18s ease; }
.forum-link:hover { color: #fff; background: rgba(255,255,255,.16); transform: translateY(-1px); }
.forum-link:visited { color: #edf3f6; }
.forum-link img { display: block; width: 27px; height: 27px; margin: 0; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: #fff; object-fit: contain; }

[data-section="about"], [data-section="active_projects"], [data-section="project_logs"], [data-section="field_experience"], [data-section="equipment"], [data-section="planned_projects"], [data-section="contact"] { scroll-margin-top: 0; }
[data-section="about"] > p { max-width: 890px; color: var(--body-soft); }
.profile-img { float: left; width: 168px; max-width: 34vw; height: auto; margin: 4px 28px 16px 0; border: 5px solid var(--paper); border-radius: 16px; box-shadow: var(--shadow); }
.clear { clear: both; }
.retro-list { margin: 10px 0 20px; padding: 0; list-style: none; }
.retro-list li { position: relative; margin: 0 0 8px; padding: 14px 18px 14px 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); box-shadow: var(--list-shadow); }
.retro-list li::before { position: absolute; top: 22px; left: 18px; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); content: ''; }
.item-desc { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.6; }

/* Project cards and workshop entries */
.log-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.log-card, .log-card-link { display: flex; min-width: 0; gap: 15px; align-items: stretch; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); color: var(--ink); text-align: left; text-decoration: none; box-shadow: var(--card-shadow); transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.log-card:hover, .log-card-link:hover { transform: translateY(-3px); border-color: var(--hover-line); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.log-card:visited, .log-card-link:visited { color: var(--ink); }
.log-card-image { flex: 0 0 142px; width: 142px; height: 120px; border: 0; border-radius: 8px; background: var(--image-placeholder); object-fit: cover; }
.log-card-content { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 4px 5px 4px 0; }
.log-card-title { display: block; margin: 0 0 6px; color: var(--ink); font-family: inherit; font-size: .96rem; font-weight: 800; line-height: 1.35; }
.log-card-date { display: block; margin-bottom: 6px; color: var(--accent-dark); font-size: 11px; font-weight: 700; }
.log-card-desc { display: block; margin-top: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
[data-section="field_experience"] > .home-intro { max-width: none; margin: 0 0 20px; padding: 19px 22px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; color: var(--ink-soft); background: var(--paper); font-size: 14px; }

/* Detail pages */
.blog-entry { overflow: hidden; margin: 4px 0 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }
.blog-entry-header { position: relative; padding: clamp(25px, 5vw, 48px); border-bottom: 1px solid var(--line); background: var(--detail-gradient); }
.blog-entry-header::before { position: absolute; top: 0; left: 0; width: 6px; height: 100%; background: var(--accent); content: ''; }
.blog-entry-header h1.blog-title { max-width: 900px; margin: 0; padding: 0; border: 0; font-size: clamp(1.8rem, 4vw, 3rem); }
.blog-entry-header b { display: block; margin-top: 12px; color: var(--accent-dark); font-size: 13px !important; }
.blog-date { margin: 12px 0 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.blog-entry-body { padding: clamp(23px, 5vw, 48px); background: var(--paper); }
.blog-entry-body h3 { margin: 32px 0 10px; padding-top: 2px; font-size: 1.15rem; }
.blog-entry-body h3:first-child { margin-top: 0; }
.log-gallery { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin: 8px 0 36px; }
.log-gallery figure { min-width: 0; margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.log-gallery img { display: block; width: 100%; height: 205px; border-radius: 7px; background: var(--gallery-placeholder); object-fit: cover; }
.log-gallery figcaption { margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.gallery-button { display: block; width: 100%; padding: 0; overflow: hidden; border: 0; border-radius: 7px; background: transparent; cursor: zoom-in; }
.gallery-button img { transition: transform .25s ease; }
.gallery-button:hover img, .gallery-button:focus-visible img { transform: scale(1.025); }
.gallery-button.field-cover { margin: 0 0 18px; border-radius: 13px; }
.gallery-button.field-cover img { width: 100%; max-height: 590px; object-fit: cover; }
.image-lightbox { position: fixed; inset: 0; z-index: 100; display: none; padding: 64px 20px 28px; background: rgba(9,17,23,.95); text-align: center; }
.image-lightbox.active { display: grid; grid-template-rows: 1fr auto; align-items: center; justify-items: center; }
.image-lightbox img { max-width: min(94vw, 1400px); max-height: 82vh; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; background: #fff; object-fit: contain; }
#lightbox-caption { margin: 12px auto 0; color: #fff; font-size: 13px; }
.lightbox-close { position: fixed; top: 14px; right: 18px; min-width: 44px; min-height: 44px; border: 1px solid rgba(255,255,255,.3); border-radius: 9px; color: #fff; background: #243746; font: inherit; font-size: 23px; cursor: pointer; }
button { font: inherit; }

@media (min-width: 1400px) {
  [data-section="home"] { padding-right: 92px; padding-left: 92px; }
}
@media (max-width: 1000px) {
  header { padding-right: 4vw; padding-left: 4vw; }
  nav ul { justify-content: flex-start; gap: 2px; }
  nav ul li a { padding-inline: 9px; font-size: 11px; }
  .log-card-image { flex-basis: 118px; width: 118px; height: 112px; }
}
@media (max-width: 700px) {
  body { font-size: 15px; }
  header { position: sticky; gap: 0 12px; padding: 6px 4vw 0; }
  .brand-logo, .brand-logo img { width: 132px; height: 55px; }
  .brand-logo { flex-basis: 132px; }
  nav { overflow: visible; }
  nav ul { flex-wrap: wrap; width: 100%; justify-content: flex-start; padding: 4px 0 6px; }
  nav ul li a { min-height: 44px; }
  main.site-content { width: min(92vw, 620px); padding: 28px 0 56px; }
  .tab-content { padding: 28px 0; scroll-margin-top: 0; }
  [data-section="home"] { padding: 32px 24px 30px; border-radius: 16px; background-position: 60% center; }
  [data-section="home"]::before { background: linear-gradient(90deg, rgba(15,28,39,.97) 0%, rgba(15,28,39,.9) 70%, rgba(15,28,39,.72) 100%); }
  [data-section="home"] h1 { font-size: clamp(2.05rem, 9vw, 3.2rem); }
  [data-section="home"] .home-intro { font-size: .95rem; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 22px; }
  .stat-box { min-height: 80px; padding: 13px; }
  .stat-number { font-size: 1.65rem; }
  .stat-label { font-size: 10px; }
  .forum-links { margin-top: 23px; }
  .forum-link { margin-bottom: 6px; }
  .profile-img { width: 148px; margin-right: 20px; }
  .log-list { grid-template-columns: 1fr; gap: 10px; }
  .log-card, .log-card-link { gap: 12px; padding: 9px; }
  .log-card-image { flex-basis: 122px; width: 122px; height: 102px; }
  .log-gallery { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .log-gallery img { height: 155px; }
  .blog-entry-header, .blog-entry-body { padding: 25px 21px; }
}
@media (max-width: 430px) {
  header { padding-right: 4vw; padding-left: 4vw; }
  .brand-logo, .brand-logo img { width: 120px; height: 51px; }
  .brand-logo { flex-basis: 120px; }
  .lang-selector select { min-height: 34px; }
  h2, .section-title { padding-left: 12px; }
  [data-section="home"] { padding: 28px 19px 25px; }
  .stat-label { letter-spacing: 0; }
  .profile-img { float: none; display: block; width: 148px; max-width: 50vw; margin: 0 auto 18px; }
  .log-card, .log-card-link { display: flex; align-items: flex-start; gap: 11px; }
  .log-card-image { display: block; flex: 0 0 88px; width: 88px; height: 88px; margin: 0; }
  .log-card-content { padding: 1px 0; }
  .log-gallery { grid-template-columns: 1fr; }
  .log-gallery img { height: 210px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Publication refinements: compact entry, accessible navigation and section navigation. */
:root { --header-height: 122px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 200; top: 8px; left: 16px; padding: 9px 16px; border-radius: 6px; color: #fff; background: var(--nav); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); color: #fff; }
.menu-toggle { display: none; }
[data-section="home"] .hero-kicker { margin: 0 0 14px; color: #ffb49b; font-size: 12px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
[data-section="home"] h1 { margin-bottom: 20px; }
[data-section="home"] .home-intro, [data-section="home"] .home-intro:first-of-type { max-width: 640px; font-size: 1.05rem; line-height: 1.65; }
.hero-cta, .hero-cta:visited { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 15px; padding: 12px 20px; border: 1px solid #ee7453; border-radius: 8px; background: var(--cta); color: #fff; font-size: 14px; font-weight: 750; line-height: 1.45; text-decoration: none; }
.hero-cta::after { content: '↘'; margin-left: 14px; font-size: 19px; line-height: 1; }
.hero-cta:hover { color: #fff; background: var(--cta-hover); border-color: var(--cta-hover); }
.stats-grid { gap: 18px; max-width: 460px; margin-top: 28px; }
.stat-box, .stat-box:visited { display: flex; align-items: center; gap: 11px; min-height: 58px; padding: 8px 0; border: 0; border-top: 1px solid rgba(255,255,255,.25); border-radius: 0; background: transparent; color: #fff; text-decoration: none; backdrop-filter: none; }
.stat-box:hover { color: #fff; border-top-color: #ffb49b; }
.stat-number { margin: 0; font-size: 1.9rem; }
.stat-label { min-width: 0; max-width: 135px; font-size: 11px; line-height: 1.4; letter-spacing: .025em; }
[data-section="contact"] .forum-links { margin-top: 24px; }
[data-section="contact"] .forum-links p { color: var(--ink-soft); letter-spacing: .04em; }
[data-section="contact"] .forum-link, [data-section="contact"] .forum-link:visited { min-height: 44px; margin-bottom: 8px; color: var(--ink); border-color: var(--line); background: var(--paper); }
[data-section="contact"] .forum-link:hover { border-color: var(--accent); color: var(--accent-dark); }
[data-section="contact"] .forum-link img { border-color: var(--line); }
.log-card-content { flex: 1; }
.log-card-title { overflow-wrap: anywhere; }
.log-card-desc, .item-desc { color: var(--detail-muted); }
.gallery-button.field-cover img { display: block; height: auto; }
.image-lightbox img { width: auto; height: auto; }
[data-section="contact"] a { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  :root { --header-height: 72px; }
  header { gap: 0 10px; padding: 6px 4vw; }
  .brand-logo { margin-right: auto; }
  .lang-selector { margin-left: 0; }
  .nav-enhanced .menu-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--control-bg); font-size: 13px; font-weight: 700; cursor: pointer; }
  .menu-toggle::before { content: '☰'; font-size: 17px; line-height: 1; }
  .menu-toggle[aria-expanded=true]::before { content: '×'; }
  .lang-selector select { min-height: 44px; padding-left: 9px; padding-right: 22px; }
  .nav-enhanced #primary-navigation { display: none; position: absolute; inset: 100% 0 auto; padding: 8px 4vw 14px; max-height: calc(100vh - var(--header-height)); max-height: calc(100dvh - var(--header-height)); overflow-y: auto; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--menu-shadow); }
  .nav-enhanced header.menu-open #primary-navigation { display: block; }
  nav ul { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 4px; width: 100%; padding: 0; }
  nav ul li a { display: flex; width: 100%; min-height: 46px; padding: 10px 12px; font-size: 13px; white-space: normal; }
}
@media (max-width: 700px) {
  main.site-content { padding-top: 22px; }
  [data-section="home"] { padding: 29px 23px 24px; }
  [data-section="home"] h1 { max-width: 460px; font-size: clamp(2.3rem, 9.7vw, 3.8rem); margin-bottom: 16px; }
  [data-section="home"] .hero-kicker { font-size: 10px; line-height: 1.6; letter-spacing: .09em; margin-bottom: 12px; }
  [data-section="home"] .home-intro, [data-section="home"] .home-intro:first-of-type { font-size: .95rem; line-height: 1.65; }
  .hero-cta { margin-top: 12px; font-size: 13px; padding-inline: 15px; }
  .stats-grid { gap: 14px; margin-top: 24px; }
  .stat-box { min-height: 55px; padding: 8px 0 0; gap: 9px; }
  .stat-number { font-size: 1.65rem; }
  .stat-label { font-size: 10px; }
  .log-card-image { flex-basis: 112px; width: 112px; height: 112px; }
  .log-card-title { font-size: .91rem; }
}
@media (max-width: 430px) {
  header { gap: 0 8px; }
  [data-section="home"] { padding: 27px 19px 24px; }
  .log-card-image { flex-basis: 88px; width: 88px; height: 88px; }
  .log-card, .log-card-link { padding: 11px; }
  .log-card-title { font-size: .87rem; line-height: 1.4; }
  .log-card-date { margin-bottom: 4px; }
  .log-card-desc { font-size: 11.5px; line-height: 1.5; }
}
@media (max-width: 360px) {
  .brand-logo, .brand-logo img { width: 104px; height: 44px; }
  .brand-logo { flex-basis: 104px; }
  .nav-enhanced .menu-toggle { padding-inline: 9px; }
}

/* Shared controls and footer on all language and detail pages. */
.header-controls { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-left: auto; min-width: 0; }
.header-controls .lang-selector { margin-left: 0; }
.theme-switch { position: relative; display: none; align-items: center; gap: 9px; min-height: 44px; cursor: pointer; user-select: none; color: var(--ink-soft); }
.theme-ready .theme-switch { display: inline-flex; }
.theme-switch input { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.theme-track { position: relative; display: block; flex: 0 0 48px; width: 48px; height: 28px; border: 1px solid var(--switch-border); border-radius: 999px; background: var(--switch-track); }
.theme-thumb { position: absolute; z-index: 1; top: 3px; left: 3px; width: 20px; height: 20px; border: 1px solid var(--switch-icon); border-radius: 50%; background: var(--switch-thumb); box-shadow: 0 1px 4px rgba(0,0,0,.25); transform: translateX(0); }
:root[data-theme="dark"] .theme-thumb,
.theme-switch input:checked + .theme-track .theme-thumb { transform: translateX(20px); }
.theme-switch input:focus-visible + .theme-track { outline: 3px solid var(--focus); outline-offset: 4px; }
.theme-switch:hover .theme-track { border-color: var(--accent-dark); }
.theme-icon { position: absolute; top: 6px; color: var(--switch-icon); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-sun { left: 5px; }
.theme-moon { right: 5px; }
.theme-state { min-width: 44px; font-size: 12px; font-weight: 700; }
.site-footer { width: min(1160px, 92vw); margin: 0 auto; padding: 24px 0 30px; border-top: 1px solid var(--line); color: var(--detail-muted); text-align: center; font-size: 12px; line-height: 1.7; }
.site-footer p { margin: 0; }
.skip-link:focus-visible { outline-color: #ffbd91; }
.hero-cta:focus-visible, .stat-box:focus-visible { outline-color: #ffbd91; }
@media (max-width: 900px) {
  header { gap: 0 10px; }
  .header-controls { gap: 10px; }
  .theme-state { display: none; }
  .brand-logo { margin-right: 0; }
}
@media (max-width: 430px) {
  header { gap: 0 6px; }
  .header-controls { gap: 6px; }
  .brand-logo, .brand-logo img { width: 108px; height: 46px; }
  .brand-logo { flex-basis: 108px; }
  .nav-enhanced .menu-toggle { padding-inline: 9px; }
  .menu-toggle::before { display: none; }
  .lang-selector select { width: 60px; min-width: 60px; padding-inline: 7px 18px; }
}
@media (max-width: 360px) {
  .brand-logo, .brand-logo img { width: 84px; height: 40px; }
  .brand-logo { flex-basis: 84px; }
  .header-controls { gap: 5px; }
  .nav-enhanced .menu-toggle { padding-inline: 8px; }
}
@media (forced-colors: active) {
  .theme-track { border: 1px solid ButtonText; background: Canvas; }
  .theme-thumb { background: ButtonText; forced-color-adjust: none; }
  .theme-switch input:checked + .theme-track { background: Highlight; }
  .theme-icon { color: ButtonText; }
}
