/* Kseniia Lebedeva — portfolio
   Three looks share one stylesheet. Pick one by setting the class on <body>:
   t-dark (A · Refined dark), t-paper (B · Warm paper), t-signal (C · Signal lime). */

:root {
  --mono: "Spline Sans Mono", ui-monospace, monospace;
  --sans: "Satoshi", "Inter", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --max: 1080px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Themes ---------- */
.t-dark {
  --bg: #0d0d0d; --surface: #141417; --chip: #1b1b1f; --line: #26262b;
  --text: #f4f4f5; --muted: #8e8e9c; --accent: #f4f4f5;
  --display: var(--sans); --display-weight: 400; --display-track: -0.035em;
  --h-font: var(--mono); --h-size: 24px; --h-weight: 500;
}
.t-paper {
  --bg: #f2eee6; --surface: #e7e1d5; --chip: #e7e1d5; --line: #d6cfc1;
  --text: #1b1a17; --muted: #6d675b; --accent: #b4532a;
  --display: var(--serif); --display-weight: 400; --display-track: -0.02em;
  --h-font: var(--serif); --h-size: 40px; --h-weight: 400;
}
.t-signal {
  --bg: #0a0a0b; --surface: #141416; --chip: #141416; --line: #232327;
  --text: #f5f5f2; --muted: #85858f; --accent: #c8f34a;
  --display: var(--sans); --display-weight: 500; --display-track: -0.05em;
  --h-font: var(--sans); --h-size: 32px; --h-weight: 500;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  background: var(--bg); color: var(--text);
  font: 400 14px/1.8 var(--mono);
  -webkit-font-smoothing: antialiased;
  transition: background .4s, color .4s;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--bg); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px clamp(20px, 3vw, 40px);
  font-size: 13px; font-weight: 500;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .crumb { display: flex; gap: 12px; align-items: center; }
.nav .crumb span { color: var(--muted); }
.nav ul { display: flex; gap: 26px; list-style: none; }
.nav ul a { position: relative; }
.nav ul a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav ul a:hover::after { transform: scaleX(1); }

/* ---------- Layout ---------- */
.wrap { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
section { padding-top: clamp(96px, 14vw, 168px); }
.h-section {
  font: var(--h-weight) var(--h-size)/1.15 var(--h-font);
  letter-spacing: -0.01em; margin-bottom: 48px;
  display: flex; align-items: baseline; gap: 16px;
}
.h-section .num { font: 500 12px var(--mono); color: var(--muted); letter-spacing: .04em; }
.t-paper .h-section .num { color: var(--accent); }
.t-signal .h-section .num { color: var(--accent); }
.two-col { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 120px 24px 80px;
}
.hero > * { position: relative; }
.hero .star { font-size: 20px; margin-bottom: 18px; color: var(--accent); animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero .lead { font-size: 12px; font-weight: 500; line-height: 1.6; letter-spacing: .02em; }
.hero .rule { width: 44px; height: 1px; background: var(--text); margin: 16px auto; opacity: .6; }
.hero h1 {
  font: var(--display-weight) clamp(72px, 15vw, 240px)/0.86 var(--display);
  letter-spacing: var(--display-track);
  margin: 22px 0 26px;
}
.hero h1 .l { display: block; overflow: hidden; }
.hero h1 .l span { display: inline-block; animation: rise 1.1s var(--ease) both; }
.hero h1 .l + .l span { animation-delay: .12s; }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
.hero .scroll { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }

/* A: soft glow */
.t-dark .hero::before {
  content: ""; position: absolute; inset: auto 10% -40% 10%; height: 70%;
  background: radial-gradient(closest-side, rgba(150,150,190,.16), transparent 70%);
  filter: blur(20px);
}
/* B: italic surname, editorial line */
.t-paper .hero h1 .l + .l { font-style: italic; }
.t-paper .hero .rule { background: var(--accent); opacity: 1; }
/* C: left-aligned, huge, lime dot */
.t-signal .hero { align-items: flex-start; text-align: left; padding-inline: clamp(20px, 3vw, 40px); justify-content: flex-end; padding-bottom: 72px; }
.t-signal .hero .rule { display: none; }
.t-signal .hero .star { order: 3; position: absolute; right: clamp(20px, 3vw, 40px); bottom: 80px; font-size: 40px; }
.t-signal .hero h1 { font-size: clamp(80px, 17vw, 280px); margin: 18px 0 0; }
.t-signal .hero h1 .l + .l span::after { content: "."; color: var(--accent); }
.t-signal .hero .scroll { left: auto; right: clamp(20px, 3vw, 40px); transform: none; bottom: 28px; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.about p { margin-bottom: 36px; font-size: 15px; }
.about figure { position: relative; }
.about img { width: 100%; aspect-ratio: 697/754; object-fit: cover; border-radius: 4px; }
.t-paper .about img { filter: sepia(.12) saturate(.95); }
.t-signal .about figure::after { content: ""; position: absolute; inset: 12px -12px -12px 12px; border: 1px solid var(--accent); z-index: -1; border-radius: 4px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 18px;
  border: 1px solid var(--text); border-radius: 999px;
  font-size: 13px; font-weight: 500;
  transition: background .25s, color .25s, border-color .25s;
}
.btn::after { content: "↓"; transition: transform .25s var(--ease); }
.btn:hover { background: var(--text); color: var(--bg); }
.btn:hover::after { transform: translateY(2px); }
.t-signal .btn { background: var(--accent); color: #0a0a0b; border-color: var(--accent); }
.t-signal .btn:hover { background: transparent; color: var(--accent); }

/* ---------- Cards (work + articles) ---------- */
.cards { display: flex; flex-direction: column; gap: 28px; }
.card { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; align-items: center; }
.card .thumb { overflow: hidden; aspect-ratio: 4/2.65; background: var(--surface); border-radius: 6px; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.card:hover .thumb img { transform: scale(1.04); }
.card h3 { font-size: 14px; font-weight: 500; margin-bottom: 14px; display: flex; justify-content: space-between; gap: 12px; }
.card h3::after { content: "→"; color: var(--muted); transition: transform .3s var(--ease), color .3s; }
.card:hover h3::after { transform: translateX(4px); color: var(--accent); }
.card p { color: var(--muted); }
.t-paper .card h3 { font: 400 26px/1.15 var(--serif); }
.t-signal .card { grid-template-columns: 1fr; gap: 18px; }
.t-signal .cards.work { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 28px; }
.t-signal .cards.work .card:first-child { grid-column: 1 / -1; }
.t-signal .card h3 { font: 500 20px/1.25 var(--sans); }
.t-signal .card:hover .thumb { outline: 1px solid var(--accent); outline-offset: 6px; }
.t-signal .card .thumb { transition: outline-offset .3s; outline: 1px solid transparent; }

/* ---------- Experience ---------- */
.job { border-top: 1px solid var(--line); padding: 26px 0; display: grid; grid-template-columns: 1fr 2fr; gap: 32px; }
.job:last-child { border-bottom: 1px solid var(--line); }
.job h3 { font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.job .dur { color: var(--muted); }
.job .row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; font-weight: 500; margin-bottom: 12px; }
.job .desc { color: var(--muted); white-space: pre-line; }
.t-paper .job h3 { font: 400 22px/1.2 var(--serif); }
.t-signal .job .row span:last-child { color: var(--accent); }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips span {
  background: var(--chip); padding: 5px 12px; border-radius: 4px; font-weight: 500; font-size: 13px;
  border: 1px solid transparent; transition: border-color .25s, color .25s;
}
.chips span:hover { border-color: var(--accent); }
.t-paper .chips span { background: transparent; border-color: var(--line); border-radius: 999px; }
.t-signal .chips span { background: transparent; border-color: var(--line); border-radius: 999px; }
.t-signal .chips span:hover { color: var(--accent); }

/* ---------- Testimonials ---------- */
.testi { position: relative; min-height: 400px; }
.testi .slide { display: none; padding-right: 110px; }
.testi .slide.active { display: block; animation: fade .5s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.testi blockquote { margin-bottom: 26px; font-size: 15px; }
.t-paper .testi blockquote { font: italic 400 24px/1.4 var(--serif); }
.person { display: flex; align-items: center; gap: 18px; }
.person img { width: 56px; height: 56px; object-fit: cover; border-radius: 50%; }
.person b { display: block; font-weight: 500; }
.person span { color: var(--muted); }
.arrows { position: absolute; top: 0; right: 0; display: flex; gap: 8px; }
.arrows button {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: none; color: var(--text); font: 500 15px var(--mono); cursor: pointer; transition: border-color .25s, color .25s;
}
.arrows button:hover { border-color: var(--accent); color: var(--accent); }
.dots { display: flex; gap: 6px; margin-top: 32px; }
.dots i { width: 18px; height: 2px; background: var(--line); transition: background .3s; }
.dots i.on { background: var(--accent); }

/* ---------- Connect ---------- */
.connect { padding: clamp(120px, 16vw, 200px) 0 120px; }
.connect h2 { font: var(--display-weight) clamp(48px, 7vw, 96px)/0.95 var(--display); letter-spacing: var(--display-track); }
.t-paper .connect h2 em { color: var(--accent); }
.t-signal .connect h2 em { color: var(--accent); font-style: normal; }
.contacts { align-self: end; }
.contacts dt { color: var(--muted); }
.contacts dd { margin-bottom: 16px; font-weight: 500; font-size: 15px; }
.contacts a { background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat; transition: background-size .35s var(--ease); }
.contacts a:hover { background-size: 100% 1px; }
.foot { border-top: 1px solid var(--line); padding: 22px 0 28px; color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; }

/* ---------- Case study ---------- */
.case-head { padding-top: 130px; }
.kicker { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.case-head h1 { font: var(--display-weight) clamp(44px, 7vw, 96px)/1 var(--display); letter-spacing: var(--display-track); margin-bottom: 56px; max-width: 14ch; }
.case-head .media { margin-top: 0; }
.case-meta { display: flex; gap: 72px; padding-top: 32px; }
.case-meta dt { color: var(--muted); }
.case-meta dd { font-weight: 500; }
.chapter { padding-top: 140px; font-size: 12px; font-weight: 500; color: var(--accent); text-transform: uppercase; letter-spacing: .1em; display: flex; align-items: center; gap: 16px; }
.t-dark .chapter { color: var(--muted); }
.chapter::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.block { padding-top: 96px; display: grid; grid-template-columns: 1fr 2fr; gap: 32px; }
.chapter + .block { padding-top: 40px; }
.block h2 { font: var(--h-weight) var(--h-size)/1.2 var(--h-font); letter-spacing: -0.01em; position: sticky; top: 100px; align-self: start; }
.t-paper .block h2 { font-size: 34px; }
.t-signal .block h2 { font-size: 26px; }
.block .body > * + * { margin-top: 16px; }
.block h3 { font-size: 13px; font-weight: 500; color: var(--text); margin-top: 32px !important; }
.block .body > h3:first-child { margin-top: 0 !important; }
.block ul { list-style: none; color: var(--muted); }
.block li { padding-left: 20px; position: relative; }
.block li + li { margin-top: 4px; }
.block li::before { content: "·"; position: absolute; left: 6px; color: var(--accent); }
.block ul ul { margin-top: 4px; }
.block p { color: var(--muted); }
.block strong { color: var(--text); font-weight: 500; }
.block blockquote { border-left: 2px solid var(--accent); padding: 4px 0 4px 18px; color: var(--text); }
.block blockquote cite { display: block; color: var(--muted); font-style: normal; font-size: 12px; margin-top: 4px; }
.t-paper .block blockquote { font: italic 400 20px/1.4 var(--serif); }
.t-paper .block blockquote cite { font-family: var(--mono); }

.media { width: calc(100% - 2 * clamp(12px, 2vw, 24px)); margin: 72px auto 0; display: grid; gap: 16px; }
.media img { width: 100%; background: var(--surface); border-radius: 6px; }
.media .cap { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; margin: 32px 0 4px; width: min(var(--max), 100%); justify-self: center; }
.media .cap:first-child { margin-top: 0; }
.video { position: relative; aspect-ratio: 16/9; background: var(--surface); border-radius: 6px; overflow: hidden; width: min(var(--max), 100%); justify-self: center; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  .hero .star, .hero h1 .l span { animation: none; }
}

/* ---------- Design option switcher (preview only) ---------- */
.switcher {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 40;
  display: flex; align-items: center; gap: 4px; padding: 5px 5px 5px 14px;
  background: #18181b; color: #a1a1aa; border: 1px solid #2e2e33; border-radius: 999px;
  font: 500 12px var(--mono); box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.switcher span { margin-right: 6px; }
.switcher button { font: inherit; color: #e4e4e7; background: none; border: 0; padding: 7px 12px; border-radius: 999px; cursor: pointer; }
.switcher button.on { background: #f4f4f5; color: #0a0a0b; }

/* ---------- Password gate ---------- */
.gate {
  position: fixed; inset: 0; z-index: 50; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.gate form {
  width: 320px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px;
  display: flex; flex-direction: column; gap: 10px; text-align: center; font-size: 13px;
}
.gate input, .gate button {
  font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; color: var(--text); background: var(--bg);
}
.gate button { background: var(--text); color: var(--bg); cursor: pointer; border-color: var(--text); }
.gate .err { color: #e5484d; min-height: 1em; font-size: 12px; }
body.locked > *:not(.gate):not(.switcher) { visibility: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .nav ul { gap: 14px; }
  .nav .crumb span, .nav .crumb .title { display: none; }
  .two-col, .about, .card, .job, .block { grid-template-columns: 1fr; }
  .block h2 { position: static; }
  .about figure { max-width: 380px; }
  .job .row { grid-template-columns: 1fr; gap: 0; }
  .testi .slide { padding-right: 0; padding-top: 56px; }
  .arrows { right: auto; left: 0; }
  .t-signal .cards.work { grid-template-columns: 1fr; }
  .switcher span { display: none; }
  .switcher { bottom: 12px; font-size: 11px; }
  .switcher button { padding: 7px 9px; }
}
