/* Jenni Toriseva — personal portfolio.
   Same type families as Nølla Studio; its own palette and editorial layout. */

:root {
  --paper: #f5f1ea;
  --paper-2: #ece6dc;
  --ink: #1d1b18;
  --ink-soft: #46413a;
  --muted: #8a8378;
  --line: #d9d1c4;
  --accent: #a8502b;          /* clay */
  --accent-soft: #ead8cc;

  /* flat tiles used when a project has no image */
  --t-clay: #d9b8a3;
  --t-moss: #b9c2a5;
  --t-stone: #cfc8bc;
  --t-sky: #b8c4cc;
  --t-sand: #e2d2b3;

  --serif: "Cormorant Garamond", "Cormorant", Garamond, serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 6px;
  --label: 220px;
  --col-gap: 24px;
  --offset: calc(var(--label) + var(--col-gap)); /* left edge of main content */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
figure { margin: 0; }
::selection { background: var(--accent-soft); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: 0; }
.display { font-family: var(--serif); font-weight: 400; line-height: 1.04; letter-spacing: -0.015em; margin: 0; }
.muted { color: var(--muted); }
.arrow { display: inline-block; transition: transform .2s ease; }
.link { color: var(--accent); display: inline-flex; gap: 8px; align-items: center; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.link:hover .arrow { transform: translateX(3px); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .3s ease; }
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-size: 15px; font-weight: 500; letter-spacing: .02em; }
.logo span { color: var(--muted); font-weight: 400; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.nav a { color: var(--ink-soft); position: relative; }
.nav a:hover { color: var(--ink); }
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -3px; height: 1px; background: var(--accent); transition: right .25s ease; }
.nav a:hover::after { right: 0; }
.menu-toggle { display: none; }

/* Hero */
.hero { padding-top: clamp(64px, 12vw, 160px); padding-bottom: clamp(56px, 8vw, 110px); }
.hero h1 { font-size: clamp(48px, 8.6vw, 124px); max-width: 12em; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-foot { display: grid; grid-template-columns: var(--label) 1fr; column-gap: var(--col-gap); margin-top: clamp(40px, 6vw, 72px); }
.hero-foot .mono { color: var(--muted); padding-top: 4px; }
.hero-intro { font-size: clamp(18px, 1.7vw, 21px); color: var(--ink-soft); max-width: 32em; margin: 0 0 22px; }
.current { display: inline-flex; gap: 10px; align-items: center; font-size: 15px; color: var(--ink-soft); }
.current .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.current a { color: var(--ink); border-bottom: 1px solid var(--line); }
.current a:hover { border-color: var(--ink); }

/* Section framing: label column + content */
.section { margin-top: clamp(72px, 10vw, 140px); }
.section-top { display: grid; grid-template-columns: var(--label) 1fr; column-gap: var(--col-gap); align-items: baseline; border-top: 1px solid var(--ink); padding-top: 20px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-top .mono { color: var(--muted); }
.section-top h2 { font-size: clamp(36px, 4.8vw, 64px); }
.section-top p { grid-column: 2; color: var(--muted); max-width: 34em; margin: 14px 0 0; }
.indent { margin-left: var(--offset); }

/* Work index */
.index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row { border-bottom: 1px solid var(--line); }
.row > a, .row > div { display: grid; grid-template-columns: var(--label) 1fr 200px 168px; gap: var(--col-gap); align-items: center; padding: 22px 0; }
.row .year { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.row h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.12; margin: 0; transition: color .2s ease; }
.row p { margin: 6px 0 0; color: var(--muted); font-size: 15px; max-width: 34em; }
.row .cat { font-size: 13px; color: var(--ink-soft); }
.thumb { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--t-stone); transition: transform .4s ease; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.row > a:hover h3 { color: var(--accent); }
.row > a:hover .thumb { transform: scale(1.03); }
.go { color: var(--accent); font-size: 14px; display: inline-flex; gap: 6px; margin-top: 8px; }

.t-clay { background: var(--t-clay); } .t-moss { background: var(--t-moss); } .t-stone { background: var(--t-stone); }
.t-sky { background: var(--t-sky); } .t-sand { background: var(--t-sand); }

/* About */
.about { display: grid; grid-template-columns: var(--label) minmax(0, 300px) 1fr; column-gap: var(--col-gap); align-items: start; }
.about .bio { padding-left: clamp(8px, 3vw, 40px); }
.portrait { grid-column: 2; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--t-sand); display: grid; place-items: center; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait .ph { font-family: var(--mono); font-size: 12px; color: rgba(40,35,30,.5); letter-spacing: .12em; }
.bio { font-size: 19px; color: var(--ink-soft); max-width: 32em; }
.bio p { margin: 0 0 18px; }
.bio p:first-child { font-family: var(--serif); font-size: clamp(26px, 2.6vw, 32px); line-height: 1.3; color: var(--ink); }
.bio a { color: var(--accent); border-bottom: 1px solid currentColor; }

.cv { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); margin: clamp(56px, 7vw, 88px) 0 0 var(--offset); }
.cv h3 { font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.cv ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.cv li { display: grid; grid-template-columns: 112px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cv .when { font-family: var(--mono); font-size: 12.5px; color: var(--muted); padding-top: 3px; }
.cv strong { font-weight: 500; display: block; }
.cv span.org { color: var(--ink-soft); }
.cv small { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }

/* Speaking & writing */
.talks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.talk > a, .talk > div { display: grid; grid-template-columns: var(--label) 120px 1fr 24px; gap: 24px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); }
.talk .when { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.pill { justify-self: start; font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--ink-soft); white-space: nowrap; }
.talk h3 { font-weight: 500; font-size: 17px; margin: 0; }
.talk p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.talk .ext { color: var(--accent); }
.talk > a:hover h3 { color: var(--accent); }

/* Contact */
.contact-big { display: inline-block; font-family: var(--serif); font-size: clamp(36px, 6.4vw, 92px); line-height: 1.05; letter-spacing: -0.015em; border-bottom: 2px solid var(--accent); padding-bottom: 4px; transition: color .2s ease; word-break: break-word; }
.contact-big:hover { color: var(--accent); }
.contact-text { color: var(--ink-soft); max-width: 32em; margin: 0 0 32px; font-size: 18px; }
.elsewhere { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 40px; font-size: 15px; }
.elsewhere a { color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.elsewhere a:hover { color: var(--ink); border-color: var(--ink); }

/* Footer */
.site-footer { margin-top: clamp(96px, 12vw, 160px); border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 28px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.site-footer a:hover { color: var(--ink); }

/* ---------- Case study pages ---------- */
.intro { padding-top: clamp(48px, 8vw, 104px); }
.back { font-size: 14px; color: var(--muted); display: inline-flex; gap: 8px; margin-bottom: clamp(32px, 5vw, 56px); }
.back:hover { color: var(--ink); }
.intro .meta { color: var(--muted); margin: 0 0 18px; }
.intro h1 { font-size: clamp(44px, 7vw, 96px); max-width: 12em; }
.intro .lede { font-size: clamp(18px, 1.7vw, 21px); color: var(--ink-soft); max-width: 34em; margin: 28px 0 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; margin: clamp(44px, 6vw, 72px) 0 0; padding: 22px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.facts dd { margin: 0; font-size: 15px; }

.media { border-radius: var(--radius); overflow: hidden; position: relative; display: grid; place-items: center; }
.media > img, .media > video, .media > iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.media > .ph { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; color: rgba(40,35,30,.5); text-transform: uppercase; text-align: center; padding: 0 16px; }
.media-hero { aspect-ratio: 16 / 9; margin-top: clamp(40px, 6vw, 64px); }

.block { margin-top: 48px; }
.block-head { padding-top: clamp(72px, 10vw, 128px); }
.section-head { display: grid; grid-template-columns: var(--label) 1fr; column-gap: var(--col-gap); align-items: baseline; border-top: 1px solid var(--line); padding-top: 18px; }
.section-head .num { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.section-head h2 { font-size: clamp(32px, 4vw, 50px); margin-bottom: 24px; }
.body { margin-left: var(--offset); max-width: 36em; }
.body p, .body li { color: var(--ink-soft); font-size: 18px; }
.body p { margin: 0 0 20px; }
.body a { color: var(--accent); border-bottom: 1px solid currentColor; }
.pull { font-family: var(--serif); font-style: italic; font-size: clamp(28px, 3vw, 40px); line-height: 1.25; margin: clamp(48px, 6vw, 72px) 0 0 var(--offset); max-width: 18em; padding-left: 24px; border-left: 2px solid var(--accent); }
.pull cite { display: block; font-style: normal; font-family: var(--mono); font-size: 13px; color: var(--muted); margin-top: 14px; }

.gallery { display: grid; gap: 16px; }
.gallery.n1 .media { aspect-ratio: 16 / 9; }
.gallery.n2 { grid-template-columns: 1fr 1fr; }
.gallery.n3 { grid-template-columns: repeat(3, 1fr); }
.gallery.n4 { grid-template-columns: 1fr 1fr; }
.gallery.n2 .media, .gallery.n3 .media, .gallery.n4 .media { aspect-ratio: 4 / 5; }
figcaption { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 10px; }
.video .media { aspect-ratio: 16 / 9; }

.states { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.state { display: flex; flex-direction: column; justify-content: flex-start; padding: 22px 20px 26px; border: 0; border-right: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left; font: inherit; color: inherit; transition: background .3s ease; }
.state:last-child { border-right: 0; }
.state .mono { color: var(--muted); }
.state h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 8px 0 6px; }
.state p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.state[aria-pressed="true"] { background: var(--paper-2); }
.state[aria-pressed="true"] .mono { color: var(--accent); }
.device { margin-top: 16px; aspect-ratio: 21 / 9; border-radius: var(--radius); display: grid; place-items: center; background: var(--paper-2); }
.knob { width: clamp(120px, 18vw, 180px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fffdf9, #ddd5c8 72%); box-shadow: 0 18px 40px rgba(60,45,30,.14), inset 0 -4px 10px rgba(0,0,0,.05); position: relative; transition: transform .5s cubic-bezier(.3,.7,.2,1); }
.knob::after { content: ""; position: absolute; top: 12%; left: calc(50% - 2px); width: 4px; height: 18%; border-radius: 2px; background: var(--ink-soft); }
.ring { position: absolute; inset: -14px; border-radius: 50%; border: 2px solid transparent; transition: border-color .4s ease, inset .4s ease; }
.device[data-s="1"] .knob { transform: scale(.97); }
.device[data-s="1"] .ring { border-color: rgba(168,80,43,.35); }
.device[data-s="2"] .knob { transform: rotate(120deg); }
.device[data-s="2"] .ring { border-color: var(--accent); inset: -20px; }
.device[data-s="3"] .knob { transform: rotate(120deg) scale(.95); }
.device[data-s="3"] .ring { border-color: #6d8059; inset: -8px; }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-left: var(--offset); }
.metric { border-top: 1px solid var(--ink); padding-top: 18px; }
.metric strong { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(46px, 5.6vw, 68px); line-height: 1; margin-bottom: 10px; }
.metric span { color: var(--muted); font-size: 15px; }
.learnings { list-style: none; padding: 0; margin: 0 0 0 var(--offset); max-width: 36em; border-top: 1px solid var(--line); }
.learnings li { padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); }

.next { display: grid; grid-template-columns: var(--label) 1fr; column-gap: var(--col-gap); align-items: baseline; margin-top: clamp(80px, 11vw, 140px); border-top: 1px solid var(--ink); padding-top: 20px; }
.next .mono { color: var(--muted); }
.next h2 { font-size: clamp(34px, 4.6vw, 60px); transition: color .2s ease; }
.next:hover h2 { color: var(--accent); }
.next:hover .arrow { transform: translateX(4px); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .knob, .ring, .thumb { transition: none; }
  html { scroll-behavior: auto; }
}

/* Responsive */
@media (max-width: 1000px) {
  :root { --label: 140px; }
  .row > a, .row > div { grid-template-columns: var(--label) 1fr 136px; }
  .row .cat { display: none; }
  .about { grid-template-columns: var(--label) 1fr; }
  .portrait { grid-column: 2; max-width: 320px; }
  .bio { grid-column: 2; margin-top: 32px; }
  .about .bio { padding-left: 0; }
  .cv { grid-template-columns: 1fr; }
  .talk > a, .talk > div { grid-template-columns: var(--label) 1fr 24px; }
  .talk .pill { display: none; }
  .gallery.n3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  :root { --label: 0px; --offset: 0px; }
  .menu-toggle { display: inline-flex; background: none; border: 1px solid var(--ink); border-radius: 999px; padding: 5px 14px; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; }
  .nav { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 18px; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; font-size: 18px; }
  .nav a::after { display: none; }
  .logo span { display: none; }
  .hero-foot, .section-top, .section-head, .next { grid-template-columns: 1fr; gap: 8px; }
  .section-top p { grid-column: 1; }
  .row > a, .row > div { grid-template-columns: 1fr 96px; gap: 6px 16px; }
  .row .year { grid-column: 1 / -1; }
  .about { grid-template-columns: 1fr; }
  .portrait, .bio { grid-column: 1; }
  .cv li { grid-template-columns: 92px 1fr; }
  .talk > a, .talk > div { grid-template-columns: 1fr 20px; gap: 4px 12px; }
  .talk .when { grid-column: 1 / -1; }
  .gallery.n2, .gallery.n3, .gallery.n4 { grid-template-columns: 1fr; }
  .state { border-right: 0; border-bottom: 1px solid var(--line); }
  .state:last-child { border-bottom: 0; }
  .device { aspect-ratio: 4 / 3; }
  .pull { padding-left: 16px; }
}
