/* =========================================================================
   Gradient, design system for ishaanavish.com
   Ported from the Industry base + Gradient deviations (beige ground, soft
   edges) per the design handoff. No comments anywhere; only like + share.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700&family=Barlow:wght@400;500;600&display=swap');

:root {
  --color-bg: #ece5d8;
  --paper: #f5f0e6;
  --ink: #20211f;
  --ink-72: rgba(32, 33, 31, .72);
  --ink-68: rgba(32, 33, 31, .68);
  --ink-52: rgba(32, 33, 31, .52);
  --ink-42: rgba(32, 33, 31, .42);
  --ink-22: rgba(32, 33, 31, .22);
  --hair: rgba(32, 33, 31, .13);
  --accent: #5980a6;
  --accent-deep: #41617f;
  --quote: #2b3f52;
  --reverse: #f7f3ea;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --font-heading: 'Barlow Condensed', 'Helvetica Neue', sans-serif;
  --font-body: 'Barlow', 'Helvetica Neue', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: 56px;
  --max: 1240px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--color-bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Film-grain overlay, the thing that stops the beige reading flat. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: .42;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3'/><feColorMatrix type='saturate' values='0'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='.5'/></svg>");
  mix-blend-mode: multiply;
}

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

/* -------- Type primitives -------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.06;
  margin: 0;
  color: var(--ink);
}
p { margin: 0; }

.t { font-family: var(--font-heading); font-weight: 600; letter-spacing: -.02em; line-height: 1.06; margin: 0; color: var(--ink); }
.p { font-size: 15px; line-height: 1.62; color: var(--ink-72); margin: 0; }

.mono {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-52);
  line-height: 1.5;
}
.kick {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-deep);
  line-height: 1;
}

.rule { height: 1px; background: var(--hair); border: 0; margin: 0; }

.lnk {
  color: var(--ink-68);
  font-size: 14px;
  transition: color .15s;
}
.lnk:hover { color: var(--accent); }

/* -------- Header -------- */
.site-header {
  display: flex;
  align-items: center;
  gap: 34px;
  padding: 20px var(--gutter);
  border-bottom: 1px solid var(--hair);
  background: rgba(236, 229, 216, .9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.wordmark {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: .14em;
  margin-right: auto;
  color: var(--ink);
}

/* -------- Issue line -------- */
.issue-line {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 26px 0 22px;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.issue-line .strap { margin-right: auto; }

/* -------- Container -------- */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) 90px;
}

/* -------- Cover placeholder (used only when no image supplied) -------- */
.img {
  position: relative;
  background: linear-gradient(160deg, #f3eee3, #e2d9c8);
  border: 1px solid var(--hair);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 12px;
}
.img::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, rgba(89, 128, 166, .10) 0 1px, transparent 1px 10px);
}
.img span {
  position: relative;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(32, 33, 31, .34);
}

/* Real cover images */
.cover {
  position: relative;
  border: 1px solid var(--hair);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #e2d9c8;
}
.cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.82) contrast(1.02);
}
.cover-bleed {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  border-bottom: 1px solid var(--hair);
}

/* -------- Tile (any clickable card) -------- */
.tile {
  display: block;
  cursor: pointer;
  transition: transform .25s ease;
}
.tile:hover { transform: translateY(-2px); }
.tile:hover .t { color: var(--accent-deep); }

/* -------- Home: lead story -------- */
.lead {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 44px;
  padding: 36px 0 40px;
  align-items: center;
}
.lead .cover { height: 400px; }
.lead .t { font-size: 52px; }
.lead .standfirst { font-size: 17px; line-height: 1.55; color: var(--ink-72); }
.byline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.byline .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--reverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .04em;
  overflow: hidden;
}
.avatar-img { padding: 0; overflow: hidden; border: 1px solid var(--hair); }
.avatar-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.byline .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--ink-52);
}

/* -------- Home: 3-up grid -------- */
.threeup {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding: 40px 0;
}
.threeup .cover { height: 210px; }
.threeup .t { font-size: 25px; transition: color .2s; }
.threeup .stack { display: flex; flex-direction: column; gap: 13px; }

/* -------- Home: bottom two-column -------- */
.bottom {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 52px;
  padding: 40px 0 0;
}
.wide-list { display: flex; flex-direction: column; gap: 34px; }
.wide {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 26px;
  align-items: center;
}
.wide .cover { height: 170px; }
.wide .t { font-size: 28px; }
.wide .stack { display: flex; flex-direction: column; gap: 11px; }

.rail { display: flex; flex-direction: column; gap: 18px; }
.rail .head { color: var(--ink); }
.rank {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hair);
}
.rank .num { font-family: var(--font-heading); font-weight: 600; font-size: 22px; color: var(--ink-22); }
.rank .t { font-size: 18px; }
.rank .stack { display: flex; flex-direction: column; gap: 6px; }

.sheet {
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(32, 33, 31, .05);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.sheet .t { font-size: 21px; }
.sheet .p { font-size: 13px; }
.input {
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  outline: none;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(89, 128, 166, .12); }
.btn {
  appearance: none;
  border: 1px solid var(--hair);
  background: var(--paper);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  color: var(--ink);
  transition: .15s;
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--reverse);
}
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn-block { width: 100%; }

/* -------- Footer -------- */
.site-footer {
  border-top: 1px solid var(--hair);
  padding: 40px var(--gutter);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--ink-52);
}
.site-footer .wm { font-family: var(--font-heading); font-weight: 600; font-size: 16px; letter-spacing: .14em; color: var(--ink); margin-right: auto; }
.site-footer a { color: var(--ink-68); font-size: 14px; }
.site-footer a:hover { color: var(--accent); }
.site-footer .cred { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-42); }
.site-footer .built { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-42); margin-left: auto; }
.site-footer .built a { color: var(--accent-deep); font-weight: 600; }
.site-footer .built a:hover { color: var(--accent); }

/* -------- Post page -------- */
.post-hero {
  height: 420px;
  position: relative;
}
.post-hero .cover { border-radius: 0; border-left: 0; border-right: 0; border-top: 0; height: 100%; }

.post-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) 90px;
  display: grid;
  grid-template-columns: 70px minmax(0, 700px) 1fr;
  gap: 52px;
  justify-content: center;
}
.actions-rail {
  position: sticky;
  top: 120px;
  height: max-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 56px;
}
.act-round {
  appearance: none;
  cursor: pointer;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ink-72);
  transition: .15s;
  padding: 0;
  gap: 2px;
}
.act-round:hover { border-color: var(--accent); color: var(--accent); }
.act-round[data-liked="true"] { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--reverse); }
.act-round .count { font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em; }
.actions-rail .label { font-family: var(--font-mono); font-size: 8px; text-align: center; line-height: 1.6; color: var(--ink-52); letter-spacing: .13em; text-transform: uppercase; }

.article { display: flex; flex-direction: column; gap: 20px; padding-top: 52px; }
.article .title { font-size: 54px; letter-spacing: -.02em; }
.article .standfirst { font-size: 19px; line-height: 1.5; color: var(--ink-72); }
.article .byline-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0 2px;
}
.article .byline-row .avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--reverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: .04em;
  overflow: hidden;
}
.article .byline-row .name { font-family: var(--font-body); font-weight: 600; font-size: 15px; color: var(--ink); }
.article .byline-row .meta { font-family: var(--font-mono); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-52); }

.article-body {
  display: flex;
  flex-direction: column;
  gap: 22px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.72;
  color: rgba(32, 33, 31, .78);
}
.article-body p { margin: 0; }
.article-body em { color: var(--ink); font-style: italic; }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body p:first-of-type::first-letter {
  float: left;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 62px;
  line-height: .82;
  padding: 4px 10px 0 0;
  color: var(--accent-deep);
}

.pullquote {
  border-left: 2px solid var(--accent-deep);
  padding: 6px 0 6px 22px;
  margin: 10px 0;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 27px;
  line-height: 1.16;
  color: var(--quote);
  letter-spacing: -.01em;
}

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.tag {
  border-radius: 999px;
  padding: 5px 12px;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: .04em;
  background: var(--paper);
  border: 1px solid var(--hair);
  color: var(--ink-68);
}
.tag:hover { border-color: var(--accent); color: var(--accent); }

.footer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid var(--hair);
  margin-top: 12px;
}
.act-pill {
  appearance: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 999px;
  padding: 9px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-72);
  transition: .15s;
}
.act-pill:hover { border-color: var(--accent); color: var(--accent); }
.act-pill[data-liked="true"] { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--reverse); }

.contents-rail {
  position: sticky;
  top: 120px;
  height: max-content;
  padding-top: 56px;
  max-width: 210px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contents-rail .head { font-family: var(--font-mono); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-52); }
.contents-rail a { display: block; padding: 6px 0; border-top: 1px solid var(--hair); font-size: 13px; color: var(--ink-68); }
.contents-rail a:first-of-type { border-top: 0; }
.contents-rail a:hover { color: var(--accent); }

.more-from {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  padding-top: 32px;
  border-top: 1px solid var(--hair);
  margin-top: 8px;
}
.more-from .cover { height: 170px; margin-bottom: 12px; }
.more-from .t { font-size: 22px; }

/* -------- About page -------- */
.about-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  padding: 48px 0 40px;
  align-items: center;
}
.about-hero .t { font-size: 56px; }
.about-hero .p { font-size: 17px; line-height: 1.55; }
.about-hero .cover { height: 420px; }

.about-body {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px 0 0;
  max-width: 780px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.72;
  color: rgba(32, 33, 31, .78);
}

/* -------- Mobile -------- */
@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .site-header { gap: 12px; padding: 14px 20px; }
  .site-header .nav-links { display: none; }
  .wordmark { font-size: 18px; }
  .container { padding: 0 20px 60px; }
  .issue-line { padding-left: 20px; padding-right: 20px; }
  .lead { grid-template-columns: 1fr; gap: 22px; padding: 22px 0 28px; }
  .lead .cover { height: 260px; }
  .lead .t { font-size: 34px; }
  .threeup { grid-template-columns: 1fr; gap: 32px; padding: 28px 0; }
  .threeup .cover { height: 240px; }
  .bottom { grid-template-columns: 1fr; gap: 36px; padding: 28px 0 0; }
  .wide { grid-template-columns: 1fr; gap: 14px; }
  .wide .cover { height: 200px; }
  .wide .t { font-size: 22px; }
  .post-shell { grid-template-columns: 1fr; gap: 24px; padding: 0 20px 60px; }
  .actions-rail { position: static; flex-direction: row; padding-top: 20px; gap: 14px; justify-content: center; }
  .actions-rail .label { display: none; }
  .contents-rail { display: none; }
  .article { padding-top: 24px; }
  .article .title { font-size: 32px; }
  .post-hero { height: 260px; }
  .about-hero { grid-template-columns: 1fr; gap: 24px; padding: 24px 0 28px; }
  .about-hero .cover { height: 260px; }
  .about-hero .t { font-size: 36px; }
  .more-from { grid-template-columns: 1fr; }
  .site-footer { padding: 24px 20px; }
}

/* -------- Focus rings -------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
