/* Üretilen alt sayfalar (projeler/, ozet/, 404) — css/site.css'in tokenları ve kartları üzerine
   yalnızca bu sayfalara özgü düzen. Bölümler 12 sütunlu bir ızgaraya oturur. */

/* Alt sayfaların gezinmesi kısa: her genişlikte görünür, dar ekranda kaydırılır */
.rail--simple .rail-nav {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

.rail--simple .rail-nav::-webkit-scrollbar {
  display: none;
}

.rail--simple .rail-nav a {
  white-space: nowrap;
}

main {
  display: block;
}

main > .bay {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  padding-top: clamp(32px, 5vw, 64px);
}

:where(main > .bay) > * {
  grid-column: 1 / -1;
}

main > .bay .bay-head {
  margin-bottom: 0;
  padding-left: 0;
  box-shadow: none;
  background: none;
}

main > .bay .bay-head::before {
  display: none;
}

main > .bay .bay-head h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem);
  letter-spacing: -0.035em;
}

main > .page-pager {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

main > .bay .bay-head h2::after,
main > .bay .bay-head h1::after {
  display: none;
}

main:focus {
  outline: none;
}

/* Sayfa konumu */
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: var(--fg-2);
}

.breadcrumb li + li::before {
  content: '/';
  margin: 0 8px;
  color: var(--fg-3);
}

.breadcrumb a {
  color: var(--fg-2);
}

.breadcrumb a:hover {
  color: var(--fg);
  text-decoration-thickness: 2px;
}

.breadcrumb [aria-current] {
  color: var(--fg);
  font-weight: 600;
}

.bay-head h1 {
  font-size: clamp(2.5rem, 1.5rem + 3vw, 4.25rem);
  font-weight: 680;
  line-height: 1.05;
  letter-spacing: -0.035em;
  hyphens: auto;
  overflow-wrap: break-word;
}

.lead {
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.45;
  color: var(--fg-2);
  max-width: 42ch;
}

/* Proje sayfası: başlık ve künye yan yana, altında büyük kapak */
.page-head {
  align-items: end;
  column-gap: clamp(24px, 4vw, 56px);
}

.page-head-text {
  grid-column: 1 / span 8;
  display: grid;
  gap: 18px;
}

.page-head-text h1 {
  font-size: clamp(2.5rem, 1.2rem + 4.4vw, 5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.page-head .lead {
  max-width: 52ch;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-facts {
  grid-column: 9 / -1;
  display: grid;
  gap: 18px;
  align-self: end;
}

.page-facts-list {
  display: grid;
  gap: 0;
}

.page-facts-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-small);
}

.page-facts-list div:first-child {
  padding-top: 0;
}

.page-facts-list dt {
  color: var(--ink-3);
}

.page-facts-list dd {
  font-weight: 650;
  text-align: right;
}

.page-facts-label {
  margin-bottom: 10px;
  font-size: var(--fs-xs);
  color: var(--ink-3);
}

.page-cover-bay {
  padding-top: clamp(28px, 4vw, 48px);
}

.page-cover {
  margin: 0;
  overflow: hidden;
  border-radius: 24px;
  background: var(--surface-2);
  box-shadow: var(--shadow-lift);
}

.page-cover-btn {
  display: block;
  width: 100%;
  cursor: zoom-in;
}

.page-cover img {
  display: block;
  width: 100%;
  max-height: min(78svh, 720px);
  object-fit: cover;
  transition: transform 1s var(--ease-out);
}

.page-cover-btn:hover img {
  transform: scale(1.015);
}

.page-cover.is-contain img {
  object-fit: contain;
  padding: clamp(16px, 3vw, 40px);
}

/* Hikâye ve öne çıkanlar */
.page-story {
  align-items: start;
  column-gap: clamp(24px, 4vw, 56px);
}

.page-prose {
  grid-column: 1 / span 7;
  display: grid;
  gap: 18px;
}

.page-prose .prose {
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  line-height: 1.75;
  color: var(--ink-2);
  max-width: 68ch;
}

.page-prose .prose p:first-child {
  color: var(--ink);
}

.page-h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.page-h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-features {
  grid-column: 8 / -1;
  display: grid;
  gap: 16px;
  position: sticky;
  top: calc(var(--topbar-h) + 24px);
}

.check-list {
  display: grid;
  gap: 12px;
}

.check-list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  font-size: var(--fs-small);
  line-height: 1.5;
}

.check-list .ico {
  width: 22px;
  height: 22px;
  padding: 4px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  stroke-width: 2.4;
}

/* Galeri: görseller sayfa içinde büyür */
.page-gallery {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-shot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  cursor: zoom-in;
  overflow: hidden;
}

.page-shot img {
  max-height: 260px;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.7s var(--ease-out);
}

.page-shot:hover img {
  transform: scale(1.04);
}

.page-shot-zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--action);
  color: var(--on-action);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity var(--t-med) ease, transform var(--t-med) var(--ease-out);
}

.page-shot-zoom .ico {
  width: 16px;
  height: 16px;
}

.page-shot:hover .page-shot-zoom,
.page-shot:focus-visible .page-shot-zoom {
  opacity: 1;
  transform: none;
}

/* Görüntüleyici */
.lightbox {
  width: 100vw;
  height: 100svh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #0A111D;
  color: #FFFFFF;
}

.lightbox::backdrop {
  background: #0A111D;
}

.lightbox-stage {
  display: grid;
  place-items: center;
  gap: 12px;
  height: 100%;
  margin: 0;
  padding: 64px 72px 40px;
}

.lightbox-stage img {
  max-width: 100%;
  max-height: calc(100svh - 140px);
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-count {
  color: rgba(255, 255, 255, 0.72);
}

.lightbox-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  transition: background-color var(--t-fast) ease;
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lightbox-btn:focus-visible {
  outline-color: #FFFFFF;
}

.lightbox-close {
  top: 16px;
  right: 16px;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  margin-top: -24px;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* Önceki / sonraki proje */
.page-pager > * {
  grid-column: auto !important;
}

.pager-link {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 14px;
  text-decoration: none;
  transition: box-shadow var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out);
}

.pager-link--next {
  grid-template-columns: minmax(0, 1fr) 120px;
  text-align: right;
}

.pager-link--next .pager-shot {
  order: 2;
}

.pager-link:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
}

.pager-shot {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface-2);
}

.pager-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pager-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.pager-dir {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  font-weight: 650;
  color: var(--accent-ink);
}

.pager-link--next .pager-dir {
  justify-content: flex-end;
}

.pager-dir .ico {
  width: 15px;
  height: 15px;
}

.pager-title {
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.pager-meta {
  font-size: var(--fs-xs);
  color: var(--ink-3);
}

/* Kapanış: iletişime çağrı */
.page-cta-pane {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  padding: clamp(24px, 3.4vw, 44px);
  background:
    linear-gradient(90deg, var(--accent) 0 10px, transparent 10px 18px) 0 0 / 18px 4px repeat-x,
    var(--surface);
}

.page-cta-pane .lead {
  margin-top: 6px;
}

/* Proje kartları (proje dizini) */
.page-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-cards > li {
  display: flex;
}

.page-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  overflow: hidden;
  text-decoration: none;
  transition: box-shadow var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out);
}

.page-card:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-4px);
}

.page-card-shot {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
}

.page-card-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}

.page-card-shot.is-contain img {
  object-fit: contain;
  padding: 6%;
}

.page-card:hover .page-card-shot img {
  transform: scale(1.045);
}

.page-card-cat,
.page-card-year {
  position: absolute;
  top: 12px;
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 11px;
  border-radius: var(--pill);
  font-size: 0.75rem;
  font-weight: 650;
}

.page-card-cat {
  left: 12px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  color: var(--ink);
}

.page-card-year {
  right: 12px;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  color: var(--bg);
  font-family: var(--font-mono);
  font-weight: 500;
}

.page-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding: 20px 22px 22px;
}

.page-card-title {
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-card:hover .page-card-title {
  color: var(--accent-ink);
}

.page-card-desc {
  font-size: var(--fs-small);
  line-height: 1.55;
  color: var(--fg-2);
}

.page-card-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.page-card-tech span {
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-2);
}

.page-card-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  font-size: var(--fs-small);
  font-weight: 650;
  color: var(--ink);
}

.page-card-more .ico {
  width: 16px;
  height: 16px;
  transition: transform var(--t-fast) ease;
}

.page-card:hover .page-card-more .ico {
  transform: translateX(3px);
}

/* Tek sayfa özet */
.summary-id {
  grid-column: 1 / span 5;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  min-height: 260px;
}

.summary-id h1 {
  font-size: clamp(2.5rem, 1.6rem + 3vw, 4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
}

.summary-contact {
  grid-column: 6 / span 4;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.summary-photo {
  flex: none;
  width: 104px;
  height: 104px;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: 50%;
}

.summary-facts {
  display: grid;
  gap: 8px;
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

.summary-facts li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-status {
  font-weight: 700;
}

.summary-cv {
  grid-column: 10 / -1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.summary-print {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg);
  font-weight: 650;
}

.summary-about {
  grid-column: 1 / -1;
}

.summary-about .pane-title,
.summary-grid .pane-title {
  margin-bottom: 12px;
}

.summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.summary-col {
  display: grid;
  gap: 20px;
  align-content: start;
}

.entry {
  padding: 0 0 14px;
}

.entry + .entry {
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
}

.entry-title {
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.entry-meta {
  font-size: 0.875rem;
  color: var(--fg-2);
}

.entry p,
.entry ul {
  margin-top: 6px;
  font-size: 0.9375rem;
  color: var(--fg-2);
}

.skill-group + .skill-group {
  margin-top: 16px;
}

.skill-group h3 {
  margin-bottom: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--fg-2);
}

.summary-more {
  margin-top: 10px;
  font-weight: 650;
}

/* 404: tek, sakin bir mesaj */
.not-found {
  min-height: calc(100svh - var(--topbar-h) - 200px);
  align-content: center;
}

.not-found-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.not-found-code {
  font-size: clamp(5rem, 3rem + 8vw, 9rem);
  font-weight: 750;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--accent);
}

.not-found-text h1 {
  font-size: var(--fs-h2);
  font-weight: 680;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

/* Alt sayfalarda üst çubuğun gezinmesi her genişlikte görünür (site.css dar ekranda gizler) */
@media (max-width: 1023px) {
  .rail--simple .rail-nav {
    display: flex;
  }
}

/* Duyarlı */
@media (max-width: 1100px) {
  .page-head-text,
  .page-facts,
  .page-prose,
  .page-features,
  .summary-id,
  .summary-about {
    grid-column: 1 / -1;
  }

  .page-features {
    position: static;
  }

  .summary-contact {
    grid-column: 1 / span 7;
  }

  .summary-cv {
    grid-column: 8 / -1;
  }

  .page-cards,
  .page-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .rail--simple .rail-pane {
    gap: 8px;
  }

  .rail--simple .rail-nav {
    margin-left: -8px;
  }

  .rail--simple .rail-nav a {
    padding: 0 10px;
  }

  .page-cards,
  .page-cards--two,
  .page-gallery,
  main > .page-pager,
  .summary-grid {
    grid-template-columns: minmax(0, 1fr);
    display: grid;
  }

  .lightbox-stage {
    padding: 64px 12px 32px;
  }

  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: 16px;
    margin-top: 0;
  }

  .summary-contact {
    flex-direction: column;
  }

  .summary-contact,
  .summary-cv {
    grid-column: 1 / -1;
  }

}

@media print {
  .no-print,
  .site-footer {
    display: none !important;
  }

  .bay {
    margin: 0 0 8px;
    display: grid;
  }

  .summary-id {
    min-height: 0;
  }

  .summary-contact {
    grid-column: 6 / -1;
  }

  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  a {
    text-decoration: none;
  }
}
