/* ========================
   GitHub Theme
   ======================== */

/* Base GitHub light colors */
:root[data-design="github"] {
  --font-display: '-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', system-ui, sans-serif;
  --font-sans: '-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', system-ui, sans-serif;

  --color-bg: #ffffff;
  --color-bg-accent: #f6f8fa;
  --color-card: #ffffffdd;
  --color-border: #d0d7de;
  --color-border-strong: #0969da;
  --color-text: #24292f;
  --color-text-muted: #57606a;
  --color-accent: #1f6feb;
  --shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  --focus-ring: 0 0 0 3px rgba(9, 105, 218, 0.1);
  
  --polaroid-bg: #ffffff;
  --polaroid-img-filter: brightness(1) contrast(1);
}

/* GitHub dark mode */
:root[data-design="github"][data-theme="dark"] {
  --color-bg: #0d1117;
  --color-bg-accent: #161b22;
  --color-card: #161b22cc;
  --color-border: #30363d;
  --color-border-strong: #58a6ff;
  --color-text: #c9d1d9;
  --color-text-muted: #8b949e;
  --color-accent: #58a6ff;
  --shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
  --polaroid-bg: #161b22;
  --polaroid-img-filter: brightness(0.95) contrast(1.05);
}

/* GitHub light mode */
:root[data-design="github"][data-theme="light"] {
  --color-bg: #ffffff;
  --color-bg-accent: #f6f8fa;
  --color-card: #ffffffdd;
  --color-border: #d0d7de;
  --color-border-strong: #0969da;
  --color-text: #24292f;
  --color-text-muted: #57606a;
  --color-accent: #1f6feb;
  --shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

/* GitHub Card */
:root[data-design="github"] .card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 0.6rem;
  backdrop-filter: none;
  box-shadow: var(--shadow);
  color: var(--color-text);
  font-family: var(--font-sans);
}

:root[data-design="github"] .name {
  color: var(--color-text);
  font-weight: 600;
  font-size: clamp(1.5rem, 6vw, 2.5rem);
}

:root[data-design="github"] .tagline {
  color: var(--color-text-muted);
  font-weight: 400;
}

/* GitHub Polaroid */
:root[data-design="github"] .polaroid {
  background: var(--polaroid-bg);
  border: 1px solid var(--color-border);
  border-radius: 0.6rem;
  backdrop-filter: none;
  box-shadow: var(--shadow);
}

:root[data-design="github"] .polaroid img {
  border: none;
  border-radius: 0.6rem;
  filter: var(--polaroid-img-filter);
}

/* GitHub Buttons */
:root[data-design="github"] .btn {
  --btn-border: var(--color-border);
  background: var(--color-bg-accent);
  color: var(--color-text);
  border: 1px solid var(--btn-border);
  border-radius: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0;
  transition: all 0.2s ease;
}

:root[data-design="github"] .btn::before {
  display: none;
}

:root[data-design="github"] .btn:hover {
  background: var(--color-border-strong);
  color: #ffffff;
  border-color: var(--color-border-strong);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

:root[data-design="github"] .btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

:root[data-design="github"] .btn:active {
  transform: scale(0.98);
  background: #0860ca;
}

/* GitHub brand buttons */
:root[data-design="github"] .btn--linkedin,
:root[data-design="github"] .btn--github,
:root[data-design="github"] .btn--unsplash {
  background: var(--color-bg-accent);
  border-color: var(--color-border);
}

:root[data-design="github"] .btn--linkedin:hover,
:root[data-design="github"] .btn--github:hover,
:root[data-design="github"] .btn--unsplash:hover {
  background: var(--color-border-strong);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* GitHub Theme Toggle */
:root[data-design="github"] .theme-toggle__switch {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

:root[data-design="github"] .theme-toggle__switch:hover {
  border-color: var(--color-border-strong);
  background: var(--color-bg-accent);
}

:root[data-design="github"] .theme-toggle__icon {
  color: var(--color-text);
}

:root[data-design="github"] .theme-toggle__slider {
  background: var(--color-border-strong);
  border-radius: 50%;
}

/* GitHub Dropdown */
:root[data-design="github"] .theme-dropdown {
  background: var(--color-card);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  backdrop-filter: none;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230969da' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1.2em;
  padding-right: 2rem;
}

:root[data-design="github"][data-theme="dark"] .theme-dropdown {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2358a6ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

:root[data-design="github"] .theme-dropdown:hover {
  border-color: var(--color-border-strong);
  background-color: var(--color-bg-accent);
}

:root[data-design="github"] .theme-dropdown:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-color: var(--color-border-strong);
}

:root[data-design="github"] .theme-dropdown option {
  background: var(--color-card);
  color: var(--color-text);
  font-family: var(--font-sans);
}

/* GitHub responsive */
@media (max-width: 560px) {
  :root[data-design="github"] .theme-dropdown {
    font-size: 0.75rem;
    padding: 0.4rem 0.5rem;
    padding-right: 1.8rem;
  }
}
