:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #0f172a;
  --color-text-muted: #475569;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-border: #e2e8f0;
  --color-navy: #1e293b;
  --max-width: 720px;
  --max-width-wide: 960px;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--color-accent-hover);
}

img {
  max-width: 100%;
  height: auto;
}

.site-header {
  padding: 1.5rem 1.25rem 0;
  text-align: center;
}

.site-header__lang {
  display: flex;
  justify-content: flex-end;
  gap: 0.375rem;
  max-width: var(--max-width-wide);
  margin: 0 auto 1rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-surface);
  text-decoration: none;
  line-height: 0;
}

.lang-switch img {
  width: 1.25rem;
  height: auto;
  display: block;
  border-radius: 1px;
}

.lang-switch:hover {
  background: var(--color-border);
}

.lang-switch[aria-current="page"] {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.site-header--compact {
  padding-top: 2rem;
}

.site-header__logo {
  display: block;
  width: min(320px, 80vw);
  margin: 0 auto;
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.hero {
  text-align: center;
  max-width: var(--max-width);
  margin: 0 auto 3rem;
}

.hero h1 {
  font-size: clamp(1.25rem, 3.25vw, 1.625rem);
  font-weight: 600;
  line-height: 1.35;
  text-wrap: balance;
  color: var(--color-navy);
  margin: 1.5rem 0 0.75rem;
}

.hero p {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin: 0;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-navy);
  margin: 0 0 1.25rem;
  text-align: center;
}

.projects {
  display: grid;
  gap: 1.25rem;
  max-width: var(--max-width);
  margin: 0 auto 3rem;
}

@media (min-width: 600px) {
  .projects {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-card h3 {
  margin: 0;
  font-size: 1.125rem;
  color: var(--color-navy);
}

.project-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  flex: 1;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #92400e;
  background: #fef3c7;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  align-self: flex-start;
}

.badge--muted {
  color: var(--color-text-muted);
  background: var(--color-border);
}

.project-card a.project-link {
  font-weight: 500;
  text-decoration: none;
}

.project-card a.project-link:hover {
  text-decoration: underline;
}

.contact {
  text-align: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
}

.contact h2 {
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
  color: var(--color-navy);
}

.contact a {
  font-size: 1.0625rem;
  font-weight: 500;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 1.25rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  margin-bottom: 0.75rem;
}

.site-footer a {
  color: var(--color-text-muted);
}

.site-footer a:hover {
  color: var(--color-text);
}

.legal-page {
  max-width: var(--max-width);
  margin: 0 auto;
}

.legal-page h1 {
  font-size: 1.75rem;
  color: var(--color-navy);
  margin: 0 0 1.5rem;
}

.legal-page h2 {
  font-size: 1.125rem;
  color: var(--color-navy);
  margin: 2rem 0 0.75rem;
}

.legal-page p,
.legal-page ul {
  margin: 0 0 1rem;
  color: var(--color-text-muted);
}

.legal-page ul {
  padding-left: 1.25rem;
}

.legal-page .todo {
  background: #fff7ed;
  border: 1px dashed #fdba74;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #9a3412;
  margin: 1rem 0;
}
