/* ------------------------------------------------------------------
   Eren Yiğit — portfolyo
   Tasarım: monokrom, bol whitespace, Sharp Sans
   ------------------------------------------------------------------ */

/* Fonts ---------------------------------------------------------- */
@font-face { font-family: "Sharp Sans"; src: url("../fonts/ss-100.woff") format("woff"); font-weight: 100; font-style: normal; font-display: swap; }
@font-face { font-family: "Sharp Sans"; src: url("../fonts/ss-300.woff") format("woff"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Sharp Sans"; src: url("../fonts/ss-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Sharp Sans"; src: url("../fonts/ss-500.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Sharp Sans"; src: url("../fonts/ss-600.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Sharp Sans"; src: url("../fonts/ss-700.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Sharp Sans"; src: url("../fonts/ss-800.woff") format("woff"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Sharp Sans"; src: url("../fonts/ss-400i.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }

/* Tokens --------------------------------------------------------- */
:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted: #8a8a8a;
  --line: #ececec;
  --accent: #0a0a0a;

  --gutter-x: clamp(20px, 5vw, 64px);
  --gap: clamp(16px, 2.5vw, 32px);
  --nav-h: 64px;

  --t-fast: 200ms cubic-bezier(.4,0,.2,1);
  --t-med: 400ms cubic-bezier(.4,0,.2,1);
  --t-slow: 700ms cubic-bezier(.2,.7,.2,1);
}

/* Reset ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Sharp Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, p, blockquote { margin: 0; }

/* Nav ------------------------------------------------------------ */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center;
  height: var(--nav-h);
  padding: 0 var(--gutter-x);
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast);
  gap: clamp(40px, 8vw, 120px);
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__brand {
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--fg);
  white-space: nowrap;
}
.nav__links {
  display: flex;
  gap: clamp(28px, 5vw, 64px);
  flex-wrap: wrap;
}
.nav__links a {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg);
  position: relative;
  padding: 4px 0;
  transition: opacity var(--t-fast);
}
.nav__links a:hover { opacity: 0.55; }
.nav__links a.is-active { font-weight: 600; }

.nav__ig {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  color: var(--fg);
  transition: opacity var(--t-fast);
}
.nav__ig:hover { opacity: 0.55; }
.nav__ig svg { display: block; }

@media (max-width: 700px) {
  /* Nav iki satır: 1) brand sol + IG sağ — 2) kategoriler yatay scroll */
  .nav {
    flex-wrap: wrap;
    height: auto;
    padding-top: 12px;
    padding-bottom: 10px;
    gap: 10px;
  }
  .nav__brand { font-size: 11px; letter-spacing: 0.12em; }
  .nav__ig { margin-left: auto; }
  .nav__links {
    order: 99;
    flex-basis: 100%;
    gap: 18px;
    margin: 4px -16px -4px; /* nav padding'i aşıp kenardan kenara scroll */
    padding: 4px 16px 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .nav__links::-webkit-scrollbar { display: none; }
  .nav__links a {
    font-size: 11px;
    letter-spacing: 0.18em;
    flex-shrink: 0;
  }
}

/* Works grid ----------------------------------------------------- */
.works {
  padding-top: clamp(40px, 6vh, 80px);
  padding-bottom: clamp(60px, 10vh, 140px);
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  padding: 0 var(--gutter-x);
}
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .grid { grid-template-columns: 1fr; } }

.work {
  display: block;
  cursor: pointer;
  position: relative;
}
.work__cover {
  position: relative;
  overflow: hidden;
  background: #f6f6f6;
  aspect-ratio: 4 / 5;
}
.work__cover img,
.work__cover video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--t-slow), filter var(--t-med);
  will-change: transform;
}
.work:hover .work__cover img,
.work:hover .work__cover video {
  transform: scale(1.04);
  filter: brightness(.92);
}
/* Otomatik oynayan video kartında click tıklaması engellenmemeli */
.work__cover video { pointer-events: none; }
.work__overlay {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end;
  padding: clamp(14px, 2vw, 24px);
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 50%);
  opacity: 0;
  transition: opacity var(--t-med);
}
.work:hover .work__overlay { opacity: 1; }
.work__overlay span {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
/* Video kartı: play icon overlay */
.work__play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 56px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: #000;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  z-index: 2;
  transition: transform var(--t-fast), background-color var(--t-fast);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.work__play svg { transform: translateX(2px); }   /* play üçgeni görsel ortalama */
.work:hover .work__play {
  transform: translate(-50%, -50%) scale(1.08);
  background: #fff;
}

.work__meta {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px 2px 0;
  gap: 12px;
}
.work__title {
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.work__count {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
}

/* About / INFO --------------------------------------------------- */
.about {
  border-top: 1px solid var(--line);
  padding: clamp(60px, 10vh, 140px) var(--gutter-x);
}
.about__inner {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(40px, 6vw, 100px);
  max-width: 1100px;
}
@media (max-width: 800px) {
  .about__inner { grid-template-columns: 1fr; gap: 24px; }
}
.about__label {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg);
  padding-top: 6px;
}
.about__body p {
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.7;
  margin-bottom: 1.2em;
  color: #222;
}
.about__quote {
  margin: clamp(20px, 3vh, 36px) 0;
  padding-left: 18px;
  border-left: 1px solid var(--fg);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.55;
  color: var(--fg);
}
.about__contact {
  margin-top: clamp(28px, 4vh, 48px);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
}
.about__contact a {
  border-bottom: 1px solid var(--fg);
  padding-bottom: 2px;
}

/* Footer --------------------------------------------------------- */
.footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px var(--gutter-x);
  border-top: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.footer a { color: var(--muted); transition: color var(--t-fast); }
.footer a:hover { color: var(--fg); }

/* Lightbox ------------------------------------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10,10,10,.95);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(40px, 8vh, 80px) clamp(60px, 8vw, 100px);
  animation: lb-fade var(--t-med) ease both;
  touch-action: pan-y;   /* yatay swipe biz ele alıyoruz */
  user-select: none;
}
.lightbox[hidden] { display: none; }
@keyframes lb-fade { from { opacity: 0 } to { opacity: 1 } }

.lightbox__stage {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex; flex-direction: column; align-items: center;
  gap: 16px;
}
.lightbox__stage img,
.lightbox__stage video {
  max-width: 100%;
  max-height: calc(100vh - 200px);
  object-fit: contain;
  background: #1a1a1a;
}
.lightbox__stage video { width: auto; }
.lightbox__stage[hidden] { display: none; }
.lightbox__prev[hidden],
.lightbox__next[hidden] { display: none; }
.lightbox__meta {
  display: flex; gap: 20px;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  opacity: .85;
}
.lightbox__meta span:nth-child(2) { color: rgba(255,255,255,.6); }

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  font-weight: 300;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background-color var(--t-fast), transform var(--t-fast);
  cursor: pointer;
}
.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover { background: rgba(255,255,255,.24); }
.lightbox__prev:active,
.lightbox__next:active { transform: translateY(-50%) scale(.94); }

.lightbox__close { top: 20px; right: 20px; font-size: 28px; }
.lightbox__prev  { left: 20px;  top: 50%; transform: translateY(-50%); font-size: 36px; }
.lightbox__next  { right: 20px; top: 50%; transform: translateY(-50%); font-size: 36px; }

@media (max-width: 700px) {
  .lightbox { padding: 48px 6px 56px; }
  .lightbox__stage { gap: 10px; }
  .lightbox__stage img,
  .lightbox__stage video { max-height: calc(100dvh - 130px); }
  .lightbox__close {
    top: 10px; right: 10px;
    width: 42px; height: 42px;
    font-size: 24px;
  }
  .lightbox__prev, .lightbox__next {
    width: 46px; height: 46px;
    font-size: 28px;
  }
  .lightbox__prev { left: 8px; }
  .lightbox__next { right: 8px; }
  .lightbox__meta { font-size: 11px; gap: 14px; }
}

/* Reveal on scroll ---------------------------------------------- */
.work {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.work.is-visible {
  opacity: 1;
  transform: translateY(0);
}
