:root{
  --bg: #0b0c10;          /* dark stage */
  --screen: #0e1116;      /* monitor screen */
  --bezel: #1c212b;       /* monitor bezel */
  --stand: #181c23;
  --glow: #1da1f2;        /* subtle neon hint */
  --text: #e6e6e6;
  --muted: #b8c1cc;
  --accent: #00ffd5;

  /* animated by JS 0..1 */
  --progress: 0;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
}

.sr-only{
  position:absolute!important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* ---------- Landing ---------- */
.landing{
  /* Tall to allow a few seconds of scroll transition */
  height: 260vh;
  position: relative;
  background:
    radial-gradient(1200px 500px at 50% 70%, rgba(0,255,213,0.07), transparent 60%),
    radial-gradient(800px 300px at 50% 80%, rgba(29,161,242,0.08), transparent 60%),
    var(--bg);
}

/* give space after the monitor scroll section */
#landing {
  margin-bottom: 200px; /* adjust: 150–300px depending on your setup */
}


.landing-track{ position: relative; height: 100%; }

.sticky{
  position: sticky;
  top: 0;
}

/* The “monitor” you fly into */
.monitor{
  height: 100vh;
  display: grid;
  place-items: center;
  transform:
    translateY(calc(var(--progress) * -6vh))
    scale(calc(1 + var(--progress) * 0.75));
  transition: transform 0.06s linear;
}

.monitor-bezel{
  width: min(82vw, 980px);
  aspect-ratio: 16 / 9;
  background: linear-gradient(180deg, #202632, var(--bezel));
  border-radius: 18px;
  box-shadow:
    0 30px 120px rgba(0,0,0,0.65),
    0 0 0 2px rgba(255,255,255,0.03) inset;
  display: grid;
  place-items: center;
  position: relative;
}

.monitor-bezel::after{
  /* Glow intensifies as you approach */
  content: "";
  position: absolute; inset: -2px;
  border-radius: 20px;
  box-shadow:
    0 0 calc(30px + 90px * var(--progress)) rgba(0, 255, 213, 0.08),
    0 0 calc(15px + 60px * var(--progress)) rgba(29, 161, 242, 0.10);
  pointer-events: none;
}

.monitor-screen{
  width: 92%;
  height: 86%;
  border-radius: 12px;
  background: radial-gradient(120% 120% at 50% 50%, #0d1117 0%, var(--screen) 60%, #0a0d12 100%);
  box-shadow:
    0 0 0 2px rgba(255,255,255,0.03) inset,
    0 0 60px rgba(0,0,0,0.6) inset;
  display: grid;
  place-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.logo{
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  font-size: clamp(2rem, 6vw, 4rem);
  color: #eaf2ff;
  text-shadow:
    0 0 8px rgba(0, 255, 213, 0.25),
    0 0 24px rgba(29,161,242,0.18);
  transform:
    scale(calc(1 - var(--progress) * 0.02))
    translateY(calc(var(--progress) * -4px));
  opacity: calc(1 - var(--progress) * 0.05);
}

.hint{
  margin-top: 0.75rem;
  font-size: clamp(0.9rem, 2.6vw, 1.1rem);
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  animation: hintPulse 2.2s ease-in-out infinite;
  opacity: calc(0.85 - var(--progress) * 0.5);
}

@keyframes hintPulse{
  0%,100%{ opacity: .55; }
  50%    { opacity: .95; }
}

.monitor-stand{
  width: min(30vw, 340px);
  height: 18px;
  margin-top: 18px;
  background: linear-gradient(180deg, #141922, var(--stand));
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

/* ---------- Content wrapper ---------- */
.content{
  background: #0c0f15;
  padding: 40px 20px 80px;
  border-top: 1px solid rgba(255,255,255,0.04);
}

/* Containers for the two sections only */
.container{
  max-width: 980px;
  margin: 0 auto 36px;
}

/* OpenSea Section Styling */
.opensea-section {
  margin: 60px auto;
  text-align: center;
}

.opensea-card {
  margin-bottom: 20px;
  background: #0e131c;
  border: 2px solid #202636;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  padding: 20px;
  display: inline-block;
  max-width: 800px;
}

.opensea-banner {
  width: 100%;
  max-width: 800px;
  border-radius: 10px;
  margin-bottom: 15px;
}

.opensea-card h2 {
  color: #7dd3fc;
  font-size: 1.6rem;
  margin: 10px 0;
}

.opensea-card a {
  color: #58e7a3;
  text-decoration: none;
}
.opensea-card a:hover {
  text-decoration: underline;
}

/* Make Twitter embed centered nicely */
.twitter-tweet{
  margin: 22px auto !important;
}
/* ===== CRT flicker + scanlines for the landing monitor ===== */

/* Subtle scanlines + vignette overlay */
.monitor-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    /* slight vignette */
    radial-gradient(120% 140% at 50% 50%, transparent 55%, rgba(0,0,0,0.35) 100%),
    /* scanlines */
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,0.02) 0px,
      rgba(255,255,255,0.02) 1px,
      rgba(0,0,0,0.02) 2px,
      rgba(0,0,0,0.02) 4px
    );
  mix-blend-mode: screen;
  opacity: .6;
  transition: opacity .2s ease;
}

/* Slight RGB subpixel fringing on glow */
.monitor-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(255,0,0,0.06),
      rgba(0,255,0,0.06),
      rgba(0,0,255,0.06)
    );
  mix-blend-mode: lighten;
  opacity: .12;
}

/* Baseline soft flicker while on landing */
.monitor-screen.flicker {
  animation: crtFlicker 2.2s infinite;
}

/* Brief, stronger flicker + micro jitter as you 'enter' */
.monitor-screen.entering {
  animation:
    crtFlicker 1s steps(24, end) infinite,
    crtJitter 140ms linear infinite;
}

.monitor-screen.entering::before { opacity: .75; }

/* Keyframes */
@keyframes crtFlicker {
  0%   { filter: brightness(1) contrast(1); opacity: 1; }
  5%   { filter: brightness(0.96) contrast(1.02); }
  10%  { filter: brightness(1.02) contrast(1); }
  15%  { filter: brightness(0.97) contrast(1.03); }
  20%  { filter: brightness(1.03) contrast(0.99); }
  35%  { filter: brightness(0.98) contrast(1.02); }
  50%  { filter: brightness(1.02) contrast(0.98); }
  65%  { filter: brightness(0.97) contrast(1.04); }
  80%  { filter: brightness(1.04) contrast(0.98); }
  100% { filter: brightness(1) contrast(1); }
}

@keyframes crtJitter {
  0%   { transform: translateY(0) translateX(0); }
  25%  { transform: translateY(-0.5px) translateX(0.3px); }
  50%  { transform: translateY(0.6px) translateX(-0.4px); }
  75%  { transform: translateY(-0.4px) translateX(0.2px); }
  100% { transform: translateY(0) translateX(0); }
}
/* Keys grid */
.keys { padding-top: 8px; }
.keys-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
}
@media (max-width: 820px){
  .keys-grid{ grid-template-columns: 1fr; }
}

.key{
  margin: 0;
  padding: 10px;
  border: 1px solid #202636;
  border-radius: 12px;
  background: #0e131c;
  box-shadow: 0 8px 22px rgba(0,0,0,.25);
  text-align: center;
  /* reveal state before IntersectionObserver kicks in */
  opacity: 0;
  transform: translateY(24px) scale(.98) rotate(-1.2deg);
}
.key img{
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.key figcaption{
  margin-top: 8px;
  font: 600 14px/1.2 "Courier New", Courier, monospace;
  color: #cfe8ff;
  letter-spacing: .04em;
}

/* animated in-view state */
.key.in{
  animation: keyFadeUp .7s calc(var(--i,0) * 120ms) both ease-out,
             keyFloat 7s calc(var(--i,0) * .35s) ease-in-out infinite;
}
.key:hover{
  transform: translateY(-2px) scale(1.01) rotate(0deg);
  transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 12px 26px rgba(0,0,0,.3);
}

@keyframes keyFadeUp{
  from{ opacity:0; transform: translateY(24px) scale(.98) rotate(-1.2deg); }
  to  { opacity:1; transform: translateY(0)   scale(1)    rotate(0deg); }
}
@keyframes keyFloat{
  0%   { transform: translateY(0)    scale(1) rotate(0deg); }
  50%  { transform: translateY(-6px) scale(1) rotate(.2deg); }
  100% { transform: translateY(0)    scale(1) rotate(0deg); }
}
/* ===== Right-side floating dock ===== */
.side-dock{
  position: fixed;
  top: 50%;
  right: max(env(safe-area-inset-right, 0px), 20px);
  transform: translateY(-50%) translateX(220%);
  opacity: 0;
  pointer-events: none;
  z-index: 50;
  transition: transform .35s ease, opacity .35s ease, box-shadow .25s ease;
  background: rgba(14,19,28,0.85);
  border: 1px solid #202636;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.side-dock.show{
  transform: translateY(-50%) translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.dock-list{
  list-style: none;
  margin: 0;
  padding: 14px 16px 14px 16px;
  display: grid;
  gap: 10px;
  min-width: 220px;
}

.dock-list a{
  display: block;
  font: 600 14px/1.2 "Inter", system-ui, Arial, sans-serif;
  color: #e6f0ff;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: linear-gradient(180deg, #0f1420, #0b0f18);
}

.dock-list a:hover{
  border-color: #2a3b55;
  background: linear-gradient(180deg, #131a28, #0f1622);
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}

/* Tiny collapse/expand chevron */
.dock-toggle{
  position: absolute;
  left: -28px;
  top: 50%;
  transform: translateY(-50%) rotate(180deg); /* points left when open */
  width: 28px;
  height: 44px;
  border-radius: 10px 0 0 10px;
  border: 1px solid #202636;
  border-right: 0;
  background: #0e131c;
  color: #9fb7d8;
  cursor: pointer;
  box-shadow: -6px 0 12px rgba(0,0,0,.25);
}

.side-dock.collapsed .dock-toggle{
  transform: translateY(-50%) rotate(0deg); /* points right when closed */
}

.side-dock.collapsed .dock-list{
  display: none;
}

/* Hide on small screens where there is no extra right space */
@media (max-width: 1024px){
  .side-dock{ display: none; }
}
