/* ========== RESET ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ========== VARIABLES ========== */
:root {
  --primary: #ff6b35;
  --primary-dark: #e55a2b;
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --text: #1a1a1a;
  --text-secondary: #666666;
  --border: rgba(0,0,0,0.1);
  --card-bg: rgba(0,0,0,0.03);
  --card-hover: rgba(0,0,0,0.06);
  --nav-bg: rgba(255,255,255,0.85);
  --nav-border: rgba(0,0,0,0.08);
}
[data-theme="dark"] {
  --bg: #0c0c0f;
  --bg-alt: #131318;
  --text: #eaeaef;
  --text-secondary: #9a9ab0;
  --border: rgba(255,255,255,0.08);
  --card-bg: rgba(255,255,255,0.03);
  --card-hover: rgba(255,255,255,0.06);
  --nav-bg: rgba(12,12,15,0.85);
  --nav-border: rgba(255,255,255,0.08);
}

/* ========== BASE ========== */
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
main { flex: 1; }

/* ========== SKIP LINK ========== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

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

/* ========== NAVBAR ========== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 64px;
  background: var(--nav-bg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--nav-border);
}
.nav-logo {
  display: flex; align-items: center; gap: 0.5rem;
  text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.25rem;
}
.nav-logo img { width: 32px; height: 32px; }
.nav-right { display: flex; align-items: center; gap: 0.75rem; }
.nav-link {
  font-size: 0.875rem; font-weight: 600; color: var(--text);
  text-decoration: none; transition: color 0.2s;
}
.nav-link:hover { color: var(--primary); }

/* ========== THEME TOGGLE ========== */
.theme-toggle {
  background: none; border: 1px solid var(--border); border-radius: 8px;
  width: 40px; height: 40px; cursor: pointer; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.theme-toggle:hover { background: var(--card-hover); }
.theme-toggle svg { width: 20px; height: 20px; }
[data-theme="dark"] .icon-moon { display: none; }
html[data-theme="light"] .icon-sun, html:not([data-theme]) .icon-sun { display: none; }

/* ========== FOOTER ========== */
.footer {
  display: flex; align-items: center; justify-content: center;
  gap: 1.5rem; padding: 2rem; font-size: 0.875rem;
  color: var(--text-secondary); border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.footer a {
  color: var(--text-secondary); text-decoration: none; transition: color 0.2s;
}
.footer a:hover { color: var(--primary); }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .navbar { padding: 0 1rem; }
}
