/* Font sizes live in sizes.css */
/* Tejasvi Singh — portfolio
   Layout: alternating bands. Dark bands carry the film work (reel, frames, credits, contact);
   light bands carry the portrait work (intro, albums, kit, testimonials). */

:root {
  /* dark band */
  --night: #0F1011;
  --night-2: #18191B;
  --night-line: #2B2D30;
  --night-fg: #EDE9E2;
  --night-muted: #A29D94;
  --tungsten: #E0A458;
  /* light band */
  --paper: #FAFAF8;
  --stone: #ECEBE7;
  --paper-line: #E2E0DB;
  --mist: #F1F0EC;         /* lightest shade: background of the Stills section on Home */
  --ink: #161615;
  --ink-soft: #46443F;
  --ink-muted: #66635D;
  --oxblood: #7C2D2A;
  /* type */
  --serif: Fraunces, Georgia, 'Times New Roman', serif;
  --sans: Jost, 'Helvetica Neue', Arial, sans-serif;
  --gutter-l: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

/* Bands set the local palette everything inside reads from */
.band-dark  { --bg: var(--night); --bg-2: var(--night-2); --fg: var(--night-fg); --muted: var(--night-muted); --line: var(--night-line); --accent: var(--tungsten); --ph: var(--night-2); background: var(--bg); color: var(--fg); color-scheme: dark; }
.band-light { --bg: var(--paper); --bg-2: var(--stone); --fg: var(--ink); --muted: var(--ink-muted); --line: var(--paper-line); --accent: var(--oxblood); --ph: var(--stone); background: var(--bg); color: var(--fg); }
body.band-dark::before, body.band-light::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }

.wrap { max-width: 1240px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.narrow { max-width: 780px; }
.section { padding-block: clamp(80px, 11vw, 140px); }
.section + .section { padding-top: 0; }
.band-dark + .band-light, .band-light + .band-dark { padding-top: clamp(80px, 11vw, 140px); }
.hero + .section { padding-top: 0; }

/* Type */
.label { font-family: var(--sans); font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin: 0; }
.label.accent { color: var(--accent); }
.serif { font-family: var(--serif); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; text-wrap: balance; }
/* Readable headings: Fraunces at a low optical size keeps its thin strokes sturdy */
.serif, h1, h2, h3, .brand, .lede, .card .t, .credit-list .t, .album-nav .t, .quotes blockquote { font-optical-sizing: none; font-variation-settings: 'opsz' 24, 'SOFT' 0, 'WONK' 0; letter-spacing: -0.005em; }
.hero-title, .page-head h1, .contact h2 { font-variation-settings: 'opsz' 48, 'SOFT' 0, 'WONK' 0; letter-spacing: -0.015em; }
h2 { line-height: 1.08; }
.lede { font-family: var(--serif); line-height: 1.38; margin: 0; text-wrap: balance; }
.soft { color: var(--muted); }
p { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 24px; margin-bottom: 40px; }
.text-link { font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none; color: var(--accent); }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 32px; min-height: 68px; padding-block: 10px; }
.brand { font-family: var(--serif); font-weight: 500; letter-spacing: 0.01em; text-decoration: none; line-height: 1.1; }
.brand small { display: block; font-family: var(--sans); font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 32px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none; color: var(--muted); border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--fg); }
.nav a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--fg); }

/* Hero / reel */
.hero { padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(64px, 9vw, 112px); }
.hero-title { line-height: 0.95; letter-spacing: -0.01em; }
.hero-title em { color: var(--accent); font-style: italic; }
.hero-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 48px; margin-bottom: clamp(32px, 4vw, 48px); }
.hero-top p { max-width: 34ch; color: var(--muted); }
.reel { margin: 0; position: relative; background: #000; border: 1px solid var(--line); }
.reel video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.reel-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; margin-top: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border: 1px solid var(--fg); background: transparent; color: var(--fg); font-family: var(--sans); letter-spacing: 0.06em; text-decoration: none; cursor: pointer; transition: background .2s ease, color .2s ease; }
.btn:hover { background: var(--fg); color: var(--bg); }
.btn.solid { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn.solid:hover { background: var(--fg); border-color: var(--fg); }
.btn svg { width: 16px; height: 16px; flex: none; }

/* Frames from the reel */
.frames { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
.frames figure { margin: 0; min-width: 0; }
.frames img { width: 100%; aspect-ratio: 2.39 / 1; object-fit: cover; background: var(--ph); }
.frames figcaption { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .frames { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .frames { grid-template-columns: minmax(0, 1fr); } }

/* Credits */
.credits-layout { display: flex; flex-wrap: wrap; gap: 32px 80px; }
.credits-layout > :first-child { flex: 1 1 280px; }
.credits-layout > :last-child { flex: 2 1 460px; min-width: 0; }
.credit-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--fg); }
.credit-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding-block: 16px; border-bottom: 1px solid var(--line); }
.credit-list .t { font-family: var(--serif); line-height: 1.2; }
.credit-list .k { white-space: nowrap; }

/* Portrait cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 48px 28px; }
.card { display: flex; flex-direction: column; gap: 12px; min-width: 0; text-decoration: none; color: inherit; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.card .pic { display: block; position: relative; aspect-ratio: 4 / 5; background: var(--ph); overflow: hidden; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .pic img { transform: scale(1.025); }
@media (prefers-reduced-motion: reduce) { .card .pic img { transition: none; } .card:hover .pic img { transform: none; } }
.card .t { font-family: var(--serif); line-height: 1.25; }
.card:hover .t { color: var(--accent); }
.card .meta { display: flex; justify-content: space-between; gap: 12px; }

/* Missing image: shows where the file should go */
.ph-box { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 12px; background: var(--ph); }
.ph-box span { letter-spacing: 0.08em; color: var(--muted); word-break: break-all; }

/* Equipment */
.kit { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 0 64px; margin: 0; }
.kit div { border-top: 1px solid var(--line); padding-block: 16px; display: flex; flex-direction: column; gap: 4px; }
.kit dd { margin: 0; }

/* Testimonials */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 40px 56px; }
.quotes figure { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.quotes blockquote { margin: 0; font-family: var(--serif); font-style: italic; line-height: 1.5; }

/* Contact */
.contact { text-align: center; }
.contact .stack { align-items: center; }
.contact h2 { line-height: 1; }
.contact h2 em { color: var(--accent); }
.contact-rows { display: flex; flex-direction: column; gap: 0; width: 100%; max-width: 560px; margin-top: 16px; border-top: 1px solid var(--line); }
.contact-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding-block: 14px; border-bottom: 1px solid var(--line); text-align: left; }
.contact-row a { text-decoration: none; word-break: break-word; }
.contact-row a:hover { color: var(--accent); }
.copy { min-height: 44px; padding: 0 14px; border: 1px solid var(--line); background: none; cursor: pointer; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.copy:hover { color: var(--fg); border-color: var(--fg); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding-block: 28px 36px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer nav { display: flex; gap: 28px; }

/* Portraits page */
.page-head { text-align: center; padding-top: clamp(56px, 8vw, 96px); padding-bottom: 40px; }
.page-head h1 { line-height: 1; }
.page-head p.soft { max-width: 56ch; margin: 18px auto 0; }
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 32px; margin-top: 28px; }
.filters button { min-height: 44px; padding: 0 2px; background: none; border: 0; border-bottom: 1px solid transparent; cursor: pointer; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.filters button:hover { color: var(--fg); }
.filters button[aria-pressed="true"] { color: var(--fg); border-bottom-color: var(--fg); }
.filters .n { margin-left: 6px; color: var(--muted); letter-spacing: 0.04em; }
.empty { text-align: center; padding-block: 40px; }

/* Album view (dark, over the light page) */
.album-view { position: fixed; inset: 0; z-index: 40; overflow-y: auto; overscroll-behavior: contain; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.album-top { position: sticky; top: 0; z-index: 2; background: var(--bg); border-bottom: 1px solid var(--line); }
.album-top .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; }
.album-close { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; background: none; border: 0; cursor: pointer; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.album-close:hover { color: var(--fg); }
.album-head { text-align: center; padding-block: 48px 40px; }
.album-head h2 { line-height: 1.05; margin-top: 12px; }
.album-grid { columns: 3 300px; column-gap: 20px; padding-bottom: 40px; }
.album-grid button { display: block; width: 100%; margin: 0 0 20px; padding: 0; border: 0; background: var(--ph); cursor: zoom-in; break-inside: avoid; position: relative; }
.album-grid img { width: 100%; height: auto; }
.album-grid .ph-frame { aspect-ratio: 4 / 5; }
.album-nav { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; border-top: 1px solid var(--line); padding-block: 24px 64px; }
.album-nav button { display: flex; flex-direction: column; gap: 2px; min-height: 44px; background: none; border: 0; cursor: pointer; text-align: left; color: var(--fg); }
.album-nav button:last-child { text-align: right; align-items: flex-end; }
.album-nav .t { font-family: var(--serif); }
.album-nav button:hover .t { color: var(--accent); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(8, 8, 9, 0.97); color: var(--night-fg); display: flex; align-items: center; justify-content: center; padding: calc(64px + env(safe-area-inset-top, 0px)) max(64px, env(safe-area-inset-right, 0px)) calc(64px + env(safe-area-inset-bottom, 0px)) max(64px, env(safe-area-inset-left, 0px)); }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox .lb-ph { width: min(70vw, 480px); aspect-ratio: 4 / 5; background: var(--night-2); position: relative; }
.lb-btn { position: absolute; min-width: 48px; min-height: 48px; display: flex; align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; color: var(--night-fg); }
.lb-btn:hover { color: var(--tungsten); }
.lb-btn svg { width: 26px; height: 26px; }
.lb-close { top: calc(10px + env(safe-area-inset-top, 0px)); right: max(10px, env(safe-area-inset-right, 0px)); }
.lb-prev { left: max(6px, env(safe-area-inset-left, 0px)); top: 50%; transform: translateY(-50%); }
.lb-next { right: max(6px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); left: 0; right: 0; text-align: center; letter-spacing: 0.18em; color: var(--night-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .lightbox { padding-left: 12px; padding-right: 12px; } .lb-prev, .lb-next { top: auto; bottom: calc(6px + env(safe-area-inset-bottom, 0px)); transform: none; } }
body.no-scroll { overflow: hidden; }

/* Home: two category cards */
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.cards.two .pic { aspect-ratio: 4 / 5; }

/* Portraits gallery (masonry columns) */
#set-intro { margin-top: 18px; }
#gallery { display: flex; gap: 24px; align-items: flex-start; }
#gallery .gcol { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
#gallery button { display: block; width: 100%; margin: 0; padding: 0; border: 0; background: var(--ph); cursor: zoom-in; }
#gallery img { width: 100%; height: auto; transition: opacity .3s ease; }
#gallery button:hover img { opacity: .92; }

/* WordPress: keep the sticky header below the admin bar when logged in */
.admin-bar .site-header { top: calc(32px + env(safe-area-inset-top, 0px)); }
.wp-content { max-width: 780px; margin: 0 auto; padding-block: clamp(56px, 8vw, 96px); }
.wp-content > * + * { margin-top: 1.2em; }
.wp-content img { height: auto; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* Home: three category cards */
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.cards.three .meta { flex-direction: column; gap: 4px; }
.cards .meta .label:last-child { white-space: nowrap; }

/* Break between the reel stills and the On set project list */
/* A band of its own between the reel stills and the credits */
.bridge { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-block: clamp(72px, 9vw, 120px); text-align: center; }
.bridge .stack { align-items: center; gap: 22px; }
.bridge .bridge-line { font-style: italic; max-width: 20ch; }
.bridge p.soft { max-width: 52ch; }
.section.set-section { padding-top: clamp(80px, 11vw, 140px); }

/* Credits: title · crew · type */
.credit-list li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) auto; align-items: baseline; gap: 6px 28px; }
.credit-list .crew { display: flex; flex-direction: column; gap: 2px; color: var(--fg); line-height: 1.45; }
.credit-list .crew .role { color: var(--muted); }
.credit-list .k { text-align: right; }

/* On set credits table: Project · Type · DOP · Gaffer */
.credits-wrap { overflow-x: auto; }
.credits-table { width: 100%; border-collapse: collapse; }
.credits-table thead th { text-align: left; font-family: var(--sans); font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); padding: 0 24px 16px 0; border-bottom: 1px solid var(--fg); }
.credits-table tbody th, .credits-table td { text-align: left; vertical-align: baseline; padding: 18px 24px 18px 0; border-bottom: 1px solid var(--line); }
.credits-table tbody th { font-family: var(--serif); font-weight: 500; color: var(--fg); }
.credits-table td { color: var(--fg); }
.credits-table td.label { color: var(--muted); }
.credits-table th:last-child, .credits-table td:last-child { padding-right: 0; }
.credits-table .none { color: var(--muted); }
.credits-table thead th:first-child, .credits-table tbody th { width: 30%; }
.bridge h2 { margin: 0; }

/* Stills section on Home: its own light shade */
.section.stills-band { background: var(--mist); border-top: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line); padding-top: clamp(80px, 11vw, 140px); }
.stills-band + .section { padding-top: clamp(80px, 11vw, 140px); }

/* Spec ad */
.section.spec { padding-top: clamp(80px, 11vw, 140px); }
.spec-film { margin: 0; background: #000; border: 1px solid var(--line); }
.spec-film video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.spec-notes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px 64px; align-items: start; margin-top: 32px; }
.spec-notes .lede { font-style: italic; }
.spec-notes .label { grid-column: 2; }
