:root {
  --bg: #070605;
  --text: #f4efe7;
  --muted: #8f887f;
  --muted-strong: #c3bbb0;
  --accent: #d7b289;
  --accent-soft: rgba(215, 178, 137, 0.14);
  --glass: rgba(14, 12, 10, 0.86);
  --glass-strong: rgba(14, 12, 10, 0.92);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);
  --font-sans: "Space Grotesk", sans-serif;
  --font-serif: "Cormorant Garamond", serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 3vw, 40px);
  --ease: cubic-bezier(0.2, 0.75, 0.2, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  touch-action: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
.mono { font-family: var(--font-mono); }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--accent); }

#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
body.is-dragging #gl { cursor: grabbing; }
body.is-hovering #gl { cursor: pointer; }

.veil {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background:
    radial-gradient(ellipse 60% 48% at 50% 50%, rgba(7, 6, 5, 0.78), rgba(7, 6, 5, 0.25) 65%, transparent 80%),
    linear-gradient(180deg, rgba(7, 6, 5, 0.7), transparent 18%, transparent 78%, rgba(7, 6, 5, 0.85));
  transition: opacity 0.9s var(--ease);
}
body.is-exploring .veil { opacity: 0.35; }

.grain {
  /* sabit grain: canvas uzerinde hareketli tam ekran katman her karede yeniden birlestiriliyordu */
  position: fixed; inset: 0; pointer-events: none; z-index: 60; opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes grain {
  0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); }
  75% { transform: translate(-2%, -1%); } 100% { transform: translate(0, 0); }
}

/* loader */
.loader { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: var(--bg); transition: opacity 0.8s var(--ease), visibility 0.8s; }
body:not(.is-loading) .loader { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { display: grid; gap: 10px; justify-items: center; }
.loader-inner span { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.loader-inner b { font-family: var(--font-serif); font-weight: 400; font-size: 5rem; line-height: 1; }
.loader-bar { display: block; width: 180px; height: 1px; background: var(--line); }
.loader-help { max-width: 420px; margin: 14px 0 0; text-align: center; font-size: 0.85rem; line-height: 1.6; color: var(--muted-strong); }
.loader-help b { color: var(--accent); font-weight: 500; }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }

/* header */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 18px var(--gutter);
}
.logo { font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; }
.logo sup { color: var(--accent); }
.top-nav { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); }
.top-nav button { padding: 0.5rem 0.95rem; border-radius: 999px; font-size: 0.84rem; color: var(--muted-strong); transition: background 0.25s, color 0.25s; }
.top-nav button:hover, .top-nav button.on { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.top-nav .top-cta { background: var(--text); color: #0b0a09; }
.top-nav .top-cta:hover { background: var(--accent); color: #0b0a09; }
.top-meta { font-size: 0.7rem; color: var(--muted); display: flex; align-items: center; gap: 0.45rem; }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: #9be37a; box-shadow: 0 0 10px #9be37a; }

/* hero */
.hero {
  position: fixed; left: 0; right: 0; top: 50%; z-index: 10; text-align: center; pointer-events: none;
  transform: translateY(-78%); padding: 0 var(--gutter);
  transition: opacity 0.7s var(--ease), transform 0.9s var(--ease), filter 0.7s;
}
body.is-exploring .hero { opacity: 0; transform: translateY(-95%) scale(0.96); filter: blur(8px); }
.eyebrow { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin: 0 0 1.1rem; }
h1 { margin: 0; font-weight: 500; font-size: clamp(2.4rem, 6.4vw, 6.2rem); line-height: 0.98; letter-spacing: -0.04em; text-shadow: 0 10px 60px rgba(0, 0, 0, 0.6); }
.h-line { display: block; overflow: hidden; }
h1 em { letter-spacing: -0.01em; }

/* ask bar */
.ask-wrap {
  position: fixed; z-index: 20; left: 50%; width: min(680px, calc(100% - 32px));
  top: 50%; transform: translate(-50%, 70%);
  transition: top 0.9s var(--ease), transform 0.9s var(--ease);
}
body.is-exploring .ask-wrap { top: calc(100% - 24px); transform: translate(-50%, -100%); }
.ask {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 20px; border-radius: 999px;
  background: var(--glass-strong); border: 1px solid var(--line-strong);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.ask:focus-within { border-color: rgba(215, 178, 137, 0.6); box-shadow: 0 20px 70px rgba(0, 0, 0, 0.55), 0 0 0 4px rgba(215, 178, 137, 0.1); }
.ask-icon { color: var(--accent); font-size: 1rem; }
.ask input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font: 400 1.05rem var(--font-sans); padding: 10px 0; }
.ask input::placeholder { color: var(--muted); }
.ask-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #0b0a09; font-weight: 700; flex-shrink: 0; transition: transform 0.2s; }
.ask-btn:hover { transform: scale(1.06); }
/* kategori cubugu: giriste satirlara yayilir, gezinirken tek satir kayar */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
body.is-exploring .chips {
  flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding: 2px 24px;
  margin: 10px -24px 0; touch-action: pan-x;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
}
body.is-exploring .chips::-webkit-scrollbar { display: none; }
.chips button { white-space: nowrap; flex-shrink: 0; }
.chips button sup { font-family: var(--font-mono); font-size: 0.6rem; color: var(--muted); margin-left: 3px; }
.chips button.on { background: var(--text); color: #0b0a09; border-color: var(--text); }
.chips button.on sup { color: #0b0a09; opacity: 0.55; }
/* sirket butonlari: kendi renginde cerceve + nokta */
.cat-sep { flex-shrink: 0; align-self: center; font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 0 4px 0 10px; border-left: 1px solid var(--line-strong); margin-left: 4px; }
.chips button.co { border-color: color-mix(in srgb, var(--c) 55%, transparent); color: var(--text); }
.chips button.co:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.chips button.co.on { background: var(--c); border-color: var(--c); color: #0b0a09; }
.chips button.co.on .co-dot { background: #0b0a09; box-shadow: none; }
.co-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); margin-right: 7px; vertical-align: 1px; }
.tags span.hl[style] { color: var(--c); border-color: color-mix(in srgb, var(--c) 50%, transparent); }
.chips button {
  padding: 0.45rem 0.85rem; border-radius: 999px; font-size: 0.8rem; color: var(--muted-strong);
  background: rgba(14, 12, 10, 0.8); border: 1px solid var(--line);
  transition: 0.25s;
}
.chips button:hover { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }

/* answer card */
.answer {
  position: fixed; z-index: 21; left: var(--gutter); bottom: 150px; width: min(400px, calc(100% - 32px));
  padding: 16px 18px 16px; border-radius: 20px; background: var(--glass-strong); border: 1px solid var(--line);
 box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  animation: rise 0.5s var(--ease) both;
}
.answer[hidden] { display: none; }
.answer-head { display: flex; align-items: center; gap: 8px; font-size: 0.66rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.answer-head span:nth-child(2) { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.answer-head button { color: var(--muted); font-size: 0.8rem; }
.answer-head button:hover { color: var(--text); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); flex-shrink: 0; }
.answer-text { margin: 10px 0 0; font-size: 0.98rem; line-height: 1.5; min-height: 1.5em; }
.answer-text b { color: var(--accent); font-weight: 500; }
.answer-text .caret { display: inline-block; width: 7px; height: 1em; background: var(--accent); vertical-align: -2px; margin-left: 2px; animation: blink 0.8s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.answer-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.answer-actions:empty { display: none; }
.answer-actions a, .answer-actions button {
  font-family: var(--font-mono); font-size: 0.7rem; padding: 0.42rem 0.7rem; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--text); transition: 0.2s; animation: rise 0.4s var(--ease) both;
}
.answer-actions a:hover, .answer-actions button:hover { border-color: var(--accent); background: var(--accent-soft); }
.answer-actions .primary { background: var(--accent); border-color: var(--accent); color: #0b0a09; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* about acikken cevap ve soru cubugu sag alana gecer */
@media (min-width: 821px) {
  body.about-open .answer { left: auto; right: var(--gutter); }
  body.about-open .ask-wrap { left: calc(460px + (100% - 460px) / 2); width: min(560px, calc(100% - 500px)); }
  body.about-open .filter-pill { left: calc(460px + (100% - 460px) / 2); }
}

/* filter pill */
.filter-pill {
  position: fixed; z-index: 25; top: 74px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 14px; border-radius: 999px;
  background: var(--glass-strong); border: 1px solid var(--line);
  font-size: 0.7rem; color: var(--muted-strong); animation: fade 0.5s var(--ease) both; white-space: nowrap;
}
.filter-pill[hidden] { display: none; }
.filter-pill b { color: var(--text); font-weight: 500; }
.filter-pill button { padding: 0.35rem 0.65rem; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 0.66rem; }
.filter-pill button:hover { border-color: var(--accent); }

/* about panel */
.about {
  position: fixed; z-index: 26; top: 0; bottom: 0; left: 0; width: min(460px, 100%);
  padding: 76px 28px 120px; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y;
  background: linear-gradient(90deg, rgba(10, 9, 8, 0.96), rgba(10, 9, 8, 0.88));
  border-right: 1px solid var(--line);
  animation: slideIn 0.7s var(--ease) both;
}
.about[hidden] { display: none; }
.about::-webkit-scrollbar { width: 6px; } .about::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }
@keyframes slideIn { from { transform: translateX(-40px); opacity: 0; } to { transform: none; opacity: 1; } }
.about-close { position: absolute; top: 80px; right: 22px; font-size: 0.68rem; color: var(--muted); padding: 0.35rem 0.6rem; border: 1px solid var(--line); border-radius: 999px; z-index: 2; }
.about-close:hover { color: var(--text); border-color: var(--line-strong); }
.portrait { position: relative; aspect-ratio: 1150 / 768; border-radius: 18px; overflow: hidden; margin: 0 0 22px; background: #e9e9e9; }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* goz bebekleri: eye pngs merkezleri (494,306) ve (614,292) / 1150x768 */
.portrait .pupil { position: absolute; width: 2.6%; aspect-ratio: 1; border-radius: 50%; background: #111; margin: -1.3% 0 0 -1.3%; transition: transform 0.12s linear; }
.pupil-l { left: 43%; top: 39.84%; }
.pupil-r { left: 53.39%; top: 38.09%; }
.about h2 { font-size: clamp(2.4rem, 5vw, 3.2rem); font-weight: 500; letter-spacing: -0.04em; margin: 0; line-height: 1; }
.about .role { font-family: var(--font-serif); font-style: italic; font-size: 1.4rem; color: var(--accent); margin: 6px 0 14px; }
.about .bio { color: var(--muted-strong); line-height: 1.6; font-size: 0.95rem; margin: 0 0 12px; }
.about .bio b { color: var(--text); font-weight: 500; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 20px 0 24px; }
.stats div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 10px 8px; }
.stats b { display: block; font-family: var(--font-serif); font-weight: 400; font-size: 1.9rem; line-height: 1; }
.stats span { display: block; font-size: 0.62rem; color: var(--muted); margin-top: 4px; line-height: 1.3; }
.about h3 { font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 500; margin: 24px 0 10px; }
.xp { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.xp li { display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.xp span { grid-row: span 2; font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted); padding-top: 3px; }
.xp b { font-weight: 500; }
.xp em { font-size: 1rem; color: var(--muted-strong); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; font-size: 0.68rem; }
.tags span { padding: 0.3rem 0.55rem; border: 1px solid var(--line); border-radius: 7px; color: var(--muted-strong); }
.tags span.hl { color: var(--accent); border-color: rgba(215, 178, 137, 0.4); }
.about-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.btn-primary, .btn-ghost { padding: 0.8rem 1.2rem; border-radius: 999px; font-size: 0.9rem; font-weight: 500; transition: 0.2s; }
.btn-primary { background: var(--accent); color: #0b0a09; font-weight: 700; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border: 1px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); }

/* detail */
.detail {
  position: fixed; inset: 0; z-index: 50; display: grid; grid-template-columns: minmax(0, 1fr) 380px;
  background: rgba(5, 4, 4, 0.92);
  animation: fade 0.4s var(--ease) both;
}
.detail[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.detail-media { display: grid; place-items: center; padding: 70px 24px 24px; min-height: 0; }
.detail-media img, .detail-media video { max-width: 100%; max-height: calc(100vh - 100px); border-radius: 14px; display: block; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6); animation: zoomIn 0.5s var(--ease) both; }
@keyframes zoomIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
.detail-side { border-left: 1px solid var(--line); padding: 80px 28px 28px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; touch-action: pan-y; }
.detail-close { align-self: flex-end; font-size: 0.7rem; color: var(--muted); border: 1px solid var(--line); padding: 0.4rem 0.7rem; border-radius: 999px; margin-bottom: 18px; }
.detail-close:hover { color: var(--text); }
.detail-side h2 { margin: 0; font-size: clamp(1.8rem, 2.6vw, 2.4rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; }
.detail-desc { color: var(--muted-strong); line-height: 1.55; font-family: var(--font-serif); font-size: 1.25rem; font-style: italic; margin: 8px 0 14px; }
.detail-nav { margin-top: auto; padding-top: 24px; display: flex; justify-content: space-between; align-items: center; font-size: 0.72rem; color: var(--muted); }
.detail-nav button { border: 1px solid var(--line-strong); padding: 0.55rem 0.9rem; border-radius: 999px; color: var(--text); }
.detail-nav button:hover { border-color: var(--accent); }

/* hud */
.hud { position: fixed; z-index: 15; left: var(--gutter); bottom: 22px; font-size: 0.66rem; color: var(--muted); display: flex; gap: 8px; transition: opacity 0.4s; }
.hud .sep { opacity: 0.5; }
.radio {
  position: fixed; z-index: 15; right: var(--gutter); bottom: 18px; display: flex; align-items: center; gap: 8px;
  font-size: 0.66rem; color: var(--muted-strong); padding: 0.5rem 0.8rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--glass);
}
.radio:hover { border-color: var(--accent); }
.radio-bars { display: flex; gap: 2px; align-items: flex-end; height: 12px; }
.radio-bars i { width: 2px; height: 30%; background: var(--accent); border-radius: 1px; }
.radio.on .radio-bars i { animation: eq 0.9s ease-in-out infinite; }
.radio.on .radio-bars i:nth-child(2) { animation-delay: -0.3s; } .radio.on .radio-bars i:nth-child(3) { animation-delay: -0.6s; } .radio.on .radio-bars i:nth-child(4) { animation-delay: -0.15s; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
/* ust bar (z 30) tiklamayi yutmasin diye onun ustunde */
.classic {
  position: fixed; z-index: 31; right: var(--gutter); top: 72px; font-size: 0.68rem; color: var(--muted-strong);
  padding: 0.4rem 0.75rem; border-radius: 999px; border: 1px solid var(--line); background: var(--glass);
  transition: color 0.2s, border-color 0.2s;
}
.classic:hover { color: var(--accent); border-color: var(--accent); }
body.is-exploring .hud, body.is-exploring .radio { opacity: 0; pointer-events: none; }

/* responsive */
@media (max-width: 1080px) {
  .detail { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .detail-media { padding: 70px 16px 8px; }
  .detail-media img, .detail-media video { max-height: 58vh; }
  .detail-side { border-left: 0; border-top: 1px solid var(--line); padding: 18px 20px 22px; max-height: 42vh; }
  .detail-close { position: fixed; top: 18px; right: 16px; margin: 0; background: var(--glass-strong); }
}
@media (max-width: 820px) {
  .top-nav button:not(.top-cta) { display: none; }
  .top-meta, .classic { display: none; }
  .hero { transform: translateY(-118%); }
  .hero .eyebrow { font-size: 0.6rem; letter-spacing: 0.12em; }
  h1 { font-size: clamp(1.9rem, 8.6vw, 3.2rem); line-height: 1.02; }
  .ask-wrap { transform: translate(-50%, 40%); }
  .answer { left: 16px; right: 16px; width: auto; bottom: 140px; padding: 14px; }
  .chips {
    flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding: 2px 16px; margin: 10px -16px 0; touch-action: pan-x;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
  }
  .chips::-webkit-scrollbar { display: none; }
  .answer-text { font-size: 0.92rem; }
  .about { padding: 70px 18px 140px; }
  .about-close { top: 74px; right: 14px; }
  .stats b { font-size: 1.5rem; }
  .filter-pill { top: 66px; }
  .hud { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
}

/* detay: ise ozel link */
.detail-share { align-self: flex-start; margin-top: 16px; font-size: 0.72rem; padding: 0.55rem 0.9rem; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent); }
.detail-share:hover { background: var(--accent-soft); }
