/* Sayfa geçişi kapağı (js/portal.js). <head> içindeki betik html'e data-portal ve --portal-cover
   yazar; bu kurallar sayfa daha görünmeden kapağı çizer. */
html[data-portal]::after { content: ""; position: fixed; inset: 0; z-index: 2147483000; background: var(--portal-cover, transparent); pointer-events: none; }
.portal-cover { position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; transform-origin: 50% 50%; will-change: transform, opacity; }

/* Projeler & Blog canlı kâğıt: sayfa çerçevenin içinde başlar, çerçeve dışarı itilir */
html[data-portal="screen"]::after { display: none; }
html[data-portal="screen"] body { transform: scale(var(--portal-s0, .94)); transform-origin: 50vw 50vh; }
.portal-frame, html[data-portal="screen"]::before {
  content: ""; position: fixed; inset: 0; z-index: 2147483000; pointer-events: none;
  border-style: solid; border-color: #15171b;
  border-width: calc(50vh * (1 - var(--portal-s0, .94)) * 1.04) calc(50vw * (1 - var(--portal-s0, .94)) * 1.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), inset 0 0 40px rgba(0, 0, 0, .35);
  opacity: var(--portal-frame, 1);
}
html[data-portal="screen"] { background: #15171b; }
/* Blog şişe kâğıdı çerçevesi */
.portal-frame--paper, html[data-portal="screen"][data-portal-paper="1"]::before {
  border-color: var(--portal-cover, #f6ecd8);
  box-shadow: inset 0 0 0 1px rgba(120, 90, 50, .18), inset 0 0 28px rgba(90, 60, 20, .14);
}
html[data-portal="screen"][data-portal-paper="1"] { background: var(--portal-cover, #f6ecd8); }
.portal-frame { opacity: 0; }
/* monitörden / kâğıttan gelince ekrandaki öğeler giriş animasyonunu tekrar oynatmaz (iframe'de zaten oynadı) */
html[data-portal="screen"] .ag-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

/* Alt sayfalarda üst barın ortası: yalnızca "← Anasayfa / Bulunduğun Sayfa" */
.main-nav.main-nav--return {
  display: flex !important;
  position: static !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.atolye-nav-return {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .26);
  background: rgba(20, 22, 28, .76);
  color: #fdf8ef !important;
  text-decoration: none;
  font: 600 13.5px/1.1 var(--font-sans, system-ui, sans-serif);
  letter-spacing: -.01em;
  box-shadow: 0 10px 28px -10px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  cursor: pointer;
  white-space: nowrap;
  transition: transform .25s cubic-bezier(.22, 1, .36, 1), background .25s, box-shadow .25s;
}
.atolye-nav-return:hover {
  transform: translateY(-1px) scale(1.02);
  background: rgba(30, 34, 44, .92);
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .58), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.atolye-nav-return:active { transform: scale(.98); }
.atolye-nav-return:focus-visible { outline: 2px solid #ffb35c; outline-offset: 3px; }
.atolye-nav-return .atolye-return-arrow { display: inline-block; transition: transform .25s cubic-bezier(.22, 1, .36, 1); }
.atolye-nav-return:hover .atolye-return-arrow { transform: translateX(-3px); }
.atolye-nav-sep { opacity: .4; font-size: 13px; user-select: none; }
.atolye-nav-current {
  font: 650 13.5px/1.1 var(--font-sans, system-ui, sans-serif);
  letter-spacing: -.01em;
  opacity: .92;
  white-space: nowrap;
}

html.light .atolye-nav-return, html[data-atmosphere="paper"] .atolye-nav-return {
  background: rgba(252, 249, 243, .88);
  color: #1b1915 !important;
  border-color: rgba(27, 25, 21, .16);
  box-shadow: 0 10px 26px -12px rgba(30, 24, 16, .26), inset 0 1px 0 rgba(255, 255, 255, .9);
}
html.light .atolye-nav-return:hover, html[data-atmosphere="paper"] .atolye-nav-return:hover {
  background: rgba(255, 253, 248, .98);
}

/* Blog buruşuk kâğıt kırışıklık katmanı (açılış ve şişeye dönüşte canlı sayfa üstünde) */
.portal-paper-crease {
  background-image:
    linear-gradient(128deg, rgba(85, 58, 28, .22) 0%, rgba(255, 250, 240, .24) 22%, rgba(70, 48, 22, .18) 46%, rgba(255, 250, 240, .2) 68%, rgba(85, 58, 28, .22) 100%),
    linear-gradient(42deg, rgba(70, 48, 22, .16) 0%, transparent 32%, rgba(255, 255, 255, .18) 54%, rgba(70, 48, 22, .18) 78%, transparent 100%),
    repeating-linear-gradient(-24deg, rgba(90, 62, 30, .06) 0 18px, rgba(255, 255, 255, .07) 18px 36px);
  mix-blend-mode: multiply;
  box-shadow: inset 0 0 42px rgba(70, 48, 22, .28);
}

@media (max-width: 760px) {
  .main-nav.main-nav--return { gap: 6px; }
  .atolye-nav-return { padding: 6px 11px 6px 9px; font-size: 12px; gap: 5px; }
  .atolye-nav-current { font-size: 12px; }
}
@media print { .atolye-nav-return, .atolye-nav-sep, .atolye-nav-current { display: none !important; } }
