/* Rüyada Görmek — site stilleri */
:root {
  color-scheme: light dark;
  --bg: #fbfaff;
  --bg-soft: #f2f0fb;
  --surface: #ffffff;
  --border: #e3e0f2;
  --text: #211f33;
  --muted: #6a6683;
  --accent: #4d3ec7;
  --accent-soft: #ece9ff;
  --accent-contrast: #ffffff;
  --shadow: 0 1px 2px rgba(33, 31, 51, .06), 0 8px 24px -16px rgba(33, 31, 51, .3);
  --radius: 14px;
  --wrap: 68rem;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14131f;
    --bg-soft: #1b1a2b;
    --surface: #1e1d2e;
    --border: #302e45;
    --text: #eceaf6;
    --muted: #a5a0bd;
    --accent: #a99bff;
    --accent-soft: #262340;
    --accent-contrast: #14131f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -18px rgba(0, 0, 0, .8);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

a { color: var(--accent); text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

h1, h2, h3 { font-family: var(--font-serif); line-height: 1.25; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.6rem); margin: 0 0 .6rem; }
h2 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); margin: 2.2rem 0 .8rem; }
h3 { font-size: 1.2rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .6rem 1rem; border-radius: 8px; z-index: 10; }

/* ---------------------------------------------------------- başlık */
.site-header {
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
  border-bottom: 1px solid var(--border);
}
.header-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: 1.1rem 0; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; }
.brand-mark {
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--accent); color: var(--accent-contrast); font-size: 1.4rem;
}
.brand-text strong { display: block; font-family: var(--font-serif); font-size: 1.35rem; }
.brand-text small { color: var(--muted); font-size: .82rem; }

.search { display: flex; gap: .4rem; flex: 1 1 18rem; max-width: 26rem; }
.search input {
  flex: 1; padding: .6rem .9rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: inherit; font: inherit; min-width: 0;
}
.search input:focus-visible, .hero-search input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.search button, .hero-search button {
  padding: .6rem 1.2rem; border-radius: 999px; border: 0; background: var(--accent);
  color: var(--accent-contrast); font: inherit; font-weight: 600; cursor: pointer;
}
.search button:hover, .hero-search button:hover { filter: brightness(1.08); }

.letters {
  display: flex; flex-wrap: wrap; gap: .25rem; padding-bottom: .9rem;
}
.letter {
  min-width: 2rem; padding: .25rem .5rem; border-radius: 8px; text-align: center;
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem;
}
.letter:hover { background: var(--accent-soft); color: var(--accent); }
.letter.is-active { background: var(--accent); color: var(--accent-contrast); }

/* ------------------------------------------------------------ içerik */
main { padding: 2rem 0 3.5rem; }
.section { margin-bottom: 2.5rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.hero {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(1.5rem, 1rem + 2vw, 2.8rem); box-shadow: var(--shadow); margin-bottom: 2.5rem;
  text-align: center;
}
.hero-lead { color: var(--muted); max-width: 46rem; margin: 0 auto 1.6rem; }
.hero-search { display: flex; gap: .5rem; max-width: 34rem; margin-inline: auto; }
.hero-search input {
  flex: 1; padding: .8rem 1.1rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg); color: inherit; font: inherit; min-width: 0;
}

.letter-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: .6rem;
}
.letter-card {
  display: grid; place-items: center; gap: .1rem; padding: .9rem .4rem; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; color: inherit;
  transition: transform .12s ease, border-color .12s ease;
}
.letter-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.letter-card-glyph { font-family: var(--font-serif); font-size: 1.7rem; color: var(--accent); line-height: 1; }
.letter-card-count { font-size: .72rem; color: var(--muted); }

.dream-list { list-style: none; margin: 0; padding: 0; }
.dream-list li { padding: .45rem 0; border-bottom: 1px solid var(--border); }
.dream-list a { text-decoration: none; font-weight: 500; }
.dream-list a:hover { text-decoration: underline; }
.dream-list.two-col { columns: 2; column-gap: 2.5rem; }
.dream-list.search-results li { padding: .8rem 0; break-inside: avoid; }
.dream-list.search-results p { margin: .2rem 0 0; font-size: .9rem; }
@media (max-width: 40rem) { .dream-list.two-col { columns: 1; } }

.badge {
  display: inline-block; margin-inline-start: .5rem; padding: 0 .45rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: .72rem; font-weight: 600;
}
.badge-admin { background: var(--accent); color: var(--accent-contrast); }

.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 1.2rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: '›'; margin-inline-end: .4rem; color: var(--border); }

.prose { max-width: 44rem; }
.prose p { margin: 0 0 1.1rem; }
.prose h2, .prose h3 { margin-top: 2rem; }
.prose ul, .prose ol { padding-inline-start: 1.4rem; }
.prose img { max-width: 100%; height: auto; border-radius: 10px; }
.prose blockquote {
  margin: 1.4rem 0; padding: .6rem 1.2rem; border-inline-start: 3px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 10px 10px 0;
}
.dream .meta { margin-top: -.2rem; font-size: .9rem; }

.post-nav { display: flex; justify-content: space-between; gap: 1rem; margin: 2rem 0; }
.post-nav a {
  flex: 1 1 0; max-width: 22rem; padding: .8rem 1rem; border: 1px solid var(--border);
  border-radius: 12px; background: var(--surface); text-decoration: none; color: inherit; font-weight: 500;
}
.post-nav a:hover { border-color: var(--accent); }
.post-nav span { display: block; font-size: .75rem; color: var(--muted); }
.post-nav-next { text-align: end; }

.pagination { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: 1.8rem; }
.page-link {
  padding: .35rem .8rem; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); text-decoration: none; font-size: .9rem;
}
.page-link.is-active { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.page-gap { padding: .35rem .3rem; color: var(--muted); }

/* ----------------------------------------------------------- yorumlar */
.comments { border-top: 1px solid var(--border); padding-top: 1.5rem; }
.comment-list, .comment-children { list-style: none; margin: 0; padding: 0; }
.comment {
  padding: 1rem 1.1rem; margin-bottom: .8rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px;
}
.comment.is-admin { border-color: var(--accent); background: var(--accent-soft); }
.comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .9rem; }
.comment-head time { color: var(--muted); font-size: .8rem; }
.comment-body p { margin: .4rem 0 0; }
.comment-children { margin: .8rem 0 0 1.2rem; border-inline-start: 2px solid var(--border); padding-inline-start: 1rem; }

.comment-form { display: grid; gap: .9rem; max-width: 40rem; margin-top: 1.2rem; }
.field-row { display: flex; gap: .9rem; flex-wrap: wrap; }
.field-row .field { flex: 1 1 14rem; }
.field { display: grid; gap: .3rem; font-size: .9rem; font-weight: 500; }
.comment-form input, .comment-form textarea {
  padding: .65rem .8rem; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: inherit; font: inherit; font-weight: 400; width: 100%;
}
.comment-form textarea { resize: vertical; }
.comment-form button {
  justify-self: start; padding: .7rem 1.6rem; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--accent-contrast); font: inherit; font-weight: 600; cursor: pointer;
}
.form-note { font-size: .82rem; color: var(--muted); margin: 0; }
.hp { position: absolute; left: -9999px; }
.notice { padding: .7rem 1rem; border-radius: 10px; font-size: .92rem; }
.notice-ok { background: #e6f6ec; color: #14532d; }
.notice-error { background: #fdecec; color: #7f1d1d; }
@media (prefers-color-scheme: dark) {
  .notice-ok { background: #14321f; color: #b8f0cd; }
  .notice-error { background: #3a1d1d; color: #f9c5c5; }
}
.contact-box { padding: 1rem; background: var(--accent-soft); border-radius: 12px; }

/* -------------------------------------------------------------- altlık */
.site-footer {
  border-top: 1px solid var(--border); background: var(--bg-soft);
  padding: 2rem 0; font-size: .9rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-bottom: .8rem; }
.footer-links a { text-decoration: none; color: var(--muted); }
.footer-links a:hover { color: var(--accent); }
.copy { color: var(--muted); margin: 0; }

/* -------------------------------------------------------- görseller */
.dream-image { margin: 0 0 1.6rem; }
.dream-image img {
  width: 100%; max-width: 44rem; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-soft);
}

.card-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1rem;
}
.dream-card {
  display: grid; gap: .5rem; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; height: 100%; transition: transform .12s ease, border-color .12s ease;
}
.dream-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.dream-card img { width: 100%; height: auto; aspect-ratio: 346 / 188; object-fit: cover; display: block; }
.dream-card-blank {
  display: grid; place-items: center; aspect-ratio: 346 / 188;
  background: var(--accent-soft); color: var(--accent); font-size: 1.8rem;
}
.dream-card-title { padding: 0 .8rem .8rem; font-size: .92rem; font-weight: 500; line-height: 1.35; }
