/* amanmundra.com — karpathy-minimal, Welzin blue.
   Tokens from the Welzin brand kit: Honolulu #007CC3, Violet #1F49B6, ink #191E25. */

:root {
  --ink: #191E25;
  --muted: #5A6572;
  --blue: #007CC3;
  --violet: #1F49B6;
  --hairline: #DCE6EE;
  --paper: #FFFFFF;
  --band: #F2F6FA;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.65 "Poppins", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Sections are full-bleed bands; .wrap holds the reading column. */
.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- header ---- */

header { padding: 56px 0 0; }

.head {
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: 32px;
  align-items: start;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--hairline);
}

/* natural aspect ratio, top-aligned with the h1 — no crop */
.headshot {
  width: 100%;
  height: auto;
  margin-top: 6px;
  border-radius: 4px;
}

h1 {
  font: 300 2.35rem/1.15 "Fraunces", Georgia, serif;
  letter-spacing: -0.015em;
  margin: 0 0 2px;
}

h1 .legal {
  font-size: 1.15rem;
  color: var(--muted);
  font-weight: 300;
  white-space: nowrap;
}

.role {
  margin: 2px 0 18px;
  color: var(--violet);
  font-weight: 500;
  font-size: 0.95rem;
}

.lede { margin: 0 0 18px; }

.links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0;
}

.links a {
  font: 500 0.8rem/1 "JetBrains Mono", monospace;
  color: var(--blue);
  text-decoration: none;
  border: 1px solid var(--hairline);
  border-radius: 4px;
}

.links a:hover, .links a:focus-visible {
  border-color: var(--blue);
  color: var(--violet);
}

/* named buttons: same 34px box as the icon buttons, label optically centred */
a.brandlink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 15px;
  letter-spacing: 0.01em;
  background: var(--paper);
}

a.brandlink:hover, a.brandlink:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 1px 3px rgba(25, 30, 37, 0.08);
}

/* icon links: original brand colors, quiet chrome.
   a.iconlink ties .links a specificity; declared later so it wins the padding. */
a.iconlink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 4px;
}

a.iconlink:hover, a.iconlink:focus-visible { border-color: var(--blue); }
.iconlink svg { display: block; }

.icons {
  display: flex;
  gap: 10px;
  margin: 10px 0 14px;
}

/* ---- sections ---- */

/* alternating bands, karpathy-style: full-bleed shade, reading column inside */
section { padding: 38px 0; }
section:nth-of-type(even) { background: var(--band); }

/* company rows in Now: brand mark + description */
.company {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin: 0 0 16px;
}
.company .cmark {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  object-fit: contain;
  margin-top: 2px;
}
.company p { margin: 0; }

h2 {
  font: 300 1.45rem/1.2 "Fraunces", Georgia, serif;
  color: var(--ink);
  margin: 0 0 12px;
}

h3 {
  font: 600 0.95rem/1.4 "Poppins", sans-serif;
  margin: 18px 0 4px;
}

p { margin: 0 0 12px; }

a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--violet); }

/* ---- the signature: hairline-blue career timeline ---- */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--blue);
}

.timeline li {
  display: flex;
  gap: 14px;
  padding: 0 0 16px 16px;
  position: relative;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--blue);
}

.timeline .when {
  flex: 0 0 4.6em;
  font: 500 0.78rem/1.9 "JetBrains Mono", monospace;
  color: var(--blue);
  white-space: nowrap;
}

/* ---- talks ---- */

.talks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.talk h3 { margin: 0 0 2px; font-size: 0.95rem; line-height: 1.35; }
.talk .where { margin: 0 0 10px; color: var(--muted); font-size: 0.8rem; }
.embed { aspect-ratio: 16 / 9; margin-bottom: 9px; background: var(--hairline); border-radius: 6px; overflow: hidden; }
.embed iframe { width: 100%; height: 100%; border: 0; display: block; }

h3.sub { margin: 28px 0 8px; font-size: 0.95rem; color: var(--muted); }

/* ---- lists, footer ---- */

.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: 3px 0; }

.mono { font-family: "JetBrains Mono", monospace; font-size: 0.9em; }

footer {
  padding: 26px 0 34px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---- featured writing ---- */

.reading { list-style: none; margin: 0 0 12px; padding: 0; }
.reading li { padding: 5px 0 5px 18px; position: relative; }
.reading li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

.fine { font-size: 0.8rem; }

/* ---- small screens ---- */

@media (max-width: 760px) {
  header { padding-top: 36px; }
  .talks-grid { grid-template-columns: 1fr; }
  .head { grid-template-columns: 1fr; gap: 20px; }
  .head .headshot { grid-row: 1; width: 100%; max-width: 300px; height: auto; }
  h1 { font-size: 1.9rem; }
  h1 .legal { display: block; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
