/* ============================================================
   Buğra Anıl — Video Portfolio
   Dark cinematic (OLED) · Space Grotesk + Inter · gold accent
   ============================================================ */

:root {
  --bg: #050505;
  --bg-raised: #0d0d0f;
  --bg-card: #111114;
  --fg: #f4f2ee;
  --fg-muted: #9a958c;
  --accent: #e8b04b;
  --accent-soft: rgba(232, 176, 75, 0.14);
  --border: rgba(255, 255, 255, 0.08);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 104px;
  --radius: 14px;
  --transition: 220ms cubic-bezier(0.33, 1, 0.68, 1);
  --z-nav: 100;
  --z-lightbox: 1000;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ============ NAV ============ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(20px, 4vw, 48px);
  background: rgba(5, 5, 5, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
  font-size: 14px;
  font-weight: 500;
}

.nav__links a {
  color: var(--fg-muted);
  transition: color var(--transition);
  padding: 8px 0;
}

.nav__links a:hover { color: var(--fg); }

.nav__cta {
  color: var(--bg) !important;
  background: var(--accent);
  padding: 9px 18px !important;
  border-radius: 999px;
  transition: transform var(--transition), filter var(--transition);
}

.nav__cta:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: var(--space-6) clamp(20px, 6vw, 96px) var(--space-5);
  overflow: hidden;
}

/* letterbox bars — cinematic frame */
.hero__frame::before,
.hero__frame::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: clamp(24px, 4vh, 44px);
  background: #000;
  z-index: 1;
}
.hero__frame::before { top: 0; }
.hero__frame::after { bottom: 0; }

.hero::after {
  /* soft gold glow, bottom-left */
  content: "";
  position: absolute;
  width: 60vw;
  height: 60vw;
  max-width: 700px;
  max-height: 700px;
  left: -18vw;
  bottom: -30vw;
  background: radial-gradient(circle, rgba(232, 176, 75, 0.10) 0%, transparent 65%);
  pointer-events: none;
}

.hero__kicker {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(44px, 9vw, 110px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-3);
}

.hero__title em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
}

.hero__sub {
  max-width: 46ch;
  color: var(--fg-muted);
  font-size: clamp(15px, 1.6vw, 18px);
  margin-bottom: var(--space-4);
}

.hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
  padding: 12px 0;
  transition: color var(--transition);
}

.hero__scroll:hover { color: var(--accent); }

.hero__scroll svg { animation: bob 2.2s ease-in-out infinite; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* ============ WORK ============ */
.work {
  padding: var(--space-6) clamp(20px, 4vw, 48px);
  max-width: 1440px;
  margin: 0 auto;
}

.work__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; }

.filter-chip {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 13px;
  font-weight: 500;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.filter-chip:hover { color: var(--fg); border-color: rgba(255, 255, 255, 0.2); }

.filter-chip[aria-selected="true"] {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: var(--space-3);
}

.card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-align: left;
  padding: 0;
  display: block;
  width: 100%;
  transition: transform var(--transition), border-color var(--transition);
}

.card:hover, .card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(232, 176, 75, 0.4);
}

.card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #16161a 0%, #0b0b0d 100%);
  overflow: hidden;
}

.card__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__media--missing::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(232, 176, 75, 0.08), transparent 55%),
    linear-gradient(135deg, #1a1a1f 0%, #0b0b0d 100%);
}

.card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 2;
}

.card:hover .card__play, .card:focus-visible .card__play { opacity: 1; }

.card__play span {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(5, 5, 5, 0.65);
  border: 1px solid rgba(232, 176, 75, 0.6);
  backdrop-filter: blur(6px);
  color: var(--accent);
  transition: transform var(--transition);
}

.card:hover .card__play span { transform: scale(1.06); }

.card__body {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 16px 18px;
}

.card__title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card__tag {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.card__duration:empty { display: none; }

.card__duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--fg);
}

/* ============ CATEGORY CARDS ============ */
.cat-card .card__media::after {
  /* isim okunsun diye alttan kararan degrade */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 30%, rgba(0, 0, 0, 0.82) 100%);
  z-index: 1;
}

.cat-card__overlay {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.cat-card__name {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.cat-card__count {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
}

.cat-card__arrow {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(5, 5, 5, 0.55);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--transition), transform var(--transition),
    color var(--transition), border-color var(--transition);
}

.cat-card:hover .cat-card__arrow,
.cat-card:focus-visible .cat-card__arrow {
  opacity: 1;
  transform: none;
  color: var(--accent);
  border-color: rgba(232, 176, 75, 0.6);
}

/* geri dönüş çipi */
.filter-chip--back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.filter-chip--back:hover { color: var(--accent); border-color: var(--accent); }

span.filter-chip[aria-current="true"] {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  cursor: default;
}

/* ============ EMPTY STATE ============ */
.empty[hidden] { display: none; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-3);
  color: var(--fg-muted);
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.empty svg { color: var(--accent); }

.empty__hint { font-size: 14px; }

.empty code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 13px;
}

/* ============ ABOUT ============ */
.about {
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
}

.about__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--space-6) clamp(20px, 4vw, 48px);
}

.about__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-5);
  margin-top: var(--space-4);
}

.about__lead {
  font-size: clamp(19px, 2.4vw, 26px);
  line-height: 1.55;
  font-weight: 300;
  max-width: 30ch;
}

.about__facts {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}

.fact__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.fact__value { color: var(--fg-muted); font-size: 15px; }

/* ============ CONTACT ============ */
.contact {
  text-align: center;
  padding: var(--space-6) clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--border);
}

.contact__sub { color: var(--fg-muted); margin-top: var(--space-2); }

.contact__mail {
  display: inline-block;
  margin-top: var(--space-3);
  font-family: var(--font-display);
  font-size: clamp(22px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition);
}

.contact__mail:hover { border-color: var(--accent); }

.contact__socials {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.contact__socials a {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  transition: color var(--transition), border-color var(--transition), transform var(--transition);
}

.contact__socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ============ FOOTER ============ */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 13px;
}

.footer a { transition: color var(--transition); }
.footer a:hover { color: var(--accent); }

/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: clamp(16px, 4vw, 56px);
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox[hidden] { display: none; }

.lightbox__stage {
  flex: 1;
  max-width: min(1100px, 90vw);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.lightbox__stage video {
  width: 100%;
  max-height: 74vh;
  border-radius: var(--radius);
  background: #000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.lightbox__caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.lightbox__meta {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--fg-muted);
}

.lightbox__close {
  position: absolute;
  top: clamp(14px, 3vw, 28px);
  right: clamp(14px, 3vw, 28px);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--fg);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color var(--transition), color var(--transition);
}

.lightbox__close:hover { border-color: var(--accent); color: var(--accent); }

.lightbox__nav {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color var(--transition), color var(--transition);
}

.lightbox__nav:hover { border-color: var(--accent); color: var(--accent); }

.lightbox__nav[disabled] { opacity: 0.3; cursor: default; pointer-events: none; }

/* ============ REVEAL ANIMATION ============ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 500ms ease-out, transform 500ms ease-out;
}

.reveal.is-visible { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  .about__grid { grid-template-columns: 1fr; gap: var(--space-4); }
  .lightbox { flex-direction: column; }
  .lightbox__nav { display: none; }
}

@media (max-width: 480px) {
  .work__head { flex-direction: column; align-items: flex-start; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
