/* Aprameya C V — editorial paper theme, shared with the project reports */
:root {
  --paper: #f3f1eb;
  --paper-2: #eae6dc;
  --paper-3: #e4dfd1;
  --ink: #14140f;
  --muted: #6b675c;
  --rule: #d9d3c5;
  --accent: #1e4b3d;
  --accent-soft: #e3eae4;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --pad: clamp(20px, 4vw, 56px);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--accent); color: var(--paper); }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper);
  padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* ---------- navigation ---------- */
.nav {
  position: fixed;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex; align-items: center; gap: 6px;
  padding: 7px 8px 7px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: rgba(243, 241, 235, 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(20, 20, 15, 0.03);
  font-size: 13px;
  letter-spacing: 0.01em;
  max-width: calc(100vw - 24px);
}
.nav .mark {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: -0.01em;
  padding-right: 10px;
  margin-right: 4px;
  border-right: 1px solid var(--rule);
  white-space: nowrap;
}
.nav a.link { padding: 6px 10px; border-radius: 999px; color: var(--muted); transition: color .4s var(--ease), background-color .4s var(--ease); white-space: nowrap; }
.nav a.link:hover { color: var(--ink); background: var(--paper-2); }
.nav a.link[aria-current="page"] { color: var(--ink); }
.nav .pill {
  margin-left: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-size: 12.5px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform .5s var(--ease), background-color .5s var(--ease);
  white-space: nowrap;
}
.nav .pill:hover { background: var(--accent); }
.nav .pill:active { transform: scale(0.98); }
.nav .pill span.arrow { transition: transform .5s var(--ease); }
.nav .pill:hover span.arrow { transform: translate(2px, -2px); }
@media (max-width: 720px) {
  .nav { gap: 2px; padding: 6px 6px 6px 10px; font-size: 12px; }
  .nav .mark { font-size: 15px; padding-right: 8px; }
  .nav a.link { padding: 6px 7px; }
  .nav .link.hide-sm { display: none; }
  .nav .pill { padding: 6px 11px; font-size: 11.5px; }
}

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 22px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--rule); }
h1, h2, h3 { font-weight: 400; margin: 0; }
.display {
  font-family: var(--serif);
  font-size: clamp(44px, 7.2vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.028em;
}
.display em { font-style: italic; color: var(--accent); }
.h2 {
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.lede { font-size: clamp(17px, 1.5vw, 19px); color: var(--muted); max-width: 62ch; margin: 24px 0 0; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.small { font-size: 14px; color: var(--muted); }

/* ---------- hero ---------- */
.hero { padding: clamp(120px, 16vh, 190px) 0 0; }
.hero-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(32px, 6vw, 90px); align-items: end; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 36px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.hero .meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero .meta i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); display: inline-block; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 14px 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper);
  font-size: 14px; letter-spacing: 0.01em;
  transition: transform .5s var(--ease), background-color .5s var(--ease), color .5s var(--ease);
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn:active { transform: scale(0.985); }
.btn .dot { width: 26px; height: 26px; border-radius: 50%; background: rgba(243,241,235,0.14); display: grid; place-items: center; transition: transform .5s var(--ease); }
.btn:hover .dot { transform: translate(2px, -2px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.ghost:hover { background: var(--paper-2); border-color: var(--ink); color: var(--ink); }
.btn.ghost .dot { background: var(--paper-3); }

/* index card */
.card-outer { border: 1px solid var(--rule); border-radius: 22px; padding: 6px; background: rgba(234, 230, 220, 0.55); }
.card-inner { border-radius: 17px; background: var(--paper); border: 1px solid rgba(20,20,15,0.05); padding: 26px; }
.card-inner h3 { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.kv:first-of-type { border-top: 0; padding-top: 0; }
.kv .v { font-family: var(--mono); font-size: 13px; text-align: right; }
.kv .v b { font-weight: 500; color: var(--accent); }

/* ---------- sections ---------- */
section { padding: clamp(72px, 11vh, 130px) 0 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 24px; padding-bottom: 26px; border-bottom: 1px solid var(--rule); margin-bottom: 10px; }
.section-head .count { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.1em; }

/* work list */
.work-list { display: flex; flex-direction: column; }
.work-row {
  position: relative;
  display: grid;
  grid-template-columns: 46px 1fr 168px 22px;
  gap: 24px;
  align-items: center;
  padding: 26px 10px 26px 6px;
  border-bottom: 1px solid var(--rule);
  transition: background-color .55s var(--ease), padding-left .55s var(--ease);
}
.work-row:hover { background: var(--paper-2); padding-left: 16px; }
.work-row .idx { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.work-row .t { display: block; font-family: var(--serif); font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -0.015em; line-height: 1.1; }
.work-row .d { display: block; color: var(--muted); font-size: 14.5px; margin-top: 6px; max-width: 60ch; }
.work-row .stack-inline { display: block; margin-top: 8px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }
.work-row .metric { text-align: right; }
.work-row .metric b { display: block; font-family: var(--mono); font-size: 20px; font-weight: 500; letter-spacing: -0.02em; color: var(--accent); }
.work-row .metric i { display: block; margin-top: 4px; font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.work-row .go { font-size: 18px; color: var(--muted); transition: transform .55s var(--ease), color .55s var(--ease); }
.work-row:hover .go { transform: translate(4px, -4px); color: var(--accent); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .card-outer { max-width: 440px; }
}
@media (max-width: 860px) {
  .work-row { grid-template-columns: 26px 1fr; gap: 12px; padding: 22px 2px; }
  .work-row .go { display: none; }
  .work-row .metric { grid-column: 2; display: flex; gap: 8px; align-items: baseline; text-align: left; margin-top: 10px; }
  .work-row .metric b { font-size: 14px; }
  .work-row .metric i { margin: 0; font-size: 9.5px; }
  .work-row:hover { padding-left: 8px; }
}

/* experience */
.xp { display: grid; grid-template-columns: 190px 1fr; gap: clamp(20px, 4vw, 60px); padding: 30px 0; border-bottom: 1px solid var(--rule); }
.xp:first-of-type { border-top: 1px solid var(--rule); }
.xp .when { font-family: var(--mono); font-size: 11.5px; color: var(--muted); letter-spacing: 0.04em; }
.xp h3 { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.xp .role { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.xp ul { margin: 14px 0 0; padding: 0; list-style: none; }
.xp li { position: relative; padding-left: 18px; font-size: 14.5px; color: #3c3a32; margin: 6px 0; }
.xp li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 8px; height: 1px; background: var(--rule); }
@media (max-width: 760px) { .xp { grid-template-columns: 1fr; gap: 10px; } }

/* about + stack */
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 5vw, 72px); }
.split p { margin: 0 0 16px; color: #33312a; }
.stack-grid { display: grid; gap: 18px; }
.stack-item { border-top: 1px solid var(--rule); padding-top: 14px; }
.stack-item h4 { margin: 0 0 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.stack-item p { margin: 0; font-size: 14.5px; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

/* contact */
.contact { padding: clamp(80px, 12vh, 150px) 0 0; }
.contact .display { max-width: 20ch; }
.contact-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.contact-links a {
  border: 1px solid var(--rule); border-radius: 999px; padding: 10px 18px; font-size: 14px;
  display: inline-flex; align-items: center; gap: 10px;
  transition: background-color .45s var(--ease), border-color .45s var(--ease), transform .45s var(--ease);
}
.contact-links a:hover { background: var(--paper-2); border-color: var(--ink); }
.contact-links a:active { transform: scale(0.985); }
.contact-links .k { font-family: var(--mono); font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }

footer { margin-top: clamp(70px, 10vh, 120px); border-top: 1px solid var(--rule); }
.foot { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; padding: 26px 0 40px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* ---------- project page ---------- */
.proj-head { padding-top: clamp(120px, 15vh, 170px); }
.proj-head .kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.proj-head h1 { font-family: var(--serif); font-size: clamp(38px, 5.6vw, 68px); line-height: 1.02; letter-spacing: -0.025em; margin: 14px 0 0; max-width: 22ch; }
.proj-head .sub { margin-top: 20px; font-size: 18px; color: var(--muted); max-width: 66ch; }
.proj-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.tag { border: 1px solid var(--rule); border-radius: 999px; padding: 5px 12px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; margin: 44px 0 0; }
.stat { background: var(--paper); padding: 22px 20px; }
.stat b { display: block; font-family: var(--serif); font-size: clamp(30px, 3.4vw, 42px); font-weight: 400; letter-spacing: -0.02em; line-height: 1; }
.stat span { display: block; margin-top: 10px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.prose { max-width: 70ch; }
.prose h2 { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -0.015em; margin: 0 0 12px; }
.prose p { margin: 0 0 16px; color: #33312a; }
.prose ul { margin: 0 0 18px; padding-left: 18px; color: #33312a; }
.prose li { margin: 5px 0; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); }
.block { padding: 40px 0 0; }
@media (max-width: 800px) { .cols { grid-template-columns: 1fr; } }
table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0 0; }
th { text-align: left; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--ink); padding: 9px 10px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; }
td { border-bottom: 1px solid var(--rule); padding: 11px 10px; font-variant-numeric: tabular-nums; }
td.num, th.num { text-align: right; }
.report-cta { display: inline-flex; align-items: center; gap: 12px; margin-top: 26px; padding: 13px 14px 13px 20px; border: 1px solid var(--ink); border-radius: 999px; font-size: 14px; }
.report-cta .dot { width: 24px; height: 24px; border-radius: 50%; background: var(--paper-3); display: grid; place-items: center; transition: transform .5s var(--ease); }
.report-cta:hover .dot { transform: translate(2px, -2px); }
.note { border-left: 2px solid var(--accent); padding: 2px 0 2px 16px; color: var(--muted); font-size: 14.5px; }

/* reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.001ms !important; }
}

/* action links inside the project meta row read as links, not tags */
a.tag { color: var(--ink); border-color: var(--ink); transition: background-color .4s var(--ease), color .4s var(--ease); }
a.tag:hover { background: var(--ink); color: var(--paper); }
.proj-meta a.tag { border-style: solid; }
