/* -----------------------------------------------------------------
   negara.me — personal site
   tweak the variables in :root to change the whole look at once
   ----------------------------------------------------------------- */

:root {
  --bg: #fbf8f2;            /* warm off-white */
  --paper: #fffdf8;         /* slightly lighter card surface */
  --ink: #1d1b18;           /* near-black with warmth */
  --muted: #6e6a63;         /* secondary text */
  --rule: #e6dfd1;          /* hairline color */
  --accent: #c4553d;        /* terracotta */
  --accent-soft: #f0c9bb;
  --highlight: #f4e2a8;     /* mustard for marker highlight */

  --serif: "Fraunces", "Iowan Old Style", "Hoefler Text", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --max: 760px;
  --max-wide: 920px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "onum";
}

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

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
}
.page--wide { max-width: var(--max-wide); }

/* -------- top nav -------- */
.topnav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 1rem;
  margin-bottom: 4rem;
  border-bottom: 1px solid var(--rule);
}
.topnav .brand {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.topnav .brand:hover { color: var(--accent); }
.topnav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.topnav ul a {
  color: var(--muted);
  text-decoration: none;
  background: none;
  position: relative;
  padding-bottom: 2px;
}
.topnav ul a:hover { color: var(--accent); }
.topnav ul a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}
.topnav ul a:hover::after { transform: scaleX(1); }

/* -------- inline link style (default) -------- */
main a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 1.5px;
  transition: background-size 0.2s ease, color 0.2s ease;
  padding-bottom: 1px;
}
main a:hover {
  color: var(--accent);
  background-size: 100% 100%;
  background-image: linear-gradient(var(--accent-soft), var(--accent-soft));
  color: var(--ink);
}

/* -------- hero -------- */
.hero {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 5rem;
}
@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; }
}

.portrait {
  position: relative;
  width: 200px;
  aspect-ratio: 4 / 5;
}
.portrait::before {
  content: "";
  position: absolute;
  inset: 12px -12px -12px 12px;
  background: var(--accent);
  border-radius: 4px;
  z-index: 0;
  transition: transform 0.3s ease;
}
.portrait:hover::before {
  transform: translate(4px, 4px);
}
.portrait img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  background: var(--accent-soft);
}
.portrait--placeholder {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 4px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 56px;
  color: var(--accent);
}

.intro .hello {
  font-family: var(--sans);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin: 0 0 0.6rem;
}

h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(40px, 6.5vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}
h1 .accent {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}

.subtitle {
  font-family: var(--sans);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 1.6rem;
}

.bio {
  margin: 0 0 1rem;
  max-width: 60ch;
  font-size: 18px;
}

.currently {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-style: italic;
  color: var(--muted);
  font-size: 16px;
  margin-top: 0.25rem;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.85); }
}

/* link row in hero — bracketed */
.link-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin: 1.8rem 0 0;
  padding: 0;
  font-family: var(--sans);
  font-size: 14px;
}
.link-row a {
  background: none !important;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  gap: 0.15rem;
  transition: color 0.15s ease;
}
.link-row a::before { content: "["; color: var(--muted); }
.link-row a::after  { content: "]"; color: var(--muted); }
.link-row a:hover { color: var(--accent); }
.link-row a:hover::before,
.link-row a:hover::after { color: var(--accent); }

/* -------- sections -------- */
.section { margin: 5rem 0; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule);
}
.section-head .num {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
}
.section-head .section-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 50%;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  letter-spacing: 0;
  padding-bottom: 2px;
}
.section-head .section-mark-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}
.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 30px;
  letter-spacing: -0.01em;
}
.section-head .aside {
  margin-left: auto;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* -------- news (year-grouped, like publications but smaller year) -------- */
.news-year {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.8rem;
  margin-bottom: 2.5rem;
  align-items: start;
}
.news-year .year {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 36px;
  line-height: 1;
  color: var(--accent);
  margin: 0;
  position: sticky;
  top: 1.5rem;
  align-self: start;
}
.news-year ul.news-items {
  list-style: none;
  margin: 0;
  padding: 0;
}
.news-year ul.news-items > li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 0.55rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--rule);
  align-items: start;
}
.news-year ul.news-items > li:last-child { border-bottom: 0; }
.news-year .emoji {
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
  user-select: none;
}
.news-year p {
  margin: 0;
  line-height: 1.55;
  font-size: 16px;
}
.news-year .meta {
  margin-top: 0.25rem !important;
  font-size: 13px;
  color: var(--muted);
  font-family: var(--sans);
  line-height: 1.45;
}
.news-year .meta em {
  font-family: var(--serif);
  color: var(--ink);
}

@media (max-width: 600px) {
  .news-year { grid-template-columns: 1fr; gap: 0.4rem; }
  .news-year .year { font-size: 28px; position: static; }
}

/* "see all news" link button */
.more-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
  padding: 0.6rem 1.1rem;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink) !important;
  background: var(--paper) !important;
  background-image: none !important;
  border: 1px solid var(--rule);
  border-radius: 999px;
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.more-link:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  transform: translateX(2px);
}
.more-link::after {
  content: "\2192";
  font-family: var(--serif);
  color: var(--accent);
  font-size: 16px;
}

/* -------- announce callout (job market line) -------- */
.announce {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  margin: 1rem 0 0;
  padding: 0.55rem 1rem 0.55rem 0.85rem;
  background: var(--highlight);
  border-left: 3px solid var(--accent);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  border-radius: 0 3px 3px 0;
  letter-spacing: 0.01em;
}
.announce-icon { font-size: 15px; }

/* -------- page banner image (top of subpages) -------- */
.page-banner {
  position: relative;
  width: 100%;
  height: 220px;
  margin: 0 0 3rem;
  overflow: hidden;
  border-radius: 4px;
  background: var(--accent-soft);
}
.page-banner img,
.page-banner svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.page-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(29,27,24,0.05) 100%);
  pointer-events: none;
}
@media (max-width: 600px) {
  .page-banner { height: 150px; }
}

/* -------- social icon row -------- */
.socials {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 0;
  padding: 0;
}
.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--ink) !important;
  background: var(--paper) !important;
  background-image: none !important;
  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.socials a:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  background: var(--bg) !important;
  transform: translateY(-2px);
}
.socials svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* -------- collaboration callout -------- */
.collab {
  margin: 2.5rem 0;
  padding: 1.6rem 1.6rem 1.4rem;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: 0 4px 4px 0;
  background: var(--paper);
}
.collab .collab-eyebrow {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.collab h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 24px;
  margin: 0 0 0.6rem;
}
.collab p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

/* -------- publication tweaks: prominent venue -------- */
.pub-venue {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 9px;
  border-radius: 3px;
  margin-bottom: 0.45rem;
  font-weight: 600;
}
.pub-venue.is-best {
  background: var(--highlight);
  color: var(--ink);
}
.pub-list li.pub-item {
  padding: 1rem 0 1.2rem;
}
.pub-list li.pub-item .pub-title {
  font-size: 17px;
  margin-top: 0.1rem;
}

/* -------- research experience cards -------- */
.exp-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.exp-list > li {
  display: grid;
  grid-template-columns: 130px 1fr 70px;
  gap: 1.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px dashed var(--rule);
  align-items: start;
}
.exp-list > li:last-child { border-bottom: 0; }
.exp-list .when {
  font-family: var(--sans);
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.1em;
  padding-top: 0.4rem;
}
.exp-list .role {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
}
.exp-list > li {
  grid-template-columns: 130px 1fr 96px;
}
.exp-list .exp-logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--paper);
  padding: 10px;
  border: 1px solid var(--rule);
  justify-self: end;
}
@media (max-width: 600px) {
  .exp-list > li { grid-template-columns: 1fr 80px; }
  .exp-list .when { grid-column: 1 / -1; padding-top: 0; }
  .exp-list > li > div:nth-child(2) { grid-column: 1; }
  .exp-list .exp-logo { grid-column: 2; width: 80px; height: 80px; }
}

/* -------- project themes + mini cards on projects.html -------- */
.theme-section {
  margin-bottom: 3rem;
}
.theme-section h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 28px;
  color: var(--accent);
  letter-spacing: -0.01em;
  margin: 0 0 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
  line-height: 1.2;
}
.theme-empty {
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  font-size: 15px;
  padding: 1rem 0;
}

/* -------- mini project cards (grid view on projects.html) -------- */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.proj-mini {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  background: var(--paper) !important;
  background-image: none !important;
  color: var(--ink) !important;
  text-decoration: none;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.proj-mini:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(29,27,24,0.08);
  border-color: var(--accent);
}
.proj-mini-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  display: block;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  padding: 12px;
}
.proj-mini-body {
  padding: 1rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.proj-mini-meta {
  font-family: var(--sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 0.35rem;
}
.proj-mini-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 0.55rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.proj-mini:hover .proj-mini-title { color: var(--accent); }
.proj-mini-tldr {
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
  color: var(--muted);
}
.proj-mini-arrow {
  margin-top: auto;
  padding-top: 0.8rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--accent);
  align-self: flex-end;
}

/* topic mini card with no image (placeholder pattern) */
.proj-mini--soon .proj-mini-img-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  background:
    linear-gradient(135deg, var(--accent-soft) 0%, var(--highlight) 100%);
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.proj-mini--soon .proj-mini-img-placeholder::after {
  content: "more soon";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.exp-list .role .org {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}
.exp-list .where {
  margin: 0.2rem 0 0.6rem;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}
.exp-list .projects {
  margin: 0.5rem 0 0;
  padding-left: 1rem;
  list-style: square;
}
.exp-list .projects li {
  padding: 0.15rem 0;
  font-size: 15px;
}
.exp-list .projects li::marker { color: var(--accent); }
.exp-list .manager {
  margin: 0.5rem 0 0;
  font-size: 14px;
  color: var(--muted);
}
.exp-list .manager strong { color: var(--ink); font-weight: 600; }

@media (max-width: 600px) {
  .exp-list > li { grid-template-columns: 1fr; gap: 0.3rem; }
}

/* -------- service / awards -------- */
.svc-block { margin-bottom: 2.5rem; }
.svc-block h3 {
  margin: 0 0 0.9rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -0.01em;
  color: var(--accent);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.5rem;
  line-height: 1.2;
}
.svc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.svc-list > li {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1.2rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--rule);
  align-items: start;
}
.svc-list > li:last-child { border-bottom: 0; }
.svc-list .when {
  font-family: var(--sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding-top: 0.3rem;
}
.svc-list p { margin: 0; line-height: 1.55; font-size: 16px; }
.svc-list .meta {
  margin-top: 0.2rem !important;
  font-size: 13px;
  color: var(--muted);
  font-family: var(--sans);
}
.svc-list .award-tag {
  display: inline-block;
  background: var(--highlight);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 0.4rem;
  vertical-align: 1px;
}
@media (max-width: 540px) {
  .svc-list > li { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* -------- projects (rich card with photo) -------- */
.proj-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2.2rem;
}
.proj-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.proj-card:hover {
  border-color: var(--accent-soft);
  box-shadow: 0 10px 24px rgba(29,27,24,0.08);
  transform: translateY(-2px);
}
.proj-photo {
  display: block;
  background: var(--bg) !important;
  background-image: none !important;
  border-bottom: 1px solid var(--rule);
}
.proj-photo img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.25s ease;
}
.proj-card:hover .proj-photo img {
  opacity: 0.95;
}
.proj-body {
  padding: 1.6rem 1.8rem 1.8rem;
}
.proj-meta {
  font-family: var(--sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 0.5rem;
}
.proj-card h3 {
  margin: 0 0 0.5rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 30px;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.proj-tagline {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
  font-size: 18px;
  margin: 0 0 1rem;
  line-height: 1.4;
}
.proj-card p {
  margin: 0 0 0.8rem;
  font-size: 16px;
  line-height: 1.6;
}
.proj-card p:last-of-type { margin-bottom: 0; }
.proj-bullets {
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 1rem;
  display: grid;
  gap: 0.3rem;
}
.proj-bullets li {
  padding: 0.25rem 0 0.25rem 1.1rem;
  position: relative;
  font-size: 15px;
  line-height: 1.55;
}
.proj-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.proj-results {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  margin: 0.8rem 0 1rem;
  padding: 1rem 1.2rem;
  background: var(--bg);
  border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0;
}
.proj-result {
  display: flex;
  flex-direction: column;
}
.proj-result .num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 28px;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
}
.proj-result .label {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  margin-top: 0.25rem;
  letter-spacing: 0.04em;
}
.proj-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.proj-links a {
  background: none !important;
  color: var(--accent) !important;
}
.proj-links a::before { content: "["; color: var(--muted); }
.proj-links a::after  { content: "]"; color: var(--muted); }

@media (max-width: 600px) {
  .proj-body { padding: 1.3rem 1.3rem 1.5rem; }
  .proj-results { grid-template-columns: 1fr; }
}

/* -------- talks hero (portrait photo + title) -------- */
.talks-hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  align-items: end;
  margin-bottom: 4rem;
}
.talks-hero-photo {
  position: relative;
  width: 220px;
  aspect-ratio: 4 / 5;
}
.talks-hero-photo::before {
  content: "";
  position: absolute;
  inset: 12px -12px -12px 12px;
  background: var(--accent);
  border-radius: 4px;
  z-index: 0;
}
.talks-hero-photo img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 4px;
  display: block;
  background: var(--accent-soft);
}
@media (max-width: 700px) {
  .talks-hero { grid-template-columns: 1fr; gap: 2rem; }
  .talks-hero-photo { width: 180px; }
}

/* -------- talks: vertical timeline -------- */
.talk-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.talk-timeline::before {
  content: "";
  position: absolute;
  left: 119px;
  top: 18px;
  bottom: 18px;
  width: 1.5px;
  background: var(--rule);
}
.talk-timeline > li {
  display: grid;
  grid-template-columns: 110px 24px 1fr;
  gap: 0;
  padding: 0.85rem 0;
  align-items: start;
  position: relative;
}
.talk-timeline .when {
  font-family: var(--sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-align: right;
  padding: 0.55rem 1rem 0 0;
  white-space: nowrap;
}
.talk-timeline .marker {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 0.6rem;
}
.talk-timeline .marker::before {
  content: "";
  width: 11px;
  height: 11px;
  background: var(--accent);
  border-radius: 50%;
  border: 2.5px solid var(--bg);
  display: block;
  z-index: 1;
}
.talk-timeline .content {
  padding: 0.3rem 0 0 1.1rem;
}
.talk-timeline .talk-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.3;
  margin: 0 0 0.25rem;
}
.talk-timeline .venue {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}
.talk-timeline .resources {
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.talk-timeline .resources a {
  background: none !important;
  color: var(--accent) !important;
}
.talk-timeline .resources a::before { content: "["; color: var(--muted); }
.talk-timeline .resources a::after  { content: "]"; color: var(--muted); }

@media (max-width: 640px) {
  .talk-timeline > li { grid-template-columns: 1fr; gap: 0.2rem; }
  .talk-timeline::before { display: none; }
  .talk-timeline .marker { display: none; }
  .talk-timeline .when { text-align: left; padding: 0; }
  .talk-timeline .content { padding-left: 0; }
}

/* -------- two-column lists (talks, service) -------- */
.cols {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cols li {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--rule);
}
.cols li:last-child { border-bottom: 0; }
.cols .label {
  font-family: var(--sans);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-top: 0.3rem;
}
.cols p, .cols div { margin: 0; }

@media (max-width: 540px) {
  .cols li { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* -------- pull quote / callout -------- */
.callout {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.45;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding: 0.4rem 0 0.4rem 1.2rem;
  margin: 1.5rem 0;
}

/* -------- publications -------- */
.pub-year {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
  align-items: start;
}
.pub-year .year {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 44px;
  line-height: 1;
  margin: 0;
  color: var(--accent);
  position: sticky;
  top: 1rem;
  letter-spacing: -0.01em;
}
.pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: pub;
}
.pub-list li {
  padding: 0.9rem 0 1.1rem;
  border-bottom: 1px dashed var(--rule);
  counter-increment: pub;
  position: relative;
}
.pub-list li:last-child { border-bottom: 0; }
.pub-title {
  margin: 0 0 0.3rem;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}
.pub-title a {
  background-image: linear-gradient(var(--rule), var(--rule)) !important;
}
.pub-title a:hover {
  background-image: linear-gradient(var(--accent-soft), var(--accent-soft)) !important;
}
.pub-authors {
  margin: 0 0 0.3rem;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}
.pub-authors strong {
  color: var(--ink);
  font-weight: 600;
}
.pub-meta {
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}
.pub-meta .venue {
  color: var(--ink);
  font-weight: 500;
}
.pub-meta .award {
  display: inline-block;
  background: var(--highlight);
  color: var(--ink);
  padding: 1px 8px;
  border-radius: 999px;
  margin-left: 0.4rem;
  text-transform: none;
  letter-spacing: 0.04em;
}
.pub-links {
  list-style: none;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  margin: 0.4rem 0 0;
  padding: 0;
  font-family: var(--sans);
  font-size: 12px;
}
.pub-links a {
  background: none !important;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pub-links a::before { content: "["; color: var(--muted); }
.pub-links a::after  { content: "]"; color: var(--muted); }

@media (max-width: 640px) {
  .pub-year { grid-template-columns: 1fr; gap: 0.5rem; }
  .pub-year .year { font-size: 40px; position: static; }
}

/* -------- footer -------- */
footer.foot {
  margin-top: 6rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}
footer.foot a {
  background: none;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
}
footer.foot a:hover { color: var(--accent); border-color: var(--accent); }

/* -------- small utility -------- */
.kbd {
  font-family: var(--sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1px 6px;
  background: var(--paper);
}

.divider-flourish {
  text-align: center;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--accent);
  margin: 3rem 0;
  letter-spacing: 0.4em;
}

/* -------- banner cards (home → publications / research / projects / talks) -------- */
.cards-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 4rem 0 2rem;
}

.card {
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 1.6rem 1.4rem 1.4rem;
  background: var(--paper) !important;
  background-image: none !important;
  border: 1px solid var(--rule);
  border-radius: 4px;
  color: var(--ink) !important;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-height: 200px;
}
.card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--accent);
  border-color: var(--accent);
}
.card .card-eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.card h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}
.card p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 1.4rem;
}
.card .card-arrow {
  margin-top: auto;
  align-self: flex-end;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--accent);
  transition: transform 0.2s ease;
}
.card:hover .card-arrow {
  transform: translateX(4px);
}

/* -------- about page: things-i-love list -------- */
.loves {
  list-style: none;
  margin: 1rem 0 2rem;
  padding: 0;
}
.loves li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--rule);
  align-items: baseline;
}
.loves li:last-child { border-bottom: 0; }
.loves .key {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
  font-size: 17px;
}
.loves p { margin: 0; }

@media (max-width: 540px) {
  .loves li { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* -------- about page: photo strip (2 photos: board games / gaming setup) -------- */
.photo-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  margin: 2.5rem 0 1rem;
}
.photo-strip img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  background: var(--accent-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.photo-strip img:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(29,27,24,0.08);
}
@media (max-width: 600px) {
  .photo-strip { grid-template-columns: 1fr 1fr; }
  .photo-strip img:nth-child(3) { grid-column: span 2; height: 180px; }
}

/* -------- about page: chaloos road photo -------- */
.road-strip {
  margin: 1.6rem 0 2rem;
}
.road-strip > img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  background: var(--accent-soft);
}
.road-strip figcaption {
  margin-top: 0.7rem;
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
  font-family: var(--serif);
  text-align: center;
}
.road-strip figcaption span[lang="fa"] {
  font-style: normal;
  font-family: var(--serif);
  color: var(--ink);
  margin: 0 0.15rem;
}

/* -------- about page: cats grid (2x2 with 1 road + 3 cats) -------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}
.cat-grid figure {
  margin: 0;
}
.cat-grid figure { margin: 0; }
.cat-grid img {
  width: 100%;
  height: 280px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  background: var(--accent-soft);
  transition: transform 0.25s ease;
}
.cat-grid img:hover {
  transform: translateY(-3px);
}
.cat-grid figcaption {
  margin-top: 0.6rem;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}
.cat-grid figcaption strong {
  color: var(--accent);
  font-style: italic;
  font-family: var(--serif);
  font-weight: 500;
}
.cat-grid figcaption span[lang="fa"] {
  font-family: var(--serif);
  color: var(--ink);
  margin: 0 0.15rem;
}
@media (max-width: 720px) {
  .cat-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .cat-grid img { height: 220px; }
}

/* -------- about page: world map -------- */
.map-wrap {
  position: relative;
  margin: 1.5rem 0 2rem;
  padding: 1rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
}
#world-map {
  width: 100%;
  height: 460px;
}
@media (max-width: 640px) {
  #world-map { height: 320px; }
}

/* override jsvectormap defaults to match site colors */
.jvm-tooltip {
  font-family: var(--sans) !important;
  font-size: 12px !important;
  background: var(--ink) !important;
  color: #fbf8f2 !important;
  border-radius: 4px !important;
  padding: 0 !important;
  letter-spacing: 0.04em;
  overflow: hidden;
  max-width: 240px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}
.jvm-tooltip .tip-img {
  display: block;
  width: 240px;
  height: 140px;
  object-fit: cover;
  background: #2a2622;
}
.jvm-tooltip .tip-name {
  padding: 7px 12px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}
.jvm-tooltip .tip-name.is-noimg {
  padding: 6px 10px;
}
/* default tooltip (when no image): keep small padding */
.jvm-tooltip:not(:has(.tip-img)) {
  padding: 6px 10px !important;
}

.country-list {
  columns: 3;
  column-gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
}
.country-list li {
  break-inside: avoid;
  padding: 0.18rem 0;
}
.country-list .num {
  display: inline-block;
  width: 24px;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-family: var(--serif);
  font-style: italic;
}
@media (max-width: 640px) {
  .country-list { columns: 2; }
}

/* fade-in on load */
.intro, .hero, .section {
  animation: rise 0.6s ease both;
}
.section:nth-of-type(1) { animation-delay: 0.05s; }
.section:nth-of-type(2) { animation-delay: 0.1s; }
.section:nth-of-type(3) { animation-delay: 0.15s; }
.section:nth-of-type(4) { animation-delay: 0.2s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
