/* ---------- Design tokens ---------- */
:root {
  --bg: #f7f4ee;
  --bg-elev: #fffdf9;
  --text: #17191f;
  --muted: #666a73;
  --line: #e5dfd4;
  --accent: #0f6f6f;
  --accent-2: #e2593b;
  --accent-soft: #dff0ee;
  --coral-soft: #fde8e1;
  --amber-soft: #fff1d6;
  --chip: #efeae1;
  --ring: conic-gradient(from 180deg, #0f6f6f, #e2593b, #f4a261, #0f6f6f);
  --shadow: 0 1px 2px rgba(20,20,30,.06), 0 12px 32px -14px rgba(20,20,30,.22);
  --radius: 16px;
  --maxw: 1060px;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;   /* display face: name, page titles, section headings */
  --display: "Space Grotesk", "Inter", -apple-system, sans-serif; /* labels and years */
  /* Year / date labels: edit these five lines and every year on the site follows */
  --year-font: var(--display);
  --year-size: 1.3rem;
  --year-weight: 700;
  --year-color: var(--accent);
  --year-tracking: -0.02em;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111318; --bg-elev: #191c23; --text: #ecebe6; --muted: #9a9ca4; --line: #2a2e37;
    --accent: #5fcfcf; --accent-2: #ff8a6b; --accent-soft: #10303a; --coral-soft: #3b2119; --amber-soft: #3a2d12; --chip: #22262e;
    --shadow: 0 1px 2px rgba(0,0,0,.5), 0 16px 40px -16px rgba(0,0,0,.7);
  }
}
:root[data-theme="dark"] {
  --bg: #111318; --bg-elev: #191c23; --text: #ecebe6; --muted: #9a9ca4; --line: #2a2e37;
  --accent: #5fcfcf; --accent-2: #ff8a6b; --accent-soft: #10303a; --coral-soft: #3b2119; --amber-soft: #3a2d12; --chip: #22262e;
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 16px 40px -16px rgba(0,0,0,.7);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans);
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
h1, h2 { font-family: var(--serif); font-variation-settings: "opsz" 96, "SOFT" 30; letter-spacing: -0.015em; }
h2 { font-size: 2rem; font-weight: 600; margin-bottom: 1.25rem; }
h3 { font-size: 1.05rem; font-weight: 600; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
section { padding: 56px 0; position: relative; }
section + section::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(var(--maxw), calc(100% - 40px)); height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 15%, var(--line) 85%, transparent);
}
.muted { color: var(--muted); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-size: .74rem; text-transform: uppercase;
  letter-spacing: .16em; color: var(--accent-2); font-weight: 700; margin-bottom: .6rem;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent-2); border-radius: 2px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 10; backdrop-filter: saturate(180%) blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: center; height: 56px; }
.brand {
  font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--text); letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; margin-right: 12px;
}
.brand:hover { text-decoration: none; color: var(--accent); }
.nav ul { list-style: none; display: flex; gap: 0; margin: 0; padding: 0; flex-shrink: 0; }
.nav li a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: .9rem; }
.nav li a svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .85; }
.nav li a[aria-current="page"] svg { opacity: 1; }
.nav li a:hover { background: var(--chip); color: var(--text); text-decoration: none; }
.nav li a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 76px 0 64px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; top: 0; bottom: 0; right: 0; left: 44%; z-index: -1;
  background: url("img/banner.png") right center / contain no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 34%); mask-image: linear-gradient(90deg, transparent 0%, #000 34%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: none;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero::before { opacity: .7; } }
:root[data-theme="dark"] .hero::before { opacity: .7; }
.hero .grid { display: grid; grid-template-columns: 200px 1fr; gap: 40px; align-items: center; }
.avatar-ring { width: 200px; height: 200px; border-radius: 50%; padding: 5px; background: var(--ring); box-shadow: var(--shadow); }
.avatar { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid var(--bg-elev); background: var(--bg-elev); }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 700; }
.hero .role { font-size: 1.15rem; color: var(--muted); margin: 8px 0 16px; }
.hero .role b { color: var(--accent); font-weight: 600; }
.hero p.lede { max-width: 54ch; margin: 0 0 22px; font-size: 1.05rem; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.links a {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: var(--bg-elev); color: var(--text); font-weight: 500; font-size: .9rem; border: 1px solid var(--line);
  transition: transform .15s ease, border-color .15s ease, color .15s ease;
}
.links a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.links svg { width: 16px; height: 16px; }


/* ---------- Timeline ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, var(--accent), var(--accent-2)); border-radius: 2px; opacity: .6; }
.timeline li { position: relative; padding: 0 0 20px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -22px; top: 7px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
}
.timeline li:first-child::before { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.timeline .when { display: block; margin-bottom: 2px; }
.timeline .what { font-weight: 600; display: block; margin-top: 2px; }
.timeline .where { color: var(--muted); font-weight: 400; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; color: var(--text); position: relative;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); text-decoration: none; }
.card .thumb { aspect-ratio: 16/10; background: var(--chip); overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
a.card:hover .thumb img { transform: scale(1.04); }
.card .thumb.contain { background: #fff; }
.card .thumb.contain img { object-fit: contain; padding: 20px; }
.card .body { padding: 16px 18px 18px; }
.card .meta { font-size: .76rem; color: var(--accent-2); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.card h3 { font-size: 1.02rem; line-height: 1.35; }
.card p { margin: 8px 0 0; color: var(--muted); font-size: .92rem; }

/* ---------- Service ---------- */
.service { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }
.service > div { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.service h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-family: var(--serif); font-size: 1.25rem; }
.service h3 .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.service h3 .ic svg { width: 16px; height: 16px; }
.service > div:nth-child(1) .ic { background: var(--accent); }
.service > div:nth-child(2) .ic { background: var(--accent-2); }
.service > div:nth-child(3) .ic { background: #d98b2b; }
.service ul { list-style: none; margin: 0; padding: 0; }
.service li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.service li:last-child { border-bottom: 0; }
.service .yr { color: var(--muted); white-space: nowrap; flex-shrink: 0; font-size: .82rem; font-variant-numeric: tabular-nums; }

/* ---------- Page heads (Publications / Code) ---------- */
.page-head { padding: 56px 20px 24px; position: relative; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 700; }
.page-head p { font-size: 1.05rem; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 20px; }
.toolbar input {
  flex: 1 1 280px; padding: 11px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg-elev); color: var(--text); font: inherit; font-size: .95rem; box-shadow: var(--shadow);
}
.toolbar input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.count { color: var(--muted); font-size: .9rem; }

/* ---------- Publications ---------- */
.year { padding: 28px 0 8px; display: grid; grid-template-columns: 110px 1fr; gap: 24px; }
.year h2 { padding-top: 4px; position: sticky; top: 70px; align-self: start; }
.pubs { list-style: none; margin: 0; padding: 0; }
.pub { padding: 16px 18px; margin-bottom: 10px; background: var(--bg-elev); border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s ease, box-shadow .15s ease; }
.pub:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: var(--shadow); }
.pub .title { font-weight: 600; font-size: 1.02rem; line-height: 1.35; }
.pub .authors { color: var(--muted); font-size: .92rem; margin-top: 3px; }
.pub .authors b { color: var(--text); font-weight: 600; }
.pub .venue { font-size: .9rem; margin-top: 2px; color: var(--muted); font-style: italic; }
.pub .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pill {
  display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  background: var(--chip); color: var(--text); border: 1px solid transparent;
}
a.pill { background: var(--accent-soft); color: var(--accent); }
a.pill:hover { border-color: var(--accent); text-decoration: none; }
a.pill[href*="github"] { background: var(--amber-soft); color: #8a5a00; }
a.pill[href*="youtube"], a.pill[href*="techtalks"] { background: var(--coral-soft); color: var(--accent-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) a.pill[href*="github"] { color: #f4c56b; } }
:root[data-theme="dark"] a.pill[href*="github"] { color: #f4c56b; }
.pill.award { background: var(--amber-soft); color: #8a5a00; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.award { color: #f4c56b; } }
:root[data-theme="dark"] .pill.award { color: #f4c56b; }
.pill.note { background: transparent; color: var(--muted); border-color: var(--line); font-weight: 500; }
.year.hidden, .pub.hidden { display: none; }

/* ---------- Code page ---------- */
.projects { display: grid; gap: 22px; }
.project {
  display: grid; grid-template-columns: 320px 1fr; gap: 24px; background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s ease, border-color .2s ease;
}
.project:hover { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.project .thumb { background: #fff; display: flex; align-items: center; justify-content: center; padding: 16px; border-right: 1px solid var(--line); }
.project .thumb img { max-height: 230px; object-fit: contain; }
.project .body { padding: 24px 26px; }
.project h3 { font-family: var(--serif); font-size: 1.45rem; margin-bottom: 8px; }
.project p { margin: 0 0 14px; color: var(--muted); }
.project code { font-size: .9em; background: var(--chip); padding: 1px 6px; border-radius: 6px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; font-size: .9rem; transition: transform .15s ease, filter .15s ease; }
.btn:hover { text-decoration: none; filter: brightness(1.08); transform: translateY(-1px); }
.btn svg { width: 15px; height: 15px; }

/* ---------- Footer ---------- */
footer { margin-top: 24px; border-top: 1px solid var(--line); padding: 28px 0 44px; color: var(--muted); font-size: .88rem; position: relative; }
footer::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2), #f4a261); }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .hero::before { left: 54%; } }
@media (max-width: 760px) {
  .hero { padding: 44px 0 32px; }
  .hero::before { left: 0; background-size: cover; background-position: center; opacity: .3; -webkit-mask-image: none; mask-image: none; }
  .hero .grid { grid-template-columns: 1fr; gap: 22px; text-align: center; }
  .avatar-ring { margin: 0 auto; width: 160px; height: 160px; }
  .hero p.lede { margin-left: auto; margin-right: auto; }
  .links { justify-content: center; }
  .two-col, .service { grid-template-columns: 1fr; gap: 28px; }
  .year { grid-template-columns: 1fr; gap: 4px; }
  .year h2 { position: static; }
  .project { grid-template-columns: 1fr; }
  .project .thumb { border-right: 0; border-bottom: 1px solid var(--line); }
  .nav li a { padding: 6px 9px; font-size: .9rem; }
  h2 { font-size: 1.7rem; }
}
@media (max-width: 560px) {
  .nav li a span { display: none; }
  .nav li a { padding: 8px 10px; }
  .nav li a svg { width: 18px; height: 18px; }
}
@media (max-width: 480px) {
  .brand { font-size: 1rem; }
  .hero h1 { font-size: 2.1rem; }
}

/* ---------- Nav brand with avatar ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.mono {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  font-family: var(--serif); font-weight: 700; font-size: .95rem; letter-spacing: -0.02em; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.brand:hover .mono { filter: brightness(1.08); }
.brand--home { margin-right: 0; }

/* ---------- Timeline with logos ---------- */
.timeline { padding-left: 56px; }
.timeline::before { left: 19px; }
.timeline li::before { display: none; }
.timeline .logo {
  position: absolute; left: -56px; top: 0; width: 40px; height: 40px; border-radius: 50%; object-fit: contain;
  padding: 5px; background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.timeline li { min-height: 44px; }
.timeline .logo[src*="amazon"] { padding: 4px; }
.timeline .logo[src*="mit"] { padding: 5px; }
.timeline .logo[src*="linkedin"], .timeline .logo[src*="meta"], .timeline .logo[src*="ualberta"], .timeline .logo[src*="sharif"] { padding: 2px; }

/* ---------- Highlights timeline ---------- */
.hl { list-style: none; margin: 0; padding: 0; position: relative; }
.hl::before { content: ""; position: absolute; left: 131px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(180deg, var(--accent), var(--accent-2) 60%, #f4a261); border-radius: 2px; opacity: .55; }
.hl li { display: grid; grid-template-columns: 110px 1fr; gap: 44px; padding: 0 0 22px; position: relative; }
.hl li:last-child { padding-bottom: 0; }
.hl li::before { content: ""; position: absolute; left: 125px; top: 24px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent-2); z-index: 1; }
.hl li:first-child::before { background: var(--accent-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 22%, transparent); }
.hl-year { text-align: right; padding-top: 12px; white-space: nowrap; }
.hl-card {
  display: grid; grid-template-columns: 112px 1fr; gap: 18px; align-items: center; color: var(--text);
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
a.hl-card:hover { transform: translateX(4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); text-decoration: none; }
.hl-card img { width: 112px; height: 72px; object-fit: contain; border-radius: 8px; background: #fff; padding: 4px; border: 1px solid var(--line); }
.hl-card .meta { font-size: .74rem; color: var(--accent-2); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }
.hl-card h3 { font-size: 1.08rem; line-height: 1.35; }
.hl-card p { margin: 6px 0 0; color: var(--muted); font-size: .92rem; }
@media (max-width: 760px) {
  .hl::before, .hl li::before { display: none; }
  .hl li { grid-template-columns: 1fr; gap: 6px; }
  .hl-year { text-align: left; padding-top: 0; }
  .hl-card { grid-template-columns: 112px 1fr; }
}

/* ---------- Publications: elegant list ---------- */
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button {
  font: inherit; font-size: .82rem; font-weight: 600; padding: 6px 13px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--muted); border: 1px solid var(--line);
}
.filters button:hover { color: var(--text); border-color: var(--muted); }
.filters button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.year { grid-template-columns: 120px 1fr; gap: 32px; padding: 26px 0 2px; }
.pub { padding: 10px 0 10px 20px; margin: 0; background: transparent; border: 0; border-left: 2px solid var(--line); border-radius: 0; position: relative; transition: border-color .2s ease; }
.pub:hover { box-shadow: none; border-left-color: var(--accent-2); }
.pub::before { content: ""; position: absolute; left: -6px; top: 17px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); transition: border-color .2s ease, background .2s ease; }
.pub:hover::before { border-color: var(--accent-2); background: var(--accent-2); }
.pub .title { font-family: var(--serif); font-weight: 600; font-size: 1.08rem; line-height: 1.3; letter-spacing: -0.005em; }
.pub .title a { color: var(--text); }
.pub .title a:hover { color: var(--accent); text-decoration: none; }
.pub .authors { margin-top: 2px; font-size: .86rem; line-height: 1.45; }
.pub .venue { font-style: normal; margin-top: 1px; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.pub .venue em { font-style: italic; color: var(--text); }
.pub .tags { margin-top: 5px; gap: 12px; align-items: center; }
.pub .tags a { font-size: .8rem; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 5px; background: none; padding: 0; border: 0; border-radius: 0; }
.pub .tags a::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .6; }
.pub .tags a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pub .tags a[href*="github"] { color: #b06d00; }
.pub .tags a[href*="youtube"], .pub .tags a[href*="techtalks"] { color: var(--accent-2); }
.pub .tags .pill { font-size: .74rem; padding: 2px 9px; }
.pub .tags .pill.award { background: var(--amber-soft); color: #8a5a00; }
.pub .tags .pill.note { color: var(--muted); border-color: var(--line); background: transparent; }
@media (max-width: 760px) { .year { grid-template-columns: 1fr; } }

/* ---------- Notes (LinkedIn articles) ---------- */
.post-year { padding: 28px 0 4px; display: grid; grid-template-columns: 120px 1fr; gap: 32px; }
.post-year::before { display: none; }
.post-year h2 { padding-top: 4px; position: sticky; top: 70px; align-self: start; margin: 0; }
.posts { list-style: none; margin: 0; padding: 0; position: relative; }
.posts::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.post { position: relative; padding: 4px 0 26px 26px; }
.post:last-child { padding-bottom: 8px; }
.post::before { content: ""; position: absolute; left: -4px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent-2); }
.post time { display: block; margin-bottom: 8px; }
.note-card {
  display: grid; grid-template-columns: 220px 1fr; gap: 0; color: var(--text); overflow: hidden;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.note-card:hover { text-decoration: none; transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: var(--shadow); }
.note-cover { background: var(--chip); min-height: 150px; }
.note-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.note-card:hover .note-cover img { transform: scale(1.04); }
.note-body { padding: 18px 22px 16px; display: flex; flex-direction: column; }
.note-body h3 { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; line-height: 1.25; margin-bottom: 8px; }
.note-body p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.55; }
.note-cta { margin-top: auto; padding-top: 12px; font-size: .84rem; font-weight: 600; color: var(--accent); }
@media (max-width: 760px) {
  .post-year { grid-template-columns: 1fr; gap: 6px; } .post-year h2 { position: static; }
  .note-card { grid-template-columns: 1fr; } .note-cover { aspect-ratio: 16/9; min-height: 0; }
}

/* ---------- Typography system: serif = page/section headings + years; sans = everything else ---------- */
.pub .title, .note-body h3, .project h3, .service h3, .hl-card h3, .card h3 {
  font-family: var(--sans); font-weight: 600; font-size: 1.08rem; line-height: 1.35; letter-spacing: 0;
}
.pub .title { font-size: 1.08rem; }
.note-body h3 { margin-bottom: 8px; }
.project h3 { margin-bottom: 6px; }
.service h3 { font-size: 1.02rem; }
.hero .role { font-family: var(--sans); }
h2 { font-size: 2rem; }
.page-head h1 { font-size: clamp(2.2rem, 4.5vw, 3rem); }


/* ---------- Year / date labels: one rule for the whole site (tokens are in :root) ---------- */
.hl-year, .year h2, .post-year h2, .timeline .when, .post time {
  font-variation-settings: normal; font-family: var(--year-font); font-size: var(--year-size); font-weight: var(--year-weight); color: var(--year-color);
  letter-spacing: var(--year-tracking); line-height: 1.2; text-transform: none;
  font-variant-numeric: tabular-nums; margin: 0;
}
.post time .rt { font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-left: 10px; }
@media (max-width: 760px) { :root { --year-size: 1.2rem; } }

footer .wrap > span:first-child { font-family: var(--serif); font-variation-settings: "opsz" 48, "SOFT" 30; font-size: .95rem; color: var(--text); }
