:root {
  /* dark, slightly green base — not slate, not corporate */
  --bg:        oklch(0.155 0.012 158);
  --bg-2:      oklch(0.195 0.014 158);
  --bg-3:      oklch(0.245 0.016 156);
  --line:      oklch(0.32 0.014 158);
  --line-soft: oklch(0.235 0.014 158);
  --fg:        oklch(0.96 0.008 155);
  --fg-2:      oklch(0.80 0.014 155);
  --muted:     oklch(0.60 0.014 155);
  --dim:       oklch(0.42 0.012 155);
  --accent:    oklch(0.82 0.14 152);   /* jade — emphasis */
  --accent-dim:oklch(0.55 0.10 152);

  --sans: "Geist", "Söhne", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { background: var(--bg); color: var(--fg); }
html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}
body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

/* ─── top bar ─── */
.top {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 5vw;
  pointer-events: none;
  background: linear-gradient(to bottom, color-mix(in oklch, var(--bg), transparent 0%) 0%, color-mix(in oklch, var(--bg), transparent 35%) 70%, transparent 100%);
}
.top > * { pointer-events: auto; }

.top-left {
  display: inline-flex; align-items: baseline; gap: 14px;
}
.top .name {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.005em;
  display: inline-flex; align-items: center; gap: 10px;
}
.top .name::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.top .title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-left: 14px;
  border-left: 1px solid var(--line-soft);
}

.top-right {
  display: inline-flex; align-items: center; gap: 10px;
}
.top .link {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  transition: color .2s;
}
.top .link svg { width: 11px; height: 11px; opacity: .6; transition: opacity .2s, transform .25s; }
.top .link:hover { color: var(--fg); }
.top .link:hover svg { opacity: 1; transform: translate(1px, -1px); }

.top .icon-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  color: var(--fg-2);
  border-radius: 6px;
  transition: color .2s, background .2s;
}
.top .icon-link svg { width: 18px; height: 18px; }
.top .icon-link:hover { color: var(--fg); background: var(--bg-2); }
.top .email {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
  transition: color .2s;
  margin-left: 10px;
  padding-left: 16px;
  border-left: 1px solid var(--line-soft);
}
.top .email:hover { color: var(--fg); }

/* ─── project pane ─── */
.pane {
  min-height: 100vh;
  scroll-snap-align: start;
  padding: 88px 5vw 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  border-top: 1px solid var(--line-soft);
}
.pane:first-of-type { border-top: 0; }

.pane-foot {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  padding-top: 12px;
}
.more {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color .2s;
}
.more:hover { color: var(--fg); }
.more .chev {
  display: inline-block;
  width: 14px; height: 14px;
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

.pane-head {
  display: flex;
  align-items: baseline;
  gap: 28px;
  flex-wrap: wrap;
}
.pane-head h2 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--fg);
}
.pane-head h2 .em {
  color: var(--accent);
  /* highlight without italics: accent color + thin underline mark below baseline */
}
.pane-head .tag {
  font-size: clamp(15px, 1.2vw, 18px);
  color: var(--fg-2);
  letter-spacing: -0.005em;
  max-width: 56ch;
}

/* ─── stage ─── */
.stage {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: stretch;
  min-height: 0;
}

.window {
  position: relative;
  overflow: hidden;
  min-height: 0;
}
.track {
  position: absolute; inset: 0;
  display: flex;
  transition: transform .7s cubic-bezier(.5,0,.2,1);
  will-change: transform;
}
.track .slide {
  flex: 0 0 100%;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 40px;
  align-items: stretch;
}
.track .slide-media {
  position: relative;
  min-width: 0;
  min-height: 0;
}

/* ─── media tiles (no chrome) ─── */
.tile {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 4px;
  background: var(--bg-2);
  overflow: hidden;
  border: 1px solid var(--line-soft);
}
.tile.embed iframe,
.tile.embed video,
.tile.embed img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  display: block;
}
.tile.embed img,
.tile.embed video {
  object-fit: contain;
  object-position: center;
  background: var(--bg);
}
.tile.embed iframe {
  background: #000;
}
.tile .tex {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(
      135deg,
      transparent 0,
      transparent 18px,
      color-mix(in oklch, var(--bg-3), transparent 65%) 18px,
      color-mix(in oklch, var(--bg-3), transparent 65%) 19px
    ),
    radial-gradient(120% 80% at 50% 40%, var(--bg-2), var(--bg));
}
.tile.video .tex {
  background:
    repeating-linear-gradient(
      135deg,
      transparent 0,
      transparent 18px,
      color-mix(in oklch, var(--accent-dim), transparent 80%) 18px,
      color-mix(in oklch, var(--accent-dim), transparent 80%) 19px
    ),
    radial-gradient(120% 80% at 50% 50%, var(--bg-2), var(--bg));
}
.tile .play {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid color-mix(in oklch, var(--fg), transparent 80%);
  background: color-mix(in oklch, var(--bg), transparent 20%);
  display: grid; place-items: center;
  backdrop-filter: blur(4px);
}
.tile .play svg { color: var(--fg); width: 14px; height: 14px; }
.tile .pulse {
  position: absolute;
  left: 18px; bottom: 18px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}

/* ─── caption ─── */
.slide-caption {
  align-self: center;
  display: flex; flex-direction: column;
  justify-content: center;
  gap: 14px;
  min-width: 0;
  padding-right: 12px;
}
.slide-caption h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(20px, 1.6vw, 26px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--fg);
  text-wrap: balance;
}
.slide-caption h3 .em { color: var(--accent); }
.slide-caption p {
  font-size: 14px;
  color: var(--fg-2);
  line-height: 1.55;
  max-width: 38ch;
}

/* ─── plus button ─── */
.plus-wrap {
  align-self: center;
  display: flex; flex-direction: column;
  align-items: center;
  gap: 12px;
}
.plus {
  --size: 64px;
  width: var(--size); height: var(--size);
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  display: grid; place-items: center;
  transition: background .25s, border-color .25s, transform .35s;
  position: relative;
}
.plus:hover {
  background: var(--bg-2);
  border-color: var(--accent);
}
.plus:hover svg { transform: rotate(90deg); color: var(--accent); }
.plus:active { transform: scale(0.96); }
.plus svg {
  width: 18px; height: 18px;
  transition: transform .45s cubic-bezier(.5,0,.2,1), color .25s;
}
.plus .ring {
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: var(--accent);
  transform: rotate(var(--prog-deg, 0deg));
  transition: transform .6s cubic-bezier(.5,0,.2,1);
  pointer-events: none;
}
.plus-wrap .count {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
.plus-wrap .count .cur { color: var(--fg); }

/* ─── responsive ─── */
@media (max-width: 1100px) {
  .stage {
    grid-template-columns: 1fr auto;
    grid-template-rows: 1fr auto;
  }
  .window { grid-column: 1 / -1; }
  .plus-wrap { grid-column: 2; align-self: end; }
  .track .slide {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 28px;
  }
}
@media (max-width: 720px) {
  html { scroll-snap-type: none; }
  .top { padding: 16px 22px; }
  .top .email { display: none; }
  .top .title { display: none; }
  .top-right { gap: 14px; }
  .pane { padding: 72px 22px 28px; gap: 20px; }
  .pane-head { gap: 12px; }
  .track .slide {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 16px;
  }
}
