/* ============================================================
   shared theme — priyanshu kumar
   used by every page. change a value here, it changes everywhere.
   ============================================================ */

:root{
  --bg-a: #170f22;
  --bg-b: #0d1220;
  --bg-deep: #07070d;
  --panel: #14192b;
  --hairline: #262c42;
  --text: #ece8f0;
  --muted: #9793a8;
  --accent: #e0a83f;
  --accent-dim: #7d5f2c;
  --glow: #f2b872;
  --radius: 4px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background:
    radial-gradient(ellipse 90% 60% at 15% -10%, rgba(224,168,63,0.07), transparent 55%),
    radial-gradient(ellipse 120% 90% at 85% 0%, var(--bg-a) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-b) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Karla', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.serif{ font-family: 'Fraunces', serif; }
.mono{ font-family: 'IBM Plex Mono', monospace; }

.wrap{
  max-width: 640px;
  margin: 0 auto;
  padding: 72px 24px 90px;
}

@media (max-width: 480px){
  .wrap{ padding: 48px 20px 70px; }
}

/* ---- cursor glow: one ambient interactive layer, not scattered hovers ---- */
.glow{
  position: fixed;
  top: 0; left: 0;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242,184,114,0.10) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
  transition: opacity 0.3s ease;
  will-change: transform;
}
@media (hover: none){ .glow{ display: none; } }

/* ---- nav ---- */
nav.top{
  position: relative;
  z-index: 2;
  display: flex;
  gap: 24px;
  margin-bottom: 56px;
  font-size: 14px;
}
nav.top a{
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
}
nav.top a:hover, nav.top a[aria-current="page"]{
  color: var(--text);
  border-bottom-color: var(--accent-dim);
}
nav.top a[aria-current="page"]{ color: var(--accent); }

/* ---- headings & text ---- */
h1{
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 42px;
  line-height: 1.15;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}
h2{
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 20px;
  position: relative;
  z-index: 1;
}
p{ margin: 0 0 18px; color: var(--text); position: relative; z-index: 1; }
p.muted{ color: var(--muted); }
p.lede{ font-size: 17px; color: var(--muted); margin-bottom: 44px; }

.rule{
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 44px 0;
  position: relative;
  z-index: 1;
}

/* ---- fade-up entrance, applied once per element on load ---- */
.rise{
  opacity: 0;
  transform: translateY(10px);
  animation: rise 0.6s ease-out forwards;
}
@keyframes rise{ to{ opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce){
  .rise{ animation: none; opacity: 1; transform: none; }
}

/* ---- links list ---- */
.links{ display: flex; flex-wrap: wrap; padding: 0; margin: 0; list-style: none; position: relative; z-index: 1; }
.links li{ margin: 0 26px 8px 0; }
.links a{
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.links a:hover{ color: var(--accent); border-bottom-color: var(--accent-dim); }

/* ---- featured / tilt card ---- */
.tilt-card{
  border: 1px solid var(--hairline);
  background: linear-gradient(180deg, rgba(224,168,63,0.045), transparent 65%);
  padding: 26px;
  border-radius: var(--radius);
  position: relative;
  z-index: 1;
  transform-style: preserve-3d;
  transition: transform 0.15s ease, border-color 0.2s ease;
}
.tilt-card:hover{ border-color: var(--accent-dim); }
.tilt-card h3{
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 19px;
  margin: 0 0 10px;
  color: var(--text);
}
.tilt-card p{ font-size: 15px; color: var(--muted); margin-bottom: 16px; }
.tilt-card .meta{ font-size: 13px; color: var(--accent); }
.tilt-card .meta span{ display: block; margin-bottom: 6px; }
.tilt-card a.doi{ color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-dim); }
.tilt-card a.doi:hover{ border-bottom-color: var(--accent); }

/* ---- journey timeline (content is genuinely sequential, so a line + markers is earned here) ---- */
.timeline{ position: relative; z-index: 1; padding-left: 26px; }
.timeline::before{
  content: '';
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--hairline);
}
.entry{ position: relative; margin-bottom: 36px; }
.entry::before{
  content: '';
  position: absolute;
  left: -26px; top: 6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(224,168,63,0.12);
}
.entry .date{ font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--accent); margin-bottom: 6px; display: block; }
.entry h3{ font-family: 'Fraunces', serif; font-weight: 500; font-size: 18px; margin: 0 0 8px; }
.entry p{ font-size: 15px; color: var(--muted); margin-bottom: 8px; }
.entry a{ font-size: 14px; color: var(--text); border-bottom: 1px solid var(--accent-dim); text-decoration: none; }
.entry a:hover{ color: var(--accent); }

.entry{ opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.entry.in{ opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce){
  .entry{ opacity: 1; transform: none; transition: none; }
}

footer.page{
  margin-top: 60px;
  font-size: 13px;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

/* ---- grain texture, adds cosiness without a big asset file ---- */
body::before{
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- avatar: ready for a real photo, looks intentional either way ---- */
.hero-center{ text-align:center; margin-bottom: 32px; position:relative; z-index:1; }
.avatar{
  width: 128px; height: 128px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #6d4fa0);
  display:flex; align-items:center; justify-content:center;
  font-family:'Fraunces',serif; font-weight:500; font-size:42px; color:#1a1206;
  border: 1px solid var(--hairline);
  box-shadow: 0 0 0 3px var(--bg-deep), 0 0 0 4px var(--hairline);
  overflow: hidden;
  margin: 0 auto 22px;
}
.avatar img{ width:100%; height:100%; object-fit:cover; display:block; }
.hero-center h1{
  font-style: italic;
  text-align: center;
  margin-bottom: 6px;
}
.hero-center .nickname{ font-size:14px; color:var(--muted); margin-bottom:8px; }
.status-line{ font-family:'IBM Plex Mono',monospace; font-size:12px; color:var(--muted); display:block; }
.status-line .dot{
  display:inline-block; width:6px; height:6px; border-radius:50%;
  background:#6fcf97; margin-right:6px; box-shadow:0 0 6px #6fcf97;
}

/* ---- topic pills ---- */
.pills{ display:flex; flex-wrap:wrap; gap:8px; margin: 0 0 36px; position:relative; z-index:1; }
.pill{
  font-family:'IBM Plex Mono',monospace; font-size:11.5px; color: var(--accent);
  border: 1px solid var(--accent-dim);
  background: rgba(224,168,63,0.06);
  padding: 5px 11px; border-radius: 20px;
  white-space: nowrap;
}

/* ---- icon link chips, replaces plain text list ---- */
.linkgrid{
  display:flex; flex-wrap:wrap; gap: 10px;
  padding:0; margin:0; list-style-type:none;
  position:relative; z-index:1;
}
.linkgrid li{
  list-style-type:none; margin:0; padding:0;
  flex: 1 1 220px;
}
.linkgrid a{
  display:flex; align-items:center; gap:10px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--text);
  text-decoration: none;
  font-size: 14.5px;
  background: var(--panel);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.linkgrid a:hover{ border-color: var(--accent-dim); transform: translateY(-1px); }
.linkgrid svg{ flex-shrink:0; color: var(--accent); }

/* ---- journey entry tag ---- */
.entry .tag{
  display:inline-block; font-family:'IBM Plex Mono',monospace; font-size:10.5px;
  color: var(--accent); border:1px solid var(--accent-dim); border-radius:20px;
  padding: 2px 9px; margin-bottom: 8px; text-transform: lowercase;
}
