:root {
  color-scheme: dark;
  --bg: #000000;
  --ink: #f2f5f7;
  --slate: #9fb3bf;
  --dim: #7d8f99;
  --line: #222a2f;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--slate); text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--slate); outline-offset: 3px; border-radius: 2px; }

/* language visibility */
html[data-lang="en"] [data-l="ro"],
html:not([data-lang="en"]) [data-l="en"] { display: none; }

/* header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 2.5rem; width: auto; }
.page-home .brand { visibility: hidden; }
.lang { margin-left: auto; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.25rem; }
.nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--slate); }
.lang {
  font: inherit;
  color: var(--slate);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  cursor: pointer;
}
.lang:hover { color: var(--ink); border-color: var(--slate); }

@media (max-width: 40rem) {
  .page-home .brand { display: none; }
}

/* main */
main { flex: 1; width: 100%; max-width: 46rem; margin: 0 auto; padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 2rem); }
h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); line-height: 1.2; font-weight: 600; margin: 0 0 1rem; }
p { margin: 0 0 1rem; max-width: 65ch; }
.muted { color: var(--dim); }

/* home */
.home {
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.5rem;
}
.home .logo { width: 75vw; opacity: 0.6; }
.home .tagline { color: var(--slate); font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem); margin: 0 auto; }
@media (prefers-reduced-motion: no-preference) {
  .home .logo { animation: reveal 1.2s ease-out both; }
  @keyframes reveal { from { opacity: 0; transform: scale(0.97); } to { opacity: 0.6; transform: none; } }
}

/* footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 1.25rem clamp(1rem, 4vw, 2.5rem);
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.9rem;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-footer a { color: var(--dim); }
.site-footer a:hover { color: var(--ink); }
