/* 2026-10 görsel yenileme.
   Sayfa CSS'lerinden sonra yüklenir; eski dosyalardaki aynı seçicileri bilinçli olarak ezer.
   Tek "gösteriş" kenar çubuğundaki canlı kontur çizgileri; geri kalan her şey sakin. */

/* ---------- Tipografi ---------- */
html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    font-optical-sizing: auto;
}

h1, h2, h3, h4, h5, h6,
.page-title, .post-title, .post-date, .form-label, .form-control {
    font-family: var(--font-sans);
}

h1, h2, h3, h4, h5, h6, .page-title, .post-title {
    font-weight: 720;
    font-stretch: 112%;
    letter-spacing: -0.012em;
    text-wrap: balance;
}

code, pre, kbd, samp {
    font-family: var(--font-mono);
}

a {
    color: var(--link-color);
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--link-hover-color);
}

:focus-visible {
    outline: 2px solid var(--ore);
    outline-offset: 3px;
    border-radius: 4px;
}

::selection {
    background: color-mix(in srgb, var(--primary-color) 28%, transparent);
}

/* ---------- Kenar çubuğu: fotoğraf + kontur katmanı ---------- */
.sidebar {
    background-color: #0e1626;
}

.sidebar-overlay,
.mobile-header-overlay {
    background:
        linear-gradient(180deg, rgba(10, 18, 32, 0.28) 0%, rgba(10, 18, 32, 0.58) 52%, rgba(10, 18, 32, 0.88) 100%);
}

.contour-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.sidebar-profile-image {
    width: 156px;
    height: 156px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 0 7px rgba(226, 184, 78, 0.16), 0 22px 44px rgba(0, 0, 0, 0.38);
}

.sidebar-name {
    font-size: clamp(1.7rem, 2.3vw, 2.2rem);
    font-weight: 780;
    font-stretch: 122%;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-shadow: var(--text-shadow-base);
}

.sidebar-tagline {
    color: rgba(231, 236, 243, 0.86);
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 26ch;
    margin-inline: auto;
}

.sidebar .social-link {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.sidebar .social-link:hover {
    background: rgba(226, 184, 78, 0.18);
    border-color: rgba(226, 184, 78, 0.6);
    color: #ffffff;
}

.sidebar-nav-link {
    font-weight: 620;
    font-stretch: 108%;
    letter-spacing: 0.005em;
    color: rgba(255, 255, 255, 0.88);
}

.sidebar-nav-link:hover,
.sidebar-nav-link.active,
.sidebar-nav-link[aria-current="page"] {
    color: #ffffff;
}

.sidebar-nav-link::after {
    background: #e2b84e;
    height: 2px;
}

/* ---------- Tema düğmesi: gündüz/gece anahtarı ----------
   Gündüz: pirit güneş, açık gök. Gece: düğme kayar, güneş hilal aya döner, gökte yıldızlar belirir. */
.theme-toggle,
.dark-mode .theme-toggle {
    width: 62px;
    height: 34px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: transparent;
    box-shadow: 0 6px 18px rgba(14, 22, 38, 0.12);
    overflow: hidden;
    cursor: pointer;
}

.theme-toggle .light-icon,
.theme-toggle .dark-icon {
    display: none;
}

.theme-toggle__track {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, #cfe0ff 0%, #f4ead2 100%);
    transition: background 0.45s var(--ease-out);
}

.dark-mode .theme-toggle__track {
    background: linear-gradient(135deg, #0b1322 0%, #1c2c4a 100%);
}

.theme-toggle__stars {
    position: absolute;
    top: 8px;
    left: 12px;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 9px 9px 0 0 rgba(255, 255, 255, 0.8), 17px 2px 0 -0.5px rgba(255, 255, 255, 0.9), 4px 15px 0 -0.5px rgba(255, 255, 255, 0.7);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.4s ease, transform 0.45s var(--ease-out);
}

.dark-mode .theme-toggle__stars {
    opacity: 1;
    transform: none;
}

.theme-toggle__knob {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    background: radial-gradient(circle at 35% 35%, #ffe7a3 0%, #e2b84e 55%, #c79a2c 100%);
    box-shadow: 0 0 0 4px rgba(226, 184, 78, 0.22), 0 0 16px rgba(226, 184, 78, 0.55);
    transition: transform 0.5s var(--ease-out), background 0.45s ease, box-shadow 0.45s ease;
}

.dark-mode .theme-toggle__knob {
    transform: translateX(28px) rotate(-25deg);
    background: radial-gradient(circle at 40% 40%, #f5f7fb 0%, #d5dbe7 70%);
    box-shadow: 0 0 12px rgba(213, 219, 231, 0.35);
}

/* Hilal: ayın üzerine kayan gölge */
.theme-toggle__shade {
    position: absolute;
    top: -3px;
    left: 26px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #16243f;
    transition: left 0.5s var(--ease-out);
}

.dark-mode .theme-toggle__shade {
    left: 9px;
}

.theme-toggle:hover .theme-toggle__knob {
    box-shadow: 0 0 0 5px rgba(226, 184, 78, 0.28), 0 0 20px rgba(226, 184, 78, 0.65);
}

.dark-mode .theme-toggle:hover .theme-toggle__knob {
    box-shadow: 0 0 16px rgba(213, 219, 231, 0.5);
}

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

/* ---------- Sayfa başlıkları ---------- */
.page-header {
    text-align: left;
    max-width: var(--content-max-width);
    margin: 0 auto 2.5rem;
}

.page-title {
    font-size: clamp(2.1rem, 4.4vw, 3.2rem);
    font-weight: 780;
    font-stretch: 118%;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--text-color);
    margin-bottom: 0.9rem;
}

.page-divider {
    justify-content: flex-start;
    gap: 0;
}

.page-divider .divider-center,
.page-divider .divider-line + .divider-center + .divider-line {
    display: none;
}

.page-divider .divider-line,
.dark-mode .page-divider .divider-line {
    flex: 0 0 64px;
    width: 64px;
    height: 3px;
    border-radius: 2px;
    background: var(--ore);
    background-image: none;
}

/* ---------- Kartlar (blog listesi) ---------- */
.blog-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-m);
    box-shadow: none;
    transition: border-color 0.2s ease, transform 0.25s var(--ease-out);
}

.blog-card:hover {
    border-color: color-mix(in srgb, var(--primary-color) 55%, var(--border-color));
    box-shadow: var(--card-hover-shadow);
    transform: translateY(-2px);
}

.blog-card .post-title {
    font-size: 1.2rem;
    line-height: 1.25;
    color: var(--text-color);
}

.post-date {
    font-family: var(--font-sans);
    font-variant-numeric: tabular-nums;
    color: var(--secondary-color);
    letter-spacing: 0;
}

/* ---------- Makale sayfası ----------
   Başlık ara başlıklardan belirgin biçimde büyük; altında sayfa başlıklarındaki pirit çizgi. */
.blog-post .post-title {
    font-size: clamp(2rem, 4.2vw, 3rem);
    font-weight: 780;
    font-stretch: 116%;
    line-height: 1.04;
    letter-spacing: -0.02em;
    color: var(--text-color);
}

.blog-post .post-header-main::after {
    content: '';
    display: block;
    width: 64px;
    height: 3px;
    margin-top: 1rem;
    border-radius: 2px;
    background: var(--ore);
}

.blog-post .post-content {
    font-size: 1.0625rem;
    line-height: 1.75;
}

.blog-post .post-content h2 {
    font-size: clamp(1.35rem, 2.4vw, 1.6rem);
}

.blog-post .post-content h3 {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .blog-post .post-title {
        font-size: 1.95rem;
    }

    /* mobile-overflow-fix.css dolguyu .container, .blog-post ve .post-content'e ayrı ayrı veriyor;
       metin başlıktan içeride kalıyordu. Dolguyu dış kaplar taşır. */
    .blog-post .post-content {
        font-size: 1rem;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* ---------- Formlar ve iletişim ---------- */
.contact-form-wrapper,
.email-section .email-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-m);
    box-shadow: none;
}

.form-control {
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-s);
    color: var(--text-color);
    font-size: 1rem;
}

.form-control::placeholder {
    color: var(--secondary-color);
    opacity: 1;
}

.form-control:focus {
    background: var(--surface-2);
    color: var(--text-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 22%, transparent);
}

.recaptcha-container {
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Düğme her zaman görünür; doğrulama tamamlanana kadar devre dışıdır (pages/js/contact.js).
   contact.css #submitButton kimlik seçicisiyle yazıldığı için burada da aynı özgüllük kullanılır. */
#submitButton.neon-contact-btn,
.dark-mode #submitButton.neon-contact-btn {
    visibility: visible;
    opacity: 1;
    margin-left: auto;
    height: auto;
    padding: 0.8rem 1.7rem;
    border: 0;
    border-radius: var(--radius-s);
    background: var(--primary-color);
    color: #ffffff;
    font-weight: 650;
    font-stretch: 106%;
    box-shadow: none;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

#submitButton.neon-contact-btn .btn-text,
.dark-mode #submitButton.neon-contact-btn .btn-text {
    color: inherit;
}

#submitButton.neon-contact-btn:hover:not(:disabled),
.dark-mode #submitButton.neon-contact-btn:hover:not(:disabled) {
    background: var(--hover-neon);
    color: #ffffff;
    box-shadow: none;
    transform: none;
}

#submitButton.neon-contact-btn:disabled,
.dark-mode #submitButton.neon-contact-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.submit-hint {
    flex-basis: 100%;
    margin: 0;
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.submit-hint[hidden] {
    display: none;
}

@media (max-width: 768px) {
    .recaptcha-container {
        align-items: stretch;
    }

    #submitButton.neon-contact-btn {
        width: 100%;
        margin-left: 0;
    }
}

/* ---------- Mobil menü düğmesi: açıkken çarpıya döner ---------- */
.mobile-nav-toggle {
    width: 52px;
    height: 52px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    box-shadow: 0 10px 28px rgba(14, 22, 38, 0.22);
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.mobile-nav-toggle[aria-expanded="true"] {
    background: #0e1626;
    border-color: rgba(226, 184, 78, 0.6);
    color: #e2b84e;
}

.mobile-nav-icon,
.mobile-nav-icon::before,
.mobile-nav-icon::after {
    width: 22px;
    border-radius: 2px;
    background-color: currentColor;
    transition: transform 0.3s var(--ease-out), top 0.3s var(--ease-out), background-color 0.2s ease;
}

.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-icon {
    background-color: transparent;
}

.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

/* ---------- Alt bilgi ---------- */
.footer-divider {
    display: none;
}

.site-footer {
    border-top: 1px solid var(--border-color);
    background: transparent;
    color: var(--secondary-color);
    font-size: 0.875rem;
}

.site-footer .footer-link {
    color: var(--secondary-color);
}

.site-footer .footer-link:hover {
    color: var(--primary-color);
}

@media (prefers-reduced-motion: reduce) {
    .theme-toggle__track,
    .theme-toggle__stars,
    .theme-toggle__knob,
    .theme-toggle__shade,
    .blog-card,
    .neon-contact-btn,
    .sidebar .social-link,
    .mobile-nav-toggle,
    .mobile-nav-icon,
    .mobile-nav-icon::before,
    .mobile-nav-icon::after {
        transition: none;
    }

    .blog-card:hover {
        transform: none;
    }
}
