/*
Theme Name: Bir Baba Indie
Theme URI: https://birbabaindie.com
Author: BBI Yapım
Description: Bir Baba Indie için özel geliştirilmiş editoryal tema. Siyah / beyaz / gri zemin, tek sarı vurgu rengi, Bricolage Grotesque + Archivo tipografisi.
Version: 0.4.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: bbi
*/

/* ---------- Design tokens ---------- */
:root {
  --bg: #FCFCFA;
  --fg: #141414;
  --gray-600: #5A5A5A;
  --gray-500: #6E6E6E;
  --gray-400: #8A8A8A;
  --gray-300: #A3A39B;
  --border: #E4E4E0;
  --border-strong: #141414;
  --card-bg: #F5F5F1;
  --accent: #F4C21A;
  --footer-bg: #141414;
  --footer-fg: #FCFCFA;

  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Archivo', -apple-system, sans-serif;

  --container: 1312px;
  --header-h: 88px;
}

html[data-theme="dark"] {
  --bg: #141414;
  --fg: #FCFCFA;
  --gray-600: #C4C4BC;
  --gray-500: #A3A39B;
  --gray-400: #8A8A8A;
  --gray-300: #5A5A5A;
  --border: #2A2A28;
  --border-strong: #FCFCFA;
  --card-bg: #1E1E1C;
  --footer-bg: #0A0A0A;
  --footer-fg: #FCFCFA;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg: #141414;
    --fg: #FCFCFA;
    --gray-600: #C4C4BC;
    --gray-500: #A3A39B;
    --gray-400: #8A8A8A;
    --gray-300: #5A5A5A;
    --border: #2A2A28;
    --border-strong: #FCFCFA;
    --card-bg: #1E1E1C;
    --footer-bg: #0A0A0A;
    --footer-fg: #FCFCFA;
  }
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  transition: background .15s ease, color .15s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: .65; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 64px; }

/* ---------- Accent utilities ---------- */
.u {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--fg);
}
.eyebrow::before { content: ""; width: 7px; height: 7px; background: var(--accent); flex-shrink: 0; }
.eyebrow.muted { color: var(--gray-400); }

/* ---------- Header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); border-bottom: 2px solid var(--border-strong);
  position: relative; z-index: 41;
}
.site-logo {
  display: flex; align-items: center; height: 100%; max-height: 88px;
  font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -.01em;
}
.site-logo a { display: flex; align-items: center; flex-shrink: 0; }
.site-logo img.custom-logo {
  height: 40px; width: auto; max-width: none;
  flex-shrink: 0; display: block; object-fit: contain;
}
.custom-logo-dark { display: none; }
html[data-theme="dark"] .custom-logo-light { display: none; }
html[data-theme="dark"] .custom-logo-dark { display: block; }
/* İkinci (koyu tema) logo yüklenmemişse: ana logo otomatik ters çevrilir */
html[data-theme="dark"] .custom-logo-light:only-child { display: block; filter: invert(1) brightness(1.15); }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]):not([data-theme="dark"]) .custom-logo-light { display: none; }
  html:not([data-theme="light"]):not([data-theme="dark"]) .custom-logo-dark { display: block; }
  html:not([data-theme="light"]):not([data-theme="dark"]) .custom-logo-light:only-child { display: block; filter: invert(1) brightness(1.15); }
}
.primary-nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.primary-nav a {
  font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.header-actions { display: flex; align-items: center; gap: 20px; }
.theme-toggle, .search-toggle, .nav-toggle { background: none; border: none; cursor: pointer; padding: 4px; color: var(--fg); display: flex; }
.theme-toggle svg { width: 18px; height: 18px; }
.nav-toggle { display: none; }

/* ---------- Arama ---------- */
.site-search {
  position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 40;
  background: var(--bg); border-bottom: 2px solid var(--border-strong);
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .18s ease, opacity .18s ease;
}
.site-search.is-open { max-height: 96px; opacity: 1; }
.site-search .container { display: flex; align-items: center; gap: 14px; padding-top: 20px; padding-bottom: 20px; }
.site-search-field {
  flex: 1; min-width: 0; border: none; background: none; outline: none;
  font-family: var(--font-display); font-weight: 600; font-size: 20px; color: var(--fg);
}
.site-search-field::placeholder { color: var(--gray-400); font-weight: 500; }
.site-search button[type="submit"] { background: none; border: none; cursor: pointer; color: var(--fg); display: flex; flex-shrink: 0; }

/* ---------- Featured block ---------- */
.featured-block { display: grid; grid-template-columns: 1.7fr 1fr; gap: 40px; padding: 56px 0; }
@media (max-width: 900px) { .featured-block { grid-template-columns: 1fr; } }

.featured-large-media {
  aspect-ratio: 3/2; border-radius: 3px; overflow: hidden; position: relative; background: var(--card-bg);
}
.featured-large-media img { width: 100%; height: 100%; object-fit: cover; }
.featured-large-media .accent-bar { position: absolute; left: 0; bottom: 0; width: 46px; height: 6px; background: var(--accent); }
.featured-large h1, .featured-large h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 40px; line-height: 1.1; letter-spacing: -.01em; margin: 16px 0 8px;
}
.featured-large p.dek { font-size: 15.5px; line-height: 1.65; color: var(--gray-500); max-width: 560px; margin: 0 0 12px; }
.meta-line { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--gray-400); font-weight: 500; }
.meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--gray-300); }

.featured-list { background: var(--card-bg); border-radius: 3px; padding: 28px; }
.featured-list-title { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gray-400); margin-bottom: 14px; display: block; }
.featured-list-item { display: flex; gap: 16px; padding: 18px 0; border-top: 1px solid var(--border); }
.featured-list-item:last-of-type { border-bottom: 1px solid var(--border); }
.featured-list-thumb { width: 88px; height: 88px; aspect-ratio: 1 / 1; flex-shrink: 0; border-radius: 3px; object-fit: cover; object-position: center; background: var(--gray-300); }
.featured-list-item h3 { font-family: var(--font-display); font-weight: 600; font-size: 16px; line-height: 1.3; margin: 6px 0; }
.featured-list-item .fli-date { font-size: 11.5px; color: var(--gray-300); }
.featured-list .see-all { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Section heading ---------- */
.section { padding: 16px 0 64px; }
.section-heading {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 0 0 28px; border-top: 2px solid var(--border-strong); padding-top: 24px;
}
.section-heading h2 { font-family: var(--font-display); font-weight: 700; font-size: 24px; margin: 0; }
.section-heading .see-all { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Card grid (category / related) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
@media (max-width: 900px) { .card-grid { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; gap: 12px; }
.card-media { aspect-ratio: 3/2; border-radius: 3px; overflow: hidden; background: var(--card-bg); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card h3 { font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 1.3; margin: 0; }

/* ---------- List rows (Son Yazılar) ---------- */
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 0; border-top: 1px solid var(--border); }
.list-row .lr-left { display: flex; align-items: center; gap: 20px; min-width: 0; }
.list-row .lr-cat { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gray-400); width: 150px; flex-shrink: 0; }
.list-row .lr-title { font-family: var(--font-display); font-weight: 600; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .lr-date { font-size: 12px; color: var(--gray-400); white-space: nowrap; }
.list-row .dot { width: 6px; height: 6px; background: var(--accent); flex-shrink: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-fg); padding: 56px 0; margin-top: 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 48px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.14); }
.footer-grid h4 { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #7A7A72; margin: 0 0 4px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: #D0D0C8; }
.footer-grid a { color: #D0D0C8; }
.footer-grid a:hover { color: var(--footer-fg); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 20px; font-size: 12px; color: #7A7A72; }
.footer-bottom a { color: #A3A39B; }
.footer-bottom a:hover { color: var(--footer-fg); }

.footer-brand { display: flex; flex-direction: column; align-items: flex-start; }
.footer-logo-link { display: inline-flex; align-items: center; }
.footer-logo { height: 34px; width: auto; max-width: none; display: block; object-fit: contain; filter: invert(1) brightness(1.15); }
.footer-blurb { margin: 16px 0 0; font-size: 13px; line-height: 1.6; color: #A3A39B; max-width: 280px; }
.footer-parent { margin: 10px 0 0; font-size: 12px; line-height: 1.6; color: #7A7A72; max-width: 280px; }
.footer-parent a { color: #D0D0C8; font-weight: 600; }
.footer-parent a:hover { color: var(--footer-fg); }
.footer-social a { text-transform: uppercase; letter-spacing: .03em; font-weight: 600; font-size: 12px; }

/* ---------- Bilgi sayfaları: Hakkımızda / İletişim ---------- */
.info-hero { max-width: 760px; margin: 0 auto; padding: 56px 0 32px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.info-hero h1 { font-family: var(--font-display); font-weight: 700; font-size: 42px; margin: 0; letter-spacing: -.01em; }
.info-body { max-width: 720px; margin: 0 auto; padding-bottom: 48px; font-size: 16.5px; line-height: 1.75; color: var(--gray-600); }
.info-body p { margin: 0 0 24px; }
.info-lead { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.5; color: var(--fg); }
.info-ecosystem { max-width: 1000px; margin: 0 auto; padding-bottom: 56px; }
.info-ecosystem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 16px; }
.info-ecosystem-card { display: block; background: var(--card-bg); border: 1px solid var(--border); border-radius: 4px; padding: 24px; }
.info-ecosystem-card:hover { border-color: var(--border-strong); opacity: 1; }
.info-ecosystem-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 17px; margin: 0 0 8px; }
.info-ecosystem-card p { font-size: 13.5px; line-height: 1.6; color: var(--gray-500); margin: 0; }
.info-card-grid { max-width: 1000px; margin: 0 auto; padding-bottom: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.info-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 4px; padding: 24px; }
.info-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 15px; margin: 0 0 12px; }
.info-card p { font-size: 14px; line-height: 1.6; color: var(--gray-500); margin: 0 0 6px; }
.info-map { max-width: 1000px; margin: 0 auto 56px; border-radius: 4px; overflow: hidden; border: 1px solid var(--border); }
.info-map iframe { display: block; width: 100%; filter: grayscale(.15); }
.info-social { max-width: 1000px; margin: 0 auto; padding-bottom: 64px; text-align: center; }
.info-social-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; margin-top: 16px; font-size: 13px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }

/* ---------- Ekibimiz ---------- */
.team-grid { max-width: 1120px; margin: 0 auto; padding-bottom: 56px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.team-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 16px; border: 1px solid var(--border); border-radius: 4px; background: var(--card-bg); }
.team-card:hover { border-color: var(--border-strong); opacity: 1; }
.team-card-avatar { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; margin-bottom: 14px; background: var(--bg); }
.team-card-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.team-card-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.team-card-role { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--gray-400); margin-top: 4px; }
.contributors-row { max-width: 760px; margin: 16px auto 0; font-size: 14px; line-height: 2; color: var(--gray-500); }
.contributors-row a { color: var(--gray-500); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.contributors-row a:hover { color: var(--fg); opacity: 1; }

/* ---------- Single post ---------- */
.article-header { max-width: 760px; margin: 0 auto; padding: 28px 0 40px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.article-header h1 { font-family: var(--font-display); font-weight: 700; font-size: 44px; line-height: 1.15; letter-spacing: -.01em; margin: 0; }
.article-subtitle { font-family: var(--font-body); font-weight: 500; font-size: 19px; line-height: 1.55; color: var(--gray-500); max-width: 620px; margin: 0; }
.article-hero-media { max-width: 1120px; margin: 0 auto; aspect-ratio: 16/8; border-radius: 3px; overflow: hidden; background: var(--card-bg); }
.article-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.article-body { max-width: 800px; margin: 0 auto; padding: 28px 0 0; font-size: 17.5px; line-height: 1.75; color: var(--gray-600); }
.article-body > *:first-child { font-family: var(--font-display); font-size: 26px; line-height: 1.5; font-weight: 700; color: var(--fg); letter-spacing: -.005em; }
.article-body p { margin: 0 0 28px; }
.article-body strong, .article-body b { color: var(--fg); font-weight: 700; }
.article-body h2, .article-body h3, .article-body h4 {
  font-family: var(--font-display); font-weight: 700; color: var(--fg);
  margin: 44px 0 18px; line-height: 1.35;
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 3px; text-underline-offset: 6px;
}
.article-body h2 { font-size: 26px; }
.article-body h3 { font-size: 21px; }
.article-body h4 { font-size: 18px; }
.article-body .u, .article-body span.u { text-decoration-thickness: 3px; text-underline-offset: 4px; }
.article-body blockquote { display: flex; gap: 22px; align-items: flex-start; margin: 0 0 28px; padding: 4px 0; border: none; }
.article-body blockquote::before { content: ""; width: 4px; align-self: stretch; background: var(--accent); flex-shrink: 0; }
.article-body blockquote p { font-family: var(--font-display); font-weight: 600; font-size: 25px; line-height: 1.4; color: var(--fg); margin: 0; }

/* ---------- Yazı altı: etiketler → yazar kutusu ---------- */
.article-footer { max-width: 800px; margin: 0 auto; padding-top: 48px; }
.article-tags { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 32px; margin-bottom: 32px; border-bottom: 1px solid var(--border); }
.article-tags a { padding: 6px 13px; border: 1px solid var(--border-strong); font-size: 12px; }

.author-box { display: flex; gap: 20px; align-items: flex-start; }
.author-box-avatar { display: block; width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; overflow: hidden; background: var(--card-bg); }
.author-box-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.author-box-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; margin: 0 0 6px; }
.author-box-bio { font-size: 14px; line-height: 1.6; color: var(--gray-500); max-width: 560px; margin: 0 0 12px; }
.author-box-links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.author-box-links a { color: var(--gray-500); }
.author-box-links a:hover { color: var(--fg); opacity: 1; }

/* ---------- Yazar profil sayfası ---------- */
.author-header { display: flex; gap: 28px; align-items: flex-start; padding: 48px 0 32px; }
.author-header-avatar { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: var(--card-bg); }
.author-header-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.author-header .eyebrow { margin-bottom: 10px; }
.author-header h1 { font-family: var(--font-display); font-weight: 700; font-size: 32px; margin: 0 0 10px; }
.author-header-bio { font-size: 15px; line-height: 1.65; color: var(--gray-500); max-width: 600px; margin: 0 0 14px; }
.author-header-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--gray-400); margin-bottom: 10px; }
.author-header-links { display: flex; gap: 18px; font-size: 13px; font-weight: 700; }

.breadcrumb { font-size: 12px; color: var(--gray-400); display: flex; align-items: center; gap: 8px; padding: 24px 0 0; }

/* ---------- Mobil / tablet ---------- */
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .container { padding: 0 20px; }

  .primary-nav {
    display: block;
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; z-index: 39;
    background: var(--bg); padding: 8px 20px 32px;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
    overflow-y: auto;
  }
  .primary-nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .primary-nav ul { flex-direction: column; gap: 0; }
  .primary-nav a { display: block; padding: 16px 0; font-size: 15.5px; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: flex; }

  .featured-block { padding: 32px 0; gap: 28px; }
  .featured-large h1, .featured-large h2 { font-size: 28px; }
  .featured-list { padding: 20px; }
  .section-heading h2 { font-size: 20px; }

  .article-header { padding: 20px 0 28px; gap: 14px; }
  .article-header h1 { font-size: 28px; }
  .article-subtitle { font-size: 16px; }
  .article-body { font-size: 16px; padding-top: 18px; }
  .article-body > *:first-child { font-size: 20px; }
  .article-body blockquote p { font-size: 20px; }
  .article-body h2 { font-size: 22px; }
  .article-body h3 { font-size: 19px; }

  .author-box { flex-direction: column; }
  .author-header { flex-direction: column; }

  .info-hero h1 { font-size: 30px; }
  .info-ecosystem-grid, .info-card-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 14px; }

  .list-row .lr-cat { width: 96px; }
  .list-row .lr-title { white-space: normal; }
}
