/* Nishi Agarwal, shared styles */
:root {
  --ink: #1e1433;
  --ink-2: #2b1f47;
  --paper: #fbfaff;
  --card: #ffffff;
  --line: #e4def2;
  --muted: #6b6280;
  --violet: #5b3de8;
  --violet-soft: #ece7ff;
  --amber: #f5a524;
  --amber-soft: #fff3dc;
  --mint: #0e9f6e;
  --focus: #f5a524;
  --display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --body: "Figtree", "Segoe UI", Arial, sans-serif;
  --r: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--violet); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; letter-spacing: -0.01em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }




/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(30, 20, 51, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.logo-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--amber); color: var(--ink); font-size: 0.95rem; }
.logo:hover { color: #fff; }
.nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav li a { display: block; padding: 6px 12px; border-radius: 999px; color: #d9d1ef; text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.nav li a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav li a[aria-current="page"] { color: var(--ink); background: #fff; }
.nav li a.cta { color: var(--ink); background: var(--amber); font-weight: 600; }
.nav li a.cta:hover { background: #ffc15c; }

/* footer */
footer { background: var(--ink); color: #bfb3e3; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 26px; padding-bottom: 30px; font-size: 0.93rem; }
footer a { color: #fff; }
footer .links { display: flex; flex-wrap: wrap; gap: 18px; }



/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: 0.97rem; text-decoration: none; border: 2px solid transparent; }
.btn-amber { background: var(--amber); color: var(--ink); }
.btn-amber:hover { background: #ffc15c; color: var(--ink); }
.btn-ghost { color: #fff; border-color: rgba(255,255,255,0.35); }
.btn-ghost:hover { color: #fff; border-color: #fff; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--violet); color: #fff; }



/* ---------- hero (home) ---------- */
.hero { background: var(--ink); color: #fff; overflow: hidden; position: relative; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent);
}
.hero .wrap { position: relative; padding-top: 64px; padding-bottom: 40px; }
.hero-tag { display: inline-flex; align-items: center; gap: 8px; color: #d9d1ef; font-size: 0.95rem; margin: 0 0 18px; }
.hero-tag .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(14,159,110,0.25); }
.hero h1 { font-size: clamp(3rem, 9vw, 6.4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 0.95; max-width: 9ch; }
.hero h1 span { color: var(--amber); }
.hero-lead { font-size: clamp(1.15rem, 2.2vw, 1.4rem); color: #ece7fb; max-width: 36ch; margin: 22px 0 28px; line-height: 1.45; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.wave { display: block; width: 100%; height: 120px; margin-top: 36px; }
.wave .trace { fill: none; stroke: var(--amber); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 2400; stroke-dashoffset: 2400; animation: draw 2.4s .3s cubic-bezier(.3,.6,.2,1) forwards; }
.wave .trace-2 { stroke: #9b84ff; stroke-width: 2; opacity: .7; animation-delay: .6s; }
@keyframes draw { to { stroke-dashoffset: 0; } }



/* entrance */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero .rise { animation: rise .7s ease-out both; }
.hero .rise.d1 { animation-delay: .08s; }
.hero .rise.d2 { animation-delay: .16s; }
.hero .rise.d3 { animation-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  .wave .trace { animation: none; stroke-dashoffset: 0; }
  .hero .rise, .bar-fill { animation: none; }
  .mini-card { transition: none; }
}




/* ---------- bento grid (home) ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; padding: 48px 0 64px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; min-width: 0; }
.tile h2 { font-size: 1.45rem; margin-bottom: 14px; }
.tile .more { margin-top: auto; padding-top: 18px; font-weight: 600; }
.t-projects { grid-column: span 4; grid-row: span 2; }
.t-stats { grid-column: span 2; background: var(--violet); border-color: var(--violet); color: #fff; }
.t-stats a { color: #fff; }
.t-skills { grid-column: span 2; }
.t-edu { grid-column: span 2; background: var(--amber-soft); border-color: #f8dca5; }
.t-lead { grid-column: span 2; }
.t-contact { grid-column: span 2; background: var(--ink); border-color: var(--ink); color: #fff; }
.t-contact a { color: var(--amber); }

.mini { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mini-card { display: block; text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 18px; transition: border-color .2s, transform .2s; }
.mini-card:hover { border-color: var(--violet); color: var(--ink); transform: translateY(-2px); }
.mini-card h3 { font-size: 1.35rem; margin-bottom: 4px; }
.mini-card .kind { color: var(--muted); font-size: 0.92rem; margin: 0 0 14px; }
.mini-card .big { font-family: var(--display); font-weight: 700; font-size: 1.9rem; color: var(--violet); line-height: 1; }
.mini-card .big-label { font-size: 0.9rem; color: var(--muted); margin: 6px 0 12px; }

.stat { padding: 12px 0; border-top: 1px solid rgba(255,255,255,0.22); }
.stat:first-of-type { border-top: 0; padding-top: 0; }
.stat b { display: block; font-family: var(--display); font-size: 2rem; line-height: 1.05; }
.stat span { font-size: 0.93rem; color: #e6dfff; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li { background: var(--violet-soft); color: var(--ink-2); border-radius: 999px; padding: 4px 12px; font-size: 0.9rem; font-weight: 500; }
.chips.amber li { background: var(--amber-soft); }

.edu-line { margin: 0 0 4px; font-weight: 600; }
.edu-sub { margin: 0; color: var(--muted); font-size: 0.95rem; }
.edu-score { font-family: var(--display); font-weight: 700; font-size: 2.2rem; line-height: 1; margin: 16px 0 2px; }

.home-chart { margin-top: 18px; padding: 18px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); }
.home-chart-title { margin: 0 0 12px; font-family: var(--display); font-weight: 700; }
.home-chart .bars { gap: 10px; }

/* bars */
.bars { display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 90px 1fr 80px; align-items: center; gap: 12px; }
.bar-row .name { font-size: 0.95rem; color: var(--muted); }
.bar-track { height: 18px; border-radius: 999px; background: var(--violet-soft); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: #b9aedb; transform-origin: left; animation: grow 1.2s .3s cubic-bezier(.2,.7,.2,1) both; }
.bar-fill.good { background: var(--violet); }
.bar-row .v { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar-row .v.good { color: var(--violet); }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }


/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--violet-soft); }
.timeline li { position: relative; padding: 0 0 26px 26px; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: 6px; width: 15px; height: 15px; border-radius: 50%; background: var(--paper); border: 3px solid var(--violet); }
.timeline .when { color: var(--muted); font-size: 0.92rem; }
.timeline h3 { font-size: 1.25rem; margin: 2px 0 4px; }
.timeline p { margin: 0; }

ul.ticks { margin: 0; padding-left: 1.2em; }
ul.ticks li { margin-bottom: 8px; }


/* ---------- responsive ---------- */

/* tables */
table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
thead th { font-family: var(--display); color: var(--muted); font-weight: 600; font-size: 0.92rem; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
td.good { color: var(--violet); font-weight: 700; }
caption { caption-side: bottom; text-align: left; color: var(--muted); font-size: 0.88rem; padding-top: 10px; }

/* diagram */
.diagram { width: 100%; height: auto; display: block; }
.diagram .box { fill: var(--card); stroke: var(--line); stroke-width: 1.5; }
.diagram .box.hot { fill: var(--violet-soft); stroke: var(--violet); }
.diagram .box.store { fill: var(--amber-soft); stroke: #f0c46a; }
.diagram text { font-family: var(--body); font-size: 14px; fill: var(--ink); }
.diagram .t { font-weight: 700; font-family: var(--display); font-size: 15px; }
.diagram .s { fill: var(--muted); font-size: 12.5px; }
.diagram .arrow { stroke: var(--muted); stroke-width: 1.6; fill: none; }
.diagram .arrow.dash { stroke-dasharray: 5 5; }

/* next page links */
.next { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 8px; }
.next a { display: block; padding: 18px 20px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.next a:hover { border-color: var(--violet); color: var(--ink); }
.next small { display: block; color: var(--muted); }
.next strong { font-family: var(--display); font-size: 1.2rem; }


@media (max-width: 960px) {
  .t-projects { grid-column: span 6; grid-row: auto; }
  .t-stats, .t-skills, .t-edu, .t-lead, .t-contact { grid-column: span 3; }
  .cols-3 { grid-template-columns: 1fr 1fr; }
  .proj { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav .wrap { flex-direction: column; align-items: flex-start; gap: 8px; }
  .nav li a { padding: 5px 10px; }
  .bento { gap: 14px; padding-top: 32px; }
  .t-stats, .t-skills, .t-edu, .t-lead, .t-contact { grid-column: span 6; }
  .mini, .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 70px 1fr 64px; gap: 8px; }
  .wave { height: 80px; }
  .hero .wrap { padding-top: 44px; }
}



@media print {
  .nav, .wave, .hero-actions { display: none; }
  .hero, .page-head, footer { background: none; color: var(--ink); }
  .hero h1, .hero-lead, .page-head p.lede { color: var(--ink); }
}



/* ---------- inner page header ---------- */
.page-head { background: var(--ink); color: #fff; }
.page-head .wrap { padding-top: 48px; padding-bottom: 44px; }
.crumbs { margin: 0 0 14px; font-size: 0.93rem; color: #bfb3e3; }
.crumbs a { color: #d9d1ef; }
.page-head h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; letter-spacing: -0.02em; }
.page-head p.lede { font-size: 1.2rem; color: #ece7fb; max-width: 52ch; margin: 14px 0 0; line-height: 1.5; }
.page-head .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.page-head .meta li { background: rgba(255,255,255,0.1); color: #fff; }

main.page { padding: 48px 0 72px; }

/* columns layout for inner pages */
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cols-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.block { margin-bottom: 48px; }
.block > h2 { font-size: 1.8rem; margin-bottom: 18px; }
.block > p.intro { max-width: 62ch; color: var(--muted); margin: -8px 0 22px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.card p { margin: 0 0 10px; }
.card p:last-child { margin-bottom: 0; }
.card .label { display: block; color: var(--muted); font-size: 0.9rem; margin-bottom: 6px; }
.card.violet { background: var(--violet); color: #fff; border-color: var(--violet); }
.card.violet .label { color: #e6dfff; }
.card.amber { background: var(--amber-soft); border-color: #f8dca5; }
.card.ink { background: var(--ink); color: #fff; border-color: var(--ink); }
.card.ink .label { color: #bfb3e3; }
.card .num { font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: 1; display: block; margin: 4px 0 8px; }

/* project overview cards */
.proj { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 22px; }
.proj-text { padding: 28px; }
.proj-text h2 { font-size: 2rem; margin-bottom: 6px; }
.proj-text .kind { color: var(--muted); margin: 0 0 16px; }
.proj-side { background: var(--ink); color: #fff; padding: 28px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.proj-side b { font-family: var(--display); font-size: 2.4rem; line-height: 1; display: block; color: var(--amber); }
.proj-side span { color: #d9d1ef; font-size: 0.95rem; }
.proj-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }