/* ============================================================
   Selim Yılmaz — static cinematic portfolio
   No frameworks. Animations use only transform / opacity
   (compositor-only) so the scrubbed background never drops frames.
   ============================================================ */

:root {
  --orange: #ff6b1a;
  --bg: #080808;
  --pad: 2.5rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Playfair Display", Georgia, serif;
}
@media (min-width: 768px) { :root { --pad: 5rem; } }

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-width: none; -webkit-text-size-adjust: 100%; }
html::-webkit-scrollbar { display: none; }
html, body { margin: 0; background: var(--bg); color: #fff; font-family: var(--sans); overflow-x: hidden; }
body { -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
::selection { background: var(--orange); color: #000; }

@media (pointer: fine) { body.has-cursor, body.has-cursor * { cursor: none !important; } }

/* ── Background (canvas image sequence) ─────────────────── */
.bg { position: fixed; inset: 0; z-index: 0; background: #0a0a0a url("../frames/0001.webp") center / cover no-repeat; contain: strict; }
#scrub { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bg-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(0,0,0,.55), transparent 50%, rgba(0,0,0,.25)),
    linear-gradient(to right, rgba(0,0,0,.65), rgba(0,0,0,.15) 50%, transparent),
    rgba(0,0,0,.35);
}

/* Cheap grain: a small tiled noise texture generated once by JS */
.grain { position: fixed; inset: 0; z-index: 999; pointer-events: none; opacity: .05; background-size: 160px; contain: strict; }

/* Bottom fade (no backdrop-filter — it re-blurs every frame over the canvas) */
.bottom-blur {
  position: fixed; left: 0; right: 0; bottom: 0; height: 120px; z-index: 40; pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(8,8,8,.6) 50%, rgba(8,8,8,.95));
}

/* Difference cursor */
.cursor {
  position: fixed; top: 0; left: 0; width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border-radius: 50%; background: #fff; mix-blend-mode: difference;
  pointer-events: none; z-index: 99999; will-change: transform; display: none;
}
body.has-cursor .cursor { display: block; }

/* ── Type helpers ───────────────────────────────────────── */
.label { font-size: 10px; color: var(--orange); letter-spacing: .5em; text-transform: uppercase; font-weight: 500; margin-bottom: 1.5rem; }
.ghost, .ghost-orange { font-family: var(--serif); font-style: italic; font-weight: 400; color: transparent; letter-spacing: -.01em; }
.ghost { -webkit-text-stroke: 1.5px rgba(255,255,255,.45); }
.ghost-orange { -webkit-text-stroke: 1.2px var(--orange); }
.blur-text em { font-family: var(--serif); font-style: italic; color: rgba(255,255,255,.9); }

/* ── Nav ────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.75rem 1.5rem;
  background: linear-gradient(to bottom, rgba(0,0,0,.5), transparent);
  animation: fadeDown 1.2s var(--ease) .3s both;
}
@media (min-width: 768px) { .nav { padding: 1.75rem 5rem; } }
.brand { display: flex; align-items: baseline; gap: .5rem; transition: opacity .3s; }
.brand:hover { opacity: .8; }
.brand-name { font-weight: 900; letter-spacing: -.05em; font-size: 1.125rem; line-height: 1; }
.brand-role { display: none; font-size: 9px; letter-spacing: .35em; text-transform: uppercase; color: var(--orange); }
@media (min-width: 640px) { .brand-role { display: inline; } }

.nav-links { display: none; align-items: center; gap: .5rem; font-size: 11px; text-transform: uppercase; letter-spacing: .28em; font-weight: 500; }
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-links a { padding: .5rem 1rem; color: rgba(255,255,255,.5); transition: color .3s; }
.nav-links a:hover { color: rgba(255,255,255,.85); }
.nav-links a.nav-cta { margin-left: .5rem; padding: .5rem 1.25rem; background: var(--orange); color: #000; font-weight: 700; border-radius: 999px; letter-spacing: .2em; transition: background .3s; }
.nav-links a.nav-cta:hover { background: #fff; color: #000; }

.burger { position: relative; z-index: 61; width: 40px; height: 40px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; background: none; border: 0; padding: 0; }
@media (min-width: 768px) { .burger { display: none; } }
.burger span { display: block; width: 24px; height: 1.5px; background: #fff; transition: transform .3s, opacity .3s; }
body.menu-open .burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
body.menu-open .burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.mobile-menu { position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,.96); display: flex; flex-direction: column; justify-content: center; padding: 0 2.5rem; }
.mobile-menu[hidden] { display: none; }
.mobile-menu ul { display: flex; flex-direction: column; gap: 2rem; }
.mobile-menu a { font-size: 2.25rem; font-weight: 900; letter-spacing: -.05em; color: rgba(255,255,255,.75); }
.mobile-menu li, .mobile-menu-foot { animation: fadeUp .5s var(--ease) both; }
.mobile-menu li:nth-child(2) { animation-delay: .08s; }
.mobile-menu li:nth-child(3) { animation-delay: .16s; }
.mobile-menu-foot { margin-top: 4rem; font-size: 10px; color: rgba(255,255,255,.2); letter-spacing: .4em; text-transform: uppercase; animation-delay: .24s; }

main { position: relative; z-index: 10; }
section { padding-left: var(--pad); padding-right: var(--pad); }
[data-fade] { will-change: opacity, transform; }

/* ── Hero ───────────────────────────────────────────────── */
.hero { min-height: 135vh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.hero-inner { max-width: 64rem; }
.hero-label { letter-spacing: .2em; font-weight: 700; font-size: 10px; animation: fadeUp .8s var(--ease) .4s both; }
@media (min-width: 768px) { .hero-label { font-size: 12px; } }
.hero-title { font-weight: 900; letter-spacing: -.05em; line-height: .75; margin-bottom: 3rem; display: flex; flex-direction: column; font-size: clamp(5rem, 15vw, 13rem); }
.hero-line { display: block; animation: fadeUpBig 1.1s cubic-bezier(.19,1,.22,1) .6s both; }
.hero-name { display: block; margin-top: -.5rem; perspective: 1000px; }
@media (min-width: 768px) { .hero-name { margin-top: -1.5rem; } }
.hero-name span { display: inline-block; animation: letterIn 1.2s cubic-bezier(.19,1,.22,1) both; }
.hero-name span:nth-child(1) { animation-delay: .70s; }
.hero-name span:nth-child(2) { animation-delay: .76s; }
.hero-name span:nth-child(3) { animation-delay: .82s; }
.hero-name span:nth-child(4) { animation-delay: .88s; }
.hero-name span:nth-child(5) { animation-delay: .94s; }
.hero-name span:nth-child(6) { animation-delay: 1.0s; }
.hero-sub { max-width: 32rem; display: flex; flex-direction: column; gap: 1.5rem; }
.lead { font-size: 1rem; color: rgba(255,255,255,.6); font-weight: 500; line-height: 1.6; }
@media (min-width: 768px) { .lead { font-size: 17px; } }
.small { font-size: .75rem; font-weight: 300; line-height: 1.625; }
@media (min-width: 768px) { .small { font-size: .875rem; } }
.dim { color: rgba(255,255,255,.4); }
.dimmer { color: rgba(255,255,255,.3); }
.explore { margin-top: 2rem; font-size: 10px; color: rgba(255,255,255,.4); letter-spacing: .4em; text-transform: uppercase; font-weight: 500; animation: fadeUp .9s var(--ease) 1.6s both; }

/* ── About ──────────────────────────────────────────────── */
.about { position: relative; z-index: 20; min-height: 100vh; }
.about-grid { min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; align-items: center; gap: 3rem; padding: 8rem 0; }
@media (min-width: 1024px) { .about-grid { flex-direction: row; gap: 5rem; } }
.about-bio { width: 100%; max-width: 42rem; margin-right: auto; display: flex; flex-direction: column; align-items: flex-start; }
@media (min-width: 1024px) { .about-bio { width: 55%; } }
.about-h { font-weight: 900; letter-spacing: -.05em; line-height: .88; margin-bottom: 2rem; font-size: clamp(2.5rem, 7vw, 6.5rem); }
.about-h span { display: block; }
.body { font-size: .875rem; color: rgba(255,255,255,.5); max-width: 32rem; font-weight: 300; line-height: 1.625; margin-bottom: 1.5rem; }
@media (min-width: 768px) { .body { font-size: 1rem; } }
.pill-link { margin-top: 1rem; display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.5rem; border: 1px solid rgba(255,107,26,.3); color: var(--orange); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; border-radius: 999px; transition: background .3s, color .3s; }
.pill-link:hover { background: var(--orange); color: #000; }

.about-side { width: 100%; max-width: 28rem; margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.about-photo { width: 100%; margin: 0 0 24px; border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03); text-align: left; }
.about-photo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; filter: grayscale(15%) contrast(1.04); transition: transform .5s ease, filter .5s ease; }
.about-photo:hover img { transform: scale(1.03); filter: grayscale(0%) contrast(1.06); }
.about-photo figcaption { padding: 10px 14px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.45); border-top: 1px solid rgba(255,255,255,.08); }
@media (min-width: 1024px) { .about-side { width: 40%; } }
.rule { width: 3rem; height: 1px; background: rgba(255,255,255,.15); margin-bottom: 2rem; }
.side-title { font-size: 10px; letter-spacing: .4em; text-transform: uppercase; font-weight: 400; margin: 0 0 1.5rem; }
.side-title span { display: inline-block; border-bottom: 1px solid rgba(255,255,255,.3); padding-bottom: .5rem; color: rgba(255,255,255,.5); }
.chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; margin-bottom: 2.5rem; }
.chip { padding: .5rem 1rem; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; font-size: 10px; color: rgba(255,255,255,.4); letter-spacing: .1em; text-transform: uppercase; transition: background .3s, color .3s, border-color .3s; }
.chip:hover { background: #fff; color: var(--orange); border-color: #fff; }
.exp { display: flex; flex-direction: column; align-items: flex-end; gap: 1rem; }
.chip-like p { font-size: .875rem; font-weight: 500; color: rgba(255,255,255,.8); }
.chip-like span { display: block; margin-top: .25rem; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.4); }

/* ── Work ───────────────────────────────────────────────── */
.work { min-height: 100vh; padding-top: 16rem; padding-bottom: 18rem; display: flex; flex-direction: column; justify-content: center; }
.work-inner { max-width: 56rem; width: 100%; }
.work .label { margin-bottom: 1rem; }
.work-h { font-weight: 900; letter-spacing: -.05em; line-height: 1; font-size: clamp(3rem, 8vw, 6rem); margin-bottom: 3.5rem; }
@media (min-width: 768px) { .work-h { margin-bottom: 5rem; } }
.work-list { display: flex; flex-direction: column; }
.work-item { position: relative; display: flex; align-items: flex-start; gap: 2rem; padding: 2.5rem 0; border-bottom: 1px solid rgba(255,255,255,.08); transition: border-color .5s; }
@media (min-width: 768px) { .work-item { padding: 3.5rem 0; } }
.work-item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--orange); transform: scaleY(0); transform-origin: top; transition: transform .5s var(--ease); }
.work-item:hover { border-color: rgba(255,255,255,.2); }
.work-item:hover::before { transform: scaleY(1); }
.work-num { padding-left: .75rem; width: 2rem; flex-shrink: 0; padding-top: .25rem; font-family: ui-monospace, monospace; font-size: 10px; color: rgba(255,255,255,.2); letter-spacing: .1em; transition: color .3s; }
.work-item:hover .work-num { color: var(--orange); }
.work-body { flex: 1; min-width: 0; transition: transform .5s var(--ease); }
.work-item:hover .work-body { transform: translateX(6px); }
.work-cat { font-size: 10px; color: rgba(255,255,255,.3); letter-spacing: .4em; text-transform: uppercase; font-weight: 300; margin-bottom: .5rem; transition: color .3s; }
.work-item:hover .work-cat { color: rgba(255,107,26,.7); }
.work-body h3 { font-size: 1.25rem; font-weight: 900; letter-spacing: -.05em; margin-bottom: .75rem; }
@media (min-width: 768px) { .work-body h3 { font-size: 1.5rem; } }
.work-desc { font-size: .875rem; color: rgba(255,255,255,.4); font-weight: 300; line-height: 1.625; max-width: 42rem; transition: color .3s; }
.work-item:hover .work-desc { color: rgba(255,255,255,.65); }
.work-tags { margin-top: 1rem; font-size: 10px; color: rgba(255,255,255,.25); letter-spacing: .15em; text-transform: uppercase; transition: color .3s; }
.work-item:hover .work-tags { color: rgba(255,255,255,.55); }
.work-icon { display: none; flex-shrink: 0; width: 2rem; height: 2rem; margin-top: .5rem; opacity: .2; transition: opacity .5s, color .3s; }
@media (min-width: 768px) { .work-icon { display: block; } }
.work-item:hover .work-icon { opacity: .6; }
.work-icon.arrow { width: 28px; height: 28px; align-self: center; }
.work-item:hover .work-icon.arrow { color: var(--orange); opacity: 1; }

/* ── Contact ────────────────────────────────────────────── */
.contact { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-top: 6rem; padding-bottom: 6rem; }
.contact .label { margin-bottom: 3rem; }
.contact-grid { display: flex; flex-direction: column; width: 100%; max-width: 80rem; min-height: 65vh; }
@media (min-width: 768px) { .contact-grid { flex-direction: row; align-items: stretch; } }
.contact-form { width: 100%; display: flex; flex-direction: column; gap: 1.25rem; }
@media (min-width: 768px) { .contact-form { width: 42%; padding-right: 3rem; } }
.field { display: flex; flex-direction: column; gap: .375rem; }
.field span { font-size: 10px; color: rgba(255,255,255,.3); letter-spacing: .3em; text-transform: uppercase; }
.field input, .field textarea {
  width: 100%; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: .75rem;
  padding: .75rem 1rem; color: #fff; font: inherit; font-size: .875rem; resize: none; transition: border-color .3s;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,.2); }
.field input:focus, .field textarea:focus { outline: none; border-color: rgba(255,107,26,.6); }
.btn { width: 100%; padding: 1rem; border: 0; border-radius: 999px; background: var(--orange); color: #000; font: inherit; font-weight: 700; font-size: .875rem; text-transform: uppercase; letter-spacing: .1em; transition: background .3s; }
.btn:hover { background: #ff8c42; }
.form-note { color: var(--orange); font-size: .875rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.contact-divider { display: none; width: 1px; background: rgba(255,255,255,.1); margin: 0 2rem; transform-origin: top; }
@media (min-width: 768px) { .contact-divider { display: block; } }
.contact-head { width: 100%; margin-top: 4rem; display: flex; flex-direction: column; justify-content: flex-end; text-align: right; }
@media (min-width: 768px) { .contact-head { width: 58%; margin-top: 0; padding-left: 1.5rem; } }
.contact-h { font-weight: 900; letter-spacing: -.05em; line-height: .88; font-size: clamp(2.6rem, 5.5vw, 6.5rem); }
.contact-h span { display: block; }
.contact-sub { margin-top: 1.5rem; color: rgba(255,255,255,.25); font-size: .875rem; font-weight: 300; line-height: 1.625; }

/* ── Footer ─────────────────────────────────────────────── */
.footer { position: relative; z-index: 50; border-top: 1px solid rgba(255,255,255,.08); padding: 4rem var(--pad); background: linear-gradient(to bottom, rgba(8,8,8,.6), var(--bg) 40%); }
.footer-top { display: flex; flex-direction: column; justify-content: space-between; gap: 3rem; margin-bottom: 4rem; }
@media (min-width: 768px) { .footer-top { flex-direction: row; align-items: flex-end; } }
.footer .label { margin-bottom: 1rem; }
.footer-name { font-weight: 900; letter-spacing: -.05em; line-height: .85; font-size: clamp(3rem, 8vw, 7rem); }
.footer-links { display: flex; flex-direction: column; gap: 2rem; }
@media (min-width: 768px) { .footer-links { align-items: flex-end; } }
.footer-links nav, .social { display: flex; flex-wrap: wrap; gap: 2rem; font-size: 11px; text-transform: uppercase; letter-spacing: .3em; font-weight: 500; }
.footer-links nav a { color: rgba(255,255,255,.4); transition: color .3s; }
.footer-links nav a:hover { color: var(--orange); }
.social a { color: rgba(255,255,255,.25); transition: color .3s; }
.social a:hover { color: rgba(255,255,255,.7); }
.footer-rule { height: 1px; background: rgba(255,255,255,.08); margin-bottom: 2rem; }
.footer-bottom { display: flex; flex-direction: column; gap: 1rem; justify-content: space-between; }
@media (min-width: 768px) { .footer-bottom { flex-direction: row; align-items: center; } }
.footer-mail { font-family: "Times New Roman", Times, serif; font-style: italic; font-size: 10px; color: rgba(255,255,255,.2); letter-spacing: .1em; }
.footer-copy { font-size: 10px; color: rgba(255,255,255,.15); letter-spacing: .3em; text-transform: uppercase; }

/* ── Reveal on scroll (added by IntersectionObserver) ───── */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
.js .reveal.in { opacity: 1; transform: none; }
.js .chip { opacity: 0; transform: translateX(-10px); transition: opacity .4s var(--ease), transform .4s var(--ease), background .3s, color .3s, border-color .3s; transition-delay: calc(var(--i, 0) * 25ms), calc(var(--i, 0) * 25ms), 0s, 0s, 0s; }
.js .chips.in .chip { opacity: 1; transform: none; }

/* Word-by-word blur text */
.blur-text .w { display: inline-block; white-space: pre; }
.js .blur-text .w { opacity: 0; filter: blur(8px); transform: translateY(24px); transition: opacity .45s ease, filter .45s ease, transform .45s ease; transition-delay: calc(var(--d, 0) * 1ms); }
.js .blur-text.in .w { opacity: 1; filter: none; transform: none; }

/* ── Keyframes ──────────────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } }
@keyframes fadeUpBig { from { opacity: 0; transform: translateY(90px); } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-30px); } }
@keyframes letterIn { from { opacity: 0; transform: translateY(100px) rotateX(-40deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* ── Blog links on homepage ─────────────────────────────── */
.posts { position: relative; padding-top: 2rem; padding-bottom: 6rem; }
.posts .label { margin-bottom: 1.5rem; }
.posts-list { max-width: 56rem; display: flex; flex-direction: column; }
.post-link { display: block; padding: 1.5rem 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: clamp(1.1rem, 2.4vw, 1.6rem); font-weight: 900; letter-spacing: -.04em; transition: color .3s, transform .5s var(--ease); }
.post-link span { display: block; margin-bottom: .5rem; font-size: 10px; font-weight: 400; letter-spacing: .4em; text-transform: uppercase; color: rgba(255,255,255,.3); }
.post-link:hover { color: var(--orange); transform: translateX(6px); }
