:root {
    --bg: #f7f6f2;
    --paper: #ffffff;
    --ink: #34322f;
    --muted: #79746c;
    --dark: #1f1e1b;
    --accent: #b87450;
    --accent-dark: #7b4a32;
    --line: rgba(31, 30, 27, .12);
    --shadow: 0 18px 60px rgba(20, 18, 15, .08);
    --radius: 18px;
    --font-scale: .94;
    --card-alpha: .82;
    --max-width: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", "Noto Sans JP", sans-serif;
    font-size: calc(15px * var(--font-scale));
    line-height: 1.62;
    font-weight: 390;
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at top right, rgba(184,116,80,.10), transparent 32vw), radial-gradient(circle at bottom left, rgba(31,30,27,.055), transparent 34vw);
    z-index: -1;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
p { color: var(--muted); }
strong { font-weight: 620; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    width: min(100%, var(--max-width));
    margin: 0 auto;
    padding: 16px clamp(18px, 4vw, 42px);
    background: color-mix(in srgb, var(--bg) 84%, transparent);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}
.brand {
    display: inline-flex;
    gap: 14px;
    align-items: center;
    min-width: 0;
}
.brand-mark {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: calc(var(--radius) * .72);
    display: grid;
    place-items: center;
    background: var(--dark);
    color: #fff;
    font-size: 14px;
    font-weight: 620;
    line-height: 1;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.brand-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    line-height: 1.08;
}
.brand-title {
    color: var(--ink);
    font-family: Georgia, "Times New Roman", "Noto Serif", serif;
    font-size: clamp(22px, 2.65vw, 34px);
    font-weight: 500;
    letter-spacing: -.045em;
    white-space: nowrap;
}
.brand-subtitle {
    margin-top: 6px;
    color: var(--muted);
    font-size: clamp(12px, 1.05vw, 15px);
    font-weight: 390;
    letter-spacing: -.012em;
    white-space: nowrap;
}
.site-nav { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a, .admin-nav a {
    padding: 8px 11px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}
.site-nav a:hover, .site-nav a.active, .admin-nav a:hover, .admin-nav a.active { background: rgba(31,30,27,.06); color: var(--ink); }
.site-nav .nav-cta { background: var(--dark); color: #fff; }
.language-switcher {
    display: flex;
    gap: 2px;
    padding-left: 8px;
    margin-left: 4px;
    border-left: 1px solid var(--line);
    max-width: 380px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.language-switcher .lang-link { font-size: 11.5px; padding: 5px 7px; }
.language-switcher .lang-link.active { color: var(--accent-dark); background: rgba(184,116,80,.12); }
.nav-toggle { display: none; }
main { min-height: 70vh; }

.hero, .section, .page-hero, .project-hero-detail, .project-process, .project-nav-bottom, .site-footer {
    width: min(100%, var(--max-width));
    margin-inline: auto;
}
.hero {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(320px, 1.08fr);
    gap: clamp(28px, 5vw, 72px);
    align-items: center;
    padding: clamp(48px, 8vw, 104px) clamp(18px, 4vw, 42px) clamp(36px, 6vw, 76px);
}
.hero-copy h1, .page-hero h1, .project-hero-detail h1 {
    font-size: clamp(30px, 4.8vw, 58px);
    line-height: 1.04;
    letter-spacing: -.052em;
    margin: 12px 0 18px;
    font-weight: 520;
    color: var(--ink);
}
.hero-copy p, .page-hero p, .project-hero-detail p {
    color: var(--muted);
    font-size: clamp(14px, 1.25vw, 17px);
    max-width: 700px;
}
.eyebrow {
    display: inline-flex;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--accent-dark);
    font-weight: 610;
    font-size: 11px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn {
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 9px 16px;
    font-weight: 560;
    cursor: pointer;
    min-height: 40px;
    font-size: 13.5px;
}
.btn.primary { background: var(--dark); color: #fff; }
.btn.ghost { background: rgba(31,30,27,.065); color: var(--ink); }
.btn.light { background: #fff; color: var(--ink); }
.hero-visual {
    min-height: clamp(340px, 44vw, 540px);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, #fff), #f8f5ee);
    position: relative;
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; min-height: clamp(340px, 44vw, 540px); }
.hero-placeholder {
    height: 100%;
    min-height: clamp(340px, 44vw, 540px);
    padding: clamp(26px, 5vw, 44px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(135deg, rgba(0,0,0,.035), rgba(255,255,255,.25)), repeating-linear-gradient(45deg, rgba(0,0,0,.035) 0 1px, transparent 1px 22px);
}
.hero-placeholder span { font-size: 15px; color: var(--muted); }
.hero-placeholder strong { font-size: clamp(36px, 6vw, 64px); line-height: .9; letter-spacing: -.08em; font-weight: 520; }
.hero-placeholder em { color: var(--accent-dark); font-style: normal; font-weight: 560; }
.section, .page-hero, .project-process, .project-nav-bottom {
    padding: clamp(42px, 6vw, 78px) clamp(18px, 4vw, 42px);
}
.page-hero.compact { padding-bottom: 24px; }
.split-intro {
    display: grid;
    grid-template-columns: .82fr 1.18fr;
    gap: clamp(24px, 4vw, 52px);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.split-intro h2, .section-head h2, .cta-band h2, .theme-preview h2 {
    font-size: clamp(24px, 3.2vw, 40px);
    line-height: 1.08;
    letter-spacing: -.04em;
    margin: 9px 0 0;
    font-weight: 500;
}
.split-intro p { color: var(--muted); font-size: 15px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.text-link { color: var(--accent-dark); font-weight: 560; }

.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.2vw, 26px); }
.project-grid.large { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.project-card {
    background: color-mix(in srgb, var(--paper) calc(var(--card-alpha) * 100%), transparent);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(31,30,27,.18); }
.project-image { aspect-ratio: 4 / 3; background: color-mix(in srgb, var(--muted) 18%, #fff); display: grid; place-items: center; color: var(--muted); font-weight: 520; overflow: hidden; }
.project-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.project-card:hover .project-image img { transform: scale(1.025); }
.project-card-body { padding: 16px 16px 18px; }
.project-card-body p { margin: 0 0 5px; color: var(--accent-dark); font-size: 11px; text-transform: uppercase; letter-spacing: .095em; font-weight: 560; }
.project-card-body h3 { margin: 0 0 7px; font-size: 18px; letter-spacing: -.025em; font-weight: 520; }
.project-card-body span { color: var(--muted); font-size: 13.5px; }
.cta-band {
    width: min(calc(100% - 36px), calc(var(--max-width) - 84px));
    margin: 34px auto 64px;
    padding: clamp(28px, 5vw, 50px);
    border-radius: var(--radius);
    background: var(--dark);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.cta-band .eyebrow { color: color-mix(in srgb, var(--accent) 78%, #fff); }
.cta-band p, .cta-band h2 { color: #fff; }

.project-hero-detail {
    padding: clamp(38px, 6vw, 78px) clamp(18px, 4vw, 42px) 20px;
    display: grid;
    grid-template-columns: .92fr minmax(280px, .8fr);
    gap: 34px;
    align-items: end;
}
.project-hero-detail img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.project-process { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.process-block, .info-card, .form-card, .contact-card, .admin-card, .table-wrap, .theme-preview {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--paper) calc(var(--card-alpha) * 100%), transparent);
    padding: 22px;
}
.process-block span { font-weight: 560; color: var(--accent-dark); }
.process-block p { color: var(--muted); margin-bottom: 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gallery-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: calc(var(--radius) * .75); }
.project-nav-bottom { display: flex; gap: 12px; justify-content: center; padding-top: 0; }
.about-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.form-card { display: grid; gap: 18px; }
label { display: grid; gap: 7px; font-weight: 520; color: var(--ink); }
input, textarea, select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) * .75);
    padding: 11px 12px;
    background: rgba(255,255,255,.74);
    font: inherit;
    color: var(--ink);
}
input[type="color"] { padding: 4px; height: 42px; }
textarea { resize: vertical; }
.checkbox-line { display: flex; align-items: center; gap: 8px; }
.checkbox-line input { width: auto; }
.contact-card { display: grid; gap: 12px; }
.contact-card a { color: var(--accent-dark); font-weight: 560; }
.site-footer {
    display: block;
    padding: 34px clamp(18px, 4vw, 42px) 28px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}
.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 12px; font-weight: 560; color: var(--ink); }
.footer-bottom {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    text-align: center;
    display: grid;
    gap: 5px;
    font-size: 12.5px;
    line-height: 1.65;
    color: color-mix(in srgb, var(--muted) 88%, transparent);
}
.footer-legal,
.footer-developer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 10px;
}
.footer-legal span + span::before,
.footer-developer span + span::before,
.footer-developer span + a::before {
    content: "•";
    margin-right: 10px;
    color: color-mix(in srgb, var(--muted) 55%, transparent);
}
.footer-developer a {
    color: inherit;
    font-weight: 500;
    text-decoration: none;
}
.footer-developer a:hover { color: var(--ink); }
.flash {
    width: min(calc(100% - 36px), calc(var(--max-width) - 84px));
    margin: 18px auto;
    border-radius: calc(var(--radius) * .75);
    padding: 13px 16px;
    font-weight: 560;
}
.flash.success { background: #dff3df; color: #1d5b25; }
.flash.error { background: #ffe1db; color: #8b2f1e; }
.empty-state { border: 1px dashed var(--line); border-radius: var(--radius); padding: 28px; color: var(--muted); background: rgba(255,255,255,.42); }

/* Admin */
.admin-body { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; background: var(--bg); }
.admin-sidebar { border-right: 1px solid var(--line); padding: 20px; background: color-mix(in srgb, var(--paper) 72%, var(--bg)); position: sticky; top: 0; height: 100vh; }
.admin-brand { margin-bottom: 26px; }
.admin-nav { display: grid; gap: 7px; }
.admin-nav a { border-radius: calc(var(--radius) * .7); }
.admin-main { padding: 24px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.admin-topbar h1 { margin: 0; font-size: clamp(23px, 3.2vw, 34px); letter-spacing: -.04em; font-weight: 520; }
.admin-topbar p { margin: 4px 0 0; color: var(--muted); }
.admin-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.admin-card strong { display: block; font-size: 27px; letter-spacing: -.035em; font-weight: 520; }
.admin-card span { color: var(--muted); font-weight: 560; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 9px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 560; }
.badge { display: inline-flex; padding: 4px 9px; border-radius: 999px; background: rgba(31,30,27,.07); font-size: 12px; font-weight: 560; }
.badge.published { background: #dff3df; color: #1d5b25; }
.badge.draft { background: #ffe8c7; color: #8a4b11; }
.action-links { display: flex; gap: 10px; flex-wrap: wrap; }
.action-links a, .danger-link { color: var(--accent-dark); font-weight: 560; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-grid .full { grid-column: 1 / -1; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 18px; }
.login-card { width: min(440px, 100%); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.login-card h1 { margin: 20px 0 8px; font-size: 29px; letter-spacing: -.04em; font-weight: 520; }
.login-card form { display: grid; gap: 14px; margin-top: 24px; }
.thumb { width: 74px; height: 58px; object-fit: cover; border-radius: 10px; background: #ddd; }
.gallery-admin { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.gallery-admin img { width: 86px; height: 72px; object-fit: cover; border-radius: 10px; }
.small-note { color: var(--muted); font-size: 12.5px; font-weight: 400; }

.admin-section-title { margin: 8px 0 2px; }
.admin-section-title h2, .admin-section-title h3 { margin: 0; font-weight: 520; letter-spacing: -.025em; }
.admin-section-title h2 { font-size: 22px; }
.admin-section-title h3 { font-size: 18px; }
.admin-section-title p { margin: 4px 0 0; }
.admin-section-title.compact { margin-bottom: 14px; }
.language-editor { display: grid; gap: 16px; }
.tab-buttons { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.tab-button { border: 1px solid var(--line); background: rgba(255,255,255,.45); color: var(--muted); border-radius: 999px; padding: 8px 12px; cursor: pointer; font: inherit; font-size: 13px; }
.tab-button.active { background: var(--dark); color: #fff; border-color: var(--dark); }
.language-panel { display: none; }
.language-panel.active { display: block; }
.theme-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.theme-preview { margin-top: 8px; max-width: 720px; }
.theme-preview p { margin-bottom: 0; }

@media (max-width: 1040px) {
    .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero, .project-hero-detail, .contact-layout { grid-template-columns: 1fr; }
    .admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    body { font-size: calc(14px * var(--font-scale)); }
    .site-header { align-items: flex-start; }
    .nav-toggle { display: inline-flex; border: 1px solid var(--line); background: rgba(255,255,255,.75); padding: 8px 11px; border-radius: 999px; }
    .site-nav { display: none; position: absolute; top: 64px; left: 18px; right: 18px; padding: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); justify-content: flex-start; }
    .site-nav.open { display: flex; }
    .language-switcher { width: 100%; max-width: none; justify-content: flex-start; border-left: 0; padding-left: 0; margin-left: 0; padding-top: 8px; border-top: 1px solid var(--line); }
    .hero { padding-top: 36px; }
    .split-intro, .project-grid, .project-grid.large, .project-process, .about-grid, .form-grid, .theme-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cta-band, .footer-main { flex-direction: column; align-items: flex-start; }
    .footer-bottom { text-align: center; }
    .admin-body { grid-template-columns: 1fr; }
    .admin-sidebar { position: relative; height: auto; }
    .admin-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Language combobox + translation tools patch */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
.language-switcher {
    display: inline-flex;
    align-items: center;
    padding-left: 10px;
    margin-left: 6px;
    border-left: 1px solid var(--line);
    max-width: 180px;
}
.language-switcher select {
    min-width: 130px;
    padding: 7px 28px 7px 10px;
    border-radius: 999px;
    font-size: 12.5px;
    background: rgba(255,255,255,.66);
}
.translation-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 18px;
}
.translation-toolbar .small-note { margin: 0; }
.translation-status {
    color: var(--muted);
    font-size: 12.5px;
}
.key-editor-grid {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 10px 14px;
    align-items: start;
}
.key-editor-grid .key-name {
    padding-top: 10px;
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
}
.key-editor-grid textarea,
.key-editor-grid input { font-size: 13px; }
.message-translation-box {
    margin-top: 14px;
    padding: 14px;
    border: 1px dashed var(--line);
    border-radius: calc(var(--radius) * .75);
    background: rgba(255,255,255,.45);
}
.message-translation-box[hidden] { display: none; }
@media (max-width: 760px) {
    .language-switcher { width: 100%; max-width: none; border-left: 0; padding-left: 0; margin-left: 0; padding-top: 8px; border-top: 1px solid var(--line); }
    .language-switcher select { width: 100%; }
    .key-editor-grid { grid-template-columns: 1fr; }
    .key-editor-grid .key-name { padding-top: 0; }
}

/* Ziyaretci sayfasindaki sade admin girisi */
.admin-footer-link {
    margin-left: 4px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted) !important;
    font-size: .88em;
    font-weight: 500;
    background: rgba(255,255,255,.42);
}
.admin-footer-link:hover {
    color: var(--ink) !important;
    background: rgba(255,255,255,.72);
}

/* Upload fields + message status patch */
.upload-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    background: rgba(255,255,255,.34);
}
.upload-current {
    display: grid;
    align-content: start;
    gap: 8px;
}
.btn.danger {
    background: #ffe1db;
    color: #8b2f1e;
}
.inline-form {
    display: inline-flex;
    margin: 0;
}
.message-toolbar { margin-top: 0; margin-bottom: 16px; }
.message-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
}
.link-button {
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    color: var(--accent-dark);
    font: inherit;
    font-weight: 560;
    cursor: pointer;
}
.danger-text { color: #8b2f1e; }
.badge.read { background: rgba(31,30,27,.07); color: var(--muted); }
.badge.unread { background: #dff3df; color: #1d5b25; }
.message-unread td { background: rgba(223,243,223,.23); }
.message-detail-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}
.message-detail-head h2 { margin-top: 3px; }
@media (max-width: 760px) {
    .message-actions { display: grid; gap: 7px; }
    .message-detail-head { display: grid; }
}
