:root {
  /* Light (default) */
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #f0f5ff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --accent: #1e40af;
  --accent-contrast: #ffffff;
  --ring: rgba(30, 64, 175, 0.35);

  --radius-card: 14px;
  --radius-ui: 10px;

  --shadow-card: 0 12px 32px rgba(15, 23, 42, 0.12), 0 2px 10px rgba(15, 23, 42, 0.06);
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.08);

  --font-sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0b1220;
    --surface: #0f1a2e;
    --surface-2: #12213c;
    --text: #f8fafc;
    --muted: #cbd5e1;
    --border: rgba(148, 163, 184, 0.25);
    --accent: #60a5fa;
    --accent-contrast: #0b1220;
    --ring: rgba(96, 165, 250, 0.45);

    --shadow-card: 0 16px 40px rgba(0, 0, 0, 0.55), 0 4px 14px rgba(0, 0, 0, 0.25);
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.25);

    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --bg: #0b1220;
  --surface: #0f1a2e;
  --surface-2: #12213c;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --border: rgba(148, 163, 184, 0.25);
  --accent: #60a5fa;
  --accent-contrast: #0b1220;
  --ring: rgba(96, 165, 250, 0.45);

  --shadow-card: 0 16px 40px rgba(0, 0, 0, 0.55), 0 4px 14px rgba(0, 0, 0, 0.25);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.25);

  color-scheme: dark;
}

:root[data-theme='light'] {
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration-thickness: from-font;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration: underline;
}

/* Skip link (shown on keyboard focus) */
.skip-link {
  position: absolute;
  inset-inline-start: 0.75rem;
  inset-block-start: 0.75rem;
  z-index: 50;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transform: translateY(-250%);
  transition: transform 150ms ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* Visible, consistent keyboard focus */
:where(a, button, input, select, textarea, summary, [tabindex]:not([tabindex='-1'])):focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--ring);
  border-radius: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.shell {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
}

.container {
  margin: 0 auto;
  width: 100%;
  max-width: 56rem;
  padding: 1.5rem 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 2.5rem 1.5rem;
  }
}

.card {
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 1rem;
}

.page-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
  text-align: center;
}

@media (min-width: 640px) {
  .site-header {
    padding: 1rem 1.5rem;
  }

  .page-title {
    font-size: 1.25rem;
  }
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  min-width: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.notice-wrap {
  padding: 1.5rem 1rem 0;
}

@media (min-width: 640px) {
  .notice-wrap {
    padding: 1.5rem 1.5rem 0;
  }
}

.notice {
  border-radius: var(--radius-ui);
  border: 1px solid var(--border);
  background: var(--surface-2);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.main {
  padding: 1.25rem 1rem 2.5rem;
}

@media (min-width: 640px) {
  .main {
    padding: 1.5rem 1.5rem 3rem;
  }
}

.main h1 {
  margin: 0 0 1rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-size: 1.75rem;
}

.main h2 {
  margin: 2rem 0 0.75rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-size: 1.25rem;
}

.main p {
  margin: 0 0 1rem;
  max-width: 75ch;
}

.main .lede {
  font-size: 1.05rem;
  color: var(--muted);
}

.domains {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.5rem 0.75rem;
}

.domains a {
  display: block;
  border-radius: 0.65rem;
  border: 1px solid transparent;
  padding: 0.45rem 0.6rem;
  color: var(--text);
  text-decoration: none;
}

.domains a:hover {
  background: var(--surface-2);
  border-color: var(--border);
  text-decoration: none;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1rem;
  font-size: 0.75rem;
  color: var(--muted);
}

@media (min-width: 640px) {
  .footer {
    padding: 2.25rem 1.5rem;
  }
}

.footer h2 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.footer p {
  margin: 0 0 0.75rem;
}

.footer__bottom {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

/* Contact image (contact.png) – keep a clean white frame in all themes */
.contact-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  border-radius: var(--radius-ui);
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.14);
  box-shadow: var(--shadow-soft);
}

.contact-card__image {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: calc(var(--radius-ui) - 4px);
}

/* Simple segmented theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.theme-toggle__options {
  display: inline-flex;
  border-radius: var(--radius-ui);
  border: 1px solid var(--border);
  background: var(--surface-2);
  padding: 2px;
  box-shadow: var(--shadow-soft);
}

.theme-toggle__option {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: calc(var(--radius-ui) - 2px);
  cursor: pointer;
  transition:
    background-color 150ms ease,
    color 150ms ease;
}

.theme-toggle__option:hover {
  color: var(--text);
}

.theme-toggle__option[aria-pressed='true'] {
  background: var(--surface);
  color: var(--text);
}
