/* Site-wide light theme — html[data-theme] set by static/js/theme.js */

html[data-theme="light"] {
    color-scheme: light;
    --bg: #ffffff;
    --panel: #ffffff;
    --text: #111111;
    --muted: #555555;
    --accent: #9f4f18;
    --line: #e5e5e5;
    --panel-bg: #ffffff;
    --accent-gold: #b8860b;
    --text-muted: #666666;
    /* Standart açık tema kutu */
    --light-box-bg: #ffffff;
    --light-box-border: #e3e6ec;
    --light-box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(15, 23, 42, 0.05);
    --light-box-shadow-hover: 0 4px 20px rgba(15, 23, 42, 0.08);
    --light-inset-bg: #f3f4f6;
    --light-text: #151922;
    --light-text-muted: rgba(21, 25, 34, 0.58);
    /* Header / footer — içerikten hafif koyu krom yüzey */
    --light-chrome-bg: #eceef2;
    --light-chrome-bg-glass: rgba(236, 239, 244, 0.92);
    --light-chrome-border: rgba(21, 25, 34, 0.09);
}

html[data-theme="light"] body {
    background: #ffffff;
    color: var(--text);
}

/* —— Fixed theme dock (bottom-right, icon-only) —— */
.site-theme-dock {
    position: fixed;
    right: max(0.85rem, env(safe-area-inset-right));
    bottom: max(0.85rem, env(safe-area-inset-bottom));
    z-index: 9990;
}

.site-theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem !important;
    height: 2.5rem !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 999px !important;
    background: rgba(7, 8, 12, 0.92) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35) !important;
    color: #f4d082 !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    line-height: 0 !important;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
}

.site-theme-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(226, 178, 74, 0.35) !important;
    background: rgba(7, 8, 12, 0.92) !important;
    filter: none !important;
}

.site-theme-toggle:focus-visible {
    outline: 2px solid rgba(226, 178, 74, 0.55);
    outline-offset: 2px;
}

html[data-theme="light"] .site-theme-toggle {
    border-color: #e3e6ec !important;
    background: #ffffff !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1) !important;
    color: #b8860b !important;
}

html[data-theme="light"] .site-theme-toggle:hover {
    border-color: rgba(184, 134, 11, 0.35) !important;
    background: #ffffff !important;
}

.site-theme-toggle__icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1em;
    height: 1em;
    margin: 0;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.site-theme-toggle__icon::before {
    display: block;
    line-height: 1;
}

.site-theme-toggle__icon--light {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
}

.site-theme-toggle__icon--dark {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.site-theme-toggle.is-light .site-theme-toggle__icon--dark {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
}

.site-theme-toggle.is-light .site-theme-toggle__icon--light {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 480px) {
    .site-theme-dock {
        right: max(0.65rem, env(safe-area-inset-right));
        bottom: max(0.65rem, env(safe-area-inset-bottom));
    }
}

/* —— Global light text on dark hardcoded blocks —— */
html[data-theme="light"] main,
html[data-theme="light"] .dashboard-page-content {
    color: var(--text);
}

html[data-theme="light"] :where(h1, h2, h3, h4, h5, h6):not(.home-hero *, .library-reading-page *) {
    color: #1f1711;
}

/* Header — light temada da koyu bar (dark theme ile aynı) */
html[data-theme="light"] .site-header.is-scrolled {
    background: rgba(9, 9, 9, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .site-header .header-username {
    color: #e2b24a !important;
    border-right-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="light"] .site-header .header-nav-cta {
    color: #fdf4e5 !important;
}

/* Footer — light temada da koyu (dark theme ile aynı) */
html[data-theme="light"] .studio-footer {
    background: #070707;
    border-top-color: rgba(255, 255, 255, 0.05);
    color: #ececec;
}

html[data-theme="light"] .studio-footer h3,
html[data-theme="light"] .studio-footer h4 {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

html[data-theme="light"] .studio-footer p,
html[data-theme="light"] .studio-footer a {
    color: #9e9e9e;
}

html[data-theme="light"] .studio-footer a:hover {
    color: #ffffff;
}

html[data-theme="light"] .footer-tagline {
    color: rgba(255, 255, 255, 0.45) !important;
}

html[data-theme="light"] .footer-social-link {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] .footer-social-link:hover {
    color: var(--accent-gold, #e2b24a);
    border-color: rgba(226, 178, 74, 0.45);
    background: rgba(226, 178, 74, 0.08);
}

/* Messages & toasts */
html[data-theme="light"] .messages p {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(31, 23, 17, 0.12);
    color: #1f1711;
}

html[data-theme="light"] .toast {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(31, 23, 17, 0.12);
    box-shadow: 0 24px 70px rgba(70, 43, 16, 0.12);
}

html[data-theme="light"] .toast-message {
    color: #1f1711;
}

html[data-theme="light"] .toast-close {
    border-color: rgba(31, 23, 17, 0.14);
    background: rgba(31, 23, 17, 0.04);
    color: #1f1711;
}

/* Cookie consent */
html[data-theme="light"] .cookie-consent-inner {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(31, 23, 17, 0.12);
    box-shadow: 0 26px 80px rgba(70, 43, 16, 0.14);
}

html[data-theme="light"] .cookie-consent-head {
    border-bottom-color: rgba(31, 23, 17, 0.1);
}

html[data-theme="light"] .cookie-consent-title {
    color: #1f1711;
}

html[data-theme="light"] .cookie-consent-close {
    border-color: rgba(31, 23, 17, 0.12);
    background: rgba(31, 23, 17, 0.04);
    color: rgba(31, 23, 17, 0.7);
}

html[data-theme="light"] .cookie-consent-text,
html[data-theme="light"] .cookie-consent-list {
    color: rgba(31, 23, 17, 0.78);
}

html[data-theme="light"] .cookie-consent-detail-title {
    color: #1f1711;
}

html[data-theme="light"] .cookie-consent-details {
    border-top-color: rgba(31, 23, 17, 0.12);
}

/* Dashboard shell */
html[data-theme="light"] .dashboard-layout {
    background: #f5f6f8;
    color: #151922;
}

html[data-theme="light"] .dashboard-sidebar {
    background: #ffffff;
    border-right-color: #e3e6ec;
}

html[data-theme="light"] .dashboard-sidebar--rail:hover,
html[data-theme="light"] .dashboard-sidebar--rail:focus-within {
    box-shadow: 16px 0 48px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .nav-section-label {
    color: rgba(21, 25, 34, 0.45);
}

html[data-theme="light"] .nav-item {
    color: rgba(21, 25, 34, 0.62);
}

html[data-theme="light"] .nav-item:hover,
html[data-theme="light"] .nav-item.is-active {
    background: rgba(21, 25, 34, 0.05);
    color: #151922;
}

html[data-theme="light"] .nav-item.is-active {
    background: rgba(184, 134, 11, 0.1);
    color: var(--accent-gold);
}

html[data-theme="light"] .dashboard-topbar {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: #e3e6ec;
}

html[data-theme="light"] .dashboard-topbar h2,
html[data-theme="light"] .topbar-left h2 {
    color: #151922;
}

html[data-theme="light"] .dashboard-sidebar-toggle {
    background: rgba(21, 25, 34, 0.04);
    border-color: #e3e6ec;
    color: rgba(21, 25, 34, 0.62);
}

html[data-theme="light"] .dashboard-sidebar-label {
    color: rgba(21, 25, 34, 0.72);
    border-color: #e3e6ec;
    background: rgba(21, 25, 34, 0.03);
}

html[data-theme="light"] .dashboard-nav-group {
    border-color: #eceef2;
    background: rgba(21, 25, 34, 0.02);
}

html[data-theme="light"] .dashboard-nav-group-title {
    color: rgba(21, 25, 34, 0.52);
}

html[data-theme="light"] .dashboard-nav-link strong,
html[data-theme="light"] .dashboard-nav-empty strong {
    color: rgba(21, 25, 34, 0.68);
}

html[data-theme="light"] .dashboard-nav-link:hover {
    background: rgba(21, 25, 34, 0.04);
}

html[data-theme="light"] .dashboard-nav-link.is-active strong {
    color: #151922;
}

html[data-theme="light"] .user-name-mini {
    color: #151922;
}

html[data-theme="light"] .user-profile-trigger {
    background: rgba(21, 25, 34, 0.04);
    border-color: #e3e6ec;
}

html[data-theme="light"] .dashboard-topbar .language-switcher {
    border-color: #e3e6ec;
    background: rgba(21, 25, 34, 0.03);
}

html[data-theme="light"] .dashboard-topbar .language-switcher-sep {
    color: rgba(21, 25, 34, 0.22);
}

html[data-theme="light"] .dashboard-topbar .language-switcher-link {
    color: rgba(21, 25, 34, 0.45);
}

html[data-theme="light"] .dashboard-topbar .language-switcher-link.is-active,
html[data-theme="light"] .dashboard-topbar .language-switcher-link:hover {
    color: #151922;
    background: rgba(21, 25, 34, 0.05);
}

html[data-theme="light"] .dashboard-topbar .topbar-right > div[style*="border-left"] {
    border-left-color: #e3e6ec !important;
}

/* Dashboard cards & tables */
html[data-theme="light"] .dashboard-kpi,
html[data-theme="light"] .dashboard-section,
html[data-theme="light"] .bento-card,
html[data-theme="light"] .exon-card,
html[data-theme="light"] .studio-project-card {
    background: var(--light-box-bg) !important;
    border-color: var(--light-box-border) !important;
    color: var(--light-text);
    box-shadow: var(--light-box-shadow) !important;
}

html[data-theme="light"] .bento-card:hover {
    background: var(--light-box-bg) !important;
    border-color: #d9dde5 !important;
    box-shadow: var(--light-box-shadow-hover) !important;
}

html[data-theme="light"] .kpi-icon {
    background: var(--light-inset-bg);
    color: #151922;
}

html[data-theme="light"] .kpi-title {
    color: rgba(21, 25, 34, 0.52);
}

html[data-theme="light"] .kpi-value {
    color: #151922;
}

html[data-theme="light"] .kpi-sub {
    color: rgba(21, 25, 34, 0.48);
}

html[data-theme="light"] .dashboard-page-label {
    color: rgba(21, 25, 34, 0.48);
}

html[data-theme="light"] .dashboard-page-title,
html[data-theme="light"] .dashboard-section h2 {
    color: #151922;
}

html[data-theme="light"] .studio-project-stage,
html[data-theme="light"] .studio-project-meta,
html[data-theme="light"] .studio-project-footer {
    color: rgba(21, 25, 34, 0.58);
}

html[data-theme="light"] .projects-hub-projects-title-main {
    color: #151922;
}

html[data-theme="light"] .data-table {
    background: var(--light-box-bg);
    border-color: var(--light-box-border);
}

html[data-theme="light"] .data-table th {
    background: var(--light-inset-bg);
    color: rgba(21, 25, 34, 0.62);
    border-color: #e3e6ec;
}

html[data-theme="light"] .data-table td {
    color: rgba(21, 25, 34, 0.82);
    border-color: #eceef2;
}

html[data-theme="light"] .panel-header h3 {
    color: #151922;
}

html[data-theme="light"] .panel-badge {
    color: rgba(21, 25, 34, 0.52);
    border-color: var(--light-box-border);
    background: var(--light-inset-bg);
}

html[data-theme="light"] .legend-item {
    color: rgba(21, 25, 34, 0.48);
}

html[data-theme="light"] .dashboard-modal-backdrop {
    background: rgba(15, 23, 42, 0.35);
}

html[data-theme="light"] .dashboard-modal-card,
html[data-theme="light"] .tw-modal-panel {
    background: var(--light-box-bg) !important;
    border-color: var(--light-box-border) !important;
    box-shadow: var(--light-box-shadow) !important;
    color: var(--light-text);
}

html[data-theme="light"] .dashboard-modal-header,
html[data-theme="light"] .dashboard-modal-form label {
    color: #151922;
}

html[data-theme="light"] .dashboard-modal-close {
    color: rgba(21, 25, 34, 0.62);
    border-color: #e3e6ec;
}

html[data-theme="light"] .dashboard-modal-form input,
html[data-theme="light"] .dashboard-modal-form select,
html[data-theme="light"] .dashboard-modal-form textarea {
    background: #ffffff !important;
    border-color: #d9dde5 !important;
    color: #151922 !important;
}

html[data-theme="light"] .dashboard-modal-form input:focus,
html[data-theme="light"] .dashboard-modal-form select:focus,
html[data-theme="light"] .dashboard-modal-form textarea:focus {
    background: #ffffff !important;
    border-color: var(--accent-gold, #b8860b) !important;
}

html[data-theme="light"] .editor-listing-form .editor-listing-field-label {
    color: rgba(21, 25, 34, 0.52);
}

html[data-theme="light"] .editor-listing-form .editor-listing-field select {
    background: #ffffff;
    border-color: #d9dde5;
    color: #151922;
}

html[data-theme="light"] .editor-listing-form .editor-listing-check-label {
    color: rgba(21, 25, 34, 0.78);
}

html[data-theme="light"] .case-study-form-btn--secondary {
    background: #f3f4f6 !important;
    color: #151922 !important;
    border-color: #d9dde5 !important;
    box-shadow: none !important;
}

/* Landing */
html[data-theme="light"] .home-page {
    background: #ffffff;
    color: #1f1711;
}

html[data-theme="light"] .method-band,
html[data-theme="light"] .expertise-mid-band,
html[data-theme="light"] .cta-join-band {
    background: #ffffff !important;
    color: #1f1711;
    border-top-color: rgba(31, 23, 17, 0.08) !important;
}

html[data-theme="light"] .home-page section strong[style*="color: #fff"],
html[data-theme="light"] .home-page section strong[style*="color:#fff"] {
    color: #1f1711 !important;
}

html[data-theme="light"] .home-page section h2[style*="color: #fff"],
html[data-theme="light"] .home-page section h2[style*="color:#fff"] {
    color: #1f1711 !important;
}

html[data-theme="light"] .home-page section p[style*="color: rgba(255"],
html[data-theme="light"] .home-page section div[style*="color: rgba(255"] {
    color: rgba(31, 23, 17, 0.62) !important;
}

/* Forms */
html[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not(.library-search-bar__input),
html[data-theme="light"] textarea,
html[data-theme="light"] select {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(31, 23, 17, 0.14);
    color: #1f1711;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
    color: rgba(31, 23, 17, 0.38);
}

/* Chat */
html[data-theme="light"] #exon-chat-panel,
html[data-theme="light"] .exon-chat-inner {
    background: #fafafa;
    border-color: rgba(31, 23, 17, 0.12);
    color: #1f1711;
}

html[data-theme="light"] .exon-chat-header,
html[data-theme="light"] .exon-chat-sidebar,
html[data-theme="light"] .exon-chat-footer {
    border-color: rgba(31, 23, 17, 0.1);
}

html[data-theme="light"] .exon-chat-header h3,
html[data-theme="light"] .exon-contact-name,
html[data-theme="light"] .exon-thread-title {
    color: #1f1711;
}

html[data-theme="light"] .exon-contact-preview,
html[data-theme="light"] .exon-contact-card,
html[data-theme="light"] .exon-welcome-state {
    color: rgba(31, 23, 17, 0.58);
}

html[data-theme="light"] .exon-contact-card {
    background: rgba(31, 23, 17, 0.03);
    border-color: rgba(31, 23, 17, 0.08);
}

html[data-theme="light"] .exon-contact-card:hover,
html[data-theme="light"] .exon-contact-card.active {
    background: rgba(159, 79, 24, 0.08);
    border-color: rgba(159, 79, 24, 0.2);
}

html[data-theme="light"] .exon-row-them .exon-bubble {
    background: rgba(31, 23, 17, 0.06);
    color: #1f1711;
}

html[data-theme="light"] .exon-input-box {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(31, 23, 17, 0.12);
}

html[data-theme="light"] .exon-notification-bell {
    background: rgba(21, 25, 34, 0.04) !important;
    border-color: #e3e6ec !important;
    color: rgba(21, 25, 34, 0.55) !important;
}

html[data-theme="light"] #exon-chat-toggle {
    background: #ffffff;
    border-color: rgba(184, 134, 11, 0.45);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1), 0 0 16px rgba(184, 134, 11, 0.08);
}

html[data-theme="light"] #exon-chat-toggle:hover {
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.12), 0 0 22px rgba(184, 134, 11, 0.14);
}

html[data-theme="light"] #notification-panel {
    background: #fafafa !important;
    border-color: rgba(31, 23, 17, 0.12) !important;
    box-shadow: 0 20px 50px rgba(70, 43, 16, 0.14) !important;
}

html[data-theme="light"] #notification-panel h4 {
    color: #1f1711 !important;
}

html[data-theme="light"] #notification-panel .noti-item div[style*="color: #fff"],
html[data-theme="light"] #notification-panel div[style*="color: #fff"] {
    color: #1f1711 !important;
}

html[data-theme="light"] #notification-panel div[style*="rgba(255, 255, 255"],
html[data-theme="light"] .topbar-right div[style*="color: rgba(255"] {
    color: rgba(31, 23, 17, 0.55) !important;
}

html[data-theme="light"] .topbar-right div[style*="color: #fff"] {
    color: #1f1711 !important;
}

/* Library post cards */
html[data-theme="light"] .library-post-card,
html[data-theme="light"] .library-post-card:hover {
    background: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .library-post-card,
html[data-theme="dark"] .library-post-card:hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

html[data-theme="light"] .library-related-posts h2 {
    color: #000000 !important;
    font-weight: 400 !important;
}

html[data-theme="light"] .library-related-posts > p {
    color: rgba(31, 23, 17, 0.58) !important;
}
