

/* =========================
   Base reset and design tokens
   ========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  /* neutrals */
  --bg: #f7f8fb;            /* page background */
  --surface: #ffffff;        /* cards/blocks */
  --surface-2: #f3f4f6;      /* subtle sections */
  --text: #111827;           /* primary text */
  --muted-text: #4b5563;     /* secondary text */
  --border: #e5e7eb;         /* standard border */
  --border-subtle: #eef0f3;  /* soft dividers */
  --white: #ffffff;

  /* brand + interactive */
  --brand-1: #0ea5a6;        /* primary (teal) */
  --brand-2: #0369a1;        /* secondary (blue) */
  --brand-3: #e6fbfb;        /* light accent */
  --ring: rgba(14,165,165,.35);

  /* radii, shadows, spacing, fixed heights */
  --radius-1: 12px;
  --shadow-1: 0 1px 3px rgba(0,0,0,.08), 0 6px 18px rgba(0,0,0,.06);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --nav-height: 64px;
}

html,
body {
  height: 100%;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Raleway', 'Arial', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;

  /* fixed nav offset + sticky footer layout */
  padding-top: var(--nav-height);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* =========================
   Navbar
   ========================= */
#main_navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background-color: var(--brand-1);
  box-shadow: var(--shadow-1);
  z-index: 1000;
}

#navlist {
  margin: 0;
  padding: 0 var(--space-5);
  width: 100%;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 32px);
}

#navlist li { list-style: none; }

#navlist a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--white);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  transition: color .2s ease, background-color .2s ease;
}

#navlist a:hover,
#navlist a:focus-visible {
  color: var(--text);
  background-color: rgba(255,255,255,0.18);
  outline: none;
}

/* =========================
   Page structure and typography
   ========================= */
header { margin: 0; padding: 0; width: 100%; }

#border {
  border-bottom: 4px solid var(--border);
  margin: 0 5%;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
  font-size: clamp(1rem, 0.9rem + 0.25vw, 1.125rem);
  flex: 1 0 auto; /* sticky footer: let main grow */
}

h2 {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  margin: 0 0 var(--space-3);
  font-weight: 600;
}

/* =========================
   Home hero
   ========================= */
#hometitle {
  margin-top: clamp(24px, 4vh, 48px);
  display: flex;
  width: 100%;
  font-size: clamp(2rem, 1.4rem + 4vw, 3rem);
  justify-content: center;
  color: var(--brand-2);
  text-align: center;
}

#oneliner {
  display: block;
  text-align: center;
  color: var(--muted-text);
  max-width: 70ch;
  margin: var(--space-2) auto 0 auto;
  font-style: italic;
}

/* =========================
   Home: call-to-action buttons
   ========================= */
#options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(12px, 2vw, 24px);
  margin-top: var(--space-5);
}

#options a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  padding: clamp(12px, 1.4vw, 18px) clamp(18px, 2.4vw, 26px);
  background: var(--brand-1);
  color: var(--white);
  font-weight: 600;
  font-size: clamp(1.05rem, 0.9rem + 0.8vw, 1.35rem);
  letter-spacing: .2px;
  border-radius: var(--radius-1);
  border: 1px solid color-mix(in srgb, var(--brand-1), #000 12%);
  box-shadow: var(--shadow-1);
  text-decoration: none;
  transition: background-color .2s ease, transform .15s ease, box-shadow .2s ease, color .2s ease;
}

#options a:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--brand-1), #000 12%);
}

#options a:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}

/* =========================
   Footer and contacts (sticky footer support)
   ========================= */
footer {
  width: 100%;
  display: flex;
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  justify-content: center;
  align-items: center;
  padding: var(--space-5) var(--space-4);
  gap: var(--space-3);
  margin-top: auto;                 /* push to bottom on short pages */
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}

#contact_list {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  padding: 0;
  margin: 0;
}

#contact_list li { list-style: none; }

#rss {
  display: flex;
  justify-content: flex-end;
  padding: var(--space-3) var(--space-5) 0 var(--space-5);
  width: 100%;
}

/* =========================
   Media
   ========================= */
#rss img,
img {
  max-height: 100px;
  max-width: 100px;
  height: auto;
  width: auto;
  object-fit: contain;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 768px) {
  :root { --nav-height: 56px; }
  #navlist { overflow-x: auto; justify-content: flex-start; }
  #hometitle { margin-top: var(--space-6); }
  #options a { width: 100%; min-width: 0; }
  #rss img, img { max-height: 64px; max-width: 64px; }
}

/* =========================
   Accessibility: reduced motion
   ========================= */
@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* =========================
   Dark mode
   ========================= */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #111827;
    --surface-2: #0f172a;
    --text: #e5e7eb;
    --muted-text: #9ca3af;
    --brand-1: #0ea5a6;
    --brand-2: #22d3ee;
    --brand-3: #0b3540;
    --border: #334155;
    --border-subtle: #1f2937;
    --white: #f8fafc;
    --ring: rgba(34,211,238,.35);
  }

  #navlist a:hover,
  #navlist a:focus-visible {
    background-color: rgba(0,0,0,0.25);
  }
}
