/* Portfolyo tema katmanı: açık / koyu mod */

:root {
  color-scheme: light;
}

/* ---- Ortak sayfa ızgarası: portfolyo container'ı ile aynı ---- */
.wrap {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  padding-inline: 12px;
}

@media (min-width: 576px) {
  .wrap { max-width: 540px; }
}
@media (min-width: 768px) {
  .wrap { max-width: 720px; }
}
@media (min-width: 992px) {
  .wrap { max-width: 960px; }
}
@media (min-width: 1200px) {
  .wrap { max-width: 1140px; }
}
@media (min-width: 1400px) {
  .wrap { max-width: 1320px; }
}

@media (max-width: 460px) {
  .brand-name { display: none; }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f5f3ff;
  --ink-soft: #c9c5da;
  --body: #b6b2c8;
  --muted: #928da8;
  --line: #2b2742;
  --surface: #100e1b;
  --surface-alt: #181526;
  --accent-soft: color-mix(in srgb, var(--accent) 18%, transparent);
  --accent-dark: color-mix(in srgb, var(--accent) 58%, #ffffff);
  --night: #07060d;
}

/* Ana sayfanın açık zeminli gradyanı */
html[data-theme="dark"] body {
  background:
    radial-gradient(1100px 560px at 88% -12%, color-mix(in srgb, var(--accent) 14%, transparent) 0%, transparent 62%),
    radial-gradient(900px 520px at -12% 4%, rgba(124, 92, 255, 0.12) 0%, transparent 58%),
    var(--surface);
}

/* Yarı saydam üst çubuk ve açık zeminli kartlar */
html[data-theme="dark"] .site-header {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

html[data-theme="dark"] .feature-card,
html[data-theme="dark"] .shot-card,
html[data-theme="dark"] .note-card,
html[data-theme="dark"] .app-card {
  background: var(--surface);
}

html[data-theme="dark"] .button-light {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] .button-light:hover {
  border-color: var(--muted);
  color: var(--accent-dark);
}

html[data-theme="dark"] .skip-link,
html[data-theme="dark"] .lang-switch button.active {
  color: var(--surface);
}

html[data-theme="dark"] .brand-mark {
  background: var(--accent);
  color: #ffffff;
}

html[data-theme="dark"] .button-primary:hover {
  background: color-mix(in srgb, var(--accent) 80%, #000000);
  color: #ffffff;
}

html[data-theme="dark"] .portrait-frame {
  border-color: var(--surface);
  background: var(--surface-alt);
}

html[data-theme="dark"] .app-icon,
html[data-theme="dark"] .project-icon {
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.8);
}

/* Tema düğmesi */
.theme-toggle {
  flex: none;
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.theme-toggle.is-floating {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  width: 44px;
  height: 44px;
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.55);
}

.theme-toggle:hover {
  background: var(--surface-alt);
  border-color: var(--muted);
}

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

.theme-toggle svg {
  display: none;
  width: 18px;
  height: 18px;
}

html[data-theme="light"] .theme-toggle .icon-moon,
html[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle {
    transition: none;
  }
}
