:root {
  --bg: #f9f9f7;
  --panel: #ffffff;
  --text: #1a1a18;
  --muted: #6b6b63;
  --subtle: #9a9a91;
  --line: #e2e2da;
  --line-soft: #eeede8;
  --link: #1a4f8a;

  --max-width: 1020px;
  --radius: 6px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
}

/* ── Page shell ── */

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 28px 80px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: 0 56px;
  align-items: start;
}

.site-header {
  grid-column: 1;
  grid-row: 1 / 3;
  position: sticky;
  top: 48px;
}

.main {
  grid-column: 2;
  grid-row: 1 / 3;
}

/* ── Header ── */

.site-header {
  margin-bottom: 0;
}

.header-grid {
  display: flex;
  flex-direction: column-reverse;
  gap: 20px;
  margin-bottom: 24px;
}

.header-copy {
  min-width: 0;
}

.site-header h1 {
  margin: 0 0 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
}

.subhead {
  margin: 0 0 14px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.header-links {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 2;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.header-links span {
  display: none;
}

.header-links a {
  color: var(--link);
  display: block;
}

.header-links a:hover,
.top-nav a:hover,
.project-links a:hover,
.contact-line a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.header-photo-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.header-photo {
  display: block;
  width: 160px;
  height: 160px;
  object-fit: cover;
  object-position: center top;
  border-radius: 10px;
  border: 1px solid var(--line);
  filter: grayscale(8%);
}

/* ── Nav ── */

.top-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.top-nav a {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--subtle);
}

.top-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

/* ── Sections ── */

.section {
  margin-bottom: 44px;
}

.section-heading {
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subtle);
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

/* ── Cards → replaced with clean ruled entries ── */

.section-card,
.entry-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.section-card p:last-child,
.entry-card p:last-child {
  margin-bottom: 0;
}

.section-card p,
.entry-card p {
  margin: 0 0 10px;
  font-size: 15.5px;
  line-height: 1.7;
}

/* ── Experience stack ── */

.stack {
  display: grid;
  gap: 0;
}

.entry-card {
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

.entry-card:first-child {
  border-top: none;
}

.entry-card:last-child {
  border-bottom: none;
}

.entry-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 2px;
}

.entry-top h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15.5px;
  line-height: 1.35;
  font-weight: 400;
}

.entry-top h3 span {
  font-weight: 700;
}

.meta {
  flex-shrink: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--subtle);
  white-space: nowrap;
}

.submeta {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: var(--subtle);
  line-height: 1.4;
}

/* ── Research interests ── */

.research-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.research-tags li {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.9;
  padding-right: 18px;
}

.research-tags li::after {
  content: "·";
  margin-left: 18px;
  color: var(--line);
}

.research-tags li:last-child::after {
  content: "";
}

/* ── Project / research card ── */

.project-kicker {
  margin: 0 0 5px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
}

.research-card {
  padding: 0;
}

.research-card h3 {
  margin: 0 0 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.project-links {
  margin-top: 6px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: var(--muted);
}

.project-links a {
  color: var(--link);
}

/* ── Contact ── */

.contact-line {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

.contact-line a {
  color: var(--link);
}

/* ── Mobile ── */

@media (max-width: 700px) {
  .page {
    padding: 36px 18px 56px;
    display: block;
  }

  .site-header {
    position: static;
    margin-bottom: 40px;
  }

  .header-grid {
    flex-direction: row;
    align-items: center;
    gap: 20px;
  }

  .header-photo {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
  }

  .top-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px;
  }

  .site-header h1 {
    font-size: 22px;
  }

  .entry-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .meta {
    font-size: 11px;
  }

  .research-card h3 {
    font-size: 15.5px;
  }
}
