/* ==========================================================================
   Personal canvas — dark ambient, floating glass cards
   ========================================================================== */

:root {
  --bg: #07070c;
  --text: #eceaf2;
  --muted: #8d8b9c;
  --faint: rgba(255, 255, 255, 0.08);

  --violet: #8b7bff;
  --amber: #ffb547;
  --teal: #3ee6c1;
  --lastfm: #ff4757;
  --stamps: #ff7a59;
  --rose: #ff6fae;
  --strava: #fc4c02;

  --radius: 22px;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.3, 1.6, 0.5, 1);

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

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

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

img { display: block; }

[hidden] { display: none !important; }

::selection { background: var(--violet); color: #fff; }


/* --------------------------------------------------------------------------
   Ambient background
   -------------------------------------------------------------------------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  animation: drift 30s ease-in-out infinite alternate;
  will-change: transform;
}

.blob-violet {
  width: 70vmax; height: 70vmax;
  top: -30vmax; left: -25vmax;
  background: radial-gradient(circle, rgba(139, 123, 255, 0.32), transparent 62%);
}

.blob-amber {
  width: 65vmax; height: 65vmax;
  bottom: -32vmax; right: -22vmax;
  background: radial-gradient(circle, rgba(255, 181, 71, 0.2), transparent 62%);
  animation-duration: 36s;
  animation-direction: alternate-reverse;
}

.blob-teal {
  width: 40vmax; height: 40vmax;
  top: 35%; left: 45%;
  background: radial-gradient(circle, rgba(62, 230, 193, 0.1), transparent 62%);
  animation-duration: 44s;
}

@keyframes drift {
  to { transform: translate3d(9vmax, 7vmax, 0) scale(1.12); }
}

.dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at center, #000 10%, transparent 80%);
          mask-image: radial-gradient(ellipse 70% 60% at center, #000 10%, transparent 80%);
}

.noise {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.spotlight {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(650px circle at var(--cx, 50%) var(--cy, 40%), rgba(139, 123, 255, 0.07), transparent 60%);
}


/* --------------------------------------------------------------------------
   Stage layout: [ cards ] [ hero ] [ cards ]
   -------------------------------------------------------------------------- */

.stage {
  min-height: 100vh;
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 56px) clamp(20px, 4vw, 64px) 80px;
  display: grid;
  grid-template-columns: minmax(270px, 1fr) minmax(0, 1.35fr) minmax(270px, 1fr);
  gap: clamp(16px, 3vw, 48px);
  align-items: center;
}

.col {
  display: flex;
  flex-direction: column;
  gap: clamp(22px, 4.5vh, 48px);
}

.col-right { align-items: flex-end; }

/* zig-zag so it feels scattered rather than stacked */
.col-left  .card:nth-child(2) { margin-left: clamp(0px, 5vw, 80px); }
.col-right .card:nth-child(2) { margin-right: clamp(0px, 5vw, 80px); }


/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  text-align: center;
  position: relative;
  z-index: 1;
  will-change: transform;
}

.hero-name {
  margin: 0.12em 0 0.18em;
  font-size: clamp(6.5rem, 15vw, 16rem);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.065em;
  white-space: nowrap;
  filter: drop-shadow(0 18px 60px rgba(139, 123, 255, 0.28));
  cursor: default;
  user-select: none;
}

.hero-letters .l {
  display: inline-block;
  background: linear-gradient(100deg, #fff 20%, #d5cdff 38%, #fff 50%, #ffd99a 64%, #fff 80%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: sheen 9s linear infinite;
  animation-delay: calc(var(--li) * 0.18s);
  transition: transform 0.6s var(--ease-spring);
  padding-right: 0.02em;
}

.hero-letters .l:hover {
  transform: translateY(-0.07em) rotate(calc(var(--tilt, -5) * 1deg));
}

@keyframes sheen {
  from { background-position: 150% 0; }
  to   { background-position: -150% 0; }
}

.hero-dot {
  color: var(--amber);
  text-shadow: 0 0 40px rgba(255, 181, 71, 0.6);
}

.hero-sub {
  margin: 0;
  min-height: 1.5em;
  font: 400 clamp(13px, 1.25vw, 17px)/1.5 var(--font-mono);
  color: var(--muted);
  letter-spacing: 0.02em;
}

.hero-sub .amp { color: var(--amber); }

.caret {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  margin-left: 3px;
  vertical-align: -0.2em;
  background: var(--violet);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }


/* --------------------------------------------------------------------------
   Gorinchem fortress behind the hero (stylized: 11 bastions, Linge, Merwede)
   -------------------------------------------------------------------------- */

.fortress {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: min(150%, 780px);
  translate: -50% -50%;
  pointer-events: none;
}

.fortress svg { display: block; width: 100%; height: auto; overflow: visible; }

.fortress .moat {
  fill: none;
  stroke: rgba(62, 230, 193, 0.07);
  stroke-width: 26;
  stroke-linejoin: round;
}

.fortress .land { fill: rgba(139, 123, 255, 0.05); }

.fortress .linge {
  fill: none;
  stroke: rgba(62, 230, 193, 0.14);
  stroke-width: 8;
  stroke-linecap: round;
}

.fortress .wall {
  fill: none;
  stroke: rgba(160, 148, 255, 0.55);
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  filter: drop-shadow(0 0 6px rgba(139, 123, 255, 0.7));
  animation: draw-walls 2.8s cubic-bezier(0.65, 0, 0.25, 1) 0.3s forwards;
}

@keyframes draw-walls { to { stroke-dashoffset: 0; } }

.fortress .water-name {
  font: italic 400 14px var(--font-mono);
  letter-spacing: 0.2em;
  fill: rgba(62, 230, 193, 0.4);
}

/* "Nick is here" annotation on the map, replaces the old status pill */
.marker {
  position: absolute;
  left: 42%;
  top: 27%;
  opacity: 0;
  animation: marker-in 0.6s ease-out 2.7s forwards;
}

@keyframes marker-in { to { opacity: 1; } }

.marker-dot {
  position: absolute;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(255, 181, 71, 0.18);
}

.marker-line {
  position: absolute;
  width: 30px;
  height: 1px;
  background: rgba(255, 181, 71, 0.5);
  transform-origin: 0 50%;
  rotate: -38deg;
}

.marker-label {
  position: absolute;
  left: 26px;
  bottom: 12px;
  margin: 0;
  text-align: left;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.3;
  color: #dcdae8;
}



/* --------------------------------------------------------------------------
   Cards (shared)
   outer .card   → parallax (JS transform) + entrance (translate)
   .card-inner   → float animation (transform) + hover (scale)
   -------------------------------------------------------------------------- */

.card {
  position: relative;
  z-index: 2; /* above the hero, so the fortress drawing passes behind cards */
  width: min(100%, 320px);
  opacity: 0;
  translate: 0 28px;
  transition: opacity 0.9s var(--ease-out), translate 0.9s var(--ease-out);
  transition-delay: calc(var(--i) * 90ms + 250ms);
  will-change: transform;
}

body.ready .card { opacity: 1; translate: 0 0; }

.card-inner {
  position: relative;
  display: block;
  padding: 18px 20px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--faint);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 24px 60px -24px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  animation: float var(--dur, 9s) ease-in-out infinite;
  animation-delay: calc(var(--i) * -1.7s);
  transition: scale 0.5s var(--ease-out), box-shadow 0.5s;
}

.card:nth-child(even) .card-inner { --dur: 11s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50%      { transform: translateY(-12px) rotate(calc(var(--r, 0deg) * -0.4)); }
}

.card:hover .card-inner {
  scale: 1.035;
  animation-play-state: paused;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 30px 80px -24px rgba(0, 0, 0, 0.9),
    0 0 60px -20px color-mix(in srgb, var(--accent) 50%, transparent);
}

/* cursor-following sheen */
.card-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.08), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

/* cursor-following glowing border */
.card-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), var(--accent), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.card:hover .card-inner::before,
.card:hover .card-inner::after { opacity: 1; }

.card-label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font: 500 13.5px/1.2 var(--font-display);
  color: var(--muted);
}

/* loading shimmer on text placeholders */
.is-loading [data-bind$="-title"],
.is-loading [data-bind$="-name"],
.is-loading [data-bind$="-artist"],
.is-loading [data-bind$="-brewery"] {
  color: transparent;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.12), rgba(255,255,255,.05));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer { to { background-position: -200% 0; } }


/* --------------------------------------------------------------------------
   Card 1: Profile
   -------------------------------------------------------------------------- */

.card-profile .card-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 22px 16px 16px;
}

.avatar {
  position: relative;
  width: 76px; height: 76px;
  flex: none;
}

.avatar img,
.avatar-fallback {
  position: absolute;
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  border-radius: 50%;
  object-fit: cover;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.35), transparent 50%),
    linear-gradient(135deg, var(--violet), #4d3cc9 55%, var(--amber));
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.avatar img:not([hidden]) + .avatar-fallback { display: none; }

.avatar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--violet), var(--teal), var(--amber), var(--violet));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
  animation: spin 8s linear infinite;
}

@keyframes spin { to { transform: rotate(1turn); } }

.profile-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.profile-life {
  margin: -3px 0 9px;
  font-size: 13.5px;
  color: #cfcde0;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--faint);
  font: 500 11.5px/1 var(--font-mono);
  color: #cfcde0;
  white-space: nowrap;
}


/* --------------------------------------------------------------------------
   Card 2: Work
   -------------------------------------------------------------------------- */

.work-role {
  position: relative;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.work-role .at {
  color: var(--muted);
  font-weight: 400;
  margin: 0 2px;
}

.work-company {
  background: linear-gradient(90deg, var(--stamps), var(--amber));
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

.work-url {
  position: relative;
  margin-top: 10px;
  font: 400 12px/1 var(--font-mono);
  color: var(--muted);
}

.work-url .arrow {
  display: inline-block;
  transition: transform 0.4s var(--ease-spring);
}

.work-url { display: inline-block; }
.work-url:hover .arrow { transform: translate(3px, -3px); color: var(--text); }

.panel-open {
  position: relative;
  display: table;
  margin-top: 14px;
  padding: 8px 14px 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1;
  color: var(--text);
  cursor: pointer;
  transition: background 0.3s, transform 0.4s var(--ease-spring);
}

.panel-open:hover { background: color-mix(in srgb, var(--accent) 26%, transparent); transform: translateY(-1px); }
.panel-open:focus-visible,
.work-url:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }


/* --------------------------------------------------------------------------
   Card 3: Music
   -------------------------------------------------------------------------- */

.card-music { width: min(100%, 350px); }

.music {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}

.cover-wrap {
  position: relative;
  width: 78px; height: 78px;
  flex: none;
}

.cover {
  position: relative;
  z-index: 1;
  width: 100%; height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #2a2440, #151320);
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.8);
}

.cover img { width: 100%; height: 100%; object-fit: cover; }

.cover-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 30px;
  color: rgba(255, 255, 255, 0.4);
}

.cover img:not([hidden]) + .cover-fallback { display: none; }

.vinyl {
  position: absolute;
  top: 4px; left: 4px;
  width: 70px; height: 70px;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--lastfm) 0 5px, #111 6px 10px, transparent 11px),
    repeating-radial-gradient(circle, #151515 0 1px, #1f1f1f 1px 3px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: transform 0.8s var(--ease-out);
}

.card-music.is-playing .vinyl {
  transform: translateX(30px);
  animation: spin 2.4s linear infinite;
}

.card-music.is-playing .music-meta { padding-left: 26px; }

.music-meta {
  min-width: 0;
  flex: 1;
  transition: padding 0.8s var(--ease-out);
}

.music-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-artist {
  margin-top: 4px;
  font-size: 14px;
  color: #cfcde0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-album {
  margin-top: 6px;
  font: 400 11px/1.3 var(--font-mono);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eq {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  margin-left: auto;
}

.eq i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--lastfm);
  transform-origin: bottom;
  animation: eq 0.9s ease-in-out infinite alternate;
}

.eq i:nth-child(2) { animation-duration: 0.7s; animation-delay: -0.3s; }
.eq i:nth-child(3) { animation-duration: 1.1s; animation-delay: -0.5s; }
.eq i:nth-child(4) { animation-duration: 0.8s; animation-delay: -0.1s; }

@keyframes eq {
  from { transform: scaleY(0.2); }
  to   { transform: scaleY(1); }
}

.card-music.is-playing .eq { display: flex; }


/* --------------------------------------------------------------------------
   Card 4: Beer
   -------------------------------------------------------------------------- */

.card-beer { width: min(100%, 350px); }

.card-beer .card-inner {
  background:
    linear-gradient(180deg, rgba(255, 181, 71, 0.07), rgba(255, 181, 71, 0) 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02));
}

.beer-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.12;
  -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000);
          mask-image: linear-gradient(90deg, transparent 20%, #000);
  pointer-events: none;
}

.bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bubbles i {
  position: absolute;
  bottom: -10px;
  left: var(--x);
  width: var(--s); height: var(--s);
  border-radius: 50%;
  border: 1px solid rgba(255, 181, 71, 0.45);
  background: rgba(255, 181, 71, 0.08);
  animation: rise var(--d) ease-in infinite;
  animation-delay: var(--delay);
}

.bubbles i:nth-child(1) { --x: 12%; --s: 6px;  --d: 6s;   --delay: 0s; }
.bubbles i:nth-child(2) { --x: 28%; --s: 4px;  --d: 7.5s; --delay: -2s; }
.bubbles i:nth-child(3) { --x: 47%; --s: 8px;  --d: 9s;   --delay: -4s; }
.bubbles i:nth-child(4) { --x: 63%; --s: 5px;  --d: 6.5s; --delay: -1s; }
.bubbles i:nth-child(5) { --x: 78%; --s: 7px;  --d: 8s;   --delay: -5s; }
.bubbles i:nth-child(6) { --x: 90%; --s: 4px;  --d: 5.5s; --delay: -3s; }
.bubbles i:nth-child(7) { --x: 38%; --s: 3px;  --d: 7s;   --delay: -6s; }

@keyframes rise {
  0%   { transform: translate(0, 0); opacity: 0; }
  15%  { opacity: 1; }
  50%  { transform: translate(6px, -120px); }
  100% { transform: translate(-4px, -260px); opacity: 0; }
}

.label-time {
  margin-left: auto;
  font-weight: 400;
}

.beer {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}

.beer-label {
  position: relative;
  width: 78px; height: 78px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 35% 30%, #ffd27a, #e08a14 60%, #8a4a06);
  box-shadow: 0 10px 30px -8px rgba(224, 138, 20, 0.5), inset 0 0 0 2px rgba(255, 255, 255, 0.15);
  transition: transform 0.6s var(--ease-spring);
}

.card-beer:hover .beer-label { transform: rotate(-8deg) scale(1.05); }

.beer-label img { width: 100%; height: 100%; object-fit: cover; }

.beer-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 34px;
}

.beer-label img:not([hidden]) + .beer-fallback { display: none; }

.beer-meta { min-width: 0; flex: 1; }

.beer-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.beer-brewery {
  margin-top: 4px;
  font-size: 14px;
  color: #cfcde0;
}

.caps-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.caps {
  position: relative;
  display: inline-block;
  height: 16px;
}

.caps-layer {
  display: flex;
  gap: 3px;
  white-space: nowrap;
}

.caps-layer svg { width: 16px; height: 16px; flex: none; }

.caps-bg svg polygon { fill: rgba(255, 255, 255, 0.1); }
.caps-bg svg circle  { stroke: rgba(255, 255, 255, 0.12); }

.caps-fg {
  position: absolute;
  inset: 0 auto 0 0;
  overflow: hidden;
  width: 0;
  transition: width 1.4s var(--ease-out) 0.6s;
}

.caps-fg svg polygon { fill: var(--amber); }
.caps-fg svg circle  { stroke: rgba(0, 0, 0, 0.25); }

.caps svg circle { fill: none; stroke-width: 1.2; }

.caps-value {
  font: 700 12px/1 var(--font-mono);
  color: var(--amber);
}

.beer-comment {
  position: relative;
  margin: 14px 0 0;
  padding: 10px 12px;
  border-left: 2px solid var(--amber);
  border-radius: 0 10px 10px 0;
  background: rgba(255, 181, 71, 0.06);
  font-size: 13.5px;
  line-height: 1.45;
  font-style: italic;
  color: #dcd9ea;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* --------------------------------------------------------------------------
   Card 5: Previous job
   -------------------------------------------------------------------------- */

/* deliberately quieter than the current-job card: smaller, softer, one meta line.
   YourSurprise pink comes back as a solid name colour and a faint top wash. */
.card-previous .card-inner {
  background:
    linear-gradient(180deg, rgba(255, 111, 174, 0.07), rgba(255, 111, 174, 0) 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02));
}

.previous-company {
  position: relative;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--rose);
}

.previous-meta {
  position: relative;
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--muted);
}

.card-previous:hover .arrow { transform: translate(3px, -3px); color: var(--text); }


/* --------------------------------------------------------------------------
   Card 6: Strava (route as a line, no map)
   -------------------------------------------------------------------------- */

.strava {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}

.route {
  width: 78px;
  height: 78px;
  flex: none;
  overflow: visible;
}

.route-line {
  fill: none;
  stroke: var(--strava);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 4px rgba(252, 76, 2, 0.65));
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.route-line.is-drawn {
  animation: draw-walls 2s cubic-bezier(0.65, 0, 0.25, 1) 0.4s forwards;
}

.strava-meta { min-width: 0; flex: 1; }

.strava-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.strava-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.strava-stats b {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.is-loading [data-bind="strava-name"] {
  color: transparent;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.12), rgba(255,255,255,.05));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}


.socials {
  position: relative;
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.socials a,
.socials button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--faint);
  background: rgba(255, 255, 255, 0.04);
  color: #cfcde0;
  cursor: pointer;
  transition: transform 0.4s var(--ease-spring), color 0.3s, border-color 0.3s, background 0.3s;
}

.socials a:hover,
.socials button:hover {
  transform: translateY(-2px);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.socials a:focus-visible,
.socials button:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

.socials svg {
  width: 16px; height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}


/* --------------------------------------------------------------------------
   Panels: a card grows into a dialog ("Why I moved to Stamps", "Recently played").
   --accent comes from the card that opened it
   -------------------------------------------------------------------------- */

html:has(.panel[open]) { overflow: hidden; }

.panel {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 16px;
  border: 0;
  background: transparent;
  color: var(--text);
}

.panel[open] { display: grid; place-items: center; }

.panel::backdrop {
  background: rgba(5, 5, 10, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.panel-sheet {
  position: relative;
  width: min(640px, 100%);
  max-height: min(86vh, 800px);
  overflow-y: auto;
  padding: 34px 38px 38px;
  border-radius: 26px;
  border: 1px solid var(--faint);
  background: linear-gradient(180deg, rgba(32, 29, 46, 0.96), rgba(15, 14, 22, 0.97));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 40px 120px -30px rgba(0, 0, 0, 0.9),
    0 0 90px -30px color-mix(in srgb, var(--accent, var(--stamps)) 45%, transparent);
  overscroll-behavior: contain;
  outline: none;
}

.panel:focus { outline: none; }

.panel-title {
  margin: 0 48px 22px 0;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.panel-body { max-width: 60ch; }

.panel-body p {
  margin: 0 0 1.05em;
  font-size: 17px;
  line-height: 1.7;
  color: #dcdae8;
}

.panel-body ul {
  margin: 0 0 1.3em;
  padding: 0;
  list-style: none;
}

.panel-body ul > li {
  position: relative;
  margin-bottom: 0.65em;
  padding-left: 22px;
  font-size: 17px;
  line-height: 1.6;
  color: #dcdae8;
}

.panel-body ul > li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.68em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent, var(--stamps));
}

.panel-body > :last-child { margin-bottom: 0; }

.panel-close {
  position: absolute;
  top: 22px;
  right: 22px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--faint);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  transition: background 0.3s;
}

.panel-close:hover { background: rgba(255, 255, 255, 0.12); }
.panel-close:focus-visible { outline: 2px solid var(--accent, var(--stamps)); outline-offset: 2px; }

.panel-close svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

/* Recently played list */
.tracks {
  margin: 0;
  padding: 0;
  list-style: none;
}

.track {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.track:first-child { border-top: 0; padding-top: 0; }

.track-cover {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 7px;
  overflow: hidden;
  background: linear-gradient(135deg, #2a2440, #151320);
}

.track-cover img { width: 100%; height: 100%; object-fit: cover; }

.track-cover:empty {
  display: grid;
  place-items: center;
}

.track-cover:empty::after {
  content: "♪";
  font-size: 18px;
  color: rgba(255, 255, 255, 0.35);
}

.track-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.track-title,
.track-artist {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

a.track-title:hover { text-decoration: underline; text-underline-offset: 3px; }

.track-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.track-artist {
  min-width: 0;
  font-size: 13.5px;
  color: var(--muted);
}

.track-genre {
  flex: none;
  padding: 2px 8px 3px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent, var(--lastfm)) 30%, transparent);
  background: color-mix(in srgb, var(--accent, var(--lastfm)) 8%, transparent);
  font-size: 11.5px;
  line-height: 1.2;
  color: #cfcde0;
}

.track-time {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

.track.is-now .track-time { color: var(--lastfm); font-weight: 600; }

.panel-more { margin: 18px 0 0; font-size: 14px; }

.panel-more a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent, var(--stamps)) 60%, transparent);
  text-underline-offset: 3px;
}

@media (max-width: 620px) {
  .panel-sheet { padding: 26px 22px 28px; border-radius: 22px; }
  .panel-close { top: 16px; right: 16px; }
}


/* --------------------------------------------------------------------------
   Footer + toast
   -------------------------------------------------------------------------- */

.foot {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 5;
}

.sync {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 64px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font: 500 13px/1 var(--font-mono);
  opacity: 0;
  transform: translate(-50%, 10px) scale(0.96);
  transition: opacity 0.3s, transform 0.4s var(--ease-spring);
  pointer-events: none;
}

.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }


/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .stage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 760px;
    align-items: start;
    align-content: start;
  }

  .col { display: contents; }

  .hero {
    grid-column: 1 / -1;
    order: -1;
    padding: 9vh 0 5vh;
  }

  .fortress { width: min(100%, 540px); }
  .fortress .river,
  .fortress .water-name { display: none; }

  .card,
  .card-music,
  .card-beer {
    width: 100%;
    margin: 0 !important;
  }

  .card-inner { height: 100%; }

  /* fixed reading order on tablet: profile, current job, previous job, music, beer, strava */
  .card-profile  { order: 1; }
  .card-work     { order: 2; }
  .card-previous { order: 3; }
  .card-music    { order: 4; }
  .card-beer     { order: 5; }
  .card-strava   { order: 6; }
}

@media (max-width: 620px) {
  .stage { grid-template-columns: minmax(0, 1fr); padding-bottom: 90px; }
  .hero { padding: 14vh 0 6vh; }
  .card-inner { --r: 0deg !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
