/* Cards: the text panels at each camera stop.
   Without WebGL they sit in normal page flow; in "immersive" mode they float over the room. */

main { position: relative; z-index: 2; }
.stop { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding-block: 96px; }

.card {
  width: min(360px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 22px 24px; display: flex; flex-direction: column; gap: 12px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.card .step { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.card h1, .card h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1.1; }
.card p { margin: 0; color: #C9CEDA; font-size: 15px; }

/* About me: label/value list */
.specs { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }

/* Toolbox: groups of skill tags */
.tool-group { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.tool-group .label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: 13px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: #DDE1EA; }

/* Projects: list of buttons that open a project on the monitor */
.proj { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.proj li { border-bottom: 1px solid var(--line); }
.proj button {
  font: inherit; width: 100%; background: none; border: 0; color: var(--fg); cursor: pointer; text-align: left;
  display: grid; grid-template-columns: 1fr auto auto; align-items: baseline; gap: 12px; padding: 10px 0; min-height: 44px;
}
.proj button:hover { color: var(--accent); }
.proj button span:nth-child(2) { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.proj button span:last-child { color: var(--accent); transition: transform .2s; }
.proj button:hover span:last-child { transform: translateX(3px); }

/* Intro and contact: bigger "hero" cards */
.card.hero { width: min(460px, 100%); padding: 32px; gap: 18px; }
.card.hero h1, .card.hero h2 { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; }
.card.hero h1 em, .card.hero h2 em { font-style: normal; color: var(--accent); }
.card.hero p { font-size: 17px; color: #C9CEDA; }
.card .credits { font-size: 12px; color: var(--muted); line-height: 1.5; border-top: 1px solid var(--line); padding-top: 12px; }
.card .credits a { color: var(--muted); text-decoration: underline; }
.links { display: flex; flex-wrap: wrap; gap: 20px; font-size: 15px; }
.mail { font-family: var(--display); font-weight: 700; font-size: clamp(20px, 2.4vw, 28px); overflow-wrap: anywhere; }
.btn { font: inherit; font-size: 15px; color: var(--fg); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; cursor: pointer; align-self: flex-start; min-height: 44px; }
.btn:hover { border-color: var(--muted); }

/* Immersive mode: cards float over the room and fade in at their stop (js/ui/tour.js positions them) */
body.immersive .card {
  position: fixed; left: 0; top: 0; z-index: 4; will-change: transform;
  opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s linear .45s;
}
body.immersive .card.on { opacity: 1; visibility: visible; transition: opacity .45s ease; }

/* Floating cards always fit on screen: 16px margin on each side, and never taller than the window
   (below the top bar). A card that is still too tall scrolls inside itself. */
body.immersive .card { width: min(360px, calc(100vw - 32px)); max-height: calc(100vh - 110px); max-height: calc(100svh - 110px); overflow-y: auto; }
body.immersive .card.hero { width: min(460px, calc(100vw - 32px)); }

/* Phones: tighter spacing and slightly smaller type */
@media (max-width: 720px) {
  .card { padding: 18px; gap: 10px; border-radius: 16px; }
  .card h2 { font-size: 22px; }
  .card p { font-size: 14px; }
  .card.hero { padding: 22px; gap: 14px; }
  .card.hero h1, .card.hero h2 { font-size: 34px; }
  .card.hero p { font-size: 15px; }
  .tags span { font-size: 12px; padding: 3px 9px; }
  .links a { display: inline-block; padding: 8px 0; } /* easier to tap */
}
@media (prefers-reduced-motion: reduce) {
  body.immersive .card, body.immersive .card.on { transition: none; }
}
