/* ==========================================================================
   PORTFOLYO IZGARASI
   Temanin jQuery/isotope masonry duzeninin yerine gecer.
   Bagimliligi yoktur: CSS Grid + vanilla JS filtre (js/portfolio.js).
   Renkler tema paletinden alinmistir (main.css).
   ========================================================================== */

:root {
	--pf-accent: #1851f1;
	--pf-ink: #222;
	--pf-muted: rgba(34, 34, 34, .55);
	--pf-cream: #f9f5ea;
	--pf-line: rgba(34, 34, 34, .1);
	--pf-card: #fff;
}

/* --- Filtreler --------------------------------------------------------- */

.pf-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0 0 calc(20px + 1.5vw);
	padding: 0;
	list-style: none;
}

.pf-filter {
	font-family: 'Jost*', sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--pf-muted);
	background: transparent;
	border: 1px solid var(--pf-line);
	border-radius: 999px;
	padding: 9px 18px;
	cursor: pointer;
	transition: color .25s ease, border-color .25s ease, background-color .25s ease;
}

.pf-filter:hover {
	color: var(--pf-ink);
	border-color: var(--pf-ink);
}

.pf-filter[aria-pressed="true"] {
	color: #fff;
	background: var(--pf-accent);
	border-color: var(--pf-accent);
}

.pf-filter-count {
	opacity: .6;
	margin-left: 6px;
	font-size: 11px;
}

/* --- Izgara ------------------------------------------------------------ */

.pf-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: calc(14px + 1vw);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* --- Kart -------------------------------------------------------------- */

.pf-card {
	display: flex;
	flex-direction: column;
	background: var(--pf-card);
	border: 1px solid var(--pf-line);
	overflow: hidden;
	transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.pf-card:hover {
	transform: translateY(-4px);
	border-color: transparent;
	box-shadow: 0 18px 40px -18px rgba(3, 36, 74, .45);
}

/* Gorsel: tum projeler ayni oranda gorunsun diye sabit en-boy + object-fit.
   Kaynak gorseller farkli boyutlarda oldugu icin bu duzeni tek basina saglar. */
.pf-thumb {
	position: relative;
	margin: 0;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--pf-cream);
}

.pf-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	transition: transform .6s ease;
}

.pf-card:hover .pf-thumb img {
	transform: scale(1.06);
}

/* aspect-ratio desteklemeyen eski tarayicilar icin yedek */
@supports not (aspect-ratio: 16 / 10) {
	.pf-thumb {
		height: 0;
		padding-bottom: 62.5%;
	}

	.pf-thumb img {
		position: absolute;
		inset: 0;
	}
}

.pf-body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 18px 20px 22px;
	border-top: 3px solid var(--pf-accent);
}

.pf-title {
	font-family: 'Jost*', sans-serif;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--pf-ink);
	margin: 0;
}

.pf-meta {
	font-size: 13px;
	line-height: 1.45;
	color: var(--pf-muted);
	margin: 0;
}

.pf-tag {
	align-self: flex-start;
	margin-top: 4px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--pf-accent);
	background: rgba(24, 81, 241, .08);
	border-radius: 3px;
	padding: 4px 9px;
}

/* --- Filtre gizleme ---------------------------------------------------- */

.pf-card[hidden] {
	display: none;
}

.pf-empty {
	grid-column: 1 / -1;
	text-align: center;
	color: var(--pf-muted);
	padding: 40px 0;
	margin: 0;
}

/* --- Hareket hassasiyeti ----------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

	.pf-card,
	.pf-thumb img,
	.pf-filter {
		transition: none;
	}

	.pf-card:hover {
		transform: none;
	}

	.pf-card:hover .pf-thumb img {
		transform: none;
	}
}

/* --- Kucuk ekran ------------------------------------------------------- */

@media (max-width: 480px) {
	.pf-grid {
		grid-template-columns: 1fr;
	}

	.pf-filter {
		padding: 8px 14px;
		font-size: 12px;
	}
}

/* ==========================================================================
   PROJE DETAY PENCERESI (modal)
   Kart tiklaninca acilir; buyuyerek gelir.
   ========================================================================== */

/* Tema main.css icinde <button> ogelerini kenarlikli, buyuk harfli ve
   harf araligi genis bir "buton" gibi stilliyor. Kart bir <button> oldugu
   icin bu stiller basliga da bulasiyordu; hepsi burada sifirlaniyor. */
.pf-card-btn {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	text-align: inherit;
	text-transform: none;
	letter-spacing: normal;
	font: inherit;
	line-height: inherit;
	color: inherit;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.pf-card-btn:hover,
.pf-card-btn:active,
.pf-card-btn:focus {
	background: none;
	border: 0;
	color: inherit;
}

/* Kart ici metinler temadan miras almasin */
.pf-title,
.pf-meta,
.pf-desc {
	text-transform: none;
	letter-spacing: normal;
}

.pf-card-btn:focus-visible {
	outline: 3px solid var(--pf-accent);
	outline-offset: 3px;
}

/* --- Ortu (native <dialog>) --------------------------------------------- */

.pf-modal {
	/* dialog varsayilanlarini sifirla: kutuyu biz .pf-dialog ile ciziyoruz */
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: max(16px, 3vmin);
	border: 0;
	background: transparent;
	overflow: hidden;
	opacity: 0;
	transition: opacity .28s ease;
}

.pf-modal[open] {
	display: flex;
	align-items: center;
	justify-content: center;
}

.pf-modal.is-open {
	opacity: 1;
}

.pf-modal::backdrop {
	background: rgba(3, 12, 32, .62);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

/* --- Pencere ------------------------------------------------------------ */

.pf-dialog {
	position: relative;
	display: grid;
	/* Foto ustte, aciklama altta */
	grid-template-columns: 1fr;
	grid-template-rows: auto 1fr;
	width: min(880px, 100%);
	max-height: min(92vh, 900px);
	overflow-y: auto;
	background: #fff;
	overflow: hidden;
	transform: scale(.88);
	opacity: 0;
	transition: transform .34s cubic-bezier(.2, .8, .3, 1), opacity .28s ease;
}

.pf-modal.is-open .pf-dialog {
	transform: scale(1);
	opacity: 1;
}

/* --- Gorsel ------------------------------------------------------------- */

.pf-dialog-media {
	margin: 0;
	background: var(--pf-cream);
	overflow: hidden;
	aspect-ratio: 16 / 9;
}

@supports not (aspect-ratio: 16 / 9) {
	.pf-dialog-media {
		height: 0;
		padding-bottom: 56.25%;
		position: relative;
	}

	.pf-dialog-media img {
		position: absolute;
		inset: 0;
	}
}

.pf-dialog-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
}

/* --- Icerik ------------------------------------------------------------- */

.pf-dialog-body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: calc(22px + 1.4vw);
	border-top: 3px solid var(--pf-accent);
}

.pf-dialog-tag {
	align-self: flex-start;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--pf-accent);
	background: rgba(24, 81, 241, .08);
	border-radius: 3px;
	padding: 4px 9px;
}

.pf-dialog-title {
	font-family: 'Jost*', sans-serif;
	font-size: calc(20px + .6vw);
	font-weight: 600;
	line-height: 1.25;
	color: var(--pf-ink);
	margin: 0;
}

.pf-dialog-meta {
	font-size: 14px;
	color: var(--pf-muted);
	margin: 0;
}

.pf-dialog-desc {
	font-size: 15px;
	line-height: 1.65;
	color: var(--pf-ink);
	margin: 0;
}

.pf-dialog-link {
	align-self: flex-start;
	margin-top: 6px;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	background: var(--pf-accent);
	padding: 11px 20px;
	border-radius: 3px;
	transition: opacity .2s ease;
}

.pf-dialog-link:hover {
	opacity: .88;
	color: #fff;
}

/* --- Kapat -------------------------------------------------------------- */

.pf-dialog-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	line-height: 1;
	color: var(--pf-ink);
	background: rgba(255, 255, 255, .92);
	border: 1px solid var(--pf-line);
	border-radius: 50%;
	cursor: pointer;
	transition: background-color .2s ease;
}

.pf-dialog-close:hover {
	background: #fff;
}

.pf-dialog-close:focus-visible {
	outline: 3px solid var(--pf-accent);
	outline-offset: 2px;
}

/* --- Sayfa kaydirmayi kilitle ------------------------------------------- */

html.pf-modal-open,
html.pf-modal-open body {
	overflow: hidden;
}

/* --- Kucuk ekran -------------------------------------------------------- */

@media (max-width: 760px) {
	.pf-dialog-media {
		aspect-ratio: 4 / 3;
	}
}

@media (prefers-reduced-motion: reduce) {

	.pf-modal,
	.pf-dialog {
		transition: opacity .01s;
	}

	.pf-dialog {
		transform: none;
	}
}


/* --- Izgara alti notu ---------------------------------------------------- */

.pf-note {
	max-width: 46em;
	margin: calc(20px + 1.5vw) auto 0;
	text-align: center;
	font-size: 14.5px;
	line-height: 1.65;
	color: var(--pf-muted);
}

.pf-note a {
	color: var(--pf-accent);
	border-bottom: 1px solid currentColor;
}
