/* ==========================================================================
   Art by Films — Photography & Video
   Minimal editorial portfolio. No frameworks, no jQuery.
   ========================================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
img, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --fg: #1c1c1c;
  --muted: #8f8f8f;
  --line: #e6e6e6;
  --dark: #191919;
  --accent: #1c1c1c;

  --header-h: 92px;
  --footbar-h: 88px;
  --pad: 40px;

  --sans: "Ek Mukta", "Hind", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;

  --ease: cubic-bezier(.22,.61,.36,1);
}

@media (max-width: 900px) {
  :root { --header-h: 72px; --footbar-h: 72px; --pad: 20px; }
}

/* ---------- Base ---------- */
html, body { height: 100%; }
body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--fg);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }

.u-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.u-serif-it { font-family: var(--serif); font-style: italic; }

/* ---------- Preloader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 999;
  background: var(--bg);
  display: grid; place-items: center;
  transition: opacity .6s var(--ease), visibility .6s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__mark {
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-top-color: var(--fg);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: var(--header-h);
  display: flex; align-items: center;
  padding: 0 var(--pad);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

/* Logo — bracketed wordmark */
.logo {
  position: relative;
  display: inline-flex; align-items: center;
  padding: 10px 16px;
  font-size: 15px; font-weight: 700;
  letter-spacing: .3em;
  text-transform: uppercase;
  white-space: nowrap;
}
.logo::before, .logo::after {
  content: ""; position: absolute; top: 0; bottom: 0;
  width: 9px;
  border: 1px solid var(--fg);
}
.logo::before { left: 0; border-right: 0; }
.logo::after  { right: 0; border-left: 0; }

/* Search */
.search {
  display: flex; align-items: center; gap: 14px;
  margin-left: 56px;
}
.search__icon { width: 17px; height: 17px; flex: none; stroke: var(--fg); fill: none; stroke-width: 1.6; }
.search input {
  width: 180px;
  border: 0; border-bottom: 1px solid var(--line);
  background: none;
  padding: 6px 0;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  outline: none;
  transition: border-color .3s var(--ease), width .4s var(--ease);
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-bottom-color: var(--fg); width: 230px; }

.header__right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* Icon buttons */
.iconbtn {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: none; border: 0; cursor: pointer;
  transition: opacity .3s var(--ease);
}
.iconbtn:hover { opacity: .55; }
.iconbtn svg { width: 20px; height: 20px; stroke: var(--fg); fill: none; stroke-width: 1.6; stroke-linecap: square; }

/* Hamburger */
.burger { position: relative; }
.burger span {
  position: absolute; left: 12px;
  width: 22px; height: 1.5px; background: var(--fg);
  transition: transform .35s var(--ease), opacity .25s var(--ease), width .35s var(--ease);
}
.burger span:nth-child(1) { transform: translateY(-5px); }
.burger span:nth-child(2) { width: 15px; }
.burger span:nth-child(3) { transform: translateY(5px); }
.burger.is-open span:nth-child(1) { transform: rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; width: 22px; }
.burger.is-open span:nth-child(3) { transform: rotate(-45deg); }

@media (max-width: 760px) {
  .search { margin-left: 24px; }
  .search input { width: 92px; }
  .search input:focus { width: 130px; }
}
@media (max-width: 560px) {
  .search { display: none; }
}

/* ==========================================================================
   Overlay menu
   ========================================================================== */
.menu {
  position: fixed; inset: 0; z-index: 55;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .5s var(--ease), visibility .5s;
}
.menu.is-open { opacity: 1; visibility: visible; }
.menu nav { text-align: center; }
.menu a {
  display: block;
  font-family: var(--serif);
  font-size: clamp(34px, 7vw, 66px);
  line-height: 1.35;
  letter-spacing: .01em;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .5s var(--ease), transform .5s var(--ease), color .3s;
}
.menu.is-open a { opacity: 1; transform: none; }
.menu.is-open a:nth-child(1) { transition-delay: .10s; }
.menu.is-open a:nth-child(2) { transition-delay: .17s; }
.menu.is-open a:nth-child(3) { transition-delay: .24s; }
.menu a:hover, .menu a.is-current { color: var(--muted); }
.menu__foot {
  position: absolute; bottom: 40px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 32px;
  color: var(--muted);
}
.menu__foot a {
  font-family: var(--sans);
  font-size: 11px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  line-height: 1;
  opacity: 1; transform: none;
}
.menu__foot a:hover { color: var(--fg); }

/* ==========================================================================
   Share panel (slides from right)
   ========================================================================== */
.sidepanel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 70;
  width: 380px; max-width: 88vw;
  background: var(--dark); color: #fff;
  padding: var(--pad);
  display: flex; flex-direction: column; justify-content: center;
  transform: translateX(100%);
  transition: transform .55s var(--ease);
}
.sidepanel.is-open { transform: none; }
.sidepanel h4 { font-family: var(--serif); font-size: 26px; font-weight: 400; margin-bottom: 26px; }
.sidepanel__links { display: flex; flex-direction: column; gap: 2px; }
.sidepanel__links a {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.72);
  transition: color .3s, padding-left .3s var(--ease);
}
.sidepanel__links a:hover { color: #fff; padding-left: 10px; }
.sidepanel__close {
  position: absolute; top: 26px; right: 26px;
  width: 40px; height: 40px; border: 0; background: none; cursor: pointer;
}
.sidepanel__close::before, .sidepanel__close::after {
  content: ""; position: absolute; left: 9px; top: 19px;
  width: 22px; height: 1.5px; background: #fff;
}
.sidepanel__close::before { transform: rotate(45deg); }
.sidepanel__close::after  { transform: rotate(-45deg); }

.scrim {
  position: fixed; inset: 0; z-index: 65;
  background: rgba(0,0,0,.45);
  opacity: 0; visibility: hidden;
  transition: opacity .45s var(--ease), visibility .45s;
}
.scrim.is-open { opacity: 1; visibility: visible; }

/* ==========================================================================
   Horizontal gallery
   ========================================================================== */
.stage {
  position: fixed;
  top: var(--header-h);
  bottom: var(--footbar-h);
  left: 0; right: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.stage::-webkit-scrollbar { display: none; }

.rows {
  display: flex; flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 6px;
  width: max-content;
  min-width: 100%;
}
.row {
  display: flex; gap: 6px;
  flex: 1 1 0;
  min-height: 0;
}

.tile {
  position: relative;
  height: 100%;
  flex: none;
  overflow: hidden;
  background: #f0efed;
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  animation: tile-in .7s var(--ease) forwards;
}
@keyframes tile-in { to { opacity: 1; transform: none; } }

.tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease), filter .6s var(--ease);
}
.tile:hover img { transform: scale(1.05); }

.tile__veil {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.68) 0%, rgba(0,0,0,.12) 45%, transparent 75%);
  opacity: 0;
  transition: opacity .45s var(--ease);
}
.tile:hover .tile__veil { opacity: 1; }

.tile__meta {
  position: absolute; left: 22px; right: 22px; bottom: 20px;
  color: #fff;
  opacity: 0; transform: translateY(12px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.tile:hover .tile__meta { opacity: 1; transform: none; }
.tile__title { font-family: var(--serif); font-size: 21px; line-height: 1.25; }
.tile__cat { color: rgba(255,255,255,.7); margin-top: 4px; }

/* Video badge */
.tile__play {
  position: absolute; top: 18px; left: 18px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.9);
  display: grid; place-items: center;
  transform: scale(.85);
  transition: transform .4s var(--ease);
}
.tile:hover .tile__play { transform: scale(1); }
.tile__play::after {
  content: "";
  border-left: 9px solid var(--dark);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  margin-left: 3px;
}

.tile.is-hidden { display: none; }

/* Empty state */
.stage__empty {
  display: none;
  place-items: center;
  height: 100%;
  color: var(--muted);
  font-family: var(--serif); font-style: italic; font-size: 22px;
}
.stage.is-empty .rows { display: none; }
.stage.is-empty .stage__empty { display: grid; }

/* ---------- Progress rail ---------- */
.rail {
  position: fixed;
  bottom: var(--footbar-h);
  left: var(--pad); right: var(--pad);
  height: 2px;
  background: var(--line);
  z-index: 20;
}
.rail__bar {
  height: 100%; width: 0;
  background: var(--fg);
  transition: width .08s linear;
}

/* ---------- Bottom bar ---------- */
.footbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  height: var(--footbar-h);
  display: flex; align-items: center; gap: 20px;
  padding: 0 var(--pad);
  background: var(--bg);
}

.filters-toggle {
  display: inline-flex; align-items: center; gap: 26px;
  padding: 15px 22px;
  background: var(--dark); color: #fff;
  border: 0; cursor: pointer;
  transition: background .3s var(--ease);
}
.filters-toggle:hover { background: #000; }
.filters-toggle__arrow { width: 22px; height: 1px; background: #fff; position: relative; transition: width .3s var(--ease); }
.filters-toggle__arrow::after {
  content: ""; position: absolute; right: 0; top: -3px;
  width: 7px; height: 7px;
  border-top: 1px solid #fff; border-right: 1px solid #fff;
  transform: rotate(45deg);
}
.filters-toggle:hover .filters-toggle__arrow { width: 30px; }

/* Filter chips */
.filters {
  display: flex; gap: 30px; align-items: center;
  margin-left: 6px;
  opacity: 0; visibility: hidden; transform: translateX(-12px);
  transition: opacity .4s var(--ease), transform .4s var(--ease), visibility .4s;
}
.filters.is-open { opacity: 1; visibility: visible; transform: none; }
.filters button {
  background: none; border: 0; cursor: pointer;
  color: var(--muted);
  padding-bottom: 5px;
  border-bottom: 1px solid transparent;
  transition: color .3s, border-color .3s;
}
.filters button:hover { color: var(--fg); }
.filters button.is-active { color: var(--fg); border-bottom-color: var(--fg); }

.footbar__hint {
  margin-left: auto;
  display: flex; align-items: center; gap: 14px;
  color: var(--fg);
}
.footbar__count { color: var(--muted); }
.footbar__mouse {
  width: 19px; height: 30px;
  border: 1px solid var(--fg);
  border-radius: 10px;
  position: relative; flex: none;
}
.footbar__mouse::after {
  content: ""; position: absolute; left: 50%; top: 6px;
  width: 1.5px; height: 6px; margin-left: -.75px;
  background: var(--fg);
  animation: wheel 1.6s var(--ease) infinite;
}
@keyframes wheel { 0%,100% { transform: translateY(0); opacity: 1; } 55% { transform: translateY(8px); opacity: 0; } }

@media (max-width: 900px) {
  .footbar { gap: 12px; }
  .footbar__hint span { display: none; }
  .filters { gap: 18px; }
  .filters-toggle { padding: 12px 16px; gap: 14px; }
}
@media (max-width: 620px) {
  .filters-toggle__arrow { display: none; }
  .filters-toggle { gap: 0; }
}

/* Mobile: vertical stacked feed instead of horizontal */
@media (max-width: 620px) {
  .stage { position: static; overflow: visible; height: auto; padding-top: var(--header-h); padding-bottom: 120px; }
  .rows { display: block; width: auto; height: auto; padding: 6px; }
  .row { display: block; }
  .tile { height: 68vh; width: 100% !important; margin-bottom: 6px; }
  .rail { display: none; }
  body.gallery { overflow-y: auto; }
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(255,255,255,.98);
  display: flex; align-items: center; justify-content: center;
  padding: 80px var(--pad) 110px;
  opacity: 0; visibility: hidden;
  transition: opacity .4s var(--ease), visibility .4s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__figure {
  max-width: 100%; max-height: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.lightbox__figure img,
.lightbox__figure video {
  max-width: 100%;
  max-height: calc(100vh - 260px);
  object-fit: contain;
  opacity: 0;
  transform: scale(.98);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.lightbox.is-open .lightbox__figure img,
.lightbox.is-open .lightbox__figure video { opacity: 1; transform: none; }
.lightbox__cap { text-align: center; }
.lightbox__cap strong { font-family: var(--serif); font-weight: 400; font-size: 20px; display: block; }
.lightbox__cap span { color: var(--muted); }

.lightbox__close {
  position: absolute; top: 26px; right: 26px;
  width: 46px; height: 46px; border: 0; background: none; cursor: pointer;
}
.lightbox__close::before, .lightbox__close::after {
  content: ""; position: absolute; left: 12px; top: 22px;
  width: 22px; height: 1.5px; background: var(--fg);
}
.lightbox__close::before { transform: rotate(45deg); }
.lightbox__close::after  { transform: rotate(-45deg); }

.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 54px; height: 54px; border: 0; background: none; cursor: pointer;
  transition: opacity .3s;
}
.lightbox__nav:hover { opacity: .5; }
.lightbox__nav--prev { left: 14px; }
.lightbox__nav--next { right: 14px; }
.lightbox__nav::after {
  content: ""; position: absolute; top: 20px; left: 20px;
  width: 13px; height: 13px;
  border-top: 1.5px solid var(--fg); border-right: 1.5px solid var(--fg);
}
.lightbox__nav--next::after { transform: rotate(45deg); }
.lightbox__nav--prev::after { transform: rotate(-135deg); }
.lightbox__counter {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  color: var(--muted);
}

/* ==========================================================================
   Interior pages (About / Contact)
   ========================================================================== */
body.page { overflow-y: auto; }
.page-main { padding-top: var(--header-h); }

.hero {
  position: relative;
  height: 62vh; min-height: 380px;
  display: flex; align-items: flex-end;
  padding: 0 var(--pad) 64px;
  overflow: hidden;
  background: #d9d6d1;
}
.hero img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.6), rgba(0,0,0,.12) 60%, transparent);
}
.hero__inner { position: relative; z-index: 2; color: #fff; max-width: 720px; }
.hero__rule { width: 44px; height: 1.5px; background: #fff; margin-bottom: 26px; }
.hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(38px, 6.5vw, 74px);
  line-height: 1.08;
}
.hero p { margin-top: 16px; font-size: 17px; color: rgba(255,255,255,.9); max-width: 480px; }

.section { padding: clamp(64px, 9vw, 120px) var(--pad); border-bottom: 1px solid var(--line); }
.section__head {
  display: flex; align-items: baseline; gap: 24px;
  margin-bottom: 44px;
}
.section__head h2 {
  font-size: clamp(19px, 2.4vw, 26px);
  font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
}
.section__num { margin-left: auto; display: flex; align-items: center; gap: 16px; color: var(--muted); }
.section__num::before { content: ""; width: 30px; height: 1px; background: var(--muted); }

.prose { max-width: 62ch; }
.prose p + p { margin-top: 20px; }
.prose .lede { font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 1.55; color: #444; }

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 44px; }
.card h3 { font-family: var(--serif); font-weight: 400; font-size: 24px; margin-bottom: 10px; }
.card p { color: #666; }
.card__num { color: var(--muted); margin-bottom: 14px; }

.skill { margin-bottom: 26px; }
.skill__top { display: flex; justify-content: space-between; margin-bottom: 8px; }
.skill__track { height: 2px; background: var(--line); }
.skill__fill { height: 100%; background: var(--fg); width: 0; transition: width 1.2s var(--ease); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

.field { margin-bottom: 26px; }
.field label { display: block; margin-bottom: 8px; color: var(--muted); }
.field input, .field textarea {
  width: 100%;
  border: 0; border-bottom: 1px solid var(--line);
  background: none; padding: 10px 0;
  font-size: 16px; outline: none;
  transition: border-color .3s var(--ease);
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { border-bottom-color: var(--fg); }

.btn {
  display: inline-flex; align-items: center; gap: 22px;
  padding: 16px 26px;
  background: var(--dark); color: #fff;
  border: 0; cursor: pointer;
  transition: background .3s var(--ease);
}
.btn:hover { background: #000; }
.btn__arrow { width: 22px; height: 1px; background: #fff; position: relative; transition: width .3s var(--ease); }
.btn__arrow::after {
  content: ""; position: absolute; right: 0; top: -3px;
  width: 7px; height: 7px;
  border-top: 1px solid #fff; border-right: 1px solid #fff;
  transform: rotate(45deg);
}
.btn:hover .btn__arrow { width: 32px; }

.info-list li { padding: 20px 0; border-bottom: 1px solid var(--line); display: flex; gap: 24px; }
.info-list span:first-child { color: var(--muted); min-width: 100px; }

.formnote { margin-top: 18px; color: var(--muted); display: none; }
.formnote.is-shown { display: block; }

.footer {
  padding: 46px var(--pad);
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center;
  color: var(--muted);
}
.footer nav { margin-left: auto; display: flex; gap: 28px; }
.footer a:hover { color: var(--fg); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .tile { opacity: 1; transform: none; }
}
