/* KOMBA — Director portfolio */

:root {
  --bg: #0a0a09;
  --bg-2: #131311;
  --fg: #efeae2;
  --muted: #8f897f;
  --line: rgba(239, 234, 226, 0.14);
  --accent: #e3321f;
  --gutter: clamp(16px, 4vw, 56px);
  --display: "Archivo", "Arial Black", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--fg); color: var(--bg); padding: 8px 12px;
}
.skip:focus { left: 8px; }

.eyebrow, .mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

/* ---------- NAV ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background .4s var(--ease), padding .4s var(--ease);
}
.nav.is-solid {
  background: rgba(10, 10, 9, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding-block: 12px;
}
.nav__logo {
  font-weight: 900; font-stretch: 125%; letter-spacing: .02em;
  font-size: 20px; text-decoration: none;
}
.nav__links { display: flex; gap: clamp(16px, 3vw, 36px); }
.nav__links a {
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; text-decoration: none; opacity: .8;
}
.nav__links a:hover { opacity: 1; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  height: 100vh; height: 100svh; min-height: 560px;
  overflow: hidden;
  background: #000;
}
.hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.hero__art img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 30%;
  animation: art-in 1.6s var(--ease) both;
}
@media (max-aspect-ratio: 4/5) { .hero__art img { object-position: 50% 0; } }
@keyframes art-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hero.has-art .hero__tamil { color: var(--fg); }
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 22%),
    linear-gradient(to top, rgba(10,10,9,1) 0%, rgba(10,10,9,.55) 30%, rgba(10,10,9,0) 60%);
}
.hero__inner {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0 var(--gutter) clamp(24px, 5vh, 56px);
}
.hero { --name-size: min(calc((100vw - 2 * var(--gutter)) / 4.92), 420px); }
.hero__title { position: relative; }
/* Portrait stands on the right, its lower edge tucked behind the KOMBA letters */
.hero__portrait {
  position: absolute; z-index: 0; margin: 0;
  right: calc(var(--name-size) * .08);
  bottom: calc(var(--name-size) * .42);
  width: min(21vw, 310px, 34vh);
  aspect-ratio: 904 / 1280;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
  animation: portrait-in 1.1s var(--ease) both .2s;
}
.hero__portrait img { width: 100%; height: 100%; object-fit: cover; }
@keyframes portrait-in { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.hero__name { position: relative; z-index: 1; }
@media (max-width: 680px) {
  .hero__portrait { width: min(40vw, 30vh); right: 2px; }
}
.hero__tamil {
  font-family: "Noto Sans Tamil", var(--display);
  font-weight: 800;
  color: var(--accent);
  font-size: clamp(18px, 2.2vw, 28px);
  margin: 0 0 4px .4vw;
}
.hero__name {
  margin: 0;
  font-weight: 900;
  font-stretch: 125%;
  /* sized so the five letters span the page edge-to-edge */
  font-size: var(--name-size);
  line-height: .78;
  letter-spacing: -.035em;
  margin-left: -.04em;
}
.hero__row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-top: clamp(16px, 2.5vw, 32px);
  flex-wrap: wrap;
}
.hero__role {
  margin: 0;
  max-width: 44ch;
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.4;
}
.hero__role strong {
  display: block;
  font-family: var(--mono); font-weight: 500; font-size: 12px;
  letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 8px; color: var(--fg);
}
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border: 1px solid rgba(239,234,226,.5);
  border-radius: 999px;
  background: transparent;
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background .3s, color .3s, border-color .3s;
}
.btn:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn--light { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn--light:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn svg { width: 14px; height: 14px; fill: currentColor; }

/* ---------- WORK ---------- */
.work { padding: clamp(72px, 10vw, 140px) var(--gutter) 40px; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 20px; margin-bottom: clamp(28px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}
.section-title {
  margin: 0;
  font-weight: 800; font-stretch: 125%;
  font-size: clamp(32px, 5vw, 64px);
  line-height: .95; letter-spacing: -.02em;
}
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: transparent; border-radius: 999px;
  padding: 8px 14px; cursor: pointer;
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
  transition: color .2s, border-color .2s, background .2s;
}
.chip:hover { color: var(--fg); border-color: rgba(239,234,226,.4); }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip sup { font-size: 9px; margin-left: 3px; opacity: .7; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 5vw, 72px) clamp(16px, 2.4vw, 32px);
}
.card { grid-column: span 1; text-decoration: none; display: block; }
.card--feature { grid-column: 1 / -1; }
.card[hidden] { display: none; }
.card__media {
  position: relative; overflow: hidden; background: var(--bg-2);
  aspect-ratio: 16 / 9;
}
.card--feature .card__media { aspect-ratio: 2.39 / 1; }
.card__media img, .card__media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease), opacity .5s var(--ease);
}
.card__media video { opacity: 0; }
.card.is-playing .card__media video { opacity: 1; }
.card:hover .card__media img,
.card:hover .card__media video { transform: scale(1.035); }
.card__play {
  position: absolute; right: 16px; bottom: 16px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  background: rgba(10,10,9,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 7px 12px; border-radius: 999px;
  opacity: 0; transform: translateY(6px);
  transition: opacity .3s, transform .3s var(--ease);
}
.card:hover .card__play, .card:focus-visible .card__play { opacity: 1; transform: none; }
.card__body {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; align-items: baseline;
  padding-top: 18px;
}
.card__num { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.card__title {
  margin: 0; font-weight: 800; font-stretch: 112%;
  font-size: clamp(24px, 2.6vw, 38px); line-height: 1; letter-spacing: -.015em;
}
.card--feature .card__title { font-size: clamp(30px, 4.4vw, 64px); }
.card__title em {
  font-style: normal; font-weight: 400; font-stretch: 100%; color: var(--muted);
}
.card__meta { grid-column: 2; margin-top: 6px; }
.card__meta span + span::before { content: "·"; margin: 0 .6em; opacity: .6; }

/* ---------- CLIENTS ---------- */
.clients {
  margin: clamp(60px, 8vw, 110px) var(--gutter) 0;
  padding: 28px 0;
  border-block: 1px solid var(--line);
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
.clients__list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px clamp(20px, 4vw, 56px);
}
.clients__list li {
  font-weight: 700; font-stretch: 112%;
  font-size: clamp(18px, 2vw, 26px); letter-spacing: -.01em;
}

/* ---------- ABOUT ---------- */
.about {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 80px);
  padding: clamp(80px, 11vw, 160px) var(--gutter);
  align-items: center;
}
.about__media { container-type: inline-size; position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg-2); }
.about__media img { width: 100%; height: 100%; object-fit: cover; }
/* real portrait: show it whole, at its own shape */
.about__media.has-photo { aspect-ratio: auto; background: none; }
.about__media.has-photo img { height: auto; }
@media (max-width: 900px) { .about__media.has-photo { max-width: 460px; } }
.about__media .about__tamil {
  position: absolute; inset: 0; z-index: 1; display: grid; place-items: center;
  font-family: "Noto Sans Tamil", var(--display); font-weight: 800;
  font-size: 17cqw; color: var(--fg);
  text-shadow: 0 6px 40px rgba(0,0,0,.6);
}
.about__media .about__tamil + img { filter: brightness(.6); }
.about.about--text { grid-template-columns: 1fr; }
.about--text #aboutBody p { max-width: 62ch; }
.about__title {
  margin: 10px 0 24px;
  font-weight: 900; font-stretch: 125%;
  font-size: clamp(44px, 7vw, 110px); line-height: .85; letter-spacing: -.03em;
}
#aboutBody p { margin: 0 0 1em; max-width: 56ch; font-size: clamp(17px, 1.4vw, 20px); color: #d9d4cb; }
#aboutBody p:first-child { color: var(--fg); font-size: clamp(20px, 1.9vw, 26px); line-height: 1.35; }

/* ---------- CONTACT ---------- */
.contact {
  padding: clamp(80px, 11vw, 160px) var(--gutter);
  border-top: 1px solid var(--line);
}
.contact__title {
  margin: 14px 0 clamp(24px, 3vw, 40px);
  font-weight: 900; font-stretch: 125%;
  font-size: clamp(44px, 9vw, 150px); line-height: .86; letter-spacing: -.035em;
}
.contact__email {
  display: inline-block;
  font-size: clamp(20px, 3vw, 40px); font-weight: 600;
  text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 4px;
  word-break: break-all;
}
.contact__email:hover { color: var(--accent); }
.contact__list {
  list-style: none; padding: 0; margin: 40px 0 0;
  display: flex; flex-wrap: wrap; gap: 12px 36px;
}
.contact__list a, .contact__list span {
  font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; color: var(--muted);
}
.contact__list a:hover { color: var(--fg); }

.footer {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 24px var(--gutter) 32px;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.footer a { text-decoration: none; }

/* ---------- PROJECT VIEW ---------- */
.project {
  position: fixed; inset: 0; z-index: 40;
  background: var(--bg);
  overflow-y: auto; overscroll-behavior: contain;
  animation: rise .5s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.p-bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px var(--gutter);
  background: rgba(10,10,9,.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.p-bar__group { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 40px; height: 40px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: transparent; cursor: pointer;
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none;
}
.icon-btn:hover { border-color: var(--fg); }
.p-bar .mono { color: var(--muted); }

.p-head { padding: clamp(36px, 6vw, 80px) var(--gutter) clamp(24px, 3vw, 40px); }
.p-title {
  margin: 14px 0 0;
  font-weight: 900; font-stretch: 125%;
  font-size: clamp(44px, 9.5vw, 160px); line-height: .84; letter-spacing: -.035em;
}
.p-title em { display: block; font-style: normal; font-weight: 400; font-stretch: 100%; color: var(--muted); font-size: .32em; letter-spacing: -.01em; margin-top: .35em; }
.p-artist { margin: 18px 0 0; font-size: clamp(18px, 2vw, 26px); font-weight: 600; }

.p-player { padding: 0 var(--gutter); }
.player {
  position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden;
}
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player__poster {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer;
  background: #000;
}
.player__poster img { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: opacity .4s, transform 1.2s var(--ease); }
.player__poster:hover img { opacity: 1; transform: scale(1.02); }
.player__btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: clamp(64px, 8vw, 104px); aspect-ratio: 1; border-radius: 50%;
  background: var(--fg); color: var(--bg);
  display: grid; place-items: center;
  transition: background .3s, color .3s, transform .3s var(--ease);
}
.player__btn svg { width: 34%; height: 34%; fill: currentColor; margin-left: 6%; }
.player__poster:hover .player__btn { background: var(--accent); color: #fff; transform: translate(-50%, -50%) scale(1.06); }
.player__label {
  position: absolute; left: 18px; bottom: 16px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  background: rgba(10,10,9,.6); padding: 6px 10px; border-radius: 999px;
}

.p-films { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px var(--gutter) 0; }
.p-films .chip { color: var(--fg); }
.p-films .chip[aria-pressed="true"] { color: var(--bg); }
.project:focus { outline: none; }

.p-info {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 80px);
  padding: clamp(40px, 6vw, 80px) var(--gutter);
}
.p-logline { margin: 0; font-size: clamp(20px, 2.2vw, 32px); line-height: 1.3; letter-spacing: -.01em; font-weight: 500; }
.p-meta { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 12px 24px; align-content: start; }
.p-meta dt { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.p-meta dd { margin: 0; font-weight: 500; }

.p-credits { border-top: 1px solid var(--line); margin: 8px var(--gutter) 40px; padding-top: 20px; }
.p-credits__list { margin: 22px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px 32px; }
.p-credits__list dt { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.p-credits__list dd { margin: 0; font-weight: 500; line-height: 1.35; }
@media (max-width: 680px) { .p-credits__list { grid-template-columns: 1fr 1fr; gap: 18px 20px; } }
.p-stills-head { padding: 0 var(--gutter) 18px; display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 20px; margin-top: 8px; }
.p-stills {
  padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.p-stills button {
  display: block; width: 100%; padding: 0; border: 0; background: var(--bg-2); cursor: zoom-in;
  overflow: hidden;
}
.p-stills button.is-wide { grid-column: 1 / -1; }
.p-stills img {
  width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  transition: transform 1s var(--ease), opacity .4s;
}
.p-stills button.is-wide img { aspect-ratio: auto; max-height: 88vh; object-fit: contain; }
@media (max-width: 680px) { .p-stills { grid-template-columns: 1fr; } .p-stills img { aspect-ratio: auto; } }
.p-stills button:hover img { transform: scale(1.03); }

.p-next {
  display: block; position: relative; margin-top: clamp(60px, 8vw, 120px);
  text-decoration: none; overflow: hidden; aspect-ratio: 2.39 / 1; max-height: 70vh; width: 100%;
}
.p-next img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.45); transition: filter .6s, transform 1.4s var(--ease); }
.p-next:hover img { filter: brightness(.7); transform: scale(1.03); }
.p-next__text { position: absolute; left: var(--gutter); bottom: clamp(24px, 4vw, 56px); right: var(--gutter); }
.p-next__title { display: block; margin-top: 8px; font-weight: 900; font-stretch: 125%; font-size: clamp(36px, 7vw, 120px); line-height: .86; letter-spacing: -.03em; }

/* ---------- LIGHTBOX & REEL ---------- */
.lightbox, .reel {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(5,5,5,.96);
  display: grid; place-items: center;
  padding: 64px var(--gutter);
}
.lightbox[hidden], .reel[hidden], .project[hidden] { display: none; }
.lightbox__img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; }
.lightbox__btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(10,10,9,.6); cursor: pointer; font-size: 18px;
}
.lightbox__btn:hover { border-color: var(--fg); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; margin: 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.reel__frame { width: min(100%, calc((100vh - 140px) * 16 / 9)); aspect-ratio: 16 / 9; position: relative; background: #000; }
.reel__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .p-info { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .about__media { aspect-ratio: 16 / 10; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .grid { grid-template-columns: 1fr; }
  .card--feature .card__media { aspect-ratio: 16 / 9; }
  .nav__links a[href="#about"] { display: none; }
  .hero__row { flex-direction: column; align-items: flex-start; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 8px; transform: none; }
  .p-bar__count { display: none; }
  .p-next { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
