:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.08);
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --line: rgba(255, 255, 255, 0.1);
    --accent: #4d8bff;
    --accent-soft: rgba(77, 139, 255, 0.16);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 100%/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--line);
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }

nav.site {
  margin-left: auto;
  display: flex;
  gap: 18px;
  font-size: 0.9rem;
}
nav.site a { color: var(--muted); }
nav.site a[aria-current="page"] { color: var(--text); font-weight: 600; }

.lang-switch {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  background: var(--line);
  font-size: 0.8rem;
}
.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.hero {
  text-align: center;
  padding: 56px 0 32px;
}
.hero img {
  width: 112px;
  height: 112px;
  filter: drop-shadow(0 12px 28px rgba(37, 99, 235, 0.3));
}
.hero h1 {
  margin: 18px 0 6px;
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}
.hero p {
  margin: 0 auto;
  max-width: 34em;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.45;
}

.card {
  background: var(--surface);
  border-radius: 18px;
  padding: 24px;
  margin: 0 0 16px;
  border: 1px solid var(--line);
}

h1.page {
  margin: 48px 0 4px;
  font-size: clamp(1.9rem, 5vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.stand { color: var(--muted); margin: 0 0 28px; font-size: 0.95rem; }

h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
h3 { margin: 20px 0 4px; font-size: 1rem; }
p, ul, ol { margin: 0 0 12px; }
.card > :last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.25em; }
li { margin: 4px 0; }

details {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
details:first-of-type { border-top: 0; padding-top: 4px; }
details:last-of-type { padding-bottom: 0; }
summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  color: var(--muted);
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.2;
}
details[open] summary::after { content: "–"; }
details > :not(summary) { margin-top: 8px; color: var(--muted); }

.contact {
  display: grid;
  gap: 4px;
  font-style: normal;
}

.button {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.button:hover { text-decoration: none; filter: brightness(1.08); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.grid .card { margin: 0; }
.grid h2 { font-size: 1.05rem; }
.grid p { color: var(--muted); }

code {
  font: 0.9em ui-monospace, "SF Mono", Menlo, monospace;
  background: var(--accent-soft);
  padding: 1px 6px;
  border-radius: 6px;
}

footer.site {
  color: var(--muted);
  font-size: 0.85rem;
  padding: 32px 0 48px;
}
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer.site a { color: var(--muted); }

/* Both languages are visible without JavaScript; the script shows one. */
html.js [data-lang]:not(.active) { display: none; }

@media (max-width: 520px) {
  nav.site { gap: 12px; }
  .card { padding: 20px; border-radius: 16px; }
}
