/* ============================================================
   Mustafa Kemal Çıngıl — Portfolyo
   Tasarım sistemi: sıcak krem zemin, terracotta vurgu, mono dokunuş
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ---------- Tokens ---------- */
:root {
  /* accent (tweakable) */
  --accent-h: 28;
  --accent: oklch(0.60 0.13 var(--accent-h));
  --accent-strong: oklch(0.52 0.14 var(--accent-h));
  --accent-tint: oklch(0.60 0.13 var(--accent-h) / 0.10);

  /* light theme (default) */
  --bg: #f3efe6;
  --bg-2: #efe9dd;
  --surface: #fbf9f4;
  --surface-2: #f6f2e9;
  --border: #e2dac9;
  --border-strong: #d3c9b4;
  --text: #2a2620;
  --text-2: #6c6457;
  --text-3: #968d7c;

  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 64px);

  /* density (tweakable) */
  --rhythm: 116px;     /* vertical section spacing */
  --radius: 14px;

  --shadow-sm: 0 1px 2px rgba(40,34,24,0.05), 0 1px 1px rgba(40,34,24,0.04);
  --shadow-md: 0 4px 18px rgba(40,34,24,0.07), 0 1px 3px rgba(40,34,24,0.05);
  --shadow-lg: 0 18px 50px rgba(40,34,24,0.12), 0 3px 10px rgba(40,34,24,0.06);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.55s;
}

[data-theme="dark"] {
  --bg: #1b1916;
  --bg-2: #211e1a;
  --surface: #24211c;
  --surface-2: #2a261f;
  --border: #36322b;
  --border-strong: #443f36;
  --text: #ece6da;
  --text-2: #a89f8f;
  --text-3: #79715f;
  --accent: oklch(0.70 0.12 var(--accent-h));
  --accent-strong: oklch(0.76 0.11 var(--accent-h));
  --accent-tint: oklch(0.70 0.12 var(--accent-h) / 0.14);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.30);
  --shadow-md: 0 6px 22px rgba(0,0,0,0.40);
  --shadow-lg: 0 22px 56px rgba(0,0,0,0.50);
}

[data-density="compact"] { --rhythm: 80px; }
[data-density="comfy"]   { --rhythm: 152px; }

/* animation dose */
[data-anim="low"]  { --dur: 0.28s; }
[data-anim="high"] { --dur: 0.8s; }
[data-anim="off"] * { animation: none !important; transition: none !important; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--accent-tint); color: var(--text); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--rhythm); }
.divider { height: 1px; background: var(--border); border: 0; }

/* ---------- Type ---------- */
.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono);
  font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-strong);
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--accent);
  display: inline-block;
}
.display {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.015em;
  font-size: clamp(2.6rem, 6.2vw, 5.2rem);
}
h1, h2, h3 { font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.01em; line-height: 1.1; }
.h-section { font-size: clamp(2rem, 4vw, 3.2rem); }
.h-card { font-family: var(--font-sans); font-weight: 600; font-size: 1.18rem; letter-spacing: -0.005em; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--text-2); line-height: 1.55; max-width: 60ch; }
.muted { color: var(--text-2); }
.serif-em { font-family: var(--font-serif); font-style: italic; color: var(--accent-strong); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em;
  padding: 13px 22px; border-radius: 11px; border: 1px solid transparent;
  transition: transform 0.18s var(--ease), background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
[data-theme="dark"] .btn-primary { color: #1b1916; }
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface); border-color: var(--text-3); transform: translateY(-2px); }

/* ---------- Tags / chips ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.03em;
  padding: 4px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
}
.tag.accent { background: var(--accent-tint); color: var(--accent-strong); border-color: transparent; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
.card.hover:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }

/* ---------- Image placeholder ---------- */
.ph {
  position: relative;
  background-color: var(--surface-2);
  background-image: repeating-linear-gradient(
    -45deg, transparent 0 11px, color-mix(in oklab, var(--border) 60%, transparent) 11px 12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid; place-items: center;
  overflow: hidden;
}
.ph span {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em;
  color: var(--text-3); background: var(--surface); padding: 5px 11px;
  border-radius: 999px; border: 1px solid var(--border);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.nav.scrolled {
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-mono); font-size: 13.5px; letter-spacing: 0.02em; color: var(--text); }
.brand .mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 500; font-size: 13px; letter-spacing: 0;
  transition: transform 0.3s var(--ease);
}
[data-theme="dark"] .brand .mark { color: #1b1916; }
.brand:hover .mark { transform: rotate(-8deg); }
.brand b { font-weight: 500; }
.brand .dim { color: var(--text-3); }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.02em;
  color: var(--text-2); padding: 8px 12px; border-radius: 8px;
  transition: color 0.2s, background 0.2s; position: relative;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: var(--accent-strong); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 1.5px;
  background: var(--accent); border-radius: 2px;
}
.nav-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-2); transition: all 0.2s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface); transform: translateY(-1px); }
.icon-btn svg { width: 17px; height: 17px; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

.menu-btn { display: none; }

/* mobile drawer */
.drawer {
  position: fixed; inset: 0; z-index: 99; background: var(--bg);
  padding: 90px var(--gutter) 40px; display: flex; flex-direction: column; gap: 6px;
  transform: translateX(100%); transition: transform 0.4s var(--ease); visibility: hidden;
}
.drawer.open { transform: translateX(0); visibility: visible; }
.drawer a {
  font-family: var(--font-serif); font-size: 1.8rem; padding: 14px 0;
  border-bottom: 1px solid var(--border); color: var(--text);
}
.drawer a .num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-3); margin-right: 14px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); background: var(--bg-2); padding-block: 64px 30px; margin-top: var(--rhythm); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); font-weight: 500; margin-bottom: 16px; }
.footer .col a, .footer .col p { display: block; color: var(--text-2); font-size: 14.5px; padding: 5px 0; transition: color 0.2s; }
.footer .col a:hover { color: var(--accent-strong); }
.footer-brand .display { font-size: 2rem; margin-bottom: 14px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 54px; padding-top: 26px; border-top: 1px solid var(--border); }
.footer-bottom .mono { font-size: 11.5px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }
[data-anim="off"] .reveal { opacity: 1; transform: none; }

/* ---------- Page intro spacing ---------- */
.page-top { padding-top: 132px; }

/* ---------- Stat ---------- */
.stat .n { font-family: var(--font-serif); font-size: clamp(2rem, 3.4vw, 2.8rem); line-height: 1; color: var(--text); }
.stat .l { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em; color: var(--text-3); margin-top: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .menu-btn { display: grid; }
}
@media (max-width: 860px) {
  :root { --rhythm: 84px; }
  .nav-links { display: none; }
  .menu-btn { display: grid; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
  .btn.block-sm { width: 100%; justify-content: center; }
  .hide-sm { display: none !important; }
}

/* ============================================================
   Widgets: AI asistan · Tweaks paneli · Toast
   ============================================================ */

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 14px);
  background: var(--text); color: var(--bg);
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.02em;
  padding: 11px 18px; border-radius: 10px; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); z-index: 2147483645;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }



.asst-win[hidden], .twk[hidden] { display: none !important; }
.asst-win {
  position: fixed; right: 22px; bottom: 22px; z-index: 1001;
  width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 44px));
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow-lg); overflow: hidden;
  animation: asstIn var(--dur) var(--ease);
}
@keyframes asstIn { from { opacity: 0; transform: translateY(18px) scale(0.97); } to { opacity: 1; transform: none; } }
.asst-hd { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 13px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.asst-id { display: flex; align-items: center; gap: 11px; }
.asst-av { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-tint); color: var(--accent-strong); display: grid; place-items: center; }
.asst-av svg { width: 18px; height: 18px; }
.asst-id b { font-family: var(--font-sans); font-weight: 600; font-size: 14px; display: block; }
.asst-status { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-style: normal; font-size: 11px; color: var(--text-3); margin-top: 1px; }
.asst-status .dot { width: 6px; height: 6px; border-radius: 50%; background: oklch(0.7 0.15 150); box-shadow: 0 0 0 0 oklch(0.7 0.15 150 / 0.5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 oklch(0.7 0.15 150 / 0.5); } 70% { box-shadow: 0 0 0 7px oklch(0.7 0.15 150 / 0); } 100% { box-shadow: 0 0 0 0 oklch(0.7 0.15 150 / 0); } }
.asst-x { width: 32px; height: 32px; border: 0; background: transparent; color: var(--text-3); border-radius: 8px; display: grid; place-items: center; transition: all 0.2s; }
.asst-x svg { width: 16px; height: 16px; }
.asst-x:hover { background: var(--surface); color: var(--text); }

.asst-body { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.asst-day { align-self: center; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.msg { display: flex; flex-direction: column; gap: 7px; max-width: 84%; }
.msg.bot { align-self: flex-start; align-items: flex-start; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.bub { padding: 11px 14px; border-radius: 15px; font-size: 14px; line-height: 1.5; }
.msg.bot .bub { background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.msg.me .bub { background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
[data-theme="dark"] .msg.me .bub { color: #1b1916; }
.bub b { font-weight: 600; }
.asst-voice { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.03em; padding: 5px 10px; border-radius: 999px; transition: all 0.2s; }
.asst-voice svg { width: 12px; height: 12px; }
.asst-voice:hover { color: var(--accent-strong); border-color: var(--accent); }
.bub.typing { display: inline-flex; gap: 4px; padding: 14px; }
.bub.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: blink 1.4s infinite both; }
.bub.typing span:nth-child(2) { animation-delay: 0.2s; }
.bub.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.asst-foot { border-top: 1px solid var(--border); padding: 12px 14px 13px; background: var(--surface-2); }
.asst-input { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 5px 5px 5px 14px; }
.asst-input input { flex: 1; border: 0; background: transparent; color: var(--text); font-family: var(--font-sans); font-size: 13.5px; outline: none; }
.asst-input input::placeholder { color: var(--text-3); }
.asst-send { width: 34px; height: 34px; border: 0; border-radius: 9px; background: var(--accent); color: #fff; display: grid; place-items: center; transition: background 0.2s; }
[data-theme="dark"] .asst-send { color: #1b1916; }
.asst-send svg { width: 16px; height: 16px; }
.asst-terms { font-family: var(--font-mono); font-size: 9.5px; line-height: 1.5; letter-spacing: 0.01em; color: var(--text-3); margin-top: 9px; text-align: center; }

/* ---------- Tweaks panel ---------- */
.twk {
  position: fixed; right: 16px; bottom: 16px; z-index: 2147483646; width: 250px;
  background: color-mix(in oklab, var(--surface) 86%, transparent);
  backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
  font-family: var(--font-sans); color: var(--text); overflow: hidden;
}
.twk-hd { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 12px 15px; border-bottom: 1px solid var(--border); }
.twk-hd b { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; }
.twk-x { width: 26px; height: 26px; border: 0; background: transparent; color: var(--text-3); border-radius: 7px; display: grid; place-items: center; }
.twk-x svg { width: 14px; height: 14px; }
.twk-x:hover { background: var(--surface-2); color: var(--text); }
.twk-bd { padding: 4px 15px 16px; }
.twk-sect { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin: 16px 0 8px; }
.twk-seg { display: flex; gap: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 3px; }
.twk-seg button { flex: 1; border: 0; background: transparent; color: var(--text-2); font-family: var(--font-mono); font-size: 11px; padding: 6px 4px; border-radius: 6px; transition: all 0.18s; }
.twk-seg button:hover { color: var(--text); }
.twk-seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.twk-swatches { display: flex; gap: 9px; }
.twk-swatches button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--sw); padding: 0; display: grid; place-items: center; transition: transform 0.18s; }
.twk-swatches button:hover { transform: scale(1.08); }
.twk-swatches button span { width: 0; height: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,0.15); transition: all 0.18s; }
.twk-swatches button.on span { width: 9px; height: 9px; }

@media (max-width: 540px) {
  .twk { display: none; }
}
