/* Chalkboard — Udit Ranasaria. Understated researcher page with football-broadcast color. */

:root {
  --bg:        #0f1411;   /* chalkboard: near-black, faint green */
  --panel:     #151b17;   /* card */
  --panel-hi:  #1a221c;
  --text:      #e9ebe3;   /* chalk */
  --muted:     #97a199;   /* dimmed chalk */
  --soft:      #c4c9bf;   /* body copy */
  --accent:    #6cae84;   /* line of scrimmage — field green */
  --accent-hi: #8bd0a4;
  --flag:      #e4c15f;   /* first-down line — chalk yellow */
  --flag-hi:   #f0d47e;
  --border:    rgba(233, 235, 227, 0.11);
  --border-hi: rgba(139, 208, 164, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* chalkboard X's-and-O's — subtle, in the margins */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background: url("chalk.svg") repeat;
  background-size: 300px 300px;
  opacity: 0.12;
  pointer-events: none;
}

/* centered column keeps a solid bg so the texture only shows in the margins */
.wrap { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 24px 96px; background: transparent; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 3px; }

/* top bar */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; margin-bottom: 14px;
  background: linear-gradient(var(--bg) 78%, rgba(15,20,17,0));
}
.brand img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; display: block; border: 1px solid var(--border); }
.top nav { display: flex; gap: 22px; }
.top nav a { color: var(--muted); font-size: 14px; }
.top nav a:hover { color: var(--accent-hi); text-decoration: none; }

/* hero */
.hero { display: flex; gap: clamp(24px, 5vw, 48px); align-items: center; padding: 30px 0 8px; }
.hero-text { flex: 1; min-width: 0; }
h1 { font-size: clamp(29px, 4.6vw, 37px); font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.accent {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-hi) 60%, var(--flag) 130%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--accent);
}
.role { margin: 5px 0 18px; color: var(--muted); font-size: 17px; font-weight: 500; }
.role a { color: var(--soft); }
.lede { color: var(--soft); margin: 0 0 14px; }
.hero-photo img {
  width: clamp(150px, 18vw, 192px); height: clamp(150px, 18vw, 192px); border-radius: 50%; object-fit: cover;
  border: 1px solid var(--border-hi);
  box-shadow: 0 0 0 6px rgba(108,174,132,0.06);
}

/* social icons */
.socials { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 9px;
  border: 1px solid var(--border); color: var(--muted);
  transition: color .15s, border-color .15s, background .15s;
}
.icon:hover { color: var(--accent-hi); border-color: var(--border-hi); background: rgba(108,174,132,0.08); text-decoration: none; }

/* sections */
section { margin: 52px 0; scroll-margin-top: 72px; }
.eyebrow { color: var(--flag); font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; margin: 0 0 6px; }
.eyebrow.sub { margin-top: 40px; margin-bottom: 14px; }
h2 { font-size: clamp(22px, 3.2vw, 27px); font-weight: 700; letter-spacing: -0.01em; margin: 0 0 6px; }
.intro-p { color: var(--soft); margin: 10px 0 24px; }

/* work items — media row: thumbnail + body (suvan.sh style) */
.work-item {
  display: flex; gap: 20px; align-items: stretch;
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--panel); padding: 18px; margin: 16px 0;
  transition: border-color .15s, background .15s;
}
.work-item:hover { border-color: var(--border-hi); background: var(--panel-hi); }
.thumb {
  flex: 0 0 136px; width: 136px; height: 136px;
  border-radius: 10px; overflow: hidden; display: block;
  border: 1px solid var(--border); background: #0c110e;
  align-self: center;
  position: relative;
}
/* soft inset vignette so bright thumbnails sit into the dark card instead of on it */
.thumb::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(15, 20, 17, 0.35), inset 0 0 14px rgba(15, 20, 17, 0.30);
  pointer-events: none;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.thumb:hover img { transform: scale(1.04); }
.thumb.contain { background: #0c110e; }
.thumb.contain img { object-fit: contain; padding: 6px; }

.body { flex: 1; min-width: 0; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 4px; }
.card-head h3 { font-size: 18px; font-weight: 600; margin: 0; color: var(--text); }
.card-head h3 a { color: var(--text); }
.card-head h3 a:hover { color: var(--accent-hi); text-decoration: none; }
.meta { color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.byline { color: var(--flag); font-size: 13.5px; font-style: italic; margin: 0 0 6px; opacity: 0.92; }
.body p { margin: 6px 0 0; color: var(--soft); font-size: 15.5px; }
.adopted { font-size: 15px; margin-top: 12px !important; }
.lead { color: var(--text); font-weight: 600; }
.lead.flag { color: var(--flag); }

/* adoption receipts — compact who-built-on-it list inside the flagship card */
.receipts { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.receipts li { position: relative; padding-left: 15px; color: var(--soft); font-size: 14.5px; line-height: 1.55; }
.receipts li::before {
  content: ""; position: absolute; left: 1px; top: 0.55em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); opacity: 0.75;
}

/* buttons */
.btns { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 4px 13px; border-radius: 7px;
  border: 1px solid var(--border-hi); color: var(--accent);
  font-size: 13px; font-weight: 500;
}
.btn:hover { background: rgba(108,174,132,0.12); color: var(--accent-hi); text-decoration: none; }
.btn.muted { border-color: var(--border); color: var(--muted); }

/* teaching role cards (compact) */
.role-card {
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--panel); padding: 16px 20px; margin: 14px 0;
  transition: border-color .15s, background .15s;
}
.role-card:hover { border-color: var(--border-hi); background: var(--panel-hi); }
.role-card .card-head { margin-bottom: 6px; }
.role-card p { margin: 6px 0 0; color: var(--soft); font-size: 15.5px; }
.role-card .btns { margin-top: 12px; }

/* talk entries — accent-bar list */
.entries { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.entry {
  position: relative; background: var(--panel);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 18px 14px 20px;
}
.entry::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--flag));
  border-radius: 8px 0 0 8px;
}
.entry p { margin: 0; color: var(--soft); font-size: 15.5px; }

/* footer */
footer { margin-top: 64px; padding-top: 26px; color: var(--muted); font-size: 14.5px; }
footer::before {
  content: ""; display: block; height: 2px; margin-bottom: 26px;
  background: linear-gradient(90deg, var(--accent), var(--flag) 70%, transparent);
  border-radius: 2px; opacity: 0.8;
}
footer a { color: var(--muted); }
footer a:hover { color: var(--accent-hi); }

/* responsive */
@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px 80px; }
  .top { gap: 12px; }
  .top nav { gap: 15px; }
  .top nav a { font-size: 13px; }
  .hero { flex-direction: column-reverse; align-items: flex-start; gap: 20px; }
  .hero-photo img { width: 116px; height: 116px; }
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  .work-item { flex-direction: column; gap: 14px; }
  .thumb { flex: none; width: 100%; height: 172px; align-self: stretch; }
  .card-head { flex-direction: column; gap: 2px; }
  .meta { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .thumb:hover img { transform: none; }
}
