/* =========================================
   MURAT GÖRKEM — APPLE LIGHT / BRUTALIST EDITORIAL V7 (FINAL)
   ========================================= */

:root {
	--bg: #ffffff;
	--fg: #1d1d1f;
	--ink: #000000;
	--muted: #76767b;
	--line: #e5e5ea;
	--crimson: #FF0000;
	--side: 15%;
	--gap: 24px;
	--ease-out: cubic-bezier(.16, 1, .3, 1);
	--ease-io: cubic-bezier(.76, 0, .24, 1);
	--font-display: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	--font-mono: 'IBM Plex Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; }

/* Crimson Text Selection */
::selection {
	background: var(--crimson);
	color: #ffffff;
}
::-moz-selection {
	background: var(--crimson);
	color: #ffffff;
}

/* Remove Native Browser Scrollbar Column */
html, body {
	scrollbar-width: none;
	-ms-overflow-style: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
html.loading, html.loading body { overflow: hidden; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--font-mono);
	font-weight: 400;
	font-size: 15px;
	line-height: 1.55;
	letter-spacing: -0.01em;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	transition: opacity .38s var(--ease-io);
}
html.is-looping body {
	opacity: 0;
}

img, video { display: block; max-width: 100%; }

/* Display Hierarchy */
h1, h2, h3, .loader-name, .footer-email {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 600;
	color: var(--ink);
}
p { margin: 0; }

.mono-label {
	font-family: var(--font-mono);
	font-weight: 500;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}

a {
	color: var(--ink);
	text-decoration: none;
	transition: color .35s ease, opacity .35s ease;
}
a:hover { color: var(--crimson); }
a:focus-visible, .media-strip:focus-visible {
	outline: 1px solid var(--crimson);
	outline-offset: 4px;
}

/* ---------- Loader (Gallery White + Heavy ANKARA, TR) ---------- */
#loader { display: none; }
.js #loader {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	position: fixed;
	inset: 0;
	z-index: 1000;
	padding: clamp(24px, 3vw, 48px) var(--side) clamp(36px, 8vh, 90px);
	background: #ffffff;
	color: var(--ink);
	transition: transform 1.6s var(--ease-io);
	animation: loaderFail 0s 7.5s forwards;
}
#loader.done { transform: translateY(-100%); }
.loader-top {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	width: 100%;
}
.loader-location {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(14px, 1.25vw, 18px);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink);
}
.loader-bottom {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	width: 100%;
}
.loader-name {
	font-weight: 600;
	font-size: clamp(2.1rem, 4.2vw, 5.8rem);
	line-height: 0.95;
	letter-spacing: -0.035em;
	color: var(--crimson);
}
.loader-count {
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: clamp(1.8rem, 3.2vw, 4.2rem);
	line-height: 1;
	color: var(--ink);
	font-variant-numeric: tabular-nums;
}
.loader-bar {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 2px;
	background: var(--line);
}
.loader-fill {
	display: block;
	width: 100%; height: 100%;
	background: var(--crimson);
	transform: scaleX(0);
	transform-origin: left;
}
@keyframes loaderFail { to { visibility: hidden; } }

/* ---------- Header (100% Opacity Crimson Brand + Custom Monogram) ---------- */
#header {
	position: fixed;
	top: 0; left: 0;
	width: 100%;
	z-index: 100;
	padding: clamp(20px, 2.2vw, 34px) var(--side);
	background: rgba(255, 255, 255, 0.88);
	backdrop-filter: saturate(180%) blur(16px);
	-webkit-backdrop-filter: saturate(180%) blur(16px);
	transition: transform 1.2s var(--ease-out);
}
.js #header { transform: translateY(-130%); }
.ready #header { transform: none; }
.ready #header.is-hidden { transform: translateY(-130%); }

.header-inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	line-height: 1;
}
.brand {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	justify-self: start;
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(12px, 0.88vw, 14px);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--crimson);
	opacity: 1;
	white-space: nowrap;
}
.brand:hover {
	color: var(--crimson);
	opacity: 0.8;
}
.brand-mark {
	height: 1em;
	width: auto;
	display: block;
	flex-shrink: 0;
}

#nav {
	justify-self: center;
}
#nav ul {
	display: flex;
	gap: clamp(24px, 2.8vw, 44px);
	margin: 0;
	padding: 0;
	list-style: none;
}
#nav a {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: clamp(12px, 0.92vw, 14px);
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--ink);
	position: relative;
}
#nav a:hover,
#nav a.is-current {
	color: var(--crimson);
}
.header-spacer {
	justify-self: end;
}

/* ---------- View Switching (Main Work vs. Separate About Page) ---------- */
html.is-about-open #home-view {
	display: none;
}
#about-page {
	display: none;
	min-height: 82vh;
	padding: clamp(140px, 18vh, 210px) 0 clamp(60px, 8vh, 100px);
}
html.is-about-open #about-page {
	display: block;
}

.about-hero {
	padding: 0 var(--side);
	margin-bottom: clamp(64px, 9vh, 110px);
}
.about-headline {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(2.2rem, 4.6vw, 5.8rem);
	line-height: 1.06;
	letter-spacing: -0.035em;
	color: var(--ink);
	max-width: 18ch;
}
.about-grid {
	margin-bottom: clamp(56px, 8vh, 96px);
}
.about-columns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 36px;
	margin-bottom: 44px;
}
.about-columns h3 {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--crimson);
	margin-bottom: 12px;
}
.about-columns p {
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(0.98rem, 1.15vw, 1.25rem) !important;
	line-height: 1.5 !important;
	color: var(--fg);
}
.back-to-work {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink);
}
.back-to-work svg {
	width: 16px;
	height: auto;
	transition: transform .35s var(--ease-out);
}
.back-to-work:hover {
	color: var(--crimson);
}
.back-to-work:hover svg {
	transform: translateX(-4px);
}

/* ---------- Hero (Lowercase 'v' + Noticeable Smooth Kinetic Scroll Arrow) ---------- */
#banner {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 100vh;
	min-height: 100svh;
	padding: clamp(110px, 14vh, 160px) var(--side) clamp(48px, 8vh, 96px);
}

.hero-statement {
	width: 100%;
	max-width: 100%;
	margin: auto 0;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(2.5rem, 5.5vw, 7.4rem);
	line-height: 1.06;
	letter-spacing: -0.036em;
	color: var(--ink);
	will-change: transform, opacity;
}

.banner-footer {
	display: flex;
	justify-content: flex-end;
	align-items: flex-end;
}

/* Noticeable Kinetic Motion Graphic Scroll Arrow */
.scroll-arrow {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 48px;
	color: var(--ink);
	overflow: hidden;
	transition: opacity 1.2s ease 1s, color .3s ease;
}
.scroll-arrow:hover {
	color: var(--crimson);
}
.js .scroll-arrow { opacity: 0; }
.ready .scroll-arrow { opacity: 1; }

.scroll-arrow-track {
	display: flex;
	width: 22px;
	height: 30px;
	will-change: transform, opacity;
	animation: kineticArrowPattern 1.55s cubic-bezier(.65, 0, .35, 1) infinite;
}
.scroll-arrow-svg {
	width: 100%;
	height: 100%;
	display: block;
}
@keyframes kineticArrowPattern {
	0% {
		transform: translate3d(0, -115%, 0) scaleY(0.85);
		opacity: 0;
	}
	28% {
		transform: translate3d(0, 0%, 0) scaleY(1);
		opacity: 1;
	}
	62% {
		transform: translate3d(0, 14%, 0) scaleY(1.04);
		opacity: 1;
	}
	100% {
		transform: translate3d(0, 118%, 0) scaleY(0.85);
		opacity: 0;
	}
}

/* ---------- Projects ---------- */
.project {
	padding: clamp(80px, 11vh, 140px) 0;
}

.project-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 24px;
	padding: 0 var(--side);
	margin-bottom: 36px;
}
.project-header h2 {
	font-weight: 600;
	font-size: clamp(1.8rem, 3.2vw, 3.4rem);
	line-height: 1.06;
	letter-spacing: -0.03em;
	text-transform: uppercase;
}

.slider-telemetry {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
}
.slider-count {
	font-family: var(--font-mono);
	font-weight: 500;
	font-size: 12px;
	letter-spacing: 0.08em;
	color: var(--ink);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.slider-progress {
	width: 72px;
	height: 2px;
	background: var(--line);
	overflow: hidden;
}
.slider-bar {
	display: block;
	width: 100%;
	height: 100%;
	background: var(--crimson);
	transform-origin: left;
	transition: transform .95s var(--ease-out);
}

/* ---------- Apple-Grade Stage Carousel & Vertical Overrides ---------- */
.media-strip {
	position: relative;
	height: 0;
	padding-top: calc((100% - 2 * var(--side)) * .5625);
	margin-bottom: 48px;
	overflow: hidden;
	cursor: grab;
	touch-action: pan-y;
	-webkit-user-select: none;
	user-select: none;
}
.media-strip.dragging { cursor: grabbing; }

/* 1:1 Square Override for OOH Campaigns */
.media-strip.strip-square {
	padding-top: calc(100% - 2 * var(--side));
}

.track {
	position: absolute;
	inset: 0;
	transition: transform 1.85s var(--ease-out);
}

.slide {
	position: absolute;
	top: 0; bottom: 0;
	left: var(--side);
	width: calc(100% - 2 * var(--side));
	overflow: hidden;
	background: #f5f5f7;
	border: 1px solid var(--line);
	clip-path: inset(0 0% 0 0);
	transform: translate3d(calc(var(--k, 0) * (100% + var(--gap)) + var(--drag, 0px)), 0, 0) scale(0.965);
	opacity: 0.35;
	filter: grayscale(100%) contrast(108%);
	transition: transform 1.65s var(--ease-io), opacity 1.15s var(--ease-out), filter 1.15s ease, clip-path 1.4s var(--ease-out), border-color .75s ease;
}
.slide.is-active {
	transform: translate3d(calc(var(--k, 0) * (100% + var(--gap)) + var(--drag, 0px)), 0, 0) scale(1);
	opacity: 1;
	filter: grayscale(0%) contrast(100%);
	border-color: #d2d2d7;
}
.slide:not(.is-active) { cursor: pointer; }
.slide:not(.is-active):hover { opacity: 0.65; }
.media-strip.dragging .slide { transition: opacity .5s ease, filter .5s ease; }

/* Erase the gray box for square/vertical presentations to blend with the white canvas */
.media-strip.strip-square .slide {
	background: #ffffff;
	border: none;
}

/* Base Media Rules (Restores Invisible JPGs) */
.slide img, .slide video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
	-webkit-user-drag: none;
	transform: translate3d(0, var(--py, 0%), 0) scale(1.14);
	transition: transform 1.55s var(--ease-out);
	opacity: 1 !important;
	visibility: visible !important;
}

/* Vertical Asset Overrides (Prevents Cropping & Disables Parallax Drift) */
/* =========================================
   OOH Campaign Presentation Overrides
   ========================================= */

/* Shrinks the entire invisible container to perfectly wrap the scaled-down assets, killing the white gap */
.media-strip.strip-square {
	padding-top: calc((100% - 2 * var(--side)) * 0.62);
}

/* Base Media Rules */
.slide img, .slide video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
	-webkit-user-drag: none;
	transform: translate3d(0, var(--py, 0%), 0) scale(1.14);
	transition: transform 1.55s var(--ease-out);
	opacity: 1 !important;
	visibility: visible !important;
}

/* Erase default borders and gray background to blend perfectly with the white canvas */
.media-strip.strip-square .slide {
	background: #ffffff; 
	border: none;
}

/* Exact Formatting for Vertical Presentation Assets */
.slide img.vertical-asset, 
.slide video.vertical-asset {
	object-fit: contain !important;
	position: relative !important;
	width: 100% !important;
	height: 100% !important;
	top: 0 !important; 
	left: 0 !important;
	padding: 0 !important;
	transform: translate3d(0, 0, 0) scale(1) !important;
}

/* Standard Sliding Aperture Animation (Ignored by Vertical Assets) */
.slide.slide-open img:not(.vertical-asset), 
.slide.slide-open video:not(.vertical-asset) {
	animation: slideAperture 1.35s var(--ease-out);
}
@keyframes slideAperture {
	0% { transform: translate3d(8%, var(--py, 0%), 0) scale(1.24); }
	100% { transform: translate3d(0, var(--py, 0%), 0) scale(1.14); }
}

/* Maintain Scale During Scroll Animations */
.js .media-strip:not(.in) .slide img,
.js .media-strip:not(.in) .slide video {
	transform: translate3d(12%, var(--py, 0%), 0) scale(1.26);
}
.js .media-strip:not(.in) .slide img.vertical-asset,
.js .media-strip:not(.in) .slide video.vertical-asset {
	transform: translate3d(0, 0, 0) scale(1);
}

/* Minimalist Short-Tailed Right Pointer */
.next-pointer {
	position: absolute;
	top: 50%;
	right: calc(var(--side) * 0.32);
	z-index: 15;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid var(--ink);
	color: var(--ink);
	cursor: pointer;
	transform: translateY(-50%);
	transition: background-color .35s var(--ease-out), border-color .35s var(--ease-out), color .35s var(--ease-out), transform .35s var(--ease-out);
}
.next-pointer svg {
	width: 16px;
	height: auto;
	animation: pointerDrift 2.8s var(--ease-io) infinite;
}
.next-pointer:hover {
	background: var(--crimson);
	border-color: var(--crimson);
	color: #ffffff;
	transform: translateY(-50%) scale(1.05);
}
@keyframes pointerDrift {
	0%, 100% { transform: translateX(-2px); }
	50% { transform: translateX(2px); }
}

/* Unlabeled Left Metadata + Right Description Editorial Grid */
.project-details {
	display: grid;
	grid-template-columns: 35% 1fr;
	align-items: start;
	width: 100%;
	padding: 0 var(--side);
}

.project-meta-unlabeled {
	grid-column: 1;
	margin: 4px 0 0 0;
	padding: 0 24px 0 0;
	list-style: none;
	font-family: var(--font-display);
	font-weight: 500;
	font-size: clamp(11px, 0.88vw, 13px);
	line-height: 1.65;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--ink);
}
.project-meta-unlabeled li:last-child {
	color: var(--muted);
	font-family: var(--font-mono);
	font-weight: 400;
}

.js .project-meta-unlabeled li {
	opacity: 0;
	transform: translateY(12px);
	transition: opacity .95s ease, transform 1.1s var(--ease-out);
}
.js .project-details.in .project-meta-unlabeled li {
	opacity: 1;
	transform: none;
}
.project-meta-unlabeled li:nth-child(2) { transition-delay: .09s; }
.project-meta-unlabeled li:nth-child(3) { transition-delay: .18s; }

.project-description {
	grid-column: 2;
	width: 100%;
	max-width: none;
}

.project-description p {
	width: 100%;
	max-width: none;
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(1.15rem, 1.55vw, 1.85rem);
	line-height: 1.36;
	letter-spacing: -0.02em;
	color: var(--ink);
}
.project-credits {
	margin-top: 2.6em;
	font-family: var(--font-display);
	font-weight: 500;
	font-size: clamp(11px, 0.85vw, 13px);
	line-height: 1.6;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--ink);
}
.project-credits span {
	color: var(--muted);
	font-weight: 400;
	margin-right: 8px;
}

.js .project-credits {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 1.15s ease, transform 1.25s var(--ease-out);
	transition-delay: .35s;
}
.js .project-details.in .project-credits { opacity: 1; transform: none; }

/* ---------- Footer ---------- */
.info-section {
	position: relative;
	padding: clamp(80px, 10vh, 120px) 0;
}

.footer-inner {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 24px;
	padding: 0 var(--side);
}
.footer-cta { display: flex; flex-direction: column; gap: 10px; }
.footer-email {
	font-weight: 600;
	font-size: clamp(1.4rem, 2.5vw, 2.8rem);
	letter-spacing: -0.03em;
	line-height: 1;
}
.footer-links {
	display: flex;
	gap: 28px;
	font-family: var(--font-mono);
	font-weight: 500;
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* ---------- Masked Text Reveal (Repeats on Up/Down Scroll) ---------- */
.w {
	display: inline-block;
	vertical-align: top;
	white-space: nowrap;
	overflow: hidden;
	padding: 0 .08em .16em;
	margin: 0 -.08em -.16em;
}
.c { display: inline-block; }

.js .c {
	transform: translateY(118%);
	transition: transform 1.35s var(--ease-out);
	transition-delay: calc(var(--i) * 18ms);
}
.js [data-split="words"] .c { transition-delay: calc(var(--i) * 28ms); }
.js .in .c { transform: none; }

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.scroll-arrow-track, .next-pointer svg { animation: none; }
	.js .c, .js .media-strip, .js .project-credits, .js .project-meta-unlabeled li,
	.js .scroll-arrow, .js #header { opacity: 1; transform: none; transition: none; }
	.js .media-strip:not(.in) .track { transform: none; }
	.js .media-strip:not(.in) .slide.is-active { clip-path: none; }
	.slide, .track { transition: none; }
	#loader { display: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
	:root { --side: 7%; --gap: 12px; }
	.project-details { grid-template-columns: 1fr; gap: 20px; }
	.project-meta-unlabeled, .project-description { grid-column: 1; }
	.about-columns { grid-template-columns: 1fr; gap: 24px; }
	.next-pointer { right: 14px; width: 40px; height: 40px; }
}

@media (max-width: 640px) {
	:root { --side: 5%; }
	.header-inner { display: flex; justify-content: space-between; }
	.header-spacer { display: none; }
	#nav ul { gap: 16px; }
	.project-header { flex-direction: column; align-items: flex-start; }
	.slider-telemetry { align-items: flex-start; width: 100%; }
	.slider-progress { width: 100%; }
	.footer-inner { flex-direction: column; align-items: flex-start; gap: 28px; }
}

/* =========================================
   About Page Visibility Override
   ========================================= */
/* Forces all text elements on the About page to bypass JS scroll animations and render instantly */

#about-page .about-headline,
#about-page .project-details,
#about-page .project-description,
#about-page .about-columns,
#about-page p,
#about-page h3,
#about-page li {
	opacity: 1 !important;
	visibility: visible !important;
	transform: none !important;
	animation: none !important;
}
