/* Base layout for refreshed site */
:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --text: #161d27;
  --muted: #4a5563;
  --accent: #0f6fff;
  --accent-2: #f2994a;
  --border: #d3dae5;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
  --bg-gradient-start: #f4f7fb;
  --bg-gradient-end: #e9eef5;
  --nav-bg: #e6ebf3;
  --nav-bg-hover: #d8e0ec;
  --list-bg: #f2f6fb;
  --badge-bg: #e6ebf3;
  font-size: 16px;
}

:root[data-theme="dark"] {
  --bg: #0f172a;
  --card: #111827;
  --text: #e6edf7;
  --muted: #9fb2d0;
  --accent: #4da3ff;
  --accent-2: #f5b971;
  --border: #2f3b4f;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.55);
  --bg-gradient-start: #0b1220;
  --bg-gradient-end: #0f1627;
  --nav-bg: #182132;
  --nav-bg-hover: #1f2c3f;
  --list-bg: #152033;
  --badge-bg: #1f2c3f;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f172a;
    --card: #111827;
    --text: #e6edf7;
    --muted: #9fb2d0;
    --accent: #4da3ff;
    --accent-2: #f5b971;
    --border: #2f3b4f;
    --shadow: 0 12px 34px rgba(0, 0, 0, 0.55);
    --bg-gradient-start: #0b1220;
    --bg-gradient-end: #0f1627;
    --nav-bg: #182132;
    --nav-bg-hover: #1f2c3f;
    --list-bg: #152033;
    --badge-bg: #1f2c3f;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  color: var(--text);
  transition: background 160ms ease, color 160ms ease;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrapper {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

header {
  background: var(--card);
  box-shadow: var(--shadow);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: 6px;
  padding-bottom: 6px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  padding-right: 120px;
  position: relative;
}

.brand img {
  width: 72px;
  height: 58px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--border);
}

.brand h1 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}

nav {
  display: flex;
  gap: 12px;
  padding: 0 20px 16px;
  flex-wrap: wrap;
}

nav a {
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--nav-bg);
  color: var(--text);
  font-weight: 700;
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

nav a:hover {
  background: var(--nav-bg-hover);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  text-decoration: none;
}

nav a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  text-decoration: none;
}

main {
  margin-top: 28px;
  display: grid;
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.card h2 { margin-top: 0; margin-bottom: 8px; }

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.hero {
  display: grid;
  gap: 14px;
}

.hero img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.list li {
  padding: 0;
  border: none;
  background: transparent;
}

.list li:not(:has(a)) {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--list-bg);
}

.list li > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--nav-bg);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  transition: transform 120ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.list li > a:hover {
  background: var(--nav-bg-hover);
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
  text-decoration: none;
}

.badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--badge-bg);
  font-size: 0.85rem;
  color: var(--muted);
  margin-right: 8px;
}

.theme-switcher {
  position: absolute;
  top: 10px;
  right: 20px;
  display: flex;
  justify-content: flex-end;
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--nav-bg);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  transition: background 120ms ease, transform 120ms ease, box-shadow 160ms ease;
}

.theme-toggle:hover {
  background: var(--nav-bg-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.theme-toggle:focus {
  outline: 2px solid var(--accent);
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  padding: 18px 0 10px;
}

@media (max-width: 640px) {
  .brand h1 { font-size: 1.05rem; }
  nav { gap: 8px; }
  nav a { padding: 9px 12px; }
}
