:root {
  --bg: #f5f6f7;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #52606d;
  --border: #d9e2ec;
  --accent: #1769aa;
  --accent-soft: #e6f0fa;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", "Noto Sans", "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 0.12em;
}

.wrap {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
}

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

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-menu {
  display: none;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.top-nav,
.locale-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-nav,
.mobile-locales {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mobile-nav a,
.mobile-locales a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  padding: 0.45rem 0.55rem;
  border-radius: 0.375rem;
}

.mobile-nav a:hover,
.mobile-locales a:hover,
.mobile-nav a.active,
.mobile-locales a.active {
  color: var(--text);
  background: var(--accent-soft);
}

.top-nav a,
.locale-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  border-radius: 0.375rem;
}

.top-nav a:hover,
.locale-nav a:hover,
.top-nav a.active,
.locale-nav a.active {
  color: var(--text);
  background: var(--accent-soft);
}

.content {
  padding: 2rem 0 4rem;
}

.stack > * + * {
  margin-top: 1rem;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
}

h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
}

h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  margin-top: 2rem;
}

h3 {
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
}

p {
  margin: 0;
  color: var(--muted);
}

.hero {
  margin-top: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff, #f9fbfd);
  border-radius: 0.75rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.25rem;
  align-items: start;
}

.hero-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  margin-top: 1.15rem;
}

.card {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--surface);
}

.projects-title.is-hidden {
  display: none;
}

.repo-list {
  display: grid;
  gap: 1rem;
}

.repo-list .card h3 a {
  color: var(--accent);
  text-decoration: none;
}

.repo-list .card h3 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 0.12em;
}

.repo-meta {
  font-size: 0.9rem;
  color: var(--muted);
}

.legal h2 {
  margin-top: 1.5rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1rem 0 1.5rem;
}

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

.footer-grid nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-grid p {
  font-size: 0.95rem;
}

@media (max-width: 700px) {
  .nav-wrap {
    padding: 0.6rem 0;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-menu {
    display: block;
    width: auto;
  }

  .mobile-menu summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    color: var(--text);
    font-weight: 600;
    background: var(--accent-soft);
    border: 1px solid var(--border);
    border-radius: 0.4rem;
    padding: 0.35rem 0.6rem;
  }

  .mobile-menu summary::-webkit-details-marker {
    display: none;
  }

  .mobile-menu[open] {
    position: absolute;
    right: 1rem;
    top: 3.8rem;
    width: min(240px, calc(100vw - 2rem));
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    background: var(--surface);
    padding: 0.55rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    z-index: 20;
  }

  .mobile-locales {
    margin-top: 0.45rem;
    padding-top: 0.45rem;
    border-top: 1px solid var(--border);
    flex-direction: row;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-photo {
    max-width: 240px;
  }

}
