/* ========================
   Solarized Theme
   ======================== */

/* Base Solarized colors - light mode */
:root[data-design="solarized"] {
  --font-display: 'Raleway', 'Montserrat', system-ui, sans-serif;
  --font-sans: 'Raleway', 'Montserrat', system-ui, sans-serif;

  --color-bg: #fdf6e3;
  --color-bg-accent: #eee8d5;
  --color-card: #fffef0cc;
  --color-border: #d6d0be;
  --color-border-strong: #859900;
  --color-text: #657b83;
  --color-text-muted: #93a1a1;
  --color-accent: #268bd2;
  --shadow: 0 4px 12px rgba(0, 43, 54, 0.1);
  --focus-ring: 0 0 0 2px #fdf6e3, 0 0 0 4px #268bd2;
  
  --polaroid-bg: #ffffff;
  --polaroid-img-filter: brightness(1) contrast(1.05);
}

/* Solarized dark mode */
:root[data-design="solarized"][data-theme="dark"] {
  --color-bg: #002b36;
  --color-bg-accent: #073642;
  --color-card: #586e75cc;
  --color-border: #073642;
  --color-border-strong: #2aa198;
  --color-text: #93a1a1;
  --color-text-muted: #839496;
  --color-accent: #268bd2;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  --polaroid-bg: #073642;
  --polaroid-img-filter: brightness(0.95) contrast(1.08);
}

/* Solarized light mode */
:root[data-design="solarized"][data-theme="light"] {
  --color-bg: #fdf6e3;
  --color-bg-accent: #eee8d5;
  --color-card: #fffef0dd;
  --color-border: #d6d0be;
  --color-border-strong: #859900;
  --color-text: #657b83;
  --color-text-muted: #93a1a1;
  --color-accent: #268bd2;
  --shadow: 0 4px 12px rgba(0, 43, 54, 0.1);
}

/* Solarized Card */
:root[data-design="solarized"] .card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 0.8rem;
  backdrop-filter: blur(10px) saturate(150%);
  box-shadow: var(--shadow);
  color: var(--color-text);
  font-family: var(--font-sans);
}

:root[data-design="solarized"] .name {
  color: var(--color-border-strong);
  font-weight: 700;
  font-size: clamp(1.75rem, 6vw, 2.75rem);
}

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

/* Solarized Polaroid */
:root[data-design="solarized"] .polaroid {
  background: var(--polaroid-bg);
  border: 1px solid var(--color-border);
  border-radius: 0.8rem;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  padding: 0.6rem;
}

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

/* Solarized Buttons */
:root[data-design="solarized"] .btn {
  --btn-border: var(--color-border-strong);
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--btn-border);
  border-radius: 0.6rem;
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
}

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

:root[data-design="solarized"] .btn:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  border-color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(38, 139, 210, 0.2);
}

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

:root[data-design="solarized"] .btn:active {
  transform: scale(0.98);
}

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

:root[data-design="solarized"] .btn--linkedin:hover,
:root[data-design="solarized"] .btn--github:hover,
:root[data-design="solarized"] .btn--unsplash:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  box-shadow: 0 4px 12px rgba(38, 139, 210, 0.2);
}

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

:root[data-design="solarized"] .theme-toggle__switch:hover {
  border-color: var(--color-border-strong);
  box-shadow: 0 4px 12px rgba(38, 139, 210, 0.15);
}

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

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

/* Solarized Dropdown */
:root[data-design="solarized"] .theme-dropdown {
  background: var(--color-card);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 0.6rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  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='%23268bd2' 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="solarized"][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='%232aa198' 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="solarized"] .theme-dropdown:hover {
  border-color: var(--color-border-strong);
  box-shadow: 0 4px 12px rgba(38, 139, 210, 0.15);
}

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

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

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