/* ==========================================================================
   Hjalte Bested Hjorth – portfolio
   Same look as tromleorkestret.com and roboticaudio.com: warm near-black,
   cream text, a fire gradient for everything lit, Big Shoulders Display + Inter.
   ========================================================================== */

:root {
  --bg: #0d0b0a;
  --surface: #17120f;
  --surface-2: #211a15;
  --line: rgba(255, 236, 220, 0.1);
  --line-strong: rgba(255, 236, 220, 0.22);
  --text: #f4ece4;
  --muted: #a99e94;
  --fire: #ff6a1a;
  --fire-hot: #ffb23e;
  --ember: #ff3b0a;
  --on-fire: #1a0b03;
  --fire-gradient: linear-gradient(95deg, var(--ember) 0%, var(--fire) 45%, var(--fire-hot) 100%);

  --font-display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --content: 44rem;
  --wide: 76rem;
  --radius: 14px;
  --header-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Reset & base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(16px, 0.35vw + 15px, 18px);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, video, iframe { max-width: 100%; }
img { display: block; height: auto; }

a { color: var(--fire-hot); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--fire); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

p { margin: 0 0 1.2em; }

[hidden] { display: none !important; }

::selection { background: var(--fire); color: #140a04; }

:focus-visible { outline: 2px solid var(--fire-hot); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--fire); color: #140a04; padding: 8px 14px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 16px; }

.center { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.container { width: min(var(--wide), 100% - 2 * var(--gutter)); margin-inline: auto; }
.container--wide { width: min(96rem, 100% - 2 * var(--gutter)); }

/* ---------- Small shared pieces ---------- */

.kicker {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fire-hot);
  margin: 0 0 1rem;
}
.kicker::before {
  content: ""; width: 28px; height: 2px; background: var(--fire-gradient); border-radius: 2px;
}
.kicker__count { color: var(--muted); letter-spacing: 0.12em; margin-left: 0.6em; }

.fire-text {
  background: var(--fire-gradient);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  padding: 0.85em 1.5em;
  border-radius: 999px;
  font: 600 0.9rem/1 var(--font-body);
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
  white-space: nowrap;
}
.btn--fire { background: var(--fire-gradient); color: var(--on-fire); box-shadow: 0 8px 30px -8px rgba(255, 106, 26, 0.6); }
.btn--fire:hover { color: var(--on-fire); transform: translateY(-2px); box-shadow: 0 12px 40px -8px rgba(255, 106, 26, 0.85); }
.btn--ghost { color: var(--text); border-color: var(--line-strong); background: rgba(13, 11, 10, 0.35); backdrop-filter: blur(6px); }
.btn--ghost:hover { color: var(--text); border-color: var(--fire); background: rgba(255, 106, 26, 0.12); }
.btn i { font-size: 0.85em; }

.text-link {
  display: inline-flex; align-items: center; gap: 0.5em;
  margin-top: 1.5rem; font-weight: 600; text-decoration: none; color: var(--text);
}
.text-link i { color: var(--fire); transition: transform 0.25s var(--ease); }
.text-link:hover { color: var(--fire-hot); }
.text-link:hover i { transform: translateX(4px); }

.back-link { display: inline-flex; align-items: center; gap: 0.5em; margin-bottom: 40px; color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.back-link:hover { color: var(--fire-hot); }

.social { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; }
.social a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  color: var(--text); border: 1px solid var(--line-strong); text-decoration: none;
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.25s var(--ease);
}
.social a:hover { background: var(--fire); border-color: var(--fire); color: var(--on-fire); transform: translateY(-2px); }

/* Tags: small outlined capsules */
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 1.8rem 0 0; }
.tag-list--end { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.tag {
  display: inline-block; padding: 0.5em 1em; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1;
  color: var(--muted); text-decoration: none; transition: color 0.25s, border-color 0.25s, background 0.25s;
}
a.tag:hover { color: var(--text); border-color: var(--fire); background: rgba(255, 106, 26, 0.12); }

/* ---------- Header ---------- */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  transition: background 0.35s, border-color 0.35s, backdrop-filter 0.35s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(13, 11, 10, 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line);
}
/* A backdrop-filter would trap the fixed mobile menu inside the header, so the header is solid while it is open */
.nav-open .site-header,
.nav-open .site-header.is-scrolled { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: var(--line); }
.site-header__inner {
  height: 100%;
  width: min(96rem, 100% - 2 * var(--gutter));
  margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}
.wordmark span { color: var(--fire); }
.wordmark:hover { color: var(--text); }
.wordmark--lg { font-size: 2.4rem; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
.site-nav ul a {
  position: relative;
  color: var(--text); text-decoration: none;
  font-weight: 500; font-size: 0.92rem; letter-spacing: 0.03em;
  padding: 6px 0;
}
.site-nav ul a i { font-size: 0.7em; margin-left: 0.25em; color: var(--muted); }
.site-nav ul a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--fire-gradient); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.site-nav ul a:hover::after,
.site-nav ul a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav__cta { padding: 0.7em 1.3em; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; border: 0; background: none; padding: 10px; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 6px;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0;
    flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 32px;
    padding: 32px var(--gutter);
    background: var(--bg);
    opacity: 0; visibility: hidden; transform: translateY(-12px);
    transition: opacity 0.3s, transform 0.3s var(--ease), visibility 0.3s;
  }
  .nav-open .site-nav { opacity: 1; visibility: visible; transform: none; }
  .nav-open { overflow: hidden; }
  .site-nav ul { flex-direction: column; gap: 6px; }
  .site-nav ul a { font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; text-transform: uppercase; letter-spacing: 0.01em; }
  .site-nav ul a i { font-size: 0.4em; vertical-align: middle; }
  .site-nav ul a::after { bottom: 4px; }
}

/* ---------- Home hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: calc(var(--header-h) + 40px) var(--gutter) clamp(72px, 12vh, 140px);
  isolation: isolate;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%;
  animation: hero-zoom 16s var(--ease) both;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(13, 11, 10, 0.6) 0%, rgba(13, 11, 10, 0) 22%),
    linear-gradient(0deg, var(--bg) 0%, rgba(13, 11, 10, 0.78) 24%, rgba(13, 11, 10, 0) 62%),
    linear-gradient(90deg, rgba(13, 11, 10, 0.78) 0%, rgba(13, 11, 10, 0) 62%);
}
.hero::after {
  content: ""; position: absolute; z-index: -1; left: -10%; bottom: -30%; width: 70%; height: 70%;
  background: radial-gradient(closest-side, rgba(255, 90, 20, 0.28), transparent);
  animation: ember 5s ease-in-out infinite alternate;
  pointer-events: none;
}
.hero__content { width: min(96rem, 100%); margin-inline: auto; }
.hero__title {
  font-size: clamp(3.4rem, 12.5vw, 13rem);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.005em;
  margin: 0 0 0.25em;
}
.hero__title span { display: block; }
.hero__title span + span {
  background: var(--fire-gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 0.04em;
}
.hero__lead {
  font-size: clamp(1.2rem, 2.2vw, 1.75rem);
  font-weight: 500;
  max-width: 30ch;
  margin-bottom: 2rem;
}
.hero__lead em { font-style: normal; color: var(--fire-hot); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__credit {
  position: absolute; right: var(--gutter); bottom: 20px; margin: 0;
  font-size: 0.72rem; letter-spacing: 0.08em; color: rgba(244, 236, 228, 0.5);
}
.hero__scroll {
  position: absolute; left: 50%; bottom: 24px; translate: -50% 0;
  width: 26px; height: 42px; border: 2px solid rgba(244, 236, 228, 0.5); border-radius: 14px;
}
.hero__scroll span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  background: var(--fire); border-radius: 2px; animation: scroll-dot 1.8s ease-in-out infinite;
}

@keyframes hero-zoom { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes ember { from { opacity: 0.55; transform: scale(1); } to { opacity: 1; transform: scale(1.08); } }
@keyframes scroll-dot { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

@media (max-width: 640px) {
  .hero__scroll { display: none; }
  .hero__credit { left: var(--gutter); right: auto; }
  .hero__actions .btn { flex: 1 1 auto; }
}

/* ---------- Sections (home) ---------- */

.section { padding-block: clamp(72px, 11vw, 150px); }
.section--surface { background: linear-gradient(180deg, var(--bg), var(--surface) 30%, var(--surface) 70%, var(--bg)); }
.section--flush-top { padding-top: 0; }
.section-head { max-width: 46rem; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head--row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.section-head--row > div { max-width: 44rem; }
.section-title { font-size: clamp(2.4rem, 5.5vw, 4.5rem); margin-bottom: 0.35em; }
.section-head--row .section-title { margin-bottom: 0; }
.section-lead { color: var(--muted); font-size: 1.1rem; margin: 0; }

/* Intro: statement on the left, portrait on the right */
.intro__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.intro__statement {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2rem, 3.4vw, 3.4rem);
  line-height: 1.05;
  max-width: 22ch;
  margin-bottom: 0.6em;
  text-wrap: balance;
}
.intro__text { color: var(--muted); font-size: 1.08rem; max-width: 46ch; margin-bottom: 0; }
.intro__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
@media (max-width: 860px) { .intro__grid { grid-template-columns: 1fr; } }

/* What I do */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature {
  display: flex; flex-direction: column;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  color: var(--text); text-decoration: none;
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}
a.feature:hover { color: var(--text); transform: translateY(-6px); border-color: rgba(255, 106, 26, 0.6); box-shadow: 0 24px 60px -24px rgba(255, 90, 20, 0.5); }
.feature > i { font-size: 1.6rem; color: var(--fire); margin-bottom: 18px; display: block; }
.feature h3 { font-size: 1.7rem; margin: 0 0 0.4em; }
.feature p { color: var(--muted); font-size: 0.95rem; line-height: 1.6; margin: 0 0 18px; }
.feature__more { margin-top: auto; font-weight: 600; font-size: 0.85rem; display: inline-flex; align-items: center; gap: 0.5em; }
.feature__more i { color: var(--fire); transition: transform 0.25s var(--ease); }
a.feature:hover .feature__more i { transform: translateX(4px); }
@media (max-width: 1100px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }

/* Call to action */
.cta { text-align: center; }
.cta__title { font-size: clamp(2.6rem, 7vw, 6rem); max-width: 16ch; margin: 0 auto 0.4em; line-height: 0.92; }
.cta__text { color: var(--muted); font-size: 1.1rem; max-width: 40ch; margin: 0 auto 2rem; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- Project cards ---------- */

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }

/* Front page: the first two are wide, the rest three to a row */
.project-grid--home { grid-template-columns: repeat(6, 1fr); }
.project-grid--home .project-card { grid-column: span 2; }
.project-grid--home .project-card--big { grid-column: span 3; }
@media (max-width: 1020px) {
  .project-grid--home { grid-template-columns: repeat(2, 1fr); }
  .project-grid--home .project-card { grid-column: span 1; }
  .project-grid--home .project-card--big { grid-column: span 2; }
}
@media (max-width: 620px) {
  .project-grid--home { grid-template-columns: 1fr; }
  .project-grid--home .project-card, .project-grid--home .project-card--big { grid-column: span 1; }
}

.project-card {
  display: flex; flex-direction: column;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: var(--text); text-decoration: none;
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}
.project-card:hover { color: var(--text); transform: translateY(-6px); border-color: rgba(255, 106, 26, 0.6); box-shadow: 0 24px 60px -24px rgba(255, 90, 20, 0.5); }
.project-card__media { aspect-ratio: 4 / 3; overflow: hidden; background: #000; }
.project-card--big .project-card__media { aspect-ratio: 16 / 9; }
.project-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.project-card:hover .project-card__media img { transform: scale(1.06); }
.project-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.project-card__type { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--fire-hot); margin-bottom: 8px; }
.project-card__title { font-size: 1.75rem; margin-bottom: 0.3em; }
.project-card--big .project-card__title { font-size: clamp(1.9rem, 3vw, 2.6rem); }
.project-card__text { color: var(--muted); font-size: 0.93rem; line-height: 1.55; margin-bottom: 16px; }
.project-card__more { margin-top: auto; font-weight: 600; font-size: 0.85rem; display: inline-flex; align-items: center; gap: 0.5em; }
.project-card__more i { color: var(--fire); transition: transform 0.25s var(--ease); }
.project-card:hover .project-card__more i { transform: translateX(4px); }

/* Tag filter (Projects page) */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(28px, 4vw, 48px); }
.chip {
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 0.7em 1.15em; border: 1px solid var(--line-strong); border-radius: 999px;
  background: none; color: var(--text); cursor: pointer;
  font: 600 0.74rem/1 var(--font-body); letter-spacing: 0.12em; text-transform: uppercase;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.chip:hover { border-color: var(--fire); background: rgba(255, 106, 26, 0.12); }
.chip[aria-pressed="true"] { background: var(--fire-gradient); border-color: transparent; color: var(--on-fire); }
.chip__count { font-weight: 500; opacity: 0.6; letter-spacing: 0.04em; }
.filter-empty { color: var(--muted); }

/* ---------- Blog list ---------- */

.post-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.post-list > li { border-bottom: 1px solid var(--line); }
.post-row {
  display: grid; grid-template-columns: 96px 1fr auto auto; gap: clamp(16px, 3vw, 32px); align-items: center;
  padding: clamp(20px, 3vw, 30px) 0; color: var(--text); text-decoration: none;
}
.post-row:hover { color: var(--text); }
.post-row__date { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.post-row__day { font-family: var(--font-display); font-weight: 900; font-size: 2.8rem; color: var(--fire); }
.post-row__month { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.post-row__info { display: flex; flex-direction: column; gap: 6px; }
.post-row__title { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.05; transition: color 0.25s; }
.post-row:hover .post-row__title { color: var(--fire-hot); }
.post-row__text { color: var(--muted); font-size: 0.95rem; line-height: 1.55; max-width: 60ch; }
.post-row__image { width: 140px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.post-row__arrow { color: var(--fire); transition: transform 0.25s var(--ease); }
.post-row:hover .post-row__arrow { transform: translateX(4px); }
@media (max-width: 640px) {
  .post-row { grid-template-columns: 1fr auto; }
  .post-row__date { flex-direction: row; align-items: baseline; gap: 10px; grid-column: 1 / -1; }
  .post-row__day { font-size: 1.6rem; }
  .post-row__image { display: none; }
}

.empty-state { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: clamp(32px, 6vw, 72px); text-align: center; }
.empty-state h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.empty-state p { color: var(--muted); max-width: 40ch; margin: 0 auto 1.6rem; }

/* ---------- Page hero ---------- */

.page-hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(420px, 68vh, 760px);
  display: flex; align-items: flex-end;
  padding: calc(var(--header-h) + 48px) var(--gutter) clamp(40px, 6vw, 72px);
}
.page-hero--plain { min-height: 0; padding-top: calc(var(--header-h) + 80px); padding-bottom: 0; }
.page-hero__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: hero-zoom 14s var(--ease) both; }
.page-hero:not(.page-hero--plain)::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(13, 11, 10, 0.6) 0%, rgba(13, 11, 10, 0) 30%),
    linear-gradient(0deg, var(--bg) 0%, rgba(13, 11, 10, 0.7) 30%, rgba(13, 11, 10, 0.1) 75%);
}
.page-hero__content { width: min(var(--wide), 100%); margin-inline: auto; }
.page-hero__title { font-size: clamp(3.4rem, 11vw, 10rem); font-weight: 900; line-height: 0.86; margin: 0; }
.page-hero__title--post { font-size: clamp(2.6rem, 6.5vw, 6rem); line-height: 0.92; max-width: 18ch; }
.page-hero__lead { font-size: clamp(1.1rem, 1.8vw, 1.4rem); max-width: 44ch; margin: 1.2rem 0 0; color: rgba(244, 236, 228, 0.88); }
.page-hero--post .back-link { margin-bottom: 28px; display: flex; }

/* Listing pages (Projects, Blog): content straight under a plain hero */
.listing { padding-block: clamp(32px, 5vw, 56px) clamp(80px, 10vw, 140px); }

/* ---------- Project page hero ---------- */

.project-hero {
  display: grid; grid-template-columns: 1.15fr 1fr;
  min-height: min(88vh, 860px);
  padding-top: var(--header-h);
}
.project-hero__media { position: relative; overflow: hidden; background: #000; }
.project-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: hero-zoom 14s var(--ease) both; }
.project-hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 60%, var(--bg)); }
.project-hero__content { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: clamp(32px, 5vw, 72px) var(--gutter); }
.project-hero__title { font-size: clamp(2.6rem, 5vw, 5.4rem); font-weight: 900; line-height: 0.92; margin: 0 0 0.35em; }
.project-hero__lead { font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: rgba(244, 236, 228, 0.85); max-width: 36ch; margin: 0; }
@media (max-width: 860px) {
  .project-hero { grid-template-columns: 1fr; min-height: 0; }
  .project-hero__media { aspect-ratio: 4 / 3; }
  .project-hero__media::after { background: linear-gradient(0deg, var(--bg), transparent 40%); }
  .back-link { margin-bottom: 24px; }
}

/* Previous / next */
.pager {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  width: min(var(--wide), 100% - 2 * var(--gutter)); margin: 0 auto clamp(72px, 10vw, 120px);
}
.pager__link {
  position: relative; isolation: isolate; overflow: hidden; border-radius: var(--radius);
  min-height: 220px; padding: 24px; display: flex; flex-direction: column; justify-content: flex-end;
  color: var(--text); text-decoration: none; border: 1px solid var(--line); background: var(--surface);
}
.pager__link img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: 0.5; transition: transform 0.6s var(--ease), opacity 0.3s; }
.pager__link::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(13, 11, 10, 0.95), rgba(13, 11, 10, 0.2)); }
.pager__link:hover { color: var(--text); border-color: rgba(255, 106, 26, 0.6); }
.pager__link:hover img { transform: scale(1.05); opacity: 0.75; }
.pager__link--next { text-align: right; align-items: flex-end; }
.pager__label { font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--fire-hot); font-weight: 600; }
.pager__title { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1; margin-top: 6px; text-wrap: balance; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager__link--next { text-align: left; align-items: flex-start; } .pager > span { display: none; } }

/* ---------- Prose (Markdown content) ---------- */

.prose {
  width: min(var(--content), 100% - 2 * var(--gutter));
  margin: clamp(40px, 6vw, 72px) auto clamp(64px, 9vw, 110px);
}
.prose::after { content: ""; display: table; clear: both; }

/* Break-out widths: .wide = up to 76rem, #wide images = edge to edge */
.prose > .wide,
.prose > p:has(> .yt),
.prose > p:has(> iframe.is-video:not(.is-video--portrait)),
.prose > .gallery-box,
.prose > figure {
  --w: min(var(--wide), 100vw - 2 * var(--gutter));
  width: var(--w);
  margin-left: calc((100% - var(--w)) / 2);
}
.prose > p:has(img[src$="#wide"]) {
  --w: min(96rem, 100vw);
  width: var(--w);
  margin-left: calc((100% - var(--w)) / 2);
}
.prose > p:has(> iframe.is-video:not(.is-video--portrait)) { --w: min(60rem, 100vw - 2 * var(--gutter)); }

.prose > .wide, .prose > .gallery-box, .prose > figure { margin-block: clamp(32px, 5vw, 56px); }

.prose h1, .prose h2 { font-size: clamp(2.4rem, 5vw, 3.8rem); margin: clamp(56px, 8vw, 96px) 0 0.45em; }
.prose h1::before, .prose h2::before {
  content: ""; display: block; width: 56px; height: 3px; margin-bottom: 0.45em;
  background: var(--fire-gradient); border-radius: 3px;
}
.prose h3 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 2.2em 0 0.5em; color: var(--text); }
.prose h4 { font-size: 1.4rem; margin: 2em 0 0.6em; }
.prose h4 strong, .prose h3 strong { font-weight: inherit; }
.prose > :first-child { margin-top: 0; }
.prose strong { color: #fff; font-weight: 600; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 4rem 0; }
.prose > hr:last-child { display: none; }

.lede, .prose > .lede { font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.55; color: var(--text); margin-bottom: 1.6em; }

.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.4em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--fire); }
.prose li > ul, .prose li > ol { margin: 0.4em 0 0.6em; }

/* Quotes written in Markdown (embeds such as Instagram bring their own class and are left alone) */
.prose blockquote:not([class]) {
  margin: 2.6em 0; padding: 0.2em 0 0.2em 1.4em;
  border-left: 3px solid var(--fire);
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem); line-height: 1.12; color: var(--text);
}
.prose blockquote:not([class]) p { margin: 0 0 0.4em; }
.prose blockquote:not([class]) p:last-child { margin: 0; }
.prose blockquote cite {
  display: block; font-family: var(--font-body); font-style: normal; font-weight: 500;
  font-size: 0.8rem; letter-spacing: 0.15em; color: var(--muted); margin-top: 0.4em;
}
.prose blockquote cite::before { content: "— "; }
.prose blockquote[class] { margin-inline: auto !important; }

.prose img { border-radius: var(--radius); margin-inline: auto; }
.prose p > img { cursor: zoom-in; }
.prose img[src$="#wide"] { width: 100%; border-radius: 0; }
.prose img[src$="#center"] { margin-inline: auto; }
.prose img[src$="#right"] { float: right; width: min(42%, 340px); margin: 0.4em 0 1.2em 1.8em; }
@media (max-width: 600px) { .prose img[src$="#right"] { float: none; width: 100%; margin: 1.5em 0; } }
.prose img + em, .prose img + br + em, .prose figcaption, .gallery-box > em, .gallery-caption {
  display: block; text-align: center; color: var(--muted); font-size: 0.85rem; font-style: normal; margin: 0.8em 0 0;
}

/* Embeds. Videos fill the column at their own shape (main.js reads it from the width/height attributes);
   audio players keep the height they were given. */
.prose iframe { display: block; border: 0; max-width: 100%; margin-inline: auto; border-radius: var(--radius); }
.prose iframe[src*="youtube"], .prose iframe[src*="drive.google.com"], .prose iframe[src*="vimeo"], .prose iframe.is-video {
  width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000;
}
.prose iframe.is-video--portrait { width: min(100%, 380px); }
.prose iframe[src*="bandcamp"] { display: inline-block; min-width: min(100%, 260px); border-radius: 0; margin: 0 4px 8px 0; }
.prose iframe[src*="facebook.com/plugins"] { aspect-ratio: 1; max-width: 476px; }
.prose li iframe, .prose li .gallery-box, .prose li p:has(iframe) { margin-block: 1em 1.4em; }

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.gallery[columns="2"] { grid-template-columns: repeat(2, 1fr); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; cursor: zoom-in; transition: opacity 0.25s, transform 0.4s var(--ease); }
.gallery img:hover { opacity: 0.85; }

.prose table { width: 100%; border-collapse: collapse; margin: 2em 0; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--fire-hot); font-weight: 600; }
.prose code { background: var(--surface-2); padding: 0.15em 0.4em; border-radius: 5px; font-size: 0.9em; }
.prose pre { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; overflow-x: auto; font-size: 0.88rem; line-height: 1.55; }
.prose pre code { background: none; padding: 0; font-size: inherit; }

/* Components placed inside .prose keep their own spacing */
.prose .yt img { border-radius: 0; }

/* ---------- Lightweight YouTube ---------- */

.yt {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
  padding: 0; border: 0; cursor: pointer; background: #000; overflow: hidden; border-radius: var(--radius);
  color: var(--text); font: inherit; text-align: left;
}
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: 0.8; transition: transform 0.6s var(--ease), opacity 0.3s; }
.yt::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, rgba(0, 0, 0, 0.7), transparent 50%); }
.yt:hover img { transform: scale(1.04); opacity: 1; }
.yt__play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 1;
  display: grid; place-items: center; width: clamp(56px, 8vw, 88px); aspect-ratio: 1; border-radius: 50%;
  background: var(--fire-gradient); color: var(--on-fire); font-size: clamp(1.1rem, 2vw, 1.6rem);
  box-shadow: 0 0 0 0 rgba(255, 106, 26, 0.6); animation: pulse 2.4s infinite;
}
.yt__play i { margin-left: 0.15em; }
.yt__title { position: absolute; left: 18px; bottom: 14px; z-index: 1; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.5rem; letter-spacing: 0.02em; }
.yt iframe, iframe.yt-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Once playing, the wrapper only holds the YouTube player: no overlay, normal cursor */
.yt--playing { cursor: auto; }
.yt--playing::after { display: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 106, 26, 0.55); } 70% { box-shadow: 0 0 0 22px rgba(255, 106, 26, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 106, 26, 0); } }

/* ---------- Contact ---------- */

.contact-main { text-align: center; padding: clamp(16px, 4vw, 40px) 0 clamp(32px, 6vw, 64px); }
.contact-main__mail {
  display: inline-block; font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(1.5rem, 5.4vw, 4.4rem); line-height: 1; text-decoration: none; margin-bottom: 18px; word-break: break-word;
  background: var(--fire-gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.contact-main__phone { display: block; font-size: 1.2rem; font-weight: 600; color: var(--text); text-decoration: none; margin-bottom: 28px; }
.contact-main__phone:hover { color: var(--fire-hot); }
.contact-main .social { justify-content: center; }
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.contact-card {
  display: flex; flex-direction: column; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px);
  color: var(--text); text-decoration: none; transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}
.contact-card:hover { color: var(--text); transform: translateY(-4px); border-color: rgba(255, 106, 26, 0.6); box-shadow: 0 24px 60px -24px rgba(255, 90, 20, 0.45); }
.contact-card h2 { font-size: 2rem; margin: 0 0 0.5rem; }
.contact-card h2::before { display: none; }
.contact-card p { color: var(--muted); font-size: 0.98rem; margin: 0 0 1.2rem; }
.contact-card .text-link { margin-top: auto; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); background: #090807; }
.site-footer__inner {
  width: min(var(--wide), 100% - 2 * var(--gutter)); margin-inline: auto;
  display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 40px; align-items: start;
  padding-block: clamp(48px, 7vw, 80px);
}
.site-footer__brand p { color: var(--muted); margin: 14px 0 10px; max-width: 34ch; }
.site-footer__mail { color: var(--text); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.site-footer__nav { display: grid; grid-template-columns: repeat(2, auto); gap: 8px 32px; justify-content: start; }
.site-footer__nav a { color: var(--muted); text-decoration: none; }
.site-footer__nav a:hover { color: var(--fire-hot); }
.site-footer .social { max-width: 210px; }
.site-footer__bottom {
  width: min(var(--wide), 100% - 2 * var(--gutter)); margin-inline: auto;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 20px 0 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.82rem;
}
.site-footer__bottom a { color: var(--muted); }
@media (max-width: 860px) { .site-footer__inner { grid-template-columns: 1fr; } .site-footer .social { max-width: none; } }

/* ---------- Lightbox ---------- */

.lightbox {
  border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none;
  background: rgba(8, 6, 5, 0.94); color: var(--text);
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: calc(100vw - 2 * var(--gutter)); max-height: calc(100vh - 120px); object-fit: contain; border-radius: 8px; }
.lightbox button {
  position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: rgba(13, 11, 10, 0.6); color: var(--text); cursor: pointer; font-size: 1.1rem;
}
.lightbox button:hover { background: var(--fire); color: var(--on-fire); border-color: var(--fire); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 16px; top: 50%; translate: 0 -50%; }
.lightbox__count { position: absolute; bottom: 20px; left: 50%; translate: -50% 0; color: var(--muted); font-size: 0.85rem; letter-spacing: 0.1em; }

/* ---------- Reveal on scroll ---------- */

.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), border-color 0.35s, box-shadow 0.35s; }
.js .reveal.is-visible { opacity: 1; transform: none; }
/* Once shown, cards go back to their own quick hover movement */
.js .project-card.reveal.is-visible, .js .feature.reveal.is-visible { transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s, opacity 0.9s var(--ease); }
.js .project-card.reveal.is-visible:hover, .js a.feature.reveal.is-visible:hover { transform: translateY(-6px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
