/* Minimal CSS to match screenshot: black background, pink text, centered column */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Merriweather:wght@300;400;700&display=swap');

/* Reset / Normalize (small) */
/* Remove default margins and set consistent box-sizing */
*,*::before,*::after{box-sizing:border-box}
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;font:inherit;vertical-align:baseline}
body{line-height:1}

/* Accessible focus styles */
:focus{outline: none}
a:focus,button:focus,input:focus,textarea:focus{outline:3px solid rgba(0,255,65,0.14); outline-offset:3px}

/* subtle background gradient + performant noise overlay */
.site-bg{position:fixed;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at 10% 10%, rgba(0,255,65,0.03), transparent 10%), linear-gradient(180deg, #020202 0%, #000000 100%)}
.site-bg::after{content:"";position:absolute;inset:0;opacity:0.035;background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64"><filter id="n"><feTurbulence baseFrequency="0.8" numOctaves="1" stitchTiles="stitch"/><feColorMatrix type="saturate" values="0"/></filter><rect width="64" height="64" filter="url(%23n)" fill="black"/></svg>');background-repeat:repeat}
:root{
  --bg:#000;
  --accent:#00ff41; /* Matrix green */
  --muted:#66ff9a;
  --white:#ffffff;
  --copy:#f8f8fa;
  /* Fluid type scale: clamp(min, preferred, max) using viewport width units */
  --fs-xxl: clamp(1.6rem, 1.3rem + 2.4vw, 2.5rem);
  --fs-xl:  clamp(1.4rem, 1.1rem + 1.8vw, 2.25rem);
  --fs-lg:  clamp(1.15rem, 1rem + 1.0vw, 1.6rem);
  --fs-base: clamp(0.95rem, 0.85rem + 0.4vw, 1rem);
  --measure: min(56ch, 92vw);
  /* UI font: prefer Playwrite, then stronger system sans stack, then a readable serif fallback */
  --ui-font: 'Playwrite US Modern', 'Inter', "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, -apple-system, BlinkMacSystemFont;
  --serif-font: 'Merriweather', Georgia, "Times New Roman", Times, serif;
  --mono-font: ui-monospace, SFMono-Regular, Menlo, Monaco, 'Courier New', monospace;
}
/* theme variants */
[data-theme="dark"]{ --bg:#000; --accent:#00ff41; --muted:#66ff9a }
[data-theme="neon"]{ --bg:#050505; --accent:#00ff41; --muted:#8cffb8 }
html,body{height:100%;}
.body-playwrite, body{
  background:var(--bg);
  color:var(--accent);
  font-family:var(--ui-font);
  margin:0;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  font-size:16px;
  /* stronger fallback when Playwrite fails: slightly tighter letter-spacing and neutral weight */
  letter-spacing: 0.01em;
  font-weight: 400;
}
.page{max-width:760px;margin:0 auto;padding:3rem 2rem;}
.masthead{display:flex;justify-content:center}
.page{max-width:var(--measure);}
.hero{width:min(46vw,220px);display:block;margin:0 auto 2.4rem;filter:drop-shadow(0 10px 26px rgba(0,255,65,0.12));}
.site-title{font-size:34px;margin:1.2rem 0 0.6rem;color:var(--accent);letter-spacing:1.2px;font-weight:700;font-family:var(--ui-font)}
.masthead #theme-toggle{ display:none }

/* subtle green tint for hero image; stronger when neon theme is active */
.hero{ filter: drop-shadow(0 10px 26px rgba(0,255,65,0.12)); transition: filter .25s ease, box-shadow .25s ease }
[data-theme="neon"] .hero{ filter: saturate(1.2) brightness(1.02) contrast(1.05) hue-rotate(70deg); box-shadow: 0 8px 30px rgba(0,255,65,0.12) }
.lead p{margin:.7rem 0;color:var(--muted);line-height:1.7;font-size:17px}

/* Typography tuning for Playwrite: headings and body text */
h1, h2 { font-family: var(--ui-font); font-weight: 700; color: var(--accent); margin-top: 1.2rem; margin-bottom: .6rem }
h1 { font-size: var(--fs-xxl); line-height: 1.08; letter-spacing: -0.02em; font-weight: 800 }
h2 { font-size: var(--fs-xl); line-height: 1.14; letter-spacing: -0.01em; font-weight: 700 }

/* Paragraphs use a comfortable measure and readable spacing */
p { font-family: var(--ui-font); font-weight: 400; font-size: var(--fs-base); line-height: 1.65; letter-spacing: 0.01em; color: var(--copy) }

/* When Playwrite is not available, the --ui-font stack will gracefully fall back to Inter/system fonts */
.lead .chinese{color:var(--white);font-weight:800;margin-bottom:.45rem;font-size:20px}
.muted{color:var(--muted)}
.links ul{list-style:none;padding:0;margin:1.2rem 0}
.links a{color:var(--accent);text-decoration:underline;font-weight:600}
.interest{color:var(--muted);max-width:700px;margin-top:1.4rem}
.note{color:var(--muted);margin-top:1rem}
.site-list{color:var(--accent);margin-top:1.2rem}
.site-list .nested{list-style:none;margin:0;padding-left:1rem}
.parent{margin-top:1rem}

/* Playwrite US Modern helper (example) */
.playwrite-us-modern-rajdeep {
  font-family: "Playwrite US Modern", cursive;
  font-optical-sizing: auto;
  font-weight: 300;
  font-style: normal;
}

/* small inline social icon styles */
.icon { width:1em; height:1em; vertical-align:middle; display:inline-block; margin-right:.45rem; fill:currentColor }
.footer-links img.icon { width:1.05em; height:1.05em }
.footer-links svg.icon{ display:inline-block; vertical-align:middle; margin-right:.45rem; color:var(--muted); }
.footer-links a{display:inline-flex;align-items:center;gap:.4rem}
.visually-hidden{ position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0 }

/* footer */
.site-footer{border-top:1px solid rgba(0,255,65,0.04);margin-top:3rem;padding:1.6rem 0;color:var(--muted)}
.footer-inner{display:flex;flex-wrap:wrap;gap:1rem;align-items:center;justify-content:space-between}
.footer-links{display:flex;gap:0.9rem;align-items:center;flex-wrap:wrap}
.footer-links a{color:var(--muted);text-decoration:none;border-bottom:1px dashed rgba(0,255,65,0.06);padding:6px 8px;border-radius:6px}
.footer-links a:hover{color:var(--accent);border-color:transparent}

/* Spotify-specific link hover (distinct accent) */
.spotify-link{ transition: color .18s ease, transform .18s cubic-bezier(.2,.9,.2,1), box-shadow .18s ease }
.spotify-link:hover, .spotify-link:focus{ color:#1DB954; transform: translateY(-4px) scale(1.06); box-shadow: 0 10px 30px rgba(29,185,84,0.12); }
.spotify-link svg.icon{ color:inherit }
.copyright{color:var(--accent);font-size:13px;font-weight:600}
.footer-email{margin-left:1rem}
.footer-email .email-link{color:var(--accent);text-decoration:none;border-bottom:1px dashed rgba(0,255,65,0.08);padding-bottom:2px;font-weight:600}
.footer-email .email-link:hover{color:var(--white);border-color:transparent}

/* Responsive footer: stack and center on narrow viewports */
@media (max-width:560px){
  .footer-inner{flex-direction:column;align-items:center;gap:0.75rem;text-align:center}
  .footer-links{justify-content:center;width:100%;gap:0.6rem}
  .footer-links a{padding:10px 12px;font-size:15px}
  .footer-links img.icon, .footer-links svg.icon{width:1.05em;height:1.05em}
  .copyright{order:3;margin-top:0.6rem}
}

/* finer spacing for post content when viewing individual posts */
.post-content{font-family:var(--serif-font);color:var(--copy);line-height:1.9;font-size:clamp(16px, 1rem + 0.4vw, 20px);max-width:56ch}
.post-content img{max-width:100%;height:auto;border-radius:6px;display:block;margin:1rem 0}
.post-meta{color:var(--muted);font-size:14px;margin-bottom:1rem}

/* Prefer serif for long-form body text, but use Playwrite for UI-style headings inside posts */
.post-content p { font-family: var(--serif-font); font-weight: 400; line-height: 1.9; letter-spacing: 0.01em; color: var(--copy); font-size: 18px }
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 { font-family: var(--ui-font); color: var(--accent); margin-top: 1.2rem; margin-bottom: .6rem; font-weight: 700; letter-spacing: -0.01em }
.post-content h1 { font-size: clamp(1.4rem, 1.3rem + 1.0vw, 2rem); line-height: 1.08; font-weight: 800 }
.post-content h2 { font-size: clamp(1.05rem, 1rem + 0.6vw, 1.4rem); line-height: 1.12; font-weight: 700 }


/* subtle spacing tweaks */
h1,h2,h3{color:var(--accent);margin-top:1.2rem;margin-bottom:.6rem}
p{margin:0 0 1rem}
.page hr{border:0;border-top:1px solid rgba(0,255,65,0.06);margin:2rem 0}

/* small responsive tweak */
@media (max-width:900px){ .page{padding:2rem} }
@media (max-width:600px){
  .page{padding:1rem}
  .hero{width:160px}
  .post-content{font-size:16px}

  /* Reduce heading scale and weight on small screens */
  .site-title{font-size:clamp(22px, 4vw, 28px); letter-spacing: .6px; font-weight:700; margin-top:0.8rem}
  h1{font-size:clamp(1.2rem, 2.6vw, 1.6rem); line-height:1.12; font-weight:700; margin-top:0.8rem}
  h2{font-size:clamp(1rem, 2.2vw, 1.15rem); line-height:1.18; font-weight:600; margin-top:0.6rem}

  /* post-content headings slightly smaller as well */
  .post-content h1{font-size:clamp(1.2rem, 2.4vw, 1.6rem)}
  .post-content h2{font-size:clamp(0.98rem, 2.0vw, 1.15rem)}
}

/* ensure images and embeds scale down nicely */
.page img, .post-content img, .hero { max-width:100%; height:auto }

/* respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce){
  .hero { animation: none !important; transition: none !important }
  .page a { transition: none !important }
}

/* subtle animations */
@keyframes hero-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}
.hero{ will-change: transform, filter; animation: hero-pulse 6s ease-in-out infinite; transition: transform .25s ease, filter .25s ease }

/* link hover polish */
.page a{
  color:var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed rgba(0,255,65,0.18);
  transition: color .18s ease, transform .12s ease, border-color .18s ease, text-shadow .18s ease;
  will-change: transform, color;
}
.page a:hover{
  color:var(--white);
  transform: translateY(-2px) scale(1.01);
  border-color: transparent;
  text-shadow: 0 6px 18px rgba(0,255,65,0.04);
}

/* Buttons and link-like elements */
.btn, button, .link-button{ display:inline-block; transition: transform .16s ease, box-shadow .16s ease; }
.btn:hover, button:hover, .link-button:hover{ transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,255,65,0.06) }

/* hero canvas overlay styles */
.hero-wrap{ position: relative; display:inline-block }
.hero-canvas{ position:absolute; inset:0; width:100%; height:100%; pointer-events:none; border-radius:8px }

/* make strong accents slightly brighter on hover */
.site-title:hover{ color: #33ff7a }
