/* ───────────── Kanishka Anish — portfolio ─────────────
   Palette pulled from The Seuil: forest green on warm paper,
   with a marigold accent for the IND → CAN thread. */

:root {
  --paper: #f5f1e8;
  --paper-2: #ece6d8;
  --ink: #1d2a24;
  --ink-soft: #4d5b54;
  --green: #2b4a3d;
  --green-2: #3d6453;
  --marigold: #e0a33a;
  --clay: #c8553d;
  --line: color-mix(in oklab, var(--ink) 14%, transparent);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: min(1180px, 100% - 3rem);
  --radius: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141c18;
    --paper-2: #1b2520;
    --ink: #eee8da;
    --ink-soft: #a9b3ad;
    --green: #8fbfa6;
    --green-2: #b5d6c4;
    --line: color-mix(in oklab, var(--ink) 14%, transparent);
  }
  .seuil-logo { mix-blend-mode: normal !important; border-radius: 14px; margin: 0 0 1.25rem !important; width: min(340px, 80vw) !important; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.05; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(2.2rem, 5vw, 3.75rem); }
h2 em { color: var(--green-2); }

.skip { position: absolute; left: -999px; top: 1rem; background: var(--ink); color: var(--paper); padding: .5rem 1rem; border-radius: 8px; z-index: 99; }
.skip:focus { left: 1rem; }
:focus-visible { outline: 2px solid var(--marigold); outline-offset: 3px; border-radius: 4px; }

.eyebrow {
  font: 600 .75rem/1 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
}

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem max(1.5rem, (100% - 1180px) / 2);
  background: color-mix(in oklab, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.is-scrolled { border-color: var(--line); }
.nav__mark { font: italic 500 1.75rem/1 var(--serif); text-decoration: none; color: var(--green); }
.nav__mark span { color: var(--marigold); }
.nav__links { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav__links a { text-decoration: none; font-size: .95rem; color: var(--ink-soft); position: relative; transition: color .2s; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }

.pill {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .85rem; font-weight: 500; text-decoration: none;
  padding: .55rem 1rem; border-radius: 99px; border: 1px solid var(--line);
  transition: background .2s, border-color .2s;
}
.pill:hover { background: var(--paper-2); border-color: var(--green); }
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: #3fb26b; box-shadow: 0 0 0 0 #3fb26b88; animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px #3fb26b00; } 100% { box-shadow: 0 0 0 0 #3fb26b00; } }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .95rem 1.6rem; border-radius: 99px;
  font: 500 .98rem/1 var(--sans); text-decoration: none;
  transition: transform .25s var(--ease), background .2s, color .2s, box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--green); color: var(--paper); box-shadow: 0 10px 24px -12px color-mix(in oklab, var(--green) 70%, transparent); }
.btn--solid:hover { background: var(--ink); }
.btn--ghost { border: 1px solid var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

/* ── Hero ── */
.hero {
  width: var(--wrap); margin: 0 auto;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 5rem); align-items: center;
  padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3rem, 7vw, 5rem);
}
.hero__title {
  font-size: clamp(4rem, 12vw, 9.5rem); font-weight: 400; line-height: .9; letter-spacing: -0.045em;
  margin-bottom: 2rem;
}
.hero__title em { color: var(--green); padding-left: .12em; }
.hero__lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-soft); max-width: 34ch; margin: 0 0 2.25rem; }
.hero__lede em { color: var(--ink); font-size: 1.1em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .85rem; }

.hero__photo { position: relative; margin: 0; }
.hero__photo img {
  aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%;
  width: 100%; border-radius: 220px 220px var(--radius) var(--radius);
  box-shadow: 0 40px 80px -40px color-mix(in oklab, var(--green) 60%, transparent);
}
.sticker {
  position: absolute; display: inline-flex; align-items: center; gap: .4rem;
  font: 600 .85rem/1 var(--sans); padding: .75rem 1rem; border-radius: 99px;
  box-shadow: 0 12px 30px -12px rgba(0,0,0,.35);
}
.sticker--route { top: 12%; left: -8%; background: var(--marigold); color: #1d2a24; transform: rotate(-8deg); letter-spacing: .08em; animation: float 6s ease-in-out infinite; }
.sticker--route i { font-style: normal; }
.sticker--stat { bottom: 9%; right: -6%; background: var(--paper); color: var(--ink); border: 1px solid var(--line); transform: rotate(5deg); animation: float 7s ease-in-out -2s infinite; }
.sticker--stat b { font: italic 500 1.25rem/1 var(--serif); color: var(--green); }
@keyframes float { 50% { translate: 0 -8px; } }

/* ── Ticker ── */
.ticker { overflow: hidden; border-block: 1px solid var(--line); background: var(--paper-2); padding: 1.1rem 0; }
.ticker__track { display: flex; gap: 3rem; width: max-content; animation: scroll 45s linear infinite; }
.ticker__track span { font: italic 400 1.35rem/1 var(--serif); color: var(--ink-soft); white-space: nowrap; display: inline-flex; align-items: center; gap: 3rem; }
.ticker__track span::after { content: "✦"; font-style: normal; font-size: .8rem; color: var(--marigold); }
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ── Sections ── */
.section { width: var(--wrap); margin: 0 auto; padding: clamp(4.5rem, 10vw, 8rem) 0; }
.section--tint, .section--green { width: 100%; padding-inline: max(1.5rem, (100% - 1180px) / 2); }
.section--tint { background: var(--paper-2); }
.section--green { background: var(--green); color: #f5f1e8; }
.section--green .eyebrow { color: color-mix(in oklab, #f5f1e8 65%, transparent); }
.section--green h2 em { color: var(--marigold); }
@media (prefers-color-scheme: dark) { .section--green { background: #213a2f; } }
.section__head { margin-bottom: clamp(2.5rem, 5vw, 4rem); max-width: 40rem; }

/* ── Stats ── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem;
  display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem;
  transition: transform .35s var(--ease), border-color .3s, background .3s;
}
.stat:hover { transform: translateY(-4px); border-color: var(--green); background: color-mix(in oklab, var(--paper-2) 60%, transparent); }
.stat--big { grid-column: span 2; grid-row: span 2; background: var(--green); color: #f5f1e8; border-color: transparent; }
.stat--big:hover { background: var(--green); }
@media (prefers-color-scheme: dark) { .stat--big, .stat--big:hover { background: #213a2f; } }
.stat__num { font: 400 clamp(2.75rem, 5vw, 4rem)/1 var(--serif); letter-spacing: -0.03em; margin: 0; color: var(--green); font-variant-numeric: tabular-nums; }
.stat--big .stat__num { font-size: clamp(5rem, 11vw, 9rem); color: var(--marigold); }
.stat__label { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.stat--big .stat__label { color: color-mix(in oklab, #f5f1e8 80%, transparent); font-size: 1.1rem; max-width: 28ch; }
.bar { height: 8px; border-radius: 99px; background: color-mix(in oklab, #f5f1e8 18%, transparent); overflow: hidden; }
.bar span { display: block; height: 100%; width: var(--from); background: var(--marigold); border-radius: inherit; transition: width 1.8s var(--ease) .3s; }
.stat--big.is-visible .bar span { width: 100%; }

/* ── Jobs ── */
.jobs { list-style: none; margin: 0; padding: 0; }
.job { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; padding: 2.5rem 0; border-top: 1px solid var(--line); }
.job:last-child { border-bottom: 1px solid var(--line); }
.job__when { font: italic 500 1.15rem/1.3 var(--serif); margin: 0 0 .35rem; color: var(--green); }
.job__where { margin: 0; font-size: .9rem; color: var(--ink-soft); }
.job h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: .9rem; }
.job h3 span { font-style: italic; font-weight: 400; color: var(--ink-soft); }
.job p { margin: 0 0 1rem; max-width: 62ch; }
.job ul { margin: 0 0 1.25rem; padding-left: 1.1rem; max-width: 62ch; color: var(--ink-soft); }
.job li { margin-bottom: .4rem; }
.job li::marker { color: var(--marigold); }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.tags span { font-size: .8rem; padding: .35rem .8rem; border-radius: 99px; background: var(--paper); border: 1px solid var(--line); }

.services { margin-top: clamp(3.5rem, 7vw, 5rem); }
.services__title { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 2rem; font-style: italic; font-weight: 400; }
.services__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.services__grid > div { background: var(--paper); border-radius: var(--radius); padding: 1.75rem; border: 1px solid var(--line); transition: transform .35s var(--ease); }
.services__grid > div:hover { transform: translateY(-4px) rotate(-.5deg); }
.services__n { font: italic 500 1.5rem/1 var(--serif); color: var(--marigold); }
.services h4 { font-size: 1.35rem; margin: 1.25rem 0 .5rem; }
.services p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* ── Writing ── */
.writing__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); flex-wrap: wrap; }
.seuil-logo { width: min(420px, 80vw); height: auto; margin: -.5rem 0 1rem -1.4rem; mix-blend-mode: multiply; }
.writing__intro { max-width: 46ch; color: var(--ink-soft); font-size: 1.1rem; margin: 0; }
.writing__intro em { color: var(--ink); }

.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem 1.75rem; }
.posts__loading { grid-column: 1 / -1; color: var(--ink-soft); font-style: italic; }
.post { text-decoration: none; display: flex; flex-direction: column; gap: .9rem; }
.post__img { aspect-ratio: 3 / 2; border-radius: 14px; overflow: hidden; background: var(--paper-2); }
.post__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease), filter .4s; filter: saturate(.9); }
.post:hover .post__img img { transform: scale(1.05); filter: saturate(1.05); }
.post__date { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.post h3 { font-size: 1.45rem; line-height: 1.15; transition: color .2s; }
.post:hover h3 { color: var(--green-2); }
.post p { margin: 0; color: var(--ink-soft); font-size: .96rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.post--featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.post--featured .post__img { aspect-ratio: 16 / 11; }
.post--featured h3 { font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.02; }
.post--featured p { font-size: 1.1rem; -webkit-line-clamp: 3; }
.post__badge { align-self: flex-start; font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; background: var(--marigold); color: #1d2a24; padding: .4rem .8rem; border-radius: 99px; }
.post__read { font-weight: 500; color: var(--green); }
.posts__more { margin: 3rem 0 0; text-align: center; }
.posts__more a { font: italic 400 1.3rem/1 var(--serif); color: var(--green); text-underline-offset: 6px; }

/* ── About ── */
.about { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.about h2 { margin-bottom: 2rem; }
.about__text p { color: color-mix(in oklab, #f5f1e8 82%, transparent); max-width: 56ch; }
.about__likes { font: italic 400 1.2rem/1.5 var(--serif); color: var(--marigold) !important; margin-top: 2rem; }
.about__facts { display: grid; gap: 1rem; }
.fact { border: 1px solid color-mix(in oklab, #f5f1e8 20%, transparent); border-radius: var(--radius); padding: 1.75rem; }
.fact h3 { font-size: 1.1rem; font-family: var(--sans); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1.25rem; color: var(--marigold); }
.fact dl { margin: 0; }
.fact dt { font: 500 1.15rem/1.3 var(--serif); }
.fact dd { margin: .15rem 0 1rem; font-size: .9rem; color: color-mix(in oklab, #f5f1e8 65%, transparent); }
.fact dd:last-child { margin-bottom: 0; }

/* ── Contact ── */
.contact { text-align: center; }
.contact__title { font-size: clamp(2.6rem, 7vw, 5.5rem); font-weight: 400; line-height: 1; margin-bottom: 1.5rem; }
.contact__title em { color: var(--green); }
.contact__sub { color: var(--ink-soft); margin: 0 auto 2.5rem; max-width: 48ch; }
.contact__email {
  display: inline-block; font: italic 400 clamp(1.5rem, 4vw, 2.8rem)/1.1 var(--serif);
  text-decoration: none; color: var(--ink); padding-bottom: .3rem;
  background: linear-gradient(var(--marigold), var(--marigold)) 0 100% / 100% 3px no-repeat;
  transition: background-size .4s var(--ease), color .2s;
}
.contact__email:hover { background-size: 100% 100%; color: #1d2a24; }
.socials { display: flex; justify-content: center; gap: 2rem; list-style: none; padding: 0; margin: 2.5rem 0 0; }
.socials a { text-decoration: none; color: var(--ink-soft); font-size: .95rem; }
.socials a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

.footer { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 2rem max(1.5rem, (100% - 1180px) / 2); border-top: 1px solid var(--line); font-size: .85rem; color: var(--ink-soft); }
.footer p { margin: 0; }
.footer p:nth-child(2) { font-family: var(--serif); font-style: italic; }
.footer a { text-decoration: none; }

/* ── Reveal ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ── Responsive ── */
@media (max-width: 960px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .posts { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav__links { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero__photo { max-width: 420px; margin: 1rem auto 0; width: 88%; }
  .job { grid-template-columns: 1fr; gap: .75rem; }
  .post--featured { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .stats, .services__grid, .posts { grid-template-columns: 1fr; }
  .stat--big { grid-column: auto; grid-row: auto; }
  .sticker--route { left: -4%; }
  .sticker--stat { right: -4%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
