/* ===========================================================================
 * marijenburg.com — site chrome + desk/work/about views.
 * The RESUME view ships with the ORIGINAL infographic CSS (scoped under
 * .resume-page, injected separately and preserved verbatim incl. @media print).
 * Palette + fonts reused verbatim from that resume.
 * ========================================================================= */

:root {
  --bg: #0f1518;
  --bg2: #121b1e;
  --panel: #16211f;
  --panel2: #182725;
  --ink: #eaf0ec;
  --soft: #9fb3aa;
  --muted: #6f827a;
  --line: rgba(255,255,255,0.08);
  --line2: rgba(255,255,255,0.14);
  --green: #5fd47e;
  --green-dim: rgba(95,212,126,0.16);
  --amber: #e3a94f;
  --amber-dim: rgba(227,169,79,0.15);
}

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

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(1100px 520px at 82% -12%, rgba(95,212,126,0.06), transparent 60%),
    radial-gradient(820px 460px at -6% 112%, rgba(227,169,79,0.045), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: 'Inter', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
.mono { font-family: 'JetBrains Mono', 'Courier New', monospace; }
a { color: inherit; text-decoration: none; }

/* ---------------------------------------------------------------- chrome */
.tabbar {
  position: fixed; top: 14px; left: 14px; z-index: 60;
  display: flex; align-items: center; gap: 2px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.74rem;
  background: rgba(15,21,24,0.82);
  border: 1px solid var(--line); border-radius: 11px;
  padding: 5px 6px; backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.tabbar a {
  color: var(--muted); padding: 5px 9px; border-radius: 7px;
  transition: color 0.18s ease, background 0.18s ease;
}
.tabbar a:hover { color: var(--ink); }
.tabbar a.on { color: var(--green); background: var(--green-dim); }
.tabbar .sep { color: var(--line2); padding: 0 1px; user-select: none; }

.lang-pill {
  position: fixed; top: 14px; right: 14px; z-index: 60;
  display: flex; align-items: center;
  font-family: 'JetBrains Mono', monospace; font-size: 0.7rem;
  background: rgba(15,21,24,0.82);
  border: 1px solid var(--line); border-radius: 11px;
  padding: 4px; backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.lang-pill button {
  font-family: inherit; font-size: inherit;
  color: var(--muted); background: none; border: none; cursor: pointer;
  padding: 4px 8px; border-radius: 7px;
  transition: color 0.18s ease, background 0.18s ease;
}
.lang-pill button:hover { color: var(--ink); }
.lang-pill button.on { color: var(--green); background: var(--green-dim); }

/* ----------------------------------------------------------------- views */
.view { display: none; }
.view.active { display: block; }

/* public domain (marijenburg.com): resume only, no site chrome.
   tabbar + lang-pill are position:fixed, so hiding them shifts nothing;
   trim the resume's top padding since it no longer clears the nav. */
.public-resume .tabbar,
.public-resume .lang-pill { display: none !important; }
.public-resume #resume .wrap { padding-top: 24px; }

.wrap {
  max-width: 880px; margin: 0 auto;
  padding: 78px 20px 56px;
}

/* section label, reused from resume */
.lab {
  display: flex; align-items: center; gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}
.lab::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.lab .sq { width: 7px; height: 7px; background: var(--green); border-radius: 2px; }

.view-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em;
}
.view-lead {
  color: var(--soft); font-size: 0.95rem; line-height: 1.6;
  margin-top: 8px; max-width: 60ch;
}

/* ================================================================== DESK */
#desk .wrap { max-width: 1040px; padding-top: 70px; }
.desk-head { text-align: center; margin-bottom: 22px; }
.desk-head .view-lead { margin: 8px auto 0; }
.desk-hint {
  font-family: 'JetBrains Mono', monospace; font-size: 0.72rem;
  color: var(--muted); margin-top: 10px;
}
.desk-hint .tap { display: none; }

.desk-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 70vh;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  /* dark wood-ish desk under a warm lamp pool, top-down */
  background:
    radial-gradient(620px 460px at 50% 30%, rgba(227,169,79,0.16), rgba(227,169,79,0.04) 46%, transparent 70%),
    radial-gradient(420px 320px at 50% 26%, rgba(255,221,150,0.10), transparent 60%),
    linear-gradient(180deg, #141b1c 0%, #0d1213 100%);
  box-shadow: inset 0 0 120px rgba(0,0,0,0.55), 0 20px 60px rgba(0,0,0,0.5);
  transition: filter 0.5s ease, background 0.5s ease;
}
/* intro fade-in to lamp-lit */
.desk-scene.intro { animation: deskIntro 0.9s ease both; }
@keyframes deskIntro {
  from { filter: brightness(0.25); }
  to   { filter: brightness(1); }
}
/* lamp off = dim the scene */
.desk-scene.lights-off {
  filter: brightness(0.42) saturate(0.7);
  background:
    radial-gradient(300px 220px at 50% 28%, rgba(120,140,150,0.08), transparent 60%),
    linear-gradient(180deg, #0f1415 0%, #0a0e0f 100%);
}

/* cursor-follow radial light (desktop only; JS toggles opacity) */
.cursor-light {
  position: absolute; top: 0; left: 0; width: 360px; height: 360px;
  margin: 0; pointer-events: none; opacity: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,225,160,0.12), transparent 62%);
  transition: opacity 0.25s ease;
  will-change: transform, opacity;
  mix-blend-mode: screen;
}
.desk-scene.lights-off .cursor-light { display: none; }

/* desk objects (placeholder SVG/CSS art until Charlie's hand-drawn sprites) */
.desk-obj {
  position: absolute;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  background: none; border: none; cursor: pointer; padding: 0;
  color: var(--ink);
  transition: transform 0.2s ease, filter 0.2s ease;
}
.desk-obj .sprite {
  width: 92px; height: 92px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg2) 100%);
  border: 1px solid var(--line2);
  box-shadow: 0 10px 24px rgba(0,0,0,0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.desk-obj .sprite svg { width: 48px; height: 48px; color: var(--soft); transition: color 0.2s ease; }
.desk-obj .obj-label {
  font-family: 'JetBrains Mono', monospace; font-size: 0.72rem;
  color: var(--soft);
  opacity: 0; transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  background: rgba(15,21,24,0.7); padding: 2px 8px; border-radius: 6px;
}
/* hover: lift + green glow + label (reuses resume card hover language) */
.desk-obj:hover, .desk-obj:focus-visible { outline: none; transform: translateY(-4px); }
.desk-obj:hover .sprite, .desk-obj:focus-visible .sprite {
  border-color: rgba(95,212,126,0.55);
  box-shadow: 0 14px 30px rgba(0,0,0,0.45), 0 0 0 1px rgba(95,212,126,0.35), 0 0 24px rgba(95,212,126,0.18);
}
.desk-obj:hover .sprite svg, .desk-obj:focus-visible .sprite svg { color: var(--green); }
.desk-obj:hover .obj-label, .desk-obj:focus-visible .obj-label { opacity: 1; transform: translateY(0); }

/* placement of the 6 objects + note (percentages, scale with the scene) */
.o-resume  { top: 30%; left: 17%; }
.o-work    { top: 27%; left: 43%; }
.o-about   { top: 31%; left: 70%; }
.o-contact { top: 62%; left: 28%; }
.o-coach   { top: 60%; left: 58%; }
.o-lamp    { top: 7%;  left: 47%; }
.o-note    { top: 64%; left: 80%; }

/* lamp: smaller, glows when on */
.o-lamp .sprite { width: 72px; height: 72px; }
.o-lamp .sprite svg { color: var(--amber); }
.desk-scene:not(.lights-off) .o-lamp .sprite {
  box-shadow: 0 0 0 1px rgba(227,169,79,0.4), 0 0 30px rgba(227,169,79,0.35);
}

/* sticky note easter egg (flip) */
.desk-note {
  position: absolute; cursor: pointer; background: none; border: none; padding: 0;
  width: 88px; height: 88px;
  perspective: 600px;
}
.desk-note .note-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform 0.5s ease; transform-style: preserve-3d;
}
.desk-note.flipped .note-inner { transform: rotateY(180deg); }
.desk-note .face {
  position: absolute; inset: 0; backface-visibility: hidden;
  border-radius: 6px; padding: 9px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: #d9c87a; color: #2a2410;
  box-shadow: 0 8px 20px rgba(0,0,0,0.45);
  transform: rotate(-5deg);
}
.desk-note .face.back {
  transform: rotateY(180deg) rotate(-5deg);
  background: #cdbd6e;
  font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; line-height: 1.4;
}
.desk-note .face.front { font-family: 'JetBrains Mono', monospace; font-size: 1.5rem; }

/* desk inspect overlay — position:fixed, full viewport, never absolute */
.desk-inspect {
  position: fixed; inset: 0; z-index: 80;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.desk-inspect.open { display: flex; }
.di-backdrop {
  position: absolute; inset: 0; background: rgba(6,10,11,0.78);
  backdrop-filter: blur(3px);
}
.di-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 380px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg2) 100%);
  border: 1px solid var(--line2); border-top: 2px solid var(--green);
  border-radius: 16px; padding: 22px 22px 20px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.6);
  animation: diPop 0.22s ease both;
}
@keyframes diPop {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
.di-title { font-family: 'JetBrains Mono', monospace; font-size: 1.25rem; font-weight: 800; }
.di-desc { color: var(--soft); font-size: 0.86rem; line-height: 1.55; margin-top: 8px; }
.di-actions { display: flex; gap: 10px; margin-top: 18px; }
.btn {
  font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; font-weight: 500;
  border-radius: 9px; padding: 9px 14px; cursor: pointer;
  border: 1px solid var(--line2); background: var(--panel2); color: var(--ink);
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.btn:hover { border-color: var(--line2); color: #fff; }
.btn.primary {
  color: var(--green); background: var(--green-dim);
  border-color: rgba(95,212,126,0.4);
}
.btn.primary:hover { border-color: rgba(95,212,126,0.7); color: #cdf6d8; }

/* ================================================================== WORK */
.heroes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 14px; }
.minis { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

.w-card {
  position: relative; overflow: hidden; height: 100%;
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg2) 100%);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 17px 40px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.w-card.hero { border-top: 2px solid var(--green); }
a.card-link { display: block; height: 100%; color: inherit; }
a.card-link:hover .w-card {
  transform: translateY(-4px);
  border-color: rgba(95,212,126,0.55);
  box-shadow: 0 10px 28px rgba(0,0,0,0.4), 0 0 0 1px rgba(95,212,126,0.35);
}
.w-card .glyph { position: absolute; top: 13px; right: 13px; width: 30px; height: 30px; color: var(--green); opacity: 0.85; }
.w-card h3 { font-family: 'JetBrains Mono', monospace; font-size: 1.16rem; font-weight: 800; }
.w-card .genre { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--muted); margin-top: 3px; }
.w-card .roles { font-size: 0.74rem; color: var(--soft); margin-top: 9px; line-height: 1.5; }
.w-card .desc { font-size: 0.78rem; color: var(--ink); line-height: 1.5; margin-top: 8px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.tag {
  font-family: 'JetBrains Mono', monospace; font-size: 0.66rem; font-weight: 500;
  padding: 3px 8px; border-radius: 6px; white-space: nowrap;
}
.tag.ev { color: var(--amber); background: var(--amber-dim); border: 1px solid rgba(227,169,79,0.28); }
.tag.st { color: var(--green); background: var(--green-dim); border: 1px solid rgba(95,212,126,0.26); }

.view-link {
  position: absolute; bottom: 12px; right: 14px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.66rem;
  color: var(--green); opacity: 0; transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease; pointer-events: none;
}
a.card-link:hover .view-link { opacity: 1; transform: translateY(0); }

.w-mini {
  position: relative; height: 100%;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 11px;
  padding: 12px 13px 26px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.w-mini .top { display: flex; align-items: center; gap: 9px; }
.w-mini .gi { width: 20px; height: 20px; color: var(--green); flex-shrink: 0; }
.w-mini h4 { font-family: 'JetBrains Mono', monospace; font-size: 0.84rem; font-weight: 700; }
.w-mini .genre { font-family: 'JetBrains Mono', monospace; font-size: 0.62rem; color: var(--muted); margin-top: 6px; }
.w-mini p { font-size: 0.72rem; color: var(--soft); line-height: 1.45; margin-top: 6px; }
/* clickable mini (e.g. 11 PM -> 11pm.dev): lift like the hero cards */
a.card-link:hover .w-mini {
  transform: translateY(-4px);
  border-color: rgba(95,212,126,0.55);
  box-shadow: 0 10px 28px rgba(0,0,0,0.4), 0 0 0 1px rgba(95,212,126,0.35);
}
.soon {
  position: absolute; bottom: 10px; right: 12px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; font-weight: 500;
  color: var(--amber); background: var(--amber-dim);
  border: 1px solid rgba(227,169,79,0.3); padding: 2px 7px; border-radius: 6px;
}
/* "In Testing" — playable now, green (vs amber "soon") */
.testing {
  position: absolute; bottom: 10px; right: 12px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; font-weight: 600;
  color: var(--green); background: var(--green-dim);
  border: 1px solid rgba(95,212,126,0.35); padding: 2px 7px; border-radius: 6px;
}
.work-more { margin-top: 22px; }
.work-more a {
  font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: var(--green);
  border: 1px solid rgba(95,212,126,0.3); background: var(--green-dim);
  padding: 8px 13px; border-radius: 9px; display: inline-block;
  transition: border-color 0.18s ease;
}
.work-more a:hover { border-color: rgba(95,212,126,0.7); }

/* ================================================================= ABOUT */
.about-prose { max-width: 64ch; }
.about-prose p { font-size: 0.95rem; line-height: 1.65; color: var(--ink); margin-top: 14px; }
.about-prose p:first-child { margin-top: 0; }

.block {
  margin-top: 26px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 18px;
}
.block .h {
  font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: 8px;
}
.block.ai { border-top: 2px solid var(--green); }
.block.ai .h { color: var(--green); }
.block.coach { border-top: 2px solid var(--amber); }
.block.coach .h { color: var(--amber); }
.block p { font-size: 0.88rem; line-height: 1.6; color: var(--soft); }
.block p b { color: var(--ink); font-weight: 600; }

.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; margin-top: 26px; }
.langs-block { font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; color: var(--soft); line-height: 2; }
.langs-block .h { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber); margin-bottom: 8px; }

.contact-block { margin-top: 26px; }
.contact-list {
  font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; line-height: 2;
  color: var(--soft);
}
.contact-list a { color: var(--soft); }
.contact-list a:hover { color: var(--green); }
.contact-list .ic { color: var(--green); margin-right: 8px; display: inline-block; width: 1.1em; }

.open-line {
  margin-top: 20px; font-family: 'JetBrains Mono', monospace; font-size: 0.82rem;
  color: var(--ink); display: flex; align-items: center; gap: 9px;
}
.open-line .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }

/* ================================================================ RESUME */
/* The infographic CSS is injected separately, scoped under .resume-page.
   Here we only handle the SPA frame + the FR/NL "CV is in English" note. */
#resume .wrap { max-width: 920px; padding-top: 66px; }
.resume-note {
  font-family: 'JetBrains Mono', monospace; font-size: 0.74rem;
  color: var(--amber); background: var(--amber-dim);
  border: 1px solid rgba(227,169,79,0.28); border-radius: 8px;
  padding: 7px 12px; margin-bottom: 16px; display: inline-block;
}

/* ----------------------------------------------------------- scroll-reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* --------------------------------------------------------------- responsive */
@media (max-width: 720px) {
  .wrap { padding: 70px 14px 48px; }
  .view-title { font-size: 1.4rem; }
  .heroes, .about-grid { grid-template-columns: 1fr; }
  .minis { grid-template-columns: 1fr; }
  .desk-head .view-lead { font-size: 0.9rem; }
  .desk-hint .hover { display: none; }
  .desk-hint .tap { display: inline; }
  .desk-obj .sprite { width: 74px; height: 74px; }
  .desk-obj .sprite svg { width: 38px; height: 38px; }
  .o-lamp .sprite { width: 58px; height: 58px; }
  .desk-obj .obj-label { opacity: 1; transform: none; } /* labels always visible on touch */
  .desk-note { width: 70px; height: 70px; }
}
@media (max-width: 440px) {
  .tabbar { font-size: 0.68rem; }
  .lang-pill { font-size: 0.66rem; }
  .view-title { font-size: 1.25rem; }
}

/* ------------------------------------------------------------------ print */
/* Printing happens from the Resume view (the application link / PDF target).
   Hide site chrome and the language note so the infographic prints clean;
   the resume's own @media print stylesheet does the rest. Other views are
   display:none already, so they won't print. */
@media print {
  .tabbar, .lang-pill, .resume-note { display: none !important; }
  #resume .wrap { padding: 0; max-width: none; }
  body { background: none; }
}

/* ------------------------------------------------ prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .desk-scene, .desk-scene.intro { animation: none; transition: none; }
  .desk-obj, .desk-obj .sprite, .desk-obj:hover, .desk-obj:hover .sprite,
  .di-card, .desk-note .note-inner, .w-card, a.card-link:hover .w-card {
    transition: none; transform: none; animation: none;
  }
  .desk-obj .obj-label { opacity: 1; transform: none; }
  .cursor-light { display: none; }
}
