:root {
  color-scheme: dark;
  --background: #0b0e14;
  --tile: #151b25;
  --border: #263140;
  --text: #f5f7fa;
  --muted: #9aa8b9;
  --accent: #38bdf8;
  --alert: #ef4444;
}
:root[data-theme="light"] {
  color-scheme: light;
  --background: #f5f7fa;
  --tile: #e5eaf1;
  --border: #c8d3df;
  --text: #111827;
  --muted: #526376;
  --accent: #0369a1;
  --alert: #dc2626;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--background);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  transition: background-color .22s ease, color .22s ease;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  padding: 32px 44px;
}
.brand { display: block; line-height: 0; width: clamp(150px, 18vw, 240px); }
.brand img { width: 100%; height: auto; }
.logo-light, .moon { display: none; }
[data-theme="light"] .logo-dark, [data-theme="light"] .sun { display: none; }
[data-theme="light"] .logo-light, [data-theme="light"] .moon { display: block; }
.theme-toggle {
  width: 44px; height: 44px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--tile); color: var(--accent);
  display: grid; place-items: center; cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle svg, .project-icon svg {
  width: 24px; height: 24px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.main { display: grid; place-items: center; padding: 24px 24px 130px; }
.project-empty { margin: 0; color: var(--muted); text-align: center; }
.projects { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 24px; max-width: 960px; }
.project {
  width: clamp(132px, 20vw, 192px); aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; position: relative;
  border-radius: 18px; border: 1px solid var(--border); background: var(--tile);
  color: var(--text); text-align: center; text-decoration: none;
  padding: 16px;
  transition: transform .2s ease, border-color .2s ease, background-color .22s ease;
}
a.project:hover { transform: translateY(-4px); border-color: var(--accent); }
.project-icon { color: var(--accent); line-height: 0; }
.project-icon svg { width: 48px; height: 48px; stroke-width: 1.4; }
.project-name { font-size: 1rem; font-weight: 600; }
.project-status { color: var(--muted); font-size: .78rem; }
.project-status::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--alert); margin-right: 6px; vertical-align: 2px; }
.project-label { display: flex; flex-direction: column; gap: 6px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
@media (max-width: 600px) {
  .topbar { padding: 20px; gap: 14px; }
  .main { padding: 20px 16px 90px; }
  .projects { gap: 14px; }
  .project { width: min(40vw, 165px); border-radius: 14px; gap: 10px; }
  .project-icon svg { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
