/* Site chrome shared by every projects/*.html page: tokens, top bar, footer. Palette mirrors css/style.css. */
:root {
  --accent: #3e64ff;
  --accent-dark: #2f4fd6;
  --accent-tint: #eef2ff;
  --ink: #1a1a1a;
  --text: #555555;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #f7f8fa;
  --dark: #151b24;
  --radius: 12px;
  --col: 820px;
  --wide: 1110px;
  --font: "Poppins", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, Menlo, monospace;
}

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

:focus-visible { outline: 3px solid rgba(62, 100, 255, .45); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 20px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link { position: absolute; top: -48px; left: 12px; z-index: 100; padding: 8px 14px; font-family: var(--font); color: #fff; background: var(--accent); border-radius: 8px; }
.skip-link:focus { top: 12px; color: #fff; }

/* Same look as the home page navbar. Margins and borders are reset because some older pages style bare header/footer/li elements. */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  margin: 0;
  padding: 0;
  font-family: var(--font);
  text-align: left;
  background: rgba(255, 255, 255, .98);
  border: 0;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, .08);
}
.site-nav .wrap { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 70px; }

.site-nav .brand { display: inline-flex; align-items: center; font-size: 1.6rem; font-weight: 700; line-height: 1.2; color: #333; text-decoration: none; }
.site-nav .brand:hover { color: #333; text-decoration: none; }
.site-nav .brand span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-right: 8px;
  font-size: 1.35rem;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
  transition: transform .3s ease;
}
.site-nav .brand:hover span { transform: rotate(360deg) scale(1.08); }

.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav-links li { margin: 0; padding: 0; }
.nav-links li::before { content: none; }
.nav-links a { display: block; padding: 8px 16px; font-size: 1rem; font-weight: 500; line-height: 1.5; color: #555; text-decoration: none; border-radius: 8px; transition: color .2s ease, background-color .2s ease; }
.nav-links a:hover { color: var(--accent); background: rgba(62, 100, 255, .08); text-decoration: none; }
.nav-links .nav-cta a { margin-left: 6px; font-weight: 600; color: #fff; background: var(--accent); }
.nav-links .nav-cta a:hover { color: #fff; background: var(--accent-dark); }

.nav-toggle {
  display: none;
  align-items: center;
  padding: 6px 14px;
  font: 600 .9rem var(--font);
  color: var(--accent);
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: 8px;
  cursor: pointer;
}

/* Projects menu, built by js/project.js; without JS the item stays a plain link to the home page. */
.nav-projects-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font: 500 1rem/1.5 var(--font);
  color: #555;
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: color .2s ease, background-color .2s ease;
}
.nav-projects-toggle:hover,
.nav-projects-toggle[aria-expanded="true"],
.nav-projects.is-current .nav-projects-toggle { color: var(--accent); background: rgba(62, 100, 255, .08); }
.nav-projects-toggle .caret { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s ease; }
.nav-projects-toggle[aria-expanded="true"] .caret { transform: translateY(1px) rotate(-135deg); }

.projects-menu {
  position: absolute;
  top: 100%;
  right: 20px;
  left: 20px;
  z-index: 60;
  padding: 22px 26px 18px;
  font-family: var(--font);
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .12);
}
.projects-menu[hidden] { display: none; }
.projects-menu-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 28px; }
.projects-menu-title { margin: 0 0 6px; font-size: 12px; font-weight: 600; line-height: 1.5; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.projects-menu ul { margin: 0; padding: 0; list-style: none; }
.projects-menu li { margin: 0; padding: 0; color: inherit; }
.projects-menu li::before { content: none; }
.projects-menu a { display: block; margin: 0 -8px; padding: 5px 8px; font-size: .92rem; font-weight: 500; line-height: 1.35; color: var(--ink); text-decoration: none; border-radius: 6px; }
.projects-menu a:hover { color: var(--accent); text-decoration: none; background: rgba(62, 100, 255, .08); }
.projects-menu a[aria-current] { color: var(--accent); font-weight: 600; background: rgba(62, 100, 255, .08); }
.projects-menu .projects-menu-all { display: inline-block; margin: 14px 0 0; font-weight: 600; color: var(--accent); }

@media (max-width: 1100px) {
  .projects-menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .js .nav-toggle { display: inline-flex; }
  .js .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    max-height: calc(100vh - 70px);
    padding: 8px 20px 16px;
    overflow-y: auto;
    background: #fff;
    box-shadow: 0 12px 20px rgba(0, 0, 0, .08);
  }
  .js .site-nav.open .nav-links { display: flex; }
  .nav-links .nav-cta a { margin: 6px 0 0; text-align: center; }
  .nav-projects-toggle { width: 100%; justify-content: space-between; }
  .projects-menu { position: static; padding: 6px 0 10px 16px; border: 0; border-radius: 0; box-shadow: none; }
  .projects-menu-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

.site-footer { max-width: none; margin: 0; padding: 36px 0; font-family: var(--font); font-size: .9rem; line-height: 1.6; text-align: left; color: rgba(255, 255, 255, .7); background: #000; border: 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.site-footer p { margin: 0; color: inherit; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; background: none; border: 0; }
.site-footer a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
