/* Personal website of Prayash Pyakurel. The page itself is written by scripts/build_website.py. */

:root {
  --ink: #1b1f2e;
  --ink-soft: #4a5068;
  --muted: #6b7189;
  --line: #e3e5ee;
  --paper: #ffffff;
  --paper-alt: #f6f7fb;
  --navy: #141a3a;
  --navy-2: #1f2a63;
  --indigo: #3949ab;
  --accent: #ef6c00;
  --accent-soft: #fff3e6;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 26, 58, 0.06), 0 6px 24px rgba(20, 26, 58, 0.07);
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--paper); line-height: 1.6;
       font-size: 16.5px; -webkit-font-smoothing: antialiased; }
a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, 0.92);
          backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--ink); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { color: var(--ink-soft); font-size: 0.9rem; padding: 6px 10px; border-radius: 6px; }
.nav a:hover { background: var(--paper-alt); color: var(--ink); text-decoration: none; }
.nav a.lab { color: #fff; background: var(--accent); font-weight: 600; }
.nav a.lab:hover { background: #d95f00; color: #fff; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; color: #fff;
        background: radial-gradient(1200px 500px at 75% 10%, var(--navy-2), var(--navy) 70%); }
.hero::before { content: ""; position: absolute; inset: 0; background: url("assets/fieldlines.svg") center / cover no-repeat;
                opacity: 0.9; }
.hero .wrap { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center;
              padding-top: 84px; padding-bottom: 84px; }
.hero .wrap.solo { grid-template-columns: 1fr; }
.avatar { width: 168px; height: 168px; border-radius: 50%; display: grid; place-items: center;
          background: linear-gradient(140deg, #3f51b5, #ef6c00); font-family: var(--serif); font-size: 3.4rem;
          font-weight: 600; letter-spacing: 1px; box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.12); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.15;
           margin: 0 0 8px; }
.hero .role { font-size: 1.12rem; color: #dfe3ff; margin: 0 0 4px; }
.hero .org { color: #b7bde6; margin: 0 0 22px; }
.hero .tagline { max-width: 640px; color: #eef0ff; font-size: 1.05rem; margin: 0 0 26px; }
.buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; font-weight: 600;
       font-size: 0.95rem; border: 1.5px solid rgba(255, 255, 255, 0.5); color: #fff; }
.btn:hover { text-decoration: none; background: rgba(255, 255, 255, 0.1); }
.btn.primary { background: var(--accent); border-color: var(--accent); }
.btn.primary:hover { background: #d95f00; }

/* ---------- stats strip ---------- */
.stats { background: var(--paper); border-bottom: 1px solid var(--line); }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 22px 12px; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat b { display: block; font-family: var(--serif); font-size: 1.9rem; color: var(--navy-2); line-height: 1.2; }
.stat span { color: var(--muted); font-size: 0.86rem; }

/* ---------- sections ---------- */
section { padding: 72px 0; }
section.alt { background: var(--paper-alt); }
.kicker { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.75rem; font-weight: 700; color: var(--accent);
          margin: 0 0 6px; }
h2 { font-family: var(--serif); font-weight: 600; font-size: 2rem; margin: 0 0 22px; line-height: 1.2; }
h3 { font-size: 1.08rem; margin: 0 0 6px; }
.lead { font-size: 1.08rem; color: var(--ink-soft); max-width: 760px; }
.two { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
        box-shadow: var(--shadow); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.card .tag { display: inline-block; font-size: 0.72rem; font-weight: 700; color: var(--indigo); background: #e8eaf6;
             padding: 2px 8px; border-radius: 999px; margin-bottom: 10px; }

.facts { list-style: none; margin: 0; padding: 0; }
.facts li { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 92px 1fr; gap: 12px; }
.facts li:last-child { border-bottom: none; }
.facts .when { color: var(--muted); font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.facts .what b { display: block; }
.facts .what span { color: var(--ink-soft); font-size: 0.93rem; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { font-size: 0.82rem; padding: 4px 11px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line);
        color: var(--ink-soft); }

/* ---------- the Plasma Lab feature ---------- */
.lab-feature { display: grid; grid-template-columns: 1.05fr 1fr; gap: 0; border-radius: 16px; overflow: hidden;
               background: var(--navy); color: #fff; box-shadow: 0 10px 40px rgba(20, 26, 58, 0.25); }
.lab-feature .text { padding: 40px; }
.lab-feature h2 { color: #fff; margin-bottom: 12px; }
.lab-feature p { color: #d7dbf5; }
.lab-feature ul { margin: 14px 0 26px; padding-left: 20px; color: #e8eaff; }
.lab-feature li { margin: 6px 0; }
.lab-feature .shot { background: #fff center / cover no-repeat; min-height: 340px; }
.lab-feature .kicker { color: #ffb74d; }
.lab-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 22px; }
.lab-links a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius);
               background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.lab-links a:hover { border-color: var(--accent); text-decoration: none; }
.lab-links b { display: block; margin-bottom: 2px; }
.lab-links span { color: var(--muted); font-size: 0.88rem; }

/* ---------- publications ---------- */
.pub-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.pub-tools button { font: inherit; font-size: 0.88rem; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line);
                    background: var(--paper); color: var(--ink-soft); cursor: pointer; }
.pub-tools button.on { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.pub-tools .count { margin-left: auto; color: var(--muted); font-size: 0.88rem; }
.pubs { list-style: none; margin: 0; padding: 0; counter-reset: pub; }
.pub { padding: 16px 0 16px 44px; border-bottom: 1px solid var(--line); position: relative; }
.pub::before { counter-increment: pub; content: counter(pub); position: absolute; left: 0; top: 18px; width: 30px;
               text-align: right; color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.pub.hidden { display: none; }
.pub .title { font-weight: 600; color: var(--ink); }
.pub .authors { color: var(--ink-soft); font-size: 0.92rem; }
.pub .authors b { color: var(--ink); }
.pub .venue { font-size: 0.9rem; color: var(--muted); }
.pub .venue i { color: var(--ink-soft); }
.badge { display: inline-block; font-size: 0.7rem; font-weight: 700; padding: 1px 7px; border-radius: 4px; margin-left: 6px;
         vertical-align: 2px; }
.badge.first { background: var(--accent-soft); color: #b45300; }
.badge.high { background: #e8eaf6; color: var(--indigo); }

/* ---------- talks, grants ---------- */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 18px 22px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 7px; width: 12px; height: 12px; border-radius: 50%;
                       background: var(--paper); border: 2px solid var(--accent); }
.timeline .year { font-size: 0.8rem; font-weight: 700; color: var(--accent); }
.timeline .where { font-weight: 600; }
.timeline .talk { color: var(--ink-soft); font-size: 0.93rem; }
details.more { margin-top: 10px; }
details.more summary { cursor: pointer; color: var(--indigo); font-weight: 600; }
.grant { margin-bottom: 16px; }
.grant .amount { font-family: var(--serif); font-size: 1.35rem; color: var(--navy-2); }
.grant .meta { color: var(--muted); font-size: 0.88rem; }
.grant h3 { font-size: 1rem; }
.role-pill { font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #e8f5e9; color: #2e7d32; }
.role-pill.pending { background: #fff8e1; color: #b26a00; }

/* ---------- contact & footer ---------- */
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.contact .card b { display: block; margin-bottom: 4px; }
footer { background: var(--navy); color: #b7bde6; padding: 28px 0; font-size: 0.88rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: #fff; }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: left; padding-top: 56px; padding-bottom: 56px; }
  .avatar { width: 112px; height: 112px; font-size: 2.3rem; }
  .two, .lab-feature { grid-template-columns: 1fr; }
  .lab-feature .shot { min-height: 220px; }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .nav a:not(.lab) { display: none; }
  section { padding: 52px 0; }
  .wrap { padding: 0 16px; }
}

/* ---------- research tracks ---------- */
.tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.track h3 { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; margin-bottom: 8px; color: var(--navy-2); }
.track > p { margin-bottom: 8px; }
.topics { list-style: none; margin: 0; padding: 0; }
.topics li { padding: 12px 0 12px 16px; border-top: 1px solid var(--line); position: relative; }
.topics li::before { content: ""; position: absolute; left: 0; top: 20px; width: 7px; height: 7px; border-radius: 50%;
                     background: var(--accent); }
.topics b { display: block; font-size: 0.97rem; }
.topics span { display: block; color: var(--ink-soft); font-size: 0.92rem; }
.topics small { display: block; color: var(--indigo); font-size: 0.78rem; font-weight: 600; margin-top: 2px; }
@media (max-width: 860px) { .tracks { grid-template-columns: 1fr; } }
