/* ==========================================================================
   Design tokens — Minimal Editorial
   Warm paper background, ink typography, a single terracotta accent.
   Light is the primary theme; [data-theme="dark"] is an optional overlay.
   ========================================================================== */
:root {
    --bg-color: #faf7f1;
    --card-bg: #ffffff;
    --card-bg-soft: #f4efe6;
    --card-border: rgba(32, 28, 21, 0.11);
    --card-border-strong: rgba(32, 28, 21, 0.2);
    --text-main: #201c15;
    --text-muted: #6f6a5c;
    --accent: #b1481f;
    --accent-dim: rgba(177, 72, 31, 0.08);
    --accent-border: rgba(177, 72, 31, 0.28);
    --on-accent: #fdf6ee;
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-main: 'Inter', -apple-system, sans-serif;
    --card-radius: 18px;
    --shadow-card: 0 1px 2px rgba(32, 24, 12, 0.04), 0 12px 28px -16px rgba(32, 24, 12, 0.18);

    --surface-02: rgba(20, 16, 8, 0.025);
    --surface-03: rgba(20, 16, 8, 0.035);
    --surface-06: rgba(20, 16, 8, 0.05);
    --surface-08: rgba(20, 16, 8, 0.065);
    --surface-10: rgba(20, 16, 8, 0.08);
    --surface-12: rgba(20, 16, 8, 0.1);
    --surface-16: rgba(20, 16, 8, 0.14);

    color-scheme: light;
}

[data-theme="dark"] {
    --bg-color: #15130f;
    --card-bg: #1c1913;
    --card-bg-soft: #211d16;
    --card-border: rgba(250, 247, 241, 0.09);
    --card-border-strong: rgba(250, 247, 241, 0.16);
    --text-main: #f6f2e9;
    --text-muted: #a49c8a;
    --accent: #e07a45;
    --accent-dim: rgba(224, 122, 69, 0.14);
    --accent-border: rgba(224, 122, 69, 0.32);
    --on-accent: #1c1109;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 32px -18px rgba(0, 0, 0, 0.55);

    --surface-02: rgba(255, 255, 255, 0.025);
    --surface-03: rgba(255, 255, 255, 0.035);
    --surface-06: rgba(255, 255, 255, 0.05);
    --surface-08: rgba(255, 255, 255, 0.06);
    --surface-10: rgba(255, 255, 255, 0.08);
    --surface-12: rgba(255, 255, 255, 0.1);
    --surface-16: rgba(255, 255, 255, 0.14);

    color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; color: var(--text-main); }
h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
p { color: var(--text-muted); font-size: 1rem; line-height: 1.65; }
a { color: inherit; }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 2rem; }

/* ============================================================
   Site header / nav (public pages)
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--bg-color) 88%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
}
.site-header-inner {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 1.15rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}
.site-logo {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
    text-decoration: none;
    color: var(--text-main);
    white-space: nowrap;
}
.site-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    justify-content: center;
}
.site-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 500;
    padding: 0.3rem 0;
    border-bottom: 1px solid transparent;
    transition: color 0.25s ease, border-color 0.25s ease;
}
.site-nav a:hover, .site-nav a.active { color: var(--text-main); border-color: var(--accent); }

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.4s ease, color 0.4s ease;
}
.theme-toggle:hover { transform: translateY(-1px) rotate(12deg); border-color: var(--card-border-strong); }

.theme-toggle-standalone {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 500;
    box-shadow: var(--shadow-card);
}

@media (max-width: 720px) {
    .site-nav { display: none; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 4.5rem 2rem 5rem;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3.5rem;
    align-items: center;
}
.badge {
    display: inline-flex;
    background: var(--accent-dim); color: var(--accent);
    padding: 0.4rem 0.9rem; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
    width: fit-content; margin-bottom: 1.5rem; border: 1px solid var(--accent-border);
}
.hero h1 {
    font-size: clamp(2.4rem, 4.4vw, 3.6rem);
    line-height: 1.08;
    margin-bottom: 1.4rem;
}
.hero h1 em { color: var(--accent); font-style: italic; font-weight: 500; }
.hero-bio { font-size: 1.1rem; max-width: 46ch; margin-bottom: 2.2rem; }

.hero-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.2rem; }

.hero-social { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.hero-social a {
    display: inline-flex; align-items: center; gap: 0.5rem;
    text-decoration: none; color: var(--text-muted); font-size: 0.9rem; font-weight: 500;
    transition: color 0.25s ease;
}
.hero-social a:hover { color: var(--accent); }
.hero-social i { font-size: 1.15rem; }

.hero-visual { display: flex; justify-content: center; }
.hero-photo-frame {
    position: relative;
    width: min(280px, 80vw);
    aspect-ratio: 1 / 1.08;
}
.hero-photo-frame::before {
    content: '';
    position: absolute;
    inset: 18px -18px -18px 18px;
    background: var(--accent);
    border-radius: 22px;
    opacity: 0.9;
}
.hero-photo {
    position: relative;
    width: 100%; height: 100%;
    border-radius: 22px;
    background: var(--card-bg-soft);
    border: 1px solid var(--card-border);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-card);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo span {
    font-family: var(--font-display);
    font-size: 3rem; font-weight: 500; color: var(--text-main);
}

@media (max-width: 860px) {
    .hero { grid-template-columns: 1fr; padding-top: 3rem; text-align: left; }
    .hero-visual { order: -1; margin-bottom: 1rem; }
    .hero-photo-frame { width: min(220px, 60vw); }
}

/* ============================================================
   Entrance animation (hero on load) + scroll reveal (everything else)
   ============================================================ */
@keyframes rise-in {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero-text > * {
    opacity: 0;
    animation: rise-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-text > *:nth-child(1) { animation-delay: 0.05s; }
.hero-text > *:nth-child(2) { animation-delay: 0.16s; }
.hero-text > *:nth-child(3) { animation-delay: 0.27s; }
.hero-text > *:nth-child(4) { animation-delay: 0.38s; }
.hero-text > *:nth-child(5) { animation-delay: 0.49s; }
.hero-visual {
    opacity: 0;
    animation: rise-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.3s;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

.reveal-stagger > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger > *:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger > *:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger > *:nth-child(6) { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
    .hero-text > *, .hero-visual, .reveal {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        transition: none !important;
    }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    background: var(--accent); color: var(--on-accent);
    border: 1px solid var(--accent);
    border-radius: 999px;
    padding: 0.8rem 1.6rem;
    font-family: var(--font-main); font-size: 0.92rem; font-weight: 600;
    text-decoration: none; white-space: nowrap; cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.btn-primary:hover { transform: translateY(-2px); opacity: 0.92; }

.btn-outline {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    background: transparent; color: var(--text-main);
    border: 1px solid var(--card-border-strong);
    border-radius: 999px;
    padding: 0.8rem 1.6rem;
    font-family: var(--font-main); font-size: 0.92rem; font-weight: 600;
    text-decoration: none; white-space: nowrap; cursor: pointer;
    transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.2s ease;
}
.btn-outline:hover { border-color: var(--text-main); transform: translateY(-2px); }

.btn-icon { font-size: 1.1rem; }
.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ============================================================
   Section scaffolding
   ============================================================ */
.section {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 3.5rem 2rem;
    border-top: 1px solid var(--card-border);
    /* So a #hakkinda / #projeler / #referanslar link doesn't land the
       section heading right underneath the sticky header. */
    scroll-margin-top: 88px;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.25rem;
}
.section-eyebrow {
    display: block;
    font-size: 0.78rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 0.6rem;
}
.section-header h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.section-lead { max-width: 62ch; font-size: 1.05rem; margin-bottom: 2rem; }
.section-link {
    display: inline-flex; align-items: center; gap: 0.4rem;
    text-decoration: none; color: var(--text-main); font-weight: 600; font-size: 0.9rem;
    border-bottom: 1px solid var(--card-border-strong);
    padding-bottom: 0.2rem;
    transition: color 0.25s ease, border-color 0.25s ease, gap 0.25s ease;
}
.section-link:hover { color: var(--accent); border-color: var(--accent); gap: 0.6rem; }

/* Skills */
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 3rem; }
.skill-item { width: 100%; }
.skill-info { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 0.5rem; font-weight: 500; }
.skill-info span:last-child { color: var(--text-muted); font-weight: 400; }
.progress-bg { width: 100%; height: 3px; background: var(--surface-10); }
.progress-bar { height: 100%; background: var(--accent); width: 0%; transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1); }

@media (max-width: 640px) {
    .skills-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Projects grid (shared: home "latest" + projeler.php full list)
   ============================================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}
.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    padding: 1.75rem;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover { transform: translateY(-3px); border-color: var(--card-border-strong); box-shadow: var(--shadow-card); }
.project-card-icon {
    width: 48px; height: 48px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--accent-dim);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.project-card-thumb {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1.25rem;
}
.project-card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.project-card p { flex: 1; margin-bottom: 1.1rem; font-size: 0.92rem; }
.project-card-link {
    display: inline-flex; align-items: center; gap: 0.35rem;
    font-size: 0.85rem; font-weight: 600; color: var(--text-muted);
    transition: color 0.3s ease, gap 0.3s ease;
}
.project-card:hover .project-card-link { color: var(--accent); gap: 0.55rem; }

/* ============================================================
   References strip
   ============================================================ */
.logos-marquee {
    position: relative;
    width: 100%;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.logos-track {
    display: flex;
    align-items: center;
    gap: 16px;
    width: max-content;
    animation: logos-scroll 22s linear infinite;
}
.logos-marquee:hover .logos-track { animation-play-state: paused; }

/* Used instead of the marquee when there are only a few references — with
   just 1-3 logos, a duplicated scrolling track is far narrower than the
   section and mostly shows blank space as it loops. A plain wrapping row
   only ever shows real logos. */
.logos-static {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.page-container.references-page { max-width: 1480px; }
.references-hero {
    position: relative;
    min-height: 245px;
    margin: 1.25rem 0 2rem;
    padding: clamp(2rem, 4vw, 3.25rem);
    border-radius: 30px;
    background: var(--text-main);
    color: var(--bg-color);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 3rem;
}
.references-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 84% 18%, color-mix(in srgb, var(--accent) 48%, transparent), transparent 34%);
    pointer-events: none;
}
.references-hero-copy { position: relative; z-index: 1; max-width: 690px; }
.references-hero .section-eyebrow { color: color-mix(in srgb, var(--accent) 70%, white); }
.references-hero h1 {
    color: inherit;
    font-size: clamp(2.4rem, 4.5vw, 3.8rem);
    line-height: 0.98;
    max-width: 720px;
    margin-bottom: 1.35rem;
}
.references-hero p { color: color-mix(in srgb, var(--bg-color) 72%, transparent); max-width: 58ch; font-size: 1.04rem; }
.references-hero-stat {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    flex: 0 0 auto;
    padding-bottom: 0.3rem;
}
.references-hero-stat strong {
    color: var(--accent);
    font-family: var(--font-display);
    font-size: clamp(4rem, 8vw, 6.5rem);
    font-weight: 500;
    line-height: 0.75;
}
.references-hero-stat span {
    color: color-mix(in srgb, var(--bg-color) 70%, transparent);
    font-size: 0.78rem;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0.09em;
}
.references-hero-orbit {
    position: absolute;
    width: 230px;
    height: 230px;
    right: -75px;
    top: -105px;
    border: 1px solid color-mix(in srgb, var(--bg-color) 16%, transparent);
    border-radius: 50%;
}
.references-grid {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 18px;
}
.reference-card {
    grid-column: span 2;
    min-width: 0;
    min-height: 270px;
    padding: 1.15rem;
    border: 1px solid var(--card-border);
    border-radius: 22px;
    background: var(--card-bg);
    color: var(--text-main);
    font: inherit;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    text-decoration: none;
}
.reference-card:hover,
.reference-card:focus,
.reference-card:visited { text-decoration: none; }
.reference-card * { text-decoration: none; }
.reference-card:nth-child(6) { grid-column: 2 / span 2; }
.reference-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-border);
    box-shadow: var(--shadow-card);
}
.reference-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.reference-card-meta span:first-child { color: var(--accent); font-family: var(--font-display); font-size: 0.95rem; }
.reference-card-logo {
    height: 104px;
    width: 100%;
    padding: 1.25rem;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(32, 28, 21, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.reference-card-logo img {
    max-width: 100%;
    width: auto;
    object-fit: contain;
    filter: grayscale(1);
    opacity: 0.82;
    mix-blend-mode: multiply;
    transition: filter 0.25s ease, opacity 0.25s ease;
}
.reference-card:hover .reference-card-logo img { filter: grayscale(0); opacity: 1; }
.reference-card-logo i { color: var(--accent); font-size: 2rem; }
.reference-card-content { display: flex; flex: 1; flex-direction: column; align-items: flex-start; }
.reference-card-content strong { font-family: var(--font-display); font-size: 1.14rem; font-weight: 600; }
.reference-card-content > span:not(.reference-card-action) { color: var(--text-muted); font-size: 0.88rem; line-height: 1.5; margin-top: 0.45rem; }
.reference-card-action { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: auto; padding-top: 1rem; color: var(--accent); font-size: 0.83rem; font-weight: 600; }
.reference-card-action i { transition: transform 0.25s ease; }
.reference-card:hover .reference-card-action i { transform: translate(2px, -2px); }
@media (max-width: 1100px) {
    .references-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .reference-card, .reference-card:nth-child(6) { grid-column: span 1; }
}
@media (max-width: 800px) {
    .references-hero { min-height: 280px; align-items: flex-start; flex-direction: column; gap: 2rem; }
    .references-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .references-hero { min-height: 360px; padding: 2rem 1.5rem; border-radius: 22px; }
    .references-hero h1 { font-size: 2.65rem; }
    .references-grid { grid-template-columns: 1fr; }
    .reference-card { min-height: 280px; }
}

.brand-logo {
    flex: 0 0 auto;
    min-width: 150px;
    height: 92px;
    /* Always a fixed light chip, independent of the site theme: most logo
       assets are exported on a white (or transparent) canvas, and pairing
       that with mix-blend-mode: multiply below is what lets a logo's own
       white background disappear into the chip instead of showing as a
       visible box — that trick only works against a white backdrop. */
    background: #ffffff;
    border: 1px solid rgba(32, 28, 21, 0.1);
    border-radius: 12px;
    display: flex; justify-content: center; align-items: center; font-size: 1.9rem;
    padding: 14px 26px;
    color: #8f8a7c;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.brand-logo:hover { transform: translateY(-2px); border-color: rgba(32, 28, 21, 0.2); box-shadow: var(--shadow-card); }
button.brand-logo { font: inherit; }
.brand-logo:hover i { color: var(--accent); }
.brand-logo i { transition: color 0.3s ease; }
.brand-logo img {
    /* Fixed height instead of "fit the box" — a square icon-mark logo and a
       wide wordmark logo end up the same visual weight this way, instead of
       one looking oversized and the other tiny once contain scales each to
       a different fraction of a shared box. */
    height: 46px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
    -webkit-user-drag: none;
    filter: grayscale(1);
    opacity: 0.85;
    mix-blend-mode: multiply;
    transition: filter 0.3s ease, opacity 0.3s ease;
}
.brand-logo:hover img { filter: grayscale(0); opacity: 1; }

@keyframes logos-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .logos-track { animation: none; }
}

/* ============================================================
   CTA banner
   ============================================================ */
.cta-banner {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 3.5rem 2rem 4rem;
}
.cta-banner-inner {
    background: var(--text-main);
    color: var(--bg-color);
    border-radius: 28px;
    padding: 3.5rem 3rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
[data-theme="dark"] .cta-banner-inner {
    background: var(--card-bg-soft);
    border: 1px solid var(--card-border);
    color: var(--text-main);
}
[data-theme="dark"] .cta-banner-inner h2 { color: var(--text-main); }
.cta-banner-inner h2 { color: inherit; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta-banner-inner p { color: color-mix(in srgb, var(--bg-color) 65%, var(--text-muted)); margin-bottom: 0.5rem; }
[data-theme="dark"] .cta-banner-inner p { color: var(--text-muted); }
.cta-banner-inner .btn-primary { margin-top: 0.5rem; }

/* ============================================================
   FAQ
   ============================================================ */
.faq-section { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 2rem 4rem; }
.faq-section .section-eyebrow { margin-bottom: 0.4rem; }
.faq-section > h2 { font-size: 1.4rem; margin-bottom: 1.5rem; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 1.1rem 1.4rem;
}
.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-caret { color: var(--text-muted); transition: transform 0.25s ease; flex-shrink: 0; }
.faq-item[open] .faq-caret { transform: rotate(180deg); }
.faq-item p { margin-top: 0.75rem; }

/* ============================================================
   Site footer
   ============================================================ */
.site-footer { width: 100%; border-top: 1px solid var(--card-border); }
.site-footer-inner {
    width: 100%; max-width: 1120px; margin: 0 auto; padding: 2rem 2rem;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
    color: var(--text-muted); font-size: 0.88rem;
}
.site-footer-links { display: flex; gap: 1.5rem; }
.site-footer-links a { text-decoration: none; color: var(--text-muted); transition: color 0.25s ease; }
.site-footer-links a:hover { color: var(--accent); }

/* legacy footer (kept for any page still using a bare <footer>) */
footer:not(.site-footer) { width: 100%; max-width: 1120px; margin: 3rem auto 0; padding: 1.5rem 2rem; text-align: center; border-top: 1px solid var(--card-border); color: var(--text-muted); font-size: 0.9rem; }

/* ============================================================
   Modal
   ============================================================ */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(20, 16, 10, 0.55); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: center;
    z-index: 10000; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; padding: 1.5rem;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-content {
    background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--card-radius);
    padding: 2.5rem; width: 100%; max-width: 400px; position: relative; transform: translateY(30px); transition: transform 0.3s ease; text-align: center;
}
.modal-overlay.active .modal-content { transform: translateY(0); }
.modal-close {
    position: absolute; top: 15px; right: 15px; background: transparent; border: none;
    color: var(--text-muted); font-size: 1.5rem; cursor: pointer; transition: color 0.3s;
}
.modal-close:hover { color: var(--accent); }
.modal-content h2 { margin-bottom: 10px; font-size: 1.5rem; }
.modal-content p { color: var(--text-muted); margin-bottom: 20px; font-size: 0.95rem; }
.modal-btn {
    display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--on-accent);
    padding: 10px 20px; border-radius: 30px; text-decoration: none; font-weight: 600; transition: transform 0.2s;
}
.modal-btn:hover { transform: translateY(-2px); }

/* ============================================================
   Error pages (403 / 404 / 500)
   ============================================================ */
.error-page-wrapper {
    position: relative;
    display: flex;
    min-height: 100vh;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.empty-container {
    display: flex;
    min-width: 0;
    flex: 1;
    max-width: 560px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    border-radius: 28px;
    border: 1px solid var(--card-border);
    padding: 4rem 2.5rem;
    text-align: center;
    background-color: var(--card-bg);
    box-shadow: var(--shadow-card);
}
.empty-header { display: flex; max-width: 400px; flex-direction: column; align-items: center; gap: 0.75rem; text-align: center; }
.empty-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-style: italic;
    font-size: 6.5rem;
    line-height: 1;
    color: var(--accent);
}
.empty-description { color: var(--text-muted); font-size: 1.05rem; line-height: 1.6; }
.empty-content { display: flex; width: 100%; max-width: 400px; min-width: 0; flex-direction: column; align-items: center; gap: 1rem; margin-top: 1rem; }

@media (max-width: 600px) { .empty-title { font-size: 4.5rem; } }

/* ============================================================
   Content pages (projeler.php, proje.php, iletisim.php)
   ============================================================ */
.page-container { width: 100%; max-width: 900px; margin: 0 auto; padding: 3.5rem 2rem 5rem; }
.page-container-narrow { max-width: 640px; }

.page-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 2.5rem;
    transition: color 0.3s ease;
}
.page-back:hover { color: var(--accent); }

.page-header { margin-bottom: 2.5rem; }
.page-header h1 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); margin-bottom: 0.6rem; }
.page-header p { color: var(--text-muted); font-size: 1.05rem; }

/* Project detail */
.project-detail {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    padding: 3rem;
    box-shadow: var(--shadow-card);
}
.project-detail-icon {
    width: 60px; height: 60px;
    flex-shrink: 0;
    border-radius: 16px;
    background: var(--accent-dim);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.project-detail h1 { font-size: 1.9rem; margin-bottom: 0.4rem; }
.project-detail-summary { color: var(--text-muted); font-size: 1.05rem; display: block; margin-bottom: 1.5rem; }
.project-detail-image { width: 100%; max-height: 380px; object-fit: cover; border-radius: 14px; margin-bottom: 1.5rem; }
.project-detail-body p { margin-bottom: 1rem; line-height: 1.75; }
.project-detail-body p:last-child { margin-bottom: 0; }
.project-detail-cta { margin-top: 2rem; width: fit-content; }

/* ============================================================
   Forms (contact page + admin + login) shared
   ============================================================ */
.form-group { margin-bottom: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--text-main); }
.form-input {
    width: 100%;
    background: var(--card-bg-soft);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: border-color 0.3s ease, background-color 0.4s ease, color 0.4s ease;
}
.form-input:focus { outline: none; border-color: var(--accent); }
.form-textarea { resize: vertical; min-height: 120px; }
.form-hint { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 0.4rem; }

.btn-submit {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: var(--accent); color: var(--on-accent);
    border: none; border-radius: 999px;
    padding: 0.85rem 1.75rem;
    font-family: var(--font-main); font-size: 0.95rem; font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.btn-submit:hover { transform: translateY(-2px); opacity: 0.92; }

.btn-danger { color: #b3261e; border-color: rgba(179, 38, 30, 0.35); }
.btn-danger:hover { background: rgba(179, 38, 30, 0.08); }

.alert { border-radius: 12px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; font-size: 0.9rem; }
.alert ul { padding-left: 1.2rem; margin: 0; }
.alert-error { background: rgba(179, 38, 30, 0.07); border: 1px solid rgba(179, 38, 30, 0.25); color: #b3261e; }
.alert-success { background: var(--accent-dim); border: 1px solid var(--accent-border); color: var(--accent); }

.contact-form {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-card);
}
.contact-success {
    text-align: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    padding: 3rem 2rem;
    box-shadow: var(--shadow-card);
}
.contact-success i { font-size: 3rem; color: var(--accent); margin-bottom: 1rem; }
.contact-success h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.contact-success p { margin-bottom: 1.5rem; }

/* ============================================================
   Admin login
   ============================================================ */
.login-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}
.login-card {
    width: 100%;
    max-width: 380px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-card);
    text-align: center;
}
.login-icon {
    width: 56px; height: 56px; margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: var(--accent-dim); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
}
.login-card h1 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.login-sub { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.9rem; }
.login-card .form-group { text-align: left; }
.login-submit { width: 100%; justify-content: center; margin-top: 0.5rem; }
.login-back { display: block; margin-top: 1.25rem; color: var(--text-muted); text-decoration: none; font-size: 0.85rem; }
.login-back:hover { color: var(--accent); }

/* ============================================================
   Admin panel layout
   ============================================================ */
.admin-shell { width: 100%; padding: 2.5rem 2rem; display: flex; justify-content: center; }
.admin-layout {
    width: 100%;
    max-width: 1280px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    align-items: start;
}
.admin-sidebar {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    padding: 1.5rem 1rem;
    box-shadow: var(--shadow-card);
    position: sticky;
    top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.admin-brand {
    display: flex; align-items: center; gap: 0.5rem;
    font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; padding: 0 0.5rem;
    color: var(--text-main);
}
.admin-nav { display: flex; flex-direction: column; gap: 0.25rem; }
.admin-nav-link {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.7rem 0.75rem;
    border-radius: 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.admin-nav-link:hover { background: var(--surface-06); color: var(--text-main); }
.admin-nav-link.active { background: var(--accent-dim); color: var(--accent); }

/* the logout link is a <button> inside a <form> now (CSRF-protected POST) */
button.admin-logout {
    width: 100%;
    background: none;
    border: none;
    font-family: var(--font-main);
    text-align: left;
    cursor: pointer;
}
.admin-logout { color: var(--text-muted); border-top: 1px solid var(--card-border); padding-top: 1rem; margin-top: 0.25rem; border-radius: 0 0 10px 10px; }
.admin-logout:hover { color: #b3261e; background: none; }
.badge-count {
    margin-left: auto;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 10px;
    padding: 0.1rem 0.5rem;
}
.admin-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    padding: 2rem;
    box-shadow: var(--shadow-card);
    min-height: 400px;
}
.admin-content-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.admin-content-header h1 { font-size: 1.4rem; }
.admin-content-actions { margin-bottom: 1.5rem; }
.admin-section-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; margin: 2rem 0 1rem; color: var(--text-main); }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}
.stat-card {
    background: var(--card-bg-soft);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.stat-card i { font-size: 1.4rem; color: var(--text-muted); }
.stat-card-accent i { color: var(--accent); }
.stat-value { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); }

.quick-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.quick-link-card {
    display: flex; align-items: center; gap: 0.75rem;
    background: var(--card-bg-soft);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 1.1rem;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.9rem; font-weight: 500;
    transition: border-color 0.3s ease, transform 0.3s ease;
}
.quick-link-card i { color: var(--accent); font-size: 1.3rem; }
.quick-link-card:hover { border-color: var(--card-border-strong); transform: translateY(-2px); }

.admin-table-wrapper { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th, .admin-table td { text-align: left; padding: 0.85rem 0.75rem; border-bottom: 1px solid var(--card-border); }
.admin-table th { color: var(--text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
.admin-table-actions { display: flex; gap: 0.5rem; white-space: nowrap; }
.admin-table-actions form { display: inline; }

.admin-form { max-width: 720px; }
.admin-form-narrow { max-width: 420px; }

.photo-edit-row { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.photo-preview {
    width: 72px; height: 72px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--card-bg-soft);
    border: 1px solid var(--card-border);
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; color: var(--text-main);
    flex-shrink: 0;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview-rect { width: 160px; height: 100px; border-radius: 12px; margin-bottom: 0.75rem; }
/* Reference logo live preview + size slider (admin/reference-edit.php) —
   reuses the real .brand-logo chip so what the admin sees is pixel-for-pixel
   what the public site will render. */
.logo-scale-preview { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.logo-scale-control { flex: 1; min-width: 220px; }
.form-range {
    width: 100%;
    accent-color: var(--accent);
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.table-logo-preview {
    width: 28px; height: 28px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 6px;
    border-radius: 4px;
}
.remove-photo-check {
    display: flex; align-items: center; gap: 0.4rem;
    margin-top: 0.6rem;
    font-size: 0.8rem; color: var(--text-muted);
    cursor: pointer;
}

.messages-list { display: flex; flex-direction: column; gap: 1rem; }
.message-card {
    background: var(--card-bg-soft);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
}
.message-card.message-unread { border-color: var(--accent-border); }
.message-card-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.5rem; font-size: 0.9rem; }
.message-card-header a { color: var(--text-muted); }
.message-date { color: var(--text-muted); font-size: 0.8rem; }
.message-subject { font-weight: 600; margin-bottom: 0.5rem; color: var(--text-main); }
.message-body { margin-bottom: 1rem; }
.message-actions { display: flex; gap: 0.5rem; }
.message-actions form { display: inline; }

/* Admin inbox (real mailbox, via IMAP) */
.mail-card { display: block; text-decoration: none; color: inherit; transition: border-color 0.2s ease; }
.mail-card:hover { border-color: var(--card-border-strong); }
.mail-detail { margin-bottom: 2rem; }
.mail-detail h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.mail-detail-meta { display: flex; gap: 1rem; flex-wrap: wrap; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.25rem; }
.mail-body-frame {
    width: 100%;
    min-height: 420px;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background: #ffffff;
}
.mail-body-text {
    background: var(--card-bg-soft);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    white-space: pre-wrap;
    line-height: 1.6;
}
.mail-reply { border-top: 1px solid var(--card-border); padding-top: 1.5rem; }

/* Stats page */
.chart-card {
    background: var(--card-bg-soft);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 1.5rem 1.25rem 1rem;
    margin-bottom: 2rem;
}
.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 140px;
}
.chart-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    gap: 0.5rem;
}
.chart-bar-fill {
    width: 100%;
    max-width: 28px;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}
.chart-bar:hover .chart-bar-fill { opacity: 1; }
.chart-bar-label { font-size: 0.7rem; color: var(--text-muted); }

.stats-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.top-pages-list { display: flex; flex-direction: column; gap: 0.9rem; }
.top-page-row { display: grid; grid-template-columns: 1fr 2fr auto; align-items: center; gap: 0.75rem; }
.top-page-path { font-size: 0.85rem; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-page-bar-bg { height: 6px; background: var(--surface-10); border-radius: 10px; overflow: hidden; }
.top-page-bar { height: 100%; background: var(--accent); border-radius: 10px; }
.top-page-count { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; text-align: right; }

.login-log-list { display: flex; flex-direction: column; gap: 0.75rem; }
.login-log-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    padding: 0.6rem 0.8rem;
    background: var(--card-bg-soft);
    border: 1px solid var(--card-border);
    border-radius: 10px;
}
.login-badge {
    width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem;
}
.login-badge-success { background: var(--accent-dim); color: var(--accent); }
.login-badge-fail { background: rgba(179, 38, 30, 0.1); color: #b3261e; }
.login-log-user { font-weight: 600; }
.login-log-ip, .login-log-date { color: var(--text-muted); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
    .stats-columns { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { position: static; }
    .admin-nav { flex-direction: row; flex-wrap: wrap; }
    .admin-nav-link, button.admin-logout { width: auto; }
    .admin-logout { border-top: none; margin-top: 0; }
    .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .wrap, .hero, .section, .cta-banner, .faq-section, .page-container, .site-header-inner, .site-footer-inner { padding-left: 1.25rem; padding-right: 1.25rem; }
    .project-detail { padding: 2rem 1.5rem; }
    .contact-form { padding: 1.75rem 1.25rem; }
    .login-card { padding: 2rem 1.5rem; }
    .admin-shell { padding: 1.5rem 1rem; }
    .admin-content { padding: 1.5rem 1.25rem; }
    .admin-content-header { flex-direction: column; align-items: flex-start; }
    .login-log-row { grid-template-columns: auto 1fr auto; }
    .login-log-date { display: none; }
    .cta-banner-inner { padding: 2.5rem 1.75rem; }
}
