:root {
  --bg: #0c0d10;
  --bg2: #13151a;
  --line: #23262e;
  --text: #e6e2d8;
  --muted: #9a978f;
  --red: #c0392b;
  --cyan: #3fd8f0;
  --rust: #c8742a;
  --accent: var(--red);
  --radius: 10px;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .18em; color: var(--muted); margin-top: 3rem; }
h4 { font-size: 1.1rem; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(12,13,16,.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 800; text-decoration: none; font-size: 1.15rem; }
.brand span { color: var(--accent); }
.nav nav { display: flex; align-items: center; gap: 1.4rem; font-size: .95rem; }
.nav nav a { text-decoration: none; color: var(--muted); }
.nav nav a:hover { color: var(--text); }
@media (max-width: 760px) { .nav nav a:not(.btn) { display: none; } }

/* buttons */
.btn {
  display: inline-block; padding: .8rem 1.4rem; border-radius: 999px;
  background: var(--accent); color: #fff !important; text-decoration: none; font-weight: 600;
  border: 1px solid var(--accent); transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn.ghost { background: transparent; border-color: #4a4d55; }
.btn.ghost:hover { border-color: var(--text); }
.btn.small { padding: .45rem 1rem; font-size: .9rem; }
.cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

/* hero */
.hero { position: relative; min-height: 88vh; display: grid; align-items: end; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: 65% center;
  filter: saturate(1.1);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,13,16,.25) 0%, rgba(12,13,16,.6) 50%, var(--bg) 100%);
}
.hero-inner { position: relative; max-width: var(--max); margin: 0 auto; width: 100%; padding: 0 clamp(1rem, 4vw, 2.5rem) 12vh; }
.kicker { color: var(--accent); text-transform: uppercase; letter-spacing: .2em; font-size: .8rem; font-weight: 700; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 4.4rem); font-weight: 800; max-width: 16ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: 1.2rem; color: #cfcbc1; max-width: 58ch; margin: 0 0 .8rem; }

/* projects */
section { padding: clamp(4rem, 9vw, 7rem) clamp(1rem, 4vw, 2.5rem); }
section > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.project { border-top: 1px solid var(--line); }
.project.gv { --accent: var(--cyan); background: radial-gradient(ellipse at top, #0f1e26 0%, var(--bg) 60%); }
.project.sg { --accent: var(--red); background: radial-gradient(ellipse at top, #24100e 0%, var(--bg) 60%); }
.project-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.project .logo { width: min(520px, 100%); height: auto; }
.meta { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag { font-size: .8rem; padding: .3rem .75rem; border: 1px solid #3a3d45; border-radius: 999px; color: #c9c5bb; }
.tag.status { border-color: var(--accent); color: var(--accent); }
.pitch { font-size: 1.25rem; max-width: 62ch; margin-top: 2rem; color: #d8d4ca; }

.gallery {
  display: grid; gap: .8rem; margin-top: 2.5rem;
  grid-template-columns: repeat(4, 1fr);
}
.gallery figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; background: #000; cursor: zoom-in; }
.gallery figure.wide { grid-column: span 4; }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16/9; transition: transform .4s, filter .4s; filter: brightness(1.15); }
.gallery figure.wide img { aspect-ratio: 21/9; }
.gallery figure:hover img { transform: scale(1.04); filter: brightness(1.3); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: .6rem .8rem; font-size: .8rem;
  background: linear-gradient(transparent, rgba(0,0,0,.8)); color: #ddd;
}
@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery figure.wide { grid-column: span 2; }
}

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 1100px) { .features { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.features article {
  background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; border-top: 3px solid var(--accent);
}
.features p { color: var(--muted); font-size: .95rem; margin: 0; }

/* jams */
.jams { border-top: 1px solid var(--line); }
.sub { color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; margin-top: 2rem; }
.card {
  text-decoration: none; background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--rust); }
.card img { aspect-ratio: 16/10; object-fit: cover; width: 100%; background: #000; }
.card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.card p { color: var(--muted); font-size: .92rem; margin: .2rem 0 .8rem; flex: 1; }
.year { font-size: .75rem; color: var(--rust); text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.tags { font-size: .8rem; color: #7c7a74; }

/* about */
.about { border-top: 1px solid var(--line); display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; }
.about > * { margin: 0; max-width: none; }
.about { max-width: calc(var(--max) + 5rem); margin: 0 auto; }
.about p { color: #cfcbc1; }
.skills h3 { margin-top: 0; }
.skills ul { list-style: none; padding: 0; margin: 0; }
.skills li { padding: .6rem 0; border-bottom: 1px solid var(--line); }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }

/* contact */
.contact { text-align: center; border-top: 1px solid var(--line); background: radial-gradient(ellipse at bottom, #24100e 0%, var(--bg) 65%); }
.contact .cta { justify-content: center; }
.contact p { color: var(--muted); }

footer { text-align: center; padding: 2rem 1rem 3rem; color: #6b6963; font-size: .85rem; }
footer .social a { color: #9a978f; text-decoration: none; }
footer .social a:hover { color: var(--text); }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 2rem; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 90vh; border-radius: var(--radius); }
.lightbox button { position: absolute; top: 1rem; right: 1.5rem; background: none; border: 0; color: #fff; font-size: 2.5rem; cursor: pointer; }

/* jam cards with thumbnails */
.card:hover { transform: none; }
.card img.cover { cursor: zoom-in; }
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px 4px 0; }
.shots img { aspect-ratio: 16/10; object-fit: cover; width: 100%; border-radius: 4px; cursor: zoom-in; opacity: .85; transition: opacity .2s; }
.shots img:hover { opacity: 1; }
.play { color: var(--rust); font-weight: 600; font-size: .9rem; text-decoration: none; margin-top: auto; }
.play:hover { text-decoration: underline; }

.about a { color: var(--text); text-decoration-color: var(--red); text-underline-offset: 3px; }
.skills h3.edu { margin-top: 2rem; }
.skills .dim { color: var(--muted); font-size: .9rem; }

/* strips shown at their own shape instead of cropped */
.gallery figure.wide.natural img { aspect-ratio: auto; height: auto; object-fit: contain; }

/* trailers */
.project .trailer { margin: 1.5rem auto 0; max-width: 980px; }
.project .trailer video { width: 100%; height: auto; display: block; background: #000; border-radius: var(--radius); }
.project .trailer figcaption { margin-top: .4rem; text-align: center; color: var(--muted); font-size: .85rem; }

/* Ritter & Rotwein */
.rr .project-head .logo { border-radius: var(--radius); }
.rr .gallery img { filter: none; }
.rr .gallery figure:hover img { filter: brightness(1.1); }

/* jam cards: text starts at the same height in every card of a row */
.cards { grid-auto-rows: auto auto 1fr; }
.card { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
.card > .cover { grid-row: 1; }
.card > .shots { grid-row: 2; }
.card > .card-body { grid-row: 3; }
.card:not(:has(> .shots)) > .cover { grid-row: 1 / 3; height: 100%; }
