/* ---------------------------------------------------------------------------
   Saha Defteri — bileşen katmanı
   styles.css tasarım sistemini kurar; bu dosya sayfaya özgü bileşenleri
   (deneyim karuseli, AXIOM sohbeti, intro kapısı, Obsidian grafı) giydirir.
   Tek aydınlık tema: eski theme-light/calm dalları kaldırıldı.
   --------------------------------------------------------------------------- */

html[lang="tr"] .lang-en { display: none !important; }
html[lang="en"] .lang-tr { display: none !important; }

/* Spiral WebGL kaldırıldı; olası artık canvas'lar görünmesin */
.hero__canvas { display: none !important; }

/* ---------------------------------------------------------------------------
   Deneyim karuseli — zaman çizelgesi kartları
   (index.html satır içi script'i 28px gap'e göre adım hesaplar; değiştirme)
   --------------------------------------------------------------------------- */

/* Deneyim arkası: defter karalamaları — spiral, yıldız, ok, zikzak... */
.approach {
  position: relative;
  isolation: isolate;
}

.approach::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='620'%20height='440'%3E%3Cg%20fill='none'%20stroke='%232547c0'%20stroke-width='2'%20stroke-linecap='round'%20opacity='0.09'%3E%3Cpath%20d='M84,70%20c-14,-2%20-20,-16%20-8,-24%20c12,-8%2028,2%2024,16%20c-4,16%20-26,20%20-36,8'/%3E%3Cpath%20d='M300,60%20l0,36%20M282,78%20l36,0%20M287,65%20l26,26%20M313,65%20l-26,26'/%3E%3Cpath%20d='M470,60%20c30,10%2044,34%2040,62%20m0,0%20l-10,-14%20m10,14%20l12,-12'/%3E%3Cpath%20d='M120,300%20l16,-18%2016,18%2016,-18%2016,18'/%3E%3Cpath%20d='M396,322%20l12,14%2026,-30'/%3E%3Cpath%20d='M500,250%20a20,20%200%201,1%2040,0%20a20,20%200%201,1%20-42,2'/%3E%3Cpath%20d='M240,196%20l28,0%20M254,182%20l0,28'/%3E%3Cpath%20d='M180,150%20c20,-14%2040,-14%2060,0'/%3E%3C/g%3E%3Cg%20fill='none'%20stroke='%23eab308'%20stroke-width='5'%20stroke-linecap='round'%20opacity='0.16'%3E%3Cpath%20d='M520,120%20l44,-10'/%3E%3Cpath%20d='M90,380%20l40,6'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 620px 440px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
}

.approach .ink-dust { z-index: -1; }

.approach__intro {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
  max-width: 30ch;
  margin-bottom: clamp(20px, 3vh, 36px);
}

.exp-carousel-scene {
  position: relative;
  overflow: visible;
  padding: 24px 0 40px;
  cursor: grab;
  user-select: none;
}

.exp-carousel-scene:active { cursor: grabbing; }

.exp-carousel-scene:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
  border-radius: var(--radius);
}

.exp-carousel-clip {
  overflow: hidden;
  position: relative;
  padding-top: 26px;
}

/* kayıtların asıldığı mürekkep ipi — bölüm göründüğünde kendini çizer */
.ink-rope {
  position: absolute;
  top: 12px;
  left: -1%;
  width: 102%;
  height: 20px;
  color: var(--accent);
  opacity: 0.5;
  z-index: 0;
}

.ink-rope path { stroke-width: 2.4; }

.ink-rope.is-inked path { animation-duration: 1.3s; }

/* ip üzerinde kayan şekiller — karuselin 4 sn'lik ritmiyle senkron,
   her biri farklı renk/biçimde baştan sona tam 4 sn'de gider */
.rope-shape { opacity: 0; }

.rope-shape--dot circle { fill: #2547c0; }
.rope-shape--square rect { fill: #0f7a5c; }
.rope-shape--tri polygon { fill: #9c6b10; }
.rope-shape--diamond polygon { fill: #c8371f; }

@media (prefers-reduced-motion: reduce) {
  .rope-shape { display: none; }
  .approach::before { opacity: 0.6; }
}

.exp-carousel-track {
  display: flex;
  gap: 28px;
  will-change: transform;
  padding: 12px 0 20px;
}

.exp-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14%;
  pointer-events: none;
  z-index: 10;
}

.exp-fade--left {
  left: 0;
  background: linear-gradient(to right, var(--bg) 0%, transparent 100%);
}

.exp-fade--right {
  right: 0;
  background: linear-gradient(to left, var(--bg) 0%, transparent 100%);
}

/* Kart = defterden bir fiş: beyaz yüzey, mono künye, mürekkep çizgisi */
.exp-card {
  position: relative;
  margin-top: 12px;
  flex: 0 0 clamp(280px, 30vw, 350px);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 24px 22px 20px;
  opacity: 0.86;
  transform: scale(0.96) rotate(var(--tilt, 0deg));
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
  user-select: none;
}

.exp-card:nth-child(odd) { --tilt: 0.8deg; }
.exp-card:nth-child(even) { --tilt: -0.7deg; }

/* her fiş ipe sarı bantla asılı */
.exp-card::before {
  content: '';
  position: absolute;
  top: -9px;
  left: 50%;
  width: 38px;
  height: 15px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(255, 216, 77, 0.55);
  border: 1px solid rgba(156, 107, 16, 0.14);
  box-shadow: 0 1px 2px rgba(26, 39, 51, 0.1);
}

.exp-card:nth-child(even)::before { transform: translateX(-50%) rotate(2.5deg); }

.exp-card.exp-card--near { opacity: 0.94; }

.exp-card.exp-card--active {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  border-color: var(--fg);
  box-shadow: var(--shadow);
}
.exp-card.exp-card--active::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 18px;
  width: 31px;
  height: 31px;
  border: 2px double rgba(177,61,44,.58);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 5px rgba(177,61,44,.36);
  transform: rotate(-18deg) scale(1);
  animation: exp-stamp 540ms cubic-bezier(.12,.8,.3,1) both;
  pointer-events: none;
}
@keyframes exp-stamp { from { opacity: 0; transform: rotate(-18deg) scale(2.1); } to { opacity: 1; transform: rotate(-18deg) scale(1); } }

.exp-card__logo {
  height: 76px;
  display: flex;
  align-items: center;
  padding: 7px 12px;
  margin-bottom: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(26,39,51,.14);
  border-left: 3px solid var(--accent);
  box-shadow: 2px 3px 0 rgba(26,39,51,.06);
}

.exp-card__logo img {
  max-height: 62px;
  max-width: 230px;
  object-fit: contain;
  filter: none;
}

.exp-card.exp-card--active .exp-card__logo { border-color: var(--accent); box-shadow: 3px 4px 0 var(--accent-dim); }

.exp-card__logo img.logo-highlight { max-height: 62px; }
.exp-card__logo img.logo-xl { width: 150px; height: 150px; max-height: none; max-width: none; flex: none; }

.exp-card__logo--wordmark {
  font-family: var(--serif);
  font-weight: 800;
  font-size: 29px;
  letter-spacing: -.055em;
  color: #17455b;
}
.exp-card__logo-dot { color: #d6814f; }
.exp-card__logo--prosicht { color: #284b80; letter-spacing: -.035em; }

/* A quieter editorial spread between the experience archive and writing. */
.community {
  max-width: var(--max);
  padding: clamp(64px, 8vw, 112px) var(--gutter);
  margin: 0 auto;
  border-top: 1px solid var(--rule);
}
.community__head { max-width: 880px; margin-bottom: 38px; }
.community__head h2 {
  font-family: var(--serif);
  font-size: clamp(32px, 4.2vw, 60px);
  font-weight: 600;
  letter-spacing: -.055em;
  line-height: 1.08;
  margin: 24px 0 14px;
}
.community__head > p:last-child { color: var(--fg-dim); max-width: 640px; }
.community__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.community__card {
  display: grid;
  grid-template-columns: minmax(145px, 35%) minmax(0, 1fr);
  min-height: 280px;
  padding: 0;
  background: #f1f6f8;
  border: 1px solid #cbdce3;
  box-shadow: 6px 7px 0 rgba(22, 78, 112, .08);
  position: relative;
  overflow: hidden;
}
.community__card--club { border-left: 4px solid #1684b9; }
.community__card--dersdem { border-left: 4px solid #2e69a4; background: #f1f3f9; border-color: #cdd6e8; }
.community__mark { display: grid; place-items: center; align-self: stretch; background: #e1eef1; border-right: 1px solid #cbdce3; padding: 24px; }
.community__mark img { width: 100%; height: 100%; max-height: 190px; object-fit: contain; }
.community__mark--dersdem { background: #dce8f4; overflow: hidden; padding: 10px; }
.community__mark--dersdem img { width: 100%; height: 100%; max-height: none; object-fit: contain; }
.community__copy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-width: 0; padding: clamp(22px, 2.5vw, 34px); }
.community__eyebrow {
  display: inline-block;
  font: 600 11px var(--mono);
  letter-spacing: .1em;
  color: var(--accent);
  background: #edf2fb;
  border: 1px solid #c9d6f2;
  padding: 5px 8px;
}
.community__card--dersdem .community__eyebrow { color: #15567b; background: #e9f4f7; border-color: #badce6; }
.community__copy h3 { font: 600 clamp(23px, 2.5vw, 31px)/1.13 var(--serif); letter-spacing: -.04em; margin: 16px 0 13px; }
.community__copy p { color: var(--fg-dim); font-size: 15px; line-height: 1.5; }
.community__copy .community__role {
  color: var(--fg);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  margin: 0 0 9px;
}
@media (max-width: 800px) {
  .community__grid { grid-template-columns: 1fr; }
  .community__card { min-height: 250px; }
}
@media (max-width: 500px) {
  .community__card { grid-template-columns: 86px minmax(0, 1fr); min-height: 238px; }
  .community__mark { padding: 8px; }
  .community__copy { padding: 16px; }
  .community__copy h3 { font-size: 22px; margin: 12px 0 10px; }
  .community__eyebrow { font-size: 9px; letter-spacing: .04em; padding: 4px 5px; }
  .community__copy .community__role { font-size: 14px; }
  .community__copy p { font-size: 14px; }
}

.exp-card__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.25;
  margin-bottom: 10px;
}

.exp-card__body {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--fg-dim);
}

.exp-card__line {
  height: 2px;
  background: var(--rule);
  margin-top: 16px;
  position: relative;
  overflow: hidden;
}

.exp-card__line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 380ms var(--ease);
}

.exp-card.exp-card--active .exp-card__line::after { transform: scaleX(1); }

@media (max-width: 900px) {
  .exp-card { flex: 0 0 clamp(260px, 75vw, 320px); }
  .exp-fade { width: 8%; }
}

/* --- Gezinme: sol/sağ ok düğmeleri + dosya sekmesi noktaları --------------- */
/* Sürükleme/ok tuşu tek başına fark edilmiyordu; bu, görünür ve dokunması
   kolay asıl "seçim" kontrolüdür. */

.exp-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vw, 28px);
  margin-top: 8px;
}

.exp-nav__arrow {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--fg);
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.exp-nav__arrow svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.exp-nav__arrow:hover,
.exp-nav__arrow:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow);
}

.exp-nav__arrow:active { transform: translateY(0) scale(0.97); }

.exp-dots {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 60vw;
}

.exp-dot {
  flex: none;
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--rule);
  background: var(--surface);
  cursor: pointer;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease),
    background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.exp-dot:hover { border-color: var(--fg); transform: scale(1.2); }

.exp-dot.is-active {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.35);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

/* Üç saha kaydı: dikey çekmeceler, komşu fişlerin kenarı görünür. */
.exp-fieldnote-slider {
  --fieldnote-height: 430px;
  --fieldnote-travel: 430px;
  width: min(920px, 100%);
  margin: clamp(34px, 5vw, 64px) auto 0;
}
.exp-fieldnote-slider__stage {
  position: relative;
  height: 570px;
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  perspective: 1100px;
  border-left: 1px solid rgba(26,39,51,.11);
  border-right: 1px solid rgba(26,39,51,.11);
  background: linear-gradient(90deg, rgba(26,39,51,.025), transparent 6%, transparent 94%, rgba(26,39,51,.025));
}
.exp-fieldnote-slider__stage.is-grabbing { cursor: grabbing; }
.exp-fieldnote-slider:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.exp-fieldnote {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, .75fr);
  width: calc(100% - 48px);
  height: var(--fieldnote-height);
  background: var(--surface);
  border: 1px solid var(--rule);
  box-shadow: 8px 10px 0 rgba(26,39,51,.06);
  transition: transform 850ms cubic-bezier(.22,1,.36,1), opacity 720ms ease, filter 720ms ease;
}
.exp-fieldnote[hidden] { display: none; }
.exp-fieldnote.is-active { z-index: 3; opacity: 1; transform: translate(-50%, -50%) rotate(-.4deg); }
.exp-fieldnote.is-before {
  z-index: 1;
  opacity: .78;
  filter: saturate(.72);
  transform: translate(-50%, -50%) translateY(calc(-1 * var(--fieldnote-travel))) scale(.94) rotate(-1.1deg);
  cursor: pointer;
}
.exp-fieldnote.is-after {
  z-index: 2;
  opacity: .78;
  filter: saturate(.72);
  transform: translate(-50%, -50%) translateY(var(--fieldnote-travel)) scale(.94) rotate(.8deg);
  cursor: pointer;
}
.exp-fieldnote:not(.is-active)::before,
.exp-fieldnote:not(.is-active)::after {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  height: 39px;
  display: flex;
  align-items: center;
  padding: 0 22px;
  background: rgba(254,254,253,.94);
  color: var(--accent);
  font: 600 11px var(--mono);
  letter-spacing: .12em;
  pointer-events: none;
}
.exp-fieldnote.is-before::after { content: attr(data-peek-label) ' ↑'; bottom: 0; border-top: 1px solid var(--rule); }
.exp-fieldnote.is-after::before { content: attr(data-peek-label) ' ↓'; top: 0; border-bottom: 1px solid var(--rule); }
.exp-fieldnote__image { position: relative; overflow: hidden; }
.exp-fieldnote__image::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255,255,255,.5);
  pointer-events: none;
}
.exp-fieldnote__image img {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  filter: saturate(.89) contrast(1.03);
  transition: transform 900ms cubic-bezier(.22,1,.36,1), filter 720ms ease;
}
.exp-fieldnote:hover .exp-fieldnote__image img { transform: scale(1.035); filter: saturate(1) contrast(1.03); }
.exp-fieldnote__caption {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 17px;
  padding: clamp(24px, 3vw, 42px);
  border-left: 1px solid var(--rule);
  background: repeating-linear-gradient(0deg, transparent 0 27px, rgba(37,71,192,.045) 27px 28px), var(--surface);
}
.exp-fieldnote__caption strong { font-family: var(--serif); font-size: clamp(25px, 2.5vw, 37px); line-height: 1.1; letter-spacing: -.035em; }
.exp-fieldnote__caption > span:last-child { max-width: 32ch; font-size: 14px; line-height: 1.65; color: var(--fg-dim); }
.exp-fieldnote-slider__meta { display: flex; justify-content: flex-end; margin-top: 16px; color: var(--fg-dim); font: 10px var(--mono); letter-spacing: .08em; }
.exp-fieldnote-slider__count { white-space: nowrap; }

@media (max-width: 820px) {
  .exp-fieldnote-slider { --fieldnote-height: 455px; --fieldnote-travel: 440px; }
  .exp-fieldnote-slider__stage { height: 590px; }
  .exp-fieldnote { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; width: calc(100% - 28px); }
  .exp-fieldnote__image img { min-height: 0; }
  .exp-fieldnote__caption { border-left: 0; border-top: 1px solid var(--rule); gap: 10px; padding: 20px 22px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .exp-fieldnote, .exp-fieldnote__image img { transition-duration: 0.01ms; }
}

@media (max-width: 640px) {
  .exp-nav { gap: 12px; }
  .exp-nav__arrow { width: 42px; height: 42px; }
  .exp-dots { max-width: 68vw; gap: 8px; }
  .exp-dot { width: 10px; height: 10px; }
}

/* ---------------------------------------------------------------------------
   AXIOM sohbeti — "Ek A": köşedeki asistan dosyanın canlı eki
   --------------------------------------------------------------------------- */

#rag-toggle {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--fg);
  background: var(--fg);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

#rag-toggle svg { width: 26px; height: 26px; }

#rag-toggle:hover {
  transform: translateY(-3px);
  background: var(--accent);
  border-color: var(--accent);
}

#rag-toggle.is-open { background: var(--accent); border-color: var(--accent); }

/* ─── AXIOM Portal — bulutlu dünya ────────────────────────────────────────
   FAB'a basınca onun konumundan büyüyen bir mürekkep çemberiyle (clip-path iris) tam
   ekran bir gökyüzü dünyasına geçilir. Sohbetin kendisi (.rag-header/
   .rag-messages/.rag-form) rag-core.js'ten aynen mountlanır — burada
   sadece çevre/sahne değişiyor. ────────────────────────────────────────── */


/* ─── Dünya — tam ekran gökyüzü portalı ──────────────────────────────────── */

.rag-world {
  position: fixed;
  inset: 0;
  z-index: 1001;
  overflow: hidden;
  background: linear-gradient(to bottom, #eaf1fb 0%, #f7f8f6 60%, #fdf6e3 100%);
  clip-path: circle(0px at var(--iris-x, 50%) var(--iris-y, 50%));
  opacity: 1;
  transition: clip-path 720ms var(--ease);
}

.rag-world[hidden] { display: none; }

.rag-world.is-open {
  clip-path: circle(150% at var(--iris-x, 50%) var(--iris-y, 50%));
}

/* Kapanış çemberi geri sarmaz — sadece opacity söner, clip-path 150%'de sabit kalır. */
.rag-world.is-closing {
  transition: opacity 260ms var(--ease);
  opacity: 0;
}

.rag-world__sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.rag-world__silhouettes { position: absolute; inset: 0; }

.rag-world__silhouette {
  position: absolute;
  color: rgba(37, 71, 192, 0.22);
}

.rag-world__silhouette--0 {
  width: 44px; height: 28px; top: 20%; left: -8%;
  animation: rag-silhouette-drift 48s linear infinite;
}

.rag-world__silhouette--1 {
  width: 38px; height: 38px; top: 48%; left: -8%;
  color: rgba(15, 122, 92, 0.2);
  animation: rag-silhouette-drift 60s linear infinite 9s;
}

.rag-world__silhouette--2 {
  width: 42px; height: 30px; top: 70%; left: -8%;
  color: rgba(156, 107, 16, 0.2);
  animation: rag-silhouette-drift 68s linear infinite 21s;
}

@keyframes rag-silhouette-drift {
  from { transform: translateX(0); }
  to { transform: translateX(122vw); }
}

/* Gerçek kümülüs siluetleri — üst üste binen daire kümesi, tek bir
   tekrarlayan doku değil. Her bulut kendi <div>'i: konum sabit, hareket
   sadece transform:translateX ile (kompozitör dostu, layout tetiklemez). */
.rag-cloud {
  position: absolute;
  animation-name: rag-cloud-cross;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  pointer-events: none;
  will-change: transform;
}

@keyframes rag-cloud-cross {
  from { transform: translateX(0); }
  to { transform: translateX(148vw); }
}

.rag-cloud-shape {
  position: relative;
  width: 84px;
  height: 84px;
  background: #fff;
  border-radius: 50%;
  box-shadow:
    58px 10px 0 -10px #fff,
    -50px 16px 0 -16px #fff,
    26px -24px 0 -8px #fff,
    86px -8px 0 -20px #fff,
    -20px -22px 0 -18px #fff,
    50px 24px 0 -12px #fff,
    8px 34px 0 -22px #fff;
}

.rag-cloud--back { opacity: 0.5; filter: blur(1px); }
.rag-cloud--mid { opacity: 0.78; }
.rag-cloud--front { opacity: 0.95; }

.rag-world__close {
  position: absolute;
  top: clamp(16px, 3vw, 28px);
  right: clamp(16px, 3vw, 28px);
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--fg);
  background: var(--surface);
  color: var(--fg);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.rag-world__close:hover,
.rag-world__close:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  transform: rotate(90deg);
}

/* Sinematik ışık — sabit bir güneş kaynağı + yatay puslu ufuk */
.rag-world__sun {
  position: absolute;
  top: -12%;
  right: 6%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 250, 228, 0.85) 0%, rgba(255, 250, 228, 0.3) 42%, transparent 72%);
  filter: blur(2px);
}

.rag-world__haze {
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(to top, rgba(253, 246, 227, 0.6), transparent);
}

/* Kuşun serbestçe dolaştığı sahne — sohbetle etkileşimi engellemesin diye
   kendi katmanı, pointer-events kapalı (fare takibi world seviyesinde). */
.rag-world__stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.rag-bird {
  position: absolute;
  left: 50%;
  top: 26%;
  width: clamp(76px, 9vw, 112px);
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 12px 20px rgba(26, 39, 51, 0.18));
  opacity: 1;
  transition: opacity 0.5s var(--ease);
}

.rag-bird[data-mood="sleeping"] { opacity: 0; }

.rag-bird__mood { width: 100%; }
.rag-bird__art { width: 100%; transition: transform 0.5s var(--ease); }
.rag-bird__art svg { display: block; width: 100%; height: auto; overflow: visible; }

.rag-bird__wing {
  fill: var(--fg);
  transform-box: fill-box;
  transform-origin: 62% 62%;
  animation: rag-wingbeat 4.6s ease-in-out infinite;
}

.rag-bird.is-flying .rag-bird__wing { animation-duration: 2.4s; }
.rag-bird[data-mood="thinking"] .rag-bird__wing { animation-duration: 1s; }

@keyframes rag-wingbeat {
  0%, 100% { transform: rotate(0deg) scaleY(1); }
  50% { transform: rotate(-16deg) scaleY(0.88); }
}

.rag-bird__body {
  fill: none;
  stroke: var(--fg);
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke var(--dur) var(--ease);
}

.rag-bird__legs {
  fill: none;
  stroke: var(--fg-dim);
  stroke-width: 1.8;
  stroke-linecap: round;
  opacity: 0.7;
}

/* dikkat hâlleri — bir ipucu kadar mürekkep mavisi, robotik parlama değil */
.rag-bird[data-mood="listening"] .rag-bird__body,
.rag-bird[data-mood="thinking"] .rag-bird__body {
  stroke: var(--accent);
}

.rag-bird--flourish { animation: rag-bird-flourish 0.65s var(--ease); }
.rag-bird--flinch { animation: rag-bird-flinch 0.6s var(--ease); }

@keyframes rag-bird-flourish {
  0% { transform: scale(1) translateY(0); }
  40% { transform: scale(1.14) translateY(-9px); }
  100% { transform: scale(1) translateY(0); }
}

@keyframes rag-bird-flinch {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  30% { transform: translateY(5px) rotate(-6deg); }
  60% { transform: translateY(2px) rotate(4deg); }
}

/* Sohbet camı — ortama uygun: kağıt panel değil, bulut camı. Kendi
   sahnesinde yükselerek girer (sinematik: gökyüzü → kuş → sohbet). */
.rag-world__chat {
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 5vh, 52px);
  transform: translate(-50%, 22px);
  z-index: 3;
  width: min(480px, calc(100vw - 32px));
  height: min(56vh, 500px);
  opacity: 0;
  transition: transform 0.6s var(--ease), opacity 0.6s var(--ease);
}

.rag-world__chat.is-risen { opacity: 1; transform: translate(-50%, 0); }

.rag-world__chat-glass {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px) saturate(1.1);
  -webkit-backdrop-filter: blur(20px) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 26px;
  box-shadow: 0 30px 70px rgba(26, 39, 51, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

@media (max-width: 640px) {
  .rag-bird { top: 16%; width: clamp(64px, 20vw, 84px); }
  .rag-world__chat { width: calc(100vw - 20px); height: min(64vh, 540px); bottom: 12px; }
  .rag-world__chat-glass { border-radius: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .rag-world { transition: none; }
  .rag-world.is-closing { transition: none; opacity: 0; }
  .rag-world__chat { transition: none; opacity: 1; transform: translate(-50%, 0); }
  .rag-cloud,
  .rag-world__silhouette,
  .rag-bird__wing,
  .rag-bird--flourish,
  .rag-bird--flinch { animation: none !important; }
  .rag-bird { transition: none; opacity: 1; }
  .rag-bird__art { transition: none; }
}

.rag-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}

.rag-header-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.rag-icon {
  width: 34px;
  height: 34px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--fg);
  color: var(--bg);
}

.rag-icon svg { width: 20px; height: 20px; }

.rag-title {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.rag-title::before { content: 'EK A — '; color: var(--accent); }

.rag-subtitle {
  font-size: 11.5px;
  color: var(--fg-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rag-close {
  flex: none;
  width: 30px;
  height: 30px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: transparent;
  color: var(--fg);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.rag-close:hover { border-color: var(--fg); background: var(--bg-soft); }

.rag-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* mesaj zemini: hafif milimetrik doku */
  background-image: linear-gradient(var(--grid) 1px, transparent 1px);
  background-size: 100% 28px;
}

.rag-message {
  max-width: 86%;
  padding: 10px 13px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.55;
}

.rag-message--user {
  align-self: flex-end;
  background: var(--fg);
  color: var(--bg);
}

.rag-message--assistant {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--rule);
}

.rag-message--error {
  align-self: flex-start;
  background: rgba(200, 55, 31, 0.08);
  border: 1px solid rgba(200, 55, 31, 0.35);
  color: #8f2716;
}

.rag-message--typing {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--rule);
}

.rag-typing-icon { display: inline-flex; color: var(--fg-dim); }
.rag-typing-icon svg { width: 16px; height: 16px; }

.rag-message--typing span:not(.rag-typing-icon) {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--fg-dim);
  animation: rag-blink 1.2s infinite;
}

.rag-message--typing span:nth-child(3) { animation-delay: 0.2s; }
.rag-message--typing span:nth-child(4) { animation-delay: 0.4s; }

@keyframes rag-blink {
  0%, 60%, 100% { opacity: 0.25; }
  30% { opacity: 1; }
}

.rag-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--rule);
  background: var(--bg);
}

.rag-input {
  flex: 1;
  min-width: 0;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 9px 12px;
}

.rag-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.rag-input::placeholder { color: var(--fg-dim); }
.rag-input:disabled { opacity: 0.55; }

.rag-send {
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 9px 14px;
  border: 1px solid var(--fg);
  border-radius: var(--radius);
  background: var(--fg);
  color: var(--bg);
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.rag-send:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); }
.rag-send:disabled { opacity: 0.5; cursor: default; }

/* ─── Bulut dünyasındaki sohbet — aynı .rag-* iskeleti, farklı giysi ───────
   Bilerek yalnızca .rag-world altında ezilir: .axiom-island (intro-gate,
   şu an hidden) hâlâ yukarıdaki kağıt-panel görünümünü kullanmalı. */

.rag-world .rag-header {
  background: transparent;
  border-bottom: 1px solid rgba(26, 39, 51, 0.1);
  padding: 14px 16px;
}

.rag-world .rag-icon {
  background: var(--fg);
  box-shadow: 0 6px 16px rgba(26, 39, 51, 0.25);
}

.rag-world .rag-close { display: none; } /* × zaten dünyanın köşesinde var */

.rag-world .rag-messages {
  background-image: none;
  padding: 16px;
  gap: 12px;
}

.rag-world .rag-message {
  max-width: 82%;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(26, 39, 51, 0.06);
}

.rag-world .rag-message--user {
  background: linear-gradient(135deg, var(--fg), #2a3b4d);
  border-bottom-right-radius: 4px;
}

.rag-world .rag-message--assistant {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-bottom-left-radius: 4px;
}

.rag-world .rag-message--error {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(200, 55, 31, 0.35);
}

.rag-world .rag-message--typing {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(255, 255, 255, 0.9);
}

.rag-world .rag-form {
  background: transparent;
  border-top: 1px solid rgba(26, 39, 51, 0.1);
  padding: 12px 14px 14px;
}

.rag-world .rag-input {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 10px 16px;
}

.rag-world .rag-input:focus { box-shadow: 0 0 0 3px var(--accent-dim); }

/* gönder düğmesi bir kağıt uçak — bulut siluetleriyle aynı motif ailesinden */
.rag-world .rag-send {
  border-radius: 50%;
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  flex: none;
}

.rag-world .rag-send:hover:not(:disabled) { transform: translate(2px, -2px) rotate(8deg); }

/* ---------------------------------------------------------------------------
   Intro kapısı (AXIOM 3D) — şu an hidden; yeniden açılırsa kağıt kimliğinde
   --------------------------------------------------------------------------- */

.intro-gate {
  position: relative;
  min-height: 100svh;
  background: var(--bg);
  overflow: hidden;
}

.intro-gate[hidden] { display: none; }

.intro-gate__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.14;
  filter: grayscale(1);
}

.intro-gate__stage { position: absolute; inset: 0; }

.intro-gate__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.intro-gate__skip {
  position: absolute;
  top: 84px;
  right: var(--gutter);
  z-index: 5;
  font-family: var(--mono);
  font-size: 12px;
  padding: 8px 14px;
  border: 1px solid var(--fg);
  border-radius: var(--radius);
  background: var(--surface);
}

.intro-gate__hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.axiom-island {
  position: absolute;
  z-index: 6;
  width: min(360px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--fg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

body.intro-gate-active #rag-toggle { display: none; }

/* ---------------------------------------------------------------------------
   Obsidian grafı (blog.html) — "Şekil" muamelesi görür
   --------------------------------------------------------------------------- */

.graph-wrapper {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.graph-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  margin-bottom: 4px;
}

.graph-subtitle {
  font-size: 13px;
  color: var(--fg-dim);
  margin-bottom: 14px;
}

.graph-container {
  position: relative;
  min-height: 380px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 42px 42px;
  cursor: grab;
  overflow: hidden;
}

.graph-container:active { cursor: grabbing; }

.graph-tooltip {
  position: absolute;
  pointer-events: none;
  font-family: var(--mono);
  font-size: 12px;
  background: var(--fg);
  color: var(--bg);
  padding: 6px 10px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 20;
}

/* ---------------------------------------------------------------------------
   Küçük yardımcılar (alt sayfalarda kullanılan sınıflar)
   --------------------------------------------------------------------------- */

.field__badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 2px 8px;
  margin-bottom: 8px;
}

.contact__col p,
.contact__col a { font-size: 15px; color: var(--fg-dim); }

/* AXIOM: a small ink engraved world. All selectors stay inside the portal. */

.rag-world {
  color: #183039;
  background: #d8e1de;
}
.rag-world__sky {
  background: linear-gradient(180deg, #1e3942 0%, #4e6970 29%, #adc0b7 60%, #d6e0d8 100%);
}
.rag-world__sky::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .23;
  background-image: radial-gradient(rgba(24,39,42,.3) .65px, transparent .8px),
    repeating-linear-gradient(0deg, transparent 0 8px, rgba(244,236,212,.12) 8px 9px);
  background-size: 5px 5px, 100% 9px;
  mix-blend-mode: multiply;
}
.rag-world__halo {
  position: absolute;
  width: min(78vw, 850px);
  aspect-ratio: 1;
  left: 12%;
  top: -22%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(226,239,226,.3) 0 14%, rgba(200,224,220,.18) 15% 30%, transparent 65%);
  filter: blur(2px);
}
.rag-world__sun {
  top: 10%;
  left: 31%;
  right: auto;
  width: clamp(115px, 19vw, 260px);
  height: auto;
  aspect-ratio: 1;
  background: #d9e4dc;
  border: 1px solid rgba(242,248,236,.65);
  box-shadow: 0 0 0 8px rgba(216,234,222,.08), 0 0 80px rgba(199,229,224,.34);
  filter: none;
  opacity: .94;
}
.rag-world__landscape { position: absolute; inset: 0; width: 100%; height: 100%; }
.rag-world__ridge--far { fill: #839998; opacity: .74; }
.rag-world__ridge--mid { fill: #607b7b; opacity: .83; }
.rag-world__ridge--near { fill: #304c53; }
.rag-world__shore { fill: none; stroke: #c7d9cf; stroke-width: 2; opacity: .65; }
.rag-world__shore--fine { stroke-width: 1; opacity: .32; }
.rag-world__haze {
  height: 32%;
  background: linear-gradient(0deg, rgba(21,47,54,.27), transparent);
}
.rag-world__folio {
  position: absolute;
  z-index: 3;
  top: clamp(20px, 4vh, 46px);
  left: clamp(20px, 4vw, 64px);
  display: flex;
  align-items: baseline;
  gap: 16px;
  color: #f2ead5;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-shadow: 0 1px 8px rgba(13,30,38,.45);
}
.rag-world__folio span:first-child { font-family: var(--serif); font-size: 27px; letter-spacing: -.04em; }
.rag-world__close {
  border-color: rgba(241,231,204,.8);
  background: rgba(24,48,57,.6);
  color: #f3ead5;
}
.rag-world__close:hover,
.rag-world__close:focus-visible { background: #456a70; border-color: #456a70; }

.rag-bird {
  width: clamp(180px, 27vw, 390px);
  filter: drop-shadow(0 18px 13px rgba(10,31,37,.22));
}
.rag-bird__wing { transform-box: fill-box; transform-origin: 70% 75%; animation: rag-crane-wing 5.4s ease-in-out infinite; }
.rag-bird__wing--rear { animation-delay: -.8s; }
.rag-bird.is-flying .rag-bird__wing { animation-duration: 2.7s; }
.rag-bird[data-mood="thinking"] .rag-bird__wing { animation-duration: 1.7s; }
.rag-bird__body { transition: none; }
.rag-bird[data-mood="listening"] .rag-bird__body,
.rag-bird[data-mood="thinking"] .rag-bird__body { stroke: #719599; }

.rag-bird__note {
  position: absolute;
  left: 73%;
  top: -10%;
  width: max-content;
  max-width: min(250px, 46vw);
  padding: 12px 15px;
  background: #eef3e9;
  color: #203c44;
  border: 1px solid #7c9c9a;
  border-radius: 2px 15px 15px 15px;
  box-shadow: 5px 6px 0 rgba(20,47,54,.19);
  font-family: var(--serif);
  font-size: clamp(13px, 1vw, 16px);
  line-height: 1.35;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}
.rag-bird__note::before {
  content: "";
  position: absolute;
  left: 14px;
  bottom: -10px;
  width: 14px;
  height: 14px;
  background: #eef3e9;
  border-right: 1px solid #7c9c9a;
  border-bottom: 1px solid #7c9c9a;
  transform: rotate(45deg);
}
.rag-bird__note.is-visible { opacity: 1; transform: translateY(0); }
@keyframes rag-crane-wing {
  0%, 100% { transform: rotate(0deg) scaleY(1); }
  50% { transform: rotate(-9deg) scaleY(.91); }
}

.rag-world__chat {
  left: auto;
  right: clamp(24px, 6vw, 100px);
  bottom: clamp(25px, 8vh, 90px);
  transform: translateY(24px);
  width: min(410px, 36vw);
  height: min(57vh, 500px);
}
.rag-world__chat.is-risen { transform: translateY(0); }
.rag-world__chat-glass {
  background: #e3ebe5;
  background-image: repeating-linear-gradient(95deg, rgba(41,68,68,.025) 0 1px, transparent 1px 5px);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid #a8ae9e;
  border-radius: 2px 25px 2px 25px;
  box-shadow: 18px 22px 0 rgba(19,44,51,.18), 0 22px 70px rgba(12,30,36,.28);
}
.rag-world .rag-header { border-bottom-color: #bac0ae; }
.rag-world .rag-title::before { content: none; }
.rag-world .rag-icon { background: #31515b; box-shadow: none; }
.rag-world .rag-messages { scrollbar-color: #a9b0a0 transparent; }
.rag-world .rag-message { box-shadow: none; border-radius: 2px 12px 2px 12px; }
.rag-world .rag-message--assistant,
.rag-world .rag-message--typing { background: #f4f7ef; border-color: #cbd6cc; }
.rag-world .rag-message--user { background: #31515b; }
.rag-world .rag-form { border-top-color: #bac0ae; }
.rag-world .rag-input { background: #f4f7ef; border: 1px solid #b8c9be; border-radius: 3px; }
.rag-world .rag-send { background: #31515b; border-radius: 3px; }

@media (max-width: 760px) {
  .rag-world__sun { left: 15%; top: 12%; }
  .rag-world__folio { top: 16px; }
  .rag-world__folio span:first-child { font-size: 21px; }
  .rag-bird { width: clamp(140px, 38vw, 240px); }
  .rag-bird__note { left: 50%; top: -70%; max-width: 210px; transform: translate(-50%, 8px); }
  .rag-bird__note.is-visible { transform: translate(-50%, 0); }
  .rag-bird__note::before { left: calc(50% - 7px); }
  .rag-world__chat {
    left: 50%; right: auto; bottom: 12px;
    width: calc(100vw - 24px); height: min(59vh, 510px);
    transform: translate(-50%, 24px);
  }
  .rag-world__chat.is-risen { transform: translate(-50%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .rag-bird__wing { animation: none !important; }
  .rag-world__chat { transition: none; }
}
