/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --bg:           #ffffff;
  --bg-subtle:    #f5f6fb;
  --accent:       #4a60b8;
  --accent-light: #eef0f8;
  --text:         #1c1c2e;
  --muted:        #6b7280;
  --border:       #e2e4ec;
  --serif:        'DM Serif Display', Georgia, serif;
  --sans:         'DM Sans', system-ui, sans-serif;
  --mono:         'JetBrains Mono', monospace;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
main { flex: 1; }

/* ── Nav ─────────────────────────────────────────────────── */
.nav {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 64px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  z-index: 100;
}
.nav-logo {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 1px;
  text-decoration: none;
}
.nav-links { display: flex; gap: 32px; }
.nav-link { font-size: 14px; color: var(--muted); text-decoration: none; transition: color .15s; }
.nav-link:hover, .nav-link.active { color: var(--text); text-decoration: none; }
.nav-contact {
  font-size: 13px;
  padding: 6px 18px;
  border: 1.5px solid var(--text);
  border-radius: 2px;
  color: var(--text);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.nav-contact:hover { background: var(--text); color: #fff; text-decoration: none; }

/* ── Homepage hero ───────────────────────────────────────── */
.hero {
  display: flex;
  align-items: center;
  gap: 64px;
  padding: 72px 80px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  min-height: calc(100vh - 56px - 57px); /* viewport minus nav + strip */
}
.hero-photo {
  width: 220px;
  height: 290px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.hero-photo-placeholder {
  width: 220px;
  height: 290px;
  border-radius: 8px;
  flex-shrink: 0;
  background: repeating-linear-gradient(
    45deg,
    #dde0ee 0, #dde0ee 1px,
    var(--bg-subtle) 0, var(--bg-subtle) 7px
  );
  border: 1.5px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
}
.hero-content { flex: 1; min-width: 0; }
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.hero-name {
  font-family: var(--serif);
  font-size: 66px;
  line-height: 1.0;
  color: var(--text);
  margin-bottom: 22px;
}
.hero-divider { width: 40px; height: 1px; background: var(--border); margin-bottom: 22px; }
.hero-bio {
  font-size: 16px;
  line-height: 1.85;
  color: var(--muted);
  max-width: 460px;
  margin-bottom: 28px;
  text-wrap: pretty;
}
.hero-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-light);
  border-radius: 20px;
  font-size: 11px;
  color: var(--accent);
  font-family: var(--mono);
}
.hero-stats { width: 176px; display: flex; flex-direction: column; gap: 28px; flex-shrink: 0; }
.stat { border-left: 2px solid var(--accent); padding-left: 16px; }
.stat-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 5px;
}
.stat-value { font-size: 14px; font-weight: 500; color: var(--text); line-height: 1.4; }

/* ── Section strip ───────────────────────────────────────── */
.section-strip { display: flex; border-top: 1px solid var(--border); }
.section-strip-item {
  flex: 1;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.section-strip-item:last-child { border-right: none; }
.section-strip-item:hover { background: var(--bg-subtle); color: var(--text); text-decoration: none; }
.section-strip-item.active { background: var(--accent); color: #fff; text-decoration: none; }

/* ── Inner page layout ───────────────────────────────────── */
.page-layout {
  max-width: 800px;
  margin: 0 auto;
  padding: 64px 40px;
}
.page-title {
  font-family: var(--serif);
  font-size: 42px;
  margin-bottom: 8px;
}
.page-subtitle { font-size: 15px; color: var(--muted); margin-bottom: 48px; text-wrap: pretty; }

/* ── Research page ───────────────────────────────────────── */
.research-list { display: flex; flex-direction: column; }
.research-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}
.research-title { font-size: 16px; font-weight: 500; margin-bottom: 6px; }
.research-title a { color: var(--text); }
.research-title a:hover { color: var(--accent); text-decoration: none; }
.research-authors { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.research-venue { font-family: var(--mono); font-size: 11px; color: var(--accent); }
.research-year { font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: right; padding-top: 2px; }

/* ── Photography page ────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.photo-item {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; display: block; }
.photo-item:hover img { transform: scale(1.03); }
.photo-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
}

/* ── Lightbox ────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.88);
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity .2s;
  padding: 4px 8px;
}
.lightbox-close:hover { opacity: 1; }
.photo-item { cursor: pointer; }

/* ── Blog listing ────────────────────────────────────────── */
.post-list { display: flex; flex-direction: column; }
.post-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 32px;
  align-items: baseline;
}
.post-date { font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; min-width: 80px; }
.post-item-title { font-size: 16px; font-weight: 500; }
.post-item-title a { color: var(--text); }
.post-item-title a:hover { color: var(--accent); text-decoration: none; }
.post-item-excerpt { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ── Blog post ───────────────────────────────────────────── */
.post-layout { max-width: 680px; margin: 0 auto; padding: 64px 40px; }
.post-header { margin-bottom: 40px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.post-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.post-title { font-family: var(--serif); font-size: 42px; line-height: 1.1; }
.post-content { font-size: 16px; line-height: 1.85; color: var(--text); }
.post-content h2 { font-family: var(--serif); font-size: 28px; margin: 40px 0 16px; }
.post-content h3 { font-size: 18px; font-weight: 600; margin: 28px 0 12px; }
.post-content p { margin-bottom: 20px; }
.post-content ul, .post-content ol { padding-left: 24px; margin-bottom: 20px; }
.post-content li { margin-bottom: 6px; }
.post-content code { font-family: var(--mono); font-size: 13px; background: var(--bg-subtle); padding: 2px 6px; border-radius: 3px; }
.post-content pre { background: var(--bg-subtle); border: 1px solid var(--border); padding: 20px; border-radius: 6px; overflow-x: auto; margin-bottom: 20px; }
.post-content pre code { background: none; padding: 0; font-size: 13px; }
.post-back { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 14px; }
.post-back a { color: var(--muted); }
.post-back a:hover { color: var(--text); text-decoration: none; }

/* ── CV page ─────────────────────────────────────────────── */
.cv-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  border-radius: 3px;
  font-size: 14px;
  text-decoration: none;
  margin-bottom: 40px;
  transition: opacity .15s;
}
.cv-download:hover { opacity: 0.88; text-decoration: none; color: #fff; }
.cv-embed { width: 100%; height: 900px; border: 1px solid var(--border); border-radius: 4px; }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 64px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
}
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 960px) {
  .nav { padding: 0 28px; }
  .nav-links { gap: 20px; }
  .hero { flex-direction: column; padding: 48px 28px; gap: 36px; align-items: flex-start; min-height: unset; }
  .hero-stats { width: 100%; flex-direction: row; flex-wrap: wrap; gap: 20px; }
  .hero-name { font-size: 52px; }
  .page-layout { padding: 40px 24px; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .footer { padding: 0 28px; }
}
@media (max-width: 600px) {
  .nav-links { display: none; }
  .hero-name { font-size: 40px; }
  .hero { padding: 36px 20px; }
  .photo-grid { grid-template-columns: 1fr 1fr; }
}

/* ── News feed ───────────────────────────────────────────── */
.news-feed { display: flex; flex-direction: column; }
.news-entry {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 24px;
  align-items: start;
}
.news-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  padding-top: 3px;
  white-space: nowrap;
}
.news-text {
  font-size: 15px;
  line-height: 1.78;
  color: var(--text);
  margin-bottom: 10px;
  text-wrap: pretty;
}
.news-tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--accent-light);
  border-radius: 20px;
  font-size: 10px;
  color: var(--accent);
  font-family: var(--mono);
  letter-spacing: 0.3px;
}

/* ── Homepage: latest news column ───────────────────────── */
.hero-latest {
  width: 196px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-self: flex-start;
  margin-top: 4px;
}
.hero-latest-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.hero-news-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.hero-news-date {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.hero-news-text {
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  text-wrap: pretty;
}
.hero-news-all {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: opacity .15s;
}
.hero-news-all:hover { opacity: 0.7; text-decoration: none; }

/* ── Contact page ────────────────────────────────────────── */
.contact-page {
  max-width: 600px;
  margin: 80px auto;
  padding: 0 32px;
}
.contact-heading {
  font-family: var(--serif);
  font-size: 40px;
  margin: 0 0 8px;
}
.contact-sub {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 48px;
}
.contact-items {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
}
.contact-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: opacity .15s;
}
.contact-item:hover { opacity: 0.6; text-decoration: none; }
.contact-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-value {
  font-size: 15px;
}
