/* ============ THEMES - edit colors here, or add your own block ============
   Palette is based on the current karawansound.com: dark olive green (#2f3627),
   muted olive (#5f6c4e), sage/cream text (#ddebca, #fffdf7) and the lime of the logo rings. */
:root, [data-theme="forest"] {      /* closest to the current site */
  --bg: #2f3627;
  --surface: #38402e;
  --surface-2: #444d37;
  --line: #55603f;
  --line-hi: #7a8a5c;
  --text: #fffdf7;
  --muted: #e2ead3;
  --accent: #b6e276;
  --accent-2: #ddebca;
  --on-accent: #1f2618;
  --glow: rgba(182, 226, 118, .16);
  --glow-2: rgba(221, 235, 202, .08);
  --nav-bg: rgba(47, 54, 39, .82);
}
[data-theme="midnight"] {           /* darker, more contrast */
  --bg: #161d11;
  --surface: #2a3624;
  --surface-2: #344230;
  --line: #3f4e32;
  --line-hi: #61764a;
  --text: #f3f7ec;
  --muted: #dce6cc;
  --accent: #b2e05d;
  --accent-2: #76cba0;
  --on-accent: #12190a;
  --glow: rgba(178, 224, 93, .15);
  --glow-2: rgba(118, 203, 160, .08);
  --nav-bg: rgba(22, 29, 17, .86);
}
[data-theme="sage"] {               /* light theme */
  --bg: #f3f1e6;
  --surface: #fffdf7;
  --surface-2: #e9ead8;
  --line: #d3d6bd;
  --line-hi: #a9b48a;
  --text: #262d1e;
  --muted: #5f6c4e;
  --accent: #4f6b2a;
  --accent-2: #8aa84a;
  --on-accent: #fffdf7;
  --glow: rgba(138, 168, 74, .22);
  --glow-2: rgba(95, 108, 78, .08);
  --nav-bg: rgba(243, 241, 230, .85);
}

:root {
  --radius: 20px;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  background: var(--bg); color: var(--text);
  font: 400 16px/1.65 var(--font-body);
  background-image:
    radial-gradient(1000px 520px at 50% -8%, var(--glow), transparent 65%),
    radial-gradient(700px 500px at 100% 55%, var(--glow-2), transparent 60%);
  background-repeat: no-repeat;
  text-align: center;
  transition: background-color .3s, color .3s;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); max-width: 16ch; margin-inline: auto; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-bottom: 10px; }
h3 { font-size: 1.15rem; }
.eyebrow { color: var(--accent); font: 600 .78rem var(--font-head); letter-spacing: .2em; text-transform: uppercase; margin-bottom: 16px; }
.lede { color: var(--muted); font-size: 1.15rem; max-width: 600px; margin: 16px auto 0; }
.intro { color: var(--muted); max-width: 560px; margin-inline: auto; }

/* section separation: a line across the page with a small lime tab at every seam (no colored strips) */
main > section, #sections > section { position: relative; }
.seam { border-top: 1px solid var(--line-hi); }
.seam::before { content: ""; position: absolute; top: -2px; left: 50%; width: 96px; height: 4px; margin-left: -48px; border-radius: 4px; background: var(--accent); }

/* masthead + centered nav */
#masthead { padding: 26px 16px 8px; position: relative; max-width: 1120px; margin-inline: auto; }
/* social icons: sit at the right edge of the header, level with the centered logo */
.social-top { position: absolute; right: 16px; top: 26px; height: clamp(46px, 7vw, 66px); display: flex; align-items: center; gap: 8px; }
.social-top a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-hi); color: var(--text); transition: .2s; }
.social-top a svg { width: 17px; height: 17px; fill: currentColor; }
.social-top a:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); transform: translateY(-2px); }
@media (max-width: 900px) {            /* narrow screens: icons drop into a centered row under the logo */
  .social-top { position: static; height: auto; justify-content: center; margin-top: 12px; }
  .social-top a { width: 34px; height: 34px; }
}
.logo { display: inline-block; }
.logo img { height: clamp(46px, 7vw, 66px); width: auto; margin-inline: auto; }
.logo-dark { display: none; }
[data-theme="sage"] .logo-light { display: none; }
[data-theme="sage"] .logo-dark { display: block; }

.nav { position: sticky; top: 10px; z-index: 50; width: fit-content; max-width: calc(100% - 24px); margin: 8px auto 0;
  background: var(--nav-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px; }
.nav-in { display: flex; align-items: center; justify-content: center; }
.links { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; }
.links a { padding: 8px 16px; border-radius: 999px; color: var(--muted); font-size: .9rem; transition: .2s; white-space: nowrap; }
.links a:hover { color: var(--text); background: var(--surface-2); }
.links a.on { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.burger { display: none; background: none; border: 0; width: 44px; height: 40px; cursor: pointer; position: relative; margin-inline: auto; }
.burger span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); transition: .25s; border-radius: 2px; }
.burger span:first-child { top: 15px; } .burger span:last-child { top: 23px; }
.nav.open .burger span:first-child { top: 19px; transform: rotate(45deg); }
.nav.open .burger span:last-child { top: 19px; transform: rotate(-45deg); }

/* hero with sound-ripple rings (echoes the logo) */
.hero { position: relative; padding: clamp(60px, 10vw, 120px) 0 clamp(36px, 6vw, 64px); overflow: hidden; }
.hero.small { padding: 70px 0 30px; }
.hero.small h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); max-width: none; }
.hero .wrap, .stage .wrap { position: relative; z-index: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stage { position: relative; overflow: hidden; padding: clamp(36px, 6vw, 70px) 0 clamp(50px, 8vw, 90px); }
.ripples { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.ripples span { position: absolute; border: 1.5px solid var(--accent); border-radius: 50%; opacity: 0;
  width: 1100px; height: 1100px; left: -550px; top: -550px; animation: ripple 9s ease-out infinite; }
.ripples span:nth-child(2) { animation-delay: 2.25s; } .ripples span:nth-child(3) { animation-delay: 4.5s; } .ripples span:nth-child(4) { animation-delay: 6.75s; }
@keyframes ripple { 0% { transform: scale(.25); opacity: .55; } 100% { transform: scale(1.5); opacity: 0; } }
/* Reels section only: the rings stay put at fixed sizes and just breathe very slightly, so the focus stays on the videos
   (the About section keeps the livelier ripple). Raise/lower the two opacity numbers or the 18s to taste. */
#reels .ripples span { animation: reelsBreathe 13s ease-in-out infinite; opacity: .12; transform: scale(var(--s)); }
#reels .ripples span:nth-child(1) { --s: .36; animation-delay: 0s; }
#reels .ripples span:nth-child(2) { --s: .58; animation-delay: -3.25s; }
#reels .ripples span:nth-child(3) { --s: .82; animation-delay: -6.5s; }
#reels .ripples span:nth-child(4) { --s: 1.08; animation-delay: -9.75s; }
@keyframes reelsBreathe {
  0%, 100% { transform: scale(var(--s)); opacity: .1; }
  50% { transform: scale(calc(var(--s) * 1.09)); opacity: .27; }
}
/* every animated ring gets its own GPU layer, and rings pause while their section is off screen (see app.js) */
.ripples span, .about-rings span, .deco span, .proj-waves span, .deco-wave::before, .deco-wave::after { will-change: transform, opacity; backface-visibility: hidden; }
.is-paused span, .is-paused::before, .is-paused::after { animation-play-state: paused !important; }

.cta { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; justify-content: center; }
.btn { display: inline-block; background: var(--accent); color: var(--on-accent); font-weight: 600; padding: 13px 26px; border-radius: 999px; transition: .2s; border: 1px solid var(--accent); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px var(--glow); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-hi); }
.btn.ghost:hover { border-color: var(--accent); box-shadow: none; }
.block { padding: clamp(50px, 8vw, 90px) 0; }
.block.tight { padding-top: 10px; }

/* media */
.media { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--surface-2); display: block; width: 100%; border: 0; padding: 0; }
.media img, .media iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.media.placeholder { display: grid; place-items: center; color: var(--muted); font-size: .9rem;
  background: linear-gradient(135deg, var(--surface-2), var(--surface)); border: 1px dashed var(--line-hi); }
.media.video { cursor: pointer; }
.play { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%; background: rgba(15, 19, 12, .72); border: 2px solid var(--accent); transition: .2s; }
.play::after { content: ""; position: absolute; left: 25px; top: 19px; border-left: 18px solid var(--accent); border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.video:hover .play { transform: scale(1.1); background: var(--accent); }
.video:hover .play::after { border-left-color: var(--on-accent); }

/* reels side by side */
.reels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; align-items: start; }
.reel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 18px; transition: border-color .25s; }
.reel:hover { border-color: var(--line-hi); }
.badge { display: inline-block; margin-bottom: 14px; padding: 5px 16px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 600 .78rem var(--font-head); letter-spacing: .1em; text-transform: uppercase; }
.reel .badge { padding: 8px 24px; font-size: 1.05rem; margin-bottom: 16px; }

/* about (centered) */
.about { max-width: 720px; display: flex; flex-direction: column; align-items: center; }
.about-photo { width: 190px; margin-bottom: 26px; }
.about-photo .media, .about-photo img { aspect-ratio: 1; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); }
.about-text p { color: var(--muted); margin-bottom: 14px; }
.chips, .filters { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin-top: 20px; justify-content: center; }
.chips li, .chip { background: var(--surface); border: 1px solid var(--line); padding: 6px 15px; border-radius: 999px; font-size: .85rem; color: var(--text); font-family: inherit; }
.chip { cursor: pointer; transition: .2s; }
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }

/* carousel (centered when it fits, scrolls when it doesn't) */
.sec-head { margin-bottom: 28px; }
.carousel { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 16px; scrollbar-width: none; justify-content: safe center; }
.carousel::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 min(320px, 80%); scroll-snap-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; transition: .25s; }
.slide:hover { transform: translateY(-4px); border-color: var(--line-hi); }
.slide-body { padding: 14px 6px 6px; }
.slide-body p { color: var(--muted); font-size: .92rem; margin-top: 6px; }
.more { display: inline-block; margin-top: 10px; color: var(--accent); font-size: .9rem; font-weight: 600; }
.arrows { display: flex; gap: 10px; justify-content: center; margin-top: 8px; }
.arrows button { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-hi); background: var(--surface); color: var(--text); font-size: 1.1rem; cursor: pointer; transition: .2s; }
.arrows button:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* about photos, skills */
.about { max-width: 920px; }
/* about collage: tall left, small bottom-left, wide top-right, large bottom-right. Purely decorative - no hover, no click. */
.photos { display: grid; grid-template-columns: 1fr 1.9fr; grid-template-rows: repeat(6, 1fr); gap: 4px; width: min(100%, 640px); aspect-ratio: 1 / 1.02;
  margin: 14px 0 34px; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: var(--line); pointer-events: none; user-select: none; }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos img:nth-child(1) { grid-column: 1; grid-row: 1 / 5; }
.photos img:nth-child(2) { grid-column: 2; grid-row: 1 / 3; }
.photos img:nth-child(3) { grid-column: 1; grid-row: 5 / 7; object-position: 30% 50%; }
.photos img:nth-child(4) { grid-column: 2; grid-row: 3 / 7; }
.about-text { max-width: 720px; }
.skills { margin: 4px 0 28px; }
.skills .chips { margin-top: 0; }
.about-text a, .intro a, .slide-body p a, .fp-body p a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* two-row carousel + cover tiles */
.carousel.two-rows { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: min(320px, 80%); justify-content: safe center; align-items: stretch; }
.carousel.two-rows .slide { flex: none; }
.carousel .slide:only-child { flex: 0 1 600px; }
.slide-body { text-align: left; }
.track-label { margin: 10px 0 16px; font-size: 1.25rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.carousel.covers { margin-bottom: 4px; }
.carousel.covers .slide { flex: 0 0 190px; padding: 10px; }
.slide.cover .media { aspect-ratio: 1; border-radius: 12px; }
.slide.cover .slide-body { padding: 10px 4px 2px; text-align: center; }
.slide.cover h3 { font-size: .95rem; }
.slide.cover h3 a:hover { color: var(--accent); }
.cover-link { display: block; cursor: pointer; }
.cover-link .media img { transition: transform .35s; }
.cover-link:hover .media img { transform: scale(1.05); }
.slide.cover:has(.cover-link:hover) h3 a { color: var(--accent); }   /* title lights up too, so image + title read as one link */
.arrows[hidden] { display: none; }
/* hover-reveal tiles: big thumbnail + play + title; on hover the tile grows, the image darkens and the description appears centered over it */
.carousel.tiles { grid-auto-columns: min(350px, 82%); gap: 28px; padding: 40px 40px 48px; }
/* featured row: two bigger tiles above the carousel */
.feature-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; padding: 34px 40px 4px; }
.feature-row .slide.tile { padding: 10px; }
.feature-row .slide.tile:hover, .feature-row .slide.tile:has(:focus-visible) { transform: scale(1.1); }
.feature-row .tile-title { font-size: 1.25rem; padding-top: 14px; }
.feature-row .tile-desc { font-size: 1.02rem; padding: 66px 28px 22px; }
@media (max-width: 860px) { .feature-row { grid-template-columns: 1fr; padding: 24px 12px 0; } }
.slide.tile { padding: 8px; position: relative; z-index: 1; cursor: default;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s, border-color .3s; }
.slide.tile:hover, .slide.tile:has(:focus-visible) { transform: scale(1.18); z-index: 6; border-color: var(--accent); box-shadow: 0 28px 64px rgba(0, 0, 0, .55); }
.tile-media { position: relative; border-radius: 14px; overflow: hidden; }
.tile-media::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;   /* darkens the image behind the description */
  background: rgba(6, 10, 4, .74); opacity: 0; transition: opacity .3s; }
.tile:hover .tile-media::after, .tile:has(:focus-visible) .tile-media::after { opacity: 1; }
.tile-title { padding: 12px 6px 6px; font-size: 1.02rem; text-align: center; }
.tile-desc { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center;
  padding: 50px 6% 14px; text-align: left; font-size: .94rem; line-height: 1.45; color: #f6f9f0; text-shadow: 0 1px 8px rgba(0, 0, 0, .6);
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .25s, transform .3s; }
.tile-desc > span { display: block; max-width: 100%; }
.tile-desc a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; pointer-events: auto; }
.tile:hover .tile-desc, .tile:has(:focus-visible) .tile-desc { opacity: 1; transform: none; }
/* play button: centered at rest, shrinks and moves to the top edge while the description is showing */
.tile .play { z-index: 2; inset: auto; top: 50%; left: 50%; margin: 0; transform: translate(-50%, -50%);
  transition: top .3s, transform .3s, background .2s; }
.tile .ext { z-index: 2; }
.tile:hover .play, .tile:has(:focus-visible) .play { top: 12px; transform: translate(-50%, 0) scale(.6); transform-origin: 50% 0; }
.tile:hover .video:hover .play { transform: translate(-50%, 0) scale(.7); }
@media (hover: none) {            /* touch screens can't hover: show the description under the thumbnail */
  .slide.tile:hover, .slide.tile:has(:focus-visible) { transform: none; box-shadow: none; border-color: var(--line); }
  .tile-media::after { display: none; }
  .slide.tile { display: flex; flex-direction: column; }
  .tile-media { display: contents; }
  .tile-media > .media { order: 1; }
  .tile-title { order: 2; }
  .tile-desc { order: 3; position: static; display: block; opacity: 1; transform: none; padding: 2px 6px 10px; color: var(--muted); text-shadow: none; pointer-events: auto; }
  .tile .play, .tile:hover .play, .tile:has(:focus-visible) .play { top: 50%; transform: translate(-50%, -50%); }
}

/* a playing video: no zoom and no text over the player, so every YouTube control (play, fullscreen, volume...) works */
.slide.tile.is-playing, .slide.tile.is-playing:hover, .slide.tile.is-playing:has(:focus-visible),
.feature-row .slide.tile.is-playing:hover { transform: none; box-shadow: none; border-color: var(--line); z-index: auto; }
@media (hover: hover) {
  .tile.is-playing .tile-desc, .tile.is-playing .tile-media::after { display: none; }
}
.carousel.wide .slide { flex: 0 1 520px; }
.media.link { cursor: pointer; }
.media.link img { transition: transform .4s; }
.media.link:hover img { transform: scale(1.03); }
.ext { position: absolute; right: 10px; bottom: 10px; padding: 6px 14px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .78rem; font-weight: 600; }
#sfx .arrows { margin-bottom: 34px; }

/* free pack */
.freepack { display: grid; grid-template-columns: 1fr 1.1fr; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; overflow: hidden; text-align: left; }
.gallery { position: relative; min-height: 340px; background: var(--surface-2); overflow: hidden; }
.g-slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .8s ease; }
.g-slide.on { opacity: 1; }
.g-slide img { width: 100%; height: 100%; object-fit: cover; }
.g-slide figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 40px; font-size: .82rem; text-align: center; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.7);
  background: linear-gradient(transparent, rgba(0,0,0,.72)); }
.g-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: rgba(10,14,8,.55); color: #fff; cursor: pointer; font-size: 1.05rem; backdrop-filter: blur(6px); transition: .2s; z-index: 2; }
.g-btn:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.g-btn.prev { left: 12px; } .g-btn.next { right: 12px; }
.g-dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.g-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: rgba(255,255,255,.45); transition: .2s; }
.g-dots button.on { background: var(--accent); transform: scale(1.3); }
.g-dots { gap: 14px; }
.g-dots button { position: relative; }
.g-dots button::after { content: ""; position: absolute; inset: -8px; }
.fp-body { padding: clamp(28px, 4vw, 52px); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.fp-body h2 { margin: 10px 0 8px; }
.fp-body p { color: var(--muted); margin-bottom: 10px; }
.fp-body .btn { margin-top: 14px; }

/* ===== about: photo collage left, left-aligned copy right ===== */
#about { overflow-x: clip; }
.about { max-width: 1020px; display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: clamp(32px, 6vw, 72px); align-items: center; text-align: left; }
.about-visual { position: relative; }
.about-visual .photos { position: relative; z-index: 1; width: 100%; margin: 0; aspect-ratio: 1 / 1.18; }
.about-rings span { position: absolute; left: 50%; top: 50%; width: 640px; height: 640px; margin: -320px 0 0 -320px; border-radius: 50%;
  border: 1.5px solid var(--accent); opacity: 0; animation: aboutRipple 10s ease-out infinite; pointer-events: none; }
.about-rings span:nth-child(2) { animation-delay: 3.3s; } .about-rings span:nth-child(3) { animation-delay: 6.6s; }
@keyframes aboutRipple { 0% { transform: scale(.55); opacity: .5; } 100% { transform: scale(1.3); opacity: 0; } }
.about-copy h2 { text-align: left; margin-bottom: 14px; }
.lead { font: 600 clamp(1.2rem, 2.1vw, 1.5rem)/1.4 var(--font-head); letter-spacing: -.01em; color: var(--accent); margin-bottom: 18px; }
.lead a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.about-copy .about-text { max-width: 62ch; }
.about-copy .about-text p { font-size: .96rem; line-height: 1.65; margin-bottom: 12px; }
.skills { margin: 22px 0; display: grid; gap: 7px; }
.skills .chips { justify-content: flex-start; margin-top: 0; gap: 7px; }
.skills .chips li { position: relative; background: transparent; border: 1px solid var(--line-hi); border-radius: 7px; padding: 4px 11px 4px 24px; font-size: .76rem; letter-spacing: .01em; color: var(--text); }
.skills .chips li::before { content: ""; position: absolute; left: 10px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 1px; background: var(--accent); transform: rotate(45deg); }
#cv::after { content: "\2193"; margin-left: 9px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .about-rings span { animation: none; } }

/* ===== faint section motion: a quarter of a ring cycle from one corner, or a drifting wave. Much calmer than the hero. ===== */
.deco { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
main > section > .wrap, #sections > section > .wrap { position: relative; z-index: 1; }
.deco span { position: absolute; left: var(--x); top: var(--y); width: 2600px; height: 2600px; margin: -1300px 0 0 -1300px; border-radius: 50%;
  border: 1.5px solid var(--accent); opacity: 0; animation: cornerRipple 30s linear infinite; }
/* negative delays = the cycle is already underway when the page loads, so all three rings are on screen from the start */
.deco span:nth-child(1) { animation-delay: -5s; } .deco span:nth-child(2) { animation-delay: -15s; } .deco span:nth-child(3) { animation-delay: -25s; }
.deco-ring-tl { --x: 0%;   --y: 0%; }
.deco-ring-tr { --x: 100%; --y: 0%; }
.deco-ring-bl { --x: 0%;   --y: 100%; }
.deco-ring-br { --x: 100%; --y: 100%; }
@keyframes cornerRipple { 0% { transform: scale(.06); opacity: .6; } 65% { opacity: .28; } 100% { transform: scale(1); opacity: 0; } }
/* tall sine waves drifting across the whole width of the section (the full window) - stretched to the section's height,
   with a constant line thickness. Two layers of different size / speed / direction for depth. */
.deco-wave::before, .deco-wave::after { content: ""; position: absolute; left: 0; right: 0; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='140' viewBox='0 0 600 140' preserveAspectRatio='none'%3E%3Cpath d='M0 70C75 10 225 10 300 70S525 130 600 70' fill='none' stroke='black' stroke-width='1.8' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") repeat-x;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='140' viewBox='0 0 600 140' preserveAspectRatio='none'%3E%3Cpath d='M0 70C75 10 225 10 300 70S525 130 600 70' fill='none' stroke='black' stroke-width='1.8' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") repeat-x; }
/* the drift moves the whole (wider-than-the-window) layer with a transform, which the graphics card does on its own - no repainting each frame */
.deco-wave::before { top: 8%; right: -900px; height: 66%; opacity: .2; -webkit-mask-size: 900px 100%; mask-size: 900px 100%; animation: waveDrift 42s linear infinite; }
.deco-wave::after { bottom: 0; right: -560px; height: 52%; opacity: .14; -webkit-mask-size: 560px 100%; mask-size: 560px 100%; animation: waveDriftB 34s linear infinite reverse; }
@keyframes waveDrift { to { transform: translateX(-900px); } }
@keyframes waveDriftB { to { transform: translateX(-560px); } }
@media (prefers-reduced-motion: reduce) { .deco span, .deco-wave::before, .deco-wave::after { animation: none; } .deco span { opacity: .08; } }

/* project history: slow sine waves behind the timeline, running left and right in alternating bands (same line style as the SFX section) */
.proj-body { position: relative; overflow: clip; --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='140' viewBox='0 0 600 140' preserveAspectRatio='none'%3E%3Cpath d='M0 70C75 10 225 10 300 70S525 130 600 70' fill='none' stroke='black' stroke-width='1.8' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E"); }
.proj-body > .wrap { position: relative; z-index: 1; }
.proj-waves { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.proj-waves span { position: absolute; left: 0; top: var(--top); height: var(--h); width: calc(100% + var(--w)); background: var(--accent); opacity: var(--o);
  -webkit-mask: var(--wave) repeat-x; mask: var(--wave) repeat-x; -webkit-mask-size: var(--w) 100%; mask-size: var(--w) 100%;
  animation: projWaveL var(--dur) linear infinite; }
.proj-waves span.rev { left: calc(var(--w) * -1); animation-name: projWaveR; }
@keyframes projWaveL { to { transform: translateX(calc(var(--w) * -1)); } }
@keyframes projWaveR { to { transform: translateX(var(--w)); } }
@media (prefers-reduced-motion: reduce) { .proj-waves span { animation: none; } }

/* contact + footer */
.contact { position: relative; isolation: isolate; overflow: clip; clip-path: inset(0 round 28px); background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: clamp(44px, 7vw, 84px) 24px; }
.contact > :not(.ripples) { position: relative; z-index: 1; }
.contact h2 { max-width: 18ch; margin-inline: auto; }
.contact .lede { margin-bottom: 30px; font-size: 1.1rem; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.contact-actions .btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; }
.btn svg { width: 19px; height: 19px; fill: currentColor; flex-shrink: 0; }
.btn svg[stroke] { fill: none; }
.contact-actions .btn.ghost { background: var(--surface); }
.footer { border-top: 1px solid var(--line); padding: 30px 0 40px; margin-top: 60px; color: var(--muted); font-size: .9rem; }
.footer .wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.social { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.social a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-hi); color: var(--text); transition: .2s; }
.social a svg { width: 17px; height: 17px; fill: currentColor; }
.social a:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); transform: translateY(-2px); }

/* "mail app didn't open" helper */
#mailhelp { position: fixed; left: 50%; bottom: 76px; z-index: 70; width: min(440px, calc(100% - 32px)); padding: 16px 18px; border-radius: 18px; text-align: center;
  background: var(--surface); border: 1px solid var(--accent); box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
  opacity: 0; pointer-events: none; transform: translate(-50%, 14px); transition: opacity .25s, transform .25s; }
#mailhelp.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
#mailhelp p { color: var(--muted); font-size: .95rem; margin-bottom: 12px; }
#mailhelp strong { color: var(--text); }
#mailhelp div { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }
#mailhelp button, #mailhelp a { font: 600 .85rem var(--font-body); padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-hi); background: transparent; color: var(--text); cursor: pointer; transition: .2s; }
#mailhelp button[data-act="copy"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
#mailhelp button[data-act="close"] { padding: 6px 12px; font-size: 1.1rem; line-height: 1; }
#mailhelp button:hover, #mailhelp a:hover { border-color: var(--accent); }

/* theme switcher */
.themes { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 16px;
  background: var(--surface); border: 1px solid var(--line-hi); border-radius: 999px; box-shadow: 0 8px 30px rgba(0,0,0,.25); }   /* solid: no live blur over the animated rings */
.themes span { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.themes button { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 2px solid transparent;
  background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%); box-shadow: 0 0 0 1px var(--line-hi); }
.themes button[aria-pressed="true"] { border-color: var(--text); }

/* ===== project history: zigzag timeline ===== */
.proj-hero { padding: clamp(50px, 8vw, 90px) 0 clamp(30px, 5vw, 50px); border-bottom: 1px solid var(--line-hi); }
.proj-hero h1 { max-width: none; font-size: clamp(2.2rem, 5.5vw, 3.8rem); }
.proj-hero .lede { margin-bottom: 6px; }
.proj-hero .ripples span { animation-duration: 12.5s; }
.proj-hero .ripples span:nth-child(2) { animation-delay: 3.1s; } .proj-hero .ripples span:nth-child(3) { animation-delay: 6.25s; } .proj-hero .ripples span:nth-child(4) { animation-delay: 9.4s; }
.proj-hero::after { content: ""; position: absolute; bottom: -2px; left: 50%; width: 96px; height: 4px; margin-left: -48px; border-radius: 4px; background: var(--accent); }
.proj-hero .filters { margin-top: 26px; }
.timeline { --gap: 64px; list-style: none; padding: 60px 0 40px; position: relative; text-align: left;
  display: grid; grid-template-columns: 1fr 1fr; column-gap: calc(var(--gap) * 2); row-gap: 44px; align-items: start; }
.timeline::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%);
  background: linear-gradient(transparent, var(--accent) 6%, var(--accent-2) 80%, transparent); opacity: .6; }
.entry { position: relative; }
.entry.left { grid-column: 1; }
.entry.right { grid-column: 2; margin-top: 110px; }          /* right-hand entries sit lower, so the two sides stagger */
.entry .node { position: absolute; top: 40px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); z-index: 2; }
.entry .node::before, .entry .node::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 1.5px solid var(--accent); opacity: .5; }
.entry .node::after { inset: -20px; opacity: .22; }
.entry:hover .node { background: var(--accent); }
.left .node { right: calc(-1 * var(--gap) - 9px); }
.right .node { left: calc(-1 * var(--gap) - 9px); }
.entry::after { content: ""; position: absolute; top: 48px; width: calc(var(--gap) - 14px); height: 2px; background: var(--line-hi); }
.left::after { right: -1px; transform: translateX(100%); }
.right::after { left: -1px; transform: translateX(-100%); }
.year { position: absolute; top: 0; z-index: 2; padding: 2px 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--accent-2); color: var(--accent-2);
  font: 700 .85rem var(--font-head); letter-spacing: .04em; transform: translateX(-50%); }   /* sits on the center line, above the dot, inside the gap between the two columns */
.left .year { left: calc(100% + var(--gap)); }
.right .year { left: calc(-1 * var(--gap)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .3s, box-shadow .3s; }
.card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.card-body { padding: 18px 10px 10px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-bottom: 12px; }
.meta .badge { margin: 0; padding: 4px 14px; font-size: .76rem; }
.tag { background: var(--surface-2); color: var(--muted); padding: 3px 11px; border-radius: 999px; font-size: .74rem; }
.card-body h3 { font-size: 1.45rem; margin-bottom: 8px; text-align: center; }
.card-body .sub { text-align: center; color: var(--muted); font-size: .84rem; margin: -2px 0 12px; opacity: .85; }
.card-body .summary { color: var(--muted); }
.card-body ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; font-size: .94rem; color: var(--muted); }
.card-body li { padding-left: 22px; position: relative; }
.card-body li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.card-body li a, .card-body .summary a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.more-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 16px; }
.card-body .more { display: inline-block; padding: 9px 4px; color: var(--accent); font-weight: 600; font-size: .92rem; }
.card-body .more:hover { text-decoration: underline; text-underline-offset: 3px; }
.entry.left.reveal { transform: translate(-34px, 20px); } .entry.right.reveal { transform: translate(34px, 20px); }
.entry.reveal.in { transform: none; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
/* placeholder thumbnail for projects without footage yet: ripple rings, like the logo */
.media.placeholder { background: repeating-radial-gradient(circle at 50% 50%, transparent 0 22px, var(--glow) 22px 24px), linear-gradient(135deg, var(--surface-2), var(--surface)); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease, border-color .25s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; } .ripples span { animation: none; }
}

/* ===== mobile ===== */
@media (max-width: 860px) {
  .reels { grid-template-columns: 1fr; }
  .freepack { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .about-visual { max-width: 440px; width: 100%; margin-inline: auto; }
  .gallery { min-height: 0; aspect-ratio: 4 / 3; }
  .nav { border-radius: 24px; width: calc(100% - 24px); }
  .nav-in { flex-direction: column; }
  .burger { display: block; }
  .links { display: none; flex-direction: column; padding: 4px 4px 8px; }
  .nav.open .links { display: flex; }
  .themes span { display: none; } .themes { padding-left: 10px; }

  .timeline { --gap: 0px; padding-top: 40px; display: block; }
  .timeline::before { left: 8px; transform: none; }
  .entry, .entry.left, .entry.right, .entry + .entry, .entry.right + .entry.left { width: 100%; margin: 0 0 30px; padding-left: 44px; }
  .entry .node { top: 36px; left: 0 !important; right: auto !important; }
  .entry::after { display: none; }
  .entry .year, .left .year, .right .year { position: static; display: inline-block; margin: 0 0 12px; transform: none; font-size: .95rem; padding: 3px 14px; }
  .entry.left.reveal, .entry.right.reveal { transform: translateY(20px); }
}
