/* Hero */
.hero {
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 100px 40px 90px;
}
.hero-head {
  margin: 0;
  font-size: clamp(64px, 10.4vw, 160px);
}
.hero-sub {
  margin: 34px 0 0;
  max-width: 720px;
  font-size: 17px;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 500;
  line-height: 1.3;
}
.hero-head.reveal { transition-delay: 0ms; }
.hero-sub.reveal { transition-delay: 120ms; }
.hero-foot {
  position: absolute;
  left: 40px;
  right: 40px;
  bottom: 28px;
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.hero-foot b { font-weight: 700; }

/* Stack of project cards */
.stack { position: relative; }
.card {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: block;
  background: var(--ground);
  color: var(--card-ink, #fff);
  text-decoration: none;
}
.card .grain {
  position: absolute;
  inset: 0;
  opacity: .16;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.card-inner {
  position: absolute;
  inset: 0;
  transform: scale(calc(1 - 0.06 * var(--covered, 0)));
  filter: brightness(calc(1 - 0.3 * var(--covered, 0)));
  transform-origin: 50% 0;
  will-change: transform, filter;
}
.card-desc {
  position: absolute;
  top: 110px;
  left: 60px;
  margin: 0;
  max-width: 420px;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 500;
}
.card-idx {
  position: absolute;
  top: 110px;
  right: 60px;
  font-size: 15px;
  letter-spacing: .08em;
  font-weight: 600;
}
.card-name {
  position: absolute;
  left: 60px;
  bottom: 40px;
  margin: 0;
  max-width: 62%;
  font-size: clamp(64px, 9vw, 150px);
}
.card .btn {
  position: absolute;
  right: 60px;
  bottom: 48px;
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
  padding: 16px 26px;
  font-size: 15px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
}
.scene {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
}
.slot {
  width: 1100px;
  max-width: 80vw;
  height: 560px;
  box-sizing: border-box;
  border: 1px dashed rgba(255, 255, 255, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  font-size: 16px;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.6;
  opacity: .8;
}
.code {
  margin: 0;
  font: 15px/1.6 ui-monospace, Menlo, monospace;
  color: #9fd1a8;
  background: #0a0a0a;
  padding: 40px 48px;
  border-radius: 12px;
  border: 1px solid #222;
  box-shadow: 0 60px 120px rgba(0, 0, 0, .6);
  max-width: 80vw;
  overflow-x: auto;
}
.code .c { color: #777; }
.code { scrollbar-color: #333 #0a0a0a; }

/* Contact */
.contact { padding: 160px 40px 120px; text-align: center; }
.contact-head { margin: 0; font-size: clamp(80px, 14vw, 210px); line-height: .86; }
.contact .btn {
  margin-top: 44px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 16px 26px;
  font-size: 15px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
}
.portrait {
  width: 330px;
  height: 470px;
  margin: 70px auto 0;
  border-radius: 165px;
  overflow: hidden;
  background: #d9d9d9;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.contact p {
  max-width: 760px;
  margin: 60px auto 0;
  font-size: 18px;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-weight: 500;
  line-height: 1.45;
}
.contact-links {
  margin-top: 60px;
  display: flex;
  justify-content: center;
  gap: 40px;
  font-size: 15px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
}
.contact-links a, .contact-foot a { color: inherit; }
.contact-foot {
  margin-top: 120px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #6b6b6b;
}

/* Thursday: the constellation fills the card behind the phone; the phone keeps its own size (data-fit="device"). */
.card .constellation { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scene[data-scene="thursday-card"] .render { filter: drop-shadow(0 40px 60px rgba(0, 0, 0, .6)); }
.constellation-tip {
  position: absolute;
  transform: translate(14px, -50%);
  padding: 6px 10px;
  border: 1px solid rgba(159, 255, 184, .45);
  background: rgba(7, 16, 12, .85);
  color: #9FFFB8;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
}
.constellation-tip[hidden] { display: none; }

@media (max-width: 1100px) {
  .scene { transform: translate(-50%, -50%) scale(.7); }
  .card-desc { max-width: 300px; }
}
@media (max-width: 767px) {
  .hero { padding: 90px 20px 100px; }
  .hero-head { font-size: clamp(44px, 13vw, 160px); }
  .hero-sub { font-size: 15px; margin-top: 24px; }
  .hero-foot { left: 20px; right: 20px; flex-direction: column; gap: 6px; font-size: 13px; }
  .card-desc { left: 20px; top: 100px; font-size: 18px; max-width: 70%; }
  .card-idx { right: 20px; top: 100px; }
  .card-name { left: 20px; bottom: 90px; max-width: calc(100% - 40px); font-size: clamp(44px, 16vw, 90px); }
  .card .btn { right: 20px; bottom: 28px; padding: 12px 18px; font-size: 13px; }
  .scene { top: 50%; transform: translate(-50%, -50%) scale(.72); }
  .scene .laptop { width: 480px; }
  .slot { width: 80vw; height: 300px; padding: 20px; }
  .contact { padding: 100px 20px 80px; }
  .contact-head { font-size: clamp(56px, 18vw, 210px); }
  .portrait { width: 240px; height: 342px; border-radius: 120px; }
  .contact-links { flex-wrap: wrap; gap: 20px; }
  .contact-foot { margin-top: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  .card-inner { transform: none; filter: none; will-change: auto; }
}

/* Rendered card scenes go full-bleed: the render covers the card (see renders/README.md).
   After the media queries so it wins over their centring transforms. Text stays above it. */
.card .scene.is-rendered:not([data-fit="device"]) {
  inset: 0;
  width: auto;
  height: auto;
  transform: none;
  display: block;
}
.card-desc, .card-idx, .card-name, .card .btn { z-index: 1; }
