/* Vladimir Chopine — dual-persona portfolio
   Shared layout frame. Persona palettes + motion live on <html data-persona>. */

:root {
  --font-ui: "Outfit", system-ui, sans-serif;
  --font-display: "Syne", "Outfit", sans-serif;

  --max: 1120px;
  --chrome-h: 84px;
  --ease: cubic-bezier(0.76, 0, 0.18, 1);
  --slide: 0.9s var(--ease);
  --fade: 0.7s ease;
  --radius: 14px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);

  /* Chrome defaults = engineer. Worlds re-declare so they never recode mid-slide. */
  --bg: #060b16;
  --bg-alt: #0a1324;
  --card: #101a30;
  --border: #1c2d4d;
  --text: #e8eef8;
  --muted: #8aa0c0;
  --faint: #5c7394;
  --accent: #3d7eff;
  --accent-2: #7eb0ff;
  --accent-ink: #06101f;
  --glow: rgba(61, 126, 255, 0.28);
}

html[data-persona="artist"] {
  --bg: #140c09;
  --bg-alt: #1c120e;
  --card: #261810;
  --border: #3d2a1c;
  --text: #f6eadb;
  --muted: #c9a882;
  --faint: #8d6d4e;
  --accent: #e39a4a;
  --accent-2: #f0c48a;
  --accent-ink: #1a0e08;
  --glow: rgba(227, 154, 74, 0.28);
}

#world-engineer {
  --bg: #060b16;
  --bg-alt: #0a1324;
  --card: #101a30;
  --border: #1c2d4d;
  --text: #e8eef8;
  --muted: #8aa0c0;
  --faint: #5c7394;
  --accent: #3d7eff;
  --accent-2: #7eb0ff;
  --accent-ink: #06101f;
  --glow: rgba(61, 126, 255, 0.28);
}

#world-artist {
  --bg: #140c09;
  --bg-alt: #1c120e;
  --card: #261810;
  --border: #3d2a1c;
  --text: #f6eadb;
  --muted: #c9a882;
  --faint: #8d6d4e;
  --accent: #e39a4a;
  --accent-2: #f0c48a;
  --accent-ink: #1a0e08;
  --glow: rgba(227, 154, 74, 0.28);
}

html[data-persona="educator"] {
  --bg: #101012;
  --bg-alt: #17171a;
  --card: #1e1e22;
  --border: #323238;
  --text: #ececec;
  --muted: #9a9aa3;
  --faint: #6e6e76;
  --accent: #c4c4cc;
  --accent-2: #e8e8ec;
  --accent-ink: #121214;
  --glow: rgba(196, 196, 204, 0.22);
}

#world-educator {
  --bg: #101012;
  --bg-alt: #17171a;
  --card: #1e1e22;
  --border: #323238;
  --text: #ececec;
  --muted: #9a9aa3;
  --faint: #6e6e76;
  --accent: #c4c4cc;
  --accent-2: #e8e8ec;
  --accent-ink: #121214;
  --glow: rgba(196, 196, 204, 0.22);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-ui);
  font-weight: 400;
  line-height: 1.55;
  background:
    radial-gradient(1200px 600px at 85% -10%, var(--glow), transparent 55%),
    radial-gradient(800px 500px at -10% 20%, rgba(255,255,255,0.03), transparent 50%),
    var(--bg);
  transition: background var(--fade), color var(--fade);
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; display: block; }

.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

/* Grain overlay */
body::after {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ========== Chrome / identity switch ========== */
.chrome {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--chrome-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  transition: background var(--fade), border-color var(--fade);
}

.chrome-inner {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { text-decoration: none; color: var(--text); }
.brand em {
  font-style: normal;
  color: var(--accent);
  transition: color var(--fade);
}

.switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  width: min(540px, 56vw);
  min-width: 360px;
  padding: 5px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--card) 70%, transparent);
  border: 1px solid var(--border);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.03) inset;
}

.switch-thumb {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: calc((100% - 10px) / 3);
  border-radius: 12px;
  background: var(--accent);
  box-shadow: 0 8px 24px var(--glow);
  transition: transform var(--slide), background var(--fade), box-shadow var(--fade);
  pointer-events: none;
}
html[data-persona="artist"] .switch-thumb {
  transform: translateX(100%);
}
html[data-persona="educator"] .switch-thumb {
  transform: translateX(200%);
}

.switch-btn {
  position: relative;
  z-index: 1;
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  padding: 9px 10px 9px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  border-radius: 12px;
  transition: color 0.35s ease;
}
.switch-btn.is-active { color: var(--accent-ink); }
.switch-btn:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.switch-ico {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
}
.switch-btn.is-active .switch-ico { background: rgba(0,0,0,0.12); }
.switch-ico svg { width: 16px; height: 16px; display: block; }

.switch-copy { min-width: 0; line-height: 1.15; }
.switch-kicker {
  display: none;
}
.switch-name {
  display: block;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.chrome-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
}

nav.links { display: flex; gap: 20px; }
nav.links a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.02em;
}
nav.links a:hover { color: var(--text); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 9px 16px;
  border-radius: 9px;
  font-weight: 650;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--fade), color var(--fade), transform 0.2s ease;
}
.nav-cta:hover {
  background: var(--accent-2);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ========== Sliding worlds ========== */
.viewport {
  overflow: hidden;
  width: 100%;
}

.track {
  display: flex;
  width: 300%;
  will-change: transform;
  transition: transform var(--slide);
}
html[data-persona="artist"] .track {
  transform: translateX(-33.3333%);
}
html[data-persona="educator"] .track {
  transform: translateX(-66.6666%);
}

.world {
  width: 33.3333%;
  flex: 0 0 33.3333%;
  min-height: calc(100vh - var(--chrome-h));
  background: var(--bg);
  color: var(--text);
}

/* ========== Shared section chrome ========== */
.hero { padding: 72px 0 56px; }

.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 16px;
  transition: color var(--fade);
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 0.95;
  margin: 0 0 12px;
  color: #fff;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.role {
  font-size: 20px;
  color: var(--muted);
  margin: 0 0 20px;
  font-weight: 500;
}

.pitch {
  font-size: 17px;
  color: color-mix(in srgb, var(--text) 82%, var(--muted));
  max-width: 640px;
  margin: 0 0 26px;
}

.loc-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 28px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--glow);
}

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  padding: 12px 20px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 14.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-2); }

.hero-photo {
  position: relative;
  flex: 0 0 auto;
  isolation: isolate;
  width: 240px;
  border-radius: 18px;
}
.hero-photo img {
  width: 240px;
  height: 280px;
  object-fit: cover;
  object-position: 50% 18%;
  border-radius: 18px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow), 0 0 0 6px var(--glow);
  display: block;
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 14px -12px -12px 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  z-index: -1;
  opacity: 0.55;
  pointer-events: none;
}

/* Stats */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-alt) 80%, transparent);
  padding: 36px 0;
  transition: background var(--fade), border-color var(--fade);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  text-align: center;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-2);
  letter-spacing: -0.03em;
}
.stat-label {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.35;
}

/* Generic sections */
section.block { padding: 80px 0; scroll-margin-top: calc(var(--chrome-h) + 16px); }

.rule {
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 18px;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 36px);
  color: #fff;
  margin: 0 0 8px;
  letter-spacing: -0.03em;
  font-weight: 750;
}

.section-sub {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 36px;
  max-width: 620px;
}

.lede {
  font-size: 16.5px;
  color: color-mix(in srgb, var(--text) 80%, var(--muted));
  max-width: 720px;
  margin: 0 0 16px;
}

/* Work grid — same frame, different fill */
.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, transform 0.25s ease, background var(--fade);
}
.card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  transform: translateY(-3px);
}

.card-visual {
  height: 180px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, var(--glow), transparent 50%),
    linear-gradient(145deg, var(--bg-alt), var(--card));
}
.card-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
}
.card-visual .mark {
  position: absolute;
  z-index: 1;
  inset: auto 18px 14px 18px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,.65);
}

/* Engineer meshes */
.mesh-a { background:
  radial-gradient(ellipse at 10% 80%, rgba(61,126,255,.45), transparent 50%),
  repeating-linear-gradient(90deg, transparent 0 18px, rgba(126,176,255,.08) 18px 19px),
  linear-gradient(160deg, #0b1a36, #13284c); }
.mesh-b { background:
  radial-gradient(circle at 90% 10%, rgba(61,126,255,.4), transparent 45%),
  repeating-conic-gradient(from 20deg at 30% 60%, transparent 0 12deg, rgba(255,255,255,.04) 0 13deg),
  linear-gradient(200deg, #081428, #1a3058); }
.mesh-c { background:
  linear-gradient(135deg, rgba(61,126,255,.25), transparent 40%),
  repeating-linear-gradient(-45deg, transparent 0 10px, rgba(255,255,255,.04) 10px 11px),
  linear-gradient(180deg, #0e2244, #0a1528); }
.mesh-d { background:
  radial-gradient(circle at 50% 120%, rgba(126,176,255,.35), transparent 55%),
  linear-gradient(90deg, #0a1730 25%, #16325c 50%, #0a1730 75%); }

/* Artist covers — typographic, ready for real photos */
.cover {
  background-size: cover;
  background-position: center;
}
.cover-theatrical {
  background-image:
    linear-gradient(180deg, transparent 20%, rgba(20,12,9,.75)),
    url("../assets/artist/theatrical.jpg"),
    radial-gradient(ellipse at 50% 20%, rgba(227,154,74,.35), transparent 55%),
    linear-gradient(160deg, #3a2214, #120c09);
}
.cover-portrait {
  background-image:
    linear-gradient(180deg, transparent 30%, rgba(20,12,9,.8)),
    url("../assets/artist/portraits.jpg"),
    radial-gradient(circle at 70% 40%, rgba(240,196,138,.25), transparent 50%),
    linear-gradient(200deg, #4a2c1c, #1a100c);
}
.cover-composite {
  background-image:
    linear-gradient(180deg, transparent 25%, rgba(20,12,9,.82)),
    url("../assets/artist/compositing.jpg"),
    repeating-linear-gradient(90deg, rgba(227,154,74,.12) 0 2px, transparent 2px 28px),
    linear-gradient(145deg, #2a1810, #0e0a08);
}
.cover-concept {
  background-image:
    linear-gradient(180deg, transparent 20%, rgba(20,12,9,.78)),
    url("../assets/artist/concept.jpg"),
    radial-gradient(circle at 20% 80%, rgba(180,80,40,.4), transparent 50%),
    linear-gradient(180deg, #24140e, #080604);
}

.card-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 {
  margin: 0 0 4px;
  font-size: 19px;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card-tag {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

.card-body ul {
  margin: 0 0 16px;
  padding-left: 18px;
  color: color-mix(in srgb, var(--text) 78%, var(--muted));
  font-size: 14.5px;
}
.card-body li { margin-bottom: 7px; }
.card-body p {
  margin: 0 0 16px;
  color: color-mix(in srgb, var(--text) 78%, var(--muted));
  font-size: 14.5px;
}

.tech-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tech-tag {
  font-size: 11.5px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 999px;
}

.more-link {
  margin-top: 28px;
  font-size: 15px;
}

/* Experience */
.job {
  border-left: 2px solid var(--border);
  padding-left: 24px;
  margin-bottom: 36px;
  position: relative;
}
.job::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--glow);
}
.job-title-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2px;
}
.job-title { font-size: 18px; font-weight: 700; color: #fff; }
.job-dates { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.job-sub {
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 10px;
}
.job ul { margin: 0; padding-left: 18px; font-size: 14.5px; color: color-mix(in srgb, var(--text) 78%, var(--muted)); }
.job li { margin-bottom: 6px; }

.earlier {
  border-left: 2px solid var(--border);
  padding-left: 24px;
  color: var(--muted);
  font-size: 14px;
}
.earlier strong { color: color-mix(in srgb, var(--text) 85%, var(--muted)); }

/* Skills */
.skill-group { margin-bottom: 20px; }
.skill-cat {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 13.5px;
}

/* Credentials */
.cred-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.cred-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
}
.cred-card .k {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.cred-card .v { font-size: 13px; color: var(--muted); margin-top: 4px; }

.community-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.community-box p {
  margin: 0 0 14px;
  color: color-mix(in srgb, var(--text) 82%, var(--muted));
  font-size: 15.5px;
}
.community-links { display: flex; gap: 18px; font-size: 14.5px; flex-wrap: wrap; }

/* Filmstrip of real teaching stills (artist) */
.filmstrip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 22px;
}
.filmstrip a {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.filmstrip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.filmstrip a:hover img { transform: scale(1.06); }

.quote-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}
.quote-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.quote-card p {
  margin: 0 0 12px;
  font-size: 15px;
  color: color-mix(in srgb, var(--text) 88%, var(--muted));
  font-style: italic;
}
.quote-card cite {
  display: block;
  font-style: normal;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.clients-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  margin-top: 22px;
  opacity: 0.85;
}
.clients-row img {
  height: 28px;
  width: auto;
  filter: grayscale(1) brightness(1.4);
}

footer.site {
  border-top: 1px solid var(--border);
  padding: 40px 0 48px;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links { display: flex; gap: 18px; font-size: 14px; flex-wrap: wrap; }
.copyright { color: var(--muted); font-size: 13px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .track, .switch-thumb, body, .hero-photo img { transition: none !important; }
}

/* Responsive */
@media (max-width: 1100px) {
  nav.links { display: none; }
}

@media (max-width: 960px) {
  nav.links { display: none; }
  .chrome-inner { grid-template-columns: auto 1fr auto; }
  .switch { width: min(420px, 58vw); min-width: 280px; }
}

@media (max-width: 760px) {
  :root { --chrome-h: 132px; }
  .chrome { height: auto; min-height: var(--chrome-h); padding: 12px 0; }
  .chrome-inner {
    grid-template-columns: 1fr auto;
    width: min(100% - 32px, var(--max));
  }
  .switch {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    order: 3;
  }
  .brand { order: 1; }
  .chrome-right { order: 2; }
  nav.links { display: none; }

  .wrap, .chrome-inner { width: calc(100% - 32px); }
  .hero { padding: 40px 0 36px; }
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 28px;
  }
  .hero-photo { order: -1; margin: 0 auto; width: 180px; }
  .hero-photo img { width: 180px; height: 210px; }
  .hero-inner .cta-row, .loc-badge { justify-content: center; }
  .pitch { margin-left: auto; margin-right: auto; }
  .stats-grid, .cred-grid { grid-template-columns: 1fr 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .quote-grid { grid-template-columns: 1fr; }
  .filmstrip { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 38px; }
  section.block { padding: 56px 0; }
  .switch-kicker { display: none; }
}

@media (max-width: 420px) {
  .switch-name { font-size: 12px; }
  .switch-ico { width: 22px; height: 22px; flex-basis: 22px; }
  .nav-cta { padding: 8px 12px; font-size: 12px; }
}
