/* Niemisha Sharma — Artist & Curator.
   Built to the Website Kickstart Brief: warm, intellectual, editorial, contemporary.
   Everything this site needs lives inside this folder, so it can move to its own repo as-is. */

:root {
  /* Palette (brief §04) */
  --paper: #f7f1e7;        /* main canvas */
  --ink: #282521;          /* primary text */
  --muted: #6d665d;        /* dates, metadata */
  --burgundy: #713c43;     /* primary accent: links, markers, focus */
  --rust: #b45c3d;         /* small highlights, rules */
  --olive: #6f7658;        /* research tags, sparingly */
  --shadow: #e9dfd1;       /* cards, notes, metadata panels */
  --rule: #d8ccbd;         /* hairlines */

  /* Two families only: an editorial serif and a legible sans (brief §04) */
  --serif: "Fraunces", Georgia, serif;
  --sans: "Source Sans 3", system-ui, sans-serif;

  --max: 1360px;
  --gutter: clamp(16px, 4vw, 56px);
  --gap: clamp(48px, 7vw, 112px);   /* major section gap: ~72–120 desktop, 48–72 mobile */
  --t: 220ms;                       /* motion: 150–300ms */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  overflow-x: hidden;
}
/* a faint paper tooth for tactility; never over images' colour */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100;
  opacity: .22; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .34 0 0 0 0 .28 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--burgundy); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color var(--t); }
a:hover { color: var(--rust); }
img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--shadow); }
:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 10px 16px; z-index: 200; }
.skip:focus { left: 8px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- type scale (brief §04) ---------- */
h1, h2, h3, .serif {
  font-family: var(--serif);
  font-weight: 360;
  font-optical-sizing: auto;
  letter-spacing: -.01em;
  margin: 0;
}
.hero-title { font-size: clamp(42px, 5.4vw, 76px); line-height: 1.02; }
h1 { font-size: clamp(36px, 4.4vw, 60px); line-height: 1.08; }
h2 { font-size: clamp(26px, 2.6vw, 36px); line-height: 1.15; }
h3 { font-size: clamp(21px, 2vw, 28px); line-height: 1.18; }
h1 em, h2 em, .hero-title em { font-style: italic; color: var(--burgundy); }

.label { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; font-weight: 600; }
.label .n { color: var(--rust); margin-right: 10px; }
.meta { font-size: 14px; line-height: 1.45; color: var(--muted); }
.note { font-style: italic; color: var(--muted); }
.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--ink); max-width: 38em; }
.measure { max-width: 38em; }   /* ~60–80 characters */

/* ---------- placeholder marking ---------- */
.ph-tag {
  display: inline-block; font: 600 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase;
  color: var(--rust); border: 1px solid currentColor; padding: 4px 7px; border-radius: 3px; vertical-align: middle;
}
.draft-bar { background: var(--ink); color: var(--paper); font-size: 13px; text-align: center; padding: 7px var(--gutter); }

/* image slot: a real image, or a quiet labelled placeholder (never generated art) */
.img { position: relative; background: var(--shadow); overflow: hidden; }
.img img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease; }
.img.empty { display: grid; place-items: center; border: 1px solid var(--rule); }
.img.empty span { font-size: 13px; color: var(--muted); text-align: center; padding: 16px; max-width: 22em; }
.img.empty::before { content: ""; position: absolute; inset: 14px; border: 1px dashed var(--rule); pointer-events: none; }
a:hover .img img { transform: scale(1.025); }
figure { margin: 0; }
figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); line-height: 1.45; }
figcaption b { color: var(--ink); font-weight: 600; }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid transparent; transition: border-color var(--t); }
.site-head.scrolled { border-color: var(--rule); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.mark { text-decoration: none; color: var(--ink); display: grid; line-height: 1.1; padding: 6px 0; }
.mark:hover { color: var(--ink); }
.mark b { font-family: var(--serif); font-weight: 400; font-size: 23px; letter-spacing: -.01em; }
.mark small { font-size: 13px; color: var(--muted); letter-spacing: .04em; margin-top: 3px; }
.nav { display: flex; gap: clamp(16px, 2.2vw, 32px); }
.nav a { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; padding: 10px 0; border-bottom: 1.5px solid transparent; transition: border-color var(--t), color var(--t); }
.nav a:hover { color: var(--burgundy); }
.nav a[aria-current="page"] { border-color: var(--burgundy); color: var(--burgundy); }
.menu-btn { display: none; font: 500 15px var(--sans); color: var(--ink); background: none; border: 1px solid var(--rule); border-radius: 999px; padding: 0 18px; min-height: 44px; cursor: pointer; }

/* ---------- buttons / links ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px;
  border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; font: 500 16px var(--sans);
  border: 0; cursor: pointer; transition: background var(--t), color var(--t);
}
.btn:hover { background: var(--burgundy); color: var(--paper); }
.btn.line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn.line:hover { background: var(--ink); color: var(--paper); }
.more { font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--rust); padding-bottom: 2px; color: var(--ink); white-space: nowrap; }
.more:hover { color: var(--burgundy); }

/* ---------- sections ---------- */
.section { padding: var(--gap) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section.panel { background: var(--shadow); border-top: 0; }
.section.panel + .section { border-top: 0; }
.head-row { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 52px); }
.page-head { padding: clamp(40px, 6vw, 88px) 0 clamp(32px, 4vw, 56px); }
.page-head .lede { margin-top: 22px; }
.crumb { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 12px; font-size: 15px; text-decoration: none; color: var(--muted); }
.crumb:hover { color: var(--burgundy); }

/* ---------- hero ---------- */
.hero { padding: clamp(36px, 6vw, 88px) 0 var(--gap); }
.hero .wrap { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 80px); align-items: end; }
.hero .label { margin-bottom: 22px; }
.hero .lede { margin: 26px 0 34px; color: var(--muted); }
.hero .img { aspect-ratio: 4 / 3; }

/* ---------- practice: varied-scale editorial grid ---------- */
.works { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(32px, 4vw, 56px) clamp(16px, 2.5vw, 40px); }
.work { grid-column: span 4; text-decoration: none; color: var(--ink); }
.work:hover { color: var(--ink); }
.work .img { aspect-ratio: 4 / 5; }
.work.lg { grid-column: span 7; }
.work.lg .img { aspect-ratio: 4 / 3; }
.work.md { grid-column: span 5; }
.work.md .img { aspect-ratio: 4 / 5; }
.work.offset { margin-top: clamp(0px, 6vw, 96px); }
.work .info { margin-top: 16px; }
.work h3 { transition: color var(--t); }
.work:hover h3 { color: var(--burgundy); }
.work .meta { margin-top: 6px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(32px, 4vw, 52px); }
.filter { font: 500 15px var(--sans); min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--rule); background: transparent; color: var(--ink); cursor: pointer; transition: border-color var(--t), background var(--t), color var(--t); }
.filter:hover { border-color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- curating: editorial features ---------- */
.features { display: grid; gap: clamp(48px, 6vw, 88px); }
.feature { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(24px, 4vw, 64px); align-items: center; text-decoration: none; color: var(--ink); }
.feature:hover { color: var(--ink); }
.feature:nth-child(even) { grid-template-columns: 5fr 7fr; }
.feature:nth-child(even) .img { order: 2; }
.feature .img { aspect-ratio: 3 / 2; }
.feature:hover h3 { color: var(--burgundy); }
.feature p { margin: 14px 0 18px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 16px 0 0; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

/* ---------- research note (home §4) ---------- */
.inquiry { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(24px, 4vw, 64px); align-items: start; }
.inquiry blockquote { margin: 0; font-family: var(--serif); font-weight: 340; font-size: clamp(26px, 3vw, 40px); line-height: 1.22; }
.inquiry blockquote::before { content: "“"; color: var(--rust); }
.inquiry blockquote::after { content: "”"; color: var(--rust); }

/* ---------- writing index ---------- */
.index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.index li { border-bottom: 1px solid var(--rule); }
.index a { display: grid; grid-template-columns: 160px 1fr 140px; gap: 24px; padding: 26px 0; text-decoration: none; color: var(--ink); align-items: baseline; }
.index a:hover h3 { color: var(--burgundy); }
.index h3 { font-size: clamp(20px, 1.8vw, 25px); transition: color var(--t); }
.index p { margin: 6px 0 0; color: var(--muted); font-size: 16px; }
.index .type { font-size: 14px; color: var(--muted); }
.index .yr { font-size: 14px; color: var(--muted); text-align: right; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--olive); }
.tag.draft { color: var(--rust); }

/* ---------- detail pages ---------- */
.detail-head { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(24px, 5vw, 80px); align-items: end; padding-bottom: clamp(28px, 4vw, 48px); }
.metablock { background: var(--shadow); padding: clamp(20px, 2.4vw, 32px); border-radius: 4px; }
.metablock dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; margin: 0; font-size: 15px; }
.metablock dt { color: var(--muted); }
.metablock dd { margin: 0; }
.lead .img { aspect-ratio: 16 / 9; }
.sequence { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(28px, 4vw, 56px) clamp(16px, 2.5vw, 40px); margin-top: clamp(40px, 5vw, 72px); }
.sequence figure { grid-column: span 6; }
.sequence figure:nth-child(3n+1) { grid-column: 2 / span 7; }
.sequence figure:nth-child(3n+3) { grid-column: 7 / span 6; }
.sequence .img { aspect-ratio: 4 / 3; }
.reading { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(24px, 5vw, 80px); padding: var(--gap) 0 0; }
.prose { max-width: 38em; font-size: 18px; line-height: 1.7; }
.prose p { margin: 0 0 1.15em; }
.prose h2 { margin: 1.6em 0 .6em; }
.credits { font-size: 14px; color: var(--muted); }
.credits li { margin-bottom: 4px; }
.related { padding: var(--gap) 0; margin-top: var(--gap); border-top: 1px solid var(--rule); }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
.about-grid .img { aspect-ratio: 4 / 5; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); }
.cv-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.cv-list li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }
.cv-list .yr { color: var(--muted); }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
.email { font-family: var(--serif); font-size: clamp(24px, 3vw, 38px); color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rust); word-break: break-word; }
.email:hover { color: var(--burgundy); }
.form { display: grid; gap: 18px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: grid; gap: 6px; font-size: 15px; font-weight: 500; }
.form input, .form select, .form textarea {
  font: 400 17px var(--sans); color: var(--ink); background: #fbf7f0;
  border: 1px solid var(--rule); border-radius: 4px; padding: 12px 14px; min-height: 48px; width: 100%;
}
.form textarea { resize: vertical; min-height: 160px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--burgundy); outline-offset: 1px; border-color: var(--burgundy); }
.form .err { color: #8f2f2a; font-size: 14px; min-height: 1.2em; }
.form [aria-invalid="true"] { border-color: #8f2f2a; }
.status { padding: 14px 16px; border-radius: 4px; font-size: 15px; display: none; }
.status.show { display: block; }
.status.ok { background: #e6e8dc; color: #3f4532; }
.status.bad { background: #f3dcd6; color: #7a2b24; }
.hp { position: absolute; left: -9999px; }

/* ---------- footer ---------- */
.site-foot { background: var(--ink); color: #e9e1d5; padding: var(--gap) 0 36px; margin-top: var(--gap); }
.site-foot a { color: #f2ebe0; text-decoration: none; }
.site-foot a:hover { color: #e6b8a3; }
.invite { display: flex; justify-content: space-between; align-items: end; gap: 28px; flex-wrap: wrap; padding-bottom: 48px; border-bottom: 1px solid #4a443d; }
.invite h2 { color: #f7f1e7; max-width: 16em; }
.invite h2 em { color: #e6b8a3; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; padding: 36px 0; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.foot-grid ul a { display: inline-block; padding: 6px 0; }
.foot-grid .meta, .foot-small { color: #b3a99b; }
.foot-small { font-size: 14px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid #4a443d; padding-top: 22px; }
.powered { display: flex; justify-content: center; margin-top: 28px; }
.powered a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 6px; font-size: 13px; color: #b3a99b; opacity: .85; transition: opacity var(--t); }
.powered a:hover { opacity: 1; color: #b3a99b; }
.powered img { height: 25px; width: auto; }

/* ---------- reveal (subtle; content never depends on it) ---------- */
.js .reveal { opacity: 0; transform: translateY(10px); transition: opacity 300ms ease, transform 300ms ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- tablet ---------- */
@media (max-width: 1024px) {
  .work, .work.md { grid-column: span 6; }
  .work.lg { grid-column: span 12; }
  .work.offset { margin-top: 0; }
  .index a { grid-template-columns: 130px 1fr 90px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- mobile ---------- */
@media (max-width: 820px) {
  .menu-btn { display: inline-flex; align-items: center; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--rule); padding: 8px var(--gutter) 20px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; font-size: 17px; border-bottom: 1px solid var(--rule); }
  .nav a[aria-current="page"] { border-bottom-color: var(--rule); }
  .hero .wrap, .feature, .feature:nth-child(even), .inquiry, .detail-head, .reading, .about-grid, .two, .contact-grid { grid-template-columns: 1fr; }
  .feature:nth-child(even) .img { order: 0; }
  .sequence figure, .sequence figure:nth-child(3n+1), .sequence figure:nth-child(3n+3) { grid-column: 1 / -1; }
  .index a { grid-template-columns: 1fr; gap: 4px; }
  .index .yr { text-align: left; }
  .form .row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .site-head .wrap { min-height: 64px; }
  .mark b { font-size: 20px; }
  .work, .work.md, .work.lg { grid-column: 1 / -1; }
  .foot-grid { grid-template-columns: 1fr; }
  .cv-list li { grid-template-columns: 1fr; gap: 2px; }
}
