/* ----------------------------------------------------------
   Akshay Sinha — akshaysinha.me
   Ink canvas · gold compounding curve · paper text
---------------------------------------------------------- */

:root {
  --ink:        #0C0F16;
  --raise:      #121622;
  --paper:      #E9E4D8;
  --muted:      #8E8A80;
  --gold:       #D9A23B;
  --gold-dim:   rgba(217, 162, 59, 0.35);
  --line:       rgba(233, 228, 216, 0.10);

  --serif: 'Newsreader', Georgia, serif;
  --sans:  'Instrument Sans', -apple-system, 'Segoe UI', sans-serif;
  --mono:  'IBM Plex Mono', 'SF Mono', monospace;

  --measure: 38rem;
  --pad: clamp(1.25rem, 5vw, 4rem);

  /* Centered 72rem composition; full-bleed section borders, padded content */
  --content: 72rem;
  --gutter: max(var(--pad), calc((100vw - var(--content)) / 2));
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--paper);
  background-color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: var(--ink); }

a {
  color: var(--paper);
  text-decoration: underline;
  text-decoration-color: var(--gold-dim);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}
a:hover { color: var(--gold); text-decoration-color: var(--gold); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Top bar -------------------------------------------- */

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  padding: 1.5rem var(--gutter);
  border-bottom: 1px solid var(--line);
}

.monogram {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-decoration: none;
}
.monogram:hover { color: var(--gold); }

.top-meta {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* --- Hero ------------------------------------------------ */

.hero {
  padding: clamp(4rem, 10vw, 7rem) var(--gutter) 3.5rem;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 18em;
}

h1 .name { font-weight: 500; }

h1 em {
  font-style: italic;
  color: var(--gold);
}

.lede {
  max-width: var(--measure);
  margin-top: 1.5rem;
  font-size: 1.125rem;
  color: var(--muted);
}

/* --- Compounding curve (signature) ----------------------- */

.curve {
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.curve svg {
  display: block;
  width: 100%;
  height: clamp(110px, 20vw, 200px);
  overflow: visible;
}

.curve-path {
  stroke: var(--gold);
  stroke-width: 1.5;
  stroke-dasharray: 1000;
  stroke-dashoffset: 0;
}

.curve-dot { fill: var(--gold); }

.curve.animate .curve-path {
  stroke-dashoffset: 1000;
  animation: draw 1.4s cubic-bezier(0.6, 0, 0.2, 1) forwards;
}

.curve.animate .curve-dot {
  opacity: 0;
  animation: appear 0.4s ease forwards;
}
.curve.animate .curve-dot:nth-of-type(2) { animation-delay: 0.25s; }
.curve.animate .curve-dot:nth-of-type(3) { animation-delay: 0.55s; }
.curve.animate .curve-dot:nth-of-type(4) { animation-delay: 0.85s; }
.curve.animate .curve-dot:nth-of-type(5) { animation-delay: 1.1s; }
.curve.animate .curve-dot:nth-of-type(6) { animation-delay: 1.35s; }

@keyframes draw   { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }

.kicker {
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: right;
}

/* --- Content blocks -------------------------------------- */

.block {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1.5rem;
  padding: clamp(3rem, 5vw, 4rem) var(--gutter);
  border-top: 1px solid var(--line);
}

.label {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  padding-top: 0.3rem;
}

.block-body { max-width: 44rem; }

.block-body p + ul,
.block-body ul + p { margin-top: 1.5rem; }

.aside { color: var(--muted); font-size: 0.9375rem; }

/* --- Ledger rows ------------------------------------------ */

.ledger { list-style: none; }

.ledger li {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.ledger li:last-child { border-bottom: none; }

.ledger-key {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--paper);
}

.ledger-val {
  font-size: 0.9375rem;
  color: var(--muted);
}

/* --- Links / footer --------------------------------------- */

.socials {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.socials a {
  display: inline-flex;
  color: var(--muted);
  text-decoration: none;
}
.socials a:hover { color: var(--gold); }

.socials svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding: 2rem var(--gutter) 3rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
}

.footer-kicker { color: var(--gold-dim); }

/* --- Reveal on scroll -------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: none; }

/* --- Responsive / motion ----------------------------------- */

/* Two-column hero: text left (~56%), curve fills right, bottom-aligned */
@media (min-width: 1024px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    column-gap: clamp(2rem, 5vw, 4rem);
    align-items: end;
  }
  .curve {
    margin-top: 0;
    align-self: end;
  }
  .curve svg {
    height: clamp(180px, 26vw, 320px);
  }
}

@media (max-width: 640px) {
  .block { grid-template-columns: 1fr; gap: 0.75rem; }
  .ledger li { grid-template-columns: 1fr; gap: 0.15rem; padding: 0.85rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .curve.animate .curve-path,
  .curve.animate .curve-dot { animation: none; opacity: 1; stroke-dashoffset: 0; }
}
